query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Create an intent that can start the Speech Recognizer activity
private void display() { Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM); // Start the activity, the intent will be populated with the speech text startActivityForResult(intent, REQ_CODE_SPEECH_INPUT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startVoiceRecognitionActivity()\n {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"Voice recognition Demo...\");\n startActivityForResult(intent, REQUEST_CODE);\n }", "private void startVoiceRecognitionActivity() {\n\t\tIntent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\t\tintent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n\t\tintent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"What food are you stocking right now?\");\n\t\tstartActivityForResult(intent, SPEECH_REQCODE);\n\t}", "public void startSpeechRecognition() {\n\t\tIntent i = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\t\ti.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, \"en-GB\");\n\t\ttry {\n\t\t\tstartActivityForResult(i, REQUEST_OK);\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}", "private void startVoiceRecognitionActivity()\n\t{\n\t\tSystem.out.println(\"Starting activity lel\");\n\t\tIntent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\t\tintent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n\t\t\t\tRecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n\t\tintent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"Voice recognition Demo...\");\n\t\tstartActivityForResult(intent, VOICE_REQUEST_CODE);\n\t}", "private void startVoiceRecognitionActivity() {\n\t\t// Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\t\t// intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n\t\t// RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n\t\t// intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n\t\t// \"Diga o valor do produto\");\n\t\t// intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE, \"pt-BR\");\n\t\t// // intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE,\n\t\t// \"en-US\");\n\t\t// intent.putExtra(RecognizerIntent.EXTRA_ONLY_RETURN_LANGUAGE_PREFERENCE,\n\t\t// true);\n\t\t// startActivityForResult(intent, VOICE_RECOGNITION_REQUEST_CODE);\n\t\tUtils.startVoiceRecognitionActivity(this, Utils.nomeProdutoMessage);\n\t}", "public void onClick(View v) {\n speechRecognizer.startListening(speechRecognizerIntent);\n Toast.makeText( getActivity(),\"Voice\", Toast.LENGTH_SHORT).show();\n }", "private void speak() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM) ;\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"Speak the Item\");\n\n startActivityForResult(intent, SPEECH_REQUEST_CODE);\n\n }", "public void showSpeechInput(View v) {\n\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"Say something\");\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(this, \"Speech To Text not supported\", Toast.LENGTH_LONG).show();\n }\n }", "private void askSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n \"Hi speak something\");\n speakOut(\"Open Mic\");\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n\n }\n }", "public String speak(){\n speechOutput.clear();\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"Just speak normally into your phone\");\n intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 10);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.ENGLISH);\n try {\n startActivityForResult(intent, VOICE_RECOGNITION);\n } catch (ActivityNotFoundException e) {\n e.printStackTrace();\n }\n\n\n return speechResult;\n }", "public void speakButtonClicked(View v)\n {\n startVoiceRecognitionActivity();\n }", "private void displaySpeechRecognizer() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n // Start the activity, the intent will be populated with the speech text\n startActivityForResult(intent, Constants.SPEECH_REQUEST_CODE);\n }", "private void loadSpeechActivity() {\n PackageManager pm = getPackageManager();\n List<ResolveInfo> activities = pm.queryIntentActivities(\n new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0);\n if (activities.size() == 0)\n {\n voiceSupport=0;\n }\n\t\t\n\t}", "public void listen(View v)\r\n {\r\n // set up an intent to ask for speech-to-text, and connect it back to\r\n // this Activity\r\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\r\n intent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, getClass().getPackage().getName());\r\n\r\n // Give text to display, and a hint about the language model\r\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"Tell the robot what to do!\");\r\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\r\n\r\n // How many results to return? They will be sorted by confidence\r\n intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 5);\r\n\r\n // Start the activity\r\n startActivityForResult(intent, VOICE_RECOGNITION_REQUEST_CODE);\r\n }", "private void listenToSpeech(int returnCode) {\n\t\tIntent listenIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\t\t//indicate package\n\t\tlistenIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, getClass().getPackage().getName());\n\t\t//message to display while listening\n\t\tlistenIntent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"\");\n\t\t//set speech model\n\t\tlistenIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n\t\t//specify number of results to retrieve\n\t\tlistenIntent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 10);\n\t\t//start listening\n\t\tstartActivityForResult(listenIntent, returnCode);\n\n\t}", "private void manageSpeechRecognition() {\n\n mRecognizerIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n mRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE, Locale.getDefault().getLanguage().trim());\n mRecognizerIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, this.getPackageName());\n mRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n mRecognizerIntent.putExtra(RecognizerIntent.EXTRA_PARTIAL_RESULTS, true);\n mRecognizerIntent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS, 100);\n\n mRecognizerIntent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 3);\n\n mSongSpeechRecognitionListener = new SongSpeechRecognitionListener(mRippleBackground, mFloatingActionButton);\n\n mSpeechRecognizer = SpeechRecognizer.createSpeechRecognizer(this);\n mSpeechRecognizer.setRecognitionListener(mSongSpeechRecognitionListener);\n\n }", "private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, \"us-US\");\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }", "private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }", "private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }", "private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }", "private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }", "private Intent createVoiceAppSearchIntent(Bundle appData)\n\t{\n\t\tComponentName searchActivity = mSearchable.getSearchActivity();\n\t\t// create the necessary intent to set up a search-and-forward operation\n\t\t// in the voice search system. We have to keep the bundle separate,\n\t\t// because it becomes immutable once it enters the PendingIntent\n\t\tIntent queryIntent = new Intent(Intent.ACTION_SEARCH);\n\t\tqueryIntent.setComponent(searchActivity);\n\t\tPendingIntent pending = PendingIntent.getActivity(getContext(), 0,\n\t\t\t\tqueryIntent, PendingIntent.FLAG_ONE_SHOT);\n\t\t// Now set up the bundle that will be inserted into the pending intent\n\t\t// when it's time to do the search. We always build it here (even if\n\t\t// empty)\n\t\t// because the voice search activity will always need to insert \"QUERY\"\n\t\t// into\n\t\t// it anyway.\n\t\tBundle queryExtras = new Bundle();\n\t\tif (appData != null)\n\t\t{\n\t\t\tqueryExtras.putBundle(SearchManager.APP_DATA, appData);\n\t\t}\n\t\t// Now build the intent to launch the voice search. Add all necessary\n\t\t// extras to launch the voice recognizer, and then all the necessary\n\t\t// extras\n\t\t// to forward the results to the searchable activity\n\t\tIntent voiceIntent = new Intent(\n\t\t\t\tRecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\t\tvoiceIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t// Add all of the configuration options supplied by the searchable's\n\t\t// metadata\n\t\tString languageModel = getString(mSearchable.getVoiceLanguageModeId());\n\t\tif (languageModel == null)\n\t\t{\n\t\t\tlanguageModel = RecognizerIntent.LANGUAGE_MODEL_FREE_FORM;\n\t\t}\n\t\tString prompt = getString(mSearchable.getVoicePromptTextId());\n\t\tString language = getString(mSearchable.getVoiceLanguageId());\n\t\tint maxResults = mSearchable.getVoiceMaxResults();\n\t\tif (maxResults <= 0)\n\t\t{\n\t\t\tmaxResults = 1;\n\t\t}\n\t\tvoiceIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n\t\t\t\tlanguageModel);\n\t\tvoiceIntent.putExtra(RecognizerIntent.EXTRA_PROMPT, prompt);\n\t\tvoiceIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, language);\n\t\tvoiceIntent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, maxResults);\n\t\tvoiceIntent.putExtra(EXTRA_CALLING_PACKAGE,\n\t\t\t\tsearchActivity == null ? null : searchActivity.toShortString());\n\t\t// Add the values that configure forwarding the results\n\t\tvoiceIntent.putExtra(RecognizerIntent.EXTRA_RESULTS_PENDINGINTENT,\n\t\t\t\tpending);\n\t\tvoiceIntent.putExtra(\n\t\t\t\tRecognizerIntent.EXTRA_RESULTS_PENDINGINTENT_BUNDLE,\n\t\t\t\tqueryExtras);\n\t\treturn voiceIntent;\n\t}", "private View.OnClickListener onVoiceSearchButtonClick() {\n return new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n try {\n if (canRecognizeSpeechInput()) {\n final Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\n // Specify the calling package to identify your application\n intent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, getClass()\n .getPackage().getName());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n \"Say a Make, Model, Stock Number, or VIN\");\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_WEB_SEARCH);\n\n // Specify how many results you want to receive. The results will be sorted\n // where the first result is the one with higher confidence.\n intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 5);\n\n getParentFragment().startActivityForResult(intent,\n VOICE_RECOGNITION_REQUEST_CODE);\n }\n }\n catch (final Exception e) {\n showSpeechRecognitionErrorDialog();\n logError(e);\n }\n }\n };\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode,\n Intent data) {\n if (requestCode == Constants.SPEECH_REQUEST_CODE && resultCode == RESULT_OK) {\n List<String> results = data.getStringArrayListExtra(\n RecognizerIntent.EXTRA_RESULTS);\n spokenText = results.get(0);\n // Do something with spokenText\n Log.i(TAG, \"Spoken Text = \" + spokenText);\n\n if (spokenText.startsWith(\"home\") || spokenText.startsWith(\"work\")) {\n Log.i(TAG, \"Creating Google Api Client\");\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addApi(Wearable.API)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .build();\n mGoogleApiClient.connect();\n }\n } else {\n super.onActivityResult(requestCode, resultCode, data);\n }\n }", "private void addVoiceApp() {\n\t\tApplicationInfo application = new ApplicationInfo();\r\n\t\tapplication.title = \"Camera\";\r\n application.icon = context.getResources().getDrawable(R.drawable.ic_camera_50);\r\n Intent intent=new Intent(context,CameraActivity.class);\r\n application.voiceTag=true;\r\n application.setIntent(intent);\r\n mApplications.add(application);\r\n application.setIndex(mApplications.size()-1); \r\n \r\n\t\tapplication = new ApplicationInfo();\r\n\t\tapplication.title = \"Google\";\r\n\t\tintent=new Intent(\"com.google.glass.action.START_VOICE_SEARCH_ACTIVITY\");\r\n\t\tapplication.setIntent(intent);\r\n\t\tapplication.voiceTag=true;\r\n\t\tapplication.icon = context.getResources().getDrawable(R.drawable.ic_search_50);\r\n mApplications.add(application);\r\n application.setIndex(mApplications.size()-1); \r\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n \n // If this Activity is being recreated due to a config change (e.g. \n // screen rotation), check for the saved SpeechKit instance.\n _speechKit = (SpeechKit)getLastNonConfigurationInstance();\n if (_speechKit == null)\n {\n _speechKit = SpeechKit.initialize(getApplication().getApplicationContext(), AppInfo.SpeechKitAppId, AppInfo.SpeechKitServer, AppInfo.SpeechKitPort, AppInfo.SpeechKitSsl, AppInfo.SpeechKitApplicationKey);\n _speechKit.connect();\n // TODO: Keep an eye out for audio prompts not working on the Droid 2 or other 2.2 devices.\n Prompt beep = _speechKit.defineAudioPrompt(R.raw.beep);\n _speechKit.setDefaultRecognizerPrompts(beep, Prompt.vibration(100), null, null);\n }\n \n final Button dictationButton = (Button)findViewById(R.id.btn_dictation);\n final Button ttsButton = (Button)findViewById(R.id.btn_tts);\n\n Button.OnClickListener l = new Button.OnClickListener()\n {\n @Override\n public void onClick(View v) {\n if (v == dictationButton)\n {\n Intent intent = new Intent(v.getContext(), DictationView.class);\n MainView.this.startActivity(intent);\n } else if (v == ttsButton)\n {\n Intent intent = new Intent(v.getContext(), TtsView.class);\n MainView.this.startActivity(intent);\n }\n }\n };\n \n dictationButton.setOnClickListener(l);\n ttsButton.setOnClickListener(l);\n }", "private void promptSpeechInput() {\n\t\tIntent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\t\tintent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n\t\t\t\tRecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n\t\tintent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n\t\tintent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n\t\t\t\tgetString(R.string.speech_prompt));\n\t\ttry {\n\t\t\tstartActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n\t\t} catch (ActivityNotFoundException a) {\n\t\t\tToast.makeText(getActivity(),\n\t\t\t\t\tgetString(R.string.speech_not_supported),\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t}\n\t}", "@Override\r\n\tpublic void onClick(View arg0) {\n\t\tIntent i = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\r\n\t\ti.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\r\n\t\ti.putExtra(RecognizerIntent.EXTRA_PROMPT, \"Please Speak Now !\");\r\n\t\tstartActivityForResult(i, check);\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n txtSpeechInput = (TextView) findViewById(R.id.txtSpeechInput);\n textToSpeech = new TextToSpeech(getApplicationContext(), new TextToSpeech.OnInitListener() {\n @Override\n public void onInit(int status) {\n if (status != TextToSpeech.ERROR) {\n textToSpeech.setLanguage(Locale.ENGLISH);\n }\n }\n });\n\n btnSpeak = (ImageButton) findViewById(R.id.btnSpeak);\n btnSpeak.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n promptSpeechInput();\n }\n });\n\n }", "public void speakbutton_clicked(View v) {\n\t\tstartVoiceRecognitionActivity();\n\t}", "public void startVoiceRecognition() {\n startVoiceRecognition(null);\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == SystemData.VOICE_RECOGNITION_REQUEST_CODE && resultCode == RESULT_OK) {\n final ArrayList<String> matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\n if (matches.size() > 0) {\n text = matches.get(0);\n callContactByName();\n selectFunctionality();\n }\n } else if (requestCode == MY_TTS_CHECK_CODE) {\n if (resultCode == TextToSpeech.Engine.CHECK_VOICE_DATA_PASS) {\n TextToSpeechUtility.setupTextToSpeech(this);\n } else {\n Intent installIntent = new Intent();\n installIntent.setAction(TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA);\n startActivity(installIntent);\n }\n\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(\n\t\t\t\t\t\tRecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\n\t\t\t\tintent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, \"en-US\");\n\n\t\t\t\ttry {\n\t\t\t\t\tstartActivityForResult(intent, RESULT_SPEECH);\n\t\t\t\t\tet1.setText(\"\");\n\t\t\t\t} catch (ActivityNotFoundException a) {\n\t\t\t\t\tToast t = Toast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\"Opps! Your device doesn't support Speech to Text\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT);\n\t\t\t\t\tt.show();\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}", "@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data)\r\n {\r\n if (requestCode == VOICE_RECOGNITION_REQUEST_CODE && resultCode == RESULT_OK) {\r\n // go through the results, dump them all to a TextView\r\n ArrayList<String> matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\r\n String res = matches.get(0);\r\n if (res.contains(\"dance\")) {\r\n speak(\"Did you say dance? That robot over there likes to dance... should I play some music for it?\");\r\n }\r\n else if (res.contains(\"your name\")) {\r\n speak(\"My name is \" + prefs.getString(PREFS_NAME, \"Mrs. Robot\"));\r\n }\r\n else if (res.contains(\"do you like first grade\")) {\r\n speak(\"I love first grade. Reading and Writing and Math are some of my favorites!\");\r\n }\r\n else if (res.contains(\"do you like kindergarten\")) {\r\n speak(\"I think kindergarten is great. I especially love kid writing!\");\r\n }\r\n else if (res.contains(\"what do you know\")) {\r\n speak(\"I don't know very much. Robots aren't as smart as kids.\");\r\n }\r\n else {\r\n speak(\"It sounded like you said \" + res + \". I don't know what that means\");\r\n }\r\n }\r\n else if (requestCode == VOICE_RECOGNITION_REQUEST_CODE) {\r\n speak(\"I didn't understand that... please try again\");\r\n }\r\n super.onActivityResult(requestCode, resultCode, data);\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n imageview=(ImageView) findViewById(R.id.imageView);\n Display display=getWindowManager().getDefaultDisplay();\n Point size=new Point();\n display.getSize(size);\n width=size.x;\n height=size.y;\n if(height>width){small=width;check=1;}\n else small=height;\n x=width/2;\n y=height/2;\n Bitmap b = Bitmap.createBitmap(width,height,Bitmap.Config.ARGB_8888);\n imageview.setImageBitmap(b);\n c = new Canvas(b);\n c.drawColor(Color.BLACK);\n paint = new Paint();\n paint.setAntiAlias(false);\n paint.setStyle(Paint.Style.FILL);\n\n paint.setColor(Color.BLUE);\n c.drawCircle(x, y, r, paint);\n\n speak=(Button) findViewById(R.id.speak);\n wordsList=(ListView) findViewById(R.id.listView);\n PackageManager pm =getPackageManager();\n List<ResolveInfo> activities =pm.queryIntentActivities(\n new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH),0);\n if(activities.size() == 0)\n {\n speak.setEnabled(false);\n speak.setText(\"Recognizer not present\" );\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode,\n Intent data) {\n if (requestCode == REQ_CODE_SPEECH_INPUT && resultCode == RESULT_OK) {\n List<String> results = data.getStringArrayListExtra(\n RecognizerIntent.EXTRA_RESULTS);\n String spokenText = results.get(0);\n // Do something with spokenText\n convert.setText(spokenText);\n\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "public void onSpeak(View v)\n\t{\n\t\tstartVoiceRecognitionActivity();\n\t}", "void start() {\n\t\t\n\t\ttts = new TextToSpeech(getApplicationContext(), new TextToSpeech.OnInitListener() {\n\t\t\t@Override\n\t\t\tpublic void onInit(int status) {\n\t\t\t\tif (status != TextToSpeech.ERROR) {\n\t\t\t\t\ttts.setLanguage(Locale.KOREAN);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\trecognizerIntent = new Intent(RecognizerIntent.ACTION_VOICE_SEARCH_HANDS_FREE);\n\t\trecognizerIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, getPackageName());\n\t\trecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, \"ko-KR\");\n\t\t\n\t\tmRecognizer = SpeechRecognizer.createSpeechRecognizer(this);\n\t\tmRecognizer.setRecognitionListener(recognitionListener);\n\t\t\n\t\t\n\t\tV_button.setOnClickListener(new View.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tif (AL_keywordSelected.size() == 0)\n\t\t\t\t\tstartVoice();\n\t\t\t\telse {\n\t\t\t\t\tString str = \"\";\n\t\t\t\t\t\n\t\t\t\t\tfor (String s : AL_keywordSelected)\n\t\t\t\t\t\tstr += s + \" \";\n\t\t\t\t\t\n\t\t\t\t\tsendMsg(str);\n\t\t\t\t\tinitKeyword();\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\tfirestore.collection(\"command\")\n\t\t\t.addSnapshotListener(new EventListener<QuerySnapshot>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onEvent(@Nullable QuerySnapshot snapshots, @Nullable FirebaseFirestoreException e) {\n\t\t\t\t\tif (e != null) {\n\t\t\t\t\t\tlog(\"listen:error\" + e);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfor (DocumentChange dc : snapshots.getDocumentChanges()) {\n\t\t\t\t\t\tQueryDocumentSnapshot document = dc.getDocument();\n\t\t\t\t\t\t\n\t\t\t\t\t\tString key = document.getId();\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tCommand command;\n\t\t\t\t\t\t\tswitch (dc.getType()) {\n\t\t\t\t\t\t\t\tcase ADDED:\n\t\t\t\t\t\t\t\t\tcommand = new Command(key, document);\n\t\t\t\t\t\t\t\t\tlog(\"New: \" + key);\n\t\t\t\t\t\t\t\t\tlog(command.toString());\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tmapData.put(key, command);\n\t\t\t\t\t\t\t\t\tupdateKeyword();\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase MODIFIED:\n\t\t\t\t\t\t\t\t\tcommand = new Command(key, document);\n\t\t\t\t\t\t\t\t\tlog(\"Modified: \" + key);\n\t\t\t\t\t\t\t\t\tlog(command.toString());\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tCommand oldCommand = mapData.get(key);\n\t\t\t\t\t\t\t\t\tif (command.responseTimestamp.getSeconds() != oldCommand.responseTimestamp.getSeconds()) {\n\t\t\t\t\t\t\t\t\t\tfor (String waitingKey : waitingKeys) {\n\t\t\t\t\t\t\t\t\t\t\tif (waitingKey.equals(key)) {\n\t\t\t\t\t\t\t\t\t\t\t\taddOutputMessage(command.response);\n\t\t\t\t\t\t\t\t\t\t\t\twaitingKeys.remove(key);\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\t\n\t\t\t\t\t\t\t\t\tmapData.put(key, command);\n\t\t\t\t\t\t\t\t\tupdateKeyword();\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase REMOVED:\n\t\t\t\t\t\t\t\t\tcommand = new Command(key, document);\n\t\t\t\t\t\t\t\t\tlog(\"Removed: \" + key);\n\t\t\t\t\t\t\t\t\tlog(command.toString());\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tmapData.remove(key);\n\t\t\t\t\t\t\t\t\tupdateKeyword();\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\tlog(\"error: \" + key);\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\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});\n\t\t\n\t}", "protected abstract Intent createOne();", "public static void launchVoiceSearch(Context context) {\n Intent intent = new Intent(Intent.ACTION_SEARCH_LONG_PRESS);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(intent);\n }", "private void broadcastVoiceCommandAction() {\n\t\tVoiceCommandStartIntent.putExtra(\"command\", mApplications.get(CurIndex).title);\r\n\t\tcontext.sendBroadcast(VoiceCommandStartIntent);\r\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tIntent intent = getIntent();\n\t\tBundle bundle = intent.getExtras();\n\t\t\n\t\tString[] matches = bundle.getStringArray(\"matches\");\n\t\tLog.d(\"Testing sending array between activities\", matches[0]);\n\t\t\n\t\tsetContentView(R.layout.activity_speechcraft);\n\n\t\t // ArrayAdapters convert an array into a set of views that can be loaded into a listview\n\t\t// Update wordList with strings within matches array\n\t\t ArrayAdapter<String> wordAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, matches);\n\t\t wordsList = (ListView) findViewById(R.id.speechmatches);\n\t\t wordsList.setChoiceMode(ListView.CHOICE_MODE_SINGLE);\n\t\t wordsList.setAdapter(wordAdapter);\n\t\t \n\t\t // Tapping an item sets it bg color to pink and sets foodName to it\n\t\t wordsList.setOnItemClickListener(new OnItemClickListener() {\n\t\t\t public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\t\t\t\t resetListStyles();\n\t\t\t\t TextView tappedItem = ((TextView)view);\n\t\t\t\t int pink = Color.parseColor(\"#D75A5D\");\n\t\t\t\t tappedItem.setBackgroundColor(pink);\n\t\t\t\t String item = tappedItem.getText().toString();\n\t\t\t\t foodName = item;\n\t\t }\n\t\t\t \n\t\t\t // Clear the style of any other list items first\n\t\t\t public void resetListStyles() {\n\t\t\t\t for (int i=0; i<wordsList.getChildCount(); i++) {\n\t\t\t\t\t View child = wordsList.getChildAt(i);\n\t\t\t\t\t child.setBackgroundColor(Color.TRANSPARENT);\n\t\t\t\t }\n\t\t\t }\n\t\t });\n\t}", "Intent createNewIntent(Class cls);", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n \tLog.d(\"Activity\", \"Got back activity\");\n \tLog.d(\"Activity arguments\", \"ReqCode:\" + requestCode + \" Result:\"+resultCode);\n \t\n \t// Didn't get anything useful back from either textcraft or speechcraft\n \tif ((requestCode == SPEECHCRAFT_REQCODE || requestCode == TEXTCRAFT_REQCODE) && resultCode == RESULT_CANCELED) {\n \t\tLog.d(\"Activity\", \"Didn't get anything back\");\n \t} else {\n \t// Respond to built in speech recognition activity\n if (requestCode == SPEECH_REQCODE && resultCode == RESULT_OK) {\n // Populate the wordsList with the String values the recognition engine thought it heard\n \t// i.e. \"Milk\" -> matches = [milk, Milk, Mielke]\n ArrayList<String> matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\n Log.d(\"Hearing...\", matches.toString());\n \n // Start the speechcraft activity and passing heard words\n Intent intent = new Intent(this, SpeechcraftActivity.class);\n \t\tBundle bundle =new Bundle();\n \t\tbundle.putStringArray(\"matches\", matches.toArray(new String[matches.size()]));\n \t\tintent.putExtras(bundle);\n \t\tstartActivityForResult(intent, SPEECHCRAFT_REQCODE);\n \t\toverridePendingTransition(R.anim.fade_in, R.anim.fade_out);\n }\n // Respond to a successfully finished textcraft or speechcraft activity, we'll get back\n // two strings - the food's name, and the food's location\n if ((requestCode == TEXTCRAFT_REQCODE || requestCode == SPEECHCRAFT_REQCODE) && resultCode == RESULT_OK) {\n \t// Update the two arrays that store values and the one that displays it on this activity\n \tString foodName = data.getExtras().getString(\"foodName\");\n \tfoodNameList.add(foodName);\n \t\n \tString location = data.getExtras().getString(\"location\");\n \tfoodlocationList.add(location);\n\n \tdisplayedFoods.add(foodName + \" | \" + location) ;\n \tArrayAdapter<String> displayedFoodsAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, displayedFoods);\n \tfoodList.setAdapter(displayedFoodsAdapter);\t\n }\n super.onActivityResult(requestCode, resultCode, data);\n \t}\n }", "public abstract void startVoiceRecognition(String language);", "public void onClick(View v) {\n\t\tif (v.getId() == R.id.btn_speak) {\n\t\t\tstartVoiceRecognitionActivity();\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n HashMap<String, String> hash = new HashMap<String, String>();\n hash.put(\n TextToSpeech.Engine.KEY_PARAM_STREAM,\n String.valueOf(AudioManager.STREAM_NOTIFICATION));\n textToSpeach.speak(questionText.getText().toString(), TextToSpeech.QUEUE_ADD, hash);\n }", "void startNewActivity(Intent intent);", "void start(Intent intent, IntentFilter filter, IIntentCallback callback, IEclipseContext context);", "private void LogRecognitionStart() {\n String recoSource;\n if (this.getUseMicrophone()) {\n recoSource = \"microphone\";\n } else if (this.getMode() == SpeechRecognitionMode.ShortPhrase) {\n recoSource = \"short wav file\";\n } else {\n recoSource = \"long wav file\";\n }\n\n this.WriteLine(\"\\n--- Start speech recognition using \" + recoSource + \" with \" + this.getMode() + \" mode in \" + this.getDefaultLocale() + \" language ----\\n\\n\");\n }", "public interface IntentStarter {\n void startActivityForResult(ResultRequestor requestor, Intent intent);\n}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == VOICE_RECOGNITION_REQUEST_CODE && resultCode == RESULT_OK) {\n // Fill the list view with the strings the recognizer thought it could have heard\n ArrayList<String> matches = data.getStringArrayListExtra(\n RecognizerIntent.EXTRA_RESULTS);\n String[] match = new String[matches.size()];\n match = matches.toArray(match);\n AsyncTaskRunner runner = new AsyncTaskRunner(); //Creating an async task to handle the RPC request\n runner.execute(match);\n } else {\n super.onActivityResult(requestCode, resultCode, data);\n }\n }", "@Override\n public void onClick(View view) {\n // Create a new intent to open the {@link PhrasesActivity}\n Intent intent = new Intent(StartActivity.this, Settings.class);\n\n // Start the new activity\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n text_to_speech = set_voice(text_to_speech);\n int len = ar.length;\n for (int i = 0; i < len; i++){\n speak(text_to_speech,ar[i]);\n }\n }", "@Override\n public void onBeginningOfSpeech() {\n Log.i(\"SRL\", \"onBeginningOfSpeech\");\n }", "@Override\n\tpublic SpeechletResponse onLaunch(final SpeechletRequestEnvelope<LaunchRequest> requestEnvelope) {\n\t\tLOG.debug(\"onLaunch\");\n\n\t\tfinal SpeechletResponse response = new SpeechletResponse();\n\t\tfinal SsmlOutputSpeech output = new SsmlOutputSpeech();\n\t\tresponse.setOutputSpeech(output);\n\n\t\toutput.setSsml(\"<speak>Hi! Are you looking for something? Or should I note where you've put something?</speak>\");\n\n\t\tresponse.setShouldEndSession(false);\n\t\treturn response;\n\t}", "private void recognize() {\n //Setup our Reco transaction options.\n Transaction.Options options = new Transaction.Options();\n options.setDetection(resourceIDToDetectionType(R.id.long_endpoint));\n options.setLanguage(new Language(\"eng-USA\"));\n options.setEarcons(startEarcon, stopEarcon, errorEarcon, null);\n\n //Add properties to appServerData for use with custom service. Leave empty for use with NLU.\n JSONObject appServerData = new JSONObject();\n //Start listening\n recoTransaction = speechSession.recognizeWithService(\"M10253_A3221\", appServerData, options, recoListener);\n }", "public void createPhoneIntent(View view){\n Intent intent = new Intent(Intent.ACTION_DIAL);\n\n //Step 2: Add the telephonne number as a data (URI) to the intent using \"tel:phone_num\";\n Uri uri = Uri.parse(\"tel:09095966472\");\n intent.setData(uri);\n\n //Step 3: Start the activity\n startActivity(intent);\n }", "private void startNewAcitivity(Intent intent, ActivityOptionsCompat options) {\n ActivityCompat.startActivity(this, intent, options.toBundle());\n }", "public void onClickImgBtnHablar_(View v) {\n Intent intentActionRecognizeSpeech = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\n // Establece el idioma, predeterminado Ingles Ussa\n intentActionRecognizeSpeech.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, \"us-US\");\n\n // Inicia la actividad de reconocimiento de voz\n try {\n startActivityForResult(intentActionRecognizeSpeech, RECOGNIZE_SPEECH_ACTIVITY);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(), \"¡Opps! Su dispositivo no es compatible con el reconocimiento de voz.\", Toast.LENGTH_SHORT).show();\n }\n }", "public void recordVoice() {\n\t\t\n\t\t//String command = \"ffmpeg -f alsa -i hw:0 -t 2 -acodec pcm_s16le -ar 16000 -ac 1 foo.wav\"\n\t\tString command = \"arecord -d 2 -r 22050 -c 1 -i -t wav -f s16_LE foo.wav\";\n\t\t\n\t\tProcessBuilder pb = new ProcessBuilder(\"bash\" , \"-c\" , command );\n\t\ttry {\n\t\t\t\n\t\t\tProcess recordProcess = pb.start();\n\t\t\t\n\t\t\trecordProcess.waitFor();\n\t\t\t\n\t\t\trecordProcess.destroy();\n\t\n\t\t\t\n\t\t}catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t\t\n\t\t}catch (InterruptedException ie) {\n\t\t\tie.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n\t\t\tpublic void onClick(View v) \n\t\t\t{\n\t\t\t\tISpeechServiceProxy iss = new SpeechServiceProxy() ;\n\t\t\t\tiss.textToSpeech(ServiceAction.TTS_ACTION, ReadTextActivity.this, inputText.getText().toString()) ;\n\t\t\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n\n getSupportActionBar().hide();\n\n //Adding AdMob to the activity\n MobileAds.initialize(this, \"ca-app-pub-3940256099942544~3347511713\");\n adView = findViewById(R.id.adView);\n AdRequest adRequest = new AdRequest.Builder().build();\n adView.loadAd(adRequest);\n\n //Initializing the buttons in the activity\n pause = findViewById(R.id.pause);\n forward = findViewById(R.id.forward);\n backward = findViewById(R.id.previous);\n textView = findViewById(R.id.textView2);\n textView.setSelected(true);\n home = findViewById(R.id.home);\n FloatingActionButton fab = findViewById(R.id.fab);\n imageView = findViewById(R.id.imageView);\n\n //Enabling runTimePermission() method to initialize the music player\n runTimePermission();\n\n //onlick listener for the mic icon\n fab.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent i = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n i.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n i.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 1);\n mySpeechRecognizer.startListening(i);\n }\n });\n initializeTextToSpeech();\n initializeSpeechRecognizer();\n\n //onclick listener for home button.\n home.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n startActivity(new Intent(MainActivity.this, MainApp.class));\n }\n });\n }", "@Override\n public void onNewIntent(Intent intent) {\n }", "@Override\n public void onStart(Intent intent, int startId) {\n \tsuper.onStart(intent, startId);\n \t\n \t//Notification(intent.getStringExtra(\"text\"));\n \tspokenText = \"\";\n \tspokenText += intent.getStringExtra(\"text\")+\"\";\n \n \t\n \tmTts = new TextToSpeech(this, this);\n \tToast.makeText(this, \"MyAlarmService.onStart()\"+spokenText, Toast.LENGTH_LONG).show();\n \t\n \n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == VOICE_RECOGNITION_REQUEST_CODE\n\t\t\t\t&& resultCode == RESULT_OK) {\n\t\t\t// Fill the list view with the strings the recognizer thought it\n\t\t\t// could have heard\n\t\t}\n\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}", "private void startPopup(Context context, Long id) {\n\n //Intent emaIntent = new Intent(context, VoiceRecognitionActivity.class); //The activity you want to start.\n //Intent emaIntent = new Intent(context, PopupActivity.class); //The activity you want to start.\n //Log.d(\"Alarm receiver\", \"received intent\");\n Random random = new Random();\n int value = random.nextInt(1);\n Intent emaIntent = new Intent(context, PopupActivity.class);\n emaIntent.putExtra(\"pos\", id);\n\n\n\n// if (value == 1) {\n// emaIntent = new Intent(context, PopupActivity.class); //The activity you want to start.\n// } else {\n// emaIntent = new Intent(context, VoiceRecognitionActivity.class);\n// }\n\n\n\n emaIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(emaIntent);\n }", "@Override\n\tpublic void onClick(View arg0) {\n\t\tswitch (arg0.getId()) {\n\t\tcase R.id.start_speaking:\n\t\t\tLog.e(\"AudioSession\", \"AudioSession is Going to start\");\n\t\t\t\n\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tqueuePos.setVisibility(View.VISIBLE);\n\t\t\t\t\tqueuePos.setText(\"AUDIO streaming...\");\n\t\t\t\t\tstartsp.setVisibility(View.GONE);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tas = new AudioSession();\t//THIS OBJECT HANDLES ALL ASPECTS OF COMMUNICATION\n\t\t\tas.onRequestPress();\n\n\t\t\tLog.e(\" AudioSession\", \"AudioSession Started\");//START AUDIO MESSAGE\n\t\t\tbreak;\n\t\t\n\t\t\t\n\t\t}\n\t}", "public void onVoiceSearchClick(View v) {\n \ttry{\n \t\tAppMeasurementWrapper.getInstance().initialize(\n\t\t\t\t\tgetApplication());\n\t\t\tAppMeasurementWrapper\n\t\t\t\t\t.getInstance()\n\t\t\t\t\t.storeTransitionSrcPoint(\n\t\t\t\t\t\t\tAppEffectClickPointEnum.HOME_VOICESEARCH);\n \t\t\t\tPackageManager pm = getPackageManager();\n\t\t\t\t\t\n\t\t\t\t\tList<ResolveInfo> activities = pm.queryIntentActivities(\n\t\t\t new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0);\n\t\t\t\t\t//check if the device supports voice search\n\t\t\t\t\tif (activities.size() != 0) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tIntent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\t\t\t\t intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n\t\t\t\t RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n\t\t\t\t intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE,\n\t\t\t\t Locale.getDefault());\n\t\t\t\t intent.putExtra(RecognizerIntent.EXTRA_PROMPT, getResources().getString(R.string.voice_search_prompt));\n\t\t\t\t \n\t\t\t\t startActivityForResult(intent,VOICE_RECOGNITION_REQUEST_CODE);\n\t\t\n\t\t\t\t\t}else {\n\t\t\t\t\t\tToast.makeText(RakutenHomeController.this, R.string.no_voice_search, 1).show();\n\t\t\t\t\t}\n\n \t} catch (Exception e) {\n\t\t\tLogUtils.getInstance().d(LOG_TAG, \"[onVoiceSearchClick] error: \", e);\n\t\t}\n }", "@Override\n protected void onNewIntent(Intent intent){\n handleIntent(intent);\n }", "public void onBeginningOfSpeech() {\n Log.i(TAG, \"onBeginningOfSpeech\");\n }", "@Override\n protected void onNewIntent(Intent intent) {\n }", "@Override\n public void onClick(View v) {\n StringRequest stringRequest = searchNameStringRequest(output.getText().toString(),\"en\",\"ar\");\n\n\n\n // executing the request (adding to queue)\n queue.add(stringRequest);\n\n String toSpeak = output.getText().toString();\n\n t1.speak(toSpeak, TextToSpeech.QUEUE_FLUSH, null);\n }", "@Override\n public void onNewIntent(Intent intent) {\n setIntent(intent);\n }", "@Override\n public void onNewIntent(Intent intent) {\n setIntent(intent);\n }", "public void onClick(View v) {\n Toast.makeText( getActivity(),\"Voice Recognition\", Toast.LENGTH_SHORT).show();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tIntent it = this.getIntent();\n\t\tduration = Integer.parseInt(it.getStringExtra(DURA)) * 2;\n mAudioManager = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE); \n\t\tcompose();\n chooseSpeaker();\n\t}", "@Override\n public void onClick(View view) {\n // Create a new intent to open the {@link PhrasesActivity}\n Intent servicesIntent = new Intent(Home.this, Services.class);\n\n // Start the new activity\n startActivity(servicesIntent);\n }", "public void goToAddWord1(View v) {\n Intent myIntent = new Intent(this, AddWord1.class);\n startActivity(myIntent);\n }", "public void onButtonMyReceiverIntent(View view) {\n\n Intent myCustomIntent = new Intent(this, CustomIntent.class);\n startActivity(myCustomIntent);\n\n\n }", "@Override\n public void onClick(View view) {\n // Create a new intent to open the {@link word_list}\n Intent accomodationIntent = new Intent(Home.this, Accomodation.class);\n\n // Start the new activity\n startActivity(accomodationIntent);\n }", "public synchronized void startSpeechRecognition() {\r\n\t\t\r\n\t\t//Check lock\r\n\t\tif (speechRecognizerThreadRunning)\r\n\t\t\tlogger.log(Level.INFO, \"Speech Recognition Thread already running...\\n\");\r\n\t\telse\r\n\t\t\t//Submit to ExecutorService\r\n\t\t\teventsExecutorService.submit(() -> {\r\n\t\t\t\t\r\n\t\t\t\t//locks\r\n\t\t\t\tspeechRecognizerThreadRunning = true;\r\n\t\t\t\tignoreSpeechRecognitionResults = false;\r\n\t\t\t\t\r\n\t\t\t\t//Start Recognition\r\n\t\t\t\trecognizer.startRecognition(true);\r\n\t\t\t\t\r\n\t\t\t\t//Information\t\t\t\r\n\t\t\t\tlogger.log(Level.INFO, \"You can start to speak...\\n\");\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\twhile (speechRecognizerThreadRunning) {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * This method will return when the end of speech is reached. Note that the end pointer will determine the end of speech.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tSpeechResult speechResult = recognizer.getResult();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Check if we ignore the speech recognition results\r\n\t\t\t\t\t\tif (!ignoreSpeechRecognitionResults) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//Check the result\r\n\t\t\t\t\t\t\tif (speechResult == null)\r\n\t\t\t\t\t\t\t\tlogger.log(Level.INFO, \"I can't understand what you said.\\n\");\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//Get the hypothesis\r\n\t\t\t\t\t\t\t\tspeechRecognitionResult = speechResult.getHypothesis();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//You said?\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"You said: [\" + speechRecognitionResult + \"]\\n\");\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//Call the appropriate method \r\n\t\t\t\t\t\t\t\tmakeDecision(speechRecognitionResult, speechResult.getWords());\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} else\r\n\t\t\t\t\t\t\tlogger.log(Level.INFO, \"Ingoring Speech Recognition Results...\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tlogger.log(Level.WARNING, null, ex);\r\n\t\t\t\t\tspeechRecognizerThreadRunning = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tlogger.log(Level.INFO, \"SpeechThread has exited...\");\r\n\t\t\t\t\r\n\t\t\t});\r\n\t}", "@Override\n public void onClick(View v) {\n Intent returnToPressHelp = new Intent(getApplicationContext(), PressHelp.class);\n startActivity(returnToPressHelp);\n\n\n //Tell the phone that the medication was taken.\n\n }", "public void onNewIntent(Intent intent) {\n }", "public ActivityRecognitionListener(String name) {\n super(name);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(getApplicationContext(),AudioService.class);\n intent.putExtra(\"code\",1);\n startService(intent);\n }", "@Override\n public void onNewIntent(Intent intent) {\n setIntent(intent);\n }", "private void startARActivity()\n {\n Intent itent = new Intent();\n \n itent.setClassName(\"com.qualcomm.vuforia.samples.VideoPlayback.app.\", \"VideoPlayback\");\n \n startActivity(itent);\n }", "@Override\n public void onClick(View v) {\n Intent intent_upload = new Intent();\n intent_upload.setType(\"audio/*\");\n intent_upload.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent_upload, 1);\n }", "public interface OnNewIntent {\n void onNewIntent(ZHIntent zHIntent);\n}", "protected Intent getStravaActivityIntent()\n {\n return new Intent(this, MainActivity.class);\n }", "public void onNewIntent(Intent intent) {\n C0938a.m5002a(\"SR/SoundRecorder\", \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~onNewIntent\");\n m6632c(intent);\n }", "public abstract Intent constructResults();", "@Override\n public void onClick(View v) {\n Intent i = new Intent(getApplicationContext(), Prescription.class);\n Bundle bundle = new Bundle();\n bundle.putString(\"Chatroomcode\", chatCode);\n i.putExtras(bundle);\n startActivity(i);\n CustomIntent.customType(Chat.this, \"fadein-to-fadeout\");\n }", "public void enterRealTimeRecognitionMode(View view) {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Uri uri = Uri.parse(\"https://www.google.com/?gws_rd=ssl#q=\" + mAnswer.getWord());\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);\n startActivity(intent);\n }", "private void createInstagramIntent(String type, String mediaPath) {\n Intent share = new Intent(Intent.ACTION_SEND);\n\n // Set the MIME type\n share.setType(type);\n share.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n share.setPackage(\"com.instagram.android\");\n\n // Create the URI from the media\n File media = new File(mediaPath);\n Uri uri = FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + \".Utils.GenericFileProvider\", media);\n\n // Add the URI to the Intent.\n share.putExtra(Intent.EXTRA_STREAM, uri);\n share.putExtra(Intent.EXTRA_TEXT, \"YOUR TEXT HERE\");\n\n // Broadcast the Intent.\n startActivity(Intent.createChooser(share, \"Share to\"));\n }", "@Override\n public void onClick(View view) {\n Intent i = new Intent(getApplicationContext(), AllWordsActivity.class);\n startActivity(i);\n\n }", "public void sendToTrivia() {\n Intent intent = new Intent(getApplicationContext(), TriviaActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n }", "public void phonesister(View v){\n \tIntent intent =new Intent();//意图\n \tintent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);//设置拍照意图\n \tstartActivity(intent);//开启意图\t\t\n }" ]
[ "0.7681994", "0.7566971", "0.7517011", "0.7464208", "0.74441344", "0.6992921", "0.69314855", "0.67240125", "0.6674867", "0.66078234", "0.6598881", "0.6492038", "0.6421468", "0.6410465", "0.63645583", "0.6360286", "0.63142073", "0.6282635", "0.6282635", "0.6282635", "0.6282635", "0.62543166", "0.610726", "0.61000615", "0.6070556", "0.6056374", "0.60349137", "0.60121113", "0.5896549", "0.5846179", "0.58246815", "0.5793188", "0.5785192", "0.5765297", "0.57601833", "0.57152945", "0.57029784", "0.5694904", "0.5683614", "0.5668896", "0.56279516", "0.56182265", "0.5602111", "0.56007594", "0.55694103", "0.5546369", "0.5543939", "0.5526579", "0.5503048", "0.549538", "0.5487064", "0.54699576", "0.54638827", "0.54625624", "0.5433418", "0.5416", "0.54159653", "0.54121387", "0.5397773", "0.5392176", "0.5384332", "0.53820175", "0.5370572", "0.535872", "0.5341057", "0.5330141", "0.5313269", "0.53058726", "0.53052884", "0.53042674", "0.53041124", "0.5303346", "0.5284124", "0.5282443", "0.5282443", "0.5262039", "0.52616674", "0.5254397", "0.52535725", "0.5244879", "0.5241779", "0.5236092", "0.5231177", "0.52308583", "0.5223015", "0.52191234", "0.52164215", "0.5208551", "0.5204792", "0.52031755", "0.52024037", "0.5201513", "0.519426", "0.51876736", "0.51866484", "0.5179372", "0.51778406", "0.51761657", "0.51671684", "0.51630205" ]
0.6267338
21
This callback is invoked when the Speech Recognizer returns. This is where you process the intent and extract the speech text from the intent.
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQ_CODE_SPEECH_INPUT && resultCode == RESULT_OK) { List<String> results = data.getStringArrayListExtra( RecognizerIntent.EXTRA_RESULTS); String spokenText = results.get(0); // Do something with spokenText convert.setText(spokenText); } super.onActivityResult(requestCode, resultCode, data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String speak(){\n speechOutput.clear();\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"Just speak normally into your phone\");\n intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 10);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.ENGLISH);\n try {\n startActivityForResult(intent, VOICE_RECOGNITION);\n } catch (ActivityNotFoundException e) {\n e.printStackTrace();\n }\n\n\n return speechResult;\n }", "@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data)\r\n {\r\n if (requestCode == VOICE_RECOGNITION_REQUEST_CODE && resultCode == RESULT_OK) {\r\n // go through the results, dump them all to a TextView\r\n ArrayList<String> matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\r\n String res = matches.get(0);\r\n if (res.contains(\"dance\")) {\r\n speak(\"Did you say dance? That robot over there likes to dance... should I play some music for it?\");\r\n }\r\n else if (res.contains(\"your name\")) {\r\n speak(\"My name is \" + prefs.getString(PREFS_NAME, \"Mrs. Robot\"));\r\n }\r\n else if (res.contains(\"do you like first grade\")) {\r\n speak(\"I love first grade. Reading and Writing and Math are some of my favorites!\");\r\n }\r\n else if (res.contains(\"do you like kindergarten\")) {\r\n speak(\"I think kindergarten is great. I especially love kid writing!\");\r\n }\r\n else if (res.contains(\"what do you know\")) {\r\n speak(\"I don't know very much. Robots aren't as smart as kids.\");\r\n }\r\n else {\r\n speak(\"It sounded like you said \" + res + \". I don't know what that means\");\r\n }\r\n }\r\n else if (requestCode == VOICE_RECOGNITION_REQUEST_CODE) {\r\n speak(\"I didn't understand that... please try again\");\r\n }\r\n super.onActivityResult(requestCode, resultCode, data);\r\n }", "private void speak() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM) ;\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"Speak the Item\");\n\n startActivityForResult(intent, SPEECH_REQUEST_CODE);\n\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == SystemData.VOICE_RECOGNITION_REQUEST_CODE && resultCode == RESULT_OK) {\n final ArrayList<String> matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\n if (matches.size() > 0) {\n text = matches.get(0);\n callContactByName();\n selectFunctionality();\n }\n } else if (requestCode == MY_TTS_CHECK_CODE) {\n if (resultCode == TextToSpeech.Engine.CHECK_VOICE_DATA_PASS) {\n TextToSpeechUtility.setupTextToSpeech(this);\n } else {\n Intent installIntent = new Intent();\n installIntent.setAction(TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA);\n startActivity(installIntent);\n }\n\n }\n }", "private void manageSpeechRecognition() {\n\n mRecognizerIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n mRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE, Locale.getDefault().getLanguage().trim());\n mRecognizerIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, this.getPackageName());\n mRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n mRecognizerIntent.putExtra(RecognizerIntent.EXTRA_PARTIAL_RESULTS, true);\n mRecognizerIntent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS, 100);\n\n mRecognizerIntent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 3);\n\n mSongSpeechRecognitionListener = new SongSpeechRecognitionListener(mRippleBackground, mFloatingActionButton);\n\n mSpeechRecognizer = SpeechRecognizer.createSpeechRecognizer(this);\n mSpeechRecognizer.setRecognitionListener(mSongSpeechRecognitionListener);\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == VOICE_RECOGNITION_REQUEST_CODE && resultCode == RESULT_OK) {\n // Fill the list view with the strings the recognizer thought it could have heard\n ArrayList<String> matches = data.getStringArrayListExtra(\n RecognizerIntent.EXTRA_RESULTS);\n String[] match = new String[matches.size()];\n match = matches.toArray(match);\n AsyncTaskRunner runner = new AsyncTaskRunner(); //Creating an async task to handle the RPC request\n runner.execute(match);\n } else {\n super.onActivityResult(requestCode, resultCode, data);\n }\n }", "private void listenToSpeech(int returnCode) {\n\t\tIntent listenIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\t\t//indicate package\n\t\tlistenIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, getClass().getPackage().getName());\n\t\t//message to display while listening\n\t\tlistenIntent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"\");\n\t\t//set speech model\n\t\tlistenIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n\t\t//specify number of results to retrieve\n\t\tlistenIntent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 10);\n\t\t//start listening\n\t\tstartActivityForResult(listenIntent, returnCode);\n\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n \tLog.d(\"Activity\", \"Got back activity\");\n \tLog.d(\"Activity arguments\", \"ReqCode:\" + requestCode + \" Result:\"+resultCode);\n \t\n \t// Didn't get anything useful back from either textcraft or speechcraft\n \tif ((requestCode == SPEECHCRAFT_REQCODE || requestCode == TEXTCRAFT_REQCODE) && resultCode == RESULT_CANCELED) {\n \t\tLog.d(\"Activity\", \"Didn't get anything back\");\n \t} else {\n \t// Respond to built in speech recognition activity\n if (requestCode == SPEECH_REQCODE && resultCode == RESULT_OK) {\n // Populate the wordsList with the String values the recognition engine thought it heard\n \t// i.e. \"Milk\" -> matches = [milk, Milk, Mielke]\n ArrayList<String> matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\n Log.d(\"Hearing...\", matches.toString());\n \n // Start the speechcraft activity and passing heard words\n Intent intent = new Intent(this, SpeechcraftActivity.class);\n \t\tBundle bundle =new Bundle();\n \t\tbundle.putStringArray(\"matches\", matches.toArray(new String[matches.size()]));\n \t\tintent.putExtras(bundle);\n \t\tstartActivityForResult(intent, SPEECHCRAFT_REQCODE);\n \t\toverridePendingTransition(R.anim.fade_in, R.anim.fade_out);\n }\n // Respond to a successfully finished textcraft or speechcraft activity, we'll get back\n // two strings - the food's name, and the food's location\n if ((requestCode == TEXTCRAFT_REQCODE || requestCode == SPEECHCRAFT_REQCODE) && resultCode == RESULT_OK) {\n \t// Update the two arrays that store values and the one that displays it on this activity\n \tString foodName = data.getExtras().getString(\"foodName\");\n \tfoodNameList.add(foodName);\n \t\n \tString location = data.getExtras().getString(\"location\");\n \tfoodlocationList.add(location);\n\n \tdisplayedFoods.add(foodName + \" | \" + location) ;\n \tArrayAdapter<String> displayedFoodsAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, displayedFoods);\n \tfoodList.setAdapter(displayedFoodsAdapter);\t\n }\n super.onActivityResult(requestCode, resultCode, data);\n \t}\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode,\n Intent data) {\n if (requestCode == Constants.SPEECH_REQUEST_CODE && resultCode == RESULT_OK) {\n List<String> results = data.getStringArrayListExtra(\n RecognizerIntent.EXTRA_RESULTS);\n spokenText = results.get(0);\n // Do something with spokenText\n Log.i(TAG, \"Spoken Text = \" + spokenText);\n\n if (spokenText.startsWith(\"home\") || spokenText.startsWith(\"work\")) {\n Log.i(TAG, \"Creating Google Api Client\");\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addApi(Wearable.API)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .build();\n mGoogleApiClient.connect();\n }\n } else {\n super.onActivityResult(requestCode, resultCode, data);\n }\n }", "@Override\n public void onEndOfSpeech() {\n Log.i(\"SRL\", \"onEndOfSpeech\");\n }", "@Override\r\n public void onReceive(Context context, Intent intent) {\n\r\n int thisConversationId = intent.getIntExtra(\"conversation_id\", -1);\r\n Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);\r\n if (remoteInput != null){\r\n CharSequence replyText = remoteInput.getCharSequence(\"voice_reply_key\");\r\n Log.d(\"BasicNotifications\", \"Found voice reply [\" + replyText+ \"] from conversation_id\");\r\n }\r\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == VOICE_RECOGNITION_REQUEST_CODE\n\t\t\t\t&& resultCode == RESULT_OK) {\n\t\t\t// Fill the list view with the strings the recognizer thought it\n\t\t\t// could have heard\n\t\t}\n\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n //Log.v(\"test\", Boolean.toString(data.getStringExtra(EXTRA_NUMBER) != null));\n\n if (requestCode == 1 && resultCode == RESULT_OK && data != null) {\n \tresult = null;\n ArrayList<String> text = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\n result = text.get(0);\n Log.v(\"CASE1\", result);\n \t//String number = data.getExtras().getString(EXTRA_NUMBER);\n \n \tLog.v(\"CASE1\", \"number is \" + num);\n\n \twhile(tts.isSpeaking()) {\n \ttry {\n\t\t\t\t\t\tThread.sleep(500);\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 }\n tts.speak(\"Did you say, \" + result + \"?\", TextToSpeech.QUEUE_FLUSH, null);\n while(tts.isSpeaking()) {\n \ttry {\n\t\t\t\t\t\tThread.sleep(500);\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 }\n recordMessage2(result, num);\n\n }\n if (requestCode == 2 && resultCode == RESULT_OK && data != null) {\n ArrayList<String> text = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\n String confirmation = text.get(0);\n Log.v(\"CASE2\", \"confirmation in case 2 is \" + confirmation);\n if (confirmation.toLowerCase().equals(\"yes\")) {\n \tLog.v(\"CASE2\", \"message in case 2 is \" + result);\n if (result != null) {\n \tString body = result;\n \n \tString number = num;\n \t\tSmsManager sms = SmsManager.getDefault();\n \t\tsms.sendTextMessage(number, null, body, null, null);\n \t\twhile(tts.isSpeaking()) {\n \ttry {\n \t\t\t\t\t\tThread.sleep(500);\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 }\n \t\ttts.speak(\"Message sent\", TextToSpeech.QUEUE_FLUSH, null);\n \t\twhile(tts.isSpeaking()) {\n \ttry {\n \t\t\t\t\t\tThread.sleep(500);\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 }\n \t// send message\n }\n } else {\n \twhile(tts.isSpeaking()) {\n \ttry {\n \t\t\t\t\t\tThread.sleep(500);\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 }\n tts.speak(\"Please try again.\", TextToSpeech.QUEUE_FLUSH, null);\n while(tts.isSpeaking()) {\n \ttry {\n \t\t\t\t\t\tThread.sleep(500);\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 }\n recordMessage(num);\n }\n \n\n \t\n }\n }", "@Override\n public void onBeginningOfSpeech() {\n Log.i(\"SRL\", \"onBeginningOfSpeech\");\n }", "private void display() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n// Start the activity, the intent will be populated with the speech text\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n }", "private void displaySpeechRecognizer() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n // Start the activity, the intent will be populated with the speech text\n startActivityForResult(intent, Constants.SPEECH_REQUEST_CODE);\n }", "@Override\n public void onResults(Bundle results) {\n recognizedSpeech = (TextView) findViewById(R.id.recognizedSpeech);\n Log.i(\"SRL\", \"onResults\");\n ArrayList<String> matches = results\n .getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);\n String text = \"\";\n for (String result : matches)\n text += result + \"\\n\";\n recognizedSpeech.setText(text);\n\n if(!(recognizedSpeech.getText().toString().contains(\"yes\")) &&\n !(recognizedSpeech.getText().toString().contains(\"no\"))){\n convertTextToSpeech(\"A valid response was not detected, please try again.\");\n\n while (m_tts.isSpeaking()) {\n speech = null;\n }\n\n speech = SpeechRecognizer.createSpeechRecognizer(this);\n speech.setRecognitionListener(this);\n speech.startListening(getIntent());\n\n } else if(recognizedSpeech.getText().toString().contains(\"yes\") &&\n recognizedSpeech.getText().toString().contains(\"no\")){\n convertTextToSpeech(\"Both yes and no were detected, please only specify one decision\");\n\n while (m_tts.isSpeaking()) {\n speech = null;\n }\n\n speech = SpeechRecognizer.createSpeechRecognizer(this);\n speech.setRecognitionListener(this);\n speech.startListening(getIntent());\n\n } else if (recognizedSpeech.getText().toString().contains(\"yes\")) {\n PropertySquare square = (PropertySquare) (m_board.getSquare(\n players.get(m_currentTurn).getCurrentPosition()));\n square.setOwnedBy(players.get(m_currentTurn).getName());\n convertTextToSpeech(\"You now own\" + square.getName());\n Log.d(\"buyProperty yes\", square.getOwnedBy());\n\n if (m_manageFunds) {\n players.get(m_currentTurn).subtractMoney(square.getPrice());\n Log.d(\"buyProperty yes\", players.get(m_currentTurn).getName() +\n String.valueOf(players.get(m_currentTurn).getMoney()));\n funds.setText(String.valueOf(players.get(m_currentTurn).getMoney()));\n }\n nextTurnRoll();\n } else if (recognizedSpeech.getText().toString().contains(\"no\")) {\n nextTurnRoll();\n }\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n try {\n if (requestCode == VOICE_RECOGNITION_REQUEST_CODE && resultCode == Activity.RESULT_OK) {\n final ArrayList<String> matches = data\n .getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\n\n String voiceResult = matches.get(0);\n final String voiceResultNoWhitespace = voiceResult.replace(\" \", \"\");\n\n if (DataHelper.isWordOnlyNumeric(voiceResultNoWhitespace)) {\n voiceResult = voiceResultNoWhitespace;\n }\n\n mSearchField.setText(\"\");\n mSearchField.setText(voiceResult);\n }\n if (requestCode == SCAN_BARCODE_REQUEST_CODE && resultCode == Activity.RESULT_OK) {\n final String contents = data.getStringExtra(\"SCAN_RESULT\");\n\n mSearchField.setText(\"\");\n mSearchField.setText(contents);\n }\n\n super.onActivityResult(requestCode, resultCode, data);\n }\n catch (final Exception e) {\n showSearchErrorDialog();\n logError(e);\n }\n }", "public void onContentRecognized(IRecognitionPlugin plugin, RecognitionOutput output);", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n switch (requestCode) {\n case RESULT_SPEECH: {\n if (resultCode == RESULT_OK && null != data) {\n\n ArrayList<String> text = data\n .getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\n\n txtText.setText(text.get(0));\n\n s = text.get(0);\n s = s.toLowerCase();\n\n switch (s) {\n case \"excited\": {\n pulseHandler.SetLEDPattern(PulseThemePattern.PulseTheme_Fire);\n Toast.makeText(getApplicationContext(), \"LED pattern shuffled successfully to \" + \"FIRE\", Toast.LENGTH_SHORT).show();\n break;\n }\n case \"angry\": {\n pulseHandler.SetLEDPattern(PulseThemePattern.PulseTheme_Canvas);\n Toast.makeText(getApplicationContext(), \"LED pattern shuffled successfully to \" + \"CANVAS\", Toast.LENGTH_SHORT).show();\n break;\n }\n case \"relax\": {\n pulseHandler.SetLEDPattern(PulseThemePattern.PulseTheme_Firefly);\n Toast.makeText(getApplicationContext(), \"LED pattern shuffled successfully to \" + \"FIREFLY\", Toast.LENGTH_SHORT).show();\n break;\n }\n case \"crazy\": {\n pulseHandler.SetLEDPattern(PulseThemePattern.PulseTheme_Firework);\n Toast.makeText(getApplicationContext(), \"LED pattern shuffled successfully to \" + \"FIREWORK\", Toast.LENGTH_SHORT).show();\n break;\n }\n case \"sleepy\": {\n pulseHandler.SetLEDPattern(PulseThemePattern.PulseTheme_Hourglass);\n Toast.makeText(getApplicationContext(), \"LED pattern shuffled successfully to \" + \"HOURGLASS\", Toast.LENGTH_SHORT).show();\n break;\n }\n case \"thoughtful\": {\n pulseHandler.SetLEDPattern(PulseThemePattern.PulseTheme_Rain);\n Toast.makeText(getApplicationContext(), \"LED pattern shuffled successfully to \" + \"RAIN\", Toast.LENGTH_SHORT).show();\n break;\n }\n case \"jazzy\": {\n pulseHandler.SetLEDPattern(PulseThemePattern.PulseTheme_Ripple);\n Toast.makeText(getApplicationContext(), \"LED pattern shuffled successfully to \" + \"RIPPLE\", Toast.LENGTH_SHORT).show();\n break;\n }\n case \"sparkle\": {\n pulseHandler.SetLEDPattern(PulseThemePattern.PulseTheme_Star);\n Toast.makeText(getApplicationContext(), \"LED pattern shuffled successfully to \" + \"STAR\", Toast.LENGTH_SHORT).show();\n break;\n }\n case \"dance\": {\n pulseHandler.SetLEDPattern(PulseThemePattern.PulseTheme_Traffic);\n Toast.makeText(getApplicationContext(), \"LED pattern shuffled successfully to \" + \"TRAFFIC\", Toast.LENGTH_SHORT).show();\n break;\n }\n case \"do something\": {\n pulseHandler.SetLEDPattern(PulseThemePattern.PulseTheme_Wave);\n Toast.makeText(getApplicationContext(), \"LED pattern shuffled successfully to \" + \"WAVE\", Toast.LENGTH_SHORT).show();\n break;\n }\n }\n break;\n }\n\n }\n }\n }", "@Override\n public void onReadyForSpeech(Bundle arg0) {\n Log.i(\"SRL\", \"onReadyForSpeech\");\n }", "@Override\n public void onSuccess(Text visionText) {\n\n Log.d(TAG, \"onSuccess: \");\n extractText(visionText);\n }", "public void onBeginningOfSpeech() {\n Log.i(TAG, \"onBeginningOfSpeech\");\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n this.context = context;\n try {\n getWords(context, intent);\n } catch (Exception e) {\n ErrorHandler.getInstance().Error(LOG_TAG, e.toString());\n }\n }", "public void showSpeechInput(View v) {\n\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"Say something\");\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(this, \"Speech To Text not supported\", Toast.LENGTH_LONG).show();\n }\n }", "public void onClick(View v) {\n speechRecognizer.startListening(speechRecognizerIntent);\n Toast.makeText( getActivity(),\"Voice\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onResults(Bundle results) {\n ArrayList<String> matches = results\n .getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);\n\n //displaying the first match\n if (matches != null)\n editText.setText(matches.get(0));\n\n }", "@Override\r\n public void onReceive(Context context, Intent intent) {\n\r\n mOutputTextView.setText(intent.getExtras().getString(Intent.EXTRA_TEXT));\r\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data)\n {\n if (requestCode == REQUEST_CODE && resultCode == RESULT_OK)\n {\n // Populate the wordsList with the String values the recognition engine thought it heard\n ArrayList<String> matches = data.getStringArrayListExtra(\n RecognizerIntent.EXTRA_RESULTS);\n \n for(int i=0;i<matches.size();i++)\n {\n \tif(counter==0)\n \t{\n \t\t\n\t \tif(matches.get(i).equals(\"moo\") || matches.get(i).equals(\"moore\") ||\n\t \t\t\tmatches.get(i).equals(\"mou\") || matches.get(i).equals(\"moon\") ||\n\t \t\t\tmatches.get(i).equals(\"movie\") || matches.get(i).equals(\"boo\")\n\t \t|| matches.get(i).equals(\"boohoo\") || matches.get(i).equals(\"boom\"))\n\t \t{\n\t \t\t\n\t \t\n\t \t\tresume();\n\t \t\tbreak;\n\t \t}\n\t \telse{\n\t \t\twrong();\n\t \t\t}\n \t}\n \telse if(counter==1){\n \t\t\n\t \tif(matches.get(i).equals(\"name\") || matches.get(i).equals(\"names\") ||\n\t \t\t\tmatches.get(i).equals(\"nay\") || matches.get(i).equals(\"neigh\") ||\n\t \t\t\tmatches.get(i).equals(\"nee\") || matches.get(i).equals(\"nays\")\n\t \t\t\t|| matches.get(i).equals(\"knee\") || matches.get(i).equals(\"nees\")\n\t \t\t\t|| matches.get(i).equals(\"ne\") || matches.get(i).equals(\"ni\")){\n\t \t\t\n\t \t\tresume();\n\t \t\tbreak;\n\t \t}\n\t \telse\n\t \t\twrong();\n\t \t\n \t}\n \telse if(counter==2){\n\t \tif(matches.get(i).equals(\"oink\") || matches.get(i).equals(\"on\") ||\n\t \t\t\tmatches.get(i).equals(\"oint\") || matches.get(i).equals(\"point\") ||\n\t \t\t\tmatches.get(i).equals(\"online\") || matches.get(i).equals(\"going\")\n\t \t\t\t|| matches.get(i).equals(\"awning\") || matches.get(i).equals(\"wapking\")){\n\t \t\t\n\t \t\n\t \t\tresume();\n\t \t\tbreak;\n\t \t}\n\t \telse\n\t \t\twrong();\n\t \t\n \t}\n \telse if(counter==3){\n \t\t//TextView tv = (TextView) findViewById(R.id.text);\n \t\t//tv.setText(\"Sheep says?\");\n\t \tif(matches.get(i).equals(\"ba\") || matches.get(i).equals(\"baa\") ||\n\t \t\t\tmatches.get(i).equals(\"bar\") || matches.get(i).equals(\"bah\") ||\n\t \t\t\tmatches.get(i).equals(\"baba\") || matches.get(i).equals(\"bleach\")\n\t \t\t\t|| matches.get(i).equals(\"please\") || matches.get(i).equals(\"plate\")\n\t \t\t\t|| matches.get(i).equals(\"pa\") || matches.get(i).equals(\"paa\")){\n\t \t\t\n\t \t\tresume();\n\t \t\tbreak;\n\t \t}\n\t \telse\n\t \t\twrong();\n \t}\n \telse if(counter==4){\n\t \tif(matches.get(i).equals(\"quack\") || matches.get(i).equals(\"crack\") ||\n\t \t\t\tmatches.get(i).equals(\"kodak\") || matches.get(i).equals(\"back\") ||\n\t \t\t\tmatches.get(i).equals(\"call back\") || matches.get(i).equals(\"quake\")\n\t \t\t\t|| matches.get(i).equals(\"quiet\")|| matches.get(i).equals(\"quiet\")\n\t \t\t\t|| matches.get(i).equals(\"whack\")\n\t \t\t\t|| matches.get(i).equals(\"quack quack\")){\n\t \t\tif(counter<4)\n\t \t\t{\n\t \t\t\tcounter++;\n\t \t\t\tloadActivity();\n\t \t\t}\n\t \t\tresume();\n\t \t\tbreak;\n\t \t}\n\t \telse\n\t \t\twrong();\n \t}\n }\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\t\n\t\tyoutubeFragment = (YouTubeFragment) getChildFragmentManager().findFragmentById(R.id.youtube_fragment);\n\t\t\n\t\tpresentSearchTerm = \"\";\n\t\twordList = \"\";\n\t\t\n if (requestCode==REQUEST_OK && resultCode==-1) {\n \t\tArrayList <String> thingsYouSaid = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\n \t\tspokenPhrase = thingsYouSaid.get(0);\n \t\tif (spokenPhrase.length() == 0) {\n \t\t\tToast.makeText(getActivity(), \"You said nothing!\", Toast.LENGTH_SHORT).show();\n \t\t}\n \t\telse {\n\t \t\twords = spokenPhrase.split(\" \");\n\t \t\tindividualWords = new ArrayList<String>(Arrays.asList(words));\n\t \t\t\n\t \t\tif (spokenPhrase.contains(\"youtube\")) {\n\t \t\t\tindividualWords.remove(\"youtube\");\n\t \t\t\tpresentSearchTerm = \"YouTube search results for: \";\n\t \t\t}\n\t \t\tif (spokenPhrase.contains(\"search youtube for\")) {\n\t \t\t\tindividualWords.remove(\"search\");\n\t \t\t\tindividualWords.remove(\"youtube\");\n\t \t\t\tindividualWords.remove(\"for\");\n\t \t\t\tpresentSearchTerm = \"YouTube search results for: \";\n\t \t\t}\n\t \t\tif (spokenPhrase.contains(\"on youtube\")) {\n\t \t\t\tindividualWords.remove(\"on\");\n\t \t\t\tindividualWords.remove(\"youtube\");\n\t \t\t\tpresentSearchTerm = \"YouTube search results for: \";\n\t \t\t}\n\t \t\tif (spokenPhrase.contains(\"from youtube\")) {\n\t \t\t\tindividualWords.remove(\"from\");\n\t \t\t\tindividualWords.remove(\"youtube\");\n\t \t\t\tpresentSearchTerm = \"YouTube search results for: \";\n\t \t\t}\n\t \t\t\n\t \t\tif (spokenPhrase.contains(\"last fm\")) {\n\t \t\t\tindividualWords.remove(\"last\");\n\t \t\t\tindividualWords.remove(\"fm\");\n\t \t\t\tpresentSearchTerm = \"Last.fm search results for: \";\n\t \t\t}\n\t \t\tif (spokenPhrase.contains(\"search last fm for\")) {\n\t \t\t\tindividualWords.remove(\"search\");\n\t \t\t\tindividualWords.remove(\"last\");\n\t \t\t\tindividualWords.remove(\"fm\");\n\t \t\t\tindividualWords.remove(\"for\");\n\t \t\t\tpresentSearchTerm = \"Last.fm search results for: \";\n\t \t\t}\n\t \t\tif (spokenPhrase.contains(\"on last fm\")) {\n\t \t\t\tindividualWords.remove(\"on\");\n\t \t\t\tindividualWords.remove(\"last\");\n\t \t\t\tindividualWords.remove(\"fm\");\n\t \t\t\tpresentSearchTerm = \"Last.fm search results for: \";\n\t \t\t}\n\t \t\tif (spokenPhrase.contains(\"from last fm\")) {\n\t \t\t\tindividualWords.remove(\"from\");\n\t \t\t\tindividualWords.remove(\"last\");\n\t \t\t\tindividualWords.remove(\"fm\");\n\t \t\t\tpresentSearchTerm = \"Last.fm search results for: \";\n\t \t\t}\n\t\n\t \t\tif (spokenPhrase.contains(\"spotify\")) {\n\t \t\t\tindividualWords.remove(\"spotify\");\n\t \t\t\tpresentSearchTerm = \"Spotify search results for: \";\n\t \t\t}\n\t \t\tif (spokenPhrase.contains(\"search spotify for\")) {\n\t \t\t\tindividualWords.remove(\"search\");\n\t \t\t\tindividualWords.remove(\"spotify\");\n\t \t\t\tindividualWords.remove(\"for\");\n\t \t\t\tpresentSearchTerm = \"Spotify search results for: \";\n\t \t\t}\n\t \t\tif (spokenPhrase.contains(\"on spotify\")) {\n\t \t\t\tindividualWords.remove(\"on\");\n\t \t\t\tindividualWords.remove(\"spotify\");\n\t \t\t\tpresentSearchTerm = \"Spotify search results for: \";\n\t \t\t}\n\t \t\tif (spokenPhrase.contains(\"from spotify\")) {\n\t \t\t\tindividualWords.remove(\"from\");\n\t \t\t\tindividualWords.remove(\"spotify\");\n\t \t\t\tpresentSearchTerm = \"Spotify search results for: \";\n\t \t\t}\n\t \t\t\t\n\t \t\tfor (int x = 0; x < individualWords.size(); x++) {\n\t \t\t\twordList += individualWords.get(x) + \" \";\n\t \t\t}\n\t \n\t \n\t\t if (presentSearchTerm == \"\") {\n\t\t \tpresentSearchTerm = \"Search results for: \";\n\t\t }\n\t\t \n\t\t presentSearchTerm += wordList;\n\t\t\t\t\n\t\t\t\tnew CommunicateWithYouTubeTask().execute(wordList);\n \t\t}\n\t }\n\t}", "public void onReceive(Context context, Intent intent) {\n tts = new TextToSpeech(context, new TextToSpeech.OnInitListener() {\n @Override\n public void onInit(int status) {\n if (status == TextToSpeech.SUCCESS) {\n Log.e(\"TTS\", \"Working\");\n speakOut(\"Hey!\");\n }\n }\n });\n }", "@Override\n public void done() {\n recognizer.stopRecognition();\n\n }", "private void loadSpeechActivity() {\n PackageManager pm = getPackageManager();\n List<ResolveInfo> activities = pm.queryIntentActivities(\n new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0);\n if (activities.size() == 0)\n {\n voiceSupport=0;\n }\n\t\t\n\t}", "public void listen(View v)\r\n {\r\n // set up an intent to ask for speech-to-text, and connect it back to\r\n // this Activity\r\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\r\n intent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, getClass().getPackage().getName());\r\n\r\n // Give text to display, and a hint about the language model\r\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"Tell the robot what to do!\");\r\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\r\n\r\n // How many results to return? They will be sorted by confidence\r\n intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 5);\r\n\r\n // Start the activity\r\n startActivityForResult(intent, VOICE_RECOGNITION_REQUEST_CODE);\r\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(\n\t\t\t\t\t\tRecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\n\t\t\t\tintent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, \"en-US\");\n\n\t\t\t\ttry {\n\t\t\t\t\tstartActivityForResult(intent, RESULT_SPEECH);\n\t\t\t\t\tet1.setText(\"\");\n\t\t\t\t} catch (ActivityNotFoundException a) {\n\t\t\t\t\tToast t = Toast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\"Opps! Your device doesn't support Speech to Text\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT);\n\t\t\t\t\tt.show();\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}", "private void askSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n \"Hi speak something\");\n speakOut(\"Open Mic\");\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n\n }\n }", "@Override\n\t public void onDone(String utteranceId)\n\t {\n\t \tLog.d(\"END\", \"FINISHED: \" + utteranceId);\n\t \t\t\tif(DataModel.getInstance().isVoiceActionsEnabled()) {\n\t \t\t\t\tWordActivatorAPI.getInstance().start(); \t\n\t \t\t\t}\n\t }", "public void resultReceived(String result)\n {\n Log.d(TAG, \"Recevied result from TTS callback receiver: \" + result);\n }", "@Override\n\t\tpublic void onResults(ArrayList<RecognizerResult> arg0, boolean arg1) {\n\t\t\ttext+=arg0.get(0).text.toString();\n\t\t}", "public void startSpeechRecognition() {\n\t\tIntent i = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\t\ti.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, \"en-GB\");\n\t\ttry {\n\t\t\tstartActivityForResult(i, REQUEST_OK);\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data)\n\t{\n\t\tSystem.out.println(\"Came here\");\n\t\tString matchedWord = null;\n\t\tExerciseEntity fe = null;\n\t\tExerciseDatabase db = new ExerciseDatabase(RExerciseActivity.this);\n\t\tif (requestCode == VOICE_REQUEST_CODE && resultCode == RESULT_OK)\n\t\t{\n\t\t\t// Populate the wordsList with the String values the recognition engine thought it heard\n\t\t\tArrayList<String> matches = data.getStringArrayListExtra(\n\t\t\t\t\tRecognizerIntent.EXTRA_RESULTS);\n\t\t\tSystem.out.println(\"Printing matched words\");\n\t\t\tmatchedWord = matches.get(0);\n\t\t}\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\n\t\tEditText text3 = (EditText) findViewById(R.id.input_workout_type);\n\n\t\tif (matchedWord != null)\n\t\t{\n\t\t\ttext3.setText(matchedWord);\n\t\t\tdb.open();\n\t\t\tfe = db.getOneExercise(matchedWord);\n\t\t\tTextView calt = (TextView) findViewById(R.id.input_calpermin);\n\t\t\tif (fe != null)\n\t\t\t{\n\t\t\t\tcalt.setText(String.valueOf(fe.getCaloriesPerMin()));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcalt.setText(\"Exercise not found\");\n\t\t\t}\n\t\t\tdb.close();\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttext3.setText(\"No Match\");\n\t\t}\n\n\n\t}", "public void onVoiceEnd() {\n }", "public interface TextToSpeechCallback {\n void onFailure();\n\n void onSuccess();\n }", "private void onRecognizeAsyncTaskComplete(OcrResult result){\n \t\n \tif(result != null){\n \tLog.v(TAG, \"Recognize complete (\" + result + \"): \" + result.getText());\n\t \tLog.v(TAG,\"recognize: (6) Bitmap is \" + result.getBitmap());\n try {\n \tif(currentRequest == MSG_RECOGNIZE_TXT){\n \t\tcurrentClient.get().send(Message.obtain(null, MSG_RESULT_TXT, currentRequest, mState.ordinal(), result.getText()));\t\n \t} else {\n \t\tcurrentClient.get().send(Message.obtain(null, MSG_RESULT, currentRequest, mState.ordinal(), result));\n \t}\n } catch (RemoteException e) {\n // The client is dead. \n \t\tLog.e(TAG,\"sendMessage: The client is dead. Message was: \" + result + \" (\" + MSG_RESULT + \")\");\n } catch (NullPointerException e) {\n // The reply to client is does not exist. \n \t\tLog.e(TAG,\"sendMessage: client was null. Message was: \" + result + \" (\" + MSG_RESULT + \")\");\n }\n \n \t} else {\n \t\t// We did not receive an OCR result\n \tLog.i(TAG, \"Recognize complete: No result\");\n \t\tsendMessage(currentClient, MSG_ERROR, currentRequest, getString(R.string.error_failed_recognition));\n \t}\n\n \t// Go back to IDLE (or if the baseApi no longer exists go to UNINITIALIZED\n \tmState = (baseApi != null) ? State.IDLE : State.UNINITIALIZED;\n\t\t\n \t// We're done with the current client. Remove any references to the object.\n currentClient = null;\n }", "@Override\n\t\tpublic void onEnd(SpeechError arg0) {\n\t\t\t\n\t\t\t\ttextView.setText(text);\n\t\t\t\ttext=\"\";\n\t\t\t\n\t\t\t\n\t\t}", "@Override\n public void onDone(String utteranceId)\n {\n String[] positionString = utteranceId.split(\"_\");\n int paragraph = Integer.parseInt(positionString[0]);\n int sentence = Integer.parseInt(positionString[1]);\n htmlConverter.paragraphs[paragraph].sentences[sentence].speechReady = true;\n }", "@Override\n public void onClick(View v) {\n text_to_speech = set_voice(text_to_speech);\n int len = ar.length;\n for (int i = 0; i < len; i++){\n speak(text_to_speech,ar[i]);\n }\n }", "private View.OnClickListener onVoiceSearchButtonClick() {\n return new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n try {\n if (canRecognizeSpeechInput()) {\n final Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\n // Specify the calling package to identify your application\n intent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, getClass()\n .getPackage().getName());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n \"Say a Make, Model, Stock Number, or VIN\");\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_WEB_SEARCH);\n\n // Specify how many results you want to receive. The results will be sorted\n // where the first result is the one with higher confidence.\n intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 5);\n\n getParentFragment().startActivityForResult(intent,\n VOICE_RECOGNITION_REQUEST_CODE);\n }\n }\n catch (final Exception e) {\n showSpeechRecognitionErrorDialog();\n logError(e);\n }\n }\n };\n }", "public interface TextToSpeechListener {\n\n public void onInitSucceeded();\n public void onInitFailed();\n public void onCompleted();\n\n}", "private void startVoiceRecognitionActivity() {\n\t\tIntent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\t\tintent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n\t\tintent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"What food are you stocking right now?\");\n\t\tstartActivityForResult(intent, SPEECH_REQCODE);\n\t}", "@Override\r\n\tpublic void onClick(View arg0) {\n\t\tIntent i = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\r\n\t\ti.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\r\n\t\ti.putExtra(RecognizerIntent.EXTRA_PROMPT, \"Please Speak Now !\");\r\n\t\tstartActivityForResult(i, check);\r\n\t}", "@Override\r\n\tprotected void getIntentWord() {\n\t\tsuper.getIntentWord();\r\n\t}", "@Override\n\tpublic String getSpeechResult() {\n\t\treturn null;\n\t}", "@Override\n public void onClick(View v) {\n StringRequest stringRequest = searchNameStringRequest(output.getText().toString(),\"en\",\"ar\");\n\n\n\n // executing the request (adding to queue)\n queue.add(stringRequest);\n\n String toSpeak = output.getText().toString();\n\n t1.speak(toSpeak, TextToSpeech.QUEUE_FLUSH, null);\n }", "@Override\n public void onResult(Hypothesis hypothesis) {\n ((TextView) findViewById(R.id.result_text)).setText(\"\");\n mMicView.setBackgroundResource(R.drawable.background_big_mic);\n if (hypothesis != null) {\n String text = hypothesis.getHypstr();\n makeText(getApplicationContext(), text, Toast.LENGTH_SHORT).show();\n //mTextToSpeech.speak(text, TextToSpeech.QUEUE_FLUSH, null);\n\n }\n }", "private void startVoiceRecognitionActivity()\n {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"Voice recognition Demo...\");\n startActivityForResult(intent, REQUEST_CODE);\n }", "public interface TextToSpeechListener {\n\n\tvoid onTTSInit(int ttsResult) ;\n}", "private void startVoiceRecognitionActivity() {\n\t\t// Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\t\t// intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n\t\t// RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n\t\t// intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n\t\t// \"Diga o valor do produto\");\n\t\t// intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE, \"pt-BR\");\n\t\t// // intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE,\n\t\t// \"en-US\");\n\t\t// intent.putExtra(RecognizerIntent.EXTRA_ONLY_RETURN_LANGUAGE_PREFERENCE,\n\t\t// true);\n\t\t// startActivityForResult(intent, VOICE_RECOGNITION_REQUEST_CODE);\n\t\tUtils.startVoiceRecognitionActivity(this, Utils.nomeProdutoMessage);\n\t}", "@Override\n public void success(Object o, Response response) {\n Log.d(TAG, \"Phrase: \" + phrase + \" was executed\");\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == RESULT_OK && resultCode == RESULT_OK) {\n // Fill the list view with the strings the recognizer thought it could have heard\n ArrayList<String> matches = data.getStringArrayListExtra(\n RecognizerIntent.EXTRA_RESULTS);\n\n if (matches.size() >= 0) {\n\n CURRENT_1 = 7;\n CURRENT_1_IMAGE = R.drawable.logo_user;\n showDialog(CHOOSE_METHOD_DIALOG);\n } else {\n\n }\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "void speechToTextFuncVoiceForPurchase(Context context, EditText editText, int dataType, ImageView micImage, int valueforValidate) {\n if (Utility.getInstance().isOnline(mContext)) {\n int value = checkPermission(mContext, Manifest.permission.RECORD_AUDIO, RECORD_AUDIO_PERMISSION_REQUEST_CODE);\n if (value == 1) {\n mSpeechRecognizer = SpeechRecognizer.createSpeechRecognizer(mContext);\n mSpeechRecognizerIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n String languageCode = Utility.getInstance().getLanguage(mContext);\n // Locale current = getResources().getConfiguration().locale;\n if (languageCode.matches(langaugeCodeEnglish)) {\n mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, \"en_US\");\n } else if (languageCode.matches(languageCodeMarathi)) {\n mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, \"mr_IN\");\n } else {\n mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, \"en_US\");\n setError(\"BaseFragmnet : speechToTextFunc Has problem\");\n }\n mSpeechRecognizer.setRecognitionListener(new RecognitionListener() {\n @Override\n public void onReadyForSpeech(Bundle params) {\n if (isVisible()) {\n micImage.setColorFilter(getResources().getColor(android.R.color.holo_green_light), PorterDuff.Mode.SRC_IN);\n if (editText != null) {\n editText.getBackground().setColorFilter(getResources().getColor(android.R.color.holo_green_light),\n PorterDuff.Mode.SRC_ATOP);\n }\n }\n }\n\n @Override\n public void onBeginningOfSpeech() {\n\n }\n\n @Override\n public void onRmsChanged(float rmsdB) {\n\n }\n\n @Override\n public void onBufferReceived(byte[] buffer) {\n\n }\n\n @Override\n public void onEndOfSpeech() {\n if (isVisible()) {\n micImage.setColorFilter(getResources().getColor(android.R.color.black), PorterDuff.Mode.SRC_IN);\n if (editText != null) {\n editText.getBackground().setColorFilter(getResources().getColor(android.R.color.black),\n PorterDuff.Mode.SRC_ATOP);\n }\n }\n }\n\n @Override\n public void onError(int error) {\n\n }\n\n @Override\n public void onResults(Bundle results) {\n if (isVisible()) {\n ArrayList<String> matches = results.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);\n if (matches.get(0).toString().toLowerCase().contains(getString(R.string.save).toString().toLowerCase())) {\n boolean valueStatus = validatePuchase();\n if (valueStatus) {\n createPurchaseRequest(flowpurchaseReceivedOrPaid);\n }\n } else if (matches.get(0).toString().toLowerCase().contains(getString(R.string.cancel_two).toString().toLowerCase())) {\n dialog.dismiss();\n dialog.dismiss();\n dialog.dismiss();\n if (textToSpeech != null) {\n textToSpeech.stop();\n }\n Toast.makeText(mContext, getString(R.string.transaction_cancelled), Toast.LENGTH_SHORT).show();\n speak(getString(R.string.transaction_cancelled), \"\");\n }\n if (editText != null) {\n if (dataType == 1) {\n editText.setText(matches.get(0));\n } else {\n for (int i = 0; i < matches.size(); i++) {\n if (matches.get(i).matches(\"^[0-9]*$\")) {\n editText.setText(matches.get(i));\n }\n }\n }\n\n\n //Ankur\n boolean valueValidate = validatePuchase();\n if (valueValidate) {\n speak(getString(R.string.please_say_save_or_cancel), \"\");\n new Handler().postDelayed(() -> {\n speechToTextFuncVoiceForPurchase(mContext, null, 3, imageviewMicSaveCancel, 2);\n }, 3000);\n }\n\n }\n }\n }\n\n @Override\n public void onPartialResults(Bundle partialResults) {\n\n }\n\n @Override\n public void onEvent(int eventType, Bundle params) {\n\n }\n });\n\n if (dialog.isShowing()) {\n mSpeechRecognizer.startListening(mSpeechRecognizerIntent);\n }\n } else if (value == 2) {\n displayNeverAskAgainDialog(mContext, getString(R.string.We_need_permission_Audio));\n }\n } else {\n Toast.makeText(context, getString(R.string.please_check_internet), Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) \n\t\t\t{\n\t\t\t\tISpeechServiceProxy iss = new SpeechServiceProxy() ;\n\t\t\t\tiss.textToSpeech(ServiceAction.TTS_ACTION, ReadTextActivity.this, inputText.getText().toString()) ;\n\t\t\t}", "@Override\n public void onEndOfSpeech() {\n //findViewById(R.id.mic).setBackgroundColor(getResources().getColor(R.color.colorPrimary));\n mMicView.setBackgroundResource(R.drawable.background_big_mic);\n if (!recognizer.getSearchName().equals(KEYPHRASE))\n switchSearch(KEYPHRASE);\n }", "void playSpeech(String rawText);", "@Override\n protected void onStop() {\n \tstopActivityRecognition(); // Stops activity recognition only if in any case it wasn't stopped before\n super.onStop();\n }", "private void listen_word() {\n\t\tif(this.dwd!=null && this.main_word!=null)\n\t\t{\n\t\t\tif(this.main_word!=\"\")\n\t\t\t{\n\t\t\t\tif(isHindi)\n\t\t\t\t{\n\t\t\t\t\tDictCommon.listen_in_hindi(this.main_word);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(mCallBack==null)\n\t\t\t\t\t{\n\t\t\t\t\t\tmCallBack=(OnWordSelectedFromSearchSuccess) getActivity();\n\t\t\t\t\t}\n\t\t\t\t\tmCallBack.onWordSpeak(this.main_word);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void recordMessage2(String result, String number) {\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, \"en-US\");\n\n startActivityForResult(intent, 2);\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent data){\n if (resultCode == RESULT_OK) {\n List<String> results = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\n for (int i = 0; i < results.size(); i++) {\n result = results.get(i).toLowerCase();\n Log.d(\"SpeechResults\", result);\n speechOutput.add(result);\n\n\n\n\n\n\n }\n if(result.contains(\"top\") && result.contains(\"left\") && boardStatus[0][0].equals(\"a\")){\n topLeft.setText(playerToggle);\n boardStatus[0][0] = playerToggle;\n checkBoard();\n switchPlayer();\n }\n\n else if(((result.contains(\"top\") && result.contains(\"mid\")) || (result.contains(\"top\") && result.contains(\"mod\")) ||\n (result.contains(\"talk\") && ((result.contains(\"mid\") || result.contains(\"mod\")))) ||\n result.contains(\"tau\") &&((result.contains(\"mid\") || result.contains(\"mod\"))) )\n && boardStatus[0][1].equals(\"b\")){\n topMiddle.setText(playerToggle);\n boardStatus[0][1] = playerToggle;\n checkBoard();\n switchPlayer();\n }\n\n else if(result.contains(\"top\") && (result.contains(\"right\") || result.contains(\"write\") || result.contains(\"rat\") || result.contains(\"red\"))\n && boardStatus[0][2].equals(\"c\")){\n topRight.setText(playerToggle);\n boardStatus[0][2] = playerToggle;\n checkBoard();\n switchPlayer();\n }\n\n else if((result.contains(\"cent\") && result.contains(\"left\")) ||\n (result.contains(\"sen\") && result.contains(\"left\"))\n && boardStatus[1][0].equals(\"d\")){\n centerLeft.setText(playerToggle);\n boardStatus[1][0] = playerToggle;\n checkBoard();\n switchPlayer();\n }\n\n else if((result.contains(\"cent\") && (result.contains(\"mid\") || result.contains(\"mod\"))) ||\n (result.contains(\"sen\") && (result.contains(\"mid\") || result.contains(\"mod\"))\n && boardStatus[1][1].equals(\"e\"))){\n centerMiddle.setText(playerToggle);\n boardStatus[1][1] = playerToggle;\n checkBoard();\n switchPlayer();\n }\n\n else if((result.contains(\"cent\") && (result.contains(\"right\") || result.contains(\"write\") || result.contains(\"rat\") || result.contains(\"red\")) ||\n (result.contains(\"sen\") && (result.contains(\"right\") || result.contains(\"write\") || result.contains(\"rat\") || result.contains(\"red\"))))\n && boardStatus[1][2].equals(\"f\")){\n centerRight.setText(playerToggle);\n boardStatus[1][2] = playerToggle;\n checkBoard();\n switchPlayer();\n }\n\n else if(((result.contains(\"bot\") && result.contains(\"left\") ) || (result.contains(\"bat\") && result.contains(\"left\"))) && boardStatus[2][0].equals(\"g\")){\n bottomLeft.setText(playerToggle);\n boardStatus[2][0] = playerToggle;\n checkBoard();\n switchPlayer();\n }\n\n else if(result.contains(\"bot\") && (result.contains(\"mid\") || result.contains(\"mod\"))\n && boardStatus[2][1].equals(\"h\")){\n bottomMiddle.setText(playerToggle);\n boardStatus[2][1] = playerToggle;\n checkBoard();\n switchPlayer();\n }\n\n else if(result.contains(\"bot\") && (result.contains(\"right\") || result.contains(\"write\") || result.contains(\"rat\") || result.contains(\"red\")) && boardStatus[2][2].equals(\"i\")){\n bottomRight.setText(playerToggle);\n boardStatus[2][2] = playerToggle;\n checkBoard();\n switchPlayer();\n }\n\n //If the command was not understandable the user will be asked to repeat their command.\n else{\n\n Toast.makeText(this, \"Please repeat your command.\", Toast.LENGTH_SHORT).show();\n\n speechOutput.clear();\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"We couldn't understand your command. Please try again.\");\n intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 10);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.ENGLISH);\n try {\n startActivityForResult(intent, VOICE_RECOGNITION);\n } catch (ActivityNotFoundException e) {\n e.printStackTrace();\n }\n }\n\n\n\n }\n }", "public interface RecognitionEvent {\n /**\n * Called to notify that content recognition is done.\n */\n public void onContentRecognized(IRecognitionPlugin plugin, RecognitionOutput output);\n }", "public void speakButtonClicked(View v)\n {\n startVoiceRecognitionActivity();\n }", "void start() {\n\t\t\n\t\ttts = new TextToSpeech(getApplicationContext(), new TextToSpeech.OnInitListener() {\n\t\t\t@Override\n\t\t\tpublic void onInit(int status) {\n\t\t\t\tif (status != TextToSpeech.ERROR) {\n\t\t\t\t\ttts.setLanguage(Locale.KOREAN);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\trecognizerIntent = new Intent(RecognizerIntent.ACTION_VOICE_SEARCH_HANDS_FREE);\n\t\trecognizerIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, getPackageName());\n\t\trecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, \"ko-KR\");\n\t\t\n\t\tmRecognizer = SpeechRecognizer.createSpeechRecognizer(this);\n\t\tmRecognizer.setRecognitionListener(recognitionListener);\n\t\t\n\t\t\n\t\tV_button.setOnClickListener(new View.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tif (AL_keywordSelected.size() == 0)\n\t\t\t\t\tstartVoice();\n\t\t\t\telse {\n\t\t\t\t\tString str = \"\";\n\t\t\t\t\t\n\t\t\t\t\tfor (String s : AL_keywordSelected)\n\t\t\t\t\t\tstr += s + \" \";\n\t\t\t\t\t\n\t\t\t\t\tsendMsg(str);\n\t\t\t\t\tinitKeyword();\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\tfirestore.collection(\"command\")\n\t\t\t.addSnapshotListener(new EventListener<QuerySnapshot>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onEvent(@Nullable QuerySnapshot snapshots, @Nullable FirebaseFirestoreException e) {\n\t\t\t\t\tif (e != null) {\n\t\t\t\t\t\tlog(\"listen:error\" + e);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfor (DocumentChange dc : snapshots.getDocumentChanges()) {\n\t\t\t\t\t\tQueryDocumentSnapshot document = dc.getDocument();\n\t\t\t\t\t\t\n\t\t\t\t\t\tString key = document.getId();\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tCommand command;\n\t\t\t\t\t\t\tswitch (dc.getType()) {\n\t\t\t\t\t\t\t\tcase ADDED:\n\t\t\t\t\t\t\t\t\tcommand = new Command(key, document);\n\t\t\t\t\t\t\t\t\tlog(\"New: \" + key);\n\t\t\t\t\t\t\t\t\tlog(command.toString());\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tmapData.put(key, command);\n\t\t\t\t\t\t\t\t\tupdateKeyword();\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase MODIFIED:\n\t\t\t\t\t\t\t\t\tcommand = new Command(key, document);\n\t\t\t\t\t\t\t\t\tlog(\"Modified: \" + key);\n\t\t\t\t\t\t\t\t\tlog(command.toString());\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tCommand oldCommand = mapData.get(key);\n\t\t\t\t\t\t\t\t\tif (command.responseTimestamp.getSeconds() != oldCommand.responseTimestamp.getSeconds()) {\n\t\t\t\t\t\t\t\t\t\tfor (String waitingKey : waitingKeys) {\n\t\t\t\t\t\t\t\t\t\t\tif (waitingKey.equals(key)) {\n\t\t\t\t\t\t\t\t\t\t\t\taddOutputMessage(command.response);\n\t\t\t\t\t\t\t\t\t\t\t\twaitingKeys.remove(key);\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\t\n\t\t\t\t\t\t\t\t\tmapData.put(key, command);\n\t\t\t\t\t\t\t\t\tupdateKeyword();\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase REMOVED:\n\t\t\t\t\t\t\t\t\tcommand = new Command(key, document);\n\t\t\t\t\t\t\t\t\tlog(\"Removed: \" + key);\n\t\t\t\t\t\t\t\t\tlog(command.toString());\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tmapData.remove(key);\n\t\t\t\t\t\t\t\t\tupdateKeyword();\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\tlog(\"error: \" + key);\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\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});\n\t\t\n\t}", "@Override\r\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif(requestCode== check && resultCode== RESULT_OK){\r\n\t\t\tArrayList<String> results = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\r\n\t\t\tListView_Result.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,results));\r\n\r\n\t\t\t\r\n\t\t}\r\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\r\n\t\t\r\n\t}", "private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, \"us-US\");\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }", "void processIntent(Intent intent) {\n Parcelable[] rawMsgs = intent.getParcelableArrayExtra(\n NfcAdapter.EXTRA_NDEF_MESSAGES);\n NdefMessage msg = (NdefMessage) rawMsgs[0];\n String s = new String(msg.getRecords()[0].getPayload());\n nfcTagCode = s.substring(3);\n\n textView.setText(nfcTagCode); // Sets the textview as the Text read from NFC TAG\n }", "private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }", "private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }", "private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }", "private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }", "private void handleIntent() {\n\t\tif (getIntent() != null && getIntent().getAction() != null) {\n\t\t\tif (getIntent().getAction().equals(Intent.ACTION_SEARCH)) {\n\t\t\t\tLog.d(\"MainActivityantivirus\", \"Action search!\");\n\t\t\t\tif (mCurrentFragmentType == NavigationElement.TYPE_APPS) {\n\t\t\t\t\tfinal String query = getIntent().getStringExtra(SearchManager.QUERY);\n\t\t\t\t\tif (query != null) {\n\t\t\t\t\t\t((AppsFragment) mCurrentFragment).onSearch(query);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onError(int errorCode) {\n String errorMessage = getErrorText(errorCode);\n Log.d(\"SRL\", \"FAILED \" + errorMessage);\n speech = SpeechRecognizer.createSpeechRecognizer(this);\n speech.setRecognitionListener(this);\n speech.startListening(getIntent());\n }", "private void listen_meaning_word() {\n\t\tif(this.dwd!=null)\n\t\t{\n\t\t\tString meaning_word=\"\";\n\t\t\tif(isHindi)\n\t\t\t{\n\t\t\t\tmeaning_word=dwd.eng_word;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmeaning_word=dwd.hin_word;\n\t\t\t}\n\t\t\tif(isHindi)\n\t\t\t{\n\t\t\t\tif(this.main_word!=\"\")\n\t\t\t\t{\n\t\t\t\t\tif(mCallBack==null)\n\t\t\t\t\t{\n\t\t\t\t\t\tmCallBack=(OnWordSelectedFromSearchSuccess) getActivity();\n\t\t\t\t\t}\n\t\t\t\t\tmCallBack.onWordSpeak(meaning_word);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tDictCommon.listen_in_hindi(meaning_word);\n\t\t\t}\n\t\t}\n\t}", "private void notifyTtsCompleted()\n {\n //if(resources.getTtsCallbackUrl().compareTo())\n RequestDispatcher dispatcher = new RequestDispatcher(this);\n dispatcher.execute(resources.getTtsCallbackUrl(), \"\", \"\", \"true\");\n Intent i = new Intent(\"ttsCompleted-event\");\n LocalBroadcastManager.getInstance(myContext).sendBroadcast(i);\n }", "@Override\r\n protected void onReceiveResult(int resultCode, Bundle resultData) {\n String adderssOutput = resultData.getString(Constants.RESULT_DATA_KEY);\r\n\r\n if (resultCode == Constants.SUCCESS_RESULT) {\r\n mTextView.setText(adderssOutput);\r\n }\r\n }", "@Override\n public void onInit(int status) {\n\t \n\tif (status == TextToSpeech.SUCCESS) {\n\t\t \n int result = mTts.setLanguage(Locale.US);\n if (result != TextToSpeech.LANG_MISSING_DATA && result != TextToSpeech.LANG_NOT_SUPPORTED) {\n \tspokenText += spokenText+\"\"+spokenText+\"\";\n // mTts.speak(\"Dear sir your class is finished!! Dear sir your class is finished!! Dear sir your class is finished!!\", TextToSpeech.QUEUE_FLUSH, null);\n mTts.speak(spokenText, TextToSpeech.QUEUE_FLUSH, null);\n } \n } \n\t \n}", "public interface ITextToSpeech {\n\n /* loaded from: classes.dex */\n public interface TextToSpeechCallback {\n void onFailure();\n\n void onSuccess();\n }\n\n boolean isInitialized();\n\n int isLanguageAvailable(Locale locale);\n\n void onDestroy();\n\n void onResume();\n\n void onStop();\n\n void setPitch(float f);\n\n void setSpeechRate(float f);\n\n void speak(String str, Locale locale);\n}", "protected void handleRecordedSample() {\n List<Sample> trainingSet;\n try {\n trainingSet = TrainingSet.get();\n Normalizer normalizer = new CenterNormalizer();\n Classifier classifier = new TimeWarperClassifier();\n classifier.train(trainingSet);\n final String outputText = classifier.test(normalizer.normalize(recordedSample));\n lblOutput.setText(outputText);\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n Utils.textToSpeech(outputText);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }\n }).start();\n lblOutput.setText(outputText);\n }\n catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "@Override\n public void onRecognition(Transaction transaction, Recognition recognition) {\n }", "public void transcribe (String utterance, float confidence) \n{\n //println(utterance);\n if (!utterance.equals(\"\"))\n {\n result = utterance;\n ListenForKeywords(result);\n println(result);\n inputResult = result;\n result = \"\";\n \n //CheckCommandValidity(result);\n \n }\n}", "@Override\n protected Void call() throws InterruptedException {\n _tempVr.SetTimeout(5);\n _tempVr.SetMicDistance(Protocol.Distance.FAR_MIC);\n\n updateMessage(String.format(\"Speak%s\", System.getProperty(\"line.separator\")));\n\n //instruct the module to listen for a built in word from the 1st wordset\n _tempVr.RecognizeWord(1);\n\n //need to wait until HasFinished has completed before collecting results\n while (!_tempVr.HasFinished()) {\n updateMessage(\".\");\n }\n\n // Once HasFinished has returned true, we can ask the module for the index of the word it recognised. If you're new to using the EasyVR module,\n // download the Easy VR Commander (http://www.veear.eu/downloads/) to interrogate the config of your module and see what the indexes correspond to\n // Here is a standard setup at time of writing for an EASYVR 3 module:\n // 0=Action,1=Move,2=Turn,3=Run,4=Look,5=Attack,6=Stop,7=Hello\n int indexOfRecognisedWord = _tempVr.GetWord();\n\n updateMessage(String.format(\"Response: %d%s\", indexOfRecognisedWord, System.getProperty(\"line.separator\")));\n // updateMessage(String.format(\"Recognition finished%s\", System.getProperty(\"line.separator\")));\n\n return null;\n }", "private void startVoiceRecognitionActivity()\n\t{\n\t\tSystem.out.println(\"Starting activity lel\");\n\t\tIntent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\t\tintent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n\t\t\t\tRecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n\t\tintent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"Voice recognition Demo...\");\n\t\tstartActivityForResult(intent, VOICE_REQUEST_CODE);\n\t}", "@Override\n public void onFinish() {\n mpAudio.start();\n stopService(new Intent( getBaseContext(), MeditationService.class ) );\n }", "public void onIntentReceived(final String payload) {\n this.WriteLine(\"--- Intent received by onIntentReceived() ---\");\n this.WriteLine(payload);\n this.WriteLine();\n }", "private void handleIntent(Intent intent) {\n if(intent == null){\n Toast.makeText(this, \"intent is null handleIntent \", Toast.LENGTH_SHORT).show();\n return;\n }\n String action = intent.getAction();\n\n if(nfcAdapter.ACTION_NDEF_DISCOVERED.equals(action)){\n String type = intent.getType();\n if(MIME_TEXT_PLAIN.equals(type)){\n Tag tag = intent.getParcelableExtra(EXTRA_TAG);\n\n nfcReaderTask = new NfcReaderTask();\n nfcReaderTask.SetResponseListener(this);\n nfcReaderTask.execute(tag);\n }\n }\n }", "public abstract void onTextReceived(String message);", "public abstract void startVoiceRecognition(String language);", "private void speak() {\n if(textToSpeech != null && textToSpeech.isSpeaking()) {\n textToSpeech.stop();\n }else{\n textToSpeech = new TextToSpeech(activity, this);\n }\n }", "public void onSpeak(View v)\n\t{\n\t\tstartVoiceRecognitionActivity();\n\t}", "void onTranslation(Sentence sentence);", "@Override\n protected void onPostExecute(@Nullable String string) {\n super.onPostExecute(string);\n if (listener != null) {\n listener.onResults(string);\n }\n\n }", "private void recognize() {\n //Setup our Reco transaction options.\n Transaction.Options options = new Transaction.Options();\n options.setDetection(resourceIDToDetectionType(R.id.long_endpoint));\n options.setLanguage(new Language(\"eng-USA\"));\n options.setEarcons(startEarcon, stopEarcon, errorEarcon, null);\n\n //Add properties to appServerData for use with custom service. Leave empty for use with NLU.\n JSONObject appServerData = new JSONObject();\n //Start listening\n recoTransaction = speechSession.recognizeWithService(\"M10253_A3221\", appServerData, options, recoListener);\n }" ]
[ "0.69005144", "0.6847757", "0.6728021", "0.67133653", "0.65964943", "0.6557726", "0.651447", "0.6366768", "0.6346173", "0.63148427", "0.6272908", "0.6259072", "0.6160675", "0.6092669", "0.6092373", "0.60859346", "0.60644406", "0.60412717", "0.59409976", "0.5938899", "0.59253967", "0.59061587", "0.5871624", "0.58689374", "0.585586", "0.58557314", "0.58531827", "0.5817386", "0.58108366", "0.57310516", "0.570028", "0.56974393", "0.5695924", "0.5695611", "0.5691982", "0.56902206", "0.567458", "0.56540835", "0.56504977", "0.5644141", "0.56236136", "0.56176627", "0.5602088", "0.55816084", "0.5559456", "0.5558668", "0.5555314", "0.5539079", "0.55366844", "0.55249834", "0.55231166", "0.54933834", "0.5481732", "0.54669195", "0.54481524", "0.5445453", "0.5426139", "0.54124105", "0.53946686", "0.53884566", "0.5382309", "0.5371485", "0.53655124", "0.53525203", "0.5352378", "0.53484863", "0.53449714", "0.53422505", "0.5338445", "0.532936", "0.5316951", "0.5284055", "0.5280979", "0.52799684", "0.52718145", "0.52718145", "0.52718145", "0.52718145", "0.52693397", "0.52560025", "0.5255737", "0.5249918", "0.523696", "0.52171594", "0.51930976", "0.5184698", "0.5184683", "0.517992", "0.51386815", "0.51316786", "0.5131267", "0.5129681", "0.5127638", "0.5127318", "0.51272047", "0.5126611", "0.5124584", "0.51168364", "0.510205", "0.5099167" ]
0.708865
0
returns value of exp necessary to be at specified level
private int getReqExp(int level) { if (level < 2) return 0; else return (level-1)*1000 + getReqExp(level-1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static int calcMaxExpForLevel(int level){\n\t\tScriptEngineManager mgr = new ScriptEngineManager();\n\t ScriptEngine engine = mgr.getEngineByName(\"JavaScript\");\n\t String maxExpGeneratorString = RacesAndClasses.getPlugin()\n\t \t\t.getConfigManager().getGeneralConfig().getConfig_mapExpPerLevelCalculationString();\n\t \n\t maxExpGeneratorString = maxExpGeneratorString.replace(\"{level}\", String.valueOf(level));\n\t\t\n\t try{\n\t \tString parsedValue = (String) engine.eval(maxExpGeneratorString).toString();\t\n\t \tdouble doubleValue = Double.parseDouble(parsedValue);\n\t \tint intValue = (int) doubleValue;\n\t \t\n\t \treturn intValue;\n\t }catch(Exception exp){\n\t \treturn level * level * 1000;\n\t }\n\t \n\t}", "public Integer getExpLevel()\n\t{\n\t\treturn expLevel;\n\t}", "public static double exp() {\r\n System.out.println(\"What is your base?\");\r\n int b = Main.sc.nextInt();\r\n System.out.println(\"What is your power?\");\r\n int p = Main.sc.nextInt();\r\n double answer = Math.pow((double) b, (double) p);\r\n return answer;\r\n }", "int getCurEXP();", "int getCurEXP();", "public double evaluateLevel(Level level)\n\t{\n\t\treturn 1.0;\n\t}", "int getMaxEXP();", "int getMaxEXP();", "public double calculateXpForLevel(int level) {\n double xpResult = 0;\n\n for (int x = 1; x < level; x++) {\n xpResult += Math.floor(x + 300 * Math.pow(2, x / 7.0));\n\n }\n\n return Math.floor(xpResult / 5);\n }", "public T exp(T value);", "public int getLevelByExperience(double exp) {\r\n int points = 0;\r\n int output;\r\n for (byte lvl = 1; lvl < 100; lvl++) {\r\n points += Math.floor(lvl + 300.0 * Math.pow(2.0, lvl / 7.0));\r\n output = (int) Math.floor(points / 4);\r\n if ((output - 1) >= exp) {\r\n return lvl;\r\n }\r\n }\r\n return 99;\r\n }", "public double powE(double exp) {\n return Double.parseDouble(String.format(\"%.8f\", Math.pow(StrictMath.E, exp)));\n }", "public double getExp() {\n return exp;\n }", "public int getExp() {\n \t\treturn exp;\n \t}", "public int levelXp(int level){\n return level >= maxLevel ? -1 : (level ^ 2) * 75;\n }", "public double getTotalExp() {\n double exp = this.exp;\n for (int i = 1; i < level; i++)\n exp += classData.getRequiredExp(i);\n return exp;\n }", "public static int getEXPForNextLevel(int currentLevel) {\n\t\tif (currentLevel < 1 || currentLevel >= MAX_LEVEL)\n\t\t\tthrow new IllegalArgumentException(currentLevel + \" not a valid level\");\n\n\t\t// XP_FOR_LEVEL[0] is for 1st level\n\t\treturn XP_FOR_NEXT_LEVEL[currentLevel - 1];\n\t}", "public float getExp ( ) {\n\t\treturn extract ( handle -> handle.getExp ( ) );\n\t}", "public int getExperienceForLevel(int level) {\r\n int points = 0;\r\n int output = 0;\r\n for (int lvl = 1; lvl <= level; lvl++) {\r\n points += Math.floor(lvl + 300.0 * Math.pow(2.0, lvl / 7.0));\r\n if (lvl >= level) {\r\n return output;\r\n }\r\n output = (int) Math.floor(points / 4);\r\n }\r\n return 0;\r\n }", "public static int getExpToLevel(final int skill, final int level) {\r\n\t\treturn Skills.XP_TABLE[level] - Skills.getCurrentExp(skill);\r\n\t}", "public void setExp(int exp) {\r\n\t\tthis.exp = exp;\r\n\t}", "public int getExpRequirement(int level, boolean isPromoted) {\r\n // TODO I have no idea what the exp table is above 25.\r\n if (level > 25 && !isPromoted) {\r\n return level * level * level * _expTable[1];\r\n }\r\n int index = level - 1;\r\n\r\n if (index < 0 || index > _expTable.length - 1) {\r\n _log.error(\"level index out of bounds: \" + level);\r\n return _expTable[_expTable.length - 1];\r\n }\r\n\r\n return _expTable[index];\r\n }", "public int getRequiredExp() {\n return classData.getRequiredExp(level);\n }", "@Override\n public double evaluate(double value, double scale) {\n return Math.exp(0.5 * Math.pow(value, 2.0) / scale);\n }", "public String get_exponent_part();", "public void gainExp(int exp){\r\n\t\tSystem.out.println(this.getName() + \"'s XP: \" + this.getExperiencePoints() + \" ---> \" + (this.getExperiencePoints()+exp));\r\n\t\tthis.experiencePoints += exp;\r\n\t\t\t//parameters 1 == count, 0 is being used as the xp start point to evaluate\r\n\t\t\t//the intervals in the helper method\r\n\t\tif(this.getExperiencePoints() >= calcLevel(1,0)){\r\n\r\n\t\t\tthis.levelUp();\r\n\t\t}\r\n\r\n\t}", "Expression getExp();", "public void setExp(int exp) {\n \t\tthis.exp = exp;\n \t}", "public static String showEXPLevel(int exp, int currentExp, int expGoal){\r\n\t\tint expPercent = ((100 * currentExp) / expGoal);\r\n\t\r\n\t\treturn ChatColor.GRAY + \"\" + ChatColor.BOLD + \r\n\t\t\t\t\"EXP: \" + \r\n\t\t\t\tpercentBar(expPercent) + \r\n\t\t\t\tChatColor.GRAY + ChatColor.BOLD + \" \" + expPercent + \"%\" + \r\n\t\t\t\tChatColor.RESET + ChatColor.GRAY + \" [\" + \r\n\t\t\t\tChatColor.BLUE + currentExp + \" / \" + expGoal +\r\n\t\t\t\tChatColor.RESET + ChatColor.GRAY + \"] \"\r\n\t\t\t\t+ ChatColor.GREEN + \"+\" + ChatColor.GRAY+ exp + \" EXP\";\r\n\t}", "private int power(int base, int exp) {\n\t\tint p = 1;\n\t\tfor( int i = exp ; i > 0; i-- ) {\n\t\t\tp = p * base;\n\t\t}\n\t\treturn p;\n\t}", "public double getExp(String k) {\n\t\t\n\t\tdouble value=0;\n\t\t\n\t\tif (quantData.containsKey(k)) {\n\t\t\tvalue = quantData.get(k);\n\t\t} else {\n\t\t\tSystem.out.println(\"Key not found\");\n\t\t\tvalue = 0.0;\n\t\t}\n\t\t\n\t\treturn value;\n\t\t\t\n\t}", "public static float exp(float x) {\n\n return 0;\n }", "double getLevel();", "double getLevel();", "public int power(int base, int exp) {\n if (exp == 0) {\n return 1;\n }\n long result = power(base, exp / 2);\n result *= result % G;\n if (exp % 2 == 1) {\n result *= base;\n }\n return (int) result;\n }", "float getBonusExp();", "public int getExpToLevel ( ) {\n\t\treturn extract ( handle -> handle.getExpToLevel ( ) );\n\t}", "public void gainExpHonors(int exp){\r\n\t\tSystem.out.println(this.getName() + \"'s XP: \" + this.getExperiencePoints() + \" ---> \" + (this.getExperiencePoints()+exp));\r\n\r\n\t\t//this.experiencePoints += exp;\r\n\t\t\t//parameters 1 == count, 0 is being used as the xp start point to evaluate\r\n\t\t\t//the intervals in the helper method\r\n\t\twhile(exp >= calcLevel(1,0)){\r\n\t\t\t//System.out.println(calcLevel(1,0));\r\n\t\t\tthis.experiencePoints = calcLevel(1,0);\r\n\t\t\t//System.out.println(this.getExperiencePoints());\r\n\t\t\tthis.levelUp();\r\n\t\t}\r\n\t\t\r\n\t\tthis.experiencePoints += (exp-this.experiencePoints);\r\n\t}", "public static int calculateXP(int level, int mlevel)\n\t{\n\t\t\n\t\tint base = mlevel * 100;\n\t\t//level is either player or party average level\n\t\tint diff = mlevel - level;\n\t\t\n\t\tswitch (diff) {\n\t\tcase 5:\n\t\t\treturn base * 2;\n\t\tcase 4:\n\t\t\treturn (int) (base * 1.8);\n\t\tcase 3:\n\t\t\treturn (int) (base * 1.6);\n\t\tcase 2:\n\t\t\treturn (int) (base * 1.4);\n\t\tcase 1:\n\t\t\treturn (int) (base * 1.2);\n\t\tcase 0:\n\t\t\treturn base;\n\t\tcase -1:\n\t\t\treturn (int) (base * .8);\n\t\tcase -2:\n\t\t\treturn (int) (base * .6);\n\t\tcase -3:\n\t\t\treturn (int) (base * .4);\n\t\tcase -4:\n\t\t\treturn (int) (base * .2);\n\t\tdefault:\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t}", "public static double power(double base, int exp) {\r\n if (exp == 0) {\r\n return 1;\r\n }\r\n\r\n if (exp > 0) {\r\n return pow(base, exp);\r\n } else {\r\n return 1 / pow(base, Math.abs(exp));\r\n }\r\n\r\n }", "public int getExponent();", "public double getExpModifier()\r\n\t{\treturn this.expModifier;\t}", "public void setLevel(int level) {\n if(level > Constant.MAX_LEVEL){\n this.level = Constant.MAX_LEVEL;\n }else {\n this.level = level;\n }\n this.expToLevelUp = this.expValues[this.level];\n }", "public int getCurEXP() {\n return curEXP_;\n }", "public int getCurEXP() {\n return curEXP_;\n }", "public void setExp(double exp) {\n this.exp = Math.max(Math.min(exp, getRequiredExp() - 1), 0);\n }", "public int getMaxEXP() {\n return maxEXP_;\n }", "public int getMaxEXP() {\n return maxEXP_;\n }", "private static final int getPower(Parsing t) {\n\t\tchar s='+';\t\t// Exponent Sign\n\t\tint pow=0;\t\t// Exponent Value\n\t\tint inum=0;\t\t// Index of exponent\n\t\tint posini=t.pos;\n\t\t//System.out.print(\"....getPower on '\" + this + \"', pos=\" + pos + \": \");\n\t\tt.pos = t.length-1;\n\t\tif (Character.isDigit(t.a[t.pos])) {\n\t\t\twhile (Character.isDigit(t.a[t.pos])) --t.pos;\n\t\t\ts = t.a[t.pos];\n\t\t\tif ((s == '+') || (s == '-')) ;\t// Exponent starts here\n\t\t\telse ++t.pos;\n\t\t\tinum = t.pos;\n\t\t\tpow = t.parseInt();\n\t\t\t//System.out.print(\"found pow=\" + pow + \",pos=\" + pos);\n\t\t}\n\t\tif (pow != 0) {\t\t// Verify the power is meaningful\n\t\t\tif (t.a[0] == '(') {\n\t\t\t\tif (t.a[inum-1] != ')') pow = 0;\n\t\t\t}\n\t\t\telse {\t\t// could be e.g. m2\n\t\t\t\tfor (int i=0; i<inum; i++) {\n\t\t\t\t\t// Verify the unit is not a complex one\n\t\t\t\t\tif (!Character.isLetter(t.a[i])) pow = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (pow == 0) t.pos = posini;\n\t\telse t.pos = inum;\n\t\t//System.out.println(\" pow=\" + pow + \", pos=\" + pos);\n\t\treturn(pow);\n\t}", "@Override\n\tpublic double pow(double base, double exp) {\n\t\treturn 0;\n\t}", "@SuppressWarnings(\"unchecked\")\r\n \tpublic IMeasure<? extends IMeasure<Q>> pow(int exp) {\r\n \t\tif (exp < 0)\r\n \t\t\treturn (IMeasure<? extends IMeasure<Q>>) this.pow(-exp).inverse();\r\n \t\tif (exp == 0)\r\n \r\n \t\t\treturn (IMeasure<? extends IMeasure<Q>>) ONE;\r\n \r\n \t\tIMeasure<? extends IMeasure<Q>> pow2 = (IMeasure<? extends IMeasure<Q>>) this;\r\n \t\tIMeasure<? extends IMeasure<Q>> result = null;\r\n \t\twhile (exp >= 1) { // Iteration.\r\n \r\n \t\t\tif ((exp & 1) == 1) {\r\n \t\t\t\tresult = (IMeasure<? extends IMeasure<Q>>) ((result == null) ? pow2\r\n \t\t\t\t\t\t: result.multiply(pow2));\r\n \r\n \t\t\t}\r\n \r\n \t\t\tpow2 = (IMeasure<? extends IMeasure<Q>>) pow2.multiply(pow2);\r\n \r\n \t\t\texp >>>= 1;\r\n \r\n \t\t}\r\n \r\n \t\treturn result;\r\n \r\n \t}", "public float getUserExponent() {\n/* 195 */ return this.userExponent;\n/* */ }", "public int getCurEXP() {\n return curEXP_;\n }", "public int getCurEXP() {\n return curEXP_;\n }", "public Integer getExponent();", "protected void gainEXP(int gain) {\n this.totalEXP += gain;\n }", "public Expressao getExp() {\n\t\treturn exp;\n\t}", "static int exp(int base, long n) {\n\n // 2^3=8 , 2^x=8 -> x = ln8/ln2 , otherwise x=Math.log(8)/Math/log(2)\n\n return (int) ( Math.log(n)/Math.log(base) );\n }", "static double k1exp(final double x) {\n final double z = 0.5 * x;\n if (z <= 0) {\n return Double.NaN;\n }\n if (x <= 2) {\n return (Math.log(z) * Bessel.i1(x) + chebyshev(x * x - 2, K1A) / x) * Math.exp(x);\n }\n return chebyshev(8 / x - 2, K1B) / Math.sqrt(x);\n }", "public void setExp ( float exp ) {\n\t\texecute ( handle -> handle.setExp ( exp ) );\n\t}", "public int getMaxEXP() {\n return maxEXP_;\n }", "public int getMaxEXP() {\n return maxEXP_;\n }", "private double f(double x) {\n return (1 / (1 + Math.exp(-x)));\n }", "public abstract String getExponent();", "public static double exp(double a)\n\t{\n\t boolean neg = a < 0 ? true : false;\n\t if (a < 0)\n a = -a;\n int fac = 1;\n \t double term = a;\n \t double sum = 0;\n \t double oldsum = 0;\n \t double end;\n\n \t do {\n \t oldsum = sum;\n \t sum += term;\n \n \t fac++;\n \n \t term *= a/fac;\n\t end = sum/oldsum;\n \t } while (end < LOWER_BOUND || end > UPPER_BOUND);\n\n sum += 1.0f;\n \n\t return neg ? 1.0f/sum : sum;\n\t}", "public static double genExp(double a) {\r\n\t\tdouble x = 1 - generator.nextDouble();\r\n\t\tdouble exp = -1 * Math.log(x) * a;\r\n\t\treturn exp;\r\n\r\n\t}", "public static double exp(double a, double b){\r\n\t\treturn Math.pow(a,b);\r\n\t}", "float getPower();", "public double getExpLoss()\r\n\t{\treturn this.expLoss;\t}", "static double k0exp(final double x) {\n if (x <= 0) {\n return Double.NaN;\n }\n if (x <= 2) {\n return (chebyshev(x * x - 2, KA) - Math.log(0.5 * x) * Bessel.i0(x)) * Math.exp(x);\n }\n return chebyshev(8 / x - 2, KB) / Math.sqrt(x);\n }", "int getBonusExp();", "int getBonusExp();", "public void setExpToLevelUp(BigValue expToLevelUp) {\n this.expToLevelUp = expToLevelUp;\n }", "public double Getlevel()\r\n {\r\n return level;\r\n }", "private void calculateSensitivityExponent() {\n this.sensitivityExponent = Math.exp(-1.88 * percentageSensitivity);\n }", "public static double exp(double[] parameters) {\r\n double lambda;\r\n lambda = parameters[0];\r\n return -Math.log(1 - uniform()) / lambda;\r\n }", "public void increaseExp(int exp){\r\n\t\tthis.exp = this.exp + exp;\r\n\t}", "public double pow(double base, double exponent){ return Math.pow(base, exponent); }", "public double getDeservedQuantity(int level) {\n double deservedQuantity = 0;\r\n switch (level) {\r\n case 1:\r\n deservedQuantity = level1;\r\n break;\r\n case 2 :\r\n deservedQuantity = level2;\r\n break;\r\n case 3 :\r\n deservedQuantity = level3;\r\n break;\r\n default:\r\n System.out.println(\"Unable to calculate the deserved amount of quantity\");\r\n }\r\n return deservedQuantity;\r\n }", "BigDecimal getElevation();", "public double getXp(SkillType name) {\n return levelsXp.get(name);\n }", "public final void power (int expo) throws ArithmeticException {\n\t\tdouble error = 0;\n\t\tint i = expo; \n\t\tdouble r = 1;\n\t\tdouble v = 1; \n\t\tlong u = underScore;\n\t\tif ((mksa&(_log|_mag)) != 0) throw new ArithmeticException\n\t\t(\"****Unit: can't power log[unit]: \" + symbol );\n\t\twhile (i > 0) { \n\t\t\tr *= factor; v *= value; \n\t\t\tu += mksa; u -= underScore; \n\t\t\tif ((u&0x8480808080808080L) != 0) error++;\n\t\t\ti--; \n\t\t}\n\t\twhile (i < 0) { \n\t\t\tr /= factor; v /= value; \n\t\t\tu += underScore; u -= mksa;\n\t\t\tif ((u&0x8480808080808080L) != 0) error++;\n\t\t\ti++; \n\t\t}\n\t\tif (error > 0) throw new ArithmeticException\n\t\t(\"****Unit: power too large: (\" + \")^\" + expo) ;\n\t\tfactor = r;\n\t\tvalue = v;\n\t\tmksa = u;\n\t\t/* Decision for the new symbol */\n\t\tif ((expo != 1) && (symbol != null)) {\n\t\t\tif (expo == 0) symbol = \"\";\n\t\t\telse if (symbol.length()>0) {\n\t\t\t\tParsing t = new Parsing(symbol);\n\t\t\t\tint pow;\n\t\t\t\tpow = getPower(t);\n\t\t\t\tif (pow == 0) symbol = toExpr(symbol) + expo;\n\t\t\t\telse {\t\t\t// Combine exponents\n\t\t\t\t\ti=0;\n\t\t\t\t\tpow *= expo;\n\t\t\t\t\tif (t.a[0] == '(') { i = 1; t.advance(-1); }\n\t\t\t\t\tif (expo == 1) symbol = symbol.substring(i,t.pos);\n\t\t\t\t\telse symbol = toExpr(symbol.substring(i,t.pos)) + pow;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private double _evaluate(String exp) throws NumberFormatException, ArithmeticException {\r\n return _evaluate(exp,0,(exp.length()-1));\r\n }", "public static double f(double z){\n return 1 / (1 + Math.exp(-z));\n }", "public void updateExp(int amount) {\n exp += amount;\n // todo: change the threshold function to reflect a cross and not an equality.\n if (exp % EXP_THRESHOLD == 0)\n level++;\n }", "public int getExponent( double f ) {\r\n \r\n int exp = (int)( Math.log( f ) / Math.log( 2 ) );\r\n \r\n return exp;\r\n \r\n }", "public double evaluate(String exp) throws NumberFormatException, ArithmeticException {\r\n isConstant=true;\r\n return _evaluate(exp);\r\n }", "public Expression getGammaValue();", "Exp\ngetExp2();", "public int getExperienceToNextLevel() {\n\t\treturn (int)(Math.sqrt(level)*2*(level*level));\n\t}", "public int getStandEXP(ItemStack stack) {\n/* 189 */ NBTTagCompound nbttagcompound = stack.getTagCompound();\n/* */ \n/* 191 */ if (nbttagcompound == null)\n/* */ {\n/* 193 */ return 0;\n/* */ }\n/* */ \n/* */ \n/* 197 */ NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag(this.standInfo);\n/* 198 */ return (nbttagcompound1 == null) ? 0 : (nbttagcompound1.hasKey(this.standExp) ? nbttagcompound1.getInteger(this.standExp) : 0);\n/* */ }", "public static String power(int base, int exp){\n\t\tBigNum temp = new BigNum(base);\n\t\ttemp = temp.power(exp);\n\t\treturn temp.toString();\n\t}", "public double exponent()\n\t{\n\t\treturn _dblExponent;\n\t}", "public void giveExpLevels ( int amount ) {\n\t\texecute ( handle -> handle.giveExpLevels ( amount ) );\n\t}", "public void cal_AdjustedFuelMoist(){\r\n\tADFM=0.9*FFM+0.5+9.5*Math.exp(-BUO/50);\r\n}", "private double procesarOperadorExponente() throws Exception {\r\n double resultado = procesarCoeficientesFuncionesParentesis();\r\n while (!colaDeTokens.isEmpty()) {\r\n switch (colaDeTokens.element().tipoToken) {\r\n case EXPONENTE:\r\n \r\n colaDeTokens.remove();\r\n resultado = Math.pow(resultado, procesarCoeficientesFuncionesParentesis());\r\n continue;\r\n }\r\n break;\r\n }\r\n return resultado;\r\n }", "public double getLevel(SkillType name) { return levels.get(name); }", "@Test\n\tpublic void testExponentiation() {\n\t\tdouble tmpRndVal = 0.0;\n\t\tdouble tmpRndVal2 = 0.0;\n\t\tdouble expResult = 0.0;\n\t\t\n\t\t//testing with negative numbers\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\ttmpRndVal = doubleRandomNegativeNumbers();\n\t\t\ttmpRndVal2 = doubleRandomNegativeNumbers();\n\t\t\texpResult = Math.pow(tmpRndVal, tmpRndVal2);\n\t\t\tassertEquals(ac.exponentiation(tmpRndVal, tmpRndVal2), expResult, 0);\n\t\t}\n\t\t\n\t\t//testing with positive numbers\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\ttmpRndVal = doubleRandomPositiveNumbers();\n\t\t\ttmpRndVal2 = doubleRandomPositiveNumbers();\n\t\t\texpResult = Math.pow(tmpRndVal, tmpRndVal2);\n\t\t\tassertEquals(ac.exponentiation(tmpRndVal, tmpRndVal2), expResult, 0);\n\t\t}\n\t\t\n\t\t//testing with zero\n\t\tdouble zero = 0.0;\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\texpResult = Math.pow(zero, zero);\n\t\t\tassertEquals(ac.exponentiation(zero, zero), expResult, 0);\n\t\t}\n\t\t\n\t}", "public void incLevel(int lvl){this.Level=this.XP/(100);}", "private double evaluarExp4() throws Excepciones{\n double resultado;\n double resultadoParcial;\n double ex;\n int t;\n resultado = evaluarExp5();\n if(token.equals(\"^\")){\n obtieneToken();\n resultadoParcial = evaluarExp4();\n ex = resultado;\n if(resultadoParcial == 0.0) {\n resultado = 1.0;\n }else{\n for(t=(int)resultadoParcial-1; t > 0; t--){\n resultado = resultado * ex;\n }\n }\n }\n return resultado;\n}" ]
[ "0.7177692", "0.71483904", "0.69728893", "0.6971836", "0.6971836", "0.69617444", "0.6930821", "0.6930821", "0.6868911", "0.68251497", "0.6824218", "0.66602045", "0.6659958", "0.660855", "0.6584166", "0.65822566", "0.6562474", "0.6505539", "0.64928496", "0.6422923", "0.64212966", "0.6413932", "0.64104706", "0.63781106", "0.636512", "0.63543415", "0.63335353", "0.62881213", "0.6287895", "0.6252918", "0.6195955", "0.6191148", "0.6148934", "0.6148934", "0.6118168", "0.61131877", "0.60982823", "0.6093565", "0.6060368", "0.60414755", "0.6040756", "0.60405046", "0.6037793", "0.6028849", "0.6028394", "0.6018818", "0.60120684", "0.60106", "0.60091454", "0.60015684", "0.5984307", "0.5975914", "0.59733427", "0.5972601", "0.59594107", "0.59452385", "0.59378785", "0.59312886", "0.5923469", "0.5910181", "0.5901642", "0.59004843", "0.58976865", "0.58788013", "0.5873041", "0.5864043", "0.58440495", "0.58339643", "0.5819884", "0.5811954", "0.580188", "0.580188", "0.5794703", "0.5792511", "0.5758259", "0.57434803", "0.5734027", "0.5721795", "0.57081044", "0.5691905", "0.5654525", "0.56525785", "0.565213", "0.564904", "0.5644232", "0.56291234", "0.5624509", "0.5600069", "0.5597786", "0.5597286", "0.55963206", "0.5586086", "0.5561116", "0.5555845", "0.5549881", "0.55465823", "0.5524825", "0.54972833", "0.54964685", "0.54939556" ]
0.72322196
0
Serialize this object to JSON.
public void serialize(JsonGenerator generator, JsonpMapper mapper) { generator.writeStartObject(); serializeInternal(generator, mapper); generator.writeEnd(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toJson() { return new Gson().toJson(this); }", "public String toJSON() {\n return new Gson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJSON(){\n Gson gson = new Gson();\n return gson.toJson(this);\n }", "public String toJson() {\r\n\r\n\treturn new Gson().toJson(this);\r\n }", "public String serializeJSON () {\n ObjectMapper mapper = new ObjectMapper();\n String jsonString = null;\n \n try {\n jsonString = mapper.writeValueAsString(this);\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n return jsonString;\n }", "public String jsonify() {\n return gson.toJson(this);\n }", "public String toJson() {\n try{\n return new JsonSerializer().getObjectMapper().writeValueAsString(this);\n } catch (IOException e){\n throw new RuntimeException(e);\n }\n }", "public String serialize() {\n Gson gson = new Gson();\n return gson.toJson(this);\n }", "public String serialize() {\n Gson gson = new Gson();\n return gson.toJson(this);\n }", "public String toJson() throws JsonProcessingException {\n return JSON.getMapper().writeValueAsString(this);\n }", "public String toJson() throws JsonProcessingException {\n return JSON.getMapper().writeValueAsString(this);\n }", "@Override\n\tprotected String toJSON()\n\t{\n\t\treturn getJSON(null);\n\t}", "public abstract Object toJson();", "public String toJsonData() {\n\t\treturn new Gson().toJson(this);\n\t}", "String toJSON();", "@Override\r\n\tpublic JSONObject toJSON() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic String toJSON() {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}", "@Override\n\tpublic String toJSON()\n\t{\n\t\tStringJoiner json = new StringJoiner(\", \", \"{\", \"}\")\n\t\t.add(\"\\\"name\\\": \\\"\" + this.name + \"\\\"\")\n\t\t.add(\"\\\"id\\\": \" + this.getId());\n\t\tString locationJSON = \"\"; \n\t\tif(this.getLocation() == null)\n\t\t{\n\t\t\tlocationJSON = null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlocationJSON = this.getLocation().toJSON(); \n\t\t}\n\t\tjson.add(\"\\\"location\\\": \" + locationJSON);\n\t\tStringJoiner carsJSON = new StringJoiner(\", \", \"[\", \"]\");\n\t\tfor(Object r : cars)\n\t\t{\n\t\t\tcarsJSON.add(((RollingStock) r).toJSON());\n\t\t}\n\t\tjson.add(\"\\\"cars\\\": \" + carsJSON.toString());\n\t\treturn json.toString(); \n\t}", "public String toJson() {\n return this.toJson(SerializationFormattingPolicy.None);\n }", "@Override\n\tpublic JSONObject toJson() throws JSONException {\n\t\tJSONObject result = super.toJson();\n\t\treturn result;\n\t}", "public abstract String toJson();", "public String toJsonString() {\n\t\tString json = null;\n\t\t\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tmapper.setSerializationInclusion(Include.NON_NULL);\n\t\tmapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);\n\t\ttry {\n\t\t\tjson = mapper.writeValueAsString(this);\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn json;\n\t}", "@Override\n public String toString() {\n return new JSONSerializer().serialize(this);\n }", "public String toJSON() throws JSONException;", "@Override\r\n\tpublic String toString() {\n\t\treturn JSONObject.toJSONString(this);\r\n\t}", "@Override\n\tpublic JSONObject toJson() {\n\t\treturn null;\n\t}", "public JSONObject toJson() {\n }", "@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }", "@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }", "@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }", "@Override\n\tpublic String toString() {\n\t\treturn toJSON().toString();\n\t}", "@Override\r\n public String toString() {\r\n return JsonSerializer.SerializeObject(this);\r\n }", "public String toJsonString() {\n return JsonUtils.getGson().toJson(toJson());\n }", "public JSONObject toJSON() {\n return toJSON(true);\n }", "@Override\n\tpublic String toString() {\n\t\treturn Json.pretty( this );\n\t}", "@Override\n public Object toJson() {\n JSONObject json = (JSONObject)super.toJson();\n json.put(\"name\", name);\n json.put(\"reason\", reason);\n return json;\n }", "@Override\r\n public JSONObject toJSON() {\r\n return this.studente.toJSON();\r\n }", "@Override\n public JSONObject toJson() {\n JSONObject json = new JSONObject();\n json.put(\"name\", name);\n json.put(\"startingTime\", startingTime);\n json.put(\"endingTime\", endingTime);\n json.put(\"event\", eventToJson());\n json.put(\"duration\", duration);\n return json;\n }", "@Override\n public JsonElement toJson() {\n\n // get a list of active flow uuids\n List<String> flowUuids = new ArrayList<>();\n for (Flow flow : m_activeFlows) {\n flowUuids.add(flow.getUuid());\n }\n\n return JsonUtils.object(\n \"org\", m_org.toJson(),\n \"fields\", JsonUtils.toJsonArray(m_fields),\n \"contact\", m_contact.toJson(),\n \"started\", ExpressionUtils.formatJsonDate(m_started),\n \"steps\", JsonUtils.toJsonArray(m_steps),\n \"values\", toJsonObjectArray(m_values),\n \"extra\", JsonUtils.toJsonObject(m_extra),\n \"state\", m_state.name().toLowerCase(),\n \"active_flows\", JsonUtils.toJsonArray(flowUuids),\n \"suspended_steps\", JsonUtils.toJsonArray(m_suspendedSteps),\n \"level\", m_level\n );\n }", "@Override\r\n\tpublic String toJsonString() {\n\t\treturn null;\r\n\t}", "@Override\n public String encode() {\n JsonObject tmp = new JsonObject();\n addIfSet(tmp, \"id\", id);\n addIfSet(tmp, \"courseId\", courseId);\n addIfSet(tmp, \"sheetId\", sheetId);\n addIfSet(tmp, \"maxPoints\", maxPoints);\n addIfSet(tmp, \"type\", type);\n addIfSet(tmp, \"link\", link);\n addIfSet(tmp, \"bonus\", bonus);\n addIfSet(tmp, \"linkName\", linkName);\n addIfSet(tmp, \"submittable\", submittable);\n addIfSet(tmp, \"resultVisibility\", resultVisibility);\n tmp = super.encodeToObject(tmp);\n return tmp.toString();\n }", "public String toJson() {\n\t\treturn Serializer.serializeLevelPack(this);\n\t}", "public abstract JsonElement serialize();", "@Override\n public String toString() {\n return gson.toJson(this);\n }", "public abstract String toJsonString();", "public JSONObject toJSON() {\r\n return toJSON(new JSONObject());\r\n }", "public JSONObject toJSON(){\n\t\treturn toJSON(false, false);\n\t}", "@JsonIgnore\n\tpublic String getAsJSON() {\n\t\ttry {\n\t\t\treturn TransportService.mapper.writeValueAsString(this); // thread-safe\n\t\t} catch (JsonGenerationException e) {\n\t\t\tlog.error(e, \"JSON Generation failed\");\n\t\t} catch (JsonMappingException e) {\n\t\t\tlog.error(e, \"Mapping from Object to JSON String failed\");\n\t\t} catch (IOException e) {\n\t\t\tlog.error(e, \"IO failed\");\n\t\t}\n\t\treturn null;\n\t}", "public JsonNode toJson() {\r\n return mapper.valueToTree(this);\r\n }", "public JsonObject toJson();", "@Override\n public String toString() {\n return jsonString;\n }", "@Override\n public String toJsonString() {\n GsonBuilder gsonBuilder = new GsonBuilder();\n gsonBuilder.registerTypeAdapter(TransferOperation.class, new TransferSerializer());\n return gsonBuilder.create().toJson(this);\n }", "@SuppressWarnings({\"hiding\", \"static-access\"})\n @Override\n public RavenJObject toJson() {\n RavenJObject ret = new RavenJObject();\n ret.add(\"Key\", new RavenJValue(key));\n ret.add(\"Method\", RavenJValue.fromObject(getMethod().name()));\n\n RavenJObject patch = new RavenJObject();\n patch.add(\"Script\", new RavenJValue(this.patch.getScript()));\n patch.add(\"Values\", RavenJObject.fromObject(this.patch.getValues()));\n\n ret.add(\"Patch\", patch);\n ret.add(\"DebugMode\", new RavenJValue(debugMode));\n ret.add(\"AdditionalData\", additionalData);\n ret.add(\"Metadata\", metadata);\n\n if (etag != null) {\n ret.add(\"Etag\", new RavenJValue(etag.toString()));\n }\n if (patchIfMissing != null) {\n RavenJObject patchIfMissing = new RavenJObject();\n patchIfMissing.add(\"Script\", new RavenJValue(this.patchIfMissing.getScript()));\n patchIfMissing.add(\"Values\", RavenJObject.fromObject(this.patchIfMissing.getValues()));\n ret.add(\"PatchIfMissing\", patchIfMissing);\n }\n return ret;\n }", "@Override\n public JSONObject toJson() {\n JSONObject json = new JSONObject();\n json.put(\"frontInfo\", frontInfo);\n json.put(\"backInfo\", backInfo);\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n String formattedDate = dateFormat.format(startTime);\n\n json.put(\"startTime\", formattedDate);\n json.put(\"cardID\", cardID);\n return json;\n }", "public String toJson() throws Exception {\n\t\treturn WebAccess.mapper.writeValueAsString(this);\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn JSON.toJSONString(this,SerializerFeature.WriteMapNullValue,\n\t\t\t\tSerializerFeature.WriteNonStringKeyAsString,\n\t\t\t\tSerializerFeature.WriteNullListAsEmpty,\n\t\t\t\tSerializerFeature.WriteNullNumberAsZero,\n\t\t\t\tSerializerFeature.WriteNullStringAsEmpty);\n\t}", "public String toJson()\n\t{\n\t\tJsonStringEncoder encoder = JsonStringEncoder.getInstance();\n\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append('{');\n\n\t\tboolean needComma = true;\n\t\tif (m_Message != null)\n\t\t{\n\t\t\tchar [] message = encoder.quoteAsString(m_Message.toString());\n\t\t\tbuilder.append(\"\\n \\\"message\\\" : \\\"\").append(message).append('\"').append(',');\n\t\t\tneedComma = false;\n\t\t}\n\n\t\tif (m_ErrorCode != null)\n\t\t{\n\t\t\tbuilder.append(\"\\n \\\"errorCode\\\" : \").append(m_ErrorCode.getValueString());\n\t\t\tneedComma = true;\n\t\t}\n\n\t\tif (m_Cause != null)\n\t\t{\n\t\t\tif (needComma)\n\t\t\t{\n\t\t\t\tbuilder.append(',');\n\t\t\t}\n\t\t\tchar [] cause = encoder.quoteAsString(m_Cause.toString());\n\t\t\tbuilder.append(\"\\n \\\"cause\\\" : \\\"\").append(cause).append('\"');\n\t\t}\n\n\t\tbuilder.append(\"\\n}\\n\");\n\n\t\treturn builder.toString();\n\t}", "public JsonObject serialize() {\n Map<String, Object> ret = new HashMap<>();\n ret.put(\"playerName\", this.playerName);\n ret.put(\"playerColour\", this.playerColour);\n ret.put(\"resources\", this.currentRes);\n List<JsonObject> famMembersJ = new ArrayList<>();\n this.famMemberList.forEach(f -> famMembersJ.add(f.serialize()));\n ret.put(\"famMembers\", famMembersJ);\n ret.put(\"excomms\", this.excommunications);\n ret.put(\"bonusTile\", this.bonusT.serialize());\n ret.put(\"cards\", this.cards.serialize());\n return new Gson().fromJson(new Gson().toJson(ret), JsonObject.class);\n }", "@Override\n @SuppressWarnings(\"unchecked\")\n public JSONObject toJSON() {\n JSONObject main = new JSONObject();\n JSONObject pocJSON = new JSONObject();\n pocJSON.put(JSON_NAME, this.getName());\n pocJSON.put(JSON_DESCRIPTION, this.getDescription());\n pocJSON.put(JSON_COLOR,this.colorConstraint.getColor().name());\n main.put(SharedConstants.TYPE, SharedConstants.PRIVATE_OBJECTIVE_CARD);\n main.put(SharedConstants.BODY,pocJSON);\n return main;\n }", "@Override\n public String toString() {\n Gson gson = new Gson();\n\n String json = gson.toJson(this);\n System.out.println(\"json \\n\" + json);\n return json;\n }", "public byte[] serialize() {\n try {\n ByteArrayOutputStream b = new ByteArrayOutputStream();\n ObjectOutputStream o = new ObjectOutputStream(b);\n o.writeObject(this);\n return b.toByteArray();\n } catch (IOException ioe) {\n return null;\n }\n }", "public JsonObject toJson() {\n\t\tJsonObject json = new JsonObject();\n\t\t\n\t\tif (id != null) {\n\t\t\tjson.addProperty( \"id\", id );\n\t\t}\n\t\tif (name != null) {\n\t\t\tjson.addProperty( \"name\", name );\n\t\t}\n\t\tif (version != null) {\n\t\t\tjson.addProperty( \"version\", version );\n\t\t}\n\t\tif (context != null) {\n\t\t\tjson.addProperty( \"context\", context );\n\t\t}\n\t\tif (provider != null) {\n\t\t\tjson.addProperty( \"provider\", provider );\n\t\t}\n\t\tif (description != null) {\n\t\t\tjson.addProperty( \"description\", description );\n\t\t}\n\t\tif (status != null) {\n\t\t\tjson.addProperty( \"status\", status );\n\t\t}\n\t\treturn json;\n\t}", "public JSONObject toJSON() {\n JSONObject jsonObject = new JSONObject();\n jsonObject.put(\"FileID\",this.getFileID());\n jsonObject.put(\"FilePath\",this.getFilePath());\n return jsonObject;\n }", "public String toJson() throws Exception {\r\n\t\treturn SimpleJson.HashMapToText(getJsonToken());\r\n\t}", "@Override\r\n public byte[] toBinary(Object obj) {\r\n return JSON.toJSONBytes(obj, SerializerFeature.WriteClassName);\r\n }", "public JSONObject toJSON()\n {\n JSONObject jsonField = new JSONObject();\n\n jsonField.put(\"name\", name);\n jsonField.put(\"type\", type);\n jsonField.put(\"visibility\", vis.name());\n\n return jsonField;\n }", "@Override\n public String toString() {\n return new Gson().toJson(this);\n }", "public JSONObject toJSON() {\n\t\tJSONObject j = new JSONObject();\n\t\tj.put(\"officeID\", this.officeID);\n\t\tj.put(\"officeName\", this.officeName);\n\t\treturn j;\n\t}", "@Override\n public JSONObject toJSON() throws JSONException {\n JSONObject jo = super.toJSON();\n\n jo.putOpt(Constants.JSON.ELEM_EVENT_VENUE_NAME, venueName);\n jo.putOpt(Constants.JSON.ELEM_EVENT_VENUE_ADDR, venueAddress);\n jo.putOpt(Constants.JSON.ELEM_EVENT_VENUE_POST_CODE, venuePostCode);\n jo.putOpt(Constants.JSON.ELEM_EVENT_VENUE_CITY, venueCity);\n jo.putOpt(Constants.JSON.ELEM_EVENT_VENUE_PHONE, venuePhone);\n jo.putOpt(Constants.JSON.ELEM_EVENT_START_TIME, startTimeText);\n jo.putOpt(Constants.JSON.ELEM_EVENT_TIMEZONE, timezone);\n if (travelTime != TRAVEL_TIME_UNKNOWN) {\n jo.putOpt(Constants.JSON.ELEM_EVENT_TRAVEL_TIME, travelTime);\n }\n jo.putOpt(Constants.JSON.ELEM_EVENT_ACCESS_INFO, accessInfo);\n\n return jo;\n }", "public String toString() {\n\t\treturn this.toJSON().toString();\n\t}", "public String toString() {\n\t\treturn this.toJSON().toString();\n\t}", "@Override\n public String toString() {\n ObjectMapper mapper = new ObjectMapper();\n try {\n return mapper.writeValueAsString(this);\n } catch (JsonProcessingException e) {\n return null;\n }\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\r\n\tpublic Object toJSonObject() {\n\t\treturn null;\r\n\t}", "@Override\n public String toJson() {\n return \"{'content':'\" + this.content + \"'}\";\n }", "@Override\n public String toString() {\n // TODO: Using Serializer\n return Serializer.toByteArray(this).toString();\n }", "public void serialize() {\n FileOutputStream fileOutput = null;\n ObjectOutputStream outStream = null;\n // attempts to write the object to a file\n try {\n clearFile();\n fileOutput = new FileOutputStream(data);\n outStream = new ObjectOutputStream(fileOutput);\n outStream.writeObject(this);\n } catch (Exception e) {\n } finally {\n try {\n if (outStream != null)\n outStream.close();\n } catch (Exception e) {\n }\n }\n }", "public String getAsJson() {\n StringBuffer sb = new StringBuffer();\n sb.append(\"{\\\"code\\\": \\\"\").append(this.code).append(\"\\\", \");\n sb.append(\"\\\"color\\\": \\\"\").append(this.color).append(\"\\\", \");\n\n /* Append a size only if the product has a Size */\n if (this.size.getClass() != NoSize.class) {\n sb.append(\"\\\"size\\\": \\\"\").append(this.size).append(\"\\\", \");\n }\n\n sb.append(\"\\\"price\\\": \").append(this.price).append(\", \");\n sb.append(\"\\\"currency\\\": \\\"\").append(this.currency).append(\"\\\"}, \");\n\n return sb.toString();\n }", "@Override\n public String toJson(Object object) {\n if (null == object) {\n return null;\n }\n return JSON.toJSONString(object, SerializerFeature.DisableCircularReferenceDetect);\n }", "public void serialize() {\n\t\t\n\t}", "@Override\n public String toString() {\n try {\n return new ObjectMapper().writeValueAsString(this);\n } catch (final JsonProcessingException ioe) {\n return ioe.getLocalizedMessage();\n }\n }", "public String toJson() {\n Gson gson = new Gson();\n TurretServer ta = cast(this);\n return gson.toJson(ta);\n }", "@Override\n\tpublic JSONObject toJSONObject() {\n\t\treturn null;\n\t}", "@Override\n\tpublic JSONObject toJSONObject() {\n\t\treturn null;\n\t}", "public String serialize() {\n switch (type) {\n case LIST:\n return serializeList();\n\n case OBJECT:\n return serializeMap();\n\n case UNKNOWN:\n return serializeUnknown();\n }\n return \"\";\n }", "public JSONObject toJSON() {\n\t\tJSONObject json = new JSONObject();\n\t\tjson.putOpt(ABSOLUTE_FILE_PATH, absoluteFilePath);\n\t\tjson.putOpt(RELATIVE_FILE_PATH, relativeFilePath);\n\t\tjson.putOpt(EVENT_TYPE, type);\n\t\tjson.putOpt(TIME, time);\n\t\treturn json;\n\t}", "protected JSONObject getJsonRepresentation() throws Exception {\n\n JSONObject jsonObj = new JSONObject();\n jsonObj.put(\"name\", getName());\n return jsonObj;\n }", "@Override\r\n\t\t\tpublic void serializar() {\n\r\n\t\t\t}", "public String toJson() {\n\n final StringBuilder jsonRepresentation = new StringBuilder();\n\n jsonRepresentation.append(\"[\");\n\n final Iterator<TrackingDataEntry> entriesIter = getEntries().iterator();\n while (entriesIter.hasNext()) {\n\n final TrackingDataEntry entry = entriesIter.next();\n\n serializeTrackingDataVariables(jsonRepresentation, entry.getVars());\n\n if (null != entry.getName()) {\n jsonRepresentation.append(\",\\\"name\\\":\\\"\").append(entry.getName()).append(\"\\\"\");\n }\n if (null != entry.getId()) {\n jsonRepresentation.append(\",\\\"id\\\":\\\"\").append(entry.getId()).append(\"\\\"\");\n }\n if (null != entry.getType()) {\n jsonRepresentation.append(\",\\\"type\\\":\\\"\").append(entry.getType()).append(\"\\\"\");\n }\n if (null != entry.getUrl()) {\n jsonRepresentation.append(\",\\\"url\\\":\\\"\").append(entry.getUrl()).append(\"\\\"\");\n }\n jsonRepresentation.append(\"}\");\n if (entriesIter.hasNext()) {\n jsonRepresentation.append(\",\");\n }\n }\n\n jsonRepresentation.append(\"]\");\n\n return jsonRepresentation.toString();\n }", "public JSONObject jsonSerialize() {\n JSONObject jsonObject = new JSONObject();\n\n // Serialize the UrlDevices\n JSONArray urlDevices = new JSONArray();\n for (UrlDevice urlDevice : mDeviceIdToUrlDeviceMap.values()) {\n urlDevices.put(urlDevice.jsonSerialize());\n }\n jsonObject.put(DEVICES_KEY, urlDevices);\n\n // Serialize the URL metadata\n JSONArray metadata = new JSONArray();\n for (PwsResult pwsResult : mBroadcastUrlToPwsResultMap.values()) {\n metadata.put(pwsResult.jsonSerialize());\n }\n jsonObject.put(METADATA_KEY, metadata);\n\n jsonObject.put(SCHEMA_VERSION_KEY, SCHEMA_VERSION);\n return jsonObject;\n }" ]
[ "0.78896964", "0.7889164", "0.7881641", "0.7881641", "0.7881641", "0.7881641", "0.7881641", "0.7881641", "0.7881641", "0.7881641", "0.7881641", "0.7881641", "0.78275806", "0.7724005", "0.76914984", "0.76226294", "0.7580174", "0.75682586", "0.75682586", "0.7562139", "0.7562139", "0.75503993", "0.73965037", "0.7395238", "0.73798805", "0.7351519", "0.73053026", "0.72988945", "0.7297936", "0.7266768", "0.71375036", "0.710898", "0.7076241", "0.70611167", "0.70483166", "0.70325166", "0.69976604", "0.6981729", "0.6981729", "0.6981729", "0.69810796", "0.6971644", "0.69517994", "0.69430506", "0.69035095", "0.68923366", "0.6892247", "0.6882351", "0.68821317", "0.68572074", "0.6833785", "0.68117017", "0.6810318", "0.6808869", "0.6806877", "0.67973423", "0.67927897", "0.67919606", "0.6755343", "0.672145", "0.6700311", "0.66878766", "0.66766095", "0.6624579", "0.66199815", "0.656939", "0.6545693", "0.6530874", "0.6523698", "0.65230924", "0.65061814", "0.64692163", "0.6448848", "0.6435221", "0.6432821", "0.64163935", "0.6412354", "0.64112425", "0.6403569", "0.6397604", "0.6397604", "0.639647", "0.6392031", "0.6392031", "0.63449293", "0.6325652", "0.6306536", "0.63008535", "0.6298387", "0.62818474", "0.6280309", "0.62753505", "0.62701225", "0.62504375", "0.62504375", "0.62478215", "0.6245023", "0.6235386", "0.6228088", "0.6224978", "0.62138003" ]
0.0
-1
Handle Generate QR code button tap given set preferences by user. Generates a QR code given the user data.
public void handleGenerateQrCodeButtonTap(boolean shareInsuranceInfoChecked) { if (!shareInsuranceInfoChecked) { removeInsuranceInformation(); } if (expiryDate != null) { user.setContactExpiryDate(expiryDate); } view.showProgressSpinner(); view.hidePreferencesContainer(); new Thread(new Runnable() { @Override public void run() { generateQrCode(); } }).start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createQrCode(View view) {\n String result = getResult();\n Bitmap qrBitmap = ScannableController.createQrBitmap(ScannableController\n .createUri(result, getIntent().getStringExtra(EXPERIMENT_ID),\n ((ExperimentType) getIntent().getSerializableExtra(EXPERIMENT_TYPE)).toString(),\n location != null ? Double.valueOf(location.getLatitude()).toString() : \"\",\n location != null ? Double.valueOf(location.getLongitude()).toString() : \"\"\n ));\n if (qrBitmap == null || result == null) {\n Toast.makeText(this, \"Trial result is invalid, cannot make QR code\", Toast.LENGTH_SHORT).show();\n return;\n }\n String path = MediaStore.Images.Media\n .insertImage(view.getContext().getContentResolver(), qrBitmap, \"Kotlout Experiment QR Code\", null);\n Uri uri = Uri.parse(path);\n Intent shareImageIntent = new Intent(Intent.ACTION_SEND);\n shareImageIntent.setType(\"image/jpeg\");\n shareImageIntent.putExtra(Intent.EXTRA_STREAM, uri);\n view.getContext().startActivity(Intent.createChooser(shareImageIntent, \"Share QR Code\"));\n }", "@ViewAnnotations.ViewOnClick(R.id.hunter_number_read_qr_button)\n protected void onReadQrCodeClicked(final View view) {\n final IntentIntegrator intentIntegrator = IntentIntegrator.forSupportFragment(this);\n intentIntegrator.setBarcodeImageEnabled(true);\n intentIntegrator.setOrientationLocked(false);\n intentIntegrator.initiateScan();\n }", "private void generateQRCode(String data) {\n com.google.zxing.Writer writer = new QRCodeWriter();\n String finaldata = Uri.encode(data, \"ISO-8859-1\");\n try {\n BitMatrix bm = writer.encode(finaldata, BarcodeFormat.QR_CODE, 350, 350);\n qrBitmap = Bitmap.createBitmap(350, 350, Bitmap.Config.ARGB_8888);\n for (int i = 0; i < 350; i++) {\n for (int j = 0; j < 350; j++) {\n qrBitmap.setPixel(i, j, bm.get(i, j) ? Color.BLACK : Color.WHITE);\n }\n }\n } catch (WriterException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n if (qrBitmap != null) {\n qrCodeImg.setImageBitmap(qrBitmap);\n\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n IntentResult result = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);\n if (result != null) {\n //if qrcode has nothing in it\n if (result.getContents() == null) {\n Toast.makeText(this, \"Result Not Found\", Toast.LENGTH_LONG).show();\n } else {\n //if qr contains data\n try {\n //converting the data to json\n JSONObject obj = new JSONObject(result.getContents());\n //setting values to textviews\n textViewName.setText(obj.getString(\"name\"));\n textViewAddress.setText(obj.getString(\"address\"));\n } catch (JSONException e) {\n e.printStackTrace();\n //if control comes here\n //that means the encoded format not matches\n //in this case you can display whatever data is available on the qrcode\n //to a toast\n Toast.makeText(this, result.getContents(), Toast.LENGTH_LONG).show();\n }\n }\n } else {\n super.onActivityResult(requestCode, resultCode, data);\n }\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent = new Intent(\n\t\t\t\t\t\t\"com.google.zxing.client.android.SCAN\");\n\t\t\t\tintent.putExtra(\"SCAN_MODE\", \"QR_CODE_MODE\");\n\t\t\t\tstartActivityForResult(intent, 0);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(getActivity().getApplicationContext(), ScanQRCodeActivity.class);\n\t\t\t\tstartActivityForResult(intent, REQUEST_CODE);\n\t\t\t}", "private void registerBarcode(View view) {\n if (getResult() != null) {\n Intent codeScannerIntent = new Intent(this, CodeScannerActivity.class);\n startActivityForResult(codeScannerIntent, CodeScannerActivity.SCAN_CODE_REQUEST);\n } else {\n Toast.makeText(this, \"Trial result is invalid, cannot register bar code\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onGenerateButtonClicked() {\n\n String result;\n try {\n int c = Integer.parseInt(view.getEndpointTextViewValue());\n result = model.generate(c);\n } catch (NumberFormatException e) {\n view.showToast(\"Wrong input!\");\n return;\n } catch (WrongParametersException e) {\n view.showToast(e.getMessage());\n return;\n }\n Intent intent = view.createNewIntent(SecondActivity.class);\n intent.putExtra(\"result\", result);\n view.startNewActivity(intent);\n }", "public void startQR(View view){\n\n try {\n Intent intent = new Intent(ACTION_SCAN);\n intent.putExtra(\"SCAN_MODE\", \"QR_CODE_MODE\");\n startActivityForResult(intent, 0);\n } catch (ActivityNotFoundException anfe) {\n showDialog(this, getResources().getString(R.string.qrreader_not_found), getResources().getString(R.string.would_you_like_to_download), getResources().getString(R.string.yes), getResources().getString(R.string.no)).show();\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n //if qrcode reader\n if(code == 1){\n IntentResult qrcode = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);\n if (qrcode != null) {\n if (qrcode.getContents() != null) {\n String cut = qrcode.getContents();\n int corte = cut.indexOf(\"=\") + 1;\n final String code = cut.substring(corte, corte + 44);\n Intent readQRcode = new Intent(activity, VerNFe.class);\n readQRcode.putExtra(\"code\", code);\n overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);\n startActivity(readQRcode);\n } else {\n Toast.makeText(activity, R.string.toast_cancel_read_qrcode, Toast.LENGTH_SHORT).show();\n }\n drawerLayout.closeDrawers();\n } else {\n super.onActivityResult(requestCode, resultCode, data);\n }\n }\n //if barcode reader\n else if (code == 2){\n IntentResult barcode = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);\n if (barcode != null) {\n if (barcode.getContents() != null) {\n String codigo_de_barras = barcode.getContents();\n Descontos d = new Descontos();\n d.pegaProdutoPorCodigoDeBarras(codigo_de_barras);\n } else {\n Toast.makeText(this, \"Leitura do código de barras cancelado\", Toast.LENGTH_SHORT).show();\n }\n } else {\n Toast.makeText(this, \"Erro ao ler código de barras do Produto\", Toast.LENGTH_LONG).show();\n }\n }\n\n }", "@Override\n public void onClick(View v) {\n qrScan.initiateScan();\n }", "private void takeAttendance() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n LayoutInflater inflater = getLayoutInflater();\n View view = inflater.inflate(R.layout.popup_take_attendance, null);\n builder.setView(view);\n\n imgvQR = findViewById(R.id.qrCodeImg);\n classPeriod = findViewById(R.id.unitPeriod);\n classDate = findViewById(R.id.classunitName);\n className = findViewById(R.id.classDate);\n\n hours_per_unit = getResources().getStringArray(R.array.unit_periods);\n classPeriod.setAdapter(new ArrayAdapter(this, android.R.layout.simple_spinner_item, hours_per_unit));\n\n builder.setPositiveButton(\"SEND\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n// generate unique qr code for the class and send to the email.\n\n String dataemails = getIntent().getStringExtra(\"emails\");\n\n String aname = className.getText().toString().trim();\n String bdate = classDate.getText().toString().trim();\n String cperiod = classPeriod.getSelectedItem().toString().trim();\n\n Students stud_student = new Students();\n stud_student.setStudent_class_name(aname);\n stud_student.setStudent_class_date(Date.valueOf(bdate));\n stud_student.setStudent_class_period(Time.valueOf(cperiod));\n\n if (aname.isEmpty() || bdate.isEmpty() || cperiod.isEmpty()) {\n Toast.makeText(ViewLecClass.this, \"fill empty fields\", Toast.LENGTH_SHORT).show();\n } else {\n\n /**\n * generate qr code per class selection with specific data\n * **/\n String datasent = \"Class : \" + aname + \", Date : \" + bdate + \", Period : \" + cperiod ;\n MultiFormatWriter multiFormatWriter = new MultiFormatWriter();\n try {\n Log.d(TAG, \"onClick: LOADING THE QR POINT REACHED\");\n BitMatrix bitMatrix = multiFormatWriter.encode(datasent, BarcodeFormat.QR_CODE,200,200);\n BarcodeEncoder barcodeEncoder = new BarcodeEncoder();\n Bitmap bitmap = barcodeEncoder.createBitmap(bitMatrix);\n imgvQR.setImageBitmap(bitmap);\n } catch (WriterException e) {\n e.printStackTrace();\n }\n\n /**\n * send email to the student emails..\n * obtain email names from the recycler adapter class\n *\n * **/\n// send email to the emails on recycler view. or in database for the class\n try {\n Log.d(TAG, \"onClick: EMAIL POINT REACHED\");\n Intent emailIntent = new Intent(Intent.ACTION_SEND_MULTIPLE);\n emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[] {dataemails});\n if (URI != null) {\n emailIntent.putExtra(Intent.EXTRA_STREAM, URI);\n }\n startActivity(Intent.createChooser(emailIntent, \"SENDING EMAIL.\"));\n\n } catch (Throwable t) {\n Toast.makeText(ViewLecClass.this, \"PROCESS FAILURE. RETRY!\", Toast.LENGTH_SHORT).show();\n }\n\n /**\n * save the data: date, unit data, indivual emails\n * **/\n// save all this data to db, date, , unitid, unit name, period hours, plus each individual email sent with it\n if (firebaseAuth.getCurrentUser() != null) {\n dateReference = FirebaseDatabase.getInstance().getReference();\n dateReference.child(\"LECTURERS\").child(firebaseAuth.getCurrentUser().getUid()).child(\"CLASSES\")\n .child(\"SENTEMAILS\").setValue(stud_student, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n if (databaseError == null) {\n Log.d(TAG, \"onComplete: DATA SAVING POINT\");\n Toast.makeText(ViewLecClass.this, \"DATA SAVED SUCCESSFULLY\", Toast.LENGTH_SHORT).show();\n finish();\n } else {\n Toast.makeText(ViewLecClass.this, \"failed\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n }\n\n }\n }).setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n// startActivity(new Intent(ViewLecClass.this, ViewLecClass.class));\n finish();\n }\n });\n }", "@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent intent) {\n\t\t/*\n\t\t * returning from ZXing\n\t\t */\n\t\tif (requestCode == QR_INTENT_CODE) {\n\t\t\tif (resultCode == RESULT_OK) {\n\t\t\t\tRequestActivity.onQRScanned(this, intent);\n\t\t\t}\n\t\t}\n\t}", "public void createfirstQRMessage() {\n\n dialog = new Dialog(getActivity());\n dialog.setContentView(R.layout.first_scan_message);\n Button yes_btn = dialog.findViewById(R.id.btnYes);\n Button no_btn = dialog.findViewById(R.id.btnNo);\n yes_btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n GeneralUtils.progressDialog(getActivity(), \"checking\");\n createProductTagApiCall();\n recent = true;\n\n }\n });\n no_btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n onNO();\n }\n });\n dialog.show();\n\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n IntentResult intentResult = IntentIntegrator.parseActivityResult(requestCode,resultCode,data);\n if (intentResult.getContents() != null) {\n String scannedText = intentResult.getContents();\n\n // Get product data associated with the UPC barcode\n Uri uri = api.getURL(scannedText);\n api.getData(uri, this::productBarcodeHandler);\n }\n else {\n Toast.makeText(getApplicationContext(),\"Nothing was scanned\", Toast.LENGTH_SHORT).show();\n }\n }", "public void onClick(View vw) {\n try {\n Bitmap bitmap = QRCodeHelper.encodeAsBitmap(mETWaybillId.getText().toString(), BarcodeFormat.QR_CODE, 300, 300);\n if (bitmap != null) {\n mIVQRCode.setImageBitmap(bitmap);\n } else {\n mTVDescription.setText(\"Bitmap null\");\n }\n } catch (Exception e) {\n Log.e(\"MainActivity\", \"Exe \", e);\n }\n }", "public void onClick(View view) {\n Intent intentScan = new Intent(\"com.google.zxing.client.android.SCAN\");\n intentScan.addCategory(Intent.CATEGORY_DEFAULT);\n intentScan.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n intentScan.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);\n try {\n startActivityForResult(intentScan, SCAN_QR_REQUEST_CODE);\n } catch (ActivityNotFoundException e) {\n Toast.makeText(getActivity(), R.string.no_qr_scanner_installed,\n Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onClick(View v) {\n temp_holder = temp.getText().toString().trim();\n temperature = Float.parseFloat(temp_holder.trim());\n //if the Data from qr code and temp is empty\n if (temp_holder.length() <= 1 || temp_holder.length() >= 5){\n Toast.makeText(QrScanner.this, \"Invalid Temperature Please try again...\", Toast.LENGTH_SHORT).show();\n }else if (temperature >= 37.6){\n Toast.makeText(QrScanner.this, \"In compliance with the existing Protocol your temperature is too high...\", Toast.LENGTH_LONG).show();\n }else if (temperature <= 35){\n Toast.makeText(QrScanner.this, \"Your Temperature is LOW...\", Toast.LENGTH_SHORT).show();\n }else if (temp_holder.equals(\"\") && Data.equals(\"\")){\n\n } else{\n temp_holder = temp.getText().toString().trim();\n //values will pass to the function\n SharedPreferences sharedPref = getSharedPreferences(\"MyPref\", MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"Username\", Username_home1);\n editor.putString(\"Password\", Password_home1);\n editor.putString(\"Data\", Data);\n editor.putString(\"Temperature\", temp_holder);\n editor.apply();\n\n UserRegisterFunction(Data);\n Intent intent = new Intent(getApplicationContext(), Confirmation_QRCode.class);\n startActivity(intent);\n }\n\n }", "@Override\n public void onClick(View view) {\n\n controlVisBAR();\n barcodeView.decodeContinuous(callback);\n// barcodeView.resume();\n\n barcodeView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n controlVisCAM();\n }\n });\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tiv_showCode.setImageBitmap(GenerateCodeActivity.getInstance().createBitmap());\n\t\t}", "@Override\n public void onClick(View view) {\n clearItemData();\n set_view_for(1);\n Intent intent;\n SharedPreferences sharedPreferences =\n PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n String setting_barcode = sharedPreferences.getString(\"setting_barcode\", \"1\");\n session.setScanfor(\"3\"); //for item\n\n if (setting_barcode.equals(\"1\")) {\n intent = new Intent(getBaseContext(), ScanActivity.class);\n } else if (setting_barcode.equals(\"2\")) {\n intent = new Intent(getBaseContext(), ScanMainActivity.class);\n } else {\n intent = new Intent(getBaseContext(), ZxingScan.class);\n }\n\n startActivity(intent);\n\n\n }", "public void GoToScanbarcode(View view) {\n\n Intent intent = new Intent(HomeActivity.this, OpenScanner.class);\n intent.putExtra(\"Purpose\", mPurpose);\n Local.Set(getApplicationContext(), \"Purpose\", mPurpose);\n finish();\n\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n clearItemData();\n set_view_for(1);\n Intent intent;\n SharedPreferences sharedPreferences =\n PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n String setting_barcode = sharedPreferences.getString(\"setting_barcode\", \"1\");\n session.setScanfor(\"1\"); //for item\n\n if (setting_barcode.equals(\"1\")) {\n intent = new Intent(getBaseContext(), ScanActivity.class);\n } else if (setting_barcode.equals(\"2\")) {\n intent = new Intent(getBaseContext(), ScanMainActivity.class);\n } else {\n intent = new Intent(getBaseContext(), ZxingScan.class);\n }\n\n startActivity(intent);\n\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if(resultCode == RESULT_OK){\n if(requestCode == REQUEST_CODE && data.getExtras().get(\"data\")!=null){\n Bitmap bp = (Bitmap) data.getExtras().get(\"data\");\n prescription.setVisibility(View.VISIBLE);\n userNameQO.setVisibility(View.GONE);\n phoneNo.setVisibility(View.GONE);\n captureButton.setText(getResources().getString(R.string.send_prescription));\n prescription.setImageBitmap(bp);\n }\n }\n }", "@Override\n public void onClick(View v) {\n IntentIntegrator integ = IntentIntegrator.forSupportFragment(search_Fragement.this);\n integ.setCaptureActivity(CaptureAct.class);\n integ.setOrientationLocked(false);\n integ.setDesiredBarcodeFormats(IntentIntegrator.ALL_CODE_TYPES);\n integ.setPrompt(\"scanning code..\");\n integ.initiateScan();\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v= inflater.inflate(R.layout.fragment_profile__generate_qr, container, false);\n\n\n generateButton=(Button)v.findViewById(R.id.generatebuttonID);\n saveButton=(Button)v.findViewById(R.id.saveQRButtonID);\n uploadButton=(Button)v.findViewById(R.id.uploadQRButtonID);\n\n qrImage=(ImageView)v.findViewById(R.id.qrID);\n firebaseAuth=FirebaseAuth.getInstance();\n firebaseUser=firebaseAuth.getCurrentUser();\n\n final String encodingtext=firebaseUser.getUid();\n\n key= (EditText)v.findViewById(R.id.keyEditText);\n reference = FirebaseDatabase.getInstance().getReference().child(firebaseUser.getUid());\n storageReference= FirebaseStorage.getInstance().getReference();\n\n\n\n generateButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n reference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n\n String keyInDatabase = dataSnapshot.child(\"Key\").getValue().toString().trim();\n String keyEntered=key.getText().toString().trim();\n\n if ((Boolean) keyInDatabase.equals(keyEntered)) {\n //code to generate QR code\n\n MultiFormatWriter writer=new MultiFormatWriter();\n try\n {\n BitMatrix bitMatrix=writer.encode(encodingtext, BarcodeFormat.QR_CODE,300,300);\n BarcodeEncoder encoder=new BarcodeEncoder();\n b=encoder.createBitmap(bitMatrix);\n qrImage.setImageBitmap(b);\n }\n catch (WriterException e)\n {\n e.printStackTrace();\n\n }\n\n } else {\n Toast.makeText(getActivity(), \"Failed! Key is incorrect\", Toast.LENGTH_SHORT).show();\n }\n\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }\n });\n\n\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n generateButton.setClickable(false);\n\n }\n });\n\n\n\n uploadButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n if(b!=null)\n {\n FirebaseUser user=firebaseAuth.getCurrentUser();\n final ProgressDialog progressDialog=new ProgressDialog(getActivity());\n progressDialog.setTitle(\"Uploading...\");\n progressDialog.show();\n String UID=user.getUid();\n\n StorageReference QRRef = storageReference.child(\"QRcodes/\"+UID+\".jpg\");\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n b.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] data = baos.toByteArray();\n\n UploadTask uploadTask=QRRef.putBytes(data);\n\n uploadTask.addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(getActivity(),\"Upload Successfull\",Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n // Handle unsuccessful uploads\n progressDialog.dismiss();\n Toast.makeText(getActivity(),\"Upload failed \"+exception.getMessage(),Toast.LENGTH_SHORT).show();\n\n // ...\n }\n\n\n })\n .addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n double progress=(100.0*taskSnapshot.getBytesTransferred())/taskSnapshot.getTotalByteCount();\n progressDialog.setMessage(((int)progress)+\"% uploaded...\");\n }\n })\n\n\n ;\n }\n\n\n\n }\n });\n\n\n\n return v;\n }", "private Bitmap generateQR() {\n //save information of reservation into string\n StringBuilder infoB = new StringBuilder(film.getTitle() + \" \" + time + \"\\n Places: \");\n for (int i : listPlaces) {\n infoB = infoB.append(i + 1);\n infoB = infoB.append(\", \");\n }\n //delete last comma\n infoB.deleteCharAt(infoB.length() - 2);\n String info = infoB.toString();\n System.out.println(info);\n\n //generate bitmap with QR generated\n Bitmap bitmap = null;\n MultiFormatWriter multiFormatWriter = new MultiFormatWriter();\n try {\n BitMatrix bitMatrix = multiFormatWriter.encode(info, BarcodeFormat.QR_CODE, 200, 200);\n BarcodeEncoder barcodeEncoder = new BarcodeEncoder();\n bitmap = barcodeEncoder.createBitmap(bitMatrix);\n } catch (WriterException e) {\n e.printStackTrace();\n }\n\n return bitmap;\n }", "@Override\n public void handleResult(Result rawResult) {\n\n Toast.makeText(this,rawResult.getText(),Toast.LENGTH_LONG).show();\n// Toast.makeText(this,rawResult.getBarcodeFormat().toString(),Toast.LENGTH_LONG).show();\n\n\n if (rawResult.getText().equals(\"admin\")) {\n\n Intent intent = new Intent(ScannerActivity.this, ExamPage.class);\n startActivity(intent);\n finish();\n\n\n } else {\n\n Toast.makeText(this,\"Wrong QR Code\",Toast.LENGTH_LONG).show();\n Intent intent = new Intent(ScannerActivity.this, ScannerActivity.class);\n startActivity(intent);\n finish();\n\n\n }\n\n\n\n SharedPreferences sp = getSharedPreferences(\"PREF_NAME\", Context.MODE_PRIVATE);\n String qrText = sp.getString(\"QR_Code\", String.valueOf(-1));\n Toast.makeText(this,qrText,Toast.LENGTH_LONG).show();\n\n\n Log.v(\"Scan\", rawResult.getText()); // Prints scan results\n Log.v(\"Scan\", rawResult.getBarcodeFormat().toString()); // Prints the scan format (qrcode, pdf417 etc.)\n }", "private void createAlert() {\n ImageView image = new ImageView(this);\n image.setImageResource(zunder.ebs.zunderapp.R.drawable.qr);\n\n myWallet = new MyWallet();\n setPrivateKey(myWallet.searchWallet());\n\n createQR = new CreateQR(700, 700);\n try {\n KeyPair pair = KeyPair.fromSecretSeed(getPrivateKey());\n setPublicKey(pair.getAccountId());\n try {\n Bitmap bitmap = createQR.encodeAsBitmap(getPublicKey());\n image.setImageBitmap(bitmap);\n } catch (WriterException e) {\n e.printStackTrace();\n }\n }catch (Exception e){\n e.getMessage();\n }\n\n\n\n AlertDialog.Builder builder =\n new AlertDialog.Builder(this).\n setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n }).\n setView(image);\n builder.create().show();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_generate_qrcode, container, false);\n\n genrateQrImage = view.findViewById(R.id.genrateQrCodeImage);\n btnremove = view.findViewById(R.id.removeShared);\n btnQrGenetate = view.findViewById(R.id.btnQrGenrate);\n tvProductTag = view.findViewById(R.id.tvProductTag);\n bottomNavigationView = (BottomNavigationView) view.findViewById(R.id.producerBottomBar);\n bottomNavigationView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);\n bottomNavigationView.getMenu().getItem(2).setChecked(true);\n Log.d(\"zma token\", GeneralUtils.getAPIToken(getActivity()));\n btnQrPrint = view.findViewById(R.id.btnPrintQrCode);\n btnQrScan = view.findViewById(R.id.btnQrScan);\n rvActionList = view.findViewById(R.id.rvActionList);\n\n apiServices = APIClient.getApiClient(getActivity()).create(APIServices.class);\n\n strToken = GeneralUtils.getAPIToken(getActivity());\n strHashCode = GeneralUtils.getHashCode(getActivity());\n if (strHashCode.equals(\"\")) {\n strHashCode = \"0\";\n } else {\n btnremove.setVisibility(View.VISIBLE);\n strHashCode = GeneralUtils.getHashCode(getActivity());\n }\n\n strProducerId = GeneralUtils.getProducerID(getActivity());\n boolean isgps = SmartLocation.with(getActivity()).location().state().isGpsAvailable();\n if (!isgps) {\n displayLocationSettingsRequest(getActivity());\n }\n\n Dexter.withActivity(getActivity())\n .withPermissions(\n Manifest.permission.INTERNET,\n Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION\n ).withListener(new MultiplePermissionsListener() {\n @Override\n public void onPermissionsChecked(MultiplePermissionsReport report) {\n\n }\n\n @Override\n public void onPermissionRationaleShouldBeShown(List<PermissionRequest> permissions, PermissionToken token) {\n\n }\n\n }).check();\n\n if (Build.VERSION.SDK_INT >= 24) {\n try {\n Method m = StrictMode.class.getMethod(\"disableDeathOnFileUriExposure\");\n m.invoke(null);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n startLocationListener();\n apiSetup();\n\n mFusedLocationClient = LocationServices.getFusedLocationProviderClient(getActivity());\n buildGoogleApiClient();\n createLocationRequest();\n Loc_Update();\n //create new product\n btnQrGenetate.setOnClickListener(new View.OnClickListener() {\n @RequiresApi(api = Build.VERSION_CODES.KITKAT)\n @Override\n public void onClick(View view) {\n\n getQrAction();\n\n //Generate QR Code at first\n if (qrActions.size() <= 0 || stringBuilder == null) {\n final AlertDialog alertDialog = new AlertDialog.Builder(getActivity())\n .setTitle(getString(R.string.select_actions_msg))\n .setCancelable(false)\n .setPositiveButton(\"OK\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(final DialogInterface dialog,\n final int which) {\n\n\n }\n })\n .create();\n alertDialog.show();\n } else {\n\n Log.d(\"STRHAHCODE: \", strHashCode);\n\n if(!strHashCode.equals(\"0\")) {\n\n GeneralUtils.progressDialog(getActivity(), \"checking\");\n createProductTagApiCall();\n recent = true;\n } else {\n createfirstQRMessage();\n }\n }\n\n }\n\n\n });\n\n\n btnQrScan.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n GeneralUtils.connectFragmentWithBackStack(getActivity(), new QRScaningFragment());\n }\n });\n btnremove.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n deleteSharedprefQR();\n\n\n }\n });\n btnQrPrint.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // databaseHelper.clearQrActionTable();\n qrActions.clear();\n\n if (recent == false) {\n new SweetAlertDialog(getActivity(), SweetAlertDialog.ERROR_TYPE)\n .setTitleText(\"Oops...\")\n .setContentText(getString(R.string.generate_qr_message))\n .show();\n }\n else {\n\n Intent intent = new Intent(getActivity(), PrintImageActivity.class);\n intent.putExtra(\"filepath\", Environment.getExternalStorageDirectory()\n + \"/FoodChain/\"\n + \"/Files/QRCodeImage.png\");\n startActivity(intent);\n }\n }\n });\n\n tvProductTag.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n GeneralUtils.connectFragment(getActivity(), new ProducerFragment());\n }\n });\n\n\n return view;\n }", "public String generate(String input) {\n\t\treturn generate(input, new QRCodeOptions());\n\t}", "public String generate(String user_id) {\n\t\t\n\t\tbyte[] buffer = new byte[5 + 5 * 5];\n\t\tnew Random().nextBytes(buffer);\n\t\tBase32 codec = new Base32();\n\t\tbyte[] secretKey = Arrays.copyOf(buffer, 10);\n\t\tbyte[] bEncodedKey = codec.encode(secretKey);\n\n\t\treturn new String(bEncodedKey);\n//\t\tString url = getQRBarcodeURL(user_id, HOST, encodedKey);\n/*\t\t\n \t\ttry {\n\t\t\tconn = dataSrc.getConnection();\n\t\t\tpreStmt = conn.prepareStatement(UpdateOTPKeyQuery);\n\t\t\tpreStmt.setString(1, encodedKey);\n\t\t\tpreStmt.setString(2, user_id);\n\t\t\tret = preStmt.executeUpdate();\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif(preStmt != null) preStmt.close();\n\t\t\t\tif(conn != null) conn.close();\n\t\t\t}catch(Exception e2) {\n\t\t\t\te2.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t// Google OTP 앱에 userName@hostName 으로 저장됨\n\t\t// key를 입력하거나 생성된 QR코드를 바코드 스캔하여 등록\n\t\tmap.put(\"encodedKey\", encodedKey);\n\t\tmap.put(\"url\", url);\n\t\t*/\n//\t\treturn map;\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n goToNextScreen(barcode.getRawValue());\n dialog.dismiss();\n }", "private View.OnClickListener onScanBarcodeButtonClick() {\n return new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n try {\n final Intent intent = new Intent(OnYard.ZXING_SCAN_ACTION);\n intent.putExtra(\"SCAN_MODE\", \"ONE_D_MODE\");\n getParentFragment().startActivityForResult(intent, SCAN_BARCODE_REQUEST_CODE);\n }\n catch (final Exception e) {\n showScanErrorDialog();\n logError(e);\n }\n }\n };\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (PrintActivity.pl.getState() != PrinterClass.STATE_CONNECTED) {\r\n\t\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this,\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this.getResources().getString(\r\n\t\t\t\t\t\t\t\t\tR.string.str_unconnected), 2000).show();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tString message = et_input.getText().toString();\r\n\r\n\t\t\t\tif (message.getBytes().length > message.length()) {\r\n\t\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this,\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this.getResources().getString(\r\n\t\t\t\t\t\t\t\t\tR.string.str_cannotcreatebar), 2000).show();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (message.length() > 0) {\r\n\r\n\t\t\t\t\tbtMap = BarcodeCreater.creatBarcode(PrintBarCodeActivity.this,\r\n\t\t\t\t\t\t\tmessage, PrintService.imageWidth*8, 100, true, 1);\r\n\t\t\t\t\tiv.setImageBitmap(btMap);\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "@Override\n public void run() {\n String scanNumText = result.getText();\n Toast.makeText(ItemScan.this, scanNumText, Toast.LENGTH_SHORT).show();\n Intent intent = getIntent();\n intent.putExtra(\"Barcode\", scanNumText);\n setResult(Activity.RESULT_OK, getIntent());\n finish();\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\n\t\tif (requestCode == 1) { // startActivityForResult回傳值\n\t\t\tif (resultCode == RESULT_OK) {\n\t\t\t\tString contents = data.getStringExtra(\"SCAN_RESULT\"); // 取得QR\n\t\t\t\t// Code內容\n\t\t\t\t// 以下開始處理資料\n\t\t\t\tgetPlaceUrl(contents.split(\" \")[0], contents.split(\" \")[1]);\n\t\t\t} else if (resultCode == RESULT_CANCELED) {\n\t\t\t\t// Handle cancel\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onScanned(Barcode barcode) {\n super.onScanned(barcode);\n\n //on Scan completed close the scanner\n if (isScanning.get()) {\n getChildFragmentManager()\n .beginTransaction()\n .remove(getChildFragmentManager().findFragmentById(R.id.scannerFragment))\n .commit();\n }\n\n isScanning.set(false);\n\n /*\n * this works when if user scan the exist\n * code without scanning the enter code\n */\n boolean waitingForEnterCode = !getUpdatedPendingEntryEvent();\n if (barcode.rawValue.equals(EXIT) && waitingForEnterCode) {\n String message = \"Its look like that you haven't scan the Enter Code \" + new String(Character.toChars(0x1F622));\n showAlertDialog(message);\n return;\n }\n\n /*\n * this works when user scan the enter code again\n * without scanning the exit code\n */\n boolean waitingForExitCode = getUpdatedPendingEntryEvent();\n if (barcode.rawValue.equals(ENTER) && waitingForExitCode) {\n String message = \"you have already scan the Enter code First scan a Exist \" + new String(Character.toChars(0x1F622));\n showAlertDialog(message);\n return;\n }\n\n if (barcode.rawValue.equals(Constants.IQRCode.ENTER)) {\n viewmodel.updateScannedValueWhenEnter();\n updatePendingEntryEvent(true);\n } else if (barcode.rawValue.equals(EXIT)) {\n viewmodel.updateScannedValueWhenExist();\n updatePendingEntryEvent(false);\n } else {\n Toast.makeText(getActivity(), \"no action specified\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent intent) {\n\n if (resultCode == RESULT_CANCELED) {\n Toast.makeText(this, \"Cancelled\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n Map<String, Object> data = null;\n if (requestCode == QR_CODE_SCAN_REQUEST_CODE) {\n IntentResult scanResult = IntentIntegrator.parseActivityResult(\n requestCode, resultCode, intent);\n if (scanResult != null && scanResult.getContents() != null) {\n Yaml yaml = new Yaml();\n String scanned_data = scanResult.getContents().toString();\n data = (Map<String, Object>) yaml.load(scanned_data);\n }\n }\n else if (requestCode == NFC_TAG_SCAN_REQUEST_CODE && resultCode == RESULT_OK) {\n if (intent.hasExtra(\"tag_data\")) {\n data = (Map<String, Object>) intent.getExtras().getSerializable(\"tag_data\");\n }\n }\n else {\n Log.w(\"Remocon\", \"Unknown activity request code: \" + requestCode);\n return;\n }\n\n if (data == null) {\n Toast.makeText(this, \"Scan failed\", Toast.LENGTH_SHORT).show();\n }\n else {\n try {\n Log.d(\"Remocon\", \"master chooser OBJECT: \" + data.toString());\n addMaster(new MasterId(data), false);\n } catch (Exception e) {\n Toast.makeText(this, \"invalid rocon master description: \" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tif (mProImage != null) {\n\t\t\t\t\tMediaStore.Images.Media.insertImage(getContentResolver(),\n\t\t\t\t\t\t\tmProImage, \"QRImage\", \"QRImage\");\n\t\t\t\t\tToast.makeText(ImageShareActivity.this, \"生成成功,请到相册查看\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t} else {\n\t\t\t\t\tToast.makeText(ImageShareActivity.this, \"图片生成错误,请返回重试\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}", "@Override\n public void handleResult(com.google.zxing.Result rawResult) {\n if (rawResult.getText().length() < 4) {\n mScannerView.resumeCameraPreview(SimpleScanner.this);\n Toast.makeText(this, \"Wrong QR Code\", Toast.LENGTH_SHORT).show();\n } else {\n Result = rawResult.getText().substring(0, 4);\n MachineID = rawResult.getText().substring(Result.length());\n if (Result.equals(Verification)) {\n Intent i = new Intent(SimpleScanner.this, DetailBreakdownPage2.class);\n String currentResponseDateFinish = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\", Locale.getDefault()).format(new Date());\n i.putExtra(\"MachineID\", MachineID);\n i.putExtra(\"ResponseDateFinish\", currentResponseDateFinish);\n i.putExtra(\"Line\", Line);\n i.putExtra(\"Station\", Station);\n i.putExtra(\"PIC\", PIC);\n startActivity(i);\n } else {\n mScannerView.resumeCameraPreview(SimpleScanner.this);\n Toast.makeText(this, \"Station tidak sesuai\", Toast.LENGTH_SHORT).show();\n }\n }\n }", "public void handleBarcodeScanned(ScenarioController scenarioController, String barcode);", "public void scanQrCode() {\r\n cameraView.getHolder().addCallback(new SurfaceHolder.Callback() {\r\n @Override\r\n public void surfaceCreated(SurfaceHolder holder) {\r\n try {\r\n if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CAMERA) != 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 cameraSource.start(cameraView.getHolder());\r\n } catch (IOException ie) {\r\n Log.e(\"CAMERA SOURCE\", ie.getMessage());\r\n }\r\n }\r\n\r\n @Override\r\n public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {\r\n //cameraSource.release();\r\n }\r\n\r\n @Override\r\n public void surfaceDestroyed(SurfaceHolder holder) {\r\n cameraSource.stop();\r\n }\r\n });\r\n\r\n cameraView.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n cameraFocus(cameraSource, Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);\r\n }\r\n });\r\n\r\n barcodeDetector.setProcessor(new Detector.Processor<Barcode>() {\r\n @Override\r\n public void release() {\r\n\r\n }\r\n\r\n @Override\r\n public void receiveDetections(Detector.Detections<Barcode> detections) {\r\n final SparseArray<Barcode> barcodes = detections.getDetectedItems();\r\n\r\n if (barcodes.size() != 0) {\r\n barcodeInfo.post(new Runnable() {\r\n public void run() {\r\n try {\r\n if (Config.getInstance().isInternetAvailable(BarcodeScanner.this)) {\r\n\r\n Config.getInstance().logger(BarcodeScanner.this,Config.getInstance().logger_ATTENDANCE_FILL_ATTENDANCE);\r\n String contents = barcodes.valueAt(0).displayValue;\r\n Toast.makeText(BarcodeScanner.this, contents, Toast.LENGTH_SHORT).show();\r\n tv_detectedValue.setText(contents);\r\n\r\n } else {\r\n Config.getInstance().GlobalInternetDialog(BarcodeScanner.this);\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }", "@Override\r\n\tprotected Resultful getQRCodeURL() {\n\t\tString result = HttpRequest.post(domainName).body(getParamStr()).execute().body();\r\n\t\tlogger.info(\"【银联下单请求参数:{}】\",getParamStr());\r\n\t\tlogger.info(\"【银联商务下单响应:{}】:\",result);\r\n\t\tif (!StringUtils.isEmpty(result)){\r\n\t\t\tJSONObject ob = JSONObject.parseObject(result);\r\n\t\t\tif (\"SUCCESS\".equals(ob.getString(\"errCode\")))\r\n\t\t\t\treturn Resultful.qrCodeURL(ob.getString(\"billQRCode\"), billNo,String.format(\"%.2f\", Double.valueOf(totalAmount)));\t\r\n\t\t\telse\r\n\t\t\t\treturn Resultful.error(ob.getString(\"errMsg\"));\r\n\t\t}\r\n\t\treturn Resultful.error(\"下单失败\");\r\n\t}", "public void scanQR(View v) {\n try {\n //start the scanning activity from the com.google.zxing.client.android.SCAN intent\n Intent intent = new Intent(ACTION_SCAN);\n intent.putExtra(\"SCAN_MODE\", \"QR_CODE_MODE\");\n startActivityForResult(intent, 0);\n } catch (ActivityNotFoundException anfe) {\n //on catch, show the download dialog\n showDialog(this, \"No Scanner Found\", \"Download a scanner code activity?\", \"Yes\", \"No\").show();\n }\n }", "public void continueOne(View view){\n EditText firstName= (EditText) findViewById(R.id.firstName);\n String firstNameString = firstName.getText().toString();\n EditText lastName= (EditText) findViewById(R.id.lastName);\n String lastNameString= lastName.getText().toString();\n EditText studentID= (EditText) findViewById(R.id.studentId);\n String studentIDString= studentID.getText().toString();\n\n /**Toasts are the things that are like mini notifications that you'll see at the bottom of the screen.*/\n Context context = getApplicationContext();\n CharSequence text = \"Let's do this, \" + firstNameString + \"!\";\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n /**The following is an intent to start the next activity (mainCodeOne), and carry the key user data with it. MainActivityOne*/\n Intent intentOne = new Intent(this, AndroidBarcodeActivityOne.class);\n intentOne.putExtra(\"firstNameString\", firstNameString);\n intentOne.putExtra(\"lastNameString\", lastNameString);\n intentOne.putExtra(\"studentIDString\", studentIDString);\n startActivity(intentOne);\n\n\n }", "public void button_proband_ok(View view){\n String codePart1 = getEditText(R.id.pc_1);\n String codePart2 = getEditText(R.id.pc_2);\n String codePart3 = getEditText(R.id.pc_3);\n String codePart4 = getEditText(R.id.pc_4);\n String codePart5 = getEditText(R.id.pc_5);\n // ToDo: check if all are actually characters\n // (and not numbers/other symbols)\n _control.newUser( codePart1+codePart2+codePart3+codePart4+codePart5 );\n setContentView(R.layout.set_time);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tDirenisMain.date.setMinutes(DirenisMain.date.getMinutes() + 60);\n\t\t\t\tint cevapno = 0;\n\t\t\t\tIntent intent = new Intent(Generate.this, Answer.class);\n\t\t\t\tintent.putExtra(\"cevapNo\", cevapno);\n\t\t\t\tintent.putExtra(\"soruNo\", soruRandom);\n\t\t\t\t// intent.putExtra(\"random\", a);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "public void onClick(View v) {\n onScanBarcodeClick();\n }", "public void onActivityResult(int requestCode, int resultCode, Intent intent) {\n if (requestCode == 0) {\n if (resultCode == RESULT_OK) {\n Intent scanResult = new Intent(getBaseContext(), OutdoorYouHere.class);\n String contents = intent.getStringExtra(\"SCAN_RESULT\");\n //scanResult.putExtra(\"FLOOR_NUMBER\", floorNumber);\n //scanResult.putExtra(\"ROOM_NUMBER\", roomNumber);\n scanResult.putExtra(\"QR_SCAN\", contents);\n startActivity(scanResult);\n\n } else if (resultCode == RESULT_CANCELED) {\n // Handle cancel\n }\n }\n }", "public void onClickBtSkanuj(View v) {\n activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n IntentIntegrator integrator = new IntentIntegrator(activity);\n integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE);\n integrator.setPrompt(\"Scan\");\n integrator.setCameraId(0);\n integrator.setBeepEnabled(true);\n integrator.setBarcodeImageEnabled(false);\n\n integrator.setOrientationLocked(false);\n integrator.initiateScan();\n }", "@Override\n\t\tpublic void onClick( View v ) {\n\t\t\tIntent intent = new Intent( GetSellingItem.this, ZBarScannerActivity.class );\n\t\t\t\n\t\t\t// Specify ZBar to only scan for QR Codes (not barcodes or others).\n\t\t\tintent.putExtra( ZBarConstants.SCAN_MODES, new int[]{Symbol.QRCODE} );\n\t\t\t\n\t\t\t// Makes sure result of QR scan is sent to onActivityResult() later.\n\t\t\tstartActivityForResult( intent, ZBAR_REQUEST_ADD_ITEM ); \n\t\t}", "@Override\n\tpublic void onScanViewButtonClick() {\n\t\t\n\t}", "@Override\n public void onClick(View view) {\n if (view.getId() == R.id.btScan) {\n new ScanTask(ScanActivity.this, callback).execute();\n } else if (view.getId() == R.id.btScanEnd) {\n onBackPressed();\n }\n }", "@Override\r\n\tpublic void onClick(View view) {\n\t\tswitch (view.getId()) {\r\n\t\tcase R.id.vc_shuaixi:\r\n\t\t\tvc_image.setImageBitmap(Code.getInstance().getBitmap());\r\n\t\t\tgetCode = Code.getInstance().getCode();\r\n\t\t\tbreak;\t\t\r\n\t\t}\r\n\t}", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\t\n\t // Make sure the request was successful\n\t if (resultCode == RESULT_OK) {\n\t Bundle resultBundle = data.getExtras();\n\t String decodedData = resultBundle.getString(\"DATA_RESULT\");\n\t String scanAction = resultBundle.getString(\"SCAN_ACTION\");\n\t\t \n\t\t if(scanAction != null && scanAction.equalsIgnoreCase(SCAN_TYPE)){\n\t\t\t // With the decoded data use session.get entity etc... then call server to get entity info\n\t\t\t try{\n\t\t\t\t processData(decodedData);\n\t\t\t }catch(Exception e){\n\t\t\t\t Toast.makeText(this, \"Unknown barcode format: please scan a valid barcode\", Toast.LENGTH_LONG).show();\n\t\t\t\t launchScanner(SCAN_TYPE);\n\t\t\t }\n\t\t\t \n\t\t }else{\n\t\t\t Toast.makeText(this, \"NO SCANNING ACTION\", Toast.LENGTH_LONG).show();\n\t\t\t launchScanner(SCAN_TYPE);\n\t\t }\n\t\t \n\t }else{\n\t\t finish();\t\t \n\t }\t \n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n String dataemails = getIntent().getStringExtra(\"emails\");\n\n String aname = className.getText().toString().trim();\n String bdate = classDate.getText().toString().trim();\n String cperiod = classPeriod.getSelectedItem().toString().trim();\n\n Students stud_student = new Students();\n stud_student.setStudent_class_name(aname);\n stud_student.setStudent_class_date(Date.valueOf(bdate));\n stud_student.setStudent_class_period(Time.valueOf(cperiod));\n\n if (aname.isEmpty() || bdate.isEmpty() || cperiod.isEmpty()) {\n Toast.makeText(ViewLecClass.this, \"fill empty fields\", Toast.LENGTH_SHORT).show();\n } else {\n\n /**\n * generate qr code per class selection with specific data\n * **/\n String datasent = \"Class : \" + aname + \", Date : \" + bdate + \", Period : \" + cperiod ;\n MultiFormatWriter multiFormatWriter = new MultiFormatWriter();\n try {\n Log.d(TAG, \"onClick: LOADING THE QR POINT REACHED\");\n BitMatrix bitMatrix = multiFormatWriter.encode(datasent, BarcodeFormat.QR_CODE,200,200);\n BarcodeEncoder barcodeEncoder = new BarcodeEncoder();\n Bitmap bitmap = barcodeEncoder.createBitmap(bitMatrix);\n imgvQR.setImageBitmap(bitmap);\n } catch (WriterException e) {\n e.printStackTrace();\n }\n\n /**\n * send email to the student emails..\n * obtain email names from the recycler adapter class\n *\n * **/\n// send email to the emails on recycler view. or in database for the class\n try {\n Log.d(TAG, \"onClick: EMAIL POINT REACHED\");\n Intent emailIntent = new Intent(Intent.ACTION_SEND_MULTIPLE);\n emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[] {dataemails});\n if (URI != null) {\n emailIntent.putExtra(Intent.EXTRA_STREAM, URI);\n }\n startActivity(Intent.createChooser(emailIntent, \"SENDING EMAIL.\"));\n\n } catch (Throwable t) {\n Toast.makeText(ViewLecClass.this, \"PROCESS FAILURE. RETRY!\", Toast.LENGTH_SHORT).show();\n }\n\n /**\n * save the data: date, unit data, indivual emails\n * **/\n// save all this data to db, date, , unitid, unit name, period hours, plus each individual email sent with it\n if (firebaseAuth.getCurrentUser() != null) {\n dateReference = FirebaseDatabase.getInstance().getReference();\n dateReference.child(\"LECTURERS\").child(firebaseAuth.getCurrentUser().getUid()).child(\"CLASSES\")\n .child(\"SENTEMAILS\").setValue(stud_student, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n if (databaseError == null) {\n Log.d(TAG, \"onComplete: DATA SAVING POINT\");\n Toast.makeText(ViewLecClass.this, \"DATA SAVED SUCCESSFULLY\", Toast.LENGTH_SHORT).show();\n finish();\n } else {\n Toast.makeText(ViewLecClass.this, \"failed\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n }\n\n }", "@Override\n\tpublic void onYesButtonForTwoButtonDialogClicked(int caseWhichLaunchedFragment) {\n\t\tstartZXingScannerActivity();\n\n\t}", "@Override\r\n\tpublic void onScanViewButtonClick() {\n\r\n\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t realCode = GenerateCodeActivity.getInstance().getCode();\n\t\t\t\t\t\t\tString phoneCode = et_phoneCode.getText().toString();\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\tif(phoneCode.equals(realCode))\n\t\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tIntent intent=new Intent(pre_registerActivity.this, RegisterActivity.class);\n\t\t\t\t\t\t\t\tintent.putExtra(\"phone\",et_phoneNum.getText().toString());//传到跳转页面\n\t\t\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tToast.makeText(pre_registerActivity.this, \"验证码错误\", Toast.LENGTH_SHORT).show();\n\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\n\t\t\t\t}", "@RequiresPermission(allOf = {Manifest.permission.CAMERA, Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_FINE_LOCATION})\n public void scanQRCode(final CodeScanner codeScanner, final QRCodeScanListener qrCodeScanListener) {\n\n isScanned = false;\n List<BarcodeFormat> formats = new ArrayList<>();\n formats.add(BarcodeFormat.QR_CODE);\n\n codeScanner.setDecodeCallback(new DecodeCallback() {\n @Override\n public void onDecoded(@NonNull final Result result) {\n\n String scannedData = result.getText();\n\n if (!TextUtils.isEmpty(scannedData) && !isScanned) {\n\n Log.d(TAG, \"QR Code Data : \" + scannedData);\n\n try {\n JSONObject jsonObject = new JSONObject(scannedData);\n\n String deviceName = jsonObject.optString(\"name\");\n String pop = jsonObject.optString(\"pop\");\n String transport = jsonObject.optString(\"transport\");\n int security = jsonObject.optInt(\"security\", ESPConstants.SecurityType.SECURITY_2.ordinal());\n String userName = jsonObject.optString(\"username\");\n String password = jsonObject.optString(\"password\");\n isScanned = true;\n\n if (qrCodeScanListener != null) {\n qrCodeScanListener.qrCodeScanned();\n }\n\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n\n @Override\n public void run() {\n codeScanner.releaseResources();\n }\n });\n\n ESPConstants.TransportType transportType = null;\n ESPConstants.SecurityType securityType = null;\n\n if (!TextUtils.isEmpty(transport)) {\n\n if (transport.equalsIgnoreCase(\"softap\")) {\n\n transportType = ESPConstants.TransportType.TRANSPORT_SOFTAP;\n\n } else if (transport.equalsIgnoreCase(\"ble\")) {\n\n transportType = ESPConstants.TransportType.TRANSPORT_BLE;\n\n } else {\n Log.e(TAG, \"\" + transport + \" Transport type is not supported\");\n qrCodeScanListener.onFailure(new RuntimeException(\"Transport type is not supported\"));\n return;\n }\n } else {\n Log.e(TAG, \"Transport is not available in QR code data\");\n qrCodeScanListener.onFailure(new RuntimeException(\"QR code is not valid\"), scannedData);\n return;\n }\n\n securityType = setSecurityType(security);\n\n espDevice = new ESPDevice(context, transportType, securityType);\n espDevice.setDeviceName(deviceName);\n espDevice.setProofOfPossession(pop);\n espDevice.setUserName(userName);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && transportType.equals(ESPConstants.TransportType.TRANSPORT_SOFTAP)) {\n\n WiFiAccessPoint wiFiDevice = new WiFiAccessPoint();\n wiFiDevice.setWifiName(deviceName);\n wiFiDevice.setPassword(password);\n espDevice.setWifiDevice(wiFiDevice);\n qrCodeScanListener.deviceDetected(espDevice);\n } else {\n isDeviceAvailable(espDevice, password, qrCodeScanListener);\n }\n\n } catch (JSONException e) {\n\n e.printStackTrace();\n qrCodeScanListener.onFailure(new RuntimeException(\"QR code is not valid\"), scannedData);\n }\n } else {\n qrCodeScanListener.onFailure(new RuntimeException(\"QR code is not valid\"), scannedData);\n }\n }\n });\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n Button nextPage = (Button) findViewById(R.id.button_id);\n System.out.println(\"THE RESULT CODE IS = \" + resultCode);\n if (resultCode==7 | resultCode==0) {\n nextPage.setVisibility(View.VISIBLE);\n }\n else {\n nextPage.setVisibility(View.GONE);\n callbackManager.onActivityResult(requestCode, resultCode, data);\n }\n }", "public String generateQRCode(String barCodeStr, String receiptName,String qrCodeText) {\n\t\tlogger.error(\"Start of generateQRCode\"+barCodeStr+\"\"+qrCodeText);\r\n\t\tString path = getFileServerPath(barCodeStr+\"QR\"+\".jpg\");\r\n\t\t\r\n\t\tif(new File(path).exists()) return path;\r\n\t\t\r\n\t\tFileOutputStream fos = null;\r\n\t\tByteArrayOutputStream bytesOut = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tint size = 125;\r\n\t\t\tString fileType = \"jpg\";\r\n\t\t\t/*\r\n\t\t\t * Barcode128 code128 = new Barcode128();\r\n\t\t\t * code128.setCodeType(Barcode128.CODE128); code128.setCode(barCodeStr);\r\n\t\t\t * java.awt.Image img = code128.createAwtImage(Color.BLACK, Color.WHITE);\r\n\t\t\t * \r\n\t\t\t * BufferedImage outImage = new BufferedImage(img.getWidth(null),\r\n\t\t\t * img.getHeight(null), BufferedImage.TYPE_INT_RGB);\r\n\t\t\t * outImage.getGraphics().drawImage(img, 0, 0, null); bytesOut = new\r\n\t\t\t * ByteArrayOutputStream();\r\n\t\t\t * \r\n\t\t\t * ImageIO.write(outImage, \"jpg\", bytesOut);\r\n\t\t\t */\r\n\t\t\t\r\n\t\t\t// Create the ByteMatrix for the QR-Code that encodes the given String\r\n\t\t\tHashtable<EncodeHintType, ErrorCorrectionLevel> hintMap = new Hashtable();\r\n\t\t\thintMap.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.L);\r\n\t\t\tQRCodeWriter qrCodeWriter = new QRCodeWriter();\r\n\t\t\tBitMatrix byteMatrix = qrCodeWriter.encode(qrCodeText, BarcodeFormat.QR_CODE, size, size, hintMap);\r\n\t\t\t// Make the BufferedImage that are to hold the QRCode\r\n\t\t\tint matrixWidth = byteMatrix.getWidth();\r\n\t\t\tBufferedImage image = new BufferedImage(matrixWidth, matrixWidth, BufferedImage.TYPE_INT_RGB);\r\n\t\t\timage.createGraphics();\r\n\r\n\t\t\tGraphics2D graphics = (Graphics2D) image.getGraphics();\r\n\t\t\tgraphics.setColor(Color.WHITE);\r\n\t\t\tgraphics.fillRect(0, 0, matrixWidth, matrixWidth);\r\n\t\t\t// Paint and save the image using the ByteMatrix\r\n\t\t\tgraphics.setColor(Color.BLACK);\r\n\r\n\t\t\tfor (int i = 0; i < matrixWidth; i++) {\r\n\t\t\t\tfor (int j = 0; j < matrixWidth; j++) {\r\n\t\t\t\t\tif (byteMatrix.get(i, j)) {\r\n\t\t\t\t\t\tgraphics.fillRect(i, j, 1, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbytesOut= new ByteArrayOutputStream();\r\n\t\t\tImageIO.write(image, fileType, bytesOut);\r\n\t\t\t\r\n\t\t\tbyte[] pngImageData = bytesOut.toByteArray();\r\n\t\t\t\r\n\t\t\tfos = new FileOutputStream(new File(path));\r\n\t\t\tfos.write(pngImageData);\r\n\t\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} catch (WriterException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t\r\n\t\t\tif (bytesOut != null) {\r\n\t\t\t\ttry {\t\t\t\t\t\r\n\t\t\t\t\tbytesOut.flush();\r\n\t\t\t\t\tbytesOut.close();\r\n\t\t\t\t} catch (IOException 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\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (fos != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos.flush();\r\n\t\t\t\t\tfos.close();\t\t\t\t\t\r\n\t\t\t\t} catch (IOException 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\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//System.out.println(\"================================ \"+path +\" \"+ new File(path).exists());\r\n\t\t\t//logger.error(\"================================ \"+path +\" \"+ new File(path).exists());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn path;\r\n\t}", "@Override\n public void onClick(View view)\n {\n Intent intent = new Intent(BoilerRoom.this, ScanQR.class);\n //intent.putExtra( \"id\", tvmechID.getText().toString() );\n startActivity(intent);\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == PayuConstants.PAYU_REQUEST_CODE) {\n getActivity().setResult(resultCode, data);\n getActivity().finish();\n }\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent data){\n \tswitch (requestCode) {\n \t\n\t \tcase GraphDuration.CHOOSE_TIMEFRAME:\n\t \t\t\n\t \t\tif(resultCode == GraphDuration.CHOOSE_TIMEFRAME_SUCCESS){\n\t\t \t\tString timeframe = data.getExtras().getString(\"TIMEFRAME\");\n\t\t \t\tIntent intent = new Intent(this,GraphMarket.class);\n\t \t\tintent.putExtra(\"TIMEFRAME\", timeframe);\n\t \t\tintent.putExtra(\"SYMBOL\", mCurrencyLeft + mCurrencyRight + \"=X\");\n\n\t \t\t\n\t \t\tstartActivity(intent);\n\t \t\t}\n\t\t \t\n\t\t \t\n \n default:\n \t break;\n }\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if(requestCode == ACTIVITY_COLOUR_SELECT_REQUEST_CODE) {\n\n if(resultCode == RESULT_OK) {\n\n Bundle bundle = data.getExtras();\n int getColour = bundle.getInt(\"setColour\");\n // set new colour for brush\n myFingerPainterView.setColour(getColour);\n }\n else if(resultCode == RESULT_CANCELED) {\n }\n }\n\n // get result from BrushSettingsActivity\n else if(requestCode == ACTIVITY_BRUSH_SETTINGS_REQUEST_CODE) {\n\n if(resultCode == RESULT_OK) {\n\n Bundle bundle = data.getExtras();\n String[] getBrushSettings = bundle.getStringArray(\"settings\");\n\n myFingerPainterView.setBrushWidth(Integer.parseInt(getBrushSettings[0]));\n if(getBrushSettings[1].equals(\"Round\"))\n myFingerPainterView.setBrush(Paint.Cap.ROUND);\n else\n myFingerPainterView.setBrush(Paint.Cap.SQUARE);\n }\n else if(resultCode == RESULT_CANCELED) {\n\n }\n }\n }", "private void next_press() {\n Log.d(TAG, \"next match pressed\");\n\n AlertDialog.Builder builder = new AlertDialog.Builder(SuperScouting.this);\n builder.setTitle(\"Save match data?\");\n\n // Save option\n builder.setPositiveButton(\"Save\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n // Collect values from all the custom elements\n List<ScoutFragment> fragmentList = adapter.getAllFragments();\n ScoutMap data = new ScoutMap();\n String error = \"\";\n for (ScoutFragment fragment : fragmentList) {\n error += fragment.writeContentsToMap(data);\n }\n\n if (error.equals(\"\")) {\n Log.d(TAG, \"Saving values\");\n if (!practice) {\n new SaveTask().execute(data);\n }\n\n // Go to the next match\n Intent intent = new Intent(SuperScouting.this, SuperScouting.class);\n if (practice) {\n intent.putExtra(Constants.Intent_Extras.MATCH_NUMBER, -1);\n } else {\n intent.putExtra(Constants.Intent_Extras.MATCH_NUMBER, matchNumber + 1);\n }\n startActivity(intent);\n } else {\n Toast.makeText(SuperScouting.this, String.format(\"Error: %s\", error), Toast.LENGTH_LONG).show();\n }\n }\n }\n\n );\n\n // Cancel Option\n builder.setNeutralButton(\"Cancel\", new DialogInterface.OnClickListener()\n\n {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // Dialogbox goes away\n }\n }\n\n );\n\n // Continue w/o Saving Option\n builder.setNegativeButton(\"Continue w/o Saving\", new DialogInterface.OnClickListener()\n\n {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // Go to the next match\n Intent intent = new Intent(SuperScouting.this, SuperScouting.class);\n if (practice) {\n intent.putExtra(Constants.Intent_Extras.MATCH_NUMBER, -1);\n } else {\n intent.putExtra(Constants.Intent_Extras.MATCH_NUMBER, matchNumber + 1);\n }\n startActivity(intent);\n }\n }\n\n );\n builder.show();\n }", "public final void mo92090i(View view) {\n User curUser = C21115b.m71197a().getCurUser();\n QRCodeActivityV2.m119235a(getContext(), new C36995a().mo93428a(4, C43122ff.m136788s(curUser), \"personal_homepage\").mo93433a(C43122ff.m136789t(curUser), C43122ff.m136790u(curUser), C43122ff.m136783n(curUser)).f96920a);\n if (curUser != null) {\n C25652b bVar = new C25652b();\n bVar.mo66536a(new C28442a());\n bVar.mo56976a(curUser.getUid(), Integer.valueOf(1), Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(-1), Integer.valueOf(-1), Integer.valueOf(4), \"qr_code\");\n }\n }", "@RequiresPermission(allOf = {Manifest.permission.CAMERA, Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_FINE_LOCATION})\n public void scanQRCode(final Activity activityContext, final CameraSourcePreview cameraSourcePreview, final QRCodeScanListener qrCodeScanListener) {\n\n isScanned = false;\n BarcodeDetector barcodeDetector = new BarcodeDetector.Builder(activityContext)\n .setBarcodeFormats(Barcode.QR_CODE)\n .build();\n\n CameraSource cameraSource = new CameraSource.Builder(activityContext, barcodeDetector)\n .setFacing(CameraSource.CAMERA_FACING_BACK)\n .setRequestedPreviewSize(1600, 1024)\n .setAutoFocusEnabled(true)\n .build();\n\n if (cameraSource != null) {\n try {\n cameraSourcePreview.start(cameraSource);\n } catch (IOException e) {\n Log.e(TAG, \"Unable to start camera source.\", e);\n cameraSource.release();\n cameraSource = null;\n }\n }\n\n barcodeDetector.setProcessor(new Detector.Processor<Barcode>() {\n\n @Override\n public void release() {\n }\n\n @Override\n @RequiresPermission(allOf = {Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_FINE_LOCATION})\n public void receiveDetections(Detector.Detections<Barcode> detections) {\n\n final SparseArray<Barcode> barcodes = detections.getDetectedItems();\n\n if (barcodes.size() != 0 && !isScanned) {\n\n Log.d(TAG, \"Barcodes size : \" + barcodes.size());\n Barcode barcode = barcodes.valueAt(0);\n Log.d(TAG, \"QR Code Data : \" + barcode.rawValue);\n String scannedData = barcode.rawValue;\n\n try {\n JSONObject jsonObject = new JSONObject(scannedData);\n\n String deviceName = jsonObject.optString(\"name\");\n String pop = jsonObject.optString(\"pop\");\n String transport = jsonObject.optString(\"transport\");\n int security = jsonObject.optInt(\"security\", ESPConstants.SecurityType.SECURITY_2.ordinal());\n String userName = jsonObject.optString(\"username\");\n String password = jsonObject.optString(\"password\");\n isScanned = true;\n\n if (qrCodeScanListener != null) {\n qrCodeScanListener.qrCodeScanned();\n }\n\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n\n @Override\n public void run() {\n cameraSourcePreview.release();\n }\n });\n\n ESPConstants.TransportType transportType = null;\n ESPConstants.SecurityType securityType = null;\n\n if (!TextUtils.isEmpty(transport)) {\n\n if (transport.equalsIgnoreCase(\"softap\")) {\n\n transportType = ESPConstants.TransportType.TRANSPORT_SOFTAP;\n\n } else if (transport.equalsIgnoreCase(\"ble\")) {\n\n transportType = ESPConstants.TransportType.TRANSPORT_BLE;\n\n } else {\n qrCodeScanListener.onFailure(new RuntimeException(\"Transport type not supported\"));\n }\n\n } else {\n qrCodeScanListener.onFailure(new RuntimeException(\"Transport is not available\"));\n }\n\n securityType = setSecurityType(security);\n\n espDevice = new ESPDevice(context, transportType, securityType);\n espDevice.setDeviceName(deviceName);\n espDevice.setProofOfPossession(pop);\n espDevice.setUserName(userName);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && transportType.equals(ESPConstants.TransportType.TRANSPORT_SOFTAP)) {\n\n WiFiAccessPoint wiFiDevice = new WiFiAccessPoint();\n wiFiDevice.setWifiName(deviceName);\n wiFiDevice.setPassword(password);\n espDevice.setWifiDevice(wiFiDevice);\n qrCodeScanListener.deviceDetected(espDevice);\n } else {\n isDeviceAvailable(espDevice, password, qrCodeScanListener);\n }\n\n } catch (JSONException e) {\n\n e.printStackTrace();\n qrCodeScanListener.onFailure(new RuntimeException(\"QR code not valid\"));\n }\n }\n }\n });\n }", "static /* synthetic */ void m56314a(HoneyPayMainUI honeyPayMainUI, long j, long j2, String str, String str2, String str3) {\n AppMethodBeat.m2504i(41911);\n C4990ab.m7416i(honeyPayMainUI.TAG, \"go to give card\");\n Intent intent = new Intent(honeyPayMainUI, HoneyPayGiveCardUI.class);\n intent.putExtra(\"key_max_credit_line\", j);\n intent.putExtra(\"key_min_credit_line\", j2);\n intent.putExtra(\"key_true_name\", str);\n intent.putExtra(\"key_take_message\", str2);\n intent.putExtra(\"key_username\", str3);\n honeyPayMainUI.startActivityForResult(intent, 2);\n AppMethodBeat.m2505o(41911);\n }", "@Override\r\n public void run() {\n Message msg = null;\r\n Bundle b = null;\r\n try {\r\n \t// Get our toggle data for the current card from the database. Note\r\n \t// that this could return a null value if an error occurs.\r\n \ttoggles = DBHelper.getTogglesForLastCard(cardSet);\r\n \t// Reset the passcode array to a new, empty array. This will be how\r\n \t// we pass the passcords back to the UI thread since we can't\r\n \t// manipulate the ToggleButtons directly.\r\n \tpasscodes = new String[cardSet.getNumberOfRows()][cardSet.getNumberOfColumns()];\r\n \t\t// Loop through our rows and columns. Note that we go rows first, then\r\n \t\t// columns:\r\n \t \tfor (int row = 1; row <= cardSet.getNumberOfRows(); row++) {\r\n \t \tfor (int col = 1; col <= cardSet.getNumberOfColumns(); col++) {\r\n \t \t\t// Generate the passcode using the PPP engine, feeding it the\r\n \t \t\t// last/current card, column number, and row number. Note that\r\n \t \t\t// the engine already has all the other parameters. Also note\r\n \t \t\t// that we need to tweak the array indices since the array\r\n \t \t\t// is zero-based.\r\n \t \t\tpasscodes[row - 1][col - 1] =\r\n \t \t\t\tppp.getPasscode(cardSet.getLastCard(), col, row);\r\n \t \t\t\t// Notify the handler that we're finished with this button and\r\n \t \t\t\t// we're ready to move to the next. Note that we're only\r\n \t \t\t\t// bothering sending status for the passcode generation step,\r\n \t \t\t\t// as the toggle step below is much faster by comparison.\r\n \t \t\t\tcounter++;\r\n \t \t\t\tmsg = handler.obtainMessage();\r\n \t b = new Bundle();\r\n \t b.putInt(\"pccount\", counter);\r\n \t msg.setData(b);\r\n \t handler.sendMessage(msg);\r\n \t \t}\r\n \t \t}\r\n \t // If anything blows up, return a negative status message to the Handler\r\n \t // to let it know that something didn't work correctly.\r\n } catch (Exception e) {\r\n \tmsg = handler.obtainMessage();\r\n b = new Bundle();\r\n b.putInt(\"pccount\", -1);\r\n msg.setData(b);\r\n handler.sendMessage(msg);\r\n }\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity__scanner);\n\n this.setTitle(\"QR Scanner\");\n\n scan = findViewById(R.id.sc_btn);\n result = findViewById(R.id.result);\n done_btn = findViewById(R.id.done_btn);\n all = findViewById(R.id.all);\n\n //clicks on scan qr code button\n //go to Activity_scanCode\n scan.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(getApplicationContext(), Activity_scanCode.class));\n Handler handler = new Handler();\n //the result will display in 3s\n handler.postDelayed(new Runnable() {\n public void run() {\n all.setVisibility(View.VISIBLE);\n }\n }, 3000);\n\n }\n });\n\n //go back to previous page\n done_btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Toast.makeText(Activity_Scanner.this, \"Completed! Go back to main menu.\", Toast.LENGTH_SHORT).show();\n startActivity(new Intent(Activity_Scanner.this, Activity_MainMenuD.class));\n }\n });\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\n\t\t// If REQUEST_ENABLE_BT, then this result is from the\n\t\t// activity that allows the user to enable Bluetooth.\n\t\tif (requestCode == REQUEST_ENABLE_BT) {\n\t\t\tlogger.debug(\"onActivityResult(): Received response for REQUEST_ENABLE_BT\");\n\t\t\tonEnableBluetoothResponse(resultCode);\n\t\t}\n\n\t\t// If REQUEST_DISCOVER_DEVICE, then this result is from the activity that allows\n\t\t// the user to select a Bluetooth device to which to connect.\n\t\telse if (requestCode == REQUEST_DISCOVER_DEVICE) {\n\t\t\tlogger.debug(\"onActivityResult(): Received response for REQUEST_DISCOVER_DEVICE\");\n\t\t\tonDiscoverDeviceResponse(resultCode, data);\n\t\t}\n\n\t\t// If REQUEST_TILE_TYPE, then this result is from the activity that allows the user to change the type of a\n\t\t// tile.\n\t\telse if (requestCode == REQUEST_TILE_TYPE) {\n\t\t\tlogger.debug(\"onActivityResult(): Received response for REQUEST_TILE_TYPE\");\n\t\t\tonChangeTileResponse(resultCode, data);\n\t\t}\n\n\t\t// If REQUEST_GOAL_TYPE, then this result is from the activity that allows the user to change the goal type.\n\t\telse if (requestCode == REQUEST_GOAL_TYPE) {\n\t\t\tlogger.debug(\"onActivityResult(): Received response for REQUEST_GOAL_TYPE\");\n\t\t\tonChangeGoalResponse(resultCode, data);\n\t\t}\n\n\t\t// If REQUEST_SELECT_SYMPTOM, then this result is from the activity that allows the user to add a new symptom.\n\t\telse if (requestCode == REQUEST_SELECT_SYMPTOM) {\n\t\t\tlogger.debug(\"onActivityResult(): Received response for REQUEST_SELECT_SYMPTOM\");\n\t\t\tonSelectSymptomResponse(resultCode, data);\n\t\t}\n\t}", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == SCAN_QR_REQUEST_CODE && resultCode == Activity.RESULT_OK) {\n mDevice.DeviceID = data.getStringExtra(\"SCAN_RESULT\");\n ((EditTextPreference) mDeviceId).setText(mDevice.DeviceID);\n mDeviceId.setSummary(mDevice.DeviceID);\n }\n }", "@Override\npublic void onClick(View v) {\n\tEditText eMobileNo = (EditText) findViewById(R.id.eMobileNo);\n mobile = eMobileNo.getText().toString().replaceAll(\"[^\\\\d]\", \"\");;\n\n \n\n String tmp = \"Sign up code sent to \" + mobile + \" imei: \" + imei;\n Toast.makeText(RegisterMe.this,\"Register button Clicked\", Toast.LENGTH_SHORT).show();\n \n postData();\n ConfirmToken();\n\n}", "public void Riesgos_interno_quintana (View view){\n Intent intent = new Intent(this, quintanaroo_id_riesgo_interno.class);\n startActivity(intent);\n }", "void barcodeCaptured(String barcodeString);", "public void drawResultBitmap(Bitmap barcode) {\n resultBitmap = barcode;\n invalidate();\n }", "private void iniciarQrDetector() {\n\n System.out.println(\"Iniciar Qr\");\n\n final Display display = getWindowManager().getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n int width = size.x;\n int height = size.y;\n\n barcodeDetector = new BarcodeDetector.Builder(LectorActivity.this)\n .setBarcodeFormats(Barcode.QR_CODE)\n .build();\n\n barcodeDetector.setProcessor(new Detector.Processor<Barcode>() {\n @Override\n public void release() {\n }\n\n @Override\n public void receiveDetections(Detector.Detections<Barcode> detections) {\n\n if (seguir) {\n final SparseArray<Barcode> qrcodes = detections.getDetectedItems();\n\n try {\n value = qrcodes.valueAt(0).rawValue;\n\n\n } catch (ArrayIndexOutOfBoundsException e) {\n System.out.println(\"No se ha encontrado ningún código.\");\n }\n\n if (!value.equals(\"0\")) {\n seguir = false;\n System.out.println(\"Leido, \"+value);\n comprueba_maquina(value);\n }\n }\n }\n });\n cameraSource = new CameraSource\n .Builder(LectorActivity.this, barcodeDetector)\n .setRequestedPreviewSize(height, width)\n .setAutoFocusEnabled(true)\n .build();\n\n cameraPreview.getHolder().addCallback(new SurfaceHolder.Callback() {\n @Override\n public void surfaceCreated(SurfaceHolder surfaceHolder) {\n if (ActivityCompat.checkSelfPermission(LectorActivity.this, android.Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {\n //Request permission\n ActivityCompat.requestPermissions(LectorActivity.this,\n new String[]{Manifest.permission.CAMERA}, RequestCameraPermissionID);\n System.out.println(\"PERMISOS\");\n return;\n }\n try {\n System.out.println(\"INICIAR CAMARA\");\n cameraSource.start(cameraPreview.getHolder());\n } catch (IOException e) {\n System.out.println(\"FALLO AL INICIAR CAMARA\");\n e.printStackTrace();\n }\n }\n\n @Override\n public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i1, int i2) {\n\n }\n\n @Override\n public void surfaceDestroyed(SurfaceHolder surfaceHolder) {\n cameraSource.stop();\n }\n });\n }", "@Override\n public void onClick(View v) {\n startActivityForResult(new Intent(this, NewQuote.class), REQUEST_CODE);\n }", "public void deleteSharedprefQR() {\n\n dialog = new Dialog(getActivity());\n dialog.setContentView(R.layout.discard_qr_dialog_layout);\n Button delete = dialog.findViewById(R.id.btnDelete);\n Button cancel = dialog.findViewById(R.id.btnCancel);\n delete.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n GeneralUtils.removeHashCode(getActivity());\n strHashCode = GeneralUtils.getHashCode(getActivity());\n dialog.dismiss();\n Fragment fragment = new GenerateQRCodeFragment();\n ((AppCompatActivity) getActivity()).getFragmentManager().beginTransaction().replace(R.id.fragment_container, fragment).addToBackStack(\"\").commit();\n\n }\n });\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n dialog.show();\n\n }", "@Override\n public void onQRCodeRead(String text, PointF[] points) {\n\n\n\n\n Toast.makeText(getApplicationContext(), text, Toast.LENGTH_LONG).show();\n myRef.child(\"items\").setValue(null);\n User user = new User();\n user.name = \"Капучино\";\n user.owner = \"\";\n user.price = 65;\n addData(user,0);\n\n User user1 = new User();\n user1.name = \"Вестрн Гурме\";\n user1.owner = \"\";\n user1.price = 219;\n addData(user1,1);\n\n user.name = \"Двойной чизбургер\";\n user.owner = \"\";\n user.price = 125;\n addData(user,2);\n\n user1.name = \"Латте\";\n user1.owner = \"\";\n user1.price = 104;\n addData(user1,3);\n\n user.name = \"Пирожок вишневый\";\n user.owner = \"\";\n user.price = 50;\n addData(user,4);\n\n user1.name = \"Чизбургер\";\n user1.owner = \"\";\n user1.price = 55;\n addData(user1,5);\n\n\n\n Intent intent = new Intent(DecoderFirst.this, ShareActivity.class);\n intent.putExtra(\"text\",text);\n startActivity(intent);\n }", "public static Bitmap createQrCode(@NotNull final String content,\n final int qrCodeSize,\n @NotNull final String ssidText,\n @NotNull final Typeface typeface) {\n try {\n if (qrCodeSize <= 0) {\n return Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888);\n }\n\n final int textHeight = qrCodeSize / 8;\n final int actualQrSize = qrCodeSize - textHeight;\n\n final Bitmap qrBmp = new QRCodeWriter().encode(\n content, BarcodeFormat.QR_CODE, actualQrSize, actualQrSize, ErrorCorrectionLevel.H);\n final Bitmap combinedBmp = Bitmap.createBitmap(qrCodeSize, qrCodeSize, Bitmap.Config.ARGB_8888);\n\n final Canvas canvas = new Canvas(combinedBmp);\n final Paint paint = new Paint();\n canvas.drawColor(Color.TRANSPARENT);\n\n canvas.drawBitmap(qrBmp, textHeight / 2f, 0, paint);\n\n paint.setColor(Color.BLACK);\n paint.setStyle(Paint.Style.FILL);\n\n paint.setTypeface(typeface);\n float fontSize = 10;\n final Rect bounds = new Rect();\n final int margin = textHeight / 8;\n\n while (true) {\n paint.setTextSize(fontSize);\n\n paint.getTextBounds(ssidText, 0, ssidText.length(), bounds);\n\n if (bounds.height() + (margin * 2) > textHeight || bounds.width() + (margin * 2) > qrCodeSize) {\n break;\n }\n\n fontSize += 0.1;\n }\n\n paint.setAntiAlias(true);\n paint.setSubpixelText(true);\n paint.setTextAlign(Paint.Align.CENTER);\n canvas.drawText(ssidText, qrCodeSize / 2f, actualQrSize + textHeight / 2 + margin, paint);\n\n return combinedBmp;\n } catch (WriterException e) {\n Timber.d(\"createQrCode error %s\", e);\n return null;\n }\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tIntent i = new Intent(mThisAct, SkewBarCodeActivity.class);\n\t\t\t\t\t\tString input= mEdit.getText().toString();\n\t\t\t\t\t\tint id=Integer.parseInt(input);\n\t\t\t\t\t\t// 3. Put key-value pair into the intent.\n\t\t\t\t\t\ti.putExtra(mRes.getString(R.string.img_id_key), id );\n\t\t\t\t\t\t// 4. Toast which image is requested.\n\t\t\t\t\t\t// 5. Request Android to run it.\n\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tnew ResendVerifiedCode().execute();\n\t\t\t}", "private static void createQRImage(String qrFile, String qrCodeText, int size,\n\t\t\tHashtable hintMap) throws WriterException, IOException {\n\t\tQRCodeWriter qrCodeWriter = new QRCodeWriter();\n\t\tBitMatrix byteMatrix = qrCodeWriter.encode(qrCodeText,\n\t\t\t\tBarcodeFormat.QR_CODE, size, size, hintMap);\n\t\tMatrixToImageWriter.writeToFile(byteMatrix, qrFile.substring(qrFile\n\t\t\t\t.lastIndexOf('.') + 1), new File(qrFile));\n\t\t// Make the BufferedImage that are to hold the QRCode\n\t}", "@OnClick({R.id.ed_phone, R.id.agin_verification_code, R.id.confirm_btn})\n public void onViewClicked(View view) {\n switch (view.getId()) {\n case R.id.ed_phone:\n edPhone.setCursorVisible(true);//光标显示\n break;\n case R.id.agin_verification_code:\n if (ObjectUtils.isEmpty(phone)) {\n ToastUtils.showLongToast(context, getResources().getString(R.string.the_cell_phone_number_cannot_be_empty));\n return;\n }\n// if (!RegexUtils.isMobileExact(phone)) {\n// ToastUtils.showLongToast(context, getResources().getString(R.string.please_input_the_correct_mobile_phone_number));\n// return;\n// }\n mPresent.getCode(context, phone);// 1 綁定手机号\n break;\n case R.id.confirm_btn:\n String newDealPwd = edConfirmNewPwd.getText().toString().toString().trim();\n String code = edVerificationCode.getText().toString().trim();\n if (ObjectUtils.isEmpty(code)) {\n ToastUtils.showLongToast(context, getResources().getString(R.string.the_verification_code_cannot_be_empty));\n return;\n }\n if (ObjectUtils.isEmpty(newDealPwd)) {\n ToastUtils.showLongToast(context, getResources().getString(R.string.please_enter_your_new_deal_password));\n return;\n }\n if(newDealPwd.length()<6){\n ToastUtils.showShortToast(context,getResources().getString(R.string.please_enter_six_digit_trading_password));\n return;\n }\n\n showLoadingDialog();\n mPresent.modifyPwd(context, \"2\", \"\", code, newDealPwd);\n break;\n }\n }", "public void onActivityResult(int requestCode, int resultCode, Intent intent) {\n Log.d(LOG_TAG, \"onActivityResult\");\n if (resultCode == Activity.RESULT_OK) {\n Log.d(LOG_TAG, \"requestCode: \" + requestCode);\n switch (requestCode) {\n case 300:\n AdobeSelection selection = getSelection(intent);\n\n Intent data = new Intent();\n data.putExtras(intent);\n setResult(Activity.RESULT_OK,data);\n finish();\n\n break;\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n //this.callbackContext.error(\"Asset Browser Canceled\");\n Log.d(LOG_TAG, \"Asset Browser Canceled\");\n finish();\n }\n }", "public ImageIcon createQrCode(OutputStream outputStream, String content, int qrCodeSize, String imageFormat)\n {\n BufferedImage image = null;\n\t\ttry\n {\n // Create the ByteMatrix for the QR-Code that encodes the given String.\n \n Hashtable<EncodeHintType, ErrorCorrectionLevel> hintMap = new Hashtable<EncodeHintType, ErrorCorrectionLevel>();\n hintMap.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.Q);\n \n QRCodeWriter qrCodeWriter = new QRCodeWriter();\n BitMatrix biteMatrix = qrCodeWriter.encode(content, BarcodeFormat.QR_CODE, qrCodeSize, qrCodeSize, hintMap);\n \n // Make the BufferedImage that are to hold the QRCode\n \n int matrixWidth = biteMatrix.getWidth();\n \n image = new BufferedImage(matrixWidth, matrixWidth, BufferedImage.TYPE_INT_RGB);\n image.createGraphics();\n \n Graphics2D graphics = (Graphics2D) image.getGraphics();\n graphics.setColor(Color.WHITE);\n graphics.fillRect(0, 0, matrixWidth, matrixWidth);\n \n // Paint and save the image using the ByteMatrix\n \n graphics.setColor(Color.BLACK);\n \n for (int i = 0; i < matrixWidth; i++)\n {\n for (int j = 0; j < matrixWidth; j++)\n {\n if (biteMatrix.get(i, j) == true)\n {\n graphics.fillRect(i, j, 1, 1);\n }\n }\n }\n \n //ImageIO.write(image, imageFormat, outputStream);\n }\n catch (Exception ex)\n {\n \n }\n \n return new ImageIcon(image);\n }", "public void drawResultBitmap(Bitmap barcode) {\n resultBitmap = barcode;\n invalidate();\n }", "public void drawResultBitmap(Bitmap barcode) {\n resultBitmap = barcode;\n invalidate();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n getActivity().setTitle(\"ScanMe - Home\");\n setHasOptionsMenu(true);\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getContext());\n name=preferences.getString(\"name\",\"\");\n email=preferences.getString(\"email\",\"\");\n phone=preferences.getString(\"phone\",\"\");\n token= preferences.getString(\"token\", \"\");\n View view= inflater.inflate(R.layout.fragment_bar_code, container, false);\n Qr=view.findViewById(R.id.barcode);\n progressBar2=view.findViewById(R.id.progressBar2);\n progressBar2.setVisibility(View.INVISIBLE);\n button3=view.findViewById(R.id.button3);\n textView6=view.findViewById(R.id.textView6);\n textView3=view.findViewById(R.id.textView3);\n textView3.setText(\"Loading...\");\n checking();\n MultiFormatWriter multiFormatWriter=new MultiFormatWriter();\n try {\n BitMatrix bitMatrix=multiFormatWriter.encode(name+\" \"+email+\" \"+phone+\" \"+token, BarcodeFormat.QR_CODE,1000,400);\n BarcodeEncoder barcodeEncoder=new BarcodeEncoder();\n Bitmap bitmap=barcodeEncoder.createBitmap(bitMatrix);\n Qr.setImageBitmap(bitmap);\n } catch (WriterException e) {\n e.printStackTrace();\n }\n//\n\n\n recyclerView= view.findViewById(R.id.userlistview);\n recyclerView.setHasFixedSize(true);\n layoutManager = new LinearLayoutManager(getContext());\n recyclerView.setLayoutManager(layoutManager);\n\n getIds();\n button3.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n getIds();\n contactsList.clear();\n }\n });\n\n return view;\n }", "public void verifyCodePressed(View view) {\r\n emailTo = String.valueOf(etEmail.getText());\r\n //Generate the random verify code\r\n verifyCode = (int)((Math.random() * 9 + 1) * 100000);\r\n Toast.makeText(ForgetPswActivity.this,\"Sending..... the verify code\", Toast.LENGTH_LONG).show();\r\n Thread thread = new Thread(){\r\n @Override\r\n public void run() {\r\n EmailUtil.getInstance().sendEmail(emailTo,\"Verify Code from Digital Learner Logbook\",\r\n \"DLL send a verify code: \" + verifyCode +\r\n \", This code is for reset the password only!\" );\r\n\r\n Looper.prepare();\r\n Toast.makeText(ForgetPswActivity.this,\"Sent the verify code\", Toast.LENGTH_LONG).show();\r\n Looper.loop();\r\n }\r\n };\r\n thread.start();\r\n\r\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n IntentResult result = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);\n if (result != null) {\n if (result.getContents() == null) {\n Toast.makeText(this, \"Result Not Found\", Toast.LENGTH_LONG).show();\n } else {\n partNumber = result.getContents();\n new BackgroundTaskScanQrCode().execute();\n }\n } else {\n super.onActivityResult(requestCode, resultCode, data);\n }\n }", "public void generateMaze(View view){\n\t\tLog.v(LOG_TAG, \"Start button clicked\");\n\t\tIntent intent = new Intent(this, GeneratingActivity.class);\n\t\tintent.putExtra(\"loadMaze\", false);\n\t\tint mazeLevel = seekBar.getProgress();\n\t\tintent.putExtra(\"level\", mazeLevel);\n\t\tMazeDataHolder.setSkill(mazeLevel);\n\t\tString generationAlgorithm = spinner.getSelectedItem().toString();\n\t\tMazeDataHolder.setGenerationAlgorithm(generationAlgorithm);\n\t\tintent.putExtra(\"generationAlgorithm\", generationAlgorithm);\n\t\treleasePlayer();\n\t\tstartActivity(intent);\n\t\tfinish();\n\t}", "@Override\n public void onClick(View arg0) {\n switch (arg0.getId()) {\n case R.id.r3:\n Intent loactionAcIntent = new Intent();\n loactionAcIntent.setClass(mContext, CrmVisitorFromGaodeMap.class);\n startActivityForResult(loactionAcIntent, 1015);\n break;\n\n case R.id.txt_comm_head_right:\n if (null != php_Address && !php_Address.equals(\"\") && postState && php_Lng != null && php_Lat != null) {\n\n // if(mAdapter.mPicList.size()>0){\n CustomDialog.showProgressDialog(mContext, \"签到中...\");\n postCustomerInfo();\n // }\n // else{\n // CustomToast.showShortToast(mContext, \"请上传照片\");\n // }\n\n } else {\n CustomToast.showShortToast(mContext, \"请选择签到位置\");\n }\n\n default:\n break;\n }\n }", "@Override\n\n public void onCodeSent(String verificationId,\n PhoneAuthProvider.ForceResendingToken token) {\n\n Toast.makeText(otpsignin.this, verificationId, Toast.LENGTH_SHORT).show();\n\n Log.d(TAG, \"onCodeSent:\" + verificationId);\n\n Toast.makeText(otpsignin.this,\"On code sent meathod\",Toast.LENGTH_SHORT).show();\n\n // Save verification ID and resending token so we can use them later\n\n btntype=1;\n\n\n mVerificationId = verificationId;\n\n mResendToken = token;\n\n btnOTP.setText(\"Verify code\");\n\n // ...\n }", "@Override\n public void onClick(View v) {\n\n if (v == Clear_bt) {\n mSignature.clear();\n // dl.dismiss();\n\n } else if (v == Save_bt) {\n mSignature.save();\n\n } else if (v == Cancel_bt) {\n /* Bundle b = new Bundle();\n b.putString(\"byteArray\", \"cancel\");\n Intent intent = new Intent();\n intent.putExtras(b);\n setResult(3, intent);*/\n // finish();\n mSignature.clear();\n dl.dismiss();\n\n } else if (v == tech_signature) {\n Sign_Check = \"Man\";\n get_signature(Sign_Check);\n\n }\n else if (v == staff_signature) {\n Sign_Check = \"staff\";\n get_signature(Sign_Check);\n\n }\n\n\n else if (v == supervisor_signature) {\n\n Sign_Check = \"Co\";\n get_signature(Sign_Check);\n\n }\n\n else if (v == msot_signature_button) {\n\n Sign_Check = \"msot\";\n get_signature(Sign_Check);\n\n }\n }", "public void onActivityResult(int RequestCode, int ResultCode, Intent Data) {\n\t\tsuper.onActivityResult(RequestCode, ResultCode, Data); \n\t\tif(RequestCode == Bluetooth.REQUEST_ENABLE_BT){\n\t\t\tif(ResultCode == -1){\n\t\t\t\tcreateAct();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.69612956", "0.60010433", "0.598688", "0.5860093", "0.5831597", "0.57686317", "0.5760307", "0.5753278", "0.57190585", "0.5714658", "0.56610805", "0.56175524", "0.5600425", "0.55974823", "0.5565859", "0.5558606", "0.5534118", "0.5534076", "0.5519697", "0.5431235", "0.54311377", "0.5399231", "0.5388623", "0.5380942", "0.5378415", "0.537168", "0.53593135", "0.5321414", "0.53148985", "0.53001046", "0.5281214", "0.5277295", "0.5255455", "0.5250583", "0.52493787", "0.52226067", "0.5215166", "0.5201334", "0.5142309", "0.51387566", "0.51365435", "0.51333404", "0.5123388", "0.5116604", "0.5106192", "0.51048166", "0.50926524", "0.50882924", "0.5063336", "0.5049772", "0.50425893", "0.50326586", "0.5018183", "0.5015782", "0.50046635", "0.4997677", "0.49967143", "0.4993202", "0.49914554", "0.4977692", "0.49721134", "0.49689415", "0.4935719", "0.49298352", "0.49293575", "0.49257347", "0.4918445", "0.4904847", "0.4902557", "0.49023667", "0.48999092", "0.48963538", "0.48744524", "0.48730084", "0.4868362", "0.48682064", "0.4851987", "0.48459578", "0.48433504", "0.48324412", "0.48252958", "0.48179042", "0.481513", "0.48086336", "0.48014778", "0.47829086", "0.4778817", "0.4778722", "0.4775261", "0.47663426", "0.47658515", "0.47658515", "0.47640017", "0.47634554", "0.47600785", "0.47591662", "0.4759091", "0.4754487", "0.47512612", "0.47488642" ]
0.6715212
1
Given date details, update the expiry date.
public void handleExpiryDateChange(int year, int month, int dayOfMonth) { Calendar calendar = Calendar.getInstance(); calendar.set(year, month, dayOfMonth); this.expiryDate = calendar.getTime(); view.setExpiryDateText(formatter.format(this.expiryDate)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setExpiryDate(Date expiryDate) {\n this.expiryDate = expiryDate;\n }", "public void setExpirationDate(java.util.Date value);", "void setExpiredDate(Date expiredDate);", "@Override\n public void setExpiration( Date arg0)\n {\n \n }", "public void setExpiryDate(SIPDateOrDeltaSeconds e) {\n expiryDate = e ;\n }", "public void setExpiryDate(java.util.Calendar expiryDate) {\r\n this.expiryDate = expiryDate;\r\n }", "public void expiredate() {\n\t\tdr.findElement(By.xpath(\"//input[@id='expiryDate']\")).sendKeys(\"05/2028\");\r\n\t\t\r\n\t\t\r\n\t\t}", "public void setRenewalEffectiveDate(java.util.Date value);", "public final void setexpiry_date(String expiry_date)\n\t{\n\t\tsetexpiry_date(getContext(), expiry_date);\n\t}", "public void setExpirationDate(Date expirationDate) {\r\n this.expirationDate = expirationDate;\r\n }", "public void setExpirationDate(Date expirationDate) {\n this.expirationDate = expirationDate;\n }", "public void setEXPIRY_DATE(Date EXPIRY_DATE) {\r\n this.EXPIRY_DATE = EXPIRY_DATE;\r\n }", "public void setDateExpiry( Timestamp tDateExpiry )\r\n {\r\n _tDateExpiry = tDateExpiry;\r\n }", "public void setExpirationDate(java.util.Date expirationDate) {\n this.expirationDate = expirationDate;\n }", "public void setExpirationDate(Date expirationDate) {\n\t\tthis.expirationDate = expirationDate;\n\t}", "public void setExpirationDate(Date expirationDate) {\n\t\tthis.expirationDate = expirationDate;\n\t}", "public void setExpirationDate(java.util.Calendar expirationDate) {\n this.expirationDate = expirationDate;\n }", "public final void setexpiry_date(com.mendix.systemwideinterfaces.core.IContext context, String expiry_date)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.expiry_date.toString(), expiry_date);\n\t}", "public void setExpiryTime(java.util.Calendar param){\n localExpiryTimeTracker = true;\n \n this.localExpiryTime=param;\n \n\n }", "public abstract Date getExpirationDate();", "public void setIssuedDate(Date v) \n {\n \n if (!ObjectUtils.equals(this.issuedDate, v))\n {\n this.issuedDate = v;\n setModified(true);\n }\n \n \n }", "private void setExpiresDate(Date date, long offset)\n {\n date.setTime(System.currentTimeMillis() + offset);\n }", "@Override\n\tpublic void setExpiration_Date(java.util.Date Expiration_Date) {\n\t\t_news_Blogs.setExpiration_Date(Expiration_Date);\n\t}", "private void setDefaultExpiryDate() {\n int twoWeeks = 14;\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(new Date());\n calendar.add(Calendar.DAY_OF_YEAR, twoWeeks);\n this.expiryDate = calendar.getTime();\n }", "public void setExpiredate(String expierdate) {\n\t\t\tthis.expiredate = expierdate;\n\t}", "long getExpirationDate();", "public void updateDate(Date date);", "public void setExpirationDate(String expirationDate) {\r\n\t\tthis.expirationDate = expirationDate;\r\n\t}", "public void setExpiry(int expiry)\n {\n this.expiry = expiry;\n }", "public void setExpireDate(Date expireDate) {\n this.expireDate = expireDate;\n }", "public void setExpireDate(Date expireDate) {\n this.expireDate = expireDate;\n }", "public void setExpireDate(Date expireDate) {\n this.expireDate = expireDate;\n }", "public void setExpireDate(Date expireDate) {\n this.expireDate = expireDate;\n }", "public void setExpirationDate(Timestamp aExpirationDate) {\n expirationDate = aExpirationDate;\n }", "public Builder setExpirationDate(long value) {\n bitField0_ |= 0x00000200;\n expirationDate_ = value;\n\n return this;\n }", "public Date getExpiryDate() {\n return expiryDate;\n }", "public static void setExpireDate(ParsePush push, long date ) {\t \n\t\tpush.setExpirationTime(date);\n\t}", "public Builder setExpirationDate(long value) {\n\n expirationDate_ = value;\n bitField0_ |= 0x00000020;\n onChanged();\n return this;\n }", "Date getExpiredDate();", "public Date getExpiryDate()\n {\n return expiryDate;\n }", "public void setExpireDate(Date expireDate) {\n\t\tthis.expireDate = expireDate;\n\t}", "public void setLastRenewedDate(Date lrd) { lastRenewedDate = lrd; }", "public void setRetentionExpiryDateTime(long expires) {\n\t\t\n\t\t// Check if the retention date/time has changed\n\t\t\n\t\tif ( getRetentionExpiryDateTime() != expires) {\n\t\t\t\n\t\t\t// Update the retention date/time\n\t\t\t\n\t\t\tsuper.setRetentionExpiryDateTime(expires);\n\t\t\t\n\t\t\t// Queue a low priority state update\n\t\t\t\n\t\t\tqueueLowPriorityUpdate( UpdateRetentionExpire);\n\t\t}\n\t}", "com.google.type.Date getExpireDate();", "public void setIssuanceDate(Date value) {\n setAttributeInternal(ISSUANCEDATE, value);\n }", "public void setEffectiveDate(java.util.Date value);", "public void updateAttendance(Date date);", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel(expireDateEditText);\n\n // TODO: is ther better way to get date?\n GregorianCalendar gc = new GregorianCalendar(TimeZone.getDefault());\n gc.clear();\n gc.set(year, monthOfYear, dayOfMonth, 23, 59, 0);\n Log.d(\"set expire date: \", \"mItem: \" + mItem);\n if (mItem != null) {\n mItem.setExpirationDate(gc.getTimeInMillis());\n SimpleDateFormat sdf = new SimpleDateFormat();\n sdf.setTimeZone(TimeZone.getDefault());\n Log.d(\"get purchase date: \", sdf.format(new Date(mItem.getPurchaseDate())));\n Log.d(\"get expiration date: \", sdf.format(new Date(mItem.getExpirationDate())));\n\n }\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getExpirationDate();", "public String getExpirationDate() { return date; }", "public void testUpdatePaymentTerm_CreationDateExceedsCurrentDate() throws Exception {\r\n try {\r\n PaymentTerm paymentTerm = this.getPaymentTermWithId(1);\r\n paymentTerm.setCreationDate(new Date(new Date().getTime() + ONEDAY));\r\n this.getManager().updatePaymentTerm(paymentTerm);\r\n fail(\"IllegalArgumentException is expected\");\r\n } catch (IllegalArgumentException e) {\r\n assertTrue(e.getMessage()\r\n .indexOf(\"The creation date of PaymentTerm to be updated must not exceed current date\") >= 0);\r\n }\r\n }", "public final void setRetentionExpiryDateTime(long expires) {\n\t m_retainUntil = expires;\n\t}", "public void setExpires(long expires)\r\n/* 224: */ {\r\n/* 225:338 */ setDate(\"Expires\", expires);\r\n/* 226: */ }", "public Date getExpirationDate() {\r\n return expirationDate;\r\n }", "private Date generateExpirationDate(){\n Calendar c = Calendar.getInstance();\n c.setTime(new Date());\n c.add(Calendar.DAY_OF_WEEK, CommonSecurityConfig.EXPIRATION);\n return c.getTime();\n }", "public void setExpirationTime(Date expirationTime) {\n this.expirationTime = expirationTime;\n }", "public void setActivationDate() {\r\n\t\tif(this.removalDate != null) {\r\n\t\t\tthrow new RuntimeException(\"This item has already been activated\");\r\n\t\t}\r\n\t\tthis.activationDate = new Date(); \r\n\t\tGregorianCalendar cal = new GregorianCalendar();\r\n\t\t\r\n\t\t// set date for test\r\n\t\t//cal.set(2010, 10, 29, 02, 55);\r\n\t\t\r\n\t\t\r\n\t\tcal.add(GregorianCalendar.HOUR_OF_DAY, this.itemType.getItemDuration());\r\n\t\tthis.removalDate = cal.getTime();\r\n\t}", "public Builder withExpirationDate(final long expirationDate) {\n this.expirationDate = LocalDateTime.ofInstant(\n Instant.ofEpochSecond(expirationDate), ZoneId.systemDefault()\n );\n return this;\n }", "protected void scheduleExpiry()\n {\n long dtExpiry = 0L;\n int cDelay = OldOldCache.this.m_cExpiryDelay;\n if (cDelay > 0)\n {\n dtExpiry = getSafeTimeMillis() + cDelay;\n }\n setExpiryMillis(dtExpiry);\n }", "@Override\n public void updateDate(int year, int month, int day) {\n calendar = new GregorianCalendar();\n calendar.set(year, month, day);\n // set the textview\n SimpleDateFormat sdf = new SimpleDateFormat(\"MMMM dd, yyyy\");\n sdf.setCalendar(calendar);\n expiration.setText(sdf.format(calendar.getTime()));\n }", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "protected abstract void _set(String key, Object obj, Date expires);", "@Autowired\n\tpublic void setExpiry(@Value(\"${repair.expiry}\") Duration expiry) {\n\t\tthis.expiry = DurationConverter.oneOrMore(expiry);\n\t}", "public void editDueDate(Calendar newDate) {\n this.dueDate = newDate;\n }", "public void setDATE_AUTHORIZED(Date DATE_AUTHORIZED) {\r\n this.DATE_AUTHORIZED = DATE_AUTHORIZED;\r\n }", "public void setDATE_AUTHORIZED(Date DATE_AUTHORIZED) {\r\n this.DATE_AUTHORIZED = DATE_AUTHORIZED;\r\n }", "boolean hasExpirationDate();", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "public void updateEndCaseDate(String claimNo,Date endCaseDate) throws SQLException,Exception\n {\n //创建数据库管理对象\n DBManager dbManager = new DBManager();\n dbManager.open(AppConfig.get(\"sysconst.DBJNDI\")) ;\n //开始事务\n dbManager.beginTransaction();\n try\n {\n new BLClaimAction().updateEndCaseDate(dbManager,claimNo,endCaseDate);\n //提交事务\n dbManager.commitTransaction();\n }\n catch(SQLException sqle)\n {\n //回滚事务\n dbManager.rollbackTransaction();\n throw sqle;\n }\n catch(Exception ex)\n {\n //回滚事务\n dbManager.rollbackTransaction();\n throw ex;\n }\n finally\n {\n //关闭数据库连接\n dbManager.close();\n }\n\n }", "public void setExpirationDateType(ExpirationDateType aExpirationDateType) {\n expirationDateType = aExpirationDateType;\n }", "public SIPDateOrDeltaSeconds getExpiryDate() {\n return expiryDate ;\n }", "public void setDateOfExamination(java.util.Date param){\n \n this.localDateOfExamination=param;\n \n\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "Update withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);", "@Given(\"^that the expiry date of Licence is in (\\\\d+) days$\")\n public void that_the_expiry_date_of_Licence_is_in_days(int arg1) throws Throwable {\n driverUser = new DriverUser(LocalDate.now().plusDays(arg1), LocalDate.now(), \"nu;;\", \"null\");\n }", "public void setDate(Date newDate) {\n this.currentDate = newDate;\n }", "public void setDatepr( java.sql.Date newValue ) {\n __setCache(\"datepr\", newValue);\n }", "@Test\n\t@Transactional\n\t@Rollback\n\tpublic void updateAccurateAsOfDate() throws EntityRetrievalException, ValidationException {\n\t\tSecurityContextHolder.getContext().setAuthentication(adminUser);\n\t\tCalendar cal = Calendar.getInstance();\n\t\tLong timeInMillis = cal.getTimeInMillis();\n\t\tAccurateAsOfDate ad = new AccurateAsOfDate();\n\t\tad.setAccurateAsOfDate(timeInMillis);\n\t\tmeaningfulUseController.updateMeaningfulUseAccurateAsOf(ad);\n\t\tAccurateAsOfDate result = meaningfulUseController.getAccurateAsOfDate();\n\t\tassertTrue(result.getAccurateAsOfDate().equals(timeInMillis));\n\t}", "@Transactional\n @Override\n public void updatedExpiredTradesStatus(LocalDate date) {\n tradeRepository.updateExpiredTradesStatus(date);\n }", "public long getExpirationDate() {\n return expirationDate_;\n }", "void setUpdatedDate(Date updatedDate);", "public void setExpiryTime(long ldtExpiry)\n {\n m_metaInf.setExpiryTime(ldtExpiry);\n }", "public void setValidityDateOfLicense(java.util.Date validityDateOfLicense) {\n this.validityDateOfLicense = validityDateOfLicense;\n }", "public void setDueDate(Date d){dueDate = d;}", "synchronized void setExpiration(long newExpiration) {\n \texpiration = newExpiration;\n }", "public void editDueDate(Calendar newDueDate) {\n dueDate = newDueDate;\n }", "@Override\n public Date getExpiration()\n {\n return null;\n }", "public static void setExpires(@NotNull HttpServletResponse response, @Nullable Date date) {\n if (date == null) {\n response.setHeader(HEADER_EXPIRES, \"-1\");\n }\n else {\n response.setHeader(HEADER_EXPIRES, formatDate(date));\n }\n }", "String getCoverageExpirationDate(Record inputRecord);", "public String getExpiryDate() {\n return this.expiryDate;\n }", "public java.util.Calendar getExpiryDate() {\r\n return expiryDate;\r\n }", "public long getExpirationDate() {\n return expirationDate_;\n }", "public Date getEXPIRY_DATE() {\r\n return EXPIRY_DATE;\r\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getRenewalEffectiveDate();", "public void setExpEndDate(Date expEndDate) {\n\t\tthis.expEndDate = expEndDate;\n\t}", "public void setEffDate(Date value) {\r\n this.effDate = value;\r\n }", "public void setRealEstablish(Date realEstablish) {\r\n this.realEstablish = realEstablish;\r\n }", "protected void setTimeStamp(Date date) {\n\t\tsetPurchaseDate(date);\n\t}", "void setDate(Date data);" ]
[ "0.73429364", "0.7320167", "0.7250001", "0.72109133", "0.70413864", "0.7001508", "0.69626576", "0.696097", "0.69131553", "0.6901762", "0.68637866", "0.68553567", "0.67727596", "0.6749946", "0.6738907", "0.6738907", "0.666869", "0.6657647", "0.66427046", "0.6535883", "0.6516783", "0.64687675", "0.642507", "0.642153", "0.64117455", "0.64003956", "0.6391386", "0.6373708", "0.63676673", "0.63063854", "0.63063854", "0.63063854", "0.63063854", "0.62997216", "0.6258744", "0.6237972", "0.61891323", "0.6188433", "0.618518", "0.61676127", "0.61570203", "0.6125569", "0.608606", "0.60141766", "0.60005605", "0.5969761", "0.5962675", "0.59600496", "0.59544164", "0.5931157", "0.58907855", "0.5883635", "0.58583575", "0.58387214", "0.5830719", "0.5828463", "0.5827118", "0.5816811", "0.58163756", "0.580946", "0.58074754", "0.5799705", "0.57988316", "0.57966596", "0.5785776", "0.5785776", "0.57803226", "0.57754624", "0.5771761", "0.57703537", "0.5768065", "0.57630384", "0.57624424", "0.57624424", "0.5754791", "0.57541186", "0.57337403", "0.573082", "0.572823", "0.57179016", "0.5712861", "0.57094866", "0.5700239", "0.5696876", "0.5693444", "0.56778866", "0.5675193", "0.5671696", "0.56705964", "0.56671345", "0.56656516", "0.5658574", "0.5653824", "0.5646623", "0.56381273", "0.56322205", "0.56305516", "0.56273395", "0.5618164", "0.5616946" ]
0.59970725
45
/ Private Functions Set the default expiry date to be 2 weeks from the current day.
private void setDefaultExpiryDate() { int twoWeeks = 14; Calendar calendar = Calendar.getInstance(); calendar.setTime(new Date()); calendar.add(Calendar.DAY_OF_YEAR, twoWeeks); this.expiryDate = calendar.getTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Date generateExpirationDate(){\n Calendar c = Calendar.getInstance();\n c.setTime(new Date());\n c.add(Calendar.DAY_OF_WEEK, CommonSecurityConfig.EXPIRATION);\n return c.getTime();\n }", "@Override\n public void setExpiration( Date arg0)\n {\n \n }", "public Date getDefaultTrialExpirationDate(){\n if(AccountType.STANDARD.equals(accountType)){\n Calendar cal = Calendar.getInstance();\n\n //setting the free trial up for standard users\n cal.add(Calendar.DATE, Company.FREE_TRIAL_LENGTH_DAYS);\n return cal.getTime();\n }\n\n return null;\n }", "public void setRenewalEffectiveDate(java.util.Date value);", "public static LocalDate generateExpiration() {\n LocalDate today = LocalDate.now(); //gives us the information at the moment the program is running\n int expYear = today.getYear() + 5;\n LocalDate exp = LocalDate.of(expYear, today.getMonth(), today.getDayOfMonth());\n return exp;\n }", "public void setExpirationDate(java.util.Date value);", "public void setExpiry(int expiry)\n {\n this.expiry = expiry;\n }", "public void setExpiryDate(SIPDateOrDeltaSeconds e) {\n expiryDate = e ;\n }", "long getExpirationDate();", "public final void setexpiry_date(com.mendix.systemwideinterfaces.core.IContext context, String expiry_date)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.expiry_date.toString(), expiry_date);\n\t}", "public void setExpiryDate(Date expiryDate) {\n this.expiryDate = expiryDate;\n }", "public void expiredate() {\n\t\tdr.findElement(By.xpath(\"//input[@id='expiryDate']\")).sendKeys(\"05/2028\");\r\n\t\t\r\n\t\t\r\n\t\t}", "public final void setexpiry_date(String expiry_date)\n\t{\n\t\tsetexpiry_date(getContext(), expiry_date);\n\t}", "public Builder setExpirationDate(long value) {\n bitField0_ |= 0x00000200;\n expirationDate_ = value;\n\n return this;\n }", "@Autowired\n\tpublic void setExpiry(@Value(\"${repair.expiry}\") Duration expiry) {\n\t\tthis.expiry = DurationConverter.oneOrMore(expiry);\n\t}", "public void setRetentionExpiryDateTime(long expires) {\n\t\t\n\t\t// Check if the retention date/time has changed\n\t\t\n\t\tif ( getRetentionExpiryDateTime() != expires) {\n\t\t\t\n\t\t\t// Update the retention date/time\n\t\t\t\n\t\t\tsuper.setRetentionExpiryDateTime(expires);\n\t\t\t\n\t\t\t// Queue a low priority state update\n\t\t\t\n\t\t\tqueueLowPriorityUpdate( UpdateRetentionExpire);\n\t\t}\n\t}", "public Builder setExpirationDate(long value) {\n\n expirationDate_ = value;\n bitField0_ |= 0x00000020;\n onChanged();\n return this;\n }", "String getDefaultKeyExpiry();", "@Override\n\tpublic void setExpiration_Date(java.util.Date Expiration_Date) {\n\t\t_news_Blogs.setExpiration_Date(Expiration_Date);\n\t}", "public void setExpirationDate(Date expirationDate) {\r\n this.expirationDate = expirationDate;\r\n }", "public void setExpiryTime(java.util.Calendar param){\n localExpiryTimeTracker = true;\n \n this.localExpiryTime=param;\n \n\n }", "public void setExpiryDate(java.util.Calendar expiryDate) {\r\n this.expiryDate = expiryDate;\r\n }", "public abstract Date getExpirationDate();", "public void setExpiryTime(long expiryTime) // Override this method to use intrinsic level-specific expiry times\n {\n super.setExpiryTime(expiryTime);\n\n if (expiryTime > 0)\n this.levels.setExpiryTime(expiryTime); // remove this in sub-class to use level-specific expiry times\n }", "void setExpiredDate(Date expiredDate);", "public final void setRetentionExpiryDateTime(long expires) {\n\t m_retainUntil = expires;\n\t}", "public void setExpirationDate(Date expirationDate) {\n this.expirationDate = expirationDate;\n }", "public void setEXPIRY_DATE(Date EXPIRY_DATE) {\r\n this.EXPIRY_DATE = EXPIRY_DATE;\r\n }", "public void setDateExpiry( Timestamp tDateExpiry )\r\n {\r\n _tDateExpiry = tDateExpiry;\r\n }", "@Override\n public Date getExpiration()\n {\n return null;\n }", "public void setRenewalperiodbeforeexp(Integer value) {\n setAttributeInternal(RENEWALPERIODBEFOREEXP, value);\n }", "public void setExpirationDate(Date expirationDate) {\n\t\tthis.expirationDate = expirationDate;\n\t}", "public void setExpirationDate(Date expirationDate) {\n\t\tthis.expirationDate = expirationDate;\n\t}", "com.google.type.Date getExpireDate();", "@Override\n public final void setExpiration(double expirationTime) {\n safetyHelper.setExpiration(expirationTime);\n }", "public Builder clearExpirationDate() {\n bitField0_ &= ~0x00000020;\n expirationDate_ = 0L;\n onChanged();\n return this;\n }", "public void setExpirationDate(java.util.Date expirationDate) {\n this.expirationDate = expirationDate;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getExpirationDate();", "protected void scheduleExpiry()\n {\n long dtExpiry = 0L;\n int cDelay = OldOldCache.this.m_cExpiryDelay;\n if (cDelay > 0)\n {\n dtExpiry = getSafeTimeMillis() + cDelay;\n }\n setExpiryMillis(dtExpiry);\n }", "public Date getExpiryDate()\n {\n return expiryDate;\n }", "public Date getExpiryDate() {\n return expiryDate;\n }", "public void setExpirationDate(java.util.Calendar expirationDate) {\n this.expirationDate = expirationDate;\n }", "Date getExpiredDate();", "public Builder withExpirationDate(final long expirationDate) {\n this.expirationDate = LocalDateTime.ofInstant(\n Instant.ofEpochSecond(expirationDate), ZoneId.systemDefault()\n );\n return this;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getRenewalEffectiveDate();", "public void setExpiration(long expiration) {\n this.expiration = expiration;\n }", "long getExpiration();", "public int getExpiry();", "synchronized void setExpiration(long newExpiration) {\n \texpiration = newExpiration;\n }", "public void setLastRenewedDate(Date lrd) { lastRenewedDate = lrd; }", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "public void setExpirationDateType(ExpirationDateType aExpirationDateType) {\n expirationDateType = aExpirationDateType;\n }", "public void setExpirationDate(String expirationDate) {\r\n\t\tthis.expirationDate = expirationDate;\r\n\t}", "public void setExpireDate(Date expireDate) {\n this.expireDate = expireDate;\n }", "public void setExpireDate(Date expireDate) {\n this.expireDate = expireDate;\n }", "public void setExpireDate(Date expireDate) {\n this.expireDate = expireDate;\n }", "public void setExpireDate(Date expireDate) {\n this.expireDate = expireDate;\n }", "public void setExpiredate(String expierdate) {\n\t\t\tthis.expiredate = expierdate;\n\t}", "public void setExpEndDate(Date expEndDate) {\n\t\tthis.expEndDate = expEndDate;\n\t}", "public void setExpires(long expires)\r\n/* 224: */ {\r\n/* 225:338 */ setDate(\"Expires\", expires);\r\n/* 226: */ }", "@Test\r\n public void testIsExpiredToday_ExpirationDateTomorrow() {\r\n doTest(TEST_DATE_2_TOMORROW, TEST_DATE_1_TODAY, false);\r\n }", "@Test\r\n public void testIsExpiredToday_ExpirationDateToday_ExpirationDateEarlierTime() {\r\n doTest(TEST_DATE_2_TODAY, TEST_DATE_1_TODAY, false);\r\n }", "public NextExpiryAdjuster(int week, DayOfWeek day) {\n _dayOfMonthAdjuster = DateAdjusters.dayOfWeekInMonth(week, day);\n }", "public int getExpiry()\n {\n return expiry;\n }", "static void saveUserDeadline(Context context, Date deadline) {\n\n context.getSharedPreferences(FILE_NAME, 0)\n .edit()\n .putLong(USER_DEADLINE_KEY, deadline.getTime())\n .apply();\n }", "String getSpecifiedExpiry();", "public void setExpiryTime(long expiryTime) {\n this.expiryTime = expiryTime;\n }", "public Date getExpirationDate() {\r\n return expirationDate;\r\n }", "@Override\n\tprotected void setNextSiegeDate()\n\t{\n\t\tif(_siegeDate.getTimeInMillis() < Calendar.getInstance().getTimeInMillis())\n\t\t{\n\t\t\t_siegeDate = Calendar.getInstance();\n\t\t\t// Осада не чаще, чем каждые 4 часа + 1 час на подготовку.\n\t\t\tif(Calendar.getInstance().getTimeInMillis() - getSiegeUnit().getLastSiegeDate() * 1000L > 14400000)\n\t\t\t\t_siegeDate.add(Calendar.HOUR_OF_DAY, 1);\n\t\t\telse\n\t\t\t{\n\t\t\t\t_siegeDate.setTimeInMillis(getSiegeUnit().getLastSiegeDate() * 1000L);\n\t\t\t\t_siegeDate.add(Calendar.HOUR_OF_DAY, 5);\n\t\t\t}\n\t\t\t_database.saveSiegeDate();\n\t\t}\n\t}", "@Test\r\n public void testIsExpiredToday_ExpirationDateToday_ExpirationDateLaterTime() {\r\n doTest(TEST_DATE_2_TODAY, TEST_DATE_3_TODAY, false);\r\n }", "public final void setExpiryTime(long expire) {\n\t\tm_tmo = expire;\n\t}", "public Builder clearExpirationDate() {\n bitField0_ = (bitField0_ & ~0x00000200);\n expirationDate_ = 0L;\n\n return this;\n }", "public Integer getExpiry() {\n return expiry;\n }", "public long getExpirationDate() {\n return expirationDate_;\n }", "public static void setExpireDate(ParsePush push, long date ) {\t \n\t\tpush.setExpirationTime(date);\n\t}", "public void setExpireDate(Date expireDate) {\n\t\tthis.expireDate = expireDate;\n\t}", "public SIPDateOrDeltaSeconds getExpiryDate() {\n return expiryDate ;\n }", "public java.util.Calendar getExpiryDate() {\r\n return expiryDate;\r\n }", "public final int getExpiresAfter() {\n return 0;\n }", "@SuppressWarnings(\"unused\")\n void expire();", "private void setDaysSinceLastExposure(int days){\n new ExposureNotificationSharedPreferences(getApplicationContext()).setDaysSinceLastExposure(days);\n }", "public void setExpirationTime(Date expirationTime) {\n this.expirationTime = expirationTime;\n }", "@Override\n\tpublic java.util.Date getExpiration_Date() {\n\t\treturn _news_Blogs.getExpiration_Date();\n\t}", "public void setActivationDate() {\r\n\t\tif(this.removalDate != null) {\r\n\t\t\tthrow new RuntimeException(\"This item has already been activated\");\r\n\t\t}\r\n\t\tthis.activationDate = new Date(); \r\n\t\tGregorianCalendar cal = new GregorianCalendar();\r\n\t\t\r\n\t\t// set date for test\r\n\t\t//cal.set(2010, 10, 29, 02, 55);\r\n\t\t\r\n\t\t\r\n\t\tcal.add(GregorianCalendar.HOUR_OF_DAY, this.itemType.getItemDuration());\r\n\t\tthis.removalDate = cal.getTime();\r\n\t}", "public long getExpirationDate() {\n return expirationDate_;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public void setExpirationDate(Timestamp aExpirationDate) {\n expirationDate = aExpirationDate;\n }", "@Given(\"^that the expiry date of Licence is in (\\\\d+) days$\")\n public void that_the_expiry_date_of_Licence_is_in_days(int arg1) throws Throwable {\n driverUser = new DriverUser(LocalDate.now().plusDays(arg1), LocalDate.now(), \"nu;;\", \"null\");\n }", "@Override\n\tpublic void setTokenExpiryTime(long arg0) {\n\t\t\n\t}", "int getExpiryTimeSecs();", "@Override\n public final double getExpiration() {\n return safetyHelper.getExpiration();\n }", "public void setEffectiveDate(java.util.Date value);", "public String getExpirationDate() { return date; }", "public Date getEXPIRY_DATE() {\r\n return EXPIRY_DATE;\r\n }", "public int checkExpiryDate(LocalDate today) {\n\n final int limit = 100;\n long expirationDate = Duration.between(\n this.food.getCreateDate().atTime(0, 0), this.food.getExpiryDate().atTime(0, 0)\n ).toDays();\n long goneDate = Duration.between(\n this.food.getCreateDate().atTime(0, 0), today.atTime(0, 0)\n ).toDays();\n\n return (int) (limit * goneDate / expirationDate);\n\n }", "public void setBoostExpiration(){\r\n\t\tboostExpiration = GameController.getTimer() + 1000000000l * length;\r\n\t}", "public void setExpiryTime(long ldtExpiry)\n {\n m_metaInf.setExpiryTime(ldtExpiry);\n }", "public Date getExpiryDateForPoints(TransferPointSetting transferPointSetting ) {\n\n // Get the number of days validity\n int numDays = transferPointSetting.getTpsTransferredPointValidity();\n\n // Return the date\n return new Date(generalUtils.addDaysToToday(numDays).getTime());\n\n\n }" ]
[ "0.666395", "0.6556265", "0.650057", "0.6289192", "0.6275972", "0.6244506", "0.62189686", "0.6071396", "0.5993003", "0.5986625", "0.5983848", "0.59454525", "0.5924184", "0.59222376", "0.5900566", "0.5870483", "0.58634734", "0.5832516", "0.5829329", "0.58186203", "0.5809696", "0.57832444", "0.5729752", "0.5728234", "0.5726249", "0.57235533", "0.5713543", "0.5708284", "0.5703545", "0.5661858", "0.565877", "0.5625175", "0.5625175", "0.56079817", "0.56044376", "0.55778956", "0.5560311", "0.55475855", "0.5517517", "0.5514655", "0.5513332", "0.55061364", "0.5505789", "0.5491844", "0.548668", "0.5480654", "0.5462729", "0.5460902", "0.5451902", "0.54477733", "0.5413444", "0.5413205", "0.5412839", "0.54117435", "0.54014575", "0.54014575", "0.54014575", "0.54014575", "0.5400625", "0.53892314", "0.5374772", "0.53725743", "0.53717613", "0.5346049", "0.53441924", "0.5337502", "0.532583", "0.5312045", "0.5311091", "0.5305741", "0.5304235", "0.52996653", "0.5292113", "0.5286087", "0.5279058", "0.5278819", "0.5277254", "0.52713394", "0.5263736", "0.5261023", "0.5251696", "0.52456975", "0.5235031", "0.5231074", "0.5206318", "0.51990896", "0.5195006", "0.5195006", "0.5192858", "0.5189409", "0.5183813", "0.5174602", "0.5157038", "0.5142261", "0.5140452", "0.5134951", "0.51302063", "0.512879", "0.51171875", "0.51111287" ]
0.8692173
0
Removes the insurance information data from the User object.
private void removeInsuranceInformation() { //remove insurance information InsuranceCompany[] emptyInsurance = new InsuranceCompany[0]; user.setInsuranceInfo(emptyInsurance); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void clearUser() { user_ = null;\n \n }", "private void removeSpUserInfo() {\n\t\tPreferencesHelper preferencesHelper = new PreferencesHelper(\n\t\t\t\tChangeLoginActivity.this);\n\t\tpreferencesHelper.remove(\"uid\");\n\t\tpreferencesHelper.remove(\"LOGIN_USER_EMAIL\");\n\t\tpreferencesHelper.remove(\"nickName\");\n\t\tpreferencesHelper.remove(\"LOGIN_USER_ICON\");\n\t\tpreferencesHelper.remove(\"LOGIN_USER_ALREADY_LOGIN\");\n\t\tpreferencesHelper.remove(\"LOGIN_PASSWORD\");\n\t\tpreferencesHelper.remove(\"LOGIN_USER_ID\");\n\t\tpreferencesHelper.remove(\"LOGIN_USER_NAME\");\n\t\tpreferencesHelper.remove(\"LOGIN_USER_PHONE\");\n\t}", "private void clearObjUser() { objUser_ = null;\n \n }", "public void removedetails(){\n SharedPreferences.Editor editor = userDetails.edit();\n editor.clear();\n editor.commit();\n\n }", "public void remove() {\n session.removeAttribute(\"remoteUser\");\n session.removeAttribute(\"authCode\");\n setRemoteUser(\"\");\n setAuthCode(AuthSource.DENIED);\n }", "private void clearUser() {\n user_ = emptyProtobufList();\n }", "public void resetData() {\n user = new User();\n saveData();\n }", "public static void deleteUser() {\n REGISTRATIONS.clear();\n ALL_EVENTS.clear();\n MainActivity.getPreferences().edit()\n .putString(FACEBOOK_ID.get(), null)\n .putString(USERNAME.get(), null)\n .putString(LAST_NAME.get(), null)\n .putString(FIRST_NAME.get(), null)\n .putString(GENDER.get(), null)\n .putString(BIRTHDAY.get(), null)\n .putString(EMAIL.get(), null)\n .putStringSet(LOCATIONS_INTEREST.get(), null)\n .apply();\n }", "public HiveRemoveUserFromInitiative(Context context){\n this.context = context;\n }", "public void removeCurrentUser() {\n currentUser.logout();\n currentUser = null;\n indicateUserLoginStatusChanged();\n }", "void clearCurrentUser() {\n currentUser = null;\n }", "public String deleteUserDetails() {\n\r\n EntityManager em = CreateEntityManager.getEntityManager();\r\n EntityTransaction etx = em.getTransaction(); \r\n\r\n try { \r\n etx.begin(); \r\n if (golfUserDetails.getUserId() != null) {\r\n em.remove(em.merge(golfUserDetails));\r\n }\r\n etx.commit();\r\n em.close();\r\n } catch (Exception ex) {\r\n System.out.println(\"deleteCourseDetails - remove : Exception : \" + ex.getMessage());\r\n }\r\n \r\n return displayHomePage();\r\n }", "void unloadUserData();", "public static void clearUserAssociation(@NonNull Context context) {\n String currentUserId = null;\n SharedPreferences prefs = context.getSharedPreferences(SharedPrefs.PREFS_FILE, Context.MODE_PRIVATE);\n\n synchronized (userIdLocker) {\n currentUserId = prefs.getString(SharedPrefs.KEY_USER_IDENTIFIER, null);\n }\n\n JSONObject props = new JSONObject();\n try {\n props.put(\"oldUserIdentifier\", currentUserId);\n } catch (JSONException e) {\n e.printStackTrace();\n return;\n }\n\n trackEvent(context, AnalyticsContract.EVENT_TYPE_CLEAR_USER_ASSOCIATION, props);\n\n synchronized (userIdLocker) {\n SharedPreferences.Editor editor = prefs.edit();\n editor.remove(SharedPrefs.KEY_USER_IDENTIFIER);\n editor.apply();\n }\n\n OptimoveInApp.getInstance().handleInAppUserChange(context, Optimove.getConfig());\n }", "void unloadUser(KingdomUser user);", "@Override\n\tpublic void removeAll() {\n\t\tfor (UserStatistics userStatistics : findAll()) {\n\t\t\tremove(userStatistics);\n\t\t}\n\t}", "public void removeUser(){\n googleId_ = User.getDeletedUserGoogleID();\n this.addToDB(DBUtility.get().getDb_());\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 removeUser(Customer user) {}", "public void deleteUserRecord() {\n\t\tSystem.out.println(\"Calling deleteUserRecord() Method To Delete User Record\");\n\t\tuserDAO.deleteUser(user);\n\t}", "@Override\n\tpublic void logout()\n\t{\n\t\tthis.user = null;\n\t}", "private void removeUser(int index) {\n ensureUserIsMutable();\n user_.remove(index);\n }", "public void clearUserTable() {\n\t\tSQLDelete deleteStatament = new SQLDelete();\n\t\tdeleteStatament.clearUserTable();\n\t}", "public void removeAdminOnIndividualFromSystemUser(Individual i, SystemUser user);", "public void removeProfile(){\n Database db = Database.getInstance(context);\n db.getWritableDatabase().delete(PROFILE_TABLE, null, null);\n }", "CratePrize removeEditingUser(Player player);", "void unsetCustomsDetails();", "@Override\n public void removeAddedBy(CsldUser toRemove) {\n }", "@Override\n\tpublic String deleteUser(UserKaltiaControlVO userKaltiaControl) {\n\t\treturn null;\n\t}", "public void removeUser(UserInfo userInfo) {\n\t\tthis.mUsers.remove(userInfo);\n\t}", "public void removeAddOn(InsuredPersonAddOnDTO insuredPersonAddOnDTO) {\n\t\tinsuredPersonInfoDTO.removeInsuredPersonAddOn(insuredPersonAddOnDTO);\n\t}", "@Override\n\tpublic void deleteUser() {\n\t\tLog.d(\"HFModuleManager\", \"deleteUser\");\n\t}", "protected void remove(User<PERM> user) {\n\t\tuserMap.remove(user.principal.getName());\n\t}", "static void effacerEnregistrer(){\n users.clear();\n }", "public void logoutCurrentUser() {\n currentUser = null;\n }", "@Override\r\n public void clientRemoveUser(User user) throws RemoteException, SQLException\r\n {\r\n gameListClientModel.clientRemoveUser(user);\r\n }", "private void removeUser(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\ttry {\n\t\t\tPrintWriter out = res.getWriter();\n\t\t\tPreferenceDB.removePreferencesUser(Long.parseLong(req.getParameter(Constants.USER_IDENTIFIER)));\n\t\t\tif (UserDB.getnameOfUser(Long.parseLong(req.getParameter(Constants.USER_IDENTIFIER))) == null)\n\t\t\t\tout.print(\"ok\");\n\t\t\tUserDB.removeUser(Long.parseLong(req.getParameter(Constants.USER_IDENTIFIER)));\n\t\t\tout.print(\"ok\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tres.setStatus(HttpServletResponse.SC_BAD_REQUEST);\n\t\t}\n\t}", "public static void removeUserAge(Context context) {\n\n context.getSharedPreferences(FILE_NAME, 0)\n .edit()\n .remove(USER_AGE_KEY)\n .apply();\n }", "void remove(User user) throws SQLException;", "private void removeYourCar(Car user) {\r\n\r\n cars.removeCar(user);\r\n checkCarIsListed(user);\r\n }", "@Override\n\tpublic void removeUser(int id) {\n\t\t\n\t}", "void unFollow(User user);", "public void clear() {\n double invested = 0.0;\n try {\n invested = Math.round(model.getPriceTotal(viewState.getUserName().getName()) * 100.0) / 100.0;\n } catch (Exception e) {\n e.printStackTrace();\n }\n double moneyBalance = 0.0;\n try {\n moneyBalance = Math.round(model.getBalance(viewState.getUserName()) * 100.0) / 100.0;\n } catch (Exception e) {\n e.printStackTrace();\n }\n value.setValue(invested);\n total.setValue(Math.round((invested + moneyBalance) * 100.0) / 100.0);\n balance.setValue(moneyBalance);\n user.setValue(viewState.getUserName().toString());\n }", "private void clearAccounts() {\n userAccountListController.getUserAccountList().setAccountOfInterest(null);\n userAccountListController.getUserAccountList().setActiveCareProvider(null);\n }", "public static void deleteUserData(final Context context) {\n log.info(\"Usuario Eliminado\");\n inicializaPreferencias(context);\n sharedPreferencesEdit.remove(Constantes.USER);\n sharedPreferencesEdit.commit();\n }", "protected void ClearData() {\n\t\t// TODO Auto-generated method stub\n\t\n\t\t sharedPreferences = this.getSharedPreferences(MyPREFERENCES, Context.MODE_PRIVATE);\n\t\t Editor editor = sharedPreferences.edit();\n\t\t if(sharedPreferences.contains(\"username\")||sharedPreferences.contains(\"password\")){\n\t\t\t editor.remove(\"username\");\n\t\t\t editor.remove(\"password\");\n\t\t }\n\t\t editor.clear();\n\t\t editor.commit();\n\t}", "void removeUser(Long id);", "public void logoutUser() {\n editor.remove(Is_Login).commit();\n editor.remove(Key_Name).commit();\n editor.remove(Key_Email).commit();\n editor.remove(KEY_CUSTOMERGROUP_ID).commit();\n // editor.clear();\n // editor.commit();\n // After logout redirect user to Loing Activity\n\n }", "public static void signOut(String name, Session user) {\n playerList.remove(name);\n user.removeAttribute(\"player\");\n }", "public void removeMiningInfo(String userAddress, long depositNumber) {\n MiningInfo miningInfo = mingUsers.get(userAddress);\n miningInfo.removeMiningDetailInfoByNumber(depositNumber);\n if (miningInfo.getMiningDetailInfos().size() == 0) {\n mingUsers.remove(userAddress);\n }\n }", "@Override\n\tpublic void removeMember(User user) throws Exception {\n\n\t}", "public void deleteEducation() {\n workerPropertiesController.deleteEducation(myEducationCollection.getRowData()); \n // usuniecie z bazy\n getUser().getEducationCollection().remove(myEducationCollection.getRowData()); \n // usuniecie z obiektu usera ktory mamy zapamietany w sesji\n }", "void remove(User user) throws AccessControlException;", "public void removePlayer(Person user) {\r\n\t\trooms[user.getY()][user.getX()].removeOccupant(user);\r\n\t}", "@Override\n\tpublic void delete(User entity) {\n\t\tuserlist.remove(String.valueOf(entity.getDni()));\n\t}", "public void logoutCurrentUser() {\n mAuth.signOut();\n this.loggedInUser = null;\n }", "public void removeUser(TIdentifiable user) {\r\n\t int row = m_users.getIndex(user);\r\n\t if (row >= 0) {\r\n\t m_users.removeID(user);\r\n\t m_current_users_count--;\r\n\t // shift the lower rows up:\r\n\t for (int b=row; b < m_current_users_count; b++) \r\n\t for (int a=0; a < m_current_resources_count; a++)\r\n\t m_associations[a][b] = m_associations[a][b + 1];\r\n // clean up that last row:\t \r\n for (int a=0; a < m_current_resources_count; a++)\r\n m_associations[a][m_current_users_count] = null;\r\n\t }\r\n }", "public void Logout(){\n preferences.edit().remove(userRef).apply();\n }", "@Override\r\n\tpublic User editdata(User usr) {\n\t\treturn null;\r\n\t}", "@Test\n public void testCleanupCurrentUser_NonOnBehalfUser() throws Exception {\n idService.cleanUpCurrentUser();\n // user must still exist\n PlatformUser user = getDomainObject(supplierAdminUser,\n PlatformUser.class);\n assertNotNull(user);\n }", "private void clearUserId() {\n \n userId_ = getDefaultInstance().getUserId();\n }", "@Override\n\tpublic void deleteUser(user theUser) {\n\t\t\n\t}", "public void removeUserUI() throws IOException {\n System.out.println(\"Remove user: id\");\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\" \");\n Long id = Long.parseLong(a[0]);\n try\n {\n User user = service.removeUser(id);\n if (user != null)\n System.out.println(\"Deleted \" + user.toString());\n else\n System.out.println(\"There was no user with this ID!\");\n }\n catch(IllegalArgumentException ex)\n {\n System.out.println(ex.getMessage());\n }\n }", "@Transactional\n public void removeUserPhoto(String login) throws Exception {\n User user = userRepository.findByUsername(login);\n user.setPhoto(null);\n userRepository.save(user);\n logger.info(\"Removed photo user: {} {}\", user.getFirstName(), user.getLastName());\n }", "public static void remove() {\n\t\tTUser_CACHE.remove();\n\t}", "public void eraseData() {\n\t\tname = \"\";\n\t\tprice = 0.0;\n\t\tquantity = 0;\n\t}", "public void removeUser(User user) throws UserManagementException;", "public void declinePermission(String objectId, User user) throws UserManagementException;", "@Override\r\n public void userRemovedOnServer(User user) throws RemoteException, SQLException\r\n {\r\n property.firePropertyChange(\"userRemoved\", null, user);\r\n }", "@AfterAll\r\n public void cleanUp() {\r\n\r\n UserEto savedUserFromDb = this.usermanagement.findUserByName(\"testUser\");\r\n\r\n if (savedUserFromDb != null) {\r\n this.usermanagement.deleteUser(savedUserFromDb.getId());\r\n }\r\n }", "public void deleteDataInUserTable() throws SQLException {\n\t\tdeleteData(\"login_register\",idCondition);\n\t\tdeleteData(\"user_period\",\"APPLICANT_\"+idCondition);\n\t\tdeleteData(\"user_period\",\"APPLICANT_\"+idCondition);\n\t\tdeleteData(\"message\",idCondition);\n\t\tdeleteData(\"jp_user\",\"CI != 123\");\n\t}", "public void removeAuthInfo(AuthInfo info);", "@Override\n public void removeUser(int id) {\n Session session = this.sessionFactory.getCurrentSession();\n User u = (User) session.load(User.class, new Integer(id));\n if(null != u){\n session.delete(u);\n }\n logger.info(\"User deleted successfully, User details=\"+u);\n }", "int removeUser(User user);", "@Override\n protected void onDestroy() {\n super.onDestroy();\n UsersManager.getInstance().saveCurrentUser();\n }", "public void removeUser(String entity)\n\t{\n\t\tUser user = getUser(entity);\n\t\tif (user != null) {\n\t\t\tusersList.remove(user);\n\t\t\tusers.removeChild(user.userElement);\n\t\t}\n\t}", "public void unEnrollUsers() {\n CourseTypeTemplate courseTypeTemplate = getCourseTypeTemplate(courseType);\n if (courseTypeTemplate.isPastCourse.equals(\"true\")){\n String targetCourse = getFullCourseName(\"Coures\" + courseType);\n List<String> ins = getFullNameUsers(courseTypeTemplate.instructors);\n List<String> students = getFullNameUsers(courseTypeTemplate.students);\n try {\n enrollmentManager.unEnrollIns(targetCourse,ins);\n enrollmentManager.unEnrollStudents(targetCourse,students);\n } catch (InterruptedException e) {\n ATUManager.asserIsTrueAndReport(false,\"fails to unEnroll users\",\"\",\"\");\n }\n }\n }", "public void removeFromMDC()\n\t{\n\t\tMDC.remove(USER_ID);\n\t\tMDC.remove(HOST_IP);\n\t\tMDC.remove(REQUEST_ID);\n\t}", "public void deactivate(Person user) \r\n\t{\r\n\t\tdb.user_editUser(user.getUsername(), user.getFirstName(), user.getLastName(), \r\n\t\t\t\t\t\t user.getPassword(), user.getType(), 'N');\r\n\t}", "boolean unblockUser(User user);", "public void logout() {\n\n // Instance, user and token become null\n instance = null;\n user = null;\n authtoken = null;\n\n // Switch all the settings back to true\n isLifeStoryLinesOn = true;\n isFamilyTreeLinesOn = true;\n isSpouseLinesOn = true;\n isFatherSideOn = true;\n isMotherSideOn = true;\n isMaleEventsOn = true;\n isFemaleEventsOn = true;\n\n //Take care of resetting boolean logics use throughout app\n isLoggedIn = false;\n personOrSearch = false;\n startLocation = null;\n eventID = null;\n\n // Clear all lists\n\n people.clear();\n events.clear();\n personEvents.clear();\n currentPersonEvents.clear();\n eventTypes.clear();\n\n childrenMap.clear();\n maleSpouse.clear();\n femaleSpouse.clear();\n paternalAncestorsMales.clear();\n paternalAncestorsFemales.clear();\n maternalAncestorsMales.clear();\n maternalAncestorsFemales.clear();\n }", "@Override\n\tpublic Boolean deleteUser(User user) {\n\t\treturn null;\n\t}", "private void deleteHocSinh() {\n\t\tString username = (String) table1\n\t\t\t\t.getValueAt(table1.getSelectedRow(), 0);\n\t\thocsinhdao.deleteUser(username);\n\t}", "@Override\n\tpublic void undo() {\n\t\tsecurity.off();\n\t}", "@Override\n\tpublic void delete_User(String user_id) {\n\t\tuserInfoDao.delete_User(user_id);\n\t}", "public void deleteUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk deleteUser\");\r\n\t}", "public Builder clearObjUser() { copyOnWrite();\n instance.clearObjUser();\n return this;\n }", "private void clearUserId() {\n \n userId_ = 0;\n }", "Integer removeUserByUserId(Integer user_id);", "public void clearLoginInfo(){\n ProfileSharedPreferencesRepository.getInstance(application).clearLoginInfo();\n }", "private void removeFromCache(User user) {\r\n this.removeFromCache(user.getUsername());\r\n\r\n }", "void removeUser(String uid);", "public Builder clearUser() {\n if (userBuilder_ == null) {\n user_ = null;\n onChanged();\n } else {\n user_ = null;\n userBuilder_ = null;\n }\n\n return this;\n }", "public Builder clearUser() {\n if (userBuilder_ == null) {\n user_ = null;\n onChanged();\n } else {\n user_ = null;\n userBuilder_ = null;\n }\n\n return this;\n }", "@Override\n\tpublic void removeUser(String username, Map<String, User> map) {\n\t\tuserdata.open();\n\t\tuserdata.deleteUser(map.get(username));\n\t\tuserdata.close();\n\t}", "@Override\n public void valueUnbound(HttpSessionBindingEvent arg0) {\n System.out.println(\"在session中移除LoginUser对象(name = \"+ this.getName() +\"), sessionid = \" + arg0.getSession().getId());\n }", "public void deletetask(UserDto user);", "private void clearUserId() {\n \n userId_ = 0L;\n }", "public void clearUserSession() {\n editor.clear();\r\n editor.commit();\r\n }", "void unsetIdVerificationResponseData();" ]
[ "0.6787309", "0.6520657", "0.63955885", "0.6319409", "0.6290862", "0.62463754", "0.6218243", "0.6164408", "0.6152881", "0.6126711", "0.6126416", "0.6115019", "0.60884005", "0.6026208", "0.597144", "0.595488", "0.59278834", "0.5914208", "0.58875793", "0.5869663", "0.5865271", "0.5850988", "0.5842532", "0.58248276", "0.5822827", "0.5816438", "0.5802942", "0.5781843", "0.5775592", "0.5748353", "0.5735528", "0.5731951", "0.57184505", "0.5689759", "0.5689335", "0.5686927", "0.56842387", "0.56738377", "0.5662202", "0.56605786", "0.56536907", "0.5651264", "0.56508094", "0.5645093", "0.56421393", "0.56406546", "0.56394", "0.56385064", "0.5638003", "0.5637187", "0.5628929", "0.5626669", "0.56081593", "0.5598339", "0.5582568", "0.55650806", "0.5564943", "0.55638283", "0.5527932", "0.5527073", "0.55254805", "0.5522862", "0.55166745", "0.55124384", "0.55104303", "0.55065536", "0.5506091", "0.5505082", "0.550449", "0.54947555", "0.54919946", "0.5489884", "0.54897386", "0.5488998", "0.5484304", "0.5481147", "0.54717064", "0.5469749", "0.54571086", "0.54490364", "0.5441783", "0.5440189", "0.5438033", "0.5437456", "0.5429736", "0.5420069", "0.5418791", "0.54184204", "0.5414674", "0.5414332", "0.5412264", "0.54111063", "0.5411018", "0.5411018", "0.5408913", "0.5401415", "0.54010904", "0.5400765", "0.5391253", "0.53892285" ]
0.8460572
0
Sample Code used found here.
private Bitmap encodeToQrCode(String text) throws WriterException { BitMatrix bitMatrix; try { bitMatrix = new MultiFormatWriter().encode( text, BarcodeFormat.DATA_MATRIX.QR_CODE, QR_CODE_WIDTH, QR_CODE_WIDTH, null ); } catch (IllegalArgumentException Illegalargumentexception) { return null; } int bitMatrixWidth = bitMatrix.getWidth(); int bitMatrixHeight = bitMatrix.getHeight(); int[] pixels = new int[bitMatrixWidth * bitMatrixHeight]; for (int y = 0; y < bitMatrixHeight; y++) { int offset = y * bitMatrixWidth; for (int x = 0; x < bitMatrixWidth; x++) { pixels[offset + x] = bitMatrix.get(x, y) ? context.getResources().getColor(R.color.qrCodeBlack):context.getResources().getColor(R.color.qrCodeWhite); } } Bitmap bitmap = Bitmap.createBitmap(bitMatrixWidth, bitMatrixHeight, Bitmap.Config.ARGB_4444); bitmap.setPixels(pixels, 0, QR_CODE_WIDTH, 0, 0, bitMatrixWidth, bitMatrixHeight); return bitmap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private static void oneUserExample()\t{\n\t}", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "void pramitiTechTutorials() {\n\t\n}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "public void foundationGrab(){\n\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "private void initialize() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "public static void thisDemo() {\n\t}", "public static void main(String[]args) {\n\t\n\t\t\n\n}", "@Override\n public void perish() {\n \n }", "public static void main() {\n \n }", "@Override\n protected void setup() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "private void kk12() {\n\n\t}", "public void mo4359a() {\n }", "public void hello(){\n\t\t\r\n \t\r\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "private void test() {\n\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "public void setup() {\r\n\r\n\t}", "@Override\n public void feedingHerb() {\n\n }", "private void getStatus() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n public void setup() {\n }", "@Override\n public void setup() {\n }", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "public void setup() {\n }", "private void init() {\n\n\t}", "@Override\n public void setup() {\n\n }", "protected void onFirstUse() {}", "public static void listing5_14() {\n }", "public static void example1() {\n // moved to edu.jas.application.Examples\n }", "@Override\n public void init() {\n\n }", "public void start( )\n {\n // Implemented by student.\n }", "@Override\n public void initialize() { \n }", "public static void main(String[] args) {\n \n \n \n \n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "public void gored() {\n\t\t\n\t}", "@Override\n public void initialize() {\n \n }", "public void initialize () {\n\n }", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "private void initialize() {\n\t}", "private void start() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "public static void main(String[] args)\r\t{", "private void init() {\n\n\n\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n\tpublic void initialize() {\n\t\t\n\t}", "private void Initialized_Data() {\n\t\t\r\n\t}", "private test5() {\r\n\t\r\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "public static void main(String[] args) {\r\n// Use for unit testing\r\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args) {\n \n \n }", "@Override\n public void initialize() {\n\n }", "@Override\n public void initialize() {\n\n }", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "@Override\n\tprotected void interr() {\n\t}", "protected void mo6255a() {\n }", "public static void main(String[] args) {\n \n \n \n\t}", "@Override\n\tpublic void initialize() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }" ]
[ "0.6126603", "0.6019472", "0.59830505", "0.58835727", "0.58783144", "0.58447456", "0.58070123", "0.58070123", "0.58070123", "0.58070123", "0.58070123", "0.58070123", "0.57904613", "0.5784621", "0.5784621", "0.57809114", "0.5779958", "0.5765205", "0.57602334", "0.5729644", "0.57275623", "0.5720673", "0.5717425", "0.56903917", "0.5682575", "0.5682575", "0.5682575", "0.5682575", "0.5682575", "0.5682575", "0.5682575", "0.56714934", "0.5650456", "0.5647926", "0.5647444", "0.56387585", "0.56365436", "0.56359714", "0.5632962", "0.56305915", "0.56247187", "0.5624573", "0.56099087", "0.56099087", "0.56077975", "0.560058", "0.55968446", "0.5596251", "0.5593267", "0.55872273", "0.55762136", "0.5567784", "0.55642974", "0.55619943", "0.5561801", "0.55605024", "0.55605024", "0.55543494", "0.55543494", "0.55543494", "0.5552735", "0.5551637", "0.55459994", "0.55383354", "0.55383354", "0.55383354", "0.55383354", "0.5537244", "0.5532702", "0.55311376", "0.55311376", "0.55304295", "0.5530069", "0.5529496", "0.5529496", "0.5529496", "0.5529496", "0.5529496", "0.5529496", "0.5529496", "0.5529496", "0.5529496", "0.5529496", "0.55155355", "0.5513063", "0.5512117", "0.5505063", "0.5500616", "0.54986644", "0.54962283", "0.5491419", "0.5491419", "0.54843926", "0.54843926", "0.5481413", "0.548054", "0.54732436", "0.5473187", "0.5469824", "0.5469546", "0.5469546" ]
0.0
-1
Created by hoon on 20150523.
public interface ImageUpload { void imageUploadToServer(int selectedImageResourceId); }
{ "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}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\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 tires() {\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\n\tpublic void anular() {\n\n\t}", "public void mo38117a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "private void poetries() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo4359a() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void init() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\n\tpublic void ligar() {\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\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 sacrifier() {\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}", "@Override\n public void init() {}", "@Override\r\n\tpublic void init() {}", "private void m50366E() {\n }", "@Override\n protected void init() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private void kk12() {\n\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public void mo55254a() {\n }", "@Override\n protected void initialize() \n {\n \n }", "public void mo6081a() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "protected void mo6255a() {\n }", "public void mo21877s() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "private void strin() {\n\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "private void init() {\n\n\n\n }", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}" ]
[ "0.6158396", "0.6019332", "0.5968125", "0.5950814", "0.5849458", "0.5844088", "0.583892", "0.583892", "0.58203954", "0.5779469", "0.5757364", "0.5739715", "0.57375246", "0.5709002", "0.57022876", "0.5696821", "0.56951714", "0.5687195", "0.5682111", "0.5677126", "0.5677126", "0.5677126", "0.5677126", "0.5677126", "0.56737053", "0.5663413", "0.56609905", "0.5660276", "0.5656375", "0.56452566", "0.5642785", "0.56111276", "0.5608854", "0.5608854", "0.5608854", "0.5608854", "0.5608854", "0.5608854", "0.5608854", "0.5608806", "0.56004363", "0.56001115", "0.5584895", "0.5574836", "0.5574733", "0.55635685", "0.55605793", "0.55605793", "0.5558804", "0.5547558", "0.55470455", "0.55470455", "0.55470455", "0.5545903", "0.5545903", "0.5545903", "0.55425876", "0.5539056", "0.5539056", "0.5539056", "0.55381507", "0.5536544", "0.5531837", "0.5524988", "0.5523755", "0.5523755", "0.55203134", "0.55203134", "0.55203134", "0.55203134", "0.55203134", "0.55203134", "0.5514194", "0.55129653", "0.5511668", "0.5497496", "0.54906625", "0.5487772", "0.5486449", "0.5486449", "0.5482537", "0.54750794", "0.54743695", "0.54735684", "0.5471424", "0.5467685", "0.5464674", "0.5463983", "0.54496306", "0.5448422", "0.5440099", "0.54190254", "0.54099697", "0.5388582", "0.5381854", "0.5381837", "0.53816044", "0.53814054", "0.5378974", "0.537239", "0.5370626" ]
0.0
-1
Gets the amount value for this BuyRequestType.
public java.math.BigDecimal getAmount() { return amount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public io.lightcone.data.types.Amount getAmount() {\n if (amountBuilder_ == null) {\n return amount_ == null ? io.lightcone.data.types.Amount.getDefaultInstance() : amount_;\n } else {\n return amountBuilder_.getMessage();\n }\n }", "public io.lightcone.data.types.Amount getAmount() {\n return amount_ == null ? io.lightcone.data.types.Amount.getDefaultInstance() : amount_;\n }", "public CoreComponentTypes.apis.ebay.BasicAmountType getAmount() {\r\n return amount;\r\n }", "public Number getAmount() {\n return (Number) getAttributeInternal(AMOUNT);\n }", "public java.math.BigDecimal getAmount () {\r\n\t\treturn amount;\r\n\t}", "@ApiModelProperty(required = true, value = \"The transaction amount to be delivered to the recipient.\")\n public Double getAmount() {\n return amount;\n }", "public io.lightcone.data.types.AmountOrBuilder getAmountOrBuilder() {\n if (amountBuilder_ != null) {\n return amountBuilder_.getMessageOrBuilder();\n } else {\n return amount_ == null ?\n io.lightcone.data.types.Amount.getDefaultInstance() : amount_;\n }\n }", "public BigDecimal getAmount() {\n return this.amount;\n }", "@ApiModelProperty(required = true, value = \"The amount to transfer from account\")\n @JsonProperty(JSON_PROPERTY_AMOUNT)\n @JsonInclude(value = JsonInclude.Include.ALWAYS)\n\n public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\r\n return amount;\r\n }", "public BigDecimal getAmount() \r\n {\t\r\n \treturn amount;\t\r\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public double getAmount() {\r\n\t\treturn amount;\r\n\t}", "public double getAmount() {\r\n\t\treturn amount;\r\n\t}", "public BigDecimal getAmount() {\n return this.amount;\n }", "public String getAmount() {\n\t\treturn amount;\n\t}", "public double getAmount() {\n\t\treturn amount;\n\t}", "public double getAmount() {\n\t\treturn amount;\n\t}", "public double getAmount() {\n\t\treturn amount;\n\t}", "public Integer getAmount() {\n return amount;\n }", "public Integer getAmount() {\n return amount;\n }", "public Integer getAmount() {\n return amount;\n }", "public int getAmount() {\n return amount_;\n }", "public long getAmount() {\n\t\treturn amount;\n\t}", "public io.lightcone.data.types.AmountOrBuilder getAmountOrBuilder() {\n return getAmount();\n }", "public static int getAmount() {\n\t\treturn amount;\n\t}", "public BigDecimal getAmount()\n {\n return amount;\n }", "public Float getAmount() {\n\t\treturn amount;\n\t}", "public BigDecimal getAMOUNT() {\r\n return AMOUNT;\r\n }", "public double getAmount() \r\n {\r\n assert(true);\r\n return amount;\r\n }", "BigDecimal getAmount();", "public int getAmount() {\n return amount_;\n }", "public String getAmount() {\n return amount;\n }", "public String getAmount() {\n return amount;\n }", "public String getAmount() {\r\n return this.amount;\r\n }", "@java.lang.Override\n public long getAmount() {\n return amount_;\n }", "public double getAmount() {\n return this.amount;\n }", "public double getAmount () {\r\n\t\treturn amount;\r\n\t}", "@Override\n\tpublic long getAmount() {\n\t\treturn amount;\n\t}", "public long getAmount() {\r\n return amount;\r\n }", "public long getAmount() {\n return amount;\n }", "public ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount getAmount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount target = null;\n target = (ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount)get_store().find_element_user(AMOUNT$6, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public String getRequestedAmount() {\n\t\treturn this.token.get(\"requestAmount\").toString();\n\t}", "public Double getAmount() {\r\n return amount;\r\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public String getAmount() {\n\n return amount.getText();\n }", "public Long getAmount() {\n return amount;\n }", "public Long getAmount() {\n return amount;\n }", "public Long getAmount() {\n return amount;\n }", "public Long getAmount() {\n return amount;\n }", "public Object getAmount() {\n\t\treturn null;\n\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount getAmount();", "public Double getTotalBuyMoney() {\r\n return totalBuyMoney;\r\n }", "public String getAmountCredited() {\n\t\twaitForControl(driver, LiveGuru99.WithdrawallPage.GET_AMOUNT_DEPOSIT, timeWait);\n\t\tString amount = getText(driver, LiveGuru99.WithdrawallPage.GET_AMOUNT_DEPOSIT);\n\t\treturn amount;\n\t}", "public int getAmount() {\n\t\treturn amount;\n\t}", "@ApiModelProperty(value = \"This is the sum of the OrderItemsAmount, DeliveryAmount, TipAmount and Voucher.Amount (which is usually negative) and OnlineOrderingFee It does include the OnlineOrderingFee\")\n public Double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public BigDecimal getPayAmount() {\n return payAmount;\n }", "public java.math.BigDecimal getTransactionAmount() {\r\n return transactionAmount;\r\n }", "public String getLocalCurrencyAmount() {\n return sendLocalCurrencyAmount;\n }", "public java.lang.Long getAmount () {\r\n\t\treturn amount;\r\n\t}", "public int getMoney() {\n return wallet.getMoney();\n }", "public BigDecimal getPayAmt() {\n\t\treturn payAmt;\n\t}", "@ApiModelProperty(value = \"A float value for amount.\")\n public Float getAmount() {\n return amount;\n }", "public int getAmount() {\r\n\t\treturn Amount;\r\n\t}", "public int amount() {\n return amount;\n }", "public java.math.BigDecimal getReceiveAmount() {\r\n return receiveAmount;\r\n }", "public int getAmount()\n\t{\n\t\treturn this.amount;\n\t}", "@Override\n public float getAmount() {\n return Float.parseFloat(inputAmount.getText());\n }", "public int getAmount() {\n return amount;\n }", "public int getAmount() {\n return amount;\n }", "public int getAmount() {\n return amount;\n }", "@java.lang.Override\n public long getAmount() {\n return instance.getAmount();\n }", "public CoreComponentTypes.apis.ebay.BasicAmountType getNetAmount() {\r\n return netAmount;\r\n }", "public Amount getAmount() {\n return amount;\n }", "public Number getRentAmount() {\n return (Number) getAttributeInternal(RENTAMOUNT);\n }", "public BigDecimal getPayAmt();", "public Double getTotalBuyFee() {\r\n return totalBuyFee;\r\n }", "public BigDecimal getTransAmt() {\n return transAmt;\n }", "public double getPaymentAmount() {\n\t\tdouble amount = 0.0;\n\t\tString content = \"\";\n\t\t\n\t\tWebElement temp = (new WebDriverWait(driver, waitTime))\n\t\t\t\t.until(ExpectedConditions.presenceOfElementLocated(By.id(\"totalAmt\")));\t\t\n\t\tcontent = temp.findElement(By.xpath(\"span[2]\")).getAttribute(\"innerHTML\");\n\t\tamount = Double.parseDouble(content);\n\t\treturn amount;\n\t}", "public double getAmountToPay() {\r\n\t\treturn amountToPay;\r\n\t}", "public double getAmount() {\r\n\t\treturn investmentAmount;\r\n\t}", "float getAmount();", "public float getAmount() {\n System.out.println(\"Account Balance:\" + amount);\n return amount;\n }", "public BigDecimal getTotalAmount() {\n return totalAmount;\n }", "public BigDecimal getSumAmount() {\r\n return sumAmount;\r\n }", "public double getAmount() { return amount; }" ]
[ "0.70975345", "0.6922924", "0.6891456", "0.67829716", "0.6613511", "0.6610336", "0.660358", "0.6590749", "0.65846634", "0.6571641", "0.6539683", "0.6512505", "0.6512505", "0.6512505", "0.6512505", "0.6512505", "0.6512505", "0.6512505", "0.6512505", "0.6509986", "0.6509986", "0.6487532", "0.6487519", "0.64818394", "0.64818394", "0.64818394", "0.6470443", "0.6470443", "0.6470443", "0.646613", "0.64440876", "0.6439229", "0.641243", "0.64058", "0.6395569", "0.6392404", "0.6382362", "0.6380304", "0.6370777", "0.631507", "0.631507", "0.6309777", "0.6304479", "0.62957245", "0.6280367", "0.62800467", "0.62764525", "0.62549263", "0.6243254", "0.62297606", "0.6216081", "0.62063825", "0.62063825", "0.62063825", "0.62063825", "0.62063825", "0.62063825", "0.62063825", "0.62034774", "0.6196704", "0.6196704", "0.6196704", "0.6196704", "0.6175747", "0.6172446", "0.615729", "0.6154799", "0.61448354", "0.61438906", "0.6143679", "0.6140773", "0.6132762", "0.6114606", "0.6099518", "0.6096853", "0.6063783", "0.60577977", "0.60214597", "0.6007163", "0.5988976", "0.59604794", "0.5955324", "0.5947721", "0.5947721", "0.5947721", "0.59408474", "0.5933687", "0.59239984", "0.5910339", "0.5906986", "0.59068024", "0.59017277", "0.59007657", "0.5894318", "0.58855885", "0.5882853", "0.5872855", "0.58663577", "0.5857152", "0.58404475" ]
0.6720149
4
Sets the amount value for this BuyRequestType.
public void setAmount(java.math.BigDecimal amount) { this.amount = amount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAmount(CoreComponentTypes.apis.ebay.BasicAmountType amount) {\r\n this.amount = amount;\r\n }", "void setAmount(ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount amount);", "public void setAmount (java.math.BigDecimal amount) {\r\n\t\tthis.amount = amount;\r\n\t}", "public void setAmount(int amount) {\n\t\tif (amount > 0) { // checks if amount is valid - larger than 0\n\t\t\tLocateRequest.amount = amount;\n\t\t} else {\n\t\t\tSystem.err.print(\"The amount provided is not valid\"); // print message that input is not valid\n\t\t}\n\t}", "public void setAmount( BigDecimal amount ) {\n this.amount = amount;\n }", "public void setAmount(BigDecimal amount) {\n this.amount = amount;\n }", "public void setAmount(BigDecimal amount) {\n this.amount = amount;\n }", "public void setAmount(BigDecimal amount) {\n this.amount = amount;\n }", "public void setAmount(BigDecimal amount) {\r\n this.amount = amount;\r\n }", "public void setAmount(double amount) {\r\n\t\tthis.amount = amount;\r\n\t}", "public void setAmount(ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount amount)\n {\n generatedSetterHelperImpl(amount, AMOUNT$6, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }", "public void setAmount (double amount) {\r\n\t\tthis.amount = amount;\r\n\t}", "public void setAmount(Number value) {\n setAttributeInternal(AMOUNT, value);\n }", "public Builder setAmount(int value) {\n bitField0_ |= 0x00000002;\n amount_ = value;\n onChanged();\n return this;\n }", "public void setAmount(double amount) {\n this.amount = amount;\n }", "public void setAmount(double amount) {\n this.amount = amount;\n }", "public void setAmount(double amount){\n try{\n if(amount>=0.0){\n this.amount=amount;\n }\n else {\n this.amount = 1;\n throw new SupplyOrderException(\"Invalid amount, resetted to 1\");\n }\n } catch(SupplyOrderException soe){\n soe.getMessage();\n }\n }", "public void setAmount(double amount) {\n\t\tthis.amount = amount;\n\t}", "public void setAmount(Float amount) {\n\t\tthis.amount = amount;\n\t}", "public void setAmount(int amount) {\n this.amount = amount;\n }", "public void setAmount(BigDecimal value) {\n this.amount = value;\n }", "public void setAmount(double value) {\n this.amount = value;\n }", "@Override\n public void setAmount(Asset amount) {\n this.amount = setIfNotNull(amount, \"The amount can't be null.\");\n }", "public void setAmount(String amount) {\r\n this.amount = amount;\r\n }", "public void setAmount(String amount) {\n this.amount = amount;\n }", "public ItemBuilder setAmount(int amount) {\r\n\t\tthis.amount = amount;\r\n\t\treturn this;\r\n\t}", "public void setAmount(double value) {\n this.amount = value;\n }", "public void setAmount(Double amount) {\r\n this.amount = amount;\r\n }", "public void setAmount(Double amount) {\n this.amount = amount;\n }", "public Builder setAmount(io.lightcone.data.types.Amount value) {\n if (amountBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n amount_ = value;\n onChanged();\n } else {\n amountBuilder_.setMessage(value);\n }\n\n return this;\n }", "public void setAmount(double amount) {\r\n\t\tthis.investmentAmount = amount;\r\n\t}", "public void setAmount(String amount) {\n\t\tthis.amount = amount;\n\t}", "@Override\n\tpublic void setAmount(long amount) {\n\t\tthis.amount = amount;\n\t}", "public void setAmount(Integer amount) {\n this.amount = amount;\n }", "public void setAmount(double value) {\r\n\t\tthis.amount = value;\r\n\t}", "public void setAmount(long amount) {\n\t\tthis.amount = amount;\n\t}", "public void setAMOUNT(BigDecimal AMOUNT) {\r\n this.AMOUNT = AMOUNT;\r\n }", "private void setAmount(long value) {\n bitField0_ |= 0x00000001;\n amount_ = value;\n }", "public void setTransactionAmount(java.math.BigDecimal transactionAmount) {\r\n this.transactionAmount = transactionAmount;\r\n }", "@ApiModelProperty(required = true, value = \"The transaction amount to be delivered to the recipient.\")\n public Double getAmount() {\n return amount;\n }", "public void setAmount (java.lang.Long amount) {\r\n\t\tthis.amount = amount;\r\n\t}", "public void setRentAmount(Number value) {\n setAttributeInternal(RENTAMOUNT, value);\n }", "public void setNetAmount(CoreComponentTypes.apis.ebay.BasicAmountType netAmount) {\r\n this.netAmount = netAmount;\r\n }", "public void setAmt(java.math.BigDecimal param) {\r\n this.localAmt = param;\r\n }", "public void setAmount(int moneyOption);", "public void setAmount(final double newAmount) {\n this.amount = newAmount;\n }", "@ApiModelProperty(required = true, value = \"The amount to transfer from account\")\n @JsonProperty(JSON_PROPERTY_AMOUNT)\n @JsonInclude(value = JsonInclude.Include.ALWAYS)\n\n public BigDecimal getAmount() {\n return amount;\n }", "public void setMoney(int moneyAmount) {\n\t\tsuper.setMoney(moneyAmount);\n\t}", "public EdgeNeon setAmount(double value) throws ParameterOutOfRangeException\n {\n\t\tif(value > 100.00 || value < 0.00)\n\t {\n\t throw new ParameterOutOfRangeException(value, 0.00, 100.00);\n\t }\n\n m_Amount = value;\n setProperty(\"amount\", value);\n return this;\n }", "public void setAmount(long value) {\r\n this.amount = value;\r\n }", "public CoreComponentTypes.apis.ebay.BasicAmountType getAmount() {\r\n return amount;\r\n }", "public void setAmount(String amount) {\n this.amount = amount == null ? null : amount.trim();\n }", "public void setAmount(Long amount) {\n this.amount = amount;\n }", "public void setAmount(Long amount) {\n this.amount = amount;\n }", "public void setAmount(Long amount) {\n this.amount = amount;\n }", "public void setAmount(Long amount) {\n this.amount = amount;\n }", "public Builder clearAmount() {\n bitField0_ = (bitField0_ & ~0x00000002);\n amount_ = 0;\n onChanged();\n return this;\n }", "public void setAmount(long amount);", "public Builder setMoney(int value) {\n bitField0_ |= 0x00080000;\n money_ = value;\n onChanged();\n return this;\n }", "public void setPayAmt (BigDecimal PayAmt);", "public void setAmount(double amount) throws IllegalArgumentException\r\n {\r\n if (amount < 0)\r\n {\r\n throw new IllegalArgumentException(\"Amount cannot be negative.\");\r\n }\r\n if (type==SupplyType.COUNT&&amount%1.0!=0)\r\n {\r\n throw new IllegalArgumentException(\"Countable units must be of \" +\r\n \t\t\"an integer quantity\");\r\n }\r\n this.amount = amount;\r\n }", "public Builder setAmount(long value) {\n copyOnWrite();\n instance.setAmount(value);\n return this;\n }", "public final PurchasedGiftCardDetailsBuilder<BLDRT> amount(final Long amount) {\r\n\t\t\tpurchasedGiftCardDetails.setAmount(amount);\r\n\t\t\treturn this;\r\n\t\t}", "@Override\r\n\tpublic void setAmountWithoutTax(Amount amount) {\r\n\t\tAmountType actualAmt = new AmountType();\r\n\t\tamount.copyTo(actualAmt);\r\n\t\tsuper.getActualAmount().add(actualAmt);\r\n\t}", "public SenderCharge(Double amount, Currency currency) {\n this.amount = amount;\n this.currency = currency;\n }", "public void setPayAmount(BigDecimal payAmount) {\n this.payAmount = payAmount;\n }", "public void setTransAmt(BigDecimal transAmt) {\n this.transAmt = transAmt;\n }", "@ApiModelProperty(value = \"A float value for amount.\")\n public Float getAmount() {\n return amount;\n }", "protected void setServiceCharge(double amount) {\n if (amount < 0) throw new IllegalArgumentException(\"Amount cannot be negative\");\n serviceCharge = amount;\n }", "public void changeAmount(double newAmount) {\n this.amount = newAmount;\n }", "public void setUnitAmount(BigDecimal unitAmount) {\n this.unitAmount = unitAmount;\n }", "public void setSaleAmount(double amount) {\n saleAmount = amount;\n }", "public void setTotal(BigDecimal amount){\r\n\t\ttotal = amount.doubleValue();\r\n\t}", "public void setWithdrawMoney(BigDecimal withdrawMoney) {\n this.withdrawMoney = withdrawMoney;\n }", "public void setWithdrawFee(BigDecimal withdrawFee) {\n this.withdrawFee = withdrawFee;\n }", "public void withdrawMoney(int amount) {\n wallet.withdraw(amount);\n }", "public void setSETTLED_PENALTY_AMOUNT(BigDecimal SETTLED_PENALTY_AMOUNT) {\r\n this.SETTLED_PENALTY_AMOUNT = SETTLED_PENALTY_AMOUNT;\r\n }", "public void setRequestNum(int amount){\n requestNum = amount;\n }", "public void setsaleamt(BigDecimal value) {\n setAttributeInternal(SALEAMT, value);\n }", "public void setAmountFloat(float amount) {\n BigDecimal newAmount = new BigDecimal(amount);\n int amountInt = newAmount.round(MathContext.DECIMAL32).multiply(new BigDecimal(100)).intValue();\n this.dollars = amountInt / 100;\n this.cents = amountInt - (dollars * 100);\n }", "public void setTaxAmount(CoreComponentTypes.apis.ebay.BasicAmountType taxAmount) {\r\n this.taxAmount = taxAmount;\r\n }", "public void transferTo(double dollarAmount) {\r\n\t\tthis.accountBalance = this.accountBalance + dollarAmount;\r\n\t}", "public void setTaxAmtPriceLimit (BigDecimal TaxAmtPriceLimit);", "public void setSETTLEMENT_AMOUNT(BigDecimal SETTLEMENT_AMOUNT) {\r\n this.SETTLEMENT_AMOUNT = SETTLEMENT_AMOUNT;\r\n }", "public void setNetAmount(MMDecimal netAmount) {\r\n this.netAmount = netAmount;\r\n }", "public Builder setCampaignprice(org.adscale.format.opertb.AmountMessage.Amount value) {\n if (campaignpriceBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n campaignprice_ = value;\n onChanged();\n } else {\n campaignpriceBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000004;\n return this;\n }", "public void setTaxAmount(double value) {\n this.taxAmount = value;\n }", "public Builder setExchangeprice(org.adscale.format.opertb.AmountMessage.Amount value) {\n if (exchangepriceBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n exchangeprice_ = value;\n onChanged();\n } else {\n exchangepriceBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000008;\n return this;\n }", "public void setPayAmt(BigDecimal PayAmt) {\n super.setPayAmt(PayAmt == null ? Env.ZERO : PayAmt);\n }", "public Money(float amount) {\n setAmountFloat(amount);\n }", "public void sendBidLimit(int amount) {\n sendMessage(Prefix.BIDLIMIT, \"\" + amount);\n }", "public void setPayAmt(BigDecimal payAmt) {\n\t\tthis.payAmt = payAmt;\n\t}", "public void setAmount(int C_Currency_ID, BigDecimal payAmt) {\n if (C_Currency_ID == 0) {\n C_Currency_ID = MClient.get(getCtx()).getC_Currency_ID();\n }\n setC_Currency_ID(C_Currency_ID);\n setPayAmt(payAmt);\n }", "public void deposit(BigDecimal amount) {\n this.setBalance(this.getBalance().add(amount));\n }", "public void setMoney(BigDecimal money) {\r\n this.money = money;\r\n }", "public void setMoney(BigDecimal money) {\r\n this.money = money;\r\n }", "public void setMoney(BigDecimal money) {\r\n this.money = money;\r\n }", "public void setMoney(BigDecimal money) {\n this.money = money;\n }", "public void setMoney(BigDecimal money) {\n this.money = money;\n }", "public void setMoney(BigDecimal money) {\n this.money = money;\n }" ]
[ "0.721089", "0.7009424", "0.6986176", "0.6726511", "0.6720102", "0.66851586", "0.66851586", "0.66851586", "0.66778934", "0.66602224", "0.6659412", "0.66252947", "0.66239", "0.6598523", "0.6597726", "0.6597726", "0.65976286", "0.6592243", "0.6565609", "0.6519273", "0.64455307", "0.64338696", "0.64261466", "0.6407882", "0.63759136", "0.6364894", "0.6307615", "0.63030654", "0.63010347", "0.6289997", "0.62858754", "0.62827104", "0.62558466", "0.6250217", "0.6249567", "0.6144628", "0.60422003", "0.60405356", "0.6032475", "0.6002387", "0.59898436", "0.59688354", "0.594958", "0.594944", "0.58928186", "0.5872479", "0.58654004", "0.58534104", "0.58336115", "0.5828574", "0.582284", "0.5805794", "0.58004147", "0.58004147", "0.58004147", "0.58004147", "0.5755416", "0.5734732", "0.5728086", "0.5692911", "0.5644992", "0.5637319", "0.56278986", "0.56216204", "0.5621544", "0.5576482", "0.55712306", "0.55497366", "0.5533059", "0.55310076", "0.5516806", "0.551383", "0.5501803", "0.54860187", "0.54676294", "0.5465564", "0.546283", "0.5451557", "0.5434599", "0.5415603", "0.54093826", "0.54008067", "0.54004526", "0.53859526", "0.5385285", "0.5371212", "0.536813", "0.5357213", "0.5348749", "0.5340092", "0.5338833", "0.53293025", "0.5325959", "0.53211105", "0.5317223", "0.5317223", "0.5317223", "0.5316189", "0.5316189", "0.5316189" ]
0.6949521
3
Gets the notify_alternate value for this BuyRequestType.
public java.lang.String getNotify_alternate() { return notify_alternate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setNotify_alternate(java.lang.String notify_alternate) {\n this.notify_alternate = notify_alternate;\n }", "public long getNotify() {\n\t\treturn notify;\n\t}", "public YesNoType getNotifyPi() {\n return _notifyPi;\n }", "public String getReplyingOrNotifying() {\n return getFlow().isAskedFor() ? \"replying\" : \"notifying\";\n }", "public String getNotificationType() {\n\t\treturn notificationType;\n\t}", "public java.lang.String getMessageNotify() {\n return messageNotify;\n }", "public String getNotification() {\n return notification;\n }", "public java.lang.String getAlternateStatus() {\n\treturn alternateStatus;\n}", "PartyType getNotifyParty();", "public com.broadhop.unifiedapi.soap.types.NotificationTypeTransport getTransport() {\n return transport;\n }", "public Byte getAttendType() {\n return attendType;\n }", "public java.math.BigInteger getReceivingType() {\n return receivingType;\n }", "public String getAlternateEmail() { return alternateEmail; }", "public java.lang.String getIndicativeReceiveCurrency() {\r\n return indicativeReceiveCurrency;\r\n }", "public Byte getEmailVerifyFlag() {\n return emailVerifyFlag;\n }", "public Byte getIsDealing() {\r\n return isDealing;\r\n }", "@Override\n\tpublic String getNotification() {\n\t\treturn null;\n\t}", "public Byte getEmailRemindFlag() {\n return emailRemindFlag;\n }", "private String getNotifierListener(int notifierType) {\n\t\tString listener = null;\n\t\ttry {\n\t\t\tswitch (notifierType) {\n\t\t\tcase NotifierConstants.PUSH_MESSAGE_NOTIFIER:\n\t\t\t\tlistener = appConfigInformation.getString(SmartConstants.APPEZ_CONF_PROP_PUSH_NOTIFIER_LISTENER);\n\t\t\t\tbreak;\n\n\t\t\tcase NotifierConstants.NETWORK_STATE_NOTIFIER:\n\t\t\t\tlistener = appConfigInformation.getString(SmartConstants.APPEZ_CONF_PROP_NWSTATE_NOTIFIER_LISTENER);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (JSONException je) {\n\t\t\t// TODO handle this exception\n\t\t}\n\t\treturn listener;\n\t}", "private Notifier getNotifier() {\r\n return getLocalFacade().getGlobalFacade().getNotifier();\r\n }", "public java.lang.String getNotification()\r\n\t{\r\n\t\tString results = \"\";\r\n\t\tif (!locked)\r\n\t\t{\r\n\t\t\tif (notification == null)\r\n\t\t\t\tresults = \"No notification\";\r\n\t\t\tif (notification != null)\r\n\t\t\t\tresults = notification;\t\r\n\t\t}\r\n\t\tif (locked == true && notification != null)\r\n\t\t\tresults = \"You have a notification\";\r\n\t\treturn results;\r\n\t}", "public String getReceiveNotice() {\n return receiveNotice;\n }", "public String getReceiveZip() {\n return receiveZip;\n }", "public java.math.BigDecimal getIndicativeReceiveAmount() {\r\n return indicativeReceiveAmount;\r\n }", "public BufferedImage getTrayiconNotification() {\n return loadTrayIcon(\"/images/\" + OS + TRAYICON_NOTIFICATION);\n }", "public java.lang.Boolean getReceivesInfoEmails() {\n return receivesInfoEmails;\n }", "@DynamoDBIgnore\n @Override\n public String getConsentNotificationEmail() {\n return consentNotificationEmail;\n }", "public String getBuyerNew() {\n return (String) getAttributeInternal(BUYERNEW);\n }", "@java.lang.Override\n public java.lang.String getEmail() {\n java.lang.Object ref = \"\";\n if (deliveryMethodCase_ == 1) {\n ref = deliveryMethod_;\n }\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 (deliveryMethodCase_ == 1) {\n deliveryMethod_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSMSNotifyPhone() {\n return SMSNotifyPhone;\n }", "public InternetAddress getNotificationEmailAddress();", "public String getEmailAlt() {\n\t\t\treturn emailAlt;\n\t\t}", "public Integer getExchangeIntegral() {\n return exchangeIntegral;\n }", "public Byte getIsDefault() {\n return (Byte) get(3);\n }", "public String getIndicate() {\n return indicate;\n }", "public java.lang.String getEmail() {\n java.lang.Object ref = \"\";\n if (deliveryMethodCase_ == 1) {\n ref = deliveryMethod_;\n }\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (deliveryMethodCase_ == 1) {\n deliveryMethod_ = s;\n }\n return s;\n }\n }", "public String getReceived(){\n String rec;\n if (received == Received.ON_TIME){\n rec = \"On Time\";\n }else if(received == Received.LATE){\n rec = \"Late\";\n }else if(received == Received.NO){\n rec = \"NO\";\n }else{\n rec = \"N/A\";\n }\n return rec;\n }", "public String getNotificationUrl() {\r\n\t\treturn notificationUrl;\r\n\t}", "public String getAvailableForRentFlag() {\n return (String) getAttributeInternal(AVAILABLEFORRENTFLAG);\n }", "@ZAttr(id=607)\n public String getFreebusyExchangeURL() {\n return getAttr(Provisioning.A_zimbraFreebusyExchangeURL, null);\n }", "public String getNotificationText() {\r\n\t\treturn notificationText;\r\n\t}", "org.apache.xmlbeans.XmlString xgetDelegateSuggestedSignerEmail();", "public java.lang.Boolean getInvoiceDeliveryPrefsEmail() {\n return invoiceDeliveryPrefsEmail;\n }", "public Integer getSendEmail() {\n return sendEmail;\n }", "public String getPayInterestFlag() {\n return payInterestFlag;\n }", "@objid (\"558d0de7-4bfc-4eaa-9317-4e9d49a2029c\")\n public static SmAttribute getIsExternalAtt() {\n return IsExternalAtt;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getEmailBytes() {\n java.lang.Object ref = \"\";\n if (deliveryMethodCase_ == 1) {\n ref = deliveryMethod_;\n }\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n if (deliveryMethodCase_ == 1) {\n deliveryMethod_ = b;\n }\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "T getPushNotification();", "public String getRepayStatus() {\n return repayStatus;\n }", "public double getReceivable() {\n return receivable;\n }", "public String getNetPayableShipping()\n\t{\n\t\twaitForVisibility(netPayableShipping);\n\t\treturn netPayableShipping.getText();\n\t}", "public String getNotificationText() {\n\t\treturn notificationText;\n\t}", "public int getNotificationMethodID() {\n return notificationMethodID;\n }", "public java.lang.String getAlternateFormOf() {\r\n return alternateFormOf;\r\n }", "public void setNotify(long notify) {\n\t\tthis.notify = notify;\n\t}", "public void setAlternateEmail(String altEmail) {\r\n\t\t\tthis.alternateEmail = altEmail;\r\n\t\t}", "public boolean isRingNotified() {\n return mRingNotified;\n }", "public Informer reqInformWaterHeaterStatus() {\n\t\t\taddProperty(EPC_WATER_HEATER_STATUS);\n\t\t\treturn this;\n\t\t}", "public String getRepayType() {\n return repayType;\n }", "public synchronized static int getBeaconType() {\n return prefs.getInt(BEACON_TYPE, ALT_BEACON);\n }", "public Integer getTradeDelivering() {\n return tradeDelivering;\n }", "public String getReceiverZip() {\n return receiverZip;\n }", "public Integer getGiveIntegral() {\n return giveIntegral;\n }", "String getConfirmed();", "public String getDeviceBrokerType() {\n return deviceBrokerType;\n }", "@Override\n public byte getSubtype() {\n return SUBTYPE_MONETARY_SYSTEM_PUBLISH_EXCHANGE_OFFER;\n }", "java.lang.String getDelegateSuggestedSignerEmail();", "public String getIncomingPaymentPurpose() {\n return incomingPaymentPurpose;\n }", "public Number getWorkflowNotificationId() {\r\n return (Number) getAttributeInternal(WORKFLOWNOTIFICATIONID);\r\n }", "public final String getSignerOverride() {\n return properties.get(SIGNER_OVERRIDE_PROPERTY);\n }", "public String getSendNotifictionId() {\n return sendNotifictionId;\n }", "public static Notifier getNotifier() {\n if(theNotifier == null) {\n theNotifier = new Notifier();\n }\n return theNotifier;\n }", "public String getEbaynoweligible() {\r\n return ebaynoweligible;\r\n }", "public Signal getTipState() {\n\t\t// find the connector position in the queue\n\t\t// look in the noDelayQueue which value to communicate\n\t\tint now = GameEngine.getSimulationTimeInMillis();\n\t\tSignal signal = this.queue.getExit(now);\n\t\treturn signal;\n\t}", "public String getNeedsAttentionDisplay() {\n if (needsAttention.booleanValue()) {\n return NEEDS_ATTN_YES;\n }\n return NEEDS_ATTN_NO;\n }", "public String getEligibleforpickupinstore() {\r\n return eligibleforpickupinstore;\r\n }", "public byte getAlarmType() {\r\n\t\tbyte alarmType;\r\n\t\talarmType=this.alarmType;\r\n\t\treturn alarmType;\r\n\t}", "public EndpointReferenceType getEndpointReferenceType() {\n\t\treturn endpointReferenceType;\n\t}", "public String getShippingConvert() {\r\n\t\treturn this.getShipping().getName();\r\n\t}", "public java.lang.Short getMakeInbandToneAvailable() {\r\n return makeInbandToneAvailable;\r\n }", "@Override\n public byte getSubtype() {\n return SUBTYPE_MESSAGING_ALIAS_BUY;\n }", "public java.lang.String getDeliveryOption() {\r\n return deliveryOption;\r\n }", "public String getXpeApproverEmail() {\n return (String) getAttributeInternal(XPEAPPROVEREMAIL);\n }", "public long getNotification_id() {\n return notification_id;\n }", "public String getIncomingPaymentBic() {\n return incomingPaymentBic;\n }", "public String getIncomingPaymentIban() {\n return incomingPaymentIban;\n }", "public java.lang.String getNotOkForPickupReasonDescription() {\r\n return notOkForPickupReasonDescription;\r\n }", "@Override\r\n\tpublic Notification createEmailNotification() {\n\t\treturn null;\r\n\t}", "public Boolean getSendType() {\n return sendType;\n }", "@Override\n public byte getSubtype() {\n return SUBTYPE_MONETARY_SYSTEM_EXCHANGE_BUY;\n }", "public String getNotAcceptReason() {\r\n\t\treturn notAcceptReason;\r\n\t}", "boolean getSendPushNotifications();", "public String getShippingSender() {\n return shippingSender;\n }", "public String getPollAcceptResponse() {\n return getXproperty(BwXproperty.pollAccceptResponse);\n }", "public java.lang.String getReceiveCurrency() {\r\n return receiveCurrency;\r\n }", "public java.lang.String getReceiveCurrency() {\r\n return receiveCurrency;\r\n }", "public void setAlternateEmail(String altemail) { this.alternateEmail = altemail; }", "public Notification getActiveNotification(){\r\n\t\ttry{\r\n\t\t\treturn this.getChildCount() > 0 ? ((NotificationView) this.getCurrentView()).getNotification() : null;\r\n\t\t}catch(Exception ex){\r\n\t\t\tLog.e(_context, \"NotificationViewFlipper.getActiveNotification() ERROR: \" + ex.toString());\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public String returnConfirmPassword() {\n\t\treturn this.registration_confirmpassword.getAttribute(\"value\");\r\n\t}", "public java.lang.Short getSignalingTonePackageId() {\r\n return signalingTonePackageId;\r\n }" ]
[ "0.68219984", "0.59484744", "0.5771115", "0.55292684", "0.52598345", "0.5251167", "0.5202958", "0.51689744", "0.51003814", "0.50717795", "0.50699955", "0.4966111", "0.49574628", "0.4893923", "0.4880327", "0.4871384", "0.4858217", "0.48261002", "0.4810386", "0.47761765", "0.47319788", "0.47203875", "0.47145316", "0.47049084", "0.4698552", "0.46971115", "0.4693984", "0.46753803", "0.46529877", "0.465095", "0.46292448", "0.46223265", "0.46175113", "0.45885688", "0.45859683", "0.45796126", "0.4554986", "0.45530227", "0.45389482", "0.4534155", "0.4531084", "0.4523451", "0.451628", "0.45060733", "0.4503875", "0.45029", "0.44997734", "0.44977796", "0.4485388", "0.44838476", "0.44788504", "0.44752347", "0.44724146", "0.44606534", "0.44491878", "0.44385374", "0.44371668", "0.44353017", "0.44339988", "0.44334188", "0.44128513", "0.43990642", "0.4397468", "0.4382285", "0.4377862", "0.43762115", "0.4374709", "0.43597183", "0.43361765", "0.43360862", "0.43350655", "0.43281123", "0.43167865", "0.4315559", "0.4315052", "0.43047923", "0.4294288", "0.42933843", "0.42908803", "0.4290561", "0.4264204", "0.4258014", "0.42566532", "0.42554414", "0.4249773", "0.42480284", "0.42406192", "0.42402855", "0.42394784", "0.42361438", "0.42318782", "0.4230301", "0.42295083", "0.42262426", "0.42223397", "0.42223397", "0.4220621", "0.42134193", "0.42077228", "0.42053014" ]
0.76821655
0
Sets the notify_alternate value for this BuyRequestType.
public void setNotify_alternate(java.lang.String notify_alternate) { this.notify_alternate = notify_alternate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getNotify_alternate() {\n return notify_alternate;\n }", "public void setNotify(long notify) {\n\t\tthis.notify = notify;\n\t}", "public void setAlternateEmail(String altemail) { this.alternateEmail = altemail; }", "public void setAlternateEmail(String altEmail) {\r\n\t\t\tthis.alternateEmail = altEmail;\r\n\t\t}", "public void setAlternateStatus(java.lang.String newAlternateStatus) {\n\talternateStatus = newAlternateStatus;\n}", "public void setAlwaysNotify( boolean onoff )\n {\n this.always_notify = onoff;\n }", "private void setNotifyNextSensor(BluetoothGatt gatt) {\n BluetoothGattCharacteristic characteristic;\n switch (mState) {\n case 0:\n Log.d(TAG, \"Set notify pressure cal\");\n characteristic = gatt.getService(PRESSURE_SERVICE)\n .getCharacteristic(PRESSURE_CAL_CHAR);\n break;\n case 1:\n Log.d(TAG, \"Set notify pressure\");\n characteristic = gatt.getService(PRESSURE_SERVICE)\n .getCharacteristic(PRESSURE_DATA_CHAR);\n break;\n case 2:\n Log.d(TAG, \"Set notify humidity\");\n characteristic = gatt.getService(HUMIDITY_SERVICE)\n .getCharacteristic(HUMIDITY_DATA_CHAR);\n break;\n default:\n mHandler.sendEmptyMessage(MSG_DISMISS);\n Log.i(TAG, \"All Sensors Enabled\");\n return;\n }\n\n //Enable local notifications\n gatt.setCharacteristicNotification(characteristic, true);\n //Enabled remote notifications\n BluetoothGattDescriptor desc = characteristic.getDescriptor(CONFIG_DESCRIPTOR);\n desc.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);\n gatt.writeDescriptor(desc);\n }", "public void setIsDealing(Byte isDealing) {\r\n this.isDealing = isDealing;\r\n }", "private void setNotification() {\n mBuilder.setProgress(updateMax, ++updateProgress, false)\n .setContentTitle(getResources().getString(R.string.notification_message));\n // Issues the notification\n nm.notify(0, mBuilder.build());\n }", "public CommonDataServiceForAppsSink setAlternateKeyName(Object alternateKeyName) {\n this.alternateKeyName = alternateKeyName;\n return this;\n }", "public YesNoType getNotifyPi() {\n return _notifyPi;\n }", "void setNotificationButtonState(Boolean isNotifyEnabled,Boolean isUpdateEnabled,Boolean isCancelEnabled) {\n button_notify.setEnabled(isNotifyEnabled);\n button_update.setEnabled(isUpdateEnabled);\n button_cancel.setEnabled(isCancelEnabled);\n }", "public void setSendingReferrersAsNotSent() {\n }", "public void registerNotify( Notify notify, Object state, int maxDelay );", "public long getNotify() {\n\t\treturn notify;\n\t}", "@Override\n public void addNotify(){\n super.addNotify();\n\n if (speciallyIconified){\n try{\n setIcon(speciallyIconified);\n speciallyIconified = false;\n } catch (PropertyVetoException e){}\n }\n\n if (speciallyMaximized){\n try{\n setMaximum(speciallyMaximized);\n speciallyMaximized = false;\n } catch (PropertyVetoException e){}\n }\n }", "public void setReceivesInfoEmails(java.lang.Boolean receivesInfoEmails) {\n this.receivesInfoEmails = receivesInfoEmails;\n }", "public void setAllowNotifications(boolean allowNotifications) {\n this.notificationsBlocked = !allowNotifications;\n notifier.dbAdapter.updateContactNotificationsBlocked(notifier.didSessionDID, did, this.notificationsBlocked);\n }", "void createInvitation(OutgoingEMailInvitation invitation, Boolean notify);", "public void setMessageNotify(java.lang.String messageNotify) {\n this.messageNotify = messageNotify;\n }", "public void setNotification(String notif) {\n frame.setNotification(notif);\n }", "public notifyStateChange_args(notifyStateChange_args other) {\n if (other.isSetReq()) {\n this.req = new com.siriusdb.thrift.model.NotifyStateRequest(other.req);\n }\n }", "protected void setConfirmed(boolean confirmed) {\n this.confirmed = confirmed;\n }", "void xsetDelegateSuggestedSignerEmail(org.apache.xmlbeans.XmlString delegateSuggestedSignerEmail);", "protected void setRadioState(int newState, boolean forceNotifyRegistrants) {\n int oldState;\n\n synchronized (mStateMonitor) {\n oldState = mState;\n mState = newState;\n\n if (oldState == mState && !forceNotifyRegistrants) {\n // no state transition\n return;\n }\n\n mRadioStateChangedRegistrants.notifyRegistrants();\n\n if (mState != TelephonyManager.RADIO_POWER_UNAVAILABLE\n && oldState == TelephonyManager.RADIO_POWER_UNAVAILABLE) {\n mAvailRegistrants.notifyRegistrants();\n }\n\n if (mState == TelephonyManager.RADIO_POWER_UNAVAILABLE\n && oldState != TelephonyManager.RADIO_POWER_UNAVAILABLE) {\n mNotAvailRegistrants.notifyRegistrants();\n }\n\n if (mState == TelephonyManager.RADIO_POWER_ON\n && oldState != TelephonyManager.RADIO_POWER_ON) {\n mOnRegistrants.notifyRegistrants();\n }\n\n if ((mState == TelephonyManager.RADIO_POWER_OFF\n || mState == TelephonyManager.RADIO_POWER_UNAVAILABLE)\n && (oldState == TelephonyManager.RADIO_POWER_ON)) {\n mOffOrNotAvailRegistrants.notifyRegistrants();\n }\n }\n }", "public void setNotifications(ArrayList<Notification> notif) {\n\t\tnotifications = notif;\t\n\t}", "@ZAttr(id=1174)\n public void setFreebusyExchangeServerType(ZAttrProvisioning.FreebusyExchangeServerType zimbraFreebusyExchangeServerType) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraFreebusyExchangeServerType, zimbraFreebusyExchangeServerType.toString());\n getProvisioning().modifyAttrs(this, attrs);\n }", "public static void setProvideFeedback(boolean b){\n\t\tprovideFeedback = b;\t \n\t}", "public void setDeliveryIsBlocked(\n @Nullable\n final String deliveryIsBlocked) {\n rememberChangedField(\"DeliveryIsBlocked\", this.deliveryIsBlocked);\n this.deliveryIsBlocked = deliveryIsBlocked;\n }", "private static void activateNotification(NotificationManager mgr, NotificationCompat.Builder builder,\n Reminder notification) {\n String uuid = \"budget beaver_\" + notification.getId();\n mgr.notify(uuid.hashCode(), builder.build());\n }", "@Override\n public void setIcon(boolean iconified) throws PropertyVetoException{\n if ((getParent() == null) && (desktopIcon.getParent() == null)){\n if (speciallyIconified == iconified)\n return;\n\n Boolean oldValue = speciallyIconified ? Boolean.TRUE : Boolean.FALSE; \n Boolean newValue = iconified ? Boolean.TRUE : Boolean.FALSE;\n fireVetoableChange(IS_ICON_PROPERTY, oldValue, newValue);\n\n speciallyIconified = iconified;\n }\n else\n super.setIcon(iconified);\n }", "public void setAvailableForDelivery(boolean available) {\n this.availableForDelivery = available;\n if (this.availableForDelivery) {\n this.sendStatusMessageToDispatch(\"Vehicle \" + this.VIN + \" is now available for deliveries\");\n } else {\n this.sendStatusMessageToDispatch(\n \"Vehicle \" + this.VIN + \" has a new order and is no longer available for deliveries\");\n }\n }", "@Test\n public void testNotifyUserOfApBandConversion() throws Exception {\n WifiApConfigStore store = createWifiApConfigStore();\n store.notifyUserOfApBandConversion(TAG);\n // verify the notification is posted\n ArgumentCaptor<Notification> notificationCaptor =\n ArgumentCaptor.forClass(Notification.class);\n verify(mNotificationManager).notify(eq(SystemMessage.NOTE_SOFTAP_CONFIG_CHANGED),\n notificationCaptor.capture());\n Notification notification = notificationCaptor.getValue();\n assertEquals(TEST_APCONFIG_CHANGE_NOTIFICATION_TITLE,\n notification.extras.getCharSequence(Notification.EXTRA_TITLE));\n assertEquals(TEST_APCONFIG_CHANGE_NOTIFICATION_DETAILED,\n notification.extras.getCharSequence(Notification.EXTRA_BIG_TEXT));\n assertEquals(TEST_APCONFIG_CHANGE_NOTIFICATION_SUMMARY,\n notification.extras.getCharSequence(Notification.EXTRA_SUMMARY_TEXT));\n }", "@Override\r\n\tpublic void sendNotification(String notificationType) {\n\t\t\r\n\t}", "public void setPermanentNotification(boolean value) {\n permanentNotification.set(value);\n }", "public void setNotification(String notification) {\n this.notification = notification;\n }", "protected void notifyUser()\n {\n }", "public void indicateNot() {\r\n notIndicated = true;\r\n }", "public static void setVibrateNotificationType(Context context, VibrateType vibrateNotificationType)\n\t{\n\t\tPreferenceUtils.setVibrateType(context, vibrateNotificationType);\n\t}", "protected final void setConfirmed(final boolean confirmed) {\n isConfirmed = confirmed;\n }", "public void setAnnounced(Boolean newValue);", "public void setPinValueForNotification(int pinValue, long eventTime, boolean isSensorTime, boolean notify);", "public void setReceivers(nl.webservices.www.soap.InsolvencyReceivers receivers) {\n this.receivers = receivers;\n }", "@Override\n public void setNotification() {\n if (getTense() == Tense.FUTURE) {\n //Context ctx = SHiTApplication.getContext();\n //SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(ctx);\n\n int leadTimeEventMinutes = SHiTApplication.getPreferenceInt(Constants.Setting.ALERT_LEAD_TIME_EVENT, LEAD_TIME_MISSING);\n\n if (leadTimeEventMinutes != LEAD_TIME_MISSING) {\n if (travelTime > 0) {\n leadTimeEventMinutes += travelTime;\n }\n\n setNotification(Constants.Setting.ALERT_LEAD_TIME_EVENT\n , leadTimeEventMinutes\n , R.string.alert_msg_event\n , getNotificationClickAction()\n , null);\n }\n }\n }", "public void setAttendType(Byte attendType) {\n this.attendType = attendType;\n }", "@NoProxy\n @IcalProperty(pindex = PropertyInfoIndex.BUSYTYPE,\n vavailabilityProperty = true)\n public void setBusyType(final int val) {\n busyType = val;\n }", "public void setConfirmed(boolean confirmed) {\n this.confirmed = confirmed;\n }", "private void setFinalNotification() {\n //finished downloading all files\n // update notification\n String note = getResources().getString(R.string.update_complete);\n mBuilder.setContentTitle(note)\n .setContentText(\"\")\n .setSmallIcon(R.drawable.ic_launcher_mp)\n .setTicker(note)\n .setProgress(0, 0, false);\n nm.notify(0, mBuilder.build());\n }", "@Override\r\n\tpublic void notify(DelegateTask delegateTask) {\n\t\tboolean var = (boolean) delegateTask.getVariable(\"input\");\r\n\t\tvar=true;\r\n\t\tdelegateTask.setVariable(\"input\", var);\t\t\r\n\t}", "@Override\n\tpublic void sendNotification(User notifier, User guest, Notification notification) {\n\t\tnotifier.getRequetes().add(notification);\n\t\tguest.getInvitations().add(notification);\n\t\tnotifier=userRepository.save(notifier);\n\t\tguest=userRepository.save(guest);\n\t\tNotificationWebSocketToken token=new NotificationWebSocketToken(1,notifier.getId(),2);\n\t\ttoken.setUser(notifier);\n\t\tnotify(token,guest.getUsername());\n\t}", "public void setNotifyTime(long notifyTime) {\n Date date = new Date(notifyTime);\n DateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\n String dateFormatted = formatter.format(date);\n Log.d(Logger.TAG, \"Notify Time = \" + dateFormatted);\n editSharedPrefs().putLong(SHARED_PREFS_NOTIFY_TIME, notifyTime).apply();\n }", "public void setFavorite(boolean favorite) {\n if (mFavorite != favorite) {\n mFavorite = favorite;\n // Avoid infinite recursions if setChecked() is called from a listener\n if (mBroadcasting) {\n return;\n }\n\n mBroadcasting = true;\n if (mOnFavoriteChangeListener != null) {\n mOnFavoriteChangeListener.onFavoriteChanged(this, mFavorite);\n }\n updateFavoriteButton(favorite);\n mBroadcasting = false;\n }\n }", "void setDelegateSuggestedSignerEmail(java.lang.String delegateSuggestedSignerEmail);", "void setBrokerAlgo(BrokerAlgo inBrokerAlgo);", "public void onClickDeclineSignal(View view) {\n\n NotificationManager myNotMng = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n // prepare intent which is triggered if the\n // notification is selected\n\n Intent myNotiIntent = new Intent(this,NotificationActivity.class);\n\n /* A pending intent is a token that you give to another application,\n which allows this other application to use the permissions of your application to execute a predefined piece of code.*/\n\n PendingIntent myPenNotiIntent = PendingIntent.getActivity(this, 0, myNotiIntent, 0);\n\n // build notification\n\n NotificationCompat.Builder notiSmartHome = new NotificationCompat.Builder(this)\n .setContentTitle(\"SmartHome-Alert\")\n .setContentText(\"Pending SmartHome protocol\")\n .setSmallIcon(R.drawable.notiiconalert2) //smallIcon = icon showed in status bar\n .setContentIntent(myPenNotiIntent);\n\n\n notiSmartHome.setContentIntent(myPenNotiIntent);\n notiSmartHome.setAutoCancel(true);\n notiSmartHome.setLights(Color.GREEN, 500, 500); // set device LEDs when pending notification\n long[] pattern = {500,500,500,500,500,500,500,500,500}; //vibrate pattern\n notiSmartHome.setVibrate(pattern); //vibrate with defined pattern when notification is pending\n\n Uri myNotifSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n notiSmartHome.setSound(myNotifSound);\n\n myNotMng.notify(1,notiSmartHome.build());\n\n finish();\n\n }", "public void test_setNotifying() throws Exception {\n\t\tinit(null) ;\n\t\trepo = factory.getRepository(factory.getConfig()) ;\n\t\t((RepositoryWrapper) repo).setDelegate(notifier) ;\n\t\trepo.initialize() ;\n\t\tfunctionalTest() ;\n\t}", "void setConfirmed(String value);", "public void setTransport(com.broadhop.unifiedapi.soap.types.NotificationTypeTransport transport) {\n this.transport = transport;\n }", "public T setNotifyAvailableSlamDataEnabled(final boolean notifyAvailableSlamData) {\n mNotifyAvailableSlamData = notifyAvailableSlamData;\n\n //noinspection unchecked\n return (T) this;\n }", "public void requestToChangeNotificationsType(String notificationType, boolean isChecked, IRequestListener iRequestListener) {\r\n if (isChecked) {\r\n putNotification(notificationType, iRequestListener);\r\n } else {\r\n deleteNotification(notificationType, iRequestListener);\r\n }\r\n }", "@Override\r\n\tpublic void makeDeliveryFree() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void doFreeze(boolean freeze) {\n\t\tchart.setNotify(false);\r\n\t}", "@RequestMapping(value = \"/api/v1/device/notify\", method = RequestMethod.POST, consumes = \"application/json\", produces = \"application/json\")\n\tpublic RestResponse notify(@RequestBody NotifyConfigurationRequest request) {\n\t\tRestResponse response = new RestResponse();\n\n\t\ttry {\n\t\t\tAuthenticatedUser user = this.authenticate(request.getCredentials(), EnumRole.ROLE_USER);\n\n\t\t\tdeviceRepository.notifyConfiguration(user.getKey(), request.getDeviceKey(), request.getVersion(),\n\t\t\t\t\t\t\tnew DateTime(request.getUpdatedOn()));\n\t\t} catch (Exception ex) {\n\t\t\tlogger.error(ex.getMessage(), ex);\n\n\t\t\tresponse.add(this.getError(ex));\n\t\t}\n\n\t\treturn response;\n\t}", "public void setSMSNotifyPhone(java.lang.String SMSNotifyPhone) {\n this.SMSNotifyPhone = SMSNotifyPhone;\n }", "public void setRepairRequested(boolean newRepairRequested) {\n\t\t_pcs.firePropertyChange(\"repairRequested\", this.repairRequested, newRepairRequested); //$NON-NLS-1$\n\t\tthis.repairRequested = newRepairRequested;\n\t}", "public void setFollowerNotifiableStatusByFollower(User follower, FollowerNotifiable notifiable) {\n fstRepository.findAllByFollower(follower)\n .forEach( fst -> {\n fst.setFollowerNotifiable(notifiable);\n logger.debug(\"fstId: {} -> notifiable: {})\", fst.getId(), fst.getFollowerNotifiable());\n fstRepository.save(fst);\n });\n }", "void xsetDelegateSuggestedSigner2(org.apache.xmlbeans.XmlString delegateSuggestedSigner2);", "public String getAlternateEmail() { return alternateEmail; }", "public boolean setEnabled(boolean notifyEnabled) {\n boolean oldState = this.enabled;\n this.enabled = notifyEnabled;\n return oldState;\n }", "@Override\r\n public void setAlt(String alt) {\n }", "public void setNotifyFrequency(String days) {\n Log.d(Logger.TAG, \"List = \" + getNotifyFrequency());\n Log.d(Logger.TAG, \"day = \" + days);\n if (!getNotifyFrequency().contains(days)) {\n editSharedPrefs().putString(SHARED_PREFS_NOTIFY_FREQ, days).apply();\n }\n }", "@ZAttr(id=1174)\n public void setFreebusyExchangeServerTypeAsString(String zimbraFreebusyExchangeServerType) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraFreebusyExchangeServerType, zimbraFreebusyExchangeServerType);\n getProvisioning().modifyAttrs(this, attrs);\n }", "@Override\r\n\tpublic void sendGeneralNotification() {\n\t\t\r\n\t}", "protected void setForUpdate(Txn txn, boolean forUpdate) {\r\n }", "public void updateNotification(){\n Bitmap androidImage=BitmapFactory.decodeResource(getResources(),R.drawable.mascot_1);\n NotificationCompat.Builder notifyBuilder=getNotificationBuilder();\n notifyBuilder.setStyle(new NotificationCompat.BigPictureStyle().bigPicture(androidImage).setBigContentTitle(\"Notificacion actualizada!\"));\n mNotifyManager.notify(NOTIFICATION_ID,notifyBuilder.build());\n setNotificationButtonState(false, false, true);\n\n }", "public void start(){\n\t\tboolean isMasterSyncEnabled = ContentResolver.getMasterSyncAutomatically();\n\t\tif(isMasterSyncEnabled)\n\t\t{\n\t\t\tboolean noRespNoti = SharedPref.getMainBool(SharedPref.Keys.NO_RESP_NOTI, curContext);\n\t\t\tboolean noAcceptNoti = SharedPref.getMainBool(SharedPref.Keys.NO_ACCEPT_NOTI, curContext);\n\t\t\t\n\t\t\tif( !noRespNoti || !noAcceptNoti ){\n\t\t\t\tNoti noti = null;\n\t\t\t\ttry {\n\t\t\t\t\tnoti = new DownloadNoti(curContext).execute().get();\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\tLogAdp.e(getClass(), \"start()\", \"error during downloading noti\", e);\n\t\t\t\t\tnoti = null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(noti != null){\n\t\t\t\t\t\n\t\t\t\t\tif(noti.isNewResp == null){\n\t\t\t\t\t\t//if user turn off respNoti on other device sync this setting\n\t\t\t\t\t\tif(!noRespNoti){\n\t\t\t\t\t\t\tSharedPref.setMain(SharedPref.Keys.NO_RESP_NOTI, true, curContext);\n\t\t\t\t\t\t\tnoRespNoti = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(!noRespNoti && noti.isNewResp){\n\t\t\t\t\t\tstartNotify(R.string.resp_noti_title, R.string.resp_noti_description, NotiEnum.RESPOND);\n\t\t\t\t\t}\n\t\t\t\t\tif(noti.isNewAccept == null){\n\t\t\t\t\t\t//if user turn off respAccept on other device sync this setting\n\t\t\t\t\t\tif(!noAcceptNoti){\n\t\t\t\t\t\t\tnoRespNoti = true;\n\t\t\t\t\t\t\tSharedPref.setMain(SharedPref.Keys.NO_ACCEPT_NOTI, true, curContext);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(!noAcceptNoti && noti.isNewAccept){\n\t\t\t\t\t\tstartNotify(R.string.accept_noti_title, R.string.accept_noti_description, NotiEnum.ACCEPT);\n\t\t\t\t\t}\n\t\t\t\t\t//if sync settings turn off getting noti\n\t\t\t\t\tif(noRespNoti && noAcceptNoti)\n\t\t\t\t\t\tnew Schedule(curContext).cancel();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void walletBusyChange(boolean newWalletIsBusy) {\n if (super.bitcoinController.getModel().getActivePerWalletModelData().isBusy()) {\n // Wallet is busy with another operation that may change the private keys - Action is disabled.\n putValue(SHORT_DESCRIPTION, this.bitcoinController.getLocaliser().getString(\"multiBitSubmitAction.walletIsBusy\", \n new Object[]{controller.getLocaliser().getString(this.bitcoinController.getModel().getActivePerWalletModelData().getBusyTaskKey())}));\n setEnabled(false); \n } else {\n // Enable unless wallet has been modified by another process.\n if (!super.bitcoinController.getModel().getActivePerWalletModelData().isFilesHaveBeenChangedByAnotherProcess()) {\n putValue(SHORT_DESCRIPTION, this.bitcoinController.getLocaliser().getString(\"createNewReceivingAddressSubmitAction.tooltip\"));\n setEnabled(true);\n }\n \n // Make sure the cancel button is enabled.\n createNewReceivingAddressPanel.getCancelButton().setEnabled(true);\n }\n }", "PartyType getNotifyParty();", "@Override\n @IcalProperties({\n @IcalProperty(pindex = PropertyInfoIndex.ATTENDEE,\n jname = \"attendee\",\n adderName = \"attendee\",\n eventProperty = true,\n todoProperty = true,\n journalProperty = true,\n freeBusyProperty = true),\n @IcalProperty(pindex = PropertyInfoIndex.VOTER,\n jname = \"voter\",\n adderName = \"voter\",\n vpollProperty = true)})\n public void setAttendees(final Set<BwAttendee> val) {\n attendees = val;\n }", "private void prepareBroadcastDataNotify(BluetoothGattCharacteristic characteristic) {\n MyLog.debug(TAG, \"prepareBroadcastDataNotify: \");\n boolean response=false;\n final int charaProp = characteristic.getProperties();\n MyLog.debug(TAG, \"charaProp: \"+charaProp);\n int temp=charaProp | BluetoothGattCharacteristic.PROPERTY_NOTIFY;\n MyLog.debug(TAG, \"temp: \"+temp);\n if ( temp> 0) {\n response= BluetoothLeService.setCharacteristicNotification(characteristic, true);\n }\n MyLog.debug(TAG, \"response: \"+response);\n\n }", "@NotNull public Builder alternateName(@NotNull String alternateName) {\n putValue(\"alternateName\", alternateName);\n return this;\n }", "@NotNull public Builder alternateName(@NotNull String alternateName) {\n putValue(\"alternateName\", alternateName);\n return this;\n }", "@NotNull public Builder alternateName(@NotNull String alternateName) {\n putValue(\"alternateName\", alternateName);\n return this;\n }", "@Override\n public void onClick(View v) {\n SharedPreferences.Editor prefsEditor = settingsPreferences.edit();\n if (settingsPreferences.getBoolean(TAG_VIBE_NOTIFICATION, false)) {\n prefsEditor.putBoolean(TAG_VIBE_NOTIFICATION, false);\n cbVibeNotify.setImageResource(R.drawable.check2);\n } else {\n prefsEditor.putBoolean(TAG_VIBE_NOTIFICATION, true);\n cbVibeNotify.setImageResource(R.drawable.check0);\n }\n prefsEditor.commit();\n }", "@FXML\n\tpublic void setOrderToDelivered() {\n\t\tString orderNumber = Integer.toString(order.getOrderNum());\n\t\tboolean isSeen = order.isSeen();\n\t\tboolean isPreparable = order.isPreparable();\n\t\tboolean isPrepared = order.isPrepared();\n\t\tboolean isDelivered = order.isDelivered();\n\t\tif ((isSeen == true) && (isPreparable == true) && (isPrepared == true) && (isDelivered == false)) {\n\t\t\tString[] parameters = new String[1];\n\t\t\tparameters[0] = orderNumber;\n\t\t\tmainController.getPost().notifyMainController(\"SetOrderToDeliveredStrategy\", parameters);\n\t\t\tmainController.modifyOrderStatus(order.getOrderNum(), OrderStatus.DELIVERED);\n\t\t\tmainController.removeOrderFromTableView(order);\n\t\t} else {\n\t\t\tdeliveredCheckBox.setSelected(false);\n\t\t}\n\t}", "public void setBuyerNew(String value) {\n setAttributeInternal(BUYERNEW, value);\n }", "protected void setIntermidiateSyncBundle(Bundle b) {\n\t\tb.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);\n\t\tb.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);\n\t}", "public void setToFavorite(boolean favorite) {\n this.isFavorite = favorite;\n }", "public static void sendFileResponseWithAlternate(Supplier<Pair<String,File>> message, String alternate, MessageReceivedEvent event)\n {\n if(!event.isPrivate())\n {\n if(!PermissionUtil.checkPermission(event.getTextChannel(),event.getTextChannel().getJDA().getSelfInfo(), Permission.MESSAGE_ATTACH_FILES))\n {\n sendResponse(alternate==null ? String.format(SpConst.NEED_PERMISSION, Permission.MESSAGE_ATTACH_FILES) : alternate , event);\n return;\n }\n }\n event.getChannel().sendTyping();\n Pair<String,File> tuple = message.get();\n String msg = tuple.getKey();\n File file = tuple.getValue();\n event.getChannel().sendFileAsync(file, msg==null ? null : new MessageBuilder().appendString(msg.length() > 2000 ? msg.substring(0, 2000) : msg).build(), m -> {\n if(!event.isPrivate())\n CallDepend.getInstance().add(event.getMessage().getId(), m);\n });\n }", "public void setInstantConfirmation(boolean value) {\n this.instantConfirmation = value;\n }", "private void prepareBroadcastDataNotify(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic characteristic) {\n MyLog.debug(TAG, \"prepareBroadcastDataNotify: \");\n boolean response=false;\n final int charaProp = characteristic.getProperties();\n MyLog.debug(TAG, \"charaProp: \"+charaProp);\n int temp=charaProp | BluetoothGattCharacteristic.PROPERTY_NOTIFY;\n MyLog.debug(TAG, \"temp: \"+temp);\n if ( temp> 0) {\n response= BluetoothLeService.setCharacteristicNotification(bluetoothGatt,characteristic, true);\n }\n MyLog.debug(TAG, \"response: \"+response);\n\n }", "private int notify(Wishlist wishlist, WishlistItem watched, InventoryItem invItem) {\n\t\tif (watched.isNotified) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tSystem.out.println(invItem.name + \" is in stock. Notify \" + wishlist.distributorID);\n\t\tif (notifier.notifyInStock(wishlist.notificationEmail, invItem.name)) {\n\t\t\twatched.setNotified();\n\t\t}\n\t\treturn 1;\n\t}", "private void updateReceiveMessageNotification(Context context,\n int requestCode, Intent intent, String ticker,\n String notifyTitle, String description, int icon,\n boolean isNewMessageNotification) {\n Logger.d(\n TAG,\n \"updateReceiveMessageNotification() entry eight parameters\" +\n \" isNewMessageNotification \"\n + isNewMessageNotification);\n PendingIntent contentIntent = PendingIntent.getActivity(\n context, requestCode, intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n Notification.Builder builder = new Notification.Builder(\n context);\n builder.setContentTitle(notifyTitle);\n builder.setContentText(description);\n builder.setContentIntent(contentIntent);\n if (isNewMessageNotification) {\n builder.setTicker(ticker);\n }\n builder.setSmallIcon(icon);\n builder.setWhen(System.currentTimeMillis());\n builder.setAutoCancel(true);\n if (SettingsFragment.IS_NOTIFICATION_CHECKED.get()) {\n Logger.v(\n TAG,\n \"updateReceiveMessageNotification SettingsFragment.\" +\n \"IS_NOTIFICATION_CHECKED.get() is \"\n + SettingsFragment.IS_NOTIFICATION_CHECKED\n .get());\n if (isNewMessageNotification) {\n Logger.v(TAG,\n \"updateReceiveMessageNotification isNewMessageNotification is \"\n + isNewMessageNotification);\n // Set ringtone\n String ringtone = RcsSettings.getInstance()\n .getChatInvitationRingtone();\n if (ringtone != null && ringtone.length() != 0) {\n Logger.v(TAG,\n \"updateReceiveMessageNotification set rintone\");\n builder.setSound(Uri.parse(ringtone));\n } else {\n Logger.v(TAG,\n \"updateReceiveMessageNotification not set rintone\");\n }\n // Set vibrate\n if (RcsSettings.getInstance()\n .isPhoneVibrateForChatInvitation()) {\n Logger.v(TAG,\n \"updateReceiveMessageNotification set vibarate\");\n builder.setDefaults(Notification.DEFAULT_VIBRATE);\n } else {\n Logger.v(TAG,\n \"updateReceiveMessageNotification not set vibarate\");\n }\n } else {\n Logger.v(TAG,\n \"updateReceiveMessageNotification isNewMessageNotification is \"\n + isNewMessageNotification);\n }\n Notification notification = builder.getNotification();\n NotificationManager notificationManager = (NotificationManager) context\n .getSystemService(Context.NOTIFICATION_SERVICE);\n notificationManager.notify(UNREAD_MESSAGE,\n NOTIFICATION_ID_UNREAD_MESSAGE, notification);\n } else {\n Logger.v(\n TAG,\n \"updateReceiveMessageNotification SettingsFragment.\" +\n \"IS_NOTIFICATION_CHECKED.get() is false\");\n }\n }", "public void setSendEmail(boolean theSendEmail) {\r\n if (theSendEmail) {\r\n this.sendEmailString = \"true\";\r\n } else {\r\n this.sendEmailString = null;\r\n }\r\n\r\n }", "public void connect_NoPERequest(BOOL newIV){\n NoPERequest = newIV;\n }", "void notifyReject(final TradeInstruction instruction);", "@SuppressWarnings(\"deprecation\")\n\t\t\t\tpublic void onClick(View v) \n\t {\n\t \tif (emailCheckedBool == true)\n\t \t{\n\t \tString[] to = {\"[email protected]\", \"[email protected]\"}; \n\t String[] cc = {\"[email protected]\"}; \n\t \tsendEmail(to, cc,getApplicationContext().getResources().getString(R.string.support),\n\t \"Email Contents will go here\");\n\t \t}\n\t \t\n\t \t\n\t \t// for the pending intent\n\t \t\n\t\t\t\t\tContext context = getApplicationContext();\n\t\t\t\t\t\n\t\t\t\t\t// messages to be added to the notification \n\t\t\t\t\tCharSequence contentTitle = \"Thank You For Youre Booking\";\n\t\t\t\t\tCharSequence contentText = \"Recommened Service for Car-Hire\";\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// an intent to open a webpage\n\t\t\t\t\tIntent msgIntent = new Intent(Intent.ACTION_VIEW, Uri\n\t\t\t\t\t\t\t.parse(\"http://www.autoeurope.ie/\"));\n\t\t\t\t\t\n\t\t\t\t\t// the pending intent to flag the new task \n\t\t\t\t\tPendingIntent intent = PendingIntent.getActivity(Confirmation.this, 0, msgIntent,\n\t\t\t\t\t\t\tIntent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\n\t\t\t\t\tmsg.defaults |= Notification.DEFAULT_SOUND;\n\t\t\t\t\tmsg.flags |= Notification.FLAG_AUTO_CANCEL;\n\n\t\t\t\t\tmsg.setLatestEventInfo(context, contentTitle, contentText,\n\t\t\t\t\t\t\tintent);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tmNManager.notify(NOTIFY_ID, msg);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// start next activty \n\t\t\t\t\t\n\t\t\t\t\tstartBookingDetails();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t \t\n\t }", "public static void addOverrideToTransmitter(\n\t\t\tBlockRedstoneWirelessOverride override) {\n\t\tLoggerRedstoneWireless.getInstance(\"Wireless Redstone\").write(\n\t\t\t\t\"Override added to \"\n\t\t\t\t\t\t+ WirelessRedstone.blockWirelessT.getClass().toString()\n\t\t\t\t\t\t+ \": \" + override.getClass().toString(),\n\t\t\t\tLoggerRedstoneWireless.LogLevel.DEBUG);\n\t\t((BlockRedstoneWireless) WirelessRedstone.blockWirelessT)\n\t\t\t\t.addOverride(override);\n\t}", "public Notification(SystemUser sender, SystemUser recipient, String currency, BigDecimal amount, BigDecimal senderNewBalance, BigDecimal receiverNewBalance, Date transactionDate, boolean seen, boolean request, boolean rejected) {\r\n this.recipient = recipient;\r\n this.sender = sender;\r\n this.currency = currency;\r\n this.amount = amount.setScale(2, RoundingMode.HALF_UP);\r\n this.transactionDate = transactionDate;\r\n this.seen = seen;\r\n this.request = request;\r\n this.rejected = rejected;\r\n this.senderNewBalance = senderNewBalance;\r\n this.receiverNewBalance = receiverNewBalance;\r\n\r\n }", "public TestNotification sendNow(TestNotification notif) {\n\t\treturn null;\n\t}" ]
[ "0.647764", "0.5757628", "0.5057839", "0.50405484", "0.49918208", "0.4800414", "0.479459", "0.4781265", "0.45647356", "0.45086545", "0.45052364", "0.44931027", "0.44670597", "0.44233158", "0.44054314", "0.43646276", "0.4355898", "0.43516126", "0.4344316", "0.43040735", "0.42798832", "0.42610586", "0.4256996", "0.42351085", "0.42289907", "0.42189422", "0.41839382", "0.41818386", "0.41747615", "0.41720396", "0.41679245", "0.41665292", "0.41644394", "0.41566715", "0.41562012", "0.41529486", "0.41500932", "0.41399235", "0.41346976", "0.4115643", "0.4115637", "0.41144633", "0.41031015", "0.40996003", "0.40994117", "0.40969458", "0.4071301", "0.4067005", "0.40662766", "0.40541092", "0.40531048", "0.40501186", "0.4050107", "0.40494227", "0.40437338", "0.40430555", "0.40400702", "0.40346786", "0.40253726", "0.40124485", "0.40045136", "0.40006137", "0.39999416", "0.39953995", "0.39744654", "0.39680246", "0.39635316", "0.39603657", "0.3960077", "0.39570543", "0.39522198", "0.39490348", "0.39245278", "0.39231148", "0.3920011", "0.39174697", "0.3915747", "0.3911506", "0.3911145", "0.39050072", "0.39035472", "0.39035472", "0.39035472", "0.38987982", "0.38959163", "0.3892826", "0.3880691", "0.38802364", "0.38783", "0.38778", "0.38734308", "0.38722184", "0.38704386", "0.38703784", "0.38661924", "0.38645682", "0.38645214", "0.38634163", "0.38605115", "0.38602668" ]
0.7733781
0
Gets the product value for this BuyRequestType.
public java.lang.String getProduct() { return product; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T getProduct() {\n return this.product;\n }", "public String getProduct() {\r\n return this.product;\r\n }", "public String getProduct() {\n return this.product;\n }", "public String product() {\n return this.product;\n }", "public String getProduct() {\n return product;\n }", "public String getProduct() {\n return product;\n }", "public org.mrk.grpc.catalog.Product getProduct() {\n if (productBuilder_ == null) {\n return product_ == null ? org.mrk.grpc.catalog.Product.getDefaultInstance() : product_;\n } else {\n return productBuilder_.getMessage();\n }\n }", "public ProductType getProduct() {\n return product;\n }", "public String getProduct()\n {\n return product;\n }", "public org.mrk.grpc.catalog.Product getProduct() {\n return product_ == null ? org.mrk.grpc.catalog.Product.getDefaultInstance() : product_;\n }", "public Double getProductQty() {\n return productQty;\n }", "public com.huawei.www.bme.cbsinterface.cbs.businessmgr.NewSubscriberExtRequestProduct[] getProduct() {\r\n return product;\r\n }", "public Product getProduct() {\n\t\treturn product;\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.APDProduct getProduct();", "public CP getProductServiceBilledAmount() { \r\n\t\tCP retVal = this.getTypedField(16, 0);\r\n\t\treturn retVal;\r\n }", "@Override\n\tpublic Product getProduct() {\n\t\treturn product;\n\t}", "public Integer getBuyModel() {\r\n return buyModel;\r\n }", "Object getProduct();", "public java.lang.CharSequence getRequestingProductId() {\n return requesting_product_id;\n }", "public double getBuyPrice() {\n return buyPrice;\n }", "public byte getIProduct() {\r\n\t\treturn iProduct;\r\n\t}", "public String getProductQuantity() throws InterruptedException\n\t{\n\t\tThread.sleep(2000);\n\t\twaitForVisibility(quantityInputFieldShoppingCart);\n\t\treturn quantityInputFieldShoppingCart.getAttribute(\"value\");\n\t}", "public void getProduct() {\n\t\tUtil.debug(\"getProduct\",this);\n\t\ttry {\n\t\t\tinputStream.skip(inputStream.available());\n\t\t} catch (IOException e) {\n\t\t\tUtil.log(e.getStackTrace().toString(),this);\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\toutputStream.write(new byte[] { 'x', 13 });\n\t\t} catch (IOException e) {\n\t\t\tUtil.log(e.getStackTrace().toString(),this);\n\t\t\treturn;\n\t\t}\n\n\t\t// wait for reply\n\t\tUtil.delay(RESPONSE_DELAY);\n\t}", "public Integer getBuyNum() {\n return buyNum;\n }", "public ProductModel getProduct()\n\t{\n\t\treturn product;\n\t}", "public java.lang.CharSequence getRequestingProductId() {\n return requesting_product_id;\n }", "public org.mrk.grpc.catalog.ProductOrBuilder getProductOrBuilder() {\n if (productBuilder_ != null) {\n return productBuilder_.getMessageOrBuilder();\n } else {\n return product_ == null ?\n org.mrk.grpc.catalog.Product.getDefaultInstance() : product_;\n }\n }", "public org.mrk.grpc.catalog.ProductOrBuilder getProductOrBuilder() {\n return getProduct();\n }", "public String getProductPack() {\n return (String)getAttributeInternal(PRODUCTPACK);\n }", "public String getProductNo() {\n\t\treturn productNo;\n\t}", "public String getProductCode() {\n return productCode;\n }", "public String getProductType() {\n\t\treturn productType;\n\t}", "public Integer getBuy_num() {\n return buy_num;\n }", "public double getProductPrice() {\n return productPrice;\n }", "@Override\n\tpublic int getPrice() {\n\t\treturn product.getPrice();\n\t}", "public String getBuyprice() {\n return buyprice;\n }", "public String getProductCode() {\n return this.productCode;\n }", "public CP getPsl16_ProductServiceBilledAmount() { \r\n\t\tCP retVal = this.getTypedField(16, 0);\r\n\t\treturn retVal;\r\n }", "public String getProduct() {\n\t\treturn stockSymbol;\n\t}", "public String getUserecommendedproduct() {\r\n return userecommendedproduct;\r\n }", "@Override\n\tpublic java.lang.String getAskingPrice() {\n\t\treturn _buySellProducts.getAskingPrice();\n\t}", "public Integer getProductPrice() {\n\t\treturn productPrice;\n\t}", "public Number getQtyMulPrice() {\n return (Number)getAttributeInternal(QTYMULPRICE);\n }", "String getProduct();", "public String getProductNumber() {\n\t\treturn productNumber;\n\t}", "private ProductBookSide getBuySide() {\n\t\treturn buySide;\n\t}", "public String getProductReference() {\n return productReference;\n }", "public String getType() {\r\n\t\treturn productType;\r\n\t}", "public Integer getProductCode() {\n\t\treturn productCode;\n\t}", "public String getProductAttrValue() {\n return (String)getAttributeInternal(PRODUCTATTRVALUE);\n }", "java.lang.String getProductCode();", "public ProductInfoType getProductInfo() {\n\t return this.productInfo;\n\t}", "int getBuyQuantity();", "public double getPrice(){\n\t\treturn Price; // Return the product's price\n\t}", "@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}", "public Number getQuantity() {\n return (Number) getAttributeInternal(QUANTITY);\n }", "public double getQtyProduced() {\n\t\treturn qtyProduced;\n\t}", "public String getQuantProduto() {\r\n\t\treturn quantProduto;\r\n\t}", "public Integer getProductAttributeValueId() {\n return productAttributeValueId;\n }", "public Number getPromoProdukId() {\n return (Number)getAttributeInternal(PROMOPRODUKID);\n }", "public double getProductOff() {\n\t\treturn productOff;\n\t}", "public double getProductWeight() {\n\t\treturn productWeight;\n\t}", "public Double getPurchasePrice() {\r\n return purchasePrice;\r\n }", "public String getProductId() {\n return productId;\n }", "public String getProductId() {\n return productId;\n }", "public String getProductId() {\n return productId;\n }", "public String getProductId() {\n return productId;\n }", "public String getProductId() {\n return productId;\n }", "public Integer getProductId() {\r\n return productId;\r\n }", "public Integer getProductId() {\r\n return productId;\r\n }", "@Override\r\n\tpublic Porduct GetResult() {\n\t\treturn product;\r\n\t}", "public Double getProductPrice(String product){\n return services.get(product);\n }", "public String getProductID() {\r\n return productID;\r\n }", "public String getProductno() {\n return productno;\n }", "public static int getPrice() {\n return PRICE_TO_BUY;\n }", "public int getOrderProductNum()\r\n {\n return this.orderProductNum;\r\n }", "x0401.oecdStandardAuditFileTaxPT1.ProductDocument.Product getProduct();", "public Integer getProductId() {\n return productId;\n }", "public Integer getProductId() {\n return productId;\n }", "public Integer getProductId() {\n return productId;\n }", "public Integer getProductId() {\n return productId;\n }", "public Integer getProductId() {\n return productId;\n }", "public Integer getProductId() {\n return productId;\n }", "public BigDecimal getProductQty() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"ProductQty\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}", "public String getSmsProduct() {\n return smsProduct;\n }", "public String getProductName() {\r\n return productName;\r\n }", "public int getBeverageQty() {\n return beverageQty;\n }", "public int getStock(){\n\t\treturn Stock; // Return the product's stock\n\t}", "public String getProductId() ;", "public String getProductName() {\n return productName;\n }", "public String getProductName() {\n return productName;\n }", "public String getProductName() {\n return productName;\n }", "public String getProductToCompare() {\n return mProductToCompare;\n }", "protected String getProductId() {\n return productId;\n }", "public String getProductId();", "public String getProdDetailsPrice(){\n String prodPrice = productDetailsPrice.toString();\n return prodPrice;\n }", "public TypeProduct getTypeProduct() {\r\n\t\treturn typeProduct;\r\n\t}", "TradingProduct getTradingProduct();", "public Double getTotalBuyNum() {\r\n return totalBuyNum;\r\n }", "public String getProductLine() {\n return productLine;\n }" ]
[ "0.6687642", "0.6637687", "0.6595933", "0.6594846", "0.64806753", "0.64806753", "0.6385688", "0.63631094", "0.63365126", "0.62540305", "0.6244904", "0.61209154", "0.6079951", "0.60511863", "0.6029193", "0.59895194", "0.598203", "0.59467524", "0.59228516", "0.5913308", "0.5896242", "0.5895241", "0.58506215", "0.5850001", "0.5848806", "0.58472216", "0.5836072", "0.58253264", "0.58113694", "0.5807183", "0.5787178", "0.5782774", "0.5773551", "0.57700217", "0.5762607", "0.57586366", "0.5752798", "0.5741688", "0.5740255", "0.57386696", "0.57350343", "0.57232714", "0.57168025", "0.5714346", "0.5714276", "0.5702978", "0.56959695", "0.5695157", "0.5686156", "0.56845653", "0.56769985", "0.5664346", "0.56256247", "0.56076944", "0.55872244", "0.55842596", "0.55808425", "0.55734605", "0.5565452", "0.55630636", "0.5553434", "0.55504626", "0.5545101", "0.5543183", "0.5543183", "0.5543183", "0.5543183", "0.5543183", "0.5530944", "0.5530944", "0.55297", "0.55283916", "0.5519548", "0.55191255", "0.5492634", "0.5489114", "0.5487443", "0.54779166", "0.54779166", "0.54779166", "0.54779166", "0.54779166", "0.54779166", "0.5476117", "0.54713136", "0.54711634", "0.54643023", "0.54636157", "0.5462562", "0.54616374", "0.54616374", "0.54616374", "0.54511636", "0.5447572", "0.54460055", "0.5438721", "0.5430818", "0.5428531", "0.54262084", "0.5423969" ]
0.65246254
4
Sets the product value for this BuyRequestType.
public void setProduct(java.lang.String product) { this.product = product; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setProduct(entity.APDProduct value);", "public void setProduct(String product) {\r\n this.product = product;\r\n }", "public void setProduct(Product product) {\n this.product = product;\n }", "public void setProduct(final String productValue) {\n this.product = productValue;\n }", "public com.autodesk.ws.avro.Call.Builder setRequestingProductId(java.lang.CharSequence value) {\n validate(fields()[1], value);\n this.requesting_product_id = value;\n fieldSetFlags()[1] = true;\n return this; \n }", "public Builder setProduct(org.mrk.grpc.catalog.Product value) {\n if (productBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n product_ = value;\n onChanged();\n } else {\n productBuilder_.setMessage(value);\n }\n\n return this;\n }", "public void setProduct(Product product) {\n binder.setBean(product);\n }", "public void setProduct(final ProductReference product);", "public void setProductQty(Double productQty) {\n this.productQty = productQty;\n }", "public void setProduct(com.huawei.www.bme.cbsinterface.cbs.businessmgr.NewSubscriberExtRequestProduct[] product) {\r\n this.product = product;\r\n }", "public void setProduct(Product product) {\n this.product = product;\n this.updateTotalPrice();\n }", "public void setProductId(String productId) ;", "public Builder setProduct(ProductType product) {\n this.product = product;\n return this;\n }", "public Builder setProduct(\n org.mrk.grpc.catalog.Product.Builder builderForValue) {\n if (productBuilder_ == null) {\n product_ = builderForValue.build();\n onChanged();\n } else {\n productBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }", "public void setProduct(Product product) {\n mProduct = product;\n mBeaut = mProduct.getBeaut();\n }", "public void setProductStock(int qty){\n\t\tstockQuantity = qty;\r\n\t}", "void setProduct(x0401.oecdStandardAuditFileTaxPT1.ProductDocument.Product product);", "public void setProductLine(entity.APDProductLine value);", "void setProductCode(java.lang.String productCode);", "public void setProductPrice(double productPrice) {\n this.productPrice = productPrice;\n }", "public void setRequestingProductId(java.lang.CharSequence value) {\n this.requesting_product_id = value;\n }", "public com.autodesk.ws.avro.Call.Builder setRespondingProductId(java.lang.CharSequence value) {\n validate(fields()[0], value);\n this.responding_product_id = value;\n fieldSetFlags()[0] = true;\n return this; \n }", "public void setProd(BigInteger prod)\n {\n this.prod = prod;\n }", "public String getProduct() {\r\n return this.product;\r\n }", "public void setProductType(final ProductTypeReference productType);", "public void setProductID(String ProductID) {\n try {\n if(ProductID!=null)\n this.productID = ProductID;\n else {\n this.productID = \"\";\n throw new SupplyOrderException(\"Invalid Product ID\");\n }\n } catch(SupplyOrderException soe){\n soe.getMessage();\n }\n }", "public void setProductOff(double productOff) {\n\t\tthis.productOff = productOff;\n\t}", "protected void setProductId(String productId) {\n this.productId = productId;\n }", "public void setProductName(final String productName);", "public String getProduct() {\n return this.product;\n }", "public void setProductInfo(ProductInfoType productInfo) {\n\t this.productInfo = productInfo;\n\t}", "public void setProductId(int productId) {\n this.productId = productId;\n }", "public void setProductId(int productId) {\n this.productId = productId;\n }", "@JsonSetter(\"product_details\")\n public void setProductDetails (ProductData value) { \n this.productDetails = value;\n }", "public void setProductWeight(double productWeight) {\n\t\tthis.productWeight = productWeight;\n\t}", "public void setProduct(Product product){\n\t\tthis.product = product;\n\t\tnameField.setText(product.getName());\n\t\tamountAvailableField.setText(String.valueOf(product.getAmountAvailable()));\n\t\tamountSoldField.setText(String.valueOf(product.getAmountSold()));\n\t\tpriceEachField.setText(String.valueOf(product.getPriceEach()));\n\t\tpriceMakeField.setText(String.valueOf(product.getPriceMake()));\n\t}", "public void setProductPack(String value) {\n setAttributeInternal(PRODUCTPACK, value);\n }", "public void setProductQty (BigDecimal ProductQty)\n{\nif (ProductQty == null) throw new IllegalArgumentException (\"ProductQty is mandatory\");\nset_Value (\"ProductQty\", ProductQty);\n}", "public void setProductId(Integer productId) {\r\n this.productId = productId;\r\n }", "public void setProductId(Integer productId) {\r\n this.productId = productId;\r\n }", "public void setProductCode(String productCode) {\r\n/* 427 */ this._productCode = productCode;\r\n/* */ }", "void setProductNumberCode(java.lang.String productNumberCode);", "public String getProduct() {\n return product;\n }", "public String getProduct() {\n return product;\n }", "public void setProductId(Integer productId) {\n this.productId = productId;\n }", "public void setProductId(Integer productId) {\n this.productId = productId;\n }", "public void setProductId(Integer productId) {\n this.productId = productId;\n }", "public void setProductId(Integer productId) {\n this.productId = productId;\n }", "public void setProductId(Integer productId) {\n this.productId = productId;\n }", "public void setProductId(Integer productId) {\n this.productId = productId;\n }", "public void setPurchasePrice(double p)\n {\n this.purchasePrice = p;\n }", "public void setSmsProduct(String smsProduct) {\n this.smsProduct = smsProduct;\n }", "void setProductType(x0401.oecdStandardAuditFileTaxPT1.ProductTypeDocument.ProductType.Enum productType);", "public void setProductOwner(String productOwner);", "@PUT\r\n\t@Path(\"product\")\r\n\t@Produces(MediaType.APPLICATION_XML)\r\n\tpublic Response putProduct(@Context HttpServletRequest request, ProductType p) {\r\n\t\tString username = request.getHeader(\"X-user\");\r\n\t\t\r\n\t\tif( p == null) {\r\n\t\t\treturn Response.status(queryImpossible).build();\r\n\t\t}\r\n\t\tif(\t!services.updateProduct(username, p) ) {\r\n\t\t\treturn Response.status(queryImpossible).build();\r\n\t\t}\r\n\t\t\r\n\t\treturn Response.ok().build();\r\n\t\t\r\n\t}", "public void setType(String type) {\r\n\t\tthis.productType = type;\r\n\t}", "public void setProductName(String productName) {\r\n this.productName = productName;\r\n }", "public void setProductId(String productId) {\n this.productId = productId;\n }", "public void setAttribute(String string, Product product) {\n\t\t\n\t}", "public String product() {\n return this.product;\n }", "public void getProduct() {\n\t\tUtil.debug(\"getProduct\",this);\n\t\ttry {\n\t\t\tinputStream.skip(inputStream.available());\n\t\t} catch (IOException e) {\n\t\t\tUtil.log(e.getStackTrace().toString(),this);\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\toutputStream.write(new byte[] { 'x', 13 });\n\t\t} catch (IOException e) {\n\t\t\tUtil.log(e.getStackTrace().toString(),this);\n\t\t\treturn;\n\t\t}\n\n\t\t// wait for reply\n\t\tUtil.delay(RESPONSE_DELAY);\n\t}", "public void setCustomerPurchase(double purchase) { this.customerPurchase = purchase; }", "@JsonSetter(\"product_id\")\n public void setProductId (Integer value) { \n this.productId = value;\n }", "public void setProductName(String productName) {\n this.productName = productName;\n }", "public void setProductName(String productName) {\n this.productName = productName;\n }", "public void setProductName(String productName) {\n this.productName = productName;\n }", "private void buyProduct() {\n\t\tSystem.out.println(\"Enter Number of Product :- \");\n\t\tint numberOfProduct = getValidInteger(\"Enter Number of Product :- \");\n\t\twhile (!StoreController.getInstance().isValidNumberOfProduct(\n\t\t\t\tnumberOfProduct)) {\n\t\t\tSystem.out.println(\"Enter Valid Number of Product :- \");\n\t\t\tnumberOfProduct = getValidInteger(\"Enter Number of Product :- \");\n\t\t}\n\t\tfor (int number = 1; number <= numberOfProduct; number++) {\n\t\t\tSystem.out.println(\"Enter \" + number + \" Product Id\");\n\t\t\tint productId = getValidInteger(\"Enter \" + number + \" Product Id\");\n\t\t\twhile (!StoreController.getInstance().isValidProductId(productId)) {\n\t\t\t\tSystem.out.println(\"Enter Valid Product Id\");\n\t\t\t\tproductId = getValidInteger(\"Enter \" + number + \" Product Id\");\n\t\t\t}\n\t\t\tSystem.out.println(\"Enter product Quantity\");\n\t\t\tint quantity = getValidInteger(\"Enter product Quantity\");\n\t\t\tCartController.getInstance().addProductToCart(productId, quantity);\n\t\t}\n\t}", "@Override\n\tpublic void setMovementQty (BigDecimal MovementQty)\n\t{\n\t\tMProduct product = getProduct();\n\t\tif (MovementQty != null && product != null)\n\t\t{\n\t\t\tint precision = product.getUOMPrecision();\n\t\t\tMovementQty = MovementQty.setScale(precision, BigDecimal.ROUND_HALF_UP);\n\t\t}\n\t\tsuper.setMovementQty(MovementQty);\n\t}", "public void setRespondingProductId(java.lang.CharSequence value) {\n this.responding_product_id = value;\n }", "public ProductType getProduct() {\n return product;\n }", "public void setProductNo(String productNo) {\n\t\tthis.productNo = productNo;\n\t}", "public void setQty(java.math.BigDecimal newQty)\n\t\tthrows java.rmi.RemoteException;", "public T getProduct() {\n return this.product;\n }", "public String getProduct()\n {\n return product;\n }", "public void setProductName(java.lang.String productName) {\n this.productName = productName;\n }", "public void setM_Product_ID (int M_Product_ID);", "public void setM_Product_ID (int M_Product_ID);", "public Double getProductQty() {\n return productQty;\n }", "public void buyProduct(String productName) throws ProductNotFoundException {\r\n\r\n if (doesRecentOrderExist(productName)) {\r\n reorderProduct(productName);\r\n } else {\r\n //Create a new order to be given to the WebMarket\r\n Order newOrder = new Order(this, productName, \"buy\", \"pending\");\r\n\r\n //Acknowlegement print statment\r\n System.out.println(\"CUSTOMER: Request NEW purchase of - \" + newOrder.getProductName());\r\n\r\n //Send the order to WebMarket via placeNewOrder()\r\n market.placeNewOrder(newOrder);\r\n\r\n //Add this order to the customers personel list of orders\r\n orderHistory.add(newOrder);\r\n }\r\n }", "public com.huawei.www.bme.cbsinterface.cbs.businessmgr.NewSubscriberExtRequestProduct[] getProduct() {\r\n return product;\r\n }", "public DocumentLifecycleWorkflowRequest setProductName(String productName) {\n\t\tthis.productName = productName;\n\t\treturn this;\n\t}", "public void setQty (BigDecimal Qty)\n\t{\n\t\tsetQtyEntered(Qty);\n\t\tsetMovementQty(getQtyEntered());\n\t}", "@JsonSetter(\"product_identifiers\")\n public void setProductIdentifiers (ProductIdentifiers value) { \n this.productIdentifiers = value;\n }", "public void setProductId(String productId) {\r\n\t\tthis.productId = productId;\r\n\t}", "public void setQuantity(int qty) {\r\n\t\tthis.quantity = qty;\r\n\t}", "void setProductPlan(final ProductPlan productPlan);", "public void setXpeProductId(String value) {\n setAttributeInternal(XPEPRODUCTID, value);\n }", "private void sendDeliveryRequest(Product product) {\n ACLMessage cfp = new ACLMessage(ACLMessage.CFP);\n try {\n cfp.setContentObject(product);\n } catch (IOException e) {\n System.err.println(\"[STORE] Couldn't set content Object in CFP message with product: \" + product.toString());\n return;\n }\n\n graphicsDisplay.setGreen(\"Product\" + product.getId());\n addBehaviour(new FIPAContractNetInit(this, cfp, couriers));\n }", "public void setQty(int qty) {\n this.qty = qty;\n }", "@RequestMapping(value = \"/products/{productId}\", method = RequestMethod.PUT)\n\t public void updateProductPrice(@RequestBody ProductData productRequest, \n\t @PathVariable int productId) {\n\t\t\tProductDao product = prdDaoMapper.convertToDao(productRequest);\n\t\t\tproductService.updateProductPrice(product);\t\n\t }", "public Product(String name) {\n setProductionNumber(currentProductionNumber);\n this.name = name;\n this.serialNumber = currentProductionNumber;\n this.manufacturedOn = new java.util.Date();\n }", "@Test\n public void setProduct() throws NullReferenceException {\n cartItem.setProduct(product1);\n assertSame(product1, cartItem.getProduct());\n }", "public void setProductQuantity (Product key, int quant) {\n\t\tm_prodList.remove(key);\n\t\tm_prodList.put(key,new Integer(quant));\n\n\t}", "void setProductDescription(java.lang.String productDescription);", "public void setProductName (java.lang.String productName) {\r\n\t\tthis.productName = productName;\r\n\t}", "public java.lang.String getProduct() {\n return product;\n }", "public void setProductPrice(Integer productPrice) {\n\t\tthis.productPrice = productPrice;\n\t}", "public void setQtyEntered (BigDecimal QtyEntered);", "public com.autodesk.ws.avro.Call.Builder clearRequestingProductId() {\n requesting_product_id = null;\n fieldSetFlags()[1] = false;\n return this;\n }", "public void setProductName(String productName) {\r\n\t\tthis.productName = productName;\r\n\t}" ]
[ "0.6897562", "0.65840465", "0.65665764", "0.65538913", "0.65293217", "0.6398831", "0.6384879", "0.6329094", "0.63207567", "0.62080616", "0.62001145", "0.6098147", "0.60488266", "0.6026849", "0.6014629", "0.5968196", "0.59532005", "0.5943104", "0.5905333", "0.5872682", "0.5861064", "0.58524287", "0.5824222", "0.57978594", "0.5781965", "0.5771926", "0.5763288", "0.5762829", "0.5757276", "0.57376516", "0.5715652", "0.57022107", "0.57022107", "0.5688291", "0.5660958", "0.566008", "0.56509244", "0.5647262", "0.5603467", "0.5603467", "0.559239", "0.5586451", "0.55733526", "0.55733526", "0.55493426", "0.55493426", "0.55493426", "0.55493426", "0.55493426", "0.55493426", "0.5537065", "0.55314654", "0.551185", "0.55117655", "0.54916704", "0.549059", "0.54867166", "0.54853266", "0.5473367", "0.5462824", "0.5457717", "0.54507715", "0.5447181", "0.5438469", "0.5438469", "0.5438469", "0.5424303", "0.542194", "0.54157954", "0.54052335", "0.54051936", "0.53948146", "0.53764045", "0.53729224", "0.53693914", "0.5358745", "0.5358745", "0.53502834", "0.5348499", "0.5337147", "0.53336364", "0.53291315", "0.5328168", "0.53228444", "0.5316019", "0.5315936", "0.53126127", "0.530814", "0.53069115", "0.5302039", "0.5300504", "0.5296962", "0.5291053", "0.5288468", "0.52879775", "0.5287848", "0.52817756", "0.5278419", "0.52773863", "0.5273459" ]
0.6412012
5
Gets the recipient value for this BuyRequestType.
public java.lang.String getRecipient() { return recipient; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getRecipient() {\n\t\treturn this.recipient;\n\t}", "public String getRecipient() {\n\t\treturn recipient;\n\t}", "public String getRecipient()\n {\n return recipient;\n }", "public Recipient getRecipient() {\n return recipient;\n }", "public final Player getRecipient() {\n return recipient;\n }", "public String recipientId() {\n return recipientId;\n }", "public TriggerRecipient getRecipient () {\n return this.recipient;\n }", "protected String getRecipient() {\n return parameterService.getParameterValueAsString(AwardDocument.class,\n Constants.REPORT_TRACKING_NOTIFICATIONS_BATCH_RECIPIENT);\n }", "public static String getRecipientEmail() {\n return recipientEmail;\n }", "public java.lang.Object getRecipientEmailAddress() {\n return recipientEmailAddress;\n }", "public ReceiverIdentifier getRecipient() {\n\n // Get the recipient of the missive document\n return this.missiveHeader.getRcv();\n }", "public String getDeliverTo(){\n\t\treturn deliverTo;\n\t}", "public int getRecipientId() {\r\n\t\treturn recipientId;\r\n\t}", "@java.lang.Override\n public long getRecipientId() {\n return recipientId_;\n }", "@java.lang.Override\n public long getRecipientId() {\n return recipientId_;\n }", "public String getSender() {\n return this.sender;\n }", "public String getSender() {\n return sender;\n }", "public static Sender getSender() {\n return sender;\n }", "public Number getBuyerId() {\n return (Number) getAttributeInternal(BUYERID);\n }", "public java.math.BigInteger getReceivingType() {\n return receivingType;\n }", "public String getSender() {\n\t\treturn sender;\n\t}", "public String getSender() {\n return Sender;\n }", "public String getSender() {\n\t\treturn senderId;\n\t}", "public String getSender ()\r\n\t{\r\n\t\treturn sender;\r\n\t}", "public String getSenderAddress() {\n return senderAddress;\n }", "public String getReceiver() {\n return Receiver;\n }", "public Number getBuyerId() {\n return (Number)getAttributeInternal(BUYERID);\n }", "public APIgetRecipientsRequest getRecipients() {\n return new APIgetRecipientsRequest();\n }", "public java.lang.String getRecipientDn() {\r\n return recipientDn;\r\n }", "public int getToRequest() {\n return this.toRequest;\n }", "public double getReceivable() {\n return receivable;\n }", "public java.lang.String getSenderAddress() {\n return senderAddress;\n }", "@Override\n public String toString() {\n return \"Recipient: \" + recipients[0] + \"; Type: \" + type;\n }", "com.nhcsys.webservices.getmessages.getmessagestypes.v1.MessageDestinationType getTo();", "java.lang.String getSender();", "java.lang.String getSender();", "java.lang.String getSender();", "java.lang.String getSender();", "java.lang.String getSender();", "java.lang.String getSender();", "@ApiModelProperty(value = \"Recipient name is required for cross-border enhanced money transfer OCTs.\")\n public String getRecipientName() {\n return recipientName;\n }", "java.lang.String getSenderId();", "public String getSenderAddress() {\n return getStringProperty(SENDER_ADDRESS_KEY);\n }", "public String getBuyer() {\n return buyer;\n }", "public String getReceiver() {\n\t\treturn receiverId;\n\t}", "public static Receiver getReceiver() {\n return receiver;\n }", "public java.math.BigDecimal getReceiveAmount() {\r\n return receiveAmount;\r\n }", "public java.lang.String getSenderAddress() {\r\n return senderAddress;\r\n }", "public String getReceiverAddress() {\n return receiverAddress;\n }", "public java.lang.String getSenderAddress() {\n return senderAddress;\n }", "public BICorIBAN getSender() {\n\n // Get the sender of the missive document\n return this.missiveHeader.getSnd();\n }", "public String senderId() {\n return senderId;\n }", "public java.lang.String getSenderId() {\r\n return senderId;\r\n }", "public String getSender() {\n Object ref = sender_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n sender_ = s;\n return s;\n }\n }", "public String getRecipient(int i) {\n return recipients.get(i);\n }", "public final Player getSender() {\n return sender;\n }", "public Node getSender() {\n return sender;\n }", "public UserModel getUser() {\n return sender;\n }", "public String getBuyerContactPhone() {\n return buyerContactPhone;\n }", "public java.lang.String getReceiverEmail() {\r\n return receiverEmail;\r\n }", "public String getSender() {\n Object ref = sender_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n sender_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getReceiver() {\n Object ref = receiver_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n receiver_ = s;\n return s;\n }\n }", "public java.lang.String getReceiverAddress() {\n return receiverAddress;\n }", "public String getBuyerContactor() {\n return buyerContactor;\n }", "public String getReceiverChargesAmount() {\r\n\t\treturn receiverChargesAmount;\r\n\t}", "public String getSender() {\n return msgSender;\n }", "public int getSenderId() {\n return senderId;\n }", "public String getMailBillAddress() {\n return (String) getAttributeInternal(MAILBILLADDRESS);\n }", "com.google.protobuf.ByteString\n getSenderBytes();", "com.google.protobuf.ByteString\n getSenderBytes();", "com.google.protobuf.ByteString\n getSenderBytes();", "com.google.protobuf.ByteString\n getSenderBytes();", "com.google.protobuf.ByteString\n getSenderBytes();", "com.google.protobuf.ByteString\n getSenderBytes();", "com.google.protobuf.ByteString\n getSenderBytes();", "public java.lang.String getReceiverAddress()\n {\n return receiverAddress;\n }", "public java.lang.String getReceiverAddress() {\n return receiverAddress;\n }", "@ApiModelProperty(required = true, value = \"The transaction amount to be delivered to the recipient.\")\n public Double getAmount() {\n return amount;\n }", "public String getShippingSender() {\n return shippingSender;\n }", "public Mailbox getSender() {\n return getMailbox(FieldName.SENDER);\n }", "public java.lang.String getReceiverAddress() {\r\n return receiverAddress;\r\n }", "public static String getRecipient(final Bundle bundle) {\n return bundle.getString(Constants.BUNDLE_STRING_RECIPIENT, null);\n }", "public String getReceiver() {\n Object ref = receiver_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n receiver_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "@java.lang.Override\n public java.lang.String getSender() {\n java.lang.Object ref = sender_;\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 sender_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getSender() {\n java.lang.Object ref = sender_;\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 sender_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getSender() {\n java.lang.Object ref = sender_;\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 sender_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getSender() {\n java.lang.Object ref = sender_;\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 sender_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getSender() {\n java.lang.Object ref = sender_;\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 sender_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getSender() {\n java.lang.Object ref = sender_;\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 sender_ = s;\n return s;\n }\n }", "public java.lang.Object getRecipientDisplayName() {\n return recipientDisplayName;\n }", "public String getFromSenderName() {\n return fromSenderName;\n }", "public java.lang.String getSender() {\n java.lang.Object ref = sender_;\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 sender_ = s;\n return s;\n }\n }", "public java.lang.String getSender() {\n java.lang.Object ref = sender_;\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 sender_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSender() {\n java.lang.Object ref = sender_;\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 sender_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSender() {\n java.lang.Object ref = sender_;\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 sender_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSender() {\n java.lang.Object ref = sender_;\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 sender_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSender() {\n java.lang.Object ref = sender_;\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 sender_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSender() {\n java.lang.Object ref = sender_;\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 sender_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSender() {\n java.lang.Object ref = sender_;\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 sender_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSenderAddress2() {\r\n return senderAddress2;\r\n }" ]
[ "0.69745564", "0.6806902", "0.675803", "0.6590717", "0.65717643", "0.64004856", "0.6186232", "0.61723995", "0.61528057", "0.61124855", "0.6049564", "0.5987737", "0.5916905", "0.587432", "0.5846955", "0.56855035", "0.56751686", "0.5637597", "0.5633608", "0.5599284", "0.55976796", "0.5595007", "0.5584032", "0.55613786", "0.5554086", "0.5523634", "0.5522649", "0.55157393", "0.54908574", "0.5473031", "0.54645", "0.5425579", "0.5421668", "0.54002935", "0.5399424", "0.5399424", "0.5399424", "0.5399424", "0.5399424", "0.5399424", "0.5393689", "0.5392376", "0.5391726", "0.53804046", "0.53745705", "0.5372119", "0.5367584", "0.5363111", "0.5360645", "0.535658", "0.53507227", "0.53343296", "0.53220403", "0.5305492", "0.5302041", "0.5301351", "0.5300635", "0.5294263", "0.52842873", "0.5273639", "0.5270875", "0.52682513", "0.5264311", "0.52634454", "0.5258074", "0.5253111", "0.52469325", "0.5230552", "0.5228876", "0.5228876", "0.5228876", "0.5228876", "0.5228876", "0.5228876", "0.5228876", "0.52209055", "0.5219908", "0.5219552", "0.5211523", "0.52114135", "0.5211116", "0.520539", "0.5200853", "0.519332", "0.519332", "0.519332", "0.519332", "0.519332", "0.519332", "0.51818764", "0.5179734", "0.5178249", "0.51672643", "0.51672643", "0.51672643", "0.51672643", "0.51672643", "0.51672643", "0.51454353", "0.5144545" ]
0.67837477
2
Sets the recipient value for this BuyRequestType.
public void setRecipient(java.lang.String recipient) { this.recipient = recipient; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRecipient(Object recipient) {\n\t\tthis.recipient = recipient;\n\t}", "public void setRecipient(String recipient)\n {\n this.recipient = recipient;\n }", "public final void setRecipient(final Player newRecipient) {\n this.recipient = newRecipient;\n }", "@Override\n public void recipient(String recipient) {\n }", "public void setRecipient(String recipient){\n this.recipients = new String[1];\n recipients[0] = recipient;\n }", "private void setRecipient(String recipient, Message message, Message.RecipientType recipientType)\n throws MessagingException {\n\n if (StringUtils.isNotEmpty(recipient)) {\n message.setRecipients(\n recipientType,\n InternetAddress.parse(recipient)\n );\n }\n }", "public Builder setRecipientId(long value) {\n\n recipientId_ = value;\n bitField0_ |= 0x00000080;\n onChanged();\n return this;\n }", "public PaymentRequest setSender(Sender sender) {\r\n this.sender = sender;\r\n return this;\r\n }", "public void setRecipient(ReceiverIdentifier recipient) {\n\n // Set the recipient of the missive document\n this.missiveHeader.setRcv(recipient);\n\n // Build the missive document\n this.build();\n }", "public void setRecipientEmailAddress(java.lang.Object recipientEmailAddress) {\n this.recipientEmailAddress = recipientEmailAddress;\n }", "public void setRequester(User requester) {\n this.requester = requester;\n }", "public void setDeliverTo(String deliverTo){\n\t\tthis.deliverTo = deliverTo;\n\t}", "public void setBuyerId(Number value) {\n setAttributeInternal(BUYERID, value);\n }", "public void setBuyerId(Number value) {\n setAttributeInternal(BUYERID, value);\n }", "SerialResponse editRecipient(String recipientToken, PinRecipientPut pinRecipientPut);", "public String getRecipient()\n {\n return recipient;\n }", "public String getRecipient() {\n\t\treturn recipient;\n\t}", "public void setBuyer(String buyer) {\n this.buyer = buyer;\n }", "public HopSpec setRecipient(int i, String recipient) {\n recipients.set(i, recipient);\n return this;\n }", "public void addRecipient(String recipient) {\n\t\tthis.recipient = recipient;\n\t}", "public void setRecipientDisplayName(java.lang.Object recipientDisplayName) {\n this.recipientDisplayName = recipientDisplayName;\n }", "public final void setSender(final Player newSender) {\n this.sender = newSender;\n }", "public Builder clearRecipientId() {\n bitField0_ &= ~0x00000080;\n recipientId_ = 0L;\n onChanged();\n return this;\n }", "public Recipient getRecipient() {\n return recipient;\n }", "public Binding (TriggerRecipient recipient) {\n this(recipient, TriggerAlways.getInstance(), false);\n }", "public String getDeliverTo(){\n\t\treturn deliverTo;\n\t}", "public Object getRecipient() {\n\t\treturn this.recipient;\n\t}", "@GenIgnore\n public MailMessage setTo(String to) {\n List<String> toList = new ArrayList<String>();\n toList.add(to);\n this.to = toList;\n return this;\n }", "@Override\n public void addRecipient(String newRecipient) {\n System.out.println(\"Invalid request cannot add \"\n + newRecipient\n + \" to any mailing list\");\n }", "public String recipientId() {\n return recipientId;\n }", "public void setSender(String sender) {\n Sender = sender;\n }", "public void setTo(Address to) {\n setAddressList(FieldName.TO, to);\n }", "@ApiModelProperty(value = \"If the transaction is a money transfer and cross-border or U.S. domestic, this field must contain the sender's address.<br><br>If the transaction is a funds disbursement and cross-border or U.S. domestic, this field must contain either the address of the merchant or government entity sending the funds disbursement.<br><br>If the transaction is a pre-paid load or credit card bill pay and U.S. domestic, this field must contain the sender's address.\")\n public String getSenderAddress() {\n return senderAddress;\n }", "public void setSender(String sender){\n this.sender = sender;\n }", "public void setRecipientId(int recipientId) {\r\n\t\tthis.recipientId = recipientId;\r\n\t}", "public final Player getRecipient() {\n return recipient;\n }", "public void setSenderAddress(final String value) {\n setProperty(SENDER_ADDRESS_KEY, value);\n }", "public void setSenderCharges(List<SenderCharge> senderCharges) {\r\n\t\tthis.senderCharges = senderCharges;\r\n\t}", "public void setSender(String sender) {\n this.sender = sender;\n }", "public void setReceiveAmount(java.math.BigDecimal receiveAmount) {\r\n this.receiveAmount = receiveAmount;\r\n }", "public java.lang.String getRecipient() {\n return recipient;\n }", "public CallSpec<String, HttpError> acceptContactRequest(String recipientId, String senderId) {\n return Resource.<String, HttpError>newPutSpec(api, \"/v1/users/{user_id}/contact_requests/{id}/accept\", false)\n .pathParam(\"user_id\", recipientId)\n .pathParam(\"id\", senderId)\n .responseAs(String.class)\n .build();\n }", "public static void setRecipientEmail(String recipientEmail) {\n MailHelper.recipientEmail = recipientEmail;\n }", "public Builder setSender(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n sender_ = value;\n onChanged();\n return this;\n }", "@ApiModelProperty(value = \"If the transaction is a money transfer and cross-border or U.S. domestic, this field must contain the sender's name.<br><br>If the transaction is a funds disbursement and cross-border or U.S. domestic, this field must contain either the name of the merchant or government entity sending the funds disbursement.<br><br>If the transaction is a pre-paid load or credit card bill pay and U.S. domestic, this field must contain the sender's name.<br><br>Recommended Format: Last Name/Family Surname 1 + Space + Last Name/Family Surname 2 (optional) + Space + First Name/Given Name + Space + Middle Initial or Middle name (optional) + space<br><br>Example: Doe John A\")\n public String getSenderName() {\n return senderName;\n }", "public HopSpec addRecipient(String recipient) {\n recipients.add(recipient);\n return this;\n }", "public Binding (TriggerRecipient recipient, boolean safety) {\n this(recipient, TriggerAlways.getInstance(), safety);\n }", "public void setSender(Mailbox sender) {\n setMailbox(FieldName.SENDER, sender);\n }", "public Builder setSender(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n sender_ = value;\n onChanged();\n return this;\n }", "public Builder setSender(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n sender_ = value;\n onChanged();\n return this;\n }", "public Builder setSender(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n sender_ = value;\n onChanged();\n return this;\n }", "public Builder setSender(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n sender_ = value;\n onChanged();\n return this;\n }", "public Builder setSender(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n sender_ = value;\n onChanged();\n return this;\n }", "public Builder setSender(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n sender_ = value;\n onChanged();\n return this;\n }", "public void setSendBy(String value) {\n setAttributeInternal(SENDBY, value);\n }", "public void setReceiver(Receiver receiver) {\n\t this.receiver = receiver;\n\t }", "public void setTo(Address... to) {\n setAddressList(FieldName.TO, to);\n }", "public Recipient(Recipient source) {\n if (source.RecipientId != null) {\n this.RecipientId = new String(source.RecipientId);\n }\n if (source.RecipientType != null) {\n this.RecipientType = new String(source.RecipientType);\n }\n if (source.Description != null) {\n this.Description = new String(source.Description);\n }\n if (source.RoleName != null) {\n this.RoleName = new String(source.RoleName);\n }\n if (source.RequireValidation != null) {\n this.RequireValidation = new Boolean(source.RequireValidation);\n }\n if (source.RequireSign != null) {\n this.RequireSign = new Boolean(source.RequireSign);\n }\n if (source.SignType != null) {\n this.SignType = new Long(source.SignType);\n }\n if (source.RoutingOrder != null) {\n this.RoutingOrder = new Long(source.RoutingOrder);\n }\n if (source.IsPromoter != null) {\n this.IsPromoter = new Boolean(source.IsPromoter);\n }\n }", "public void setRecipients(String[] recipients) {\n\t\tthis.recipients = recipients;\n\t}", "public void setUser(UserModel user) {\n this.sender = user;\n }", "public void setSender(BICorIBAN sender) {\n\n // Set the sender of the missive document\n this.missiveHeader.setSnd(sender);\n\n // Build the missive\n this.build();\n }", "public Builder setSender(com.lvl6.proto.UserProto.MinimumUserProto value) {\n if (senderBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n sender_ = value;\n onChanged();\n } else {\n senderBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "public Builder setSender(com.lvl6.proto.UserProto.MinimumUserProto value) {\n if (senderBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n sender_ = value;\n onChanged();\n } else {\n senderBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "public Builder setSender(com.lvl6.proto.UserProto.MinimumUserProto value) {\n if (senderBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n sender_ = value;\n onChanged();\n } else {\n senderBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "public Builder setSender(com.lvl6.proto.UserProto.MinimumUserProto value) {\n if (senderBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n sender_ = value;\n onChanged();\n } else {\n senderBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "public final void setIncomingRequest_DeliveringOrganisation(nap.proxies.Organisation incomingrequest_deliveringorganisation)\r\n\t{\r\n\t\tsetIncomingRequest_DeliveringOrganisation(getContext(), incomingrequest_deliveringorganisation);\r\n\t}", "@Override\n public void sendEmail(String newRecipient) {\n System.out.println(\"Email sent to _\" \n + newRecipient\n + \"_ Invalid RECIPIENTS\");\n }", "public void addRecipient(I recipient) {\n\t\t//TODO: public <T extends Worker & I> void addRecipient(T recipient)\n\t\tif (recipient == null)\n\t\t\tthrow new NullPointerException();\n\t\t//I'm pretty sure this can only happen via unchecked casts or\n\t\t//incompatible class file changes, but we should check anyway.\n\t\tif (!klass.isInstance(recipient))\n\t\t\tthrow new IllegalArgumentException(\"Recipient \"+recipient+\" not instance of \"+klass);\n\t\t//Messaging a non-worker doesn't make sense -- SDEP isn't defined.\n\t\tif (!(recipient instanceof Worker))\n\t\t\tthrow new IllegalArgumentException(\"Recipient \"+recipient+\" not instance of Filter, Splitter or Joiner\");\n\t\trecipients.add((Worker<?, ?>)recipient);\n\t}", "public void setReceiver (Receiver receiver) {\n\t\t_receiver = receiver;\n\t}", "public void setRecipientDn(java.lang.String recipientDn) {\r\n this.recipientDn = recipientDn;\r\n }", "@Override\n\tpublic void sendRequest(String userEmail, String recipientEmail) {\n\t\tconn = ConnectionFactory.getConnection();\n\n\t\ttry {\n\t\t\tString sql = \"insert into friendship (user_id_1, user_id_2, status) values (?, ?, ?)\";\n\t\t\tpstmt = conn.prepareStatement(sql);\n\n\t\t\tpstmt.setString(1, userEmail);\n\t\t\tpstmt.setString(2, recipientEmail);\n\t\t\tpstmt.setString(3, Constants.PENDING);\n\n\t\t\tpstmt.executeUpdate();\n\t\t} catch(SQLException sqlex) {\n\t\t\tsqlex.printStackTrace();\n\t\t} catch(Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionFactory.closeResources(set, pstmt, conn);\n\t\t}\n\n\t}", "@ApiModelProperty(required = true, value = \"The transaction amount to be delivered to the recipient.\")\n public Double getAmount() {\n return amount;\n }", "public void setReceiver(String receiver) {\n Receiver = receiver;\n }", "public void setMailBillAddress(String value) {\n setAttributeInternal(MAILBILLADDRESS, value);\n }", "@ApiModelProperty(value = \"Recipient name is required for cross-border enhanced money transfer OCTs.\")\n public String getRecipientName() {\n return recipientName;\n }", "void setSenderId(int id) {\n this.senderId = id;\n }", "public void setSender(boolean besender) {\n if (this.sender != besender) {\n SSRCCache sSRCCache;\n if (besender) {\n sSRCCache = this.cache;\n sSRCCache.sendercount++;\n setAlive(true);\n } else {\n sSRCCache = this.cache;\n sSRCCache.sendercount--;\n }\n this.sender = besender;\n }\n }", "public Notification(SystemUser sender, SystemUser recipient, String currency, BigDecimal amount, Date transactionDate, boolean seen, boolean request, boolean rejected) {\r\n this.recipient = recipient;\r\n this.sender = sender;\r\n this.currency = currency;\r\n this.amount = amount.setScale(2, RoundingMode.HALF_UP);\r\n this.transactionDate = transactionDate;\r\n this.seen = seen;\r\n this.request = request;\r\n this.rejected = rejected;\r\n\r\n }", "public final void setIncomingRequest_Person_Caller(com.mendix.systemwideinterfaces.core.IContext context, nap.proxies.Person incomingrequest_person_caller)\r\n\t{\r\n\t\tif (incomingrequest_person_caller == null)\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.IncomingRequest_Person_Caller.toString(), null);\r\n\t\telse\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.IncomingRequest_Person_Caller.toString(), incomingrequest_person_caller.getMendixObject().getId());\r\n\t}", "@Override\r\n\tpublic void setRequestParam(Payee payee) {\n\t\tthis.userNo = payee.getAccount();\r\n\t\tthis.requestTime = DateUtil.getDate(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\tthis.merchantOrderNo = getPayeeNumber();\r\n\t\tthis.receiverAccountNoEnc = getAccount();\r\n\t\tthis.receiverNameEnc = getRealName();\r\n\t\tthis.paidAmount = String.format(\"%.2f\", getAmount().doubleValue());\r\n\t\tthis.callbackUrl = \"http://api.iwanol.com/funds/huiju/notify\";\r\n\t\tthis.hmac = this.sign(payee.getSignKey());\r\n\t}", "public void setSenderAddress(java.lang.String senderAddress) {\r\n this.senderAddress = senderAddress;\r\n }", "@Override\n\tpublic void setMarketCustomerDeliveryPaymentPerson() {\n\t\t\n\t}", "public final void setIncomingRequest_DeliveringOrganisation(com.mendix.systemwideinterfaces.core.IContext context, nap.proxies.Organisation incomingrequest_deliveringorganisation)\r\n\t{\r\n\t\tif (incomingrequest_deliveringorganisation == null)\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.IncomingRequest_DeliveringOrganisation.toString(), null);\r\n\t\telse\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.IncomingRequest_DeliveringOrganisation.toString(), incomingrequest_deliveringorganisation.getMendixObject().getId());\r\n\t}", "public Builder setSender(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n sender_ = value;\n onChanged();\n return this;\n }", "public void setReceivingType(java.math.BigInteger receivingType) {\n this.receivingType = receivingType;\n }", "public void setAmount(int amount) {\n\t\tif (amount > 0) { // checks if amount is valid - larger than 0\n\t\t\tLocateRequest.amount = amount;\n\t\t} else {\n\t\t\tSystem.err.print(\"The amount provided is not valid\"); // print message that input is not valid\n\t\t}\n\t}", "public Builder clearSender() {\n if (senderBuilder_ == null) {\n sender_ = com.lvl6.proto.UserProto.MinimumUserProto.getDefaultInstance();\n onChanged();\n } else {\n senderBuilder_.clear();\n }\n bitField0_ = (bitField0_ & ~0x00000001);\n return this;\n }", "public Builder clearSender() {\n if (senderBuilder_ == null) {\n sender_ = com.lvl6.proto.UserProto.MinimumUserProto.getDefaultInstance();\n onChanged();\n } else {\n senderBuilder_.clear();\n }\n bitField0_ = (bitField0_ & ~0x00000001);\n return this;\n }", "public Builder clearSender() {\n if (senderBuilder_ == null) {\n sender_ = com.lvl6.proto.UserProto.MinimumUserProto.getDefaultInstance();\n onChanged();\n } else {\n senderBuilder_.clear();\n }\n bitField0_ = (bitField0_ & ~0x00000001);\n return this;\n }", "public Builder clearSender() {\n if (senderBuilder_ == null) {\n sender_ = com.lvl6.proto.UserProto.MinimumUserProto.getDefaultInstance();\n onChanged();\n } else {\n senderBuilder_.clear();\n }\n bitField0_ = (bitField0_ & ~0x00000001);\n return this;\n }", "public int getRecipientId() {\r\n\t\treturn recipientId;\r\n\t}", "public Builder setSenderBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n sender_ = value;\n onChanged();\n return this;\n }", "public void setRequesterName(String requesterName);", "public void setBuyerContactor(String buyerContactor) {\n this.buyerContactor = buyerContactor == null ? null : buyerContactor.trim();\n }", "public void setReceivable(double receivable) {\n this.receivable = receivable;\n }", "public void setSender( Term sender ) {\n this.sender = sender;\n }", "public Builder setSenderBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n sender_ = value;\n onChanged();\n return this;\n }", "public Builder setSenderBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n sender_ = value;\n onChanged();\n return this;\n }", "public Builder setSenderBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n sender_ = value;\n onChanged();\n return this;\n }", "public Builder setSenderBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n sender_ = value;\n onChanged();\n return this;\n }" ]
[ "0.6463172", "0.63183033", "0.6043077", "0.6026095", "0.601419", "0.56780857", "0.5571271", "0.5540466", "0.5513089", "0.5438633", "0.5427378", "0.5380053", "0.5366168", "0.5366168", "0.53492117", "0.53469193", "0.5312567", "0.5308809", "0.5264046", "0.52440256", "0.51854414", "0.5178152", "0.515442", "0.5152668", "0.5149397", "0.51438296", "0.51334435", "0.5100991", "0.5084861", "0.50713277", "0.50452465", "0.5043884", "0.5023603", "0.5002674", "0.49969438", "0.49958572", "0.49896944", "0.4977859", "0.49691066", "0.49690115", "0.49684995", "0.49626425", "0.4962394", "0.49554777", "0.49315375", "0.4921488", "0.49188372", "0.49169514", "0.48958027", "0.48958027", "0.48958027", "0.48958027", "0.48958027", "0.48958027", "0.48776662", "0.4863206", "0.4860272", "0.48537347", "0.48482403", "0.48449022", "0.48391488", "0.48384064", "0.48384064", "0.48384064", "0.48384064", "0.48316196", "0.48307142", "0.48292544", "0.48218828", "0.4818348", "0.48035052", "0.47997534", "0.47969186", "0.47933155", "0.47885773", "0.4787021", "0.47862634", "0.4779452", "0.47608206", "0.4759264", "0.47585705", "0.4753559", "0.4752541", "0.47348073", "0.47252533", "0.47112164", "0.47020227", "0.47020227", "0.47020227", "0.47020227", "0.46993306", "0.46968904", "0.46942356", "0.46834484", "0.46822116", "0.4678819", "0.46744555", "0.46744555", "0.46744555", "0.46744555" ]
0.61161643
2
Gets the reference1 value for this BuyRequestType.
public java.lang.String getReference1() { return reference1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference1() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(REFERENCE1_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference1() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(REFERENCE1_PROP.get());\n }", "public String getFreeuse1() {\n\t\treturn freeuse1;\n\t}", "private String getRef1Val(String refVal1) {\n logger.info(\"Ref 2 from profile Options is null\");\n String refTag = \"\";\n if (refVal1.equalsIgnoreCase(\"PURCHASE ORDER NUMBER\")) {\n refTag = \n \"<PONumber>\" + reference1 + \"</PONumber>\" + \"<CustomerReference>\" + \n reference2 + \"</CustomerReference>\";\n } else if (refVal1.equalsIgnoreCase(\"SALES ORDER NUMBER\")) {\n refTag = \n \"<CustomerReference>\" + \"Ref# \" + reference2 + \" SO# \" + reference1 + \n \"</CustomerReference>\";\n } else {\n refTag = \n \"<CustomerReference>\" + \"Ref# \" + reference2 + \" Del# \" + reference1 + \n \"</CustomerReference>\";\n }\n return refTag;\n }", "public ResourcesOrPoints getReceive1() {\n\t\treturn receive1;\n\t}", "public String getFreeuse1() {\n return freeuse1;\n }", "public ResourcesOrPoints getGive1() {\n\t\treturn give1;\n\t}", "@ApiModelProperty(value = \"If the transaction is a money transfer, pre-paid load, or credit card bill pay, and if the sender intends to fund the transaction with a non-financial instrument (for example, cash), a reference number unique to the sender is required.<br><br>If the transaction is a funds disbursement, the field is required.<br><br> This field is required if senderAccountNumber is not sent.\")\n public String getSenderReference() {\n return senderReference;\n }", "public void setReference1(java.lang.String reference1) {\n this.reference1 = reference1;\n }", "public String getRefType() {\n return refType;\n }", "public Type getType1() {\n\t\treturn this.data.getType1();\n\t}", "public java.lang.String getS1() {\n java.lang.Object ref = s1_;\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 s1_ = s;\n }\n return s;\n }\n }", "@Override\r\n\tpublic String getRefBillType() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getRefBillType() {\n\t\treturn null;\r\n\t}", "public com.google.protobuf.ByteString\n getS1Bytes() {\n java.lang.Object ref = s1_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n s1_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n public String toString() {\n return \"ConfirmOrderReferenceRequest{\"\n + \"amazonOrderReferenceId=\" + amazonOrderReferenceId\n + \", authorizationAmount=\" + authorizationAmount\n + \", authorizationCurrencyCode=\" + authorizationCurrencyCode\n + \", successUrl=\" + successUrl\n + \", failureUrl=\" + failureUrl\n + \", mwsAuthToken=\" + getMwsAuthToken() \n + \", expectImmediateAuthorize=\" + isExpectImmediateAuthorization() +'}';\n }", "public java.lang.String getS1() {\n java.lang.Object ref = s1_;\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 s1_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public long getField1() {\n return field1_;\n }", "public java.lang.String getReference2() {\n return reference2;\n }", "@ApiModelProperty(value = \"The order used to purchase this gift certificate. This value is ONLY set during checkout when a certificate is purchased, not when it is used. Any usage is recorded in the ledger\")\n public String getReferenceOrderId() {\n return referenceOrderId;\n }", "public com.google.protobuf.ByteString\n getS1Bytes() {\n java.lang.Object ref = s1_;\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 s1_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Integer getWishPosTypeid1() {\n return wishPosTypeid1;\n }", "public long getField1() {\n return field1_;\n }", "public Float getBonusReference() {\n return bonusReference;\n }", "public java.lang.String getReference() {\n return reference;\n }", "@Schema(example = \"inv_1815_ref_1\", description = \"ID for the reference of the API consumer.\")\n public String getReferenceId() {\n return referenceId;\n }", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public String getReference(){\r\n\t\t\r\n\t\treturn McsElement.getElementByXpath(driver,REFERENCE_INPUT).getAttribute(\"value\");\r\n\t}", "public String getReference() {\n return reference;\n }", "@ApiModelProperty(required = true, value = \"The reference for the transaction that will be provided by the originating institution. Empty string if no data provided\")\n @NotNull\n\n public String getPayeeReference() {\n return payeeReference;\n }", "protected RequestBean1 getRequestBean1() {\n return (RequestBean1)getBean(\"RequestBean1\");\n }", "protected RequestBean1 getRequestBean1() {\n return (RequestBean1)getBean(\"RequestBean1\");\n }", "public byte get_sendbyte1() {\n return sendbyte1;\n }", "public PaymentRequest setReference(String reference) {\r\n this.reference = reference;\r\n return this;\r\n }", "public java.lang.String getC1()\n {\n return this.c1;\n }", "public String getREFERENCE() {\r\n return REFERENCE;\r\n }", "public String getMerchantReference() {\n return this.merchantReference;\n }", "public byte getP1() {\n return this.apdu_buffer[P1];\n }", "public String getRequestRecordReference() {\n return requestRecordReference;\n }", "public CustomerContactNumber1Elements getCustomerContactNumber1Access() {\n\t\treturn pCustomerContactNumber1;\n\t}", "public java.lang.String getSenderAddressEnvelopeLevel1() {\n return senderAddressEnvelopeLevel1;\n }", "public Boolean getC1() {\n\t\treturn c1;\n\t}", "public XtraRewardsTxnVOImpl getXtraRewardsTxnVO1() {\n return (XtraRewardsTxnVOImpl) findViewObject(\"XtraRewardsTxnVO1\");\n }", "public void setReference1(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(REFERENCE1_PROP.get(), value);\n }", "public String getMerchantReference() {\n return merchantReference;\n }", "public String getSpare1() {\r\n return spare1;\r\n }", "@JsonGetter(\"reference\")\r\n public String getReference ( ) { \r\n return this.reference;\r\n }", "public IDatatype getReference() { \n\t\treturn myReference;\n\t}", "public java.lang.String getReceiverAddressEnvelopeLevel1() {\n return receiverAddressEnvelopeLevel1;\n }", "public java.lang.String getReferenceNumber() {\r\n return referenceNumber;\r\n }", "public java.lang.String getSenderAddressEnvelopeLevel1() {\n return senderAddressEnvelopeLevel1;\n }", "public BigDecimal getREF_NO() {\r\n return REF_NO;\r\n }", "public final String getReference() {\n return reference;\n }", "public String getRef(){\r\n\t\treturn this.getAttribute(\"ref\").getValue();\r\n\t}", "public double getB1() {\n return B1;\n }", "public java.lang.String getReceiverAddressEnvelopeLevel1() {\n return receiverAddressEnvelopeLevel1;\n }", "public String getRef() {\n return ref;\n }", "public String getBakCode1() {\n return bakCode1;\n }", "public String getMerchantOrderReference() {\n return merchantOrderReference;\n }", "public void setReference1(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(REFERENCE1_PROP.get(), value);\n }", "public String getAddress1() {\n\t\treturn address1;\n\t}", "public String getAddress1() {\n\t\treturn address1;\n\t}", "public java.lang.String getField1125() {\n java.lang.Object ref = field1125_;\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 field1125_ = s;\n return s;\n }\n }", "public String getOrderReference() {\n return orderReference;\n }", "public java.lang.String getField1164() {\n java.lang.Object ref = field1164_;\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 field1164_ = s;\n return s;\n }\n }", "private String getRef2Val(String refVal2) {\n logger.info(\"Ref 1 from profile Options is null\");\n String refTag = \"\";\n if (refVal2.equalsIgnoreCase(\"PURCHASE ORDER NUMBER\")) {\n refTag = \n \"<PONumber>\" + reference2 + \"</PONumber>\" + \"<CustomerReference>\" + \n reference1 + \"</CustomerReference>\";\n } else if (refVal2.equalsIgnoreCase(\"SALES ORDER NUMBER\")) {\n refTag = \n \"<CustomerReference>\" + \"Ref# \" + reference1 + \" SO# \" + reference2 + \n \"</CustomerReference>\";\n } else {\n refTag = \n \"<CustomerReference>\" + \"Ref# \" + reference1 + \" Del# \" + reference2 + \n \"</CustomerReference>\";\n }\n return refTag;\n }", "public T getRefer() {\n return refer;\n }", "@Override\n\tpublic java.lang.String getField1() {\n\t\treturn _second.getField1();\n\t}", "public String getReferenceId() {\n return refid;\n }", "public byte getP1() {\n\treturn (byte) (header[2] & 0xFF);\n }", "public String getCustomerReference() {\n return customerReference;\n }", "String getVoucherRef();", "com.google.protobuf.ByteString\n getS1Bytes();", "public java.lang.String getField1164() {\n java.lang.Object ref = field1164_;\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 field1164_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@JsonIgnore\r\n public String getReferenceId() {\r\n return OptionalNullable.getFrom(referenceId);\r\n }", "@Override\n\tpublic java.lang.String getStreet1() {\n\t\treturn _candidate.getStreet1();\n\t}", "public String getCurrency1() {\r\n\t\treturn currency1;\r\n\t}", "public java.lang.String getValue1() {\n return this.value1;\n }", "public static Currency getReferenceCurrency() {\n return REFERENCE.get();\n }", "@XmlElement\n public String getRefId() {\n return refId;\n }", "public java.lang.String getField1125() {\n java.lang.Object ref = field1125_;\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 field1125_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public int getWeight1() {\n return weight1;\n }", "public PToP.S1Rsp getS1Rsp() {\n return instance.getS1Rsp();\n }", "public final String getRefPKVal() {\n\t\tString str = this.getRequest().getParameter(\"RefPKVal\");\n\t\tif (str == null) {\n\t\t\treturn \"1\";\n\t\t}\n\t\treturn str;\n\t}", "public java.lang.String getReserve1() {\n return reserve1;\n }", "public java.lang.String getField1281() {\n java.lang.Object ref = field1281_;\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 field1281_ = s;\n return s;\n }\n }", "public java.lang.String getField1331() {\n java.lang.Object ref = field1331_;\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 field1331_ = s;\n return s;\n }\n }", "public int getCustomerref() {\n\t\treturn custref;\n\t}", "private String getReferenceValue(String refVal1, String refVal2) {\n logger.info(\"Entered getReferenceValue() method\");\n String refTag = \"\";\n\n\n if ((refVal1.equalsIgnoreCase(\"\")) && (refVal2.equalsIgnoreCase(\"\"))) {\n refTag = \n \"<CustomerReference>\" + \"Ref1# \" + reference1 + \" Ref2# \" + \n reference2 + \"</CustomerReference>\";\n } else if (refVal1.equalsIgnoreCase(\"\")) {\n refTag = getRef2Val(refVal2);\n } else if (refVal2.equalsIgnoreCase(\"\")) {\n refTag = getRef1Val(refVal1);\n } else {\n \n if (refVal1.equalsIgnoreCase(\"PURCHASE ORDER NUMBER\")) {\n refTag = \n \"<PONumber>\" + reference1 + \"</PONumber>\" + \"<CustomerReference>\" + \n reference2 + \"</CustomerReference>\";\n } else if (refVal2.equalsIgnoreCase(\"PURCHASE ORDER NUMBER\")) {\n refTag = \n \"<PONumber>\" + reference2 + \"</PONumber>\" + \"<CustomerReference>\" + \n reference1 + \"</CustomerReference>\";\n } else if ((refVal1.equalsIgnoreCase(\"SALES ORDER NUMBER\")) && \n (refVal2.equalsIgnoreCase(\"DELIVERY NAME\"))) {\n refTag = \n \"<CustomerReference>\" + \"SO# \" + reference1 + \" Del# \" + \n reference2 + \"</CustomerReference>\";\n } else {\n refTag = \n \"<CustomerReference>\" + \"Del# \" + reference1 + \" SO# \" + \n reference2 + \"</CustomerReference>\";\n }\n }\n return refTag;\n\n }", "public String getForgottenPasswordAnswer1() {\n\t\treturn forgottenPasswordAnswer1;\n\t}", "@ApiModelProperty(value = \"The amount of money refunded. This amount is always negative.\")\n public V1Money getRefundedMoney() {\n return refundedMoney;\n }", "public java.lang.CharSequence get2420DREF01ReferenceIdentificationQualifier$1() {\n return _2420DREF01ReferenceIdentificationQualifier;\n }", "public java.lang.CharSequence get2420DREF01ReferenceIdentificationQualifier$1() {\n return _2420DREF01ReferenceIdentificationQualifier;\n }", "public SupplyType getType() \r\n {\r\n assert(true);\r\n return type;\r\n }", "public java.lang.String getField1120() {\n java.lang.Object ref = field1120_;\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 field1120_ = s;\n return s;\n }\n }", "public String getReference();", "public String getReference();", "@ApiModelProperty(required = true, value = \"A value used to tie together service calls related to a single financial transaction. When passing Account Funding Transaction (AFT) and an Original Credit Transaction (OCT) methods, this value must differ between the two methods. When passing the Account Funding Transaction Reversal (AFTR) method, this value must match the retrievalReferenceNumber previously passed with the AFT method for this transaction.<br><br> Recommended Format : ydddhhnnnnnn<br><br>The first fours digits must be a valid yddd date in the Julian date format, where the first digit = 0-9 (last digit of current year) and the next three digits = 001-366 (number of the day in the year). hh can be the two digit hour in a 24 hour clock (00-23) during which the transaction is performed.<br><br> nnnnnn can be the systemsTraceAuditNumber or any 6 digit number.\")\n public String getRetrievalReferenceNumber() {\n return retrievalReferenceNumber;\n }" ]
[ "0.63807636", "0.6324317", "0.5833219", "0.58322334", "0.5811327", "0.5745426", "0.5736703", "0.5714592", "0.56875384", "0.5625839", "0.5420448", "0.53927726", "0.5383786", "0.5383786", "0.5330843", "0.5329601", "0.5324535", "0.5319028", "0.5318099", "0.5291184", "0.5282421", "0.524714", "0.5246944", "0.521782", "0.52094823", "0.5201447", "0.5200071", "0.5200071", "0.5200071", "0.5199134", "0.5194057", "0.5191183", "0.5173184", "0.5173184", "0.5158637", "0.5148648", "0.5130771", "0.51290727", "0.511681", "0.511074", "0.50789654", "0.5077272", "0.5070991", "0.5070089", "0.50650835", "0.5064094", "0.5063277", "0.5055074", "0.5053889", "0.5053136", "0.5050963", "0.50505924", "0.5050005", "0.5048244", "0.5047002", "0.50374657", "0.5034479", "0.50334954", "0.50274795", "0.5008389", "0.5001631", "0.49985123", "0.49933684", "0.49933684", "0.49794394", "0.49687976", "0.49596626", "0.49584103", "0.4952415", "0.49445912", "0.49426326", "0.49313575", "0.49310374", "0.4930895", "0.4926874", "0.4913236", "0.4911372", "0.49057844", "0.4898137", "0.48961377", "0.4895635", "0.4894092", "0.4887443", "0.48841062", "0.48810512", "0.48777896", "0.48724568", "0.48691025", "0.48689926", "0.48644483", "0.48622373", "0.4854108", "0.48519886", "0.48489806", "0.4848228", "0.48408625", "0.4836665", "0.48311743", "0.48311743", "0.48293722" ]
0.6654227
0
Sets the reference1 value for this BuyRequestType.
public void setReference1(java.lang.String reference1) { this.reference1 = reference1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setReference1(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(REFERENCE1_PROP.get(), value);\n }", "public void setReference1(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(REFERENCE1_PROP.get(), value);\n }", "public PaymentRequest setReference(String reference) {\r\n this.reference = reference;\r\n return this;\r\n }", "public java.lang.String getReference1() {\n return reference1;\n }", "public void setFreeuse1(String freeuse1) {\n\t\tthis.freeuse1 = freeuse1 == null ? null : freeuse1.trim();\n\t}", "private String getRef1Val(String refVal1) {\n logger.info(\"Ref 2 from profile Options is null\");\n String refTag = \"\";\n if (refVal1.equalsIgnoreCase(\"PURCHASE ORDER NUMBER\")) {\n refTag = \n \"<PONumber>\" + reference1 + \"</PONumber>\" + \"<CustomerReference>\" + \n reference2 + \"</CustomerReference>\";\n } else if (refVal1.equalsIgnoreCase(\"SALES ORDER NUMBER\")) {\n refTag = \n \"<CustomerReference>\" + \"Ref# \" + reference2 + \" SO# \" + reference1 + \n \"</CustomerReference>\";\n } else {\n refTag = \n \"<CustomerReference>\" + \"Ref# \" + reference2 + \" Del# \" + reference1 + \n \"</CustomerReference>\";\n }\n return refTag;\n }", "public void setFreeuse1(String freeuse1) {\n this.freeuse1 = freeuse1 == null ? null : freeuse1.trim();\n }", "@ApiModelProperty(value = \"If the transaction is a money transfer, pre-paid load, or credit card bill pay, and if the sender intends to fund the transaction with a non-financial instrument (for example, cash), a reference number unique to the sender is required.<br><br>If the transaction is a funds disbursement, the field is required.<br><br> This field is required if senderAccountNumber is not sent.\")\n public String getSenderReference() {\n return senderReference;\n }", "public Builder setNum1(int value) {\r\n\t\t\t\tbitField0_ |= 0x00000002;\r\n\t\t\t\tnum1_ = value;\r\n\t\t\t\tonChanged();\r\n\t\t\t\treturn this;\r\n\t\t\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference1() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(REFERENCE1_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference1() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(REFERENCE1_PROP.get());\n }", "public Builder clearNum1() {\r\n\t\t\t\tbitField0_ = (bitField0_ & ~0x00000002);\r\n\t\t\t\tnum1_ = 0;\r\n\t\t\t\tonChanged();\r\n\t\t\t\treturn this;\r\n\t\t\t}", "public void setBonusReference(Float bonusReference) {\n this.bonusReference = bonusReference;\n }", "public void setRefType(String refType) {\n this.refType = refType == null ? null : refType.trim();\n }", "public void setReference(String reference);", "public String getFreeuse1() {\n\t\treturn freeuse1;\n\t}", "public Builder setProperty1(int value) {\n bitField0_ |= 0x00000008;\n property1_ = value;\n \n return this;\n }", "public void setSpare1(String spare1) {\r\n this.spare1 = spare1;\r\n }", "public void purchase(Book book1, Client client1) {\n\t\tclient1.getBuyBookList().add(book1);\n\t\t//book1.getBuyBookClient().add(client1);\n\t}", "public String getFreeuse1() {\n return freeuse1;\n }", "public void setForgottenPasswordAnswer1(String forgottenPasswordAnswer1) {\n\t\tthis.forgottenPasswordAnswer1 = forgottenPasswordAnswer1;\n\t}", "public void setAddr1(String addr1) {\r\n this.addr1 = addr1;\r\n }", "@Override\n\tpublic void setStreet1(java.lang.String street1) {\n\t\t_candidate.setStreet1(street1);\n\t}", "public Builder clearProperty1() {\n bitField0_ = (bitField0_ & ~0x00000008);\n property1_ = 0;\n \n return this;\n }", "public void setTaxNumber1(\n @Nullable\n final String taxNumber1) {\n rememberChangedField(\"TaxNumber1\", this.taxNumber1);\n this.taxNumber1 = taxNumber1;\n }", "public Builder clearField1() {\n bitField0_ = (bitField0_ & ~0x00000002);\n field1_ = 0L;\n onChanged();\n return this;\n }", "public Builder setData1(int value) {\n bitField0_ |= 0x00000002;\n data1_ = value;\n \n return this;\n }", "public Builder setData1(int value) {\n bitField0_ |= 0x00000002;\n data1_ = value;\n \n return this;\n }", "@JsonSetter(\"reference\")\r\n public void setReference (String value) { \r\n this.reference = value;\r\n }", "public void setReference(Reference ref)\n {\n this.ref = ref;\n }", "public HmsPickerBuilder setReference(int reference) {\n this.mReference = reference;\n return this;\n }", "public Binding setReference(IDatatype theValue) {\n\t\tmyReference = theValue;\n\t\treturn this;\n\t}", "public void setForgottenPasswordQuestion1(String forgottenPasswordQuestion1) {\n\t\tthis.forgottenPasswordQuestion1 = forgottenPasswordQuestion1;\n\t}", "@ApiModelProperty(value = \"The order used to purchase this gift certificate. This value is ONLY set during checkout when a certificate is purchased, not when it is used. Any usage is recorded in the ledger\")\n public String getReferenceOrderId() {\n return referenceOrderId;\n }", "public void setReference(javax.xml.namespace.QName reference)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFERENCE$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(REFERENCE$0);\n }\n target.setQNameValue(reference);\n }\n }", "public ConfirmOrderReferenceRequest(String amazonOrderReferenceId) {\n this.amazonOrderReferenceId = amazonOrderReferenceId;\n }", "public Builder clearS1() {\n bitField0_ = (bitField0_ & ~0x00000001);\n s1_ = getDefaultInstance().getS1();\n onChanged();\n return this;\n }", "public void xsetReference(org.apache.xmlbeans.XmlQName reference)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlQName target = null;\n target = (org.apache.xmlbeans.XmlQName)get_store().find_element_user(REFERENCE$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlQName)get_store().add_element_user(REFERENCE$0);\n }\n target.set(reference);\n }\n }", "public void setP1Card1(Card p1Card1){\n\t\tthis.p1Card1 = p1Card1;\n\t\trepaint();\n\t}", "public Builder setField1(long value) {\n bitField0_ |= 0x00000002;\n field1_ = value;\n onChanged();\n return this;\n }", "public void setReference2(java.lang.String reference2) {\n this.reference2 = reference2;\n }", "public void setB1(int b1)\n {\n this.b1 = b1;\n }", "@NonNull\n static <T1> Consumer1<T1> of(@NonNull Consumer1<T1> reference) {\n Objects.requireNonNull(reference, \"reference\");\n return reference;\n }", "@Override\n public String toString() {\n return \"ConfirmOrderReferenceRequest{\"\n + \"amazonOrderReferenceId=\" + amazonOrderReferenceId\n + \", authorizationAmount=\" + authorizationAmount\n + \", authorizationCurrencyCode=\" + authorizationCurrencyCode\n + \", successUrl=\" + successUrl\n + \", failureUrl=\" + failureUrl\n + \", mwsAuthToken=\" + getMwsAuthToken() \n + \", expectImmediateAuthorize=\" + isExpectImmediateAuthorization() +'}';\n }", "public void setC1(Boolean c1) {\n\t\tthis.c1 = c1;\n\t}", "public void setReference(String reference) {\n this.reference = reference;\n }", "public void setReference(String reference) {\n this.reference = reference;\n }", "public Builder setS1Bytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n s1_ = value;\n onChanged();\n return this;\n }", "public void setAddress1(String address1) {\n\t\tthis.address1 = address1;\n\t}", "public void setH_set1(java.math.BigDecimal newH_set1)\n\t\tthrows java.rmi.RemoteException;", "public void setREF_NO(BigDecimal REF_NO) {\r\n this.REF_NO = REF_NO;\r\n }", "void setReference(String reference);", "@Override\r\n\tpublic String getRefBillType() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getRefBillType() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void setField1(java.lang.String field1) {\n\t\t_second.setField1(field1);\n\t}", "public SetOnceRef(Object ref) {\n this(ref, false, true);\n }", "public void setOb1(CPointer<BlenderObject> ob1) throws IOException\n\t{\n\t\tlong __address = ((ob1 == null) ? 0 : ob1.getAddress());\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeLong(__io__address + 0, __address);\n\t\t} else {\n\t\t\t__io__block.writeLong(__io__address + 0, __address);\n\t\t}\n\t}", "public ResourcesOrPoints getGive1() {\n\t\treturn give1;\n\t}", "@ApiModelProperty(required = true, value = \"The reference for the transaction that will be provided by the originating institution. Empty string if no data provided\")\n @NotNull\n\n public String getPayeeReference() {\n return payeeReference;\n }", "public void setJP_BankData_ReferenceNo (String JP_BankData_ReferenceNo);", "private void setReference(String ref) {\n Set<String> allRefs = getAllReferenceNames();\n if (!allRefs.contains(ref) && allRefs.contains(\"chr\" + ref)) {\n ref = \"chr\" + ref;\n }\n currentReference = ref;\n Genome loadedGenome = GenomeController.getInstance().getGenome();\n setMaxRange(new Range(1, loadedGenome.getLength()));\n setRange(1, Math.min(1000, loadedGenome.getLength()));\n }", "public Builder clearData1() {\n bitField0_ = (bitField0_ & ~0x00000002);\n data1_ = 0;\n \n return this;\n }", "public Builder clearData1() {\n bitField0_ = (bitField0_ & ~0x00000002);\n data1_ = 0;\n \n return this;\n }", "public void setX1(int x1) {\n\t\tthis.x1 = x1;\n\t\tfireListenerSignal();\n\t}", "public void setSMART_OPTION1(BigDecimal SMART_OPTION1) {\r\n this.SMART_OPTION1 = SMART_OPTION1;\r\n }", "public void setSMART_OPTION1(BigDecimal SMART_OPTION1) {\r\n this.SMART_OPTION1 = SMART_OPTION1;\r\n }", "public ResourcesOrPoints getReceive1() {\n\t\treturn receive1;\n\t}", "public void setBakCode1(String bakCode1) {\n this.bakCode1 = bakCode1 == null ? null : bakCode1.trim();\n }", "public void setRefnum(java.lang.String refnum) {\n this.refnum = refnum;\n }", "public void setReference(java.lang.String reference) {\n this.reference = reference;\n }", "public void setReserved1(boolean value)\n {\n field_1_options = reserved1.setShortBoolean(field_1_options, value);\n }", "@Override\n\tpublic void setField1(java.lang.String field1) {\n\t\t_employee.setField1(field1);\n\t}", "public com.google.protobuf.ByteString\n getS1Bytes() {\n java.lang.Object ref = s1_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n s1_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public SaleRequest toSaleRequest(String reference) {\n return new SaleRequest().amountInCents(amountInCents)\n .currencyIsoCode(currencyIsoCode)\n .token(token)\n .reference(reference);\n }", "public void setWishPosTypeid1(Integer wishPosTypeid1) {\n this.wishPosTypeid1 = wishPosTypeid1;\n }", "private String getRef2Val(String refVal2) {\n logger.info(\"Ref 1 from profile Options is null\");\n String refTag = \"\";\n if (refVal2.equalsIgnoreCase(\"PURCHASE ORDER NUMBER\")) {\n refTag = \n \"<PONumber>\" + reference2 + \"</PONumber>\" + \"<CustomerReference>\" + \n reference1 + \"</CustomerReference>\";\n } else if (refVal2.equalsIgnoreCase(\"SALES ORDER NUMBER\")) {\n refTag = \n \"<CustomerReference>\" + \"Ref# \" + reference1 + \" SO# \" + reference2 + \n \"</CustomerReference>\";\n } else {\n refTag = \n \"<CustomerReference>\" + \"Ref# \" + reference1 + \" Del# \" + reference2 + \n \"</CustomerReference>\";\n }\n return refTag;\n }", "private void setRefuse(boolean value) {\n \n refuse_ = value;\n }", "public void setPaymentRefNo(java.lang.String paymentRefNo)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PAYMENTREFNO$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PAYMENTREFNO$0);\n }\n target.setStringValue(paymentRefNo);\n }\n }", "@MavlinkFieldInfo(\n position = 2,\n unitSize = 2,\n description = \"RC channel 1 value\"\n )\n public final Builder chan1Raw(int chan1Raw) {\n this.chan1Raw = chan1Raw;\n return this;\n }", "public void setObj1 (String value) {\r\n Obj1 = value;\r\n }", "public boolean isSetNum1() {\n\t\t\treturn this.num1 != null;\n\t\t}", "void setRef(java.lang.String ref);", "public void setReferenceNumber(java.lang.String referenceNumber) {\r\n this.referenceNumber = referenceNumber;\r\n }", "public final void setD1windk(com.mendix.systemwideinterfaces.core.IContext context, java.math.BigDecimal d1windk)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.D1windk.toString(), d1windk);\n\t}", "public ReferenceType(Name name) {\n super(name.line, name.byteOffset);\n this.name = name;\n }", "public com.google.protobuf.ByteString\n getS1Bytes() {\n java.lang.Object ref = s1_;\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 s1_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public static void setReferenceCurrency(Currency currency) {\n REFERENCE.set(currency);\n TO_REFERENCE.clear();\n TO_REFERENCE.put(currency.getCode(), 1.0);\n }", "public void setReserve1(java.lang.String reserve1) {\n this.reserve1 = reserve1;\n }", "public void setCurrency1(BigDecimal newCurrency1) {\n\tcurrency1 = newCurrency1;\n}", "public void setOPTION1_SMART_DEFAULT(BigDecimal OPTION1_SMART_DEFAULT) {\r\n this.OPTION1_SMART_DEFAULT = OPTION1_SMART_DEFAULT;\r\n }", "public void setOPTION1_SMART_DEFAULT(BigDecimal OPTION1_SMART_DEFAULT) {\r\n this.OPTION1_SMART_DEFAULT = OPTION1_SMART_DEFAULT;\r\n }", "public SetOnceRef() {\n this(null, false, false);\n }", "public String getMerchantReference() {\n return this.merchantReference;\n }", "public void setOnt1(OntEntry ont)\r\n\t{\r\n\t\tif (ont1 != null)\r\n\t\t{\r\n\t\t\tont1.decRefs();\r\n\t\t}\r\n\t\tont1 = ont;\r\n\t\tont.incRefs();\r\n\t}", "public void setZEXT_NUM1(java.lang.String value)\n {\n if ((__ZEXT_NUM1 == null) != (value == null) || (value != null && ! value.equals(__ZEXT_NUM1)))\n {\n _isDirty = true;\n }\n __ZEXT_NUM1 = value;\n }", "public Builder setS1(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n s1_ = value;\n onChanged();\n return this;\n }", "public synchronized void set_sendbyte(byte b0, byte b1) {\n sendbyte0 = b0;sendbyte1 = b1;\n }", "public void setAnswer1(String answer1) {\r\n this.answer1 = answer1;\r\n }", "public void setValue1(final java.lang.String value1) {\n this.value1 = value1;\n }", "public void setReferral( boolean referral )\n {\n this.referral = referral;\n }" ]
[ "0.6233002", "0.6184544", "0.58827484", "0.56610036", "0.55275244", "0.5514409", "0.5393195", "0.531749", "0.52726513", "0.5246526", "0.5223571", "0.51098007", "0.5083537", "0.50498044", "0.5037572", "0.50311357", "0.5029166", "0.5002791", "0.49951395", "0.4979661", "0.49579763", "0.4935606", "0.49209", "0.49193653", "0.48963743", "0.48824105", "0.48782885", "0.48782885", "0.48616105", "0.4853819", "0.48375794", "0.48359028", "0.48346487", "0.48321924", "0.48267347", "0.48264855", "0.48205575", "0.47988448", "0.4797914", "0.47905856", "0.4789208", "0.47812644", "0.47802544", "0.47793543", "0.4767343", "0.47561854", "0.47561854", "0.4750309", "0.47433424", "0.4737428", "0.472871", "0.47195387", "0.47178957", "0.47178957", "0.4717706", "0.4712401", "0.46996406", "0.469086", "0.46850243", "0.4672464", "0.46668375", "0.4661733", "0.4661733", "0.464832", "0.464063", "0.464063", "0.463435", "0.46342984", "0.46240655", "0.46193945", "0.46174148", "0.46041316", "0.45926318", "0.45911977", "0.4569518", "0.45692986", "0.45654318", "0.4564621", "0.45595768", "0.4552372", "0.45287284", "0.4518487", "0.4510731", "0.4510199", "0.45048112", "0.45006824", "0.44998908", "0.44985577", "0.44964388", "0.44846562", "0.44846562", "0.44721723", "0.44689053", "0.44635502", "0.44630846", "0.44534713", "0.44524276", "0.44487852", "0.4445906", "0.44420925" ]
0.67614377
0
Gets the reference2 value for this BuyRequestType.
public java.lang.String getReference2() { return reference2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference2() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(REFERENCE2_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference2() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(REFERENCE2_PROP.get());\n }", "public ResourcesOrPoints getReceive2() {\n\t\treturn receive2;\n\t}", "private String getRef2Val(String refVal2) {\n logger.info(\"Ref 1 from profile Options is null\");\n String refTag = \"\";\n if (refVal2.equalsIgnoreCase(\"PURCHASE ORDER NUMBER\")) {\n refTag = \n \"<PONumber>\" + reference2 + \"</PONumber>\" + \"<CustomerReference>\" + \n reference1 + \"</CustomerReference>\";\n } else if (refVal2.equalsIgnoreCase(\"SALES ORDER NUMBER\")) {\n refTag = \n \"<CustomerReference>\" + \"Ref# \" + reference1 + \" SO# \" + reference2 + \n \"</CustomerReference>\";\n } else {\n refTag = \n \"<CustomerReference>\" + \"Ref# \" + reference1 + \" Del# \" + reference2 + \n \"</CustomerReference>\";\n }\n return refTag;\n }", "public java.lang.String getReference1() {\n return reference1;\n }", "public String getFreeuse2() {\n return freeuse2;\n }", "public String getFreeuse2() {\n\t\treturn freeuse2;\n\t}", "public ResourcesOrPoints getGive2() {\n\t\treturn give2;\n\t}", "public void setReference2(java.lang.String reference2) {\n this.reference2 = reference2;\n }", "public String getRefType() {\n return refType;\n }", "public ResourcesOrPoints getReceive1() {\n\t\treturn receive1;\n\t}", "public java.lang.String getReceiverAddressEnvelopeLevel2() {\n return receiverAddressEnvelopeLevel2;\n }", "public Integer getWishPosTypeid2() {\n return wishPosTypeid2;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference1() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(REFERENCE1_PROP.get());\n }", "public java.lang.String getReceiverAddressEnvelopeLevel2() {\n return receiverAddressEnvelopeLevel2;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference1() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(REFERENCE1_PROP.get());\n }", "private String getRef1Val(String refVal1) {\n logger.info(\"Ref 2 from profile Options is null\");\n String refTag = \"\";\n if (refVal1.equalsIgnoreCase(\"PURCHASE ORDER NUMBER\")) {\n refTag = \n \"<PONumber>\" + reference1 + \"</PONumber>\" + \"<CustomerReference>\" + \n reference2 + \"</CustomerReference>\";\n } else if (refVal1.equalsIgnoreCase(\"SALES ORDER NUMBER\")) {\n refTag = \n \"<CustomerReference>\" + \"Ref# \" + reference2 + \" SO# \" + reference1 + \n \"</CustomerReference>\";\n } else {\n refTag = \n \"<CustomerReference>\" + \"Ref# \" + reference2 + \" Del# \" + reference1 + \n \"</CustomerReference>\";\n }\n return refTag;\n }", "public java.lang.String getReference02() {\n return reference02;\n }", "public java.lang.String getS2() {\n java.lang.Object ref = s2_;\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 s2_ = s;\n }\n return s;\n }\n }", "public java.lang.String getS2() {\n java.lang.Object ref = s2_;\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 s2_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public byte getP2() {\n return this.apdu_buffer[P2];\n }", "public String getBakCode2() {\n return bakCode2;\n }", "public Type getType2() {\n\t\treturn this.data.getType2();\n\t}", "public com.google.protobuf.ProtocolStringList\n getRate2List() {\n return rate2_;\n }", "public float getField2() {\n return field2_;\n }", "public float getField2() {\n return field2_;\n }", "public PToP.S2InfoReq getS2InfoReq() {\n return instance.getS2InfoReq();\n }", "public String getReserve2() {\n return reserve2;\n }", "public java.lang.String getC2()\n {\n return this.c2;\n }", "public String getSpare2() {\r\n return spare2;\r\n }", "public String getAddress2() {\n\t\treturn address2;\n\t}", "public java.lang.String getField1102() {\n java.lang.Object ref = field1102_;\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 field1102_ = s;\n return s;\n }\n }", "public String getRef(){\r\n\t\treturn this.getAttribute(\"ref\").getValue();\r\n\t}", "public java.lang.String getSenderAddressEnvelopeLevel2() {\n return senderAddressEnvelopeLevel2;\n }", "public java.lang.Short getReplacementType2() {\r\n return replacementType2;\r\n }", "public XtraRewardsTxnVOImpl getXtraRewardsTxnVO2() {\n return (XtraRewardsTxnVOImpl) findViewObject(\"XtraRewardsTxnVO2\");\n }", "public Number getWork2()\r\n {\r\n return (m_work2);\r\n }", "public String getFreeuse1() {\n return freeuse1;\n }", "public java.lang.String getReceiverAddress2() {\r\n return receiverAddress2;\r\n }", "public String getAddr2() {\r\n return addr2;\r\n }", "final public Vector2 getRef2DAttr() {\r\n\t\t\tif(mName.length() == 0)\r\n\t\t\t\treturn null;\r\n\t\t\tif(mSaveAttr == null)\r\n\t\t\t\treturn getAttr(mName).Vector;\r\n\t\t\treturn mSaveAttr.Vector;\r\n\t\t}", "public java.lang.String getField1102() {\n java.lang.Object ref = field1102_;\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 field1102_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getReserve2() {\n return reserve2;\n }", "public java.lang.String getSenderAddressEnvelopeLevel2() {\n return senderAddressEnvelopeLevel2;\n }", "public byte getP2() {\n\treturn (byte) (header[3] & 0xFF);\n }", "public com.google.protobuf.ProtocolStringList\n getRate2List() {\n return rate2_.getUnmodifiableView();\n }", "public String getBENEF_ADDRESS_2() {\r\n return BENEF_ADDRESS_2;\r\n }", "public String getReference(){\r\n\t\t\r\n\t\treturn McsElement.getElementByXpath(driver,REFERENCE_INPUT).getAttribute(\"value\");\r\n\t}", "public String getRpfBak2() {\r\n return rpfBak2;\r\n }", "public float get2VarB1() {\n\t\tvalidate2Coefficients();\n\t\treturn b1;\n\t}", "@Override\r\n\tpublic String getRefBillType() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getRefBillType() {\n\t\treturn null;\r\n\t}", "@ApiModelProperty(required = true, value = \"The reference for the transaction that will be provided by the originating institution. Empty string if no data provided\")\n @NotNull\n\n public String getPayeeReference() {\n return payeeReference;\n }", "public Currency getCurrency2() {\n return _underlyingForex.getCurrency2();\n }", "private String getReferenceValue(String refVal1, String refVal2) {\n logger.info(\"Entered getReferenceValue() method\");\n String refTag = \"\";\n\n\n if ((refVal1.equalsIgnoreCase(\"\")) && (refVal2.equalsIgnoreCase(\"\"))) {\n refTag = \n \"<CustomerReference>\" + \"Ref1# \" + reference1 + \" Ref2# \" + \n reference2 + \"</CustomerReference>\";\n } else if (refVal1.equalsIgnoreCase(\"\")) {\n refTag = getRef2Val(refVal2);\n } else if (refVal2.equalsIgnoreCase(\"\")) {\n refTag = getRef1Val(refVal1);\n } else {\n \n if (refVal1.equalsIgnoreCase(\"PURCHASE ORDER NUMBER\")) {\n refTag = \n \"<PONumber>\" + reference1 + \"</PONumber>\" + \"<CustomerReference>\" + \n reference2 + \"</CustomerReference>\";\n } else if (refVal2.equalsIgnoreCase(\"PURCHASE ORDER NUMBER\")) {\n refTag = \n \"<PONumber>\" + reference2 + \"</PONumber>\" + \"<CustomerReference>\" + \n reference1 + \"</CustomerReference>\";\n } else if ((refVal1.equalsIgnoreCase(\"SALES ORDER NUMBER\")) && \n (refVal2.equalsIgnoreCase(\"DELIVERY NAME\"))) {\n refTag = \n \"<CustomerReference>\" + \"SO# \" + reference1 + \" Del# \" + \n reference2 + \"</CustomerReference>\";\n } else {\n refTag = \n \"<CustomerReference>\" + \"Del# \" + reference1 + \" SO# \" + \n reference2 + \"</CustomerReference>\";\n }\n }\n return refTag;\n\n }", "public com.google.protobuf.ByteString\n getS2Bytes() {\n java.lang.Object ref = s2_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n s2_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public BigDecimal getSupBynum2() {\n return supBynum2;\n }", "public Float getT1B11Co2() {\r\n return t1B11Co2;\r\n }", "public String getAddress2() {\r\n return address2;\r\n }", "public PToP.AS2Req getAS2Req() {\n return instance.getAS2Req();\n }", "@Override\n\tpublic java.lang.String getStreet2() {\n\t\treturn _candidate.getStreet2();\n\t}", "@ApiModelProperty(value = \"The order used to purchase this gift certificate. This value is ONLY set during checkout when a certificate is purchased, not when it is used. Any usage is recorded in the ledger\")\n public String getReferenceOrderId() {\n return referenceOrderId;\n }", "public String getExtra2() {\n return extra2;\n }", "public String getFreeuse1() {\n\t\treturn freeuse1;\n\t}", "public java.lang.String getField1012() {\n java.lang.Object ref = field1012_;\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 field1012_ = s;\n return s;\n }\n }", "public RXC getRXC2() { \r\n return getTyped(\"RXC2\", RXC.class);\r\n }", "public BigDecimal getREF_NO() {\r\n return REF_NO;\r\n }", "public org.astrogrid.stc.coords.v1_10.beans.Size2Type getResolution2()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.astrogrid.stc.coords.v1_10.beans.Size2Type target = null;\n target = (org.astrogrid.stc.coords.v1_10.beans.Size2Type)get_store().find_element_user(RESOLUTION2$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public String getReference() {\n return reference;\n }", "public com.google.protobuf.ByteString\n getS2Bytes() {\n java.lang.Object ref = s2_;\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 s2_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public int getBx2() {\r\n return Bx2;\r\n }", "public java.lang.String getRoadwayRef()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ROADWAYREF$16);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public String getForgottenPasswordAnswer2() {\n\t\treturn forgottenPasswordAnswer2;\n\t}", "public java.lang.String getReference() {\n return reference;\n }", "public Float getBonusReference() {\n return bonusReference;\n }", "public Boolean getC2() {\n\t\treturn c2;\n\t}", "@Schema(example = \"inv_1815_ref_1\", description = \"ID for the reference of the API consumer.\")\n public String getReferenceId() {\n return referenceId;\n }", "public String getRef() {\n return ref;\n }", "public Body getBody2() {\r\n\t\treturn body2;\r\n\t}", "public BigDecimal getCurrency2() {\n\treturn currency2;\n}", "public java.lang.String getField1012() {\n java.lang.Object ref = field1012_;\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 field1012_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getValue2() {\n return this.value2;\n }", "public String getAttr2() {\n return attr2;\n }", "public String getAttr2() {\n return attr2;\n }", "public final String getReference() {\n return reference;\n }", "public String getREFERENCE() {\r\n return REFERENCE;\r\n }", "public PToP.AS2Req getAS2Req() {\n if (reqCase_ == 16) {\n return (PToP.AS2Req) req_;\n }\n return PToP.AS2Req.getDefaultInstance();\n }", "public PToP.S2InfoReq getS2InfoReq() {\n if (reqCase_ == 17) {\n return (PToP.S2InfoReq) req_;\n }\n return PToP.S2InfoReq.getDefaultInstance();\n }", "public T2 _2() {\n return _2;\n }", "public T getRefer() {\n return refer;\n }", "public String getSrcAddress2() {\r\n return (String) getAttributeInternal(SRCADDRESS2);\r\n }", "public Object getV2(){\n \treturn v2;\n }", "public java.lang.String getPaymentRefNo()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PAYMENTREFNO$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public Channel getChannelAssigned2() {\n return channelAssigned2;\n }", "public void setReference2(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(REFERENCE2_PROP.get(), value);\n }", "public int getProperty2() {\n return property2_;\n }", "public String getObj2 () {\r\n return Obj2; \r\n }" ]
[ "0.6530638", "0.65139234", "0.61904615", "0.6060776", "0.599596", "0.5990353", "0.5972128", "0.5868493", "0.56621647", "0.5658772", "0.55864954", "0.5564737", "0.55425084", "0.5535569", "0.5518709", "0.55149835", "0.5509158", "0.5504502", "0.53848803", "0.53396046", "0.53345436", "0.5328294", "0.53269535", "0.53174937", "0.531712", "0.5307638", "0.52941006", "0.529312", "0.5288865", "0.52716106", "0.52714515", "0.5265486", "0.5263463", "0.5258239", "0.52557546", "0.52342606", "0.52338624", "0.522598", "0.5221548", "0.5219439", "0.5216608", "0.52050275", "0.5204806", "0.5203678", "0.5201466", "0.5188475", "0.5187202", "0.5176551", "0.51721835", "0.51707214", "0.51567614", "0.51567614", "0.51429915", "0.51413745", "0.51396036", "0.51383156", "0.5124291", "0.5120615", "0.51123345", "0.51122206", "0.51112574", "0.51030594", "0.5097886", "0.5095485", "0.5093655", "0.50907314", "0.5084164", "0.5083501", "0.5082676", "0.5082314", "0.50761956", "0.5070296", "0.5066701", "0.5066701", "0.5066701", "0.5064407", "0.50605005", "0.50448817", "0.5039229", "0.5038047", "0.502694", "0.5022353", "0.50093013", "0.5008483", "0.5005909", "0.49995697", "0.49995697", "0.49879742", "0.49867648", "0.49845052", "0.49790126", "0.4964305", "0.49622846", "0.4956907", "0.4956849", "0.49505866", "0.4949439", "0.49464634", "0.49453086", "0.49433523" ]
0.6874003
0
Sets the reference2 value for this BuyRequestType.
public void setReference2(java.lang.String reference2) { this.reference2 = reference2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setReference2(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(REFERENCE2_PROP.get(), value);\n }", "public void setReference2(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(REFERENCE2_PROP.get(), value);\n }", "private String getRef2Val(String refVal2) {\n logger.info(\"Ref 1 from profile Options is null\");\n String refTag = \"\";\n if (refVal2.equalsIgnoreCase(\"PURCHASE ORDER NUMBER\")) {\n refTag = \n \"<PONumber>\" + reference2 + \"</PONumber>\" + \"<CustomerReference>\" + \n reference1 + \"</CustomerReference>\";\n } else if (refVal2.equalsIgnoreCase(\"SALES ORDER NUMBER\")) {\n refTag = \n \"<CustomerReference>\" + \"Ref# \" + reference1 + \" SO# \" + reference2 + \n \"</CustomerReference>\";\n } else {\n refTag = \n \"<CustomerReference>\" + \"Ref# \" + reference1 + \" Del# \" + reference2 + \n \"</CustomerReference>\";\n }\n return refTag;\n }", "public java.lang.String getReference2() {\n return reference2;\n }", "public void setFreeuse2(String freeuse2) {\n\t\tthis.freeuse2 = freeuse2 == null ? null : freeuse2.trim();\n\t}", "public void setFreeuse2(String freeuse2) {\n this.freeuse2 = freeuse2 == null ? null : freeuse2.trim();\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference2() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(REFERENCE2_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference2() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(REFERENCE2_PROP.get());\n }", "public void setOb2(CPointer<BlenderObject> ob2) throws IOException\n\t{\n\t\tlong __address = ((ob2 == null) ? 0 : ob2.getAddress());\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeLong(__io__address + 8, __address);\n\t\t} else {\n\t\t\t__io__block.writeLong(__io__address + 4, __address);\n\t\t}\n\t}", "public void setReference1(java.lang.String reference1) {\n this.reference1 = reference1;\n }", "public void setAddr2(String addr2) {\r\n this.addr2 = addr2;\r\n }", "public void setReference02(java.lang.String reference02) {\n this.reference02 = reference02;\n }", "public void setB2(int b2)\n {\n this.b2 = b2;\n }", "@Override\n\tpublic void setField2(boolean field2) {\n\t\t_second.setField2(field2);\n\t}", "public void setTaxNumber2(\n @Nullable\n final String taxNumber2) {\n rememberChangedField(\"TaxNumber2\", this.taxNumber2);\n this.taxNumber2 = taxNumber2;\n }", "public void setSpare2(String spare2) {\r\n this.spare2 = spare2;\r\n }", "@Override\n\tpublic void setStreet2(java.lang.String street2) {\n\t\t_candidate.setStreet2(street2);\n\t}", "public Builder setNum2(int value) {\r\n\t\t\t\tbitField0_ |= 0x00000004;\r\n\t\t\t\tnum2_ = value;\r\n\t\t\t\tonChanged();\r\n\t\t\t\treturn this;\r\n\t\t\t}", "public String getFreeuse2() {\n return freeuse2;\n }", "private String getRef1Val(String refVal1) {\n logger.info(\"Ref 2 from profile Options is null\");\n String refTag = \"\";\n if (refVal1.equalsIgnoreCase(\"PURCHASE ORDER NUMBER\")) {\n refTag = \n \"<PONumber>\" + reference1 + \"</PONumber>\" + \"<CustomerReference>\" + \n reference2 + \"</CustomerReference>\";\n } else if (refVal1.equalsIgnoreCase(\"SALES ORDER NUMBER\")) {\n refTag = \n \"<CustomerReference>\" + \"Ref# \" + reference2 + \" SO# \" + reference1 + \n \"</CustomerReference>\";\n } else {\n refTag = \n \"<CustomerReference>\" + \"Ref# \" + reference2 + \" Del# \" + reference1 + \n \"</CustomerReference>\";\n }\n return refTag;\n }", "public void setResolution2(org.astrogrid.stc.coords.v1_10.beans.Size2Type resolution2)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.astrogrid.stc.coords.v1_10.beans.Size2Type target = null;\n target = (org.astrogrid.stc.coords.v1_10.beans.Size2Type)get_store().find_element_user(RESOLUTION2$0, 0);\n if (target == null)\n {\n target = (org.astrogrid.stc.coords.v1_10.beans.Size2Type)get_store().add_element_user(RESOLUTION2$0);\n }\n target.set(resolution2);\n }\n }", "public void setP2Card2(Card p2Card2){\n\t\tthis.p2Card2 = p2Card2;\n\t\trepaint();\n\t}", "public String getFreeuse2() {\n\t\treturn freeuse2;\n\t}", "void setPos2(Vector2 pos2) {\n\t\tthis.pos2 = pos2;\n\t}", "public Builder setProperty2(int value) {\n bitField0_ |= 0x00000010;\n property2_ = value;\n \n return this;\n }", "public void setForgottenPasswordAnswer2(String forgottenPasswordAnswer2) {\n\t\tthis.forgottenPasswordAnswer2 = forgottenPasswordAnswer2;\n\t}", "public ResourcesOrPoints getReceive2() {\n\t\treturn receive2;\n\t}", "public void setC2(java.lang.String c2)\n {\n this.c2 = c2;\n }", "public void setAddress2(String address2) {\n\t\tthis.address2 = address2;\n\t}", "public Builder clearNum2() {\r\n\t\t\t\tbitField0_ = (bitField0_ & ~0x00000004);\r\n\t\t\t\tnum2_ = 0;\r\n\t\t\t\tonChanged();\r\n\t\t\t\treturn this;\r\n\t\t\t}", "public Builder clearS2() {\n bitField0_ = (bitField0_ & ~0x00000002);\n s2_ = getDefaultInstance().getS2();\n onChanged();\n return this;\n }", "public void setForgottenPasswordQuestion2(String forgottenPasswordQuestion2) {\n\t\tthis.forgottenPasswordQuestion2 = forgottenPasswordQuestion2;\n\t}", "public Builder setS2Bytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n s2_ = value;\n onChanged();\n return this;\n }", "public PaymentRequest setReference(String reference) {\r\n this.reference = reference;\r\n return this;\r\n }", "public void setX2(int x2) {\n\t\tthis.x2 = x2;\n\t\tfireListenerSignal();\n\t}", "public void setP2Card1(Card p2Card1){\n\t\tthis.p2Card1 = p2Card1;\n\t\trepaint();\n\t}", "public void setObj2 (String value) {\r\n Obj2 = value;\r\n }", "public void setC2(Boolean c2) {\n\t\tthis.c2 = c2;\n\t}", "public void setReserved2(short value)\n {\n field_1_options = reserved2.setShortValue(field_1_options, value);\n }", "public void setCurrency2(BigDecimal newCurrency2) {\n\tcurrency2 = newCurrency2;\n}", "@Override\n\tpublic void setField2(boolean field2) {\n\t\t_employee.setField2(field2);\n\t}", "public void setValue2(Object value2) { this.value2 = value2; }", "public Builder clearProperty2() {\n bitField0_ = (bitField0_ & ~0x00000010);\n property2_ = 0;\n \n return this;\n }", "public void setSMART_OPTION2(BigDecimal SMART_OPTION2) {\r\n this.SMART_OPTION2 = SMART_OPTION2;\r\n }", "public void setSMART_OPTION2(BigDecimal SMART_OPTION2) {\r\n this.SMART_OPTION2 = SMART_OPTION2;\r\n }", "public void setReserve2(java.lang.String reserve2) {\n this.reserve2 = reserve2;\n }", "public ResourcesOrPoints getGive2() {\n\t\treturn give2;\n\t}", "public void setWork2(Number work2)\r\n {\r\n m_work2 = work2;\r\n }", "protected void setP2(byte p2) {\n\theader[3] = p2;\n }", "public void setReference1(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(REFERENCE1_PROP.get(), value);\n }", "public void setReplacementType2(java.lang.Short replacementType2) {\r\n this.replacementType2 = replacementType2;\r\n }", "public void setExtra2(String extra2) {\n this.extra2 = extra2;\n }", "public Builder clearField2() {\n bitField0_ = (bitField0_ & ~0x00000004);\n field2_ = 0F;\n onChanged();\n return this;\n }", "public void setAddressline2(String addressline2) {\n this.addressline2 = addressline2;\n }", "public void setReference1(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(REFERENCE1_PROP.get(), value);\n }", "public void setWishPosTypeid2(Integer wishPosTypeid2) {\n this.wishPosTypeid2 = wishPosTypeid2;\n }", "public void setOnt2(OntEntry ont)\r\n\t{\r\n\t\tif (ont2 != null)\r\n\t\t{\r\n\t\t\tont2.decRefs();\r\n\t\t}\r\n\t\tont2 = ont;\r\n\t\tont.incRefs();\r\n\t}", "public void setBakCode2(String bakCode2) {\n this.bakCode2 = bakCode2 == null ? null : bakCode2.trim();\n }", "public Builder clearRate2() {\n rate2_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x00000004);\n onChanged();\n return this;\n }", "public Builder addRate2Bytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n ensureRate2IsMutable();\n rate2_.add(value);\n onChanged();\n return this;\n }", "public void setAttr2(String attr2) {\n this.attr2 = attr2;\n }", "public void setAttr2(String attr2) {\n this.attr2 = attr2;\n }", "public void setAddressLine2(String addressLine2) {\n this.addressLine2 = addressLine2;\n }", "public void setBENEF_ADDRESS_2(String BENEF_ADDRESS_2) {\r\n this.BENEF_ADDRESS_2 = BENEF_ADDRESS_2 == null ? null : BENEF_ADDRESS_2.trim();\r\n }", "public void setContactPhone2(String contactPhone2) {\n this.contactPhone2 = contactPhone2;\n }", "public void setExternalField2(String externalField2) {\n\t\tmExternalField2 = StringUtils.left(externalField2, 512);\n\t}", "public java.lang.Short getReplacementType2() {\r\n return replacementType2;\r\n }", "public String getBakCode2() {\n return bakCode2;\n }", "public ConstantProduct setConstProperty2(String constProperty2) {\n this.constProperty2 = constProperty2;\n return this;\n }", "public java.lang.String getReference1() {\n return reference1;\n }", "public void setCurr2(java.lang.String newCurr2) {\n\tcurr2 = newCurr2;\n}", "public com.google.protobuf.ProtocolStringList\n getRate2List() {\n return rate2_;\n }", "private String getReferenceValue(String refVal1, String refVal2) {\n logger.info(\"Entered getReferenceValue() method\");\n String refTag = \"\";\n\n\n if ((refVal1.equalsIgnoreCase(\"\")) && (refVal2.equalsIgnoreCase(\"\"))) {\n refTag = \n \"<CustomerReference>\" + \"Ref1# \" + reference1 + \" Ref2# \" + \n reference2 + \"</CustomerReference>\";\n } else if (refVal1.equalsIgnoreCase(\"\")) {\n refTag = getRef2Val(refVal2);\n } else if (refVal2.equalsIgnoreCase(\"\")) {\n refTag = getRef1Val(refVal1);\n } else {\n \n if (refVal1.equalsIgnoreCase(\"PURCHASE ORDER NUMBER\")) {\n refTag = \n \"<PONumber>\" + reference1 + \"</PONumber>\" + \"<CustomerReference>\" + \n reference2 + \"</CustomerReference>\";\n } else if (refVal2.equalsIgnoreCase(\"PURCHASE ORDER NUMBER\")) {\n refTag = \n \"<PONumber>\" + reference2 + \"</PONumber>\" + \"<CustomerReference>\" + \n reference1 + \"</CustomerReference>\";\n } else if ((refVal1.equalsIgnoreCase(\"SALES ORDER NUMBER\")) && \n (refVal2.equalsIgnoreCase(\"DELIVERY NAME\"))) {\n refTag = \n \"<CustomerReference>\" + \"SO# \" + reference1 + \" Del# \" + \n reference2 + \"</CustomerReference>\";\n } else {\n refTag = \n \"<CustomerReference>\" + \"Del# \" + reference1 + \" SO# \" + \n reference2 + \"</CustomerReference>\";\n }\n }\n return refTag;\n\n }", "public void setX2(Double x2) {\n\t\tthis.x2 = x2;\n\t}", "private void setAS2Req(PToP.AS2Req value) {\n if (value == null) {\n throw new NullPointerException();\n }\n req_ = value;\n reqCase_ = 16;\n }", "@Action(accessLevel = AccessLevel.CASH_DESK)\r\n public void purchaseTwoWayTicket() {\n purchaseOneWayTicket();\r\n\r\n selectedReturnEntry = null;\r\n returnResultsModel = null;\r\n returnDate = null;\r\n travelType = \"TWO_WAY\";\r\n }", "public String getAddress2() {\n\t\treturn address2;\n\t}", "public void setP1Card2(Card p1Card2){\n\t\tthis.p1Card2 = p1Card2;\n\t\trepaint();\n\t}", "KMutableProperty2Impl$_setter$1(KMutableProperty2Impl kMutableProperty2Impl) {\n super(0);\n this.this$0 = kMutableProperty2Impl;\n }", "public void setT1B11Co2(Float t1B11Co2) {\r\n this.t1B11Co2 = t1B11Co2;\r\n }", "public void setValue2(final java.lang.String value2) {\n this.value2 = value2;\n }", "public void setReceiverAddress2(java.lang.String receiverAddress2) {\r\n this.receiverAddress2 = receiverAddress2;\r\n }", "public void setReserve2(String reserve2) {\n this.reserve2 = reserve2 == null ? null : reserve2.trim();\n }", "public void setIndustryCode2(\n @Nullable\n final String industryCode2) {\n rememberChangedField(\"IndustryCode2\", this.industryCode2);\n this.industryCode2 = industryCode2;\n }", "@MavlinkFieldInfo(\n position = 3,\n unitSize = 2,\n description = \"RC channel 2 value\"\n )\n public final Builder chan2Raw(int chan2Raw) {\n this.chan2Raw = chan2Raw;\n return this;\n }", "U2(){\r\n setCurrentWeight(0);\r\n setMaxWeight(29*1000);\r\n setCost(120*1000000);\r\n }", "public void setY2(int y2) {\n\t\tthis.y2 = y2;\n\t\tfireListenerSignal();\n\t}", "public void setRoadwayRef(java.lang.String roadwayRef)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ROADWAYREF$16);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ROADWAYREF$16);\r\n }\r\n target.setStringValue(roadwayRef);\r\n }\r\n }", "public void setFlop2(Card flop2){\n\t\tthis.flop2 = flop2;\n\t\trepaint();\n\t}", "public String getSpare2() {\r\n return spare2;\r\n }", "public void setZweck2(String zweck2) throws RemoteException;", "public String getReserve2() {\n return reserve2;\n }", "public void setCustomID2(String customID2) {\n\t\tCUSTOM_ID2 = customID2;\n\t}", "public Builder setField2(float value) {\n bitField0_ |= 0x00000004;\n field2_ = value;\n onChanged();\n return this;\n }", "public String getAddress2() {\r\n return address2;\r\n }", "public void setAddress2(String address2);", "public Builder setS2(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n s2_ = value;\n onChanged();\n return this;\n }", "public void setReference(javax.xml.namespace.QName reference)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFERENCE$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(REFERENCE$0);\n }\n target.setQNameValue(reference);\n }\n }", "public void setRsv2(String rsv2) {\r\n this.rsv2 = rsv2;\r\n }", "public String getBENEF_ADDRESS_2() {\r\n return BENEF_ADDRESS_2;\r\n }" ]
[ "0.6386687", "0.6351027", "0.5978055", "0.58793443", "0.58792377", "0.578264", "0.5607895", "0.5585606", "0.54785883", "0.54274887", "0.5386256", "0.53706825", "0.53620946", "0.53329414", "0.5327392", "0.5316195", "0.53078794", "0.53041065", "0.5302646", "0.5268301", "0.5266638", "0.5250596", "0.52305514", "0.5203134", "0.5200927", "0.51639646", "0.513562", "0.51323867", "0.5111261", "0.5091716", "0.5080086", "0.5074449", "0.5067215", "0.5064068", "0.50564545", "0.50437355", "0.50351876", "0.50339794", "0.5033761", "0.5032307", "0.5030592", "0.5027442", "0.50231355", "0.5013851", "0.5013851", "0.50020623", "0.500029", "0.4994924", "0.49781534", "0.4976604", "0.49728963", "0.4966667", "0.49655774", "0.49644879", "0.49633318", "0.49621698", "0.49484837", "0.49367175", "0.4925264", "0.48935816", "0.4889435", "0.4889435", "0.4885099", "0.48803017", "0.48726097", "0.48720548", "0.48684025", "0.48638755", "0.48491386", "0.4845842", "0.48347995", "0.4831814", "0.48221996", "0.48177028", "0.4803787", "0.480346", "0.4802144", "0.47925338", "0.47902265", "0.4788233", "0.47783038", "0.4772529", "0.4765791", "0.47641876", "0.47617084", "0.4760898", "0.47572067", "0.47542667", "0.4752952", "0.47505763", "0.474747", "0.47431472", "0.47376576", "0.4729687", "0.47236764", "0.4718962", "0.47153154", "0.47136557", "0.47095537", "0.4695329" ]
0.68410563
0
Gets the target value for this BuyRequestType.
public java.lang.String getTarget() { return target; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.commercetools.api.models.common.Reference getTarget() {\n return this.target;\n }", "public String getTarget()\r\n\t{\r\n\t\treturn _target;\r\n\t}", "public String getTarget() {\n return this.target;\n }", "String getTarget() {\r\n return this.target;\r\n }", "public String getTarget() {\n return target;\n }", "public String getTarget() {\n return target;\n }", "public Target getTarget() {\n\n return target;\n }", "public Target getTarget() {\n\t\treturn target;\n\t}", "public Target getTarget() {\n\t\treturn target;\n\t}", "public Target getTarget() {\n\t\treturn target;\n\t}", "public Mob getTarget() {\r\n return target.get();\r\n }", "public Target getTarget() {\n return target;\n }", "@JsonProperty(\"target\")\n public String getTarget() {\n return target;\n }", "public java.lang.String getTargetNumber() {\r\n return targetNumber;\r\n }", "public Object getTarget()\n {\n return __m_Target;\n }", "public String getCostsTarget() {\n return costsTarget;\n }", "public EntityID getTarget() {\n\t\treturn target.getValue();\n\t}", "public String getTargetType() {\n return targetType;\n }", "public String getTargetType() {\n return targetType;\n }", "public String getTargetType() {\n return targetType;\n }", "public String getTargetType() {\n return targetType;\n }", "public String getTargetType() {\n return this.targetType;\n }", "public int getTargetType() {\n return targetType;\n }", "public Player getTarget() {\n return target;\n }", "public Integer getTargetId() {\n\t\treturn targetId;\n\t}", "public String getTarget() {\n return JsoHelper.getAttribute(jsObj, \"target\");\n }", "public final Class<?> getTargetType(){\n return this.targetType;\n }", "public Long getTargetId() {\r\n return targetId;\r\n }", "public long getTargetId() {\n return targetId;\n }", "public String targetId() {\n return this.targetId;\n }", "com.google.protobuf.ByteString getTargetBytes();", "public Integer getCurrentTarget()\n\t{\n\t\treturn _currentTarget;\n\t}", "public Class<T> getTargetType() {\n return this.targetType;\n }", "public RaceCar getTarget() {\n return target;\n }", "public ObjectSequentialNumber getTarget() {\n return target;\n }", "public String getTargetName() {\n return this.targetName;\n }", "public Point getTarget() {\n\t\treturn _target;\n\t}", "public Integer getBuyModel() {\r\n return buyModel;\r\n }", "public String getTargetName() {\n\t\treturn targetName;\n\t}", "public Integer getTargetid() {\n return targetid;\n }", "@NonNull\n public T getRequestedValue() {\n return mRequestedValue;\n }", "public Node getTarget() {\n return target;\n }", "public String getBuyStrategy() {\r\n return buyStrategy;\r\n }", "@objid (\"19651663-f981-4f11-802a-d5d7cbd6f88a\")\n Instance getTarget();", "public Point getTarget()\n\t{\n\t\treturn this.target;\n\t}", "String fetchSubmitTarget() {\n return PageFlowContext.getOperationParameters().getProperty(\"submitTarget\");\n }", "public Object getTargetObject() {\n return targetObject;\n }", "@Override\n\tpublic VType getTarget() {\n\t\t// TODO: Add your code here\n\t\treturn super.to;\n\t}", "public java.lang.String getTargetName() {\n java.lang.Object ref = targetName_;\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 targetName_ = s;\n return s;\n }\n }", "public TestSetDiscrepancyReportResourceTarget getTarget() {\n return this.target;\n }", "public Name getTarget() {\n\t\treturn getSingleName();\n\t}", "@Experimental\n @Returns(\"targetInfo\")\n TargetInfo getTargetInfo();", "public GameEntity getTarget() {\r\n\t\tif(mode == RadarMode.LOCKED) return currentTarget; else return null;\r\n\t}", "public String getTargetCapacityUnitType() {\n return this.targetCapacityUnitType;\n }", "public RuleTargetType getTargetType() {\n\t\treturn targetType;\n\t}", "java.lang.String getTarget();", "java.lang.String getTarget();", "public java.lang.String getTargetName() {\n java.lang.Object ref = targetName_;\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 targetName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public Entity getmTarget() {\n return mTarget;\n }", "public StateID GetTarget()\n {\n return targetID;\n }", "public com.google.protobuf.ByteString\n getTargetNameBytes() {\n java.lang.Object ref = targetName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n targetName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public AstNode getTarget() {\n return target;\n }", "public Integer getBuyNum() {\n return buyNum;\n }", "@Experimental\n @Returns(\"targetInfo\")\n TargetInfo getTargetInfo(@Optional @ParamName(\"targetId\") String targetId);", "public Date getTargetDueDate() {\n\t\treturn targetDueDate;\n\t}", "public abstract String getRequestTarget(final int requestNumber);", "public Node target() {\n return target;\n }", "public com.google.protobuf.ByteString\n getTargetNameBytes() {\n java.lang.Object ref = targetName_;\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 targetName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@NotNull\n Resource getTarget();", "public Integer getBuy_num() {\n return buy_num;\n }", "public Class<T> getTargetClass() {\n\t\treturn targetClass;\n\t}", "String getTarget();", "String getTarget();", "public Entity.ID getTargetID() {\n return targetID;\n }", "public Object getBuyFuelButton() {\n\n\t\treturn buyFuel;\n\t}", "public int getC_DocTypeTarget_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_DocTypeTarget_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public EObject getTarget() {\n\t\treturn adaptee.getTarget();\n\t}", "public Number getBuyerId() {\n return (Number) getAttributeInternal(BUYERID);\n }", "public String getTargetTypeAsString() {\n\t\tString type = null;\n\t\t\n\t\tswitch (targetType) {\n\t\tcase PROCEDURE:\n\t\t\ttype = \"procedure\";\n\t\t\tbreak;\n\t\tcase POLICY:\n\t\t\ttype = \"policy\";\n\t\t\tbreak;\n\t\tcase PROCESS:\n\t\t\ttype = \"process\";\n\t\t\tbreak;\n\t\tcase EXTERNAL:\n\t\t\ttype = \"external\";\n\t\t\tbreak;\n\t\tcase NOT_SET:\n\t\t\ttype = \"procedure\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\ttype = \"procedure\";\n\t\t\tbreak;\n\t\t}\n\t\treturn type;\n\t}", "public com.google.openrtb.OpenRtb.BidRequest getRequest() {\n return request_;\n }", "public TypeLiteral<T> getTargetType(){\n return targetType;\n }", "public Balloon acquireTarget() {\r\n\r\n\t\tBalloon closest = null;\r\n\t\tfloat closestDistance = 1000;\r\n\t\tif (balloons != null) {\r\n\t\t\tfor (Balloon balloons : balloons) {\r\n\t\t\t\tif (isInRange(balloons) && findDistance(balloons) < closestDistance && balloons.getHiddenHealth() > 0) {\r\n\t\t\t\t\tclosestDistance = findDistance(balloons);\r\n\t\t\t\t\tclosest = balloons;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (closest != null) {\r\n\t\t\t\ttargeted = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn closest;\r\n\r\n\t}", "public DvEHRURI getTarget() {\n return target;\n }", "private Target getTarget() {\n Address targetAddress = GenericAddress.parse(mIp);\n CommunityTarget target = new CommunityTarget();\n target.setCommunity(new OctetString(mCommunity));\n target.setAddress(targetAddress);\n target.setRetries(2);\n target.setTimeout(15000);\n target.setVersion(mVersion);\n return target;\n }", "TypeDec getTarget();", "public Number getBuyerId() {\n return (Number)getAttributeInternal(BUYERID);\n }", "State getTarget();", "public com.alcatel_lucent.www.wsp.ns._2008._03._26.ics.phonesetstaticstate.AlcForwardTargetType getTargetType() {\r\n return targetType;\r\n }", "public String getBuy_mode() {\r\n\t\treturn buy_mode;\r\n\t}", "public ch.iec.tc57._2011.schema.message.RequestMessageType getRequestMessage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ch.iec.tc57._2011.schema.message.RequestMessageType target = null;\n target = (ch.iec.tc57._2011.schema.message.RequestMessageType)get_store().find_element_user(REQUESTMESSAGE$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public static String getRequestType(){\n return requestType;\n }", "public Long getTwomerchant() {\n return twomerchant;\n }", "public StorageTargetType targetType() {\n return this.targetType;\n }", "public java.lang.String getTargetPath() {\n java.lang.Object ref = targetPath_;\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 targetPath_ = s;\n return s;\n }\n }", "public String getTargetTaskID() {\n\t\treturn this.targetTaskId;\n\t}", "public int getTargetSummonUid() {\n return targetSummonUid_;\n }", "public com.google.protobuf.ByteString\n getTargetPathBytes() {\n java.lang.Object ref = targetPath_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n targetPath_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "Object getTarget();", "Object getTarget();", "public com.google.protobuf.ByteString\n getTargetPathBytes() {\n java.lang.Object ref = targetPath_;\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 targetPath_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }" ]
[ "0.6326923", "0.6238926", "0.62242043", "0.6197461", "0.6173074", "0.6173074", "0.61405635", "0.61291075", "0.61291075", "0.61291075", "0.6116933", "0.61047465", "0.608058", "0.5907268", "0.589572", "0.5812598", "0.572313", "0.5710805", "0.5710805", "0.5710805", "0.5710805", "0.5683589", "0.5640238", "0.5614024", "0.5594415", "0.55481875", "0.5525694", "0.55195206", "0.5518211", "0.5511332", "0.54965556", "0.54515606", "0.5430026", "0.5423494", "0.5415377", "0.5415", "0.5408158", "0.53892297", "0.5380527", "0.5365402", "0.53390366", "0.5334418", "0.533179", "0.53129256", "0.53066045", "0.52932525", "0.52797097", "0.5279", "0.52754396", "0.52724046", "0.52554744", "0.5252993", "0.5251674", "0.52407813", "0.52281886", "0.52263266", "0.52263266", "0.52229184", "0.520978", "0.5197372", "0.519069", "0.51723045", "0.51587105", "0.5151804", "0.5145081", "0.5144035", "0.51377136", "0.51345885", "0.5129468", "0.51243967", "0.51226705", "0.51168174", "0.51168174", "0.51143646", "0.51023746", "0.5074349", "0.50698876", "0.506868", "0.5064684", "0.5052254", "0.5051838", "0.50507796", "0.5043432", "0.50402063", "0.5035855", "0.50128543", "0.5006716", "0.5004533", "0.50040716", "0.49877936", "0.49876714", "0.49815333", "0.4977782", "0.49774918", "0.49708536", "0.49650764", "0.4959243", "0.49568617", "0.49568617", "0.4948448" ]
0.60279655
13
Sets the target value for this BuyRequestType.
public void setTarget(java.lang.String target) { this.target = target; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTarget(String target) {\n this.target = target;\n }", "public void setTarget(Target target) {\n\t\tthis.target = target;\n\t}", "@JsonProperty(\"target\")\n public void setTarget(String target) {\n this.target = target;\n }", "void setTarget(java.lang.String target);", "public void setTarget(String val)\r\n\t{\r\n\t\t_target = val;\r\n\t}", "public void setTarget(double target)\n {\n setTarget(target, null);\n }", "void setTarget(String target) {\n try {\n int value = Integer.valueOf(target);\n game.setTarget(value);\n } catch (NumberFormatException e) {\n // caused by inputting strings\n } catch (IllegalArgumentException e) {\n // caused by number < 6.\n game.setTarget(10);\n }\n }", "void setTarget(Node target) {\n\t\tthis.target = target;\n\t}", "protected void setTarget(Command target) {\n\t\tproxy.setTarget(target);\n\t}", "public void setTarget(String target) {\n this.target = target == null ? null : target.trim();\n }", "public void setTargetNumber(java.lang.String targetNumber) {\r\n this.targetNumber = targetNumber;\r\n }", "public void setTargetValue(String name, Object def);", "public void setTarget(ObjectSequentialNumber target) {\n this.target = target;\n }", "public void setTarget(String newValue);", "public void setTargetObject(Object targetObject) {\n this.targetObject = targetObject;\n }", "@objid (\"8fb70c43-b102-4a64-9424-c7cc07d58fcf\")\n void setTarget(Instance value);", "public void setTargetCapacityUnitType(String targetCapacityUnitType) {\n this.targetCapacityUnitType = targetCapacityUnitType;\n }", "public void setTargetType(TargetTypes targetType) {\n this.targetType = targetType.getValue();\n }", "public void setTargetType(int targetType) {\n this.targetType = targetType;\n \n Ability ability = battleEvent.getAbility();\n \n switch ( targetType ) {\n case NORMAL_TARGET:\n case AE_CENTER:\n //targetSelfButton.setVisible(ability.can(\"TARGETSELF\"));\n noMoreTargetsButton.setVisible(false);\n noTargetButton.setVisible(false);\n \n break;\n case SKILL_TARGET:\n //targetSelfButton.setVisible(ability.can(\"TARGETSELF\"));\n noMoreTargetsButton.setVisible(false);\n noTargetButton.setVisible(false);\n \n break;\n case AE_TARGET:\n case AE_SELECTIVE_TARGET:\n case AE_NONSELECTIVE_TARGET:\n //targetSelfButton.setVisible(ability.can(\"TARGETSELF\"));\n noMoreTargetsButton.setVisible(true);\n if ( targetSelected == true ) {\n noMoreTargetsButton.setText( \"Remove Target\" );\n } else {\n noMoreTargetsButton.setText( \"No More Targets\" );\n }\n noTargetButton.setVisible(false);\n break;\n case KNOCKBACK_TARGET:\n //targetSelfButton.setVisible(false);\n noMoreTargetsButton.setVisible(false);\n noTargetButton.setVisible(true);\n break;\n case SECONDARY_TARGET:\n //targetSelfButton.setVisible(ability.can(\"TARGETSELF\"));\n \n if ( targetSelected == true ) {\n noMoreTargetsButton.setText( \"Remove Target\" );\n noMoreTargetsButton.setVisible(true);\n noTargetButton.setVisible(false);\n } else {\n noMoreTargetsButton.setVisible(false);\n noTargetButton.setVisible(true);\n }\n \n break;\n }\n }", "public void setTarget(String targetToAdd) {\n if (targetToAdd.equals(\"\")) {\n throw new BuildException(\"target attribute must not be empty\");\n }\n targets.add(targetToAdd);\n targetAttributeSet = true;\n }", "public void setBuyerId(Number value) {\n setAttributeInternal(BUYERID, value);\n }", "public void setBuyerId(Number value) {\n setAttributeInternal(BUYERID, value);\n }", "public void setTarget(CPointer<BlenderObject> target) throws IOException\n\t{\n\t\tlong __address = ((target == null) ? 0 : target.getAddress());\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeLong(__io__address + 128, __address);\n\t\t} else {\n\t\t\t__io__block.writeLong(__io__address + 104, __address);\n\t\t}\n\t}", "public void setTarget(double x, double y) {\n\t\tkin.target = new Vector2d(x, y);\n\t}", "public void setTarget(Vector3f target) \n {\n float distance = FastMath.abs(target.y - this.getPosition().y);\n this.motionTarget = target;\n this.motionPath = new MotionPath();\n \n this.motionPath.addWayPoint(this.getPosition());\n\n this.motionPath.addWayPoint(new Vector3f(this.getPosition().x, target.y, this.getPosition().z));\n \n grabberMotion = new MotionEvent(this.node, this.motionPath);\n grabberMotion.setInitialDuration(distance / this.speed);\n }", "public void setTargetExchange(String targetExchange) {\n this.targetExchange = targetExchange;\n }", "T setUrlTarget(String urlTarget);", "public void setCostsTarget(String costsTarget) {\n this.costsTarget = costsTarget == null ? null : costsTarget.trim();\n }", "public void setTargetUrl(String targetUrl) {\n this.targetUrl = targetUrl == null ? null : targetUrl.trim();\n }", "public void setTargetDueDate(Date targetDueDate) {\n\t\tthis.targetDueDate = targetDueDate;\n\t}", "public void setBuyer(String buyer) {\n this.buyer = buyer;\n }", "public void setTarget(TestSetDiscrepancyReportResourceTarget target) {\n this.target = target;\n }", "public void setTargetType(String targetType) {\n this.targetType = targetType == null ? null : targetType.trim();\n }", "public void setTargetId(Long targetId) {\r\n this.targetId = targetId;\r\n }", "public void setTargetLocation(Location targetLocation) \n {\n this.targetLocation = targetLocation;\n }", "public String target(String target)\n {\n return target + \":\" + this.getPort();\n }", "private void setNewTarget() {\n startPoint = new Circle(targetPoint);\n projection.addShift(this.targetGenerator.shiftX(startPoint), this.targetGenerator.shiftY(startPoint),\n this.targetGenerator.gridManager);\n this.targetPoint = new Circle(this.targetGenerator.generateTarget(startPoint), this.targetGenerator.gridManager.pointSize);\n projection.convertFromPixels(this.targetPoint);\n \n gameListeners.addedNewLine(startPoint, targetPoint);\n \n // TODO make probability upgradeable to spawn a new pickup\n if (Math.random() < pickupSpawnProbability) {\n generateNewPickup(); \n }\n }", "public void setTarget(DmcObjectName value) {\n DmcAttribute<?> attr = get(DmpDMSAG.__target);\n if (attr == null)\n attr = new DmcTypeNameContainerSV(DmpDMSAG.__target);\n \n try{\n attr.set(value);\n set(DmpDMSAG.__target,attr);\n }\n catch(DmcValueException ex){\n throw(new IllegalStateException(\"The alternative type specific set() method shouldn't throw exceptions!\",ex));\n }\n }", "@Override\n\tpublic void sendHealPacket(PixelmonWrapper target, int amount) {\n\t\tif (this.controlledPokemon.contains(target)) {\n\t\t\tPixelmon.network.sendTo(new HPUpdateTask(target, amount), this.player);\n\t\t}\n\t}", "public void setTarget(NameContainer value) {\n DmcAttribute<?> attr = get(DmpDMSAG.__target);\n if (attr == null)\n attr = new DmcTypeNameContainerSV(DmpDMSAG.__target);\n \n try{\n attr.set(value);\n set(DmpDMSAG.__target,attr);\n }\n catch(DmcValueException ex){\n throw(new IllegalStateException(\"The type specific set() method shouldn't throw exceptions!\",ex));\n }\n }", "public void setTargetName(String targetName) {\r\n this.targetName = targetName;\r\n }", "@Override\n\tpublic void setTarget(Object arg0) {\n\t\tdefaultEdgle.setTarget(arg0);\n\t}", "public void setTarget(Object method)\n {\n __m_Target = method;\n }", "public void setToAlipayTargetRequest(ToAlipayTargetRequest toAlipayTargetRequest) {\n this.toAlipayTargetRequest = toAlipayTargetRequest;\n }", "public void setTargetFileSize(Long targetFileSize) {\n this.targetFileSize = targetFileSize;\n }", "void activateTarget(@ParamName(\"targetId\") String targetId);", "public void setTargetSelected(boolean targetSelected) {\n this.targetSelected = targetSelected;\n }", "@JsonProperty(\"target\")\n public String getTarget() {\n return target;\n }", "public Wait(WaitTarget target)\r\n\t{\r\n\t\tthis.target = target;\r\n\t}", "public void setC_DocTypeTarget_ID(int C_DocTypeTarget_ID) {\n\t\tif (C_DocTypeTarget_ID < 1)\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"C_DocTypeTarget_ID is mandatory.\");\n\t\tset_ValueNoCheck(\"C_DocTypeTarget_ID\", new Integer(C_DocTypeTarget_ID));\n\t}", "@Override\n public void setTarget(GameObject newTarget) {\n if (newTarget != null && !newTarget.isVisible()) {\n newTarget = null;\n }\n\n // Can't target and attack festival monsters if not participant\n if (newTarget instanceof FestivalMonsterInstance && !isFestivalParticipant()) {\n newTarget = null;\n }\n\n final Party party = getParty();\n\n // Can't target and attack rift invaders if not in the same room\n if (party != null && party.isInDimensionalRift()) {\n final int riftType = party.getDimensionalRift().getType();\n final int riftRoom = party.getDimensionalRift().getCurrentRoom();\n if (newTarget != null && !DimensionalRiftManager.getInstance().getRoom(riftType, riftRoom).checkIfInZone(newTarget.getX(), newTarget.getY(), newTarget.getZ())) {\n newTarget = null;\n }\n }\n\n final GameObject oldTarget = getTarget();\n\n if (oldTarget != null) {\n if (oldTarget == newTarget) {\n return;\n }\n\n // Remove the L2Player from the _statusListener of the old target if it was a L2Character\n if (oldTarget.isCreature()) {\n ((Creature) oldTarget).removeStatusListener(this);\n }\n\n broadcastPacket(new TargetUnselected(this));\n }\n\n if (newTarget != null) {\n // Add the L2Player to the _statusListener of the new target if it's a L2Character\n if (newTarget.isCreature()) {\n ((Creature) newTarget).addStatusListener(this);\n }\n\n broadcastPacket(new TargetSelected(getObjectId(), newTarget.getObjectId(), getLoc()));\n }\n\n super.setTarget(newTarget);\n }", "@DisplayName(\"The Target Comp ID for the Marketcetera Exchange Server\")\n public void setTargetCompID(@DisplayName(\"The Target Comp ID for the Marketcetera Exchange Server\")\n String inTargetCompID);", "public void setTargetName(String targetName) {\n this.targetName = targetName;\n }", "public void setCurrentTarget(Object target) {\r\n if (target instanceof IModelNode) {\r\n newSource = null;\r\n newTarget = (IModelNode) target;\r\n }\r\n }", "public Builder setRequest(com.google.openrtb.OpenRtb.BidRequest value) {\n if (requestBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n request_ = value;\n onChanged();\n } else {\n requestBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "public void setTargetid(Integer targetid) {\n this.targetid = targetid;\n }", "public void setChargerTarget() {\n if (getEnemies().size() > 0) {\n ArrayList<RobotReference> enemies = getEnemies();\n RobotReference closestEnemy = enemies.get(0);\n if (chargerTarget == null && teamTarget != null) {\n for (RobotReference enemy : enemies) {\n if (!enemy.isTeammate()) {\n if (Vector2d.getDistanceTo(closestEnemy.getLocation(), getLocation()) > Vector2d.getDistanceTo(enemy.getLocation(), getLocation()))\n closestEnemy = enemy;\n }\n }\n chargerTarget = closestEnemy;\n } else {\n chargerTarget = enemies.get(0);\n }\n }\n }", "public void setTarget(Object value) throws DmcValueException {\n DmcTypeNameContainerSV attr = (DmcTypeNameContainerSV) get(DmpDMSAG.__target);\n if (attr == null)\n attr = new DmcTypeNameContainerSV(DmpDMSAG.__target);\n \n attr.set(value);\n set(DmpDMSAG.__target,attr);\n }", "public void setTargetType(Class<?> targetType)\n/* */ {\n/* 257 */ this.targetType = (targetType != null ? ResolvableType.forClass(targetType) : null);\n/* */ }", "public StockEvent setUrlTarget(String urlTarget) {\n this.urlTarget = urlTarget;\n return this;\n }", "public void setSetPropertyTarget(String setPropertyTarget) {\n \n this.setPropertyTarget = setPropertyTarget;\n }", "public void setSignificanceToTarget( Flow.Significance val ) {\n doCommand( new UpdateSegmentObject( getUser().getUsername(), getFlow(), \"significanceToTarget\", val ) );\n }", "public void setTargetType(String targetType) {\n this.targetType = targetType;\n }", "public void setTargetClassName(String targetClassName) {\r\n m_targetClassName = targetClassName;\r\n }", "public Builder setTargetNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n targetName_ = value;\n onChanged();\n return this;\n }", "public Builder setTargetSummonUid(int value) {\n \n targetSummonUid_ = value;\n onChanged();\n return this;\n }", "public void setTargetPosition(float x, float y){\r\n this.targetX = x;\r\n this.targetY = y;\r\n }", "public Builder setBidrequest(com.google.openrtb.OpenRtb.BidRequest value) {\n if (bidrequestBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n bidrequest_ = value;\n onChanged();\n } else {\n bidrequestBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "public void setTargetRange(float targetRange) {\n\t\tthis.targetRange = targetRange;\n\t}", "public void setTarget(SolShip solship) {\n this.target = solship;\n }", "public void setTarget(Object target) {\n/* 116 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void setRequestNum(int amount){\n requestNum = amount;\n }", "public void setRequester(User requester) {\n this.requester = requester;\n }", "private void setRequest(\n net.iGap.proto.ProtoRequest.Request.Builder builderForValue) {\n request_ = builderForValue.build();\n \n }", "@Required\n\tpublic void setTargetService(TargetService service) {\n\t\tthis.targetService = service;\n\t}", "void xsetTarget(org.apache.xmlbeans.XmlString target);", "public void setTarget(TestExecutionTarget target) {\n this.target = target;\n }", "public void setTwomerchant(Long twomerchant) {\n this.twomerchant = twomerchant;\n }", "@com.exedio.cope.instrument.Generated // customize with @WrapperType(genericConstructor=...)\n\t\tprivate Target(final com.exedio.cope.SetValue<?>... setValues){super(setValues);}", "public void setSupplyMovementRate(int value) {\n this.supplyMovementRate = value;\n }", "public void setTargetType(String targetType)\n throws BuildException {\n this.targetType = targetType.toLowerCase();\n if (!targetType.equals(\"exe\") && !targetType.equals(\"library\")) {\n throw new BuildException(\"targetType \" + targetType + \" is not a valid type\");\n }\n }", "public void setTarget(AbstractModelElement target, EditPart editPart) {\n\t\tif (target == null) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tthis.target = target;\n\t\tthis.targetEditPart = editPart;\n\t}", "public void setTarget(String s) { \n shortcutValue(s, GENERAL_TARGET);\n }", "public Builder setRequest(\n com.google.openrtb.OpenRtb.BidRequest.Builder builderForValue) {\n if (requestBuilder_ == null) {\n request_ = builderForValue.build();\n onChanged();\n } else {\n requestBuilder_.setMessage(builderForValue.build());\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "public String getTarget() {\n return target;\n }", "public String getTarget() {\n return target;\n }", "public AbstractTargetedSignal(final Integer senderId, final Integer targetId) {\n\t\tsuper(senderId);\n\t\tthis.targetId = targetId;\n\t}", "public void setIsBillTo(boolean IsBillTo) {\n\t\tset_Value(\"IsBillTo\", new Boolean(IsBillTo));\n\t}", "public void SetTargetOffset(int target_offset) {\n target_offset_ = target_offset;\n }", "public void setTargetX(double x) {\r\n\t\ttargetX = x;\r\n\t}", "public void setTargetPosition(double position){\n targetPosition = position;\n }", "public void setBuyNum(Integer buyNum) {\n this.buyNum = buyNum;\n }", "@Override\n\tprotected void updateTargetRequest() {\n\t}", "public void setTargetAgent(final Agent agent) {\r\n mTargetAgent = agent;\r\n }", "public Target getTarget() {\n\n return target;\n }", "public ConditionTargetWeight(int weight)\n\t{\n\t\t_weight = weight;\n\t}", "public void set(Object target, Object value)\n\t\tthrows IllegalAccessException,\n\t\tInvocationTargetException {\n\t\tsetter.setAccessible(true);\n\t\tsetter.invoke(target, value);\n\t}", "protected void setValue(Object target, String targetName, String propName,\n\t\t\tObject valToSet) throws WekaException {\n\n\t\ttry {\n\t\t\tgetStepManager().logDebug(\n\t\t\t\t\t\"Attempting to set property '\" + propName + \"' \"\n\t\t\t\t\t\t\t+ \"with value of type '\" + valToSet.getClass().getCanonicalName()\n\t\t\t\t\t\t\t+ \" '(\" + valToSet + \") on '\" + targetName + \"'\");\n\t\t\tPropertyDescriptor prop = getPropDescriptor(target, propName);\n\n\t\t\tif (prop == null) {\n\t\t\t\tthrow new WekaException(\"Unable to find method '\" + propName + \"'\");\n\t\t\t}\n\t\t\tMethod setMethod = prop.getWriteMethod();\n\t\t\tsetMethod.invoke(target, valToSet);\n\t\t} catch (Exception e) {\n\t\t\tthrow new WekaException(e);\n\t\t}\n\t}", "public com.autodesk.ws.avro.Call.Builder setTargetObjectUri(java.lang.CharSequence value) {\n validate(fields()[5], value);\n this.target_object_uri = value;\n fieldSetFlags()[5] = true;\n return this; \n }", "public void setFlywheelTargetVelocity(double target){\r\n\t\twheelTarget = target;\r\n\t}" ]
[ "0.5965277", "0.5950794", "0.5926505", "0.5861267", "0.57332855", "0.5700944", "0.564761", "0.55153817", "0.54905665", "0.5485385", "0.5402549", "0.534199", "0.5318664", "0.530962", "0.5269395", "0.52522695", "0.5244681", "0.52081233", "0.52066004", "0.52004", "0.5197383", "0.5197383", "0.5186547", "0.5172464", "0.5165877", "0.51310617", "0.51234525", "0.5115481", "0.51144576", "0.5098514", "0.5071036", "0.5045716", "0.50454205", "0.50447065", "0.50420696", "0.50384724", "0.5019411", "0.500978", "0.49970612", "0.49893796", "0.49864703", "0.49752036", "0.49731028", "0.4961535", "0.4954926", "0.49522525", "0.49490649", "0.4946645", "0.49397773", "0.49299818", "0.49173042", "0.49166462", "0.49155557", "0.49109745", "0.48974133", "0.48870575", "0.48852548", "0.4883773", "0.4879652", "0.48641247", "0.48547584", "0.48540968", "0.4844343", "0.48401552", "0.48367617", "0.48346013", "0.482342", "0.48180932", "0.48148385", "0.4814312", "0.48114437", "0.48097745", "0.47932416", "0.47680062", "0.47677818", "0.47641525", "0.47613862", "0.47609055", "0.47598603", "0.47499657", "0.47460756", "0.4745597", "0.47424275", "0.47409356", "0.47347122", "0.47347122", "0.4719746", "0.47152394", "0.47098643", "0.47098127", "0.4709479", "0.47091365", "0.47060466", "0.4705825", "0.47020033", "0.46985376", "0.46962354", "0.4687118", "0.4685314", "0.46850067" ]
0.5781623
4
Gets the type value for this BuyRequestType.
public java.lang.Integer getType() { return type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getReqType()\r\n {\r\n return safeConvertInt(getAttribute(\"type\"));\r\n }", "public SupplyType getType() \r\n {\r\n assert(true);\r\n return type;\r\n }", "public final SettlementType getType() {\n return type;\n }", "@Override public io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType getType() {\n @SuppressWarnings(\"deprecation\")\n io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType result = io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.valueOf(type_);\n return result == null ? io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.UNRECOGNIZED : result;\n }", "@Override\n public io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType getType() {\n @SuppressWarnings(\"deprecation\")\n io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType result = io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.valueOf(type_);\n return result == null ? io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.UNRECOGNIZED : result;\n }", "public PURCHASE_TYPE getType(){\n return type;\n }", "public String getType() {\n return (String) getObject(\"type\");\n }", "public RequestType getRequestType(){\n\t\t\treturn this.type;\n\t\t}", "public static String getRequestType(){\n return requestType;\n }", "public byte getType() {\n return this.type;\n }", "public String getRequestType() { return this.requestType; }", "public java.lang.String getRequestType() {\n return requestType;\n }", "@Schema(required = true, description = \"Contract type (KIP-7, KIP-17, ERC-20, ERC-721)\")\n public String getType() {\n return type;\n }", "public int getTypeValue() {\n return type_;\n }", "public int getTypeValue() {\n return type_;\n }", "public int getTypeValue() {\n return type_;\n }", "public int getTypeValue() {\n return type_;\n }", "public int getTypeValue() {\n return type_;\n }", "public String getType() {\n\t\treturn _type;\n\t}", "public SoyType getType() {\n return getTypeWrapper().getType();\n }", "public Byte getType() {\n\t\treturn type;\n\t}", "public int getTypeValue() {\n\t\t\t\t\treturn type_;\n\t\t\t\t}", "public int getTypeValue() {\n return type_;\n }", "public int getTypeValue() {\n return type_;\n }", "public int getTypeValue() {\n return type_;\n }", "public int getTypeValue() {\n return type_;\n }", "public int getTypeValue() {\n return type_;\n }", "public int getTypeValue() {\n\t\t\treturn type_;\n\t\t}", "public String getType() {\r\n\t\treturn this.type;\r\n\t}", "public String getType() {\n return _type;\n }", "public int getTypeValue() {\n return type_;\n }", "public int getTypeValue() {\n\t\t\t\treturn type_;\n\t\t\t}", "public int getTypeValue() {\n\t\t\t\treturn type_;\n\t\t\t}", "public String getType() {\n\n return this.type;\n }", "public String getType() {\n\t\treturn this.type;\n\t}", "public String getType() {\n\t\treturn this.type;\n\t}", "public String getType() {\n\t\treturn this.type;\n\t}", "public String getType() {\n\t\treturn this.type;\n\t}", "public String getType() {\n\t\treturn this.type;\n\t}", "public String getType() {\n\t\treturn this.type;\n\t}", "public String getType() {\n\t\treturn this.type;\n\t}", "public String getType() {\n\t\treturn this.type;\n\t}", "public int getTypeValue() {\n return type_;\n }", "public int getTypeValue() {\n return type_;\n }", "public int getTypeValue() {\n return type_;\n }", "public String getType() {\r\r\n\t\treturn type;\r\r\n\t}", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public String getType() {\r\n\t\treturn type;\r\n\t}", "public String getType() {\r\n\t\treturn type;\r\n\t}", "public String getType() {\r\n\t\treturn type;\r\n\t}", "public String getType()\r\n\t{\r\n\t\treturn type;\r\n\t}", "@java.lang.Override public int getTypeValue() {\n return type_;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "@Override\r\n\tpublic byte getType() {\n\t\treturn type;\r\n\t}", "public type getType() {\r\n\t\treturn this.Type;\r\n\t}", "public String get_type()\r\n\t{\r\n\t\treturn this.type;\r\n\t}", "public String getType() {\r\n return type;\r\n }", "public String getType() {\r\n return type;\r\n }", "public String getType() {\r\n return type;\r\n }", "public String getType() {\r\n return type;\r\n }", "public String getType() {\r\n return type;\r\n }", "public String getType() {\r\n return type;\r\n }", "public String obtenirType() {\n\t\treturn this.type;\n\t}", "public String getType() {\r\n\t\treturn type_;\r\n\t}", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public int getTypeValue() {\n return type_;\n }", "public int getTypeValue() {\n return type_;\n }", "@Nullable\n public String getType() {\n return type;\n }", "public teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type getType() {\n teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type result = teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type.valueOf(type_);\n return result == null ? teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type.UNRECOGNIZED : result;\n }", "public teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type getType() {\n teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type result = teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type.valueOf(type_);\n return result == null ? teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type.UNRECOGNIZED : result;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }" ]
[ "0.6844408", "0.65247995", "0.6491449", "0.6379522", "0.6367049", "0.6361003", "0.63508886", "0.6336652", "0.63166916", "0.6314984", "0.6291379", "0.6287783", "0.6263207", "0.6214462", "0.6214462", "0.6214462", "0.6214462", "0.6214462", "0.6202849", "0.6198615", "0.61860216", "0.6181965", "0.6178223", "0.6178223", "0.6178223", "0.6178223", "0.6178223", "0.6176327", "0.61746335", "0.61653286", "0.6163193", "0.61620706", "0.61620706", "0.6148564", "0.6145971", "0.6145971", "0.6145971", "0.6145971", "0.6145971", "0.6145971", "0.6145971", "0.6145971", "0.61431813", "0.61431813", "0.61431813", "0.6133421", "0.6133176", "0.6133176", "0.6133176", "0.6133176", "0.6133176", "0.6133176", "0.6127946", "0.6127946", "0.6127946", "0.61240894", "0.6122008", "0.6117315", "0.6117315", "0.6116994", "0.6116994", "0.6116994", "0.6116994", "0.6116994", "0.6116994", "0.6116994", "0.6116994", "0.6116994", "0.6116994", "0.6116994", "0.6116994", "0.610867", "0.61083204", "0.6107538", "0.6106005", "0.6103753", "0.6103753", "0.6103753", "0.6103753", "0.6103753", "0.6102423", "0.61008537", "0.6099328", "0.6099328", "0.6099328", "0.6099328", "0.6099328", "0.6099328", "0.6099328", "0.6099328", "0.6099328", "0.6099328", "0.6096917", "0.6096917", "0.60929704", "0.60851604", "0.6080717", "0.6071887", "0.6071887", "0.6071887", "0.6071887" ]
0.0
-1
Sets the type value for this BuyRequestType.
public void setType(java.lang.Integer type) { this.type = type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setType(String type) {\n m_Type = type;\n }", "public void setType(type type) {\r\n\t\tthis.Type = type;\r\n\t}", "public void setRequestType(RequestType requestType) {\n this.requestType = requestType;\n }", "public void setType(Type type) {\n this.type = type;\n }", "public void setType(Type type) {\n this.type = type;\n }", "public void setType(Type type) {\n this.type = type;\n }", "public void setType(String type)\r\n {\r\n this.mType = type;\r\n }", "public void setType(String type) {\n\t this.mType = type;\n\t}", "public void setType(Object type)\r\n {\r\n\tthis.type = type;\r\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public final void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(Type type){\n\t\tthis.type = type;\n\t}", "public void setType(Type t) {\n type = t;\n }", "public void setType(final Type type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "@Override\n public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\r\n\t\tthis.type = type;\r\n\t}", "public void setType(String type) {\r\n\t\tthis.type = type;\r\n\t}", "public void setType(String type) {\r\n\t\tthis.type = type;\r\n\t}", "public final void setType(String type){\n\t\tthis.type = type;\t\n\t}", "public void setType(String type) {\r\r\n\t\tthis.type = type;\r\r\n\t}", "public void setType(String type) \n {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType( String type ) {\n this.type = type;\n }", "final public void setType(String type)\n {\n setProperty(TYPE_KEY, (type));\n }", "public void setType( Type type ) {\n assert type != null;\n this.type = type;\n }", "public void setType( String type )\n {\n this.type = type;\n }", "public void setType(Type t) {\n\t\ttype = t;\n\t}", "public void setType (String type) {\n this.type = type;\n }", "public void setType (String type) {\n this.type = type;\n }", "public void setType (String type) {\n this.type = type;\n }", "public void setType(String type) {\n\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "@Override\n\tpublic void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n this.type = type;\n }", "void setType(Type type)\n {\n this.type = type;\n }", "public void setType(String type){\n this.type = type;\n }", "public void setType(String type);", "public void setType(String type);", "public void setType(String type);", "void setType(String type) {\n this.type = type;\n }", "public void setType(String type){\n \tthis.type = type;\n }", "private void setType(String type) {\n mType = type;\n }", "public void setType(String type)\n\t{\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\r\n\t\tthis.productType = type;\r\n\t}", "public void setType(gov.nih.nci.calims2.domain.common.Type type) {\n this.type = type;\n }", "public void setType(String type){\n\t\tthis.type = type;\n\t}", "public void setType(Byte type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type){\r\n if(type == null){\r\n throw new IllegalArgumentException(\"Type can not be null\");\r\n }\r\n this.type = type;\r\n }", "public void setType(String type) {\r\n\t\tthis.type=type;\r\n\t}", "public OrderSetCustomTypeActionBuilder type(\n @Nullable final com.commercetools.api.models.type.TypeResourceIdentifier type) {\n this.type = type;\n return this;\n }", "public void setType(SupplyType type) \r\n {\r\n if (type==SupplyType.COUNT&&amount%1.0!=0)\r\n {\r\n throw new IllegalArgumentException(\"Countable units must be of\" +\r\n \t\t\" an integer quantity\");\r\n }\r\n this.type = type;\r\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(java.lang.String type) {\n this.type = type;\n }", "public void setType(java.lang.String type) {\n this.type = type;\n }", "public void setType(Byte type) {\n this.type = type;\n }", "public void setType(Byte type) {\n this.type = type;\n }", "public void setType(Byte type) {\n this.type = type;\n }", "public void setType(Byte type) {\n this.type = type;\n }", "public void setType(Byte type) {\n this.type = type;\n }", "public void setType(Byte type) {\n this.type = type;\n }", "public final void setType(final SettlementType newType) {\n if (type != null) removeFeatures(type);\n this.type = newType;\n if (newType != null) addFeatures(newType);\n }", "public void setType(CWLType type) {\n this.type = type;\n }" ]
[ "0.6566989", "0.6557141", "0.6538154", "0.65152615", "0.65152615", "0.65152615", "0.6491841", "0.64784974", "0.6474507", "0.6464416", "0.64613765", "0.6438581", "0.6438581", "0.6438581", "0.6438581", "0.6436005", "0.6417221", "0.6416179", "0.64045405", "0.64045405", "0.6399059", "0.63972515", "0.6396788", "0.6396788", "0.6396788", "0.63884085", "0.63869435", "0.637964", "0.63754547", "0.63754547", "0.63754547", "0.63754547", "0.63754547", "0.63754547", "0.63754547", "0.63754547", "0.63754547", "0.63754547", "0.63754547", "0.63754547", "0.63754547", "0.63754547", "0.63754547", "0.63754547", "0.63754547", "0.63754547", "0.63754547", "0.63754547", "0.63754547", "0.63754547", "0.636859", "0.6366596", "0.63652474", "0.6364627", "0.6363205", "0.63625765", "0.63625765", "0.63625765", "0.63522893", "0.6351975", "0.63471854", "0.6342929", "0.6334419", "0.63248616", "0.6324413", "0.6324413", "0.6324413", "0.6321335", "0.63211524", "0.6316402", "0.6304092", "0.6297528", "0.6297528", "0.6297528", "0.6297528", "0.6297528", "0.6297528", "0.6297528", "0.6297528", "0.6297528", "0.6297528", "0.62761325", "0.6272496", "0.6269547", "0.6267782", "0.62585974", "0.6257985", "0.625797", "0.62531924", "0.6242478", "0.6242478", "0.62223965", "0.62223965", "0.62207973", "0.62207973", "0.62207973", "0.62207973", "0.62207973", "0.62207973", "0.6212673", "0.61951613" ]
0.0
-1
Return type metadata object
public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MetadataType getType();", "public MetadataType getType() {\n return type;\n }", "public MilanoTypeMetadata.TypeMetadata getMetadata()\n {\n if (typeMetadata == null) {\n return null;\n }\n\n return typeMetadata;\n }", "private Metadata getMetadata(RubyModule type) {\n for (RubyModule current = type; current != null; current = current.getSuperClass()) {\n Metadata metadata = (Metadata) current.getInternalVariable(\"metadata\");\n \n if (metadata != null) return metadata;\n }\n \n return null;\n }", "public Metadata getMetadata( MetadataType type )\n\t{\n\t\tfor( Metadata metadata: mMetadata )\n\t\t{\n\t\t\tif( metadata.getMetadataType() == type )\n\t\t\t{\n\t\t\t\treturn metadata;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "Metadata getMetaData();", "public List<TypeMetadata> getTypeMetadata() {\n return types;\n }", "@Override\n public Class<? extends Metadata> getMetadataType() {\n throw new RuntimeException( \"Not yet implemented.\" );\n }", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "public MetaData getMetaData();", "private Class<?> getType(final Object metadata, final ValueNode node) throws ParseException {\n if (node.type != null) {\n return readType(node);\n }\n Class type;\n if (metadata instanceof ReferenceSystemMetadata || metadata instanceof Period || metadata instanceof AbstractTimePosition || metadata instanceof Instant) {\n final Method getter = ReflectionUtilities.getGetterFromName(node.name, metadata.getClass());\n return getter.getReturnType();\n } else {\n type = standard.asTypeMap(metadata.getClass(), KeyNamePolicy.UML_IDENTIFIER, TypeValuePolicy.ELEMENT_TYPE).get(node.name);\n }\n final Class<?> special = specialized.get(type);\n if (special != null) {\n return special;\n }\n return type;\n }", "public Map<String, Variant<?>> GetMetadata();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public TypeSummary getTypeSummary() {\r\n return type;\r\n }", "String provideType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "public Type getType();", "@Override\n public String toString() {\n return metaObject.getType().toString();\n }", "public String metadataClass() {\n return this.metadataClass;\n }", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "abstract public Type getType();", "public String type();", "private String getType(){\r\n return type;\r\n }", "Coding getType();", "protected abstract String getType();", "type getType();", "@Override\n TypeInformation<T> getProducedType();", "TypeDefinition createTypeDefinition();", "abstract public String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract Type getType();", "protected static LibMetaData createLibMetaData(LibMetaData lmd) {\n MetaData metaData = new MetaData();\r\n metaData.add(\"IsThing\", new Integer(1), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"ImageSource\", \"Items\", null, MetaDataEntry.ANY_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Image\", new Integer(0), null, MetaDataEntry.POSITIVE_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Number\", new Integer(1), null, MetaDataEntry.POSITIVE_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n lmd.add(THING, metaData);\r\n \r\n metaData = new MetaData(lmd.get(\"thing\"));\r\n metaData.add(\"IsItem\", new Integer(1), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"ImageSource\", \"Items\", null, MetaDataEntry.ANY_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Image\", new Integer(1), null, MetaDataEntry.POSITIVE_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Name\", \"Thing\", null, MetaDataEntry.ANY_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"NameType\", new Integer(Description.NAMETYPE_NORMAL), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Z\", new Integer(Thing.Z_ITEM), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n lmd.add(ITEM, metaData);\r\n \r\n metaData = new MetaData(lmd.get(\"thing\"));\r\n metaData.add(\"IsBeing\",new Integer(1), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"ImageSource\", \"Creatures\", null, MetaDataEntry.ANY_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Image\", new Integer(340), null, MetaDataEntry.POSITIVE_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"IsMobile\",new Integer(1), new Integer[]{new Integer(0), new Integer(1)}, MetaDataEntry.CERTAIN_VALUES, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"IsBlocking\", new Integer(1), new Integer[]{new Integer(0), new Integer(1)}, MetaDataEntry.CERTAIN_VALUES, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"MoveCost\", new Integer(100), null, MetaDataEntry.POSITIVE_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"DeathDecoration\", \"blood pool\", null, MetaDataEntry.ANY_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"NameType\", new Integer(Description.NAMETYPE_NORMAL), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Z\", new Integer(Thing.Z_MOBILE), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n lmd.add(BEING, metaData);\r\n \r\n lmd = createEffectMetaData(lmd);\r\n lmd = createPoisonMetaData(lmd);\r\n lmd = createFoodMetaData(lmd);\r\n lmd = createScrollMetaData(lmd);\r\n lmd = createMissileMetaData(lmd);\r\n lmd = createRangedWeaponMetaData(lmd);\r\n lmd = createPotionMetaData(lmd);\r\n lmd = createWandMetaData(lmd);\r\n lmd = createRingMetaData(lmd);\r\n lmd = createCoinMetaData(lmd);\r\n lmd = createArmourMetaData(lmd);\r\n lmd = createWeaponMetaData(lmd);\r\n lmd = createSecretMetaData(lmd);\r\n lmd = createSpellBookMetaData(lmd);\r\n lmd = createChestMetaData(lmd);\r\n lmd = createDecorationMetaData(lmd);\r\n lmd = createSceneryMetaData(lmd);\r\n lmd = createPortalMetaData(lmd);\r\n lmd = createTrapMetaData(lmd);\r\n createMonsterMetaData(lmd);\r\n createPersonMetaData(lmd);\r\n return lmd;\r\n }", "String getTypeAsString();", "public gov.niem.niem.structures._2_0.MetadataType getMetadata()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.niem.niem.structures._2_0.MetadataType target = null;\n target = (gov.niem.niem.structures._2_0.MetadataType)get_store().find_element_user(METADATA$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "TypeRef getType();", "public Class getType();" ]
[ "0.79712594", "0.7375215", "0.7357041", "0.7089384", "0.6734884", "0.67225796", "0.66729796", "0.65636516", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65077287", "0.6482919", "0.6350047", "0.6332303", "0.6332303", "0.6332303", "0.6332303", "0.6332303", "0.6332303", "0.6332303", "0.6332303", "0.6332303", "0.6332303", "0.6332303", "0.6332303", "0.6332303", "0.6295985", "0.6288133", "0.62879086", "0.62879086", "0.62879086", "0.62879086", "0.62879086", "0.62879086", "0.62879086", "0.62879086", "0.62879086", "0.62879086", "0.62879086", "0.62879086", "0.62879086", "0.6278829", "0.62663573", "0.62333167", "0.62316966", "0.62316966", "0.62316966", "0.62316966", "0.62316966", "0.62316966", "0.62316966", "0.62316966", "0.62316966", "0.62316966", "0.62316966", "0.62244064", "0.6211206", "0.61985075", "0.6182968", "0.6182626", "0.6171355", "0.61695945", "0.6167566", "0.61637247", "0.614837", "0.614837", "0.614837", "0.614837", "0.614837", "0.614837", "0.614837", "0.614837", "0.6144485", "0.6138886", "0.6135965", "0.61209613", "0.6120009", "0.61102885" ]
0.0
-1
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPACES);\n }", "private String toIndentedString(Object o)\n/* */ {\n/* 128 */ if (o == null) {\n/* 129 */ return \"null\";\n/* */ }\n/* 131 */ return o.toString().replace(\"\\n\", \"\\n \");\n/* */ }", "private String toIndentedString( Object o )\n {\n if ( o == null )\n {\n return \"null\";\n }\n return o.toString().replace( \"\\n\", \"\\n \" );\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }" ]
[ "0.78847593", "0.75493765", "0.74971926", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168" ]
0.0
-1
Body of the plan execution. Starts initialization process.
@PlanBody public void body(IInternalAccess access) throws JBDIEmoException { handleExepctions(access); this.emotionalOthers = emotionalAgent.others().split(","); this.engine = (Engine) access.getComponentFeature(IInternalBDIAgentFeature.class) .getBDIModel().getCapability().getBelief("engine").getValue(access); engine.setAgentName(access.getComponentIdentifier().getName()); engine.setAgentObject(agentObject); JBDIEmo.UserPlanParams.put(engine.getAgentName(), new LinkedHashMap()); JBDIEmo.UserGoalParams.put(engine.getAgentName(), new LinkedHashMap()); agentModelMapper = new AgentModelMapper(agentObject, access); platformOtherMapper = new PlatformOtherMapper(access); mapAgentModel(); mapAgentOther(); initializeEngine(); initializeGui(); initializeEngineLogger(); MessageCenter messageCenter = new MessageCenter(access); ElementEventMonitor elementEventMonitor = new ElementEventMonitor(access, agentObject, messageCenter); elementEventMonitor.goalsAndPlansMonitoring(); elementEventMonitor.beliefMonitoring(); elementEventMonitor.beliefSetMonitoring(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void performInitialisation() {\n \t\t// subclasses can override the behaviour for this method\n \t}", "@Override\n public void init() {\n this.log.pri1(LoggingInterface.INIT_START, \"\");\n // Any task initialization code goes here.\n this.log.pri1(LoggingInterface.INIT_END, \"\");\n }", "@Override\n\tpublic void onInit(RptParams params) throws Exception {\n\t}", "public void initialize() {\n\n getStartUp();\n }", "private void init() {\n CoachData coachData = UserBuffer.getCoachSession();\n list = PlanFunction.searchPlanByCoachID(coachData.getID());\n this.update();\n }", "public void init() {\n log.info(\"initialization\");\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 }", "protected void initialize() {\n\t\t//System.out.println(\"Cube collector is spitting\");\n\t}", "@Override\n public void initialize() throws GlitterException {\n this.nodeConverter = new NodeConverter(this.context.getNodeLayout());\n // start a transaction (if necessary), create a temp table with OK named graph IDs\n Glitter.getLog().debug(\"Creating temporary graph tables and indexes\");\n this.myLock = !this.context.getDatasource().isInTransaction(this.context.getConnection());\n if (this.myLock) {\n try {\n this.context.getDatasource().begin(this.context.getConnection(), false, false);\n } catch (AnzoException ae) {\n if (log.isDebugEnabled()) {\n log.debug(LogUtils.RDB_MARKER, \"Error initializing serversolutiongenerator\", ae);\n }\n throw new GlitterException(ae.getErrorCode(), ae);\n }\n }\n // long start = System.currentTimeMillis();\n // System.err.println(\"Start:\" + start);\n super.initialize();\n // System.err.println(\"Init:\" + (System.currentTimeMillis() - start));\n }", "private void invokeInitBlock(PythonFacet init, String env) {\n\t\tString body=init.getBody();\n\t\tPythonInterpreter environment = registerEnv(env);\n\t\tif (body !=null && !body.trim().equals(\"\")) {\n\t\t\tenvironment.exec(body);\n\t\t}\n\n\t}", "private void init() {\n\t\tinitProtocol();\n\t\tinitResultStorage();\n\t}", "public void initialize() {\r\n }", "@Override\n public void initialize() {\n time = 0;\n //noinspection ConstantConditions\n this.runningTasks.addAll(getInitialNode().getTasks());\n for (Node node : nodes) {\n node.initialize();\n }\n }", "@Override\n public void runInit() {\n }", "public void initialize()\n {\n }", "public void initialize() {\n // TODO\n }", "public void initialize() {\n\t\t//start the processor thread\n\t\t//logger.debug(processorName+\" starting processor thread\");\n\t\tprocessorThread.start();\n\t\t\n\t\t//logger.debug(processorName+\" initialized\");\n\t}", "public void initialize() {\n }", "@PostConstruct\n\tpublic void init()\n\t{\n\t\tlogModule.info(TaskGenerator.class, \"初始化 Task generator...\");\n\t}", "@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}", "public void initialize() {\n // empty for now\n }", "public void init() {\n\t\t}", "public void initialize() {\n //TODO: Initialization steps\n\n initialized = true;\n }", "public void init() {\n\n\t\tConnection connection = null;\n\t\tStatement statement = null;\n\n\t\ttry {\n\n\t\t\tconnection = DatabaseInteractor.getConnection();\n\t\t\tstatement = connection.createStatement();\n\n\t\t} catch (SQLException exception) {\n\t\t\texception.printStackTrace();\n\t\t\treturn;\n\t\t} catch (ClassNotFoundException exception) {\n\t\t\texception.printStackTrace();\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\n\t\t\tDatabaseInteractor.createTable(StringConstants.USERS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.QUESTIONS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.ANSWERS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.TOPICS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.USER_QUESTION_VOTES_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.USER_ANSWER_VOTES_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.USER_TOPIC_RANKS_TABLE, statement);\n\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void initialize() {\n }", "public void init() {\n \n }", "protected void initialize () {\r\n if (initCommand!=null) matlabEng.engEvalString (id,initCommand);\r\n }", "@Before\n\tpublic void initialize() {\n\t\tnullParserSQLGenerator = new SQLStringGenerator(null);\n\t\toneArgParserSQLGenerator = new SQLStringGenerator(new OneArgParser());\n\t}", "public void initOperation() {\n\t\tinitialized = true;\r\n\t}", "@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }", "public void initialize() {\n\t}", "public void initialize() {\n\t}", "public void initialize() {\n\n Employee emp = new Employee(\"jaden Williams\", \"abEFc123!\");\n\n //Widget newProductTest = new Widget(\"iPod45\", \"Apple\", ItemType.AUDIO); //Test widget\n\n System.out.println(\"Launched program\");\n loadDatabaseProducts();\n loadDatabaseRecords();\n tableViewSetup(); //Sets up table structure\n populateProductLineTabs(); //Populates item type dropdown\n populateItemQuantity(); //Populates quantity dropdown\n //testMultimedia(); //Testing\n //testProductionRecord(); //Testing text log on last page\n }", "public void init(){\r\n\t\tbuild(0);\r\n\t\taddFestiveCity(1);\r\n\t}", "public void init() {\r\n\r\n\t}", "private void initialize() {\n }", "protected void initialize()\n {\n logger.info(\"Initializing stack: {}\", this.getClass().getSimpleName());\n Function function = createLambdaFunction();\n createAthenaDataCatalog(function);\n }", "void PrepareRun() {\n }", "public void init() {\n // These data structures are initialized here because other\n // module's startUp() might be called before ours\n this.systemStartTime = System.currentTimeMillis();\n }", "public void initialize()\r\n\t{\r\n\t\tdatabaseHandler = DatabaseHandler.getInstance();\r\n\t\tfillPatientsTable();\r\n\t}", "@Override\n public void initialize(BatchRuntimeContext context) throws Exception {\n super.initialize(context);\n // create any resources required by transform()\n }", "protected void initialize() {\n \t\n }", "public void init() throws Throwable\n {\n try\n {\n // Prefetch persistent task states to accelerate performance\n //\n\n // String:taskname->SchedulerTaskState)\n Map persistentTaskStateMap = new HashMap();\n\n IDataAccessor accessor = AdminApplicationProvider.newDataAccessor();\n {\n IDataTable table = accessor.getTable(Enginetaskstatus.NAME);\n table.setMaxRecords(IDataRecordSet.UNLIMITED_RECORDS);\n table.qbeClear();\n table.qbeSetKeyValue(Enginetaskstatus.applicationname, AdminApplicationProvider.ADMIN_APPLICATION_NAME);\n table.qbeSetValue(Enginetaskstatus.taskname, IndexTask.TASK_NAME_PREFIX + \"*\");\n table.search();\n for (int i = 0; i < table.recordCount(); i++)\n {\n IDataTableRecord record = table.getRecord(i);\n persistentTaskStateMap.put(record.getStringValue(Enginetaskstatus.taskname), SchedulerTaskState.get(record.getStringValue(Enginetaskstatus.taskstatus)));\n }\n }\n\n // start scheduler tasks for all index datasources\n //\n IDataTable table = accessor.getTable(Datasource.NAME);\n table.setUnlimitedRecords();\n table.qbeClear();\n table.qbeSetKeyValue(Datasource.rdbtype, Datasource.rdbType_ENUM._Lucene);\n table.search();\n for (int i = 0; i < table.recordCount(); i++)\n {\n IDataTableRecord record = table.getRecord(i);\n\n String datasourceIndexName = record.getStringValue(Datasource.name);\n\n // determine initial states\n //\n SchedulerTaskState indexUpdateInitialState = (SchedulerTaskState) persistentTaskStateMap.get(IndexUpdateTask.getTaskName(datasourceIndexName));\n if (indexUpdateInitialState != null)\n indexUpdateInitialState = SchedulerTaskState.SCHEDULED;\n\n SchedulerTaskState indexOptimizeInitialState = (SchedulerTaskState) persistentTaskStateMap.get(IndexOptimizeTask.getTaskName(datasourceIndexName));\n if (indexOptimizeInitialState != null)\n indexOptimizeInitialState = SchedulerTaskState.SCHEDULED;\n\n // and start scheduler with tasks\n //\n startIndexScheduler(datasourceIndexName, indexUpdateInitialState, indexOptimizeInitialState);\n }\n if (logger.isInfoEnabled())\n logger.info(table.recordCount() + \" index update tasks scheduled\");\n }\n catch (Exception e)\n {\n ExceptionHandler.handle(e);\n }\n }", "public void init() {}", "public void init() {}", "public static void init(){\r\n CommandBase.magazine.setSpeed(0.0);\r\n CommandBase.loader.setSpeed(0.0);\r\n Init.manualTankDrive.start(); \r\n Init.runCompressor.start();\r\n Init.stopGyroDrift.start();\r\n \r\n }", "public void init() {\n\t\t\n\t\t\n\t\tprepareGaborFilterBankConcurrent();\n\t\t\n\t\tprepareGaborFilterBankConcurrentEnergy();\n\t}", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\t\n\t}", "@Override\n public void init(String planQueuePath,\n ReservationSchedulerConfiguration conf) {\n }", "private void initialisation()\n\t{\n\t\tdaoFactory = new DaoFactory();\n\n\t\ttry\n\t\t{\n\t\t\tequationStandardSessions = EquationCommonContext.getContext().getGlobalProcessingEquationStandardSessions(\n\t\t\t\t\t\t\tsession.getSessionIdentifier());\n\t\t}\n\t\tcatch (Exception eQException)\n\t\t{\n\t\t\tif (LOG.isErrorEnabled())\n\t\t\t{\n\t\t\t\tStringBuilder message = new StringBuilder(\"There is a problem creating Global processing the sessions\");\n\t\t\t\tLOG.error(message.toString(), eQException);\n\t\t\t}\n\t\t}\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "private void initialize() {\n\t}", "public void initialize() {\n Runnable backgroundTask = () -> {\n Configuration configuration = loadApplicationConfiguration();\n\n if (Objects.nonNull(configuration)) {\n EbayService ebayService = new EbayService(configuration);\n\n try {\n List<OrderType> unshippedOrders = ebayService.getUnshippedOrders();\n\n for (OrderType order : unshippedOrders) {\n String orderID = order.getOrderID();\n String numberOfTransaction = Integer.toString(order.getTransactionArray().getTransaction().length);\n String transactionPrice = Double.toString(order.getTotal().getValue());\n\n String paidTime = \"\";\n\n if (order.getPaidTime() != null) {\n paidTime = eBayUtil.toAPITimeString(order.getPaidTime().getTime());\n }\n\n String buyerUserID = order.getBuyerUserID();\n\n Vector dataVector = new Vector();\n\n dataVector.add(orderID);\n dataVector.add(numberOfTransaction);\n dataVector.add(transactionPrice);\n dataVector.add(paidTime);\n dataVector.add(buyerUserID);\n dataVector.add(new JTextField(20));\n dataVector.add(new JButton(\"Create Fulfillment Order\"));\n\n providerTableModel.addRow(dataVector);\n }\n } catch (Exception exception) {\n showErrorMessage(exception.getMessage());\n }\n }\n };\n\n Thread backgroundThread = new Thread(backgroundTask);\n\n backgroundThread.start();\n }", "public void init()\r\n {\r\n ;\r\n }", "public void initialize () {\n }", "public void init() {\n\ttsp.init();\n }", "protected abstract void initialize();", "public void initRetrievalPlans() {\n for (RetrievalPlan retrievalPlan : this.getRetrievalPlans().values()) {\n retrievalPlan.init();\n }\n }", "public void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t// Nothing to do in this example\n\t}", "public void initialize() {\n\tMain.getPartida().recuperarData();\n\taction();\n\t\n\t}", "public void init(){\n \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}", "public final void init() {\n connectDB();\n\n initMainPanel();\n\n initOthers();\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "public final void init() {\n onInit();\n }", "public void begin() {\n if (!checkParams()) return;\n\n buildModel();\n buildSchedule();\n buildDisplay();\n\n displaySurf.display();\n populationPlot.display();\n }", "protected void initialize() {\n \t\n \tstart_time = System.currentTimeMillis();\n \t\n \tgoal = start_time + duration;\n }", "private void init() {\n }", "public void myInit() {\n\t\tSystem.out.println(\">> myInit for Bean Executed\");\n\t}", "private void initialize() {\n\t\t\n\t}", "protected void initialize() { \tthePrintSystem.printWithTimestamp(getClass().getName()); \n\tthis.isDone = false;\n\t\n\ttheLoader.setSetpoint(1.5);\n\t\n }", "public void init() throws InitializationException;", "public void init() throws KettleException;", "public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }", "public void init() {\r\n\t\tGetRunningProgramsGR request = new GetRunningProgramsGR(\r\n\t\t\t\tRunningServicesListViewAdapter.this.runningServicesActivity.getApplicationContext());\r\n\t\trequest.setServerName(RunningServicesListViewAdapter.this.serverName);\r\n\t\tnew GuiRequestHandler(RunningServicesListViewAdapter.this.runningServicesActivity,\r\n\t\t\t\tRunningServicesListViewAdapter.this, true).execute(request);\r\n\t}", "@Override\n protected void doInit() {\n getLogger().finer(\"Initialization of CompanyListServerResource.\");\n\n // Initialize the persistence layer.\n companyPersistence = PersistenceService.getCompanyPersistence();\n\n getLogger().finer(\"Initialization of CompanyListServerResource ended.\");\n }", "public void initialize() {\n\t\tDynamoConfig config = new DynamoConfig();\n\t\tthis.setup(config);\n\t}", "public abstract void initialize();", "public abstract void initialize();", "public abstract void initialize();", "protected abstract void initialize(List<Sample> samples, QueryGenerator queryGenerator);", "public void init() {\n\r\n\t}", "public void init() {\n\r\n\t}", "@Override\r\n\tprotected void processInit() {\n\r\n\t}", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "public void init() { }", "public void init() { }", "public void init()\n\t{\n\t\ttry\n\t\t{\n\t\t\t// if we are auto-creating our schema, check and create\n\t\t\tif (m_autoDdl)\n\t\t\t{\n\t\t\t\tm_sqlService.ddl(this.getClass().getClassLoader(), \"ctools_dissertation\");\n\t\t\t}\n\n\t\t\tsuper.init();\n\t\t}\n\t\tcatch (Throwable t)\n\t\t{\n\t\t\tm_logger.warn(this +\".init(): \", t);\n\t\t}\n\t}" ]
[ "0.65837723", "0.6227042", "0.6147133", "0.6144586", "0.60776496", "0.6058632", "0.6005585", "0.59655154", "0.5946669", "0.5897383", "0.5896949", "0.58862484", "0.5862401", "0.58591205", "0.5845823", "0.58450335", "0.5844823", "0.58385086", "0.58313775", "0.58273476", "0.5825935", "0.58232", "0.5822188", "0.581562", "0.5808911", "0.5803244", "0.57943773", "0.5793508", "0.5790246", "0.5787851", "0.5786582", "0.5786582", "0.5770733", "0.5770094", "0.57664025", "0.57627606", "0.57497734", "0.57473993", "0.5729522", "0.5718765", "0.571132", "0.5684538", "0.56828576", "0.56809324", "0.56809324", "0.5678089", "0.5673398", "0.5671509", "0.5671509", "0.5671509", "0.5671509", "0.5668472", "0.5668472", "0.5668472", "0.5665164", "0.566159", "0.56612235", "0.5659326", "0.5659326", "0.5659326", "0.56562483", "0.56542414", "0.56513464", "0.5649523", "0.5649199", "0.56468457", "0.56416196", "0.5641368", "0.5639238", "0.5637901", "0.56357986", "0.5635234", "0.5632605", "0.56317914", "0.56317914", "0.56317914", "0.56317914", "0.5627056", "0.5621634", "0.5612264", "0.56061435", "0.5604898", "0.5601144", "0.5601055", "0.5598102", "0.5591544", "0.55863625", "0.5582249", "0.5577215", "0.55767244", "0.55751646", "0.55751646", "0.55751646", "0.5575133", "0.5570538", "0.5570538", "0.5569943", "0.55660856", "0.55658656", "0.55658656", "0.555901" ]
0.0
-1
Get decay time parameter from ADF if exists and set decay time in engine
private void initializeEngine() { engine.setDecayDelay(emotionalAgent.decayTimeMillis()); // Get decay steps parameter from ADF if exists and set decay steps in engine engine.setDecaySteps(emotionalAgent.decayStepsToMin()); // Set engine initialized engine.setInitialized(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDecayRate(double newDecayRate ){\n\n decayRate= newDecayRate;\n}", "public void setDamping(double decay){damping = Math.exp(-decay);}", "public void setParameters( float maxAmp, float attTime, float decTime, float susLvl, float relTime, float befAmp, float aftAmp)\n\t{\n\t\tmaxAmplitude = maxAmp;\n\t\tattackTime = attTime;\n\t\tdecayTime = decTime;\n\t\tsustainLevel = susLvl;\n\t\treleaseTime = relTime;\n\t\tbeforeAmplitude = befAmp;\n\t\tafterAmplitude = aftAmp;\n\t}", "public void decay() {\r\n\t\tfor(int i=0;i<boxes[0];i++)\r\n\t\t\tfor(int j=0;j<boxes[1];j++)\r\n\t\t\t\tfor(int k=0;k<boxes[2];k++) quantity[i][j][k] *= (1 - decayRate*sim.getDt());\r\n\t}", "public void test1_1Decay() throws Exception {\n getReverb(0);\n try {\n int time = mReverb.getDecayTime();\n time = (time == 500) ? 1000 : 500;\n mReverb.setDecayTime(time);\n int time2 = mReverb.getDecayTime();\n assertTrue(\"got incorrect decay time\",\n ((float)time2 > (float)(time / DELAY_TOLERANCE)) &&\n ((float)time2 < (float)(time * DELAY_TOLERANCE)));\n short ratio = mReverb.getDecayHFRatio();\n ratio = (short)((ratio == 500) ? 1000 : 500);\n mReverb.setDecayHFRatio(ratio);\n short ratio2 = mReverb.getDecayHFRatio();\n assertTrue(\"got incorrect decay HF ratio\",\n ((float)ratio2 > (float)(ratio / RATIO_TOLERANCE)) &&\n ((float)ratio2 < (float)(ratio * RATIO_TOLERANCE)));\n\n } catch (IllegalArgumentException e) {\n fail(\"Bad parameter value\");\n } catch (UnsupportedOperationException e) {\n fail(\"get parameter() rejected\");\n } catch (IllegalStateException e) {\n fail(\"get parameter() called in wrong state\");\n } finally {\n releaseReverb();\n }\n }", "double getCalibrationPeriod();", "public void setBeta(double aBeta);", "void setExposureTimePref(long exposure_time);", "public void decay()\n\t{\n\t\tprotons -= 2;\n\t\tneutrons -= 2;\n\t}", "long getExposureTimePref();", "public void decay() {\r\n\t\tprotons -= 2;\r\n\t\tneutrons -= 2;\r\n\t}", "public void setAmperage(float amperage) {\r\n this.amperage = amperage;\r\n }", "Expression getReaction_time_parm();", "void setCalibrationPeriod(double calibrationPeriod);", "void hit(int frequency, double duration, double amplitude){\r\n \tSystem.out.println(\"Frequency: \"+frequency+\", Duration: \"+duration+\", Amplitude: \"+amplitude);\r\n \t\r\n\r\n\t\tadder.inputA.set(frequency); //fc !!!\r\n\t\tvibrato.frequency.set( frequency+80 ); // fm!!!\r\n\t\tvibrato.amplitude.set( (frequency+80)*2 ); // fm*2!!!\r\n \t\r\n\t\tint i=0;\r\n\t\tdata[i++] = 0.01;\t\t\t// Duration of first segment. \r\n\t\tdata[i++] = amplitude; \t\t// value \r\n\t\tdata[i++] = duration*0.13; \t// duration\r\n\t\t\tamplitude/=2;\r\n\t\tdata[i++] = amplitude; \t\t// value \r\n\t\tdata[i++] = duration*0.23; \t// duration \r\n\t\t\tamplitude/=2;\r\n\t\tdata[i++] = amplitude; \t\t// value \r\n\t\tdata[i++] = duration*0.23; \t// duration \r\n\t\t\tamplitude/=2;\r\n\t\tdata[i++] = amplitude; \t\t// value \r\n\t\tdata[i++] = duration*0.4; \t// duration \r\n\t\tdata[i++] = 0.0; \t\t\t// value \r\n\r\n\t\ti = 0;\r\n\t\tamplitude = 280*2;\r\n\t\tdata2[i++] = 0.01;\t\t\t// Duration of first segment. \r\n\t\tdata2[i++] = amplitude; \t\t// value \r\n\t\tdata2[i++] = duration*0.13; \t// duration\r\n\t\t\tamplitude/=2;\r\n\t\tdata2[i++] = amplitude; \t\t// value \r\n\t\tdata2[i++] = duration*0.23; \t// duration \r\n\t\t\tamplitude/=2;\r\n\t\tdata2[i++] = amplitude; \t\t// value \r\n\t\tdata2[i++] = duration*0.23; \t// duration \r\n\t\t\tamplitude/=2;\r\n\t\tdata2[i++] = amplitude; \t\t// value \r\n\t\tdata2[i++] = duration*0.4; \t// duration \r\n\t\tdata2[i++] = 0.0; \t\t\t// value \r\n\r\n\t\tenvData.write( 0, data, 0, i/2 );\r\n\t\tenvData2.write( 0, data2, 0, i/2 );\r\n \tenvPlayer.envelopePort.clear();\r\n \tenvPlayer2.envelopePort.clear();\r\n \tenvPlayer.envelopePort.queue( envData, 0, i/2 );\r\n \tenvPlayer2.envelopePort.queue( envData2, 0, i/2 );\r\n }", "public void setAmperage(double amperage) {\n\t\tthis.amperage = amperage;\n\t}", "public void decayAll() {\n Debug.debug(\"\\n=====\\nDecaying all emotions\\n=====\\n\");\n\n // Record current time\n long now = System.currentTimeMillis();\n\n // Decay all emotions.\n this.gamygdala.decayAll(this.lastMillis, now);\n\n // Store time of last decay.\n this.lastMillis = now;\n }", "public void estimateParameter(){\r\n int endTime=o.length;\r\n int N=hmm.stateCount;\r\n double p[][][]=new double[endTime][N][N];\r\n for (int t=0;t<endTime;++t){\r\n double count=EPS;\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n p[t][i][j]=fbManipulator.alpha[t][i]*hmm.a[i][j]*hmm.b[i][j][o[t]]*fbManipulator.beta[t+1][j];\r\n count +=p[t][j][j];\r\n }\r\n }\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n p[t][i][j]/=count;\r\n }\r\n }\r\n }\r\n double pSumThroughTime[][]=new double[N][N];\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n pSumThroughTime[i][j]=EPS;\r\n }\r\n }\r\n for (int t=0;t<endTime;++t){\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n pSumThroughTime[i][j]+=p[t][i][j];\r\n }\r\n }\r\n }\r\n\r\n //rebuild gamma\r\n for (int t=0;t<endTime;++t){\r\n for (int i=0;i<N;++i) fbManipulator.gamma[t][i]=0;\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n fbManipulator.gamma[t][i]+=p[t][i][j];\r\n }\r\n }\r\n }\r\n\r\n double gammaCount=EPS;\r\n //maximum parameter\r\n for (int i=0;i<N;++i){\r\n gammaCount+=fbManipulator.gamma[0][i];\r\n hmm.pi[i]=fbManipulator.gamma[0][i];\r\n }\r\n for (int i=0;i<N;++i){\r\n hmm.pi[i]/=gammaCount;\r\n }\r\n\r\n for (int i=0;i<N;++i) {\r\n gammaCount = EPS;\r\n for (int t = 0; t < endTime; ++t) gammaCount += fbManipulator.gamma[t][i];\r\n for (int j = 0; j < N; ++j) {\r\n hmm.a[i][j] = pSumThroughTime[i][j] / gammaCount;\r\n }\r\n }\r\n for (int i=0;i<N;i++){\r\n for (int j=0;j<N;++j){\r\n double tmp[]=new double[hmm.observationCount];\r\n for (int t=0;t<endTime;++t){\r\n tmp[o[t]]+=p[t][i][j];\r\n }\r\n for (int k=0;k<hmm.observationCount;++k){\r\n hmm.b[i][j][k]=(tmp[k]+1e-8)/pSumThroughTime[i][j];\r\n }\r\n }\r\n }\r\n //rebuild fbManipulator\r\n fbManipulator=new HMMForwardBackwardManipulator(hmm,o);\r\n }", "public AllpassFilter setParams(DataBead paramBead) {\r\n\t\tif (paramBead != null) {\r\n\t\t\tObject o;\r\n\r\n\t\t\tif ((o = paramBead.get(\"delay\")) != null) {\r\n\t\t\t\tif (o instanceof UGen) {\r\n\t\t\t\t\tsetDelay((UGen) o);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsetDelay((int) paramBead.getFloat(\"delay\", delay));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ((o = paramBead.get(\"g\")) != null) {\r\n\t\t\t\tif (o instanceof UGen) {\r\n\t\t\t\t\tsetG((UGen) o);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsetG(paramBead.getFloat(\"g\", g));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn this;\r\n\t}", "public final bp dt() {\n if (this.ad == null) {\n return null;\n }\n dp aq = (-1 == this.cs * -1099198911 || this.cx * -1961250233 != 0) ? null : gn.aq(this.cs * -1099198911, 1902805010);\n dp aq2 = (-1 == this.ce * -1620542321 || (this.ce * -1620542321 == this.bb * -959328679 && aq != null)) ? null : gn.aq(this.ce * -1620542321, 2037846592);\n bp ai = this.ad.ai(aq, this.cr * 317461367, aq2, this.cy * 631506963, 578342776);\n if (ai == null) {\n return null;\n }\n bp bpVar;\n ai.ai();\n this.di = ai.bx * -1067272603;\n if (!(-1 == this.ck * 836985687 || -1 == this.co * 1215520647)) {\n bp aj = dd.aq(this.ck * 836985687, 812886062).aj(this.co * 1215520647, (byte) 57);\n if (aj != null) {\n aj.ac(0, -(this.cz * -583056727), 0);\n bpVar = new bp(new bp[]{ai, aj}, 2);\n if (1 == this.ad.ae * -735434895) {\n bpVar.bs = true;\n }\n return bpVar;\n }\n }\n bpVar = ai;\n if (1 == this.ad.ae * -735434895) {\n }\n return bpVar;\n }", "public ForecastParameters make_analyst_fcparams (RJGUIController.XferAnalystView xfer) {\n\n\t\tForecastParameters new_fcparams = new ForecastParameters();\n\t\tnew_fcparams.setup_all_default();\n\n\t\tif (xfer.x_autoEnableParam == AutoEnable.DISABLE) {\n\t\t\treturn new_fcparams;\n\t\t}\n\n\t\tnew_fcparams.set_analyst_control_params (\n\t\t\tForecastParameters.CALC_METH_AUTO_PDL,\t\t// generic_calc_meth\n\t\t\tForecastParameters.CALC_METH_AUTO_PDL,\t\t// seq_spec_calc_meth\n\t\t\tForecastParameters.CALC_METH_AUTO_PDL,\t\t// bayesian_calc_meth\n\t\t\tanalyst_inj_text.isEmpty() ? ForecastParameters.INJ_TXT_USE_DEFAULT : analyst_inj_text\n\t\t);\n\n\t\tif (!( xfer.x_useCustomParamsParam )) {\n\t\t\treturn new_fcparams;\n\t\t}\n\n\t\tnew_fcparams.set_analyst_mag_comp_params (\n\t\t\ttrue,\t\t\t\t\t\t\t\t\t\t// mag_comp_avail\n\t\t\taafs_fcparams.mag_comp_regime,\t\t\t\t// mag_comp_regime\n\t\t\tfetch_fcparams.mag_comp_params\t\t\t\t// mag_comp_params\n\t\t);\n\n\t\tnew_fcparams.set_analyst_seq_spec_params (\n\t\t\ttrue,\t\t\t\t\t\t\t\t\t\t// seq_spec_avail\n\t\t\tfetch_fcparams.seq_spec_params\t\t\t\t// seq_spec_params\n\t\t);\n\n\t\tif (custom_search_region == null) {\n\t\t\treturn new_fcparams;\n\t\t}\n\n\t\tnew_fcparams.set_analyst_aftershock_search_params (\n\t\t\ttrue,\t\t\t\t\t\t\t\t\t\t// the_aftershock_search_avail\n\t\t\tcustom_search_region,\t\t\t\t\t\t// the_aftershock_search_region\n\t\t\tForecastParameters.SEARCH_PARAM_OMIT,\t\t// the_min_days\n\t\t\tForecastParameters.SEARCH_PARAM_OMIT,\t\t// the_max_days\n\t\t\tForecastParameters.SEARCH_PARAM_OMIT,\t\t// the_min_depth\n\t\t\tForecastParameters.SEARCH_PARAM_OMIT,\t\t// the_max_depth\n\t\t\tForecastParameters.SEARCH_PARAM_OMIT\t\t// the_min_mag\n\t\t);\n\t\t\n\t\treturn new_fcparams;\n\t}", "public int getAvpfRrInterval();", "public float getAmperage() {\r\n return amperage;\r\n }", "public void a() {\n if (this.a.getStorage().has(\"plannedFlushTime\").booleanValue()) {\n try {\n this.d = Long.parseLong(this.a.getStorage().get(\"plannedFlushTime\"), 10);\n } catch (Exception unused) {\n }\n }\n }", "public double getAmperage() {\n\t\treturn this.amperage;\n\t}", "float getPostGain();", "private void computeAverageFrequencyDelayValue() {\n\tthis.averageFrequencyDelayValue = value * this.averageDelay;\n }", "public ADSR(float maxAmp, float attTime, float decTime, float susLvl, float relTime, float befAmp, float aftAmp)\n\t{\n\t\tsuper();\n\t\taudio = new UGenInput(InputType.AUDIO);\n\t\tmaxAmplitude = maxAmp;\n\t\tattackTime = attTime;\n\t\tdecayTime = decTime;\n\t\tsustainLevel = susLvl;\n\t\treleaseTime = relTime;\n\t\tbeforeAmplitude = befAmp;\n\t\tafterAmplitude = aftAmp;\n\t\tamplitude = beforeAmplitude;\n\t\tisTurnedOn = false;\n\t\tisTurnedOff = false;\n\t\ttimeFromOn = -1.0f;\n\t\ttimeFromOff = -1.0f;\n\t\tunpatchAfterRelease = false;\n\t}", "public void setBeta(double value) {\r\n this.beta = value;\r\n }", "public TimeDecayingAverage(double phi, double average) {\n setPhi(phi);\n this.average = average;\n }", "public Double getExposureTime()\n\t{\n\t\treturn null;\n\t}", "public void setParameter(entity.RateTableMatchOp value);", "final int ec_laplace_decode(int fs, final int decay)\r\n\t{\r\n\t\tint value = 0;\r\n\t\tfinal int fm = ec_decode_bin( 15 );\r\n\t\tint fl = 0;\r\n\t\tif( fm >= fs )\r\n\t\t{\r\n\t\t\tvalue++;\r\n\t\t\tfl = fs;\r\n\t\t\tfs = ec_laplace_get_freq1( fs, decay ) + LAPLACE_MINP;\r\n\t\t\t/* Search the decaying part of the PDF.*/\r\n\t\t\twhile( fs > LAPLACE_MINP && fm >= fl + (fs << 1) )\r\n\t\t\t{\r\n\t\t\t\tfs <<= 1;\r\n\t\t\t\tfl += fs;\r\n\t\t\t\tfs = ((fs - (2 * LAPLACE_MINP)) * decay) >> 15;\r\n\t\t\t\tfs += LAPLACE_MINP;\r\n\t\t\t\tvalue++;\r\n\t\t\t}\r\n\t\t\t/* Everything beyond that has probability LAPLACE_MINP. */\r\n\t\t\tif( fs <= LAPLACE_MINP )\r\n\t\t\t{\r\n\t\t\t\tfinal int di = (fm - fl) >> (LAPLACE_LOG_MINP + 1);\r\n\t\t\t\tvalue += di;\r\n\t\t\t\tfl += di * (2 * LAPLACE_MINP);\r\n\t\t\t}\r\n\t\t\tif( fm < fl + fs ) {\r\n\t\t\t\tvalue = -value;\r\n\t\t\t} else {\r\n\t\t\t\tfl += fs;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// celt_assert( fl < 32768 );\r\n\t\t// celt_assert( fs > 0 );\r\n\t\t// celt_assert( fl <= fm );\r\n\t\t// celt_assert( fm < IMIN( fl + fs, 32768 ) );\r\n\t\tfs += fl;// java\r\n\t\tfs = fs <= 32768 ? fs : 32768;\r\n\t\tec_dec_update( fl, fs, 32768 );\r\n\t\treturn value;\r\n\t}", "public double getBeta();", "public void Init(float frame_rate, long time)\n\t{\n\t\tthis.frame_rate = frame_rate;\n\t\n\t}", "BusinessCenterTime getValuationTime();", "interface WithExpirationTimeIfNotActivatedUtc {\n /**\n * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this\n * timer expires while the corresponding partner topic is never activated, the event channel and\n * corresponding partner topic are deleted..\n *\n * @param expirationTimeIfNotActivatedUtc Expiration time of the event channel. If this timer expires while\n * the corresponding partner topic is never activated, the event channel and corresponding partner topic\n * are deleted.\n * @return the next definition stage.\n */\n Update withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);\n }", "public abstract int getPerTagAvgPoseSolveTime();", "public ADSR(float maxAmp, float attTime, float decTime, float susLvl, float relTime, float befAmp)\n\t{\n\t\tthis(maxAmp, attTime, decTime, susLvl, relTime, befAmp, 0.0f);\n\t}", "public void setDyf(java.lang.String param) {\r\n localDyfTracker = param != null;\r\n\r\n this.localDyf = param;\r\n }", "ScaleTwoDecimal calculateApplicableFandARate(Award award);", "public PSLSingleExposure(ADBase adBase, double readoutTime, String resetConnectionPVName, String acquirePVName) {\n\t\tsuper(adBase, readoutTime);\n\t\tif (readoutTime >= 0) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"This detector does not support acquistion period. Please set the readout time to be negative to indicate that it will not be used.\");\n\t\t}\n\t\tif (resetConnectionPVName != null && !resetConnectionPVName.isEmpty()) {\n\t\t\tresetConectionPV = LazyPVFactory.newIntegerPV(resetConnectionPVName);\n\t\t}\n\t\tif (acquirePVName != null && !acquirePVName.isEmpty()) {\n\t\t\tacquirePV = LazyPVFactory.newDoublePV(acquirePVName);\n\t\t}\n\t}", "public DataBead getParams() {\r\n\t\tDataBead db = new DataBead();\r\n\t\tif (isDelayStatic) {\r\n\t\t\tdb.put(\"delay\", delay);\r\n\t\t} else {\r\n\t\t\tdb.put(\"delay\", delayUGen);\r\n\t\t}\r\n\r\n\t\tif (isGStatic) {\r\n\t\t\tdb.put(\"g\", g);\r\n\t\t} else {\r\n\t\t\tdb.put(\"g\", gUGen);\r\n\t\t}\r\n\r\n\t\treturn db;\r\n\t}", "public float getDCA();", "public void init(double dst,double timeGoal){\n if(!started) {\n for (int i = 0; i < this.motors.length; i++) {\n //reset the encoder, change the behaviour, calculate position\n //then set the target position and change the mode\n motors[i].setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motors[i].setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n int pos = motors[i].getCurrentPosition() +(int) ((dst) * MAGIC_NUMBER);\n motors[i].setTargetPosition(pos);\n motors[i].setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n runTime.reset();\n this.timeGoal = timeGoal;\n started = true;\n }\n }", "public void setAOA(float AOA);", "public float getPlaybackGainDb();", "public float getMicGainDb();", "public DampingParam() {\n super(NAME, UNITS);\n double damping = 5;\n DoubleDiscreteConstraint dampingConstraint =\n new DoubleDiscreteConstraint();\n dampingConstraint.addDouble(damping);\n setValue(damping); // set this hear so current value doesn't cause\n // problems when setting the constraint\n dampingConstraint.setNonEditable();\n setConstraint(dampingConstraint);\n setInfo(INFO);\n setDefaultValue(damping);\n setNonEditable();\n }", "public double getParameterValue (Assignment input) ;", "@Override\n\tprotected void initLateralWeightParams(final Space extendedSpace) throws CommandLineFormatException\n\t{\n\t\thppa = command.get(CNFTCommandLine.WA);\n\t\thpA = command.get(CNFTCommandLine.IA);\n\t\taddParameters(hppa,hpA);\n\t\taddParameters(command.get(CNFTCommandLine.LEARNING_RATE));\n\t}", "public void setAmplitude(float amplitude) {\n/* 79 */ this.amplitude = amplitude;\n/* */ }", "float getPreGain();", "public void ee_parameter(Double ee_parameter) {\n }", "public static native void OpenMM_AmoebaAngleForce_getAngleParameters(PointerByReference target, int index, IntBuffer particle1, IntBuffer particle2, IntBuffer particle3, DoubleBuffer length, DoubleBuffer quadraticK);", "static float calculateNewVelocity(float a, float deltaTime, float v0) {\n return v0 + (a * deltaTime);\n }", "public void setActivationTime(java.util.Calendar param){\n localActivationTimeTracker = true;\n \n this.localActivationTime=param;\n \n\n }", "public void setScopeTime(Integer aValue) { _scopeTime = aValue; }", "boolean hasAdParameter();", "public void updateParameters(){\n\t\tp = RunEnvironment.getInstance().getParameters();\n\t\tmaxFlowerNectar = (double)p.getValue(\"maxFlowerNectar\");\n\t\tlowMetabolicRate = (double)p.getValue(\"lowMetabolicRate\");\n\t\thighMetabolicRate = (double)p.getValue(\"highMetabolicRate\");\n\t\tcolonySize = (int)p.getValue(\"colonySize\");\n\t}", "public void decay()\n\t{\n\t\tif(object.onDecay())\n\t\t{\n\t\t\tremoveFromRegion();\n\t\t}\n\t}", "public baconhep.TTau.Builder setEta(float value) {\n validate(fields()[1], value);\n this.eta = value;\n fieldSetFlags()[1] = true;\n return this; \n }", "public void setTime(double time) {_time = time;}", "TimeConstant createTimeConstant();", "public void setNewAlpha(){\n\n\t\tretrieveAlpha();\n\t\tretrieveReducerOutput();\n\t\t\n\t\tdouble[] alphaVectorUpdate = new double[K];\n\t\tdouble[] alphaGradientVector = new double[K];\n\t\tdouble[] alphaHessianVector = new double[K];\n\n\t\tdouble[] alphaVector = oldAlpha.clone();\n\t\tdouble[] alphaSufficientStatistics = rDelta;\n\n\t\tint alphaUpdateIterationCount = 0;\n\n\t\t// update the alpha vector until converge\n\t\tboolean keepGoing = true;\n\t\ttry {\n\t\t\tint decay = 0;\n\n\t\t\tdouble alphaSum = 0;\n\t\t\tfor (int j = 0; j < K; j++) {\n\t\t\t\talphaSum += alphaVector[j];\n\t\t\t}\n\n\t\t\twhile (keepGoing) {\n\t\t\t\tdouble sumG_H = 0;\n\t\t\t\tdouble sum1_H = 0;\n\n\t\t\t\tfor (int i = 0; i < K; i++) {\n\t\t\t\t\t// compute alphaGradient\n\t\t\t\t\talphaGradientVector[i] = D\n\t\t\t\t\t\t\t* (Gamma.digamma(alphaSum) - Gamma.digamma(alphaVector[i]))\n\t\t\t\t\t\t\t+ alphaSufficientStatistics[i];\n\n\t\t\t\t\t// compute alphaHessian\n\t\t\t\t\talphaHessianVector[i] = -D * Gamma.trigamma(alphaVector[i]);\n\n\t\t\t\t\tif (alphaGradientVector[i] == Double.POSITIVE_INFINITY\n\t\t\t\t\t\t\t|| alphaGradientVector[i] == Double.NEGATIVE_INFINITY) {\n\t\t\t\t\t\tthrow new ArithmeticException(\"Invalid ALPHA gradient matrix...\");\n\t\t\t\t\t}\n\n\t\t\t\t\tsumG_H += alphaGradientVector[i] / alphaHessianVector[i];\n\t\t\t\t\tsum1_H += 1 / alphaHessianVector[i];\n\t\t\t\t}\n\n\t\t\t\tdouble z = D * Gamma.trigamma(alphaSum);\n\t\t\t\tdouble c = sumG_H / (1 / z + sum1_H);\n\n\t\t\t\twhile (true) {\n\t\t\t\t\tboolean singularHessian = false;\n\n\t\t\t\t\tfor (int i = 0; i < K; i++) {\n\t\t\t\t\t\tdouble stepSize = Math.pow(Parameters.DEFAULT_ALPHA_UPDATE_DECAY_FACTOR, decay)\n\t\t\t\t\t\t\t\t* (alphaGradientVector[i] - c) / alphaHessianVector[i];\n\t\t\t\t\t\tif (alphaVector[i] <= stepSize) {\n\t\t\t\t\t\t\t// the current hessian matrix is singular\n\t\t\t\t\t\t\tsingularHessian = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\talphaVectorUpdate[i] = alphaVector[i] - stepSize;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (singularHessian) {\n\t\t\t\t\t\t// we need to further reduce the step size\n\t\t\t\t\t\tdecay++;\n\n\t\t\t\t\t\t// recover the old alpha vector\n\t\t\t\t\t\talphaVectorUpdate = alphaVector;\n\t\t\t\t\t\tif (decay > Parameters.DEFAULT_ALPHA_UPDATE_MAXIMUM_DECAY) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// we have successfully update the alpha vector\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// compute the alpha sum and check for alpha converge\n\t\t\t\talphaSum = 0;\n\t\t\t\tkeepGoing = false;\n\t\t\t\tfor (int j = 0; j < K; j++) {\n\t\t\t\t\talphaSum += alphaVectorUpdate[j];\n\t\t\t\t\tif (Math.abs((alphaVectorUpdate[j] - alphaVector[j]) / alphaVector[j]) >= Parameters.DEFAULT_ALPHA_UPDATE_CONVERGE_THRESHOLD) {\n\t\t\t\t\t\tkeepGoing = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (alphaUpdateIterationCount >= Parameters.DEFAULT_ALPHA_UPDATE_MAXIMUM_ITERATION) {\n\t\t\t\t\tkeepGoing = false;\n\t\t\t\t}\n\n\t\t\t\tif (decay > Parameters.DEFAULT_ALPHA_UPDATE_MAXIMUM_DECAY) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\talphaUpdateIterationCount++;\n\t\t\t\talphaVector = alphaVectorUpdate;\n\t\t\t}\n\t\t} catch (IllegalArgumentException iae) {\n\t\t\tSystem.err.println(iae.getMessage());\n\t\t\tiae.printStackTrace();\n\t\t} catch (ArithmeticException ae) {\n\t\t\tSystem.err.println(ae.getMessage());\n\t\t\tae.printStackTrace();\n\t\t}\n\n\t\tnewAlpha = alphaVector;\n\n\n\t}", "public abstract void setDecimation(float decimation);", "public void SetLearnRate (double alpha) { this.alpha = alpha; }", "public Expression getGammaValue();", "public static native void OpenMM_AmoebaAngleForce_setAngleParameters(PointerByReference target, int index, int particle1, int particle2, int particle3, double length, double quadraticK);", "public static native void OpenMM_AmoebaVdwForce_getParticleParameters(PointerByReference target, int particleIndex, IntBuffer parentIndex, DoubleBuffer sigma, DoubleBuffer epsilon, DoubleBuffer reductionFactor, IntBuffer isAlchemical);", "public double gettimetoAchieve(){\n\t\treturn this.timeFrame;\n\t}", "double getPeriod();", "public double getBeam() {\n return beam;\n }", "public static native void OpenMM_AmoebaAngleForce_getAngleParameters(PointerByReference target, int index, IntByReference particle1, IntByReference particle2, IntByReference particle3, DoubleByReference length, DoubleByReference quadraticK);", "V setValue(V value, long ttl, TimeUnit ttlUnit);", "public interface LDABetaInitStrategy{\n\t/**\n\t * Given a model and the corpus initialise the model's sufficient statistics\n\t * @param model\n\t * @param corpus\n\t */\n\tpublic void initModel(LDAModel model, Corpus corpus);\n\t\n\t/**\n\t * initialises beta randomly s.t. each each topicWord >= 1 and < 2\n\t * @author Sina Samangooei ([email protected])\n\t *\n\t */\n\tpublic static class RandomBetaInit implements LDABetaInitStrategy{\n\t\tprivate MersenneTwister random;\n\t\t\n\t\t/**\n\t\t * unseeded random\n\t\t */\n\t\tpublic RandomBetaInit() {\n\t\t\trandom = new MersenneTwister();\n\t\t}\n\t\t\n\t\t/**\n\t\t * seeded random\n\t\t * @param seed\n\t\t */\n\t\tpublic RandomBetaInit(int seed) {\n\t\t\trandom = new MersenneTwister(seed);\n\t\t}\n\t\t@Override\n\t\tpublic void initModel(LDAModel model, Corpus corpus) {\n\t\t\tfor (int topicIndex = 0; topicIndex < model.ntopics; topicIndex++) {\n\t\t\t\tfor (int wordIndex = 0; wordIndex < corpus.vocabularySize(); wordIndex++) {\n\t\t\t\t\tdouble topicWord = 1 + random.nextDouble();\n\t\t\t\t\tmodel.incTopicWord(topicIndex,wordIndex,topicWord);\n\t\t\t\t\tmodel.incTopicTotal(topicIndex, topicWord);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "public void reconfigure(double cf) {\n if (cf > 20000) {\n cf = 20000;\n } else if (cf < 20) {\n cf = 20;\n }\n Q = (Q == 0) ? 1e-9 : Q;\n center_freq = cf;\n // only used for peaking and shelving filters\n gain_abs = Math.pow(10, gainDB / 40);\n double omega = 2 * Math.PI * cf / sample_rate;\n double sn = Math.sin(omega);\n double cs = Math.cos(omega);\n double alpha = sn / (2 * Q);\n double beta = Math.sqrt(gain_abs + gain_abs);\n switch (type) {\n case BANDPASS:\n b0 = alpha;\n b1 = 0;\n b2 = -alpha;\n a0 = 1 + alpha;\n a1 = -2 * cs;\n a2 = 1 - alpha;\n break;\n case LOWPASS:\n b0 = (1 - cs) / 2;\n b1 = 1 - cs;\n b2 = (1 - cs) / 2;\n a0 = 1 + alpha;\n a1 = -2 * cs;\n a2 = 1 - alpha;\n break;\n case HIGHPASS:\n b0 = (1 + cs) / 2;\n b1 = -(1 + cs);\n b2 = (1 + cs) / 2;\n a0 = 1 + alpha;\n a1 = -2 * cs;\n a2 = 1 - alpha;\n break;\n case NOTCH:\n b0 = 1;\n b1 = -2 * cs;\n b2 = 1;\n a0 = 1 + alpha;\n a1 = -2 * cs;\n a2 = 1 - alpha;\n break;\n case PEAK:\n b0 = 1 + (alpha * gain_abs);\n b1 = -2 * cs;\n b2 = 1 - (alpha * gain_abs);\n a0 = 1 + (alpha / gain_abs);\n a1 = -2 * cs;\n a2 = 1 - (alpha / gain_abs);\n break;\n case LOWSHELF:\n b0 = gain_abs * ((gain_abs + 1) - (gain_abs - 1) * cs + beta * sn);\n b1 = 2 * gain_abs * ((gain_abs - 1) - (gain_abs + 1) * cs);\n b2 = gain_abs * ((gain_abs + 1) - (gain_abs - 1) * cs - beta * sn);\n a0 = (gain_abs + 1) + (gain_abs - 1) * cs + beta * sn;\n a1 = -2 * ((gain_abs - 1) + (gain_abs + 1) * cs);\n a2 = (gain_abs + 1) + (gain_abs - 1) * cs - beta * sn;\n break;\n case HIGHSHELF:\n b0 = gain_abs * ((gain_abs + 1) + (gain_abs - 1) * cs + beta * sn);\n b1 = -2 * gain_abs * ((gain_abs - 1) + (gain_abs + 1) * cs);\n b2 = gain_abs * ((gain_abs + 1) + (gain_abs - 1) * cs - beta * sn);\n a0 = (gain_abs + 1) - (gain_abs - 1) * cs + beta * sn;\n a1 = 2 * ((gain_abs - 1) - (gain_abs + 1) * cs);\n a2 = (gain_abs + 1) - (gain_abs - 1) * cs - beta * sn;\n break;\n }\n // prescale flter constants\n b0 /= a0;\n b1 /= a0;\n b2 /= a0;\n a1 /= a0;\n a2 /= a0;\n }", "public void setEta(double newEta) {\n\t\teta = newEta;\n\t}", "public static void add_damping_acceleration( Body body ) {\r\n body.currentState.ax = body.currentState.ax - body.currentState.vx * body.damping / body.m;\r\n body.currentState.ay = body.currentState.ay - body.currentState.vy * body.damping / body.m;\r\n body.currentState.az = body.currentState.az - body.currentState.vz * body.damping / body.m;\r\n }", "public static void setAlpha(double alp)\n\t{\n\t\talpha = alp;\t\n\t}", "com.google.ads.googleads.v6.resources.AdParameter getAdParameter();", "private bdv e(IBlockAccess paramard, BlockPosition paramdt)\r\n/* 180: */ {\r\n/* 181:211 */ bcm localbcm = paramard.s(paramdt);\r\n/* 182:212 */ if ((localbcm instanceof bdv)) {\r\n/* 183:213 */ return (bdv)localbcm;\r\n/* 184: */ }\r\n/* 185:215 */ return null;\r\n/* 186: */ }", "public abstract double sensingTime();", "RampDownTimer getRampDownTimer();", "private long caclFrameTime(long frameTime, long it, long lastFrameTime) {\n\t\t\tlong currentFrameTime;\n\t\t\tif (it > ALPHA)\n\t\t\t\tcurrentFrameTime = (ALPHA * frameTime + lastFrameTime)\n\t\t\t\t\t\t/ (ALPHA + 1);\n\t\t\telse\n\t\t\t\tcurrentFrameTime = (it * frameTime + lastFrameTime) / (it + 1);\n\t\t\treturn currentFrameTime;\n\t\t}", "@WithName(\"schedule.delay\")\n @WithDefault(\"5s\")\n Duration scheduleDelay();", "public void setBlinkTime(float blinkTime)\n\t{ this.BLINK_TIME = blinkTime; }", "public void setEta(java.lang.Float value) {\n this.eta = value;\n }", "public ADSR( float maxAmp, float attTime, float decTime )\n\t{\n\t\tthis(maxAmp, attTime, decTime, 0.0f, 1.0f, 0.0f, 0.0f);\n\t}", "@Override\n public void iCGAbsAc(int icgAbsAc, int timestamp) {\n }", "public PulseTransitTime() {\n currPTT = 0.0;\n hmPeakTimes = new ArrayList<>();\n //maf = new MovingAverage(WINDOW_SIZE);\n }", "public double getDelay();", "public ADSR( float maxAmp, float attTime )\n\t{\n\t\tthis(maxAmp, attTime, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f);\n\t}", "native void nativeSetMetricsTime(boolean is_enable);", "public void learnValue(final Calendar when, final double val);", "public TimeDecayingAverage(double phi) {\n this(phi, 0D);\n }", "@SuppressWarnings(\"unchecked\")\n public static Optional<Duration> getJobRuntimePrediction(JobDescriptor jobDescriptor) {\n if (!isBatchJob(jobDescriptor)) {\n return Optional.empty();\n }\n Map<String, String> attributes = ((JobDescriptor<BatchJobExt>) jobDescriptor).getAttributes();\n return Optional.ofNullable(attributes.get(JobAttributes.JOB_ATTRIBUTES_RUNTIME_PREDICTION_SEC))\n .flatMap(StringExt::parseDouble)\n .map(seconds -> ((long) (seconds * 1000))) // seconds -> milliseconds\n .map(Duration::ofMillis);\n }", "void setMaxActiveAltitude(double maxActiveAltitude);", "int getLastVibrationFrequency();", "public static native void OpenMM_AmoebaStretchBendForce_getStretchBendParameters(PointerByReference target, int index, IntBuffer particle1, IntBuffer particle2, IntBuffer particle3, DoubleBuffer lengthAB, DoubleBuffer lengthCB, DoubleBuffer angle, DoubleBuffer k1, DoubleBuffer k2);" ]
[ "0.57641625", "0.56602174", "0.56490165", "0.54765266", "0.5312449", "0.50577414", "0.49000412", "0.4893693", "0.48834017", "0.4871905", "0.4762317", "0.47567716", "0.4738494", "0.47230628", "0.47150722", "0.4623689", "0.45901003", "0.45372325", "0.45200947", "0.45098722", "0.44641182", "0.4456951", "0.44551167", "0.44164094", "0.43941104", "0.43941024", "0.43895677", "0.43832123", "0.43473265", "0.43348446", "0.43345603", "0.4312313", "0.43099368", "0.42974856", "0.42874405", "0.42850128", "0.42824182", "0.42674536", "0.42669243", "0.42650792", "0.42649952", "0.42639664", "0.42614517", "0.42587334", "0.42540872", "0.42405754", "0.4226404", "0.42202705", "0.42196825", "0.42054993", "0.42001924", "0.41944247", "0.41892692", "0.41871637", "0.4185291", "0.41820705", "0.41775054", "0.41762775", "0.41708976", "0.4170059", "0.4166556", "0.4160457", "0.4154996", "0.41477075", "0.41456178", "0.41454205", "0.41451743", "0.41387406", "0.413696", "0.41335484", "0.41315788", "0.41299683", "0.41291428", "0.41281953", "0.41174522", "0.41158268", "0.41151837", "0.41150948", "0.41149282", "0.4109426", "0.4108854", "0.41080073", "0.40973732", "0.40964404", "0.409318", "0.4092756", "0.40872616", "0.40872502", "0.4086959", "0.4079262", "0.40757358", "0.40624318", "0.40617302", "0.405795", "0.40578702", "0.40481657", "0.40426967", "0.40405148", "0.40402395", "0.4037081" ]
0.5215691
5
Create a Label control.
@Override public void start(Stage primaryStage) { Label Label1 = new Label("Output File:"); Label Label2 = new Label("Message to Encrypt:"); Label Label3 = new Label("Input File: "); Label Label4 = new Label("Decrypted Message: "); // Create a Button control. Button b1 = new Button("Encrypt"); Button b2 = new Button("Decrypt"); // Register the event handler. b1.setOnAction(new ButtonClickHandler()); b2.setOnAction(new ButtonClickHandler2()); // Put the Label and TextField in an HBox with 10 pixels of spacing. HBox h1 = new HBox(10, Label1, t1, Label2, t2, b1); HBox h2 = new HBox(10, Label3, t3, Label4, t4, b2); h1.setPadding(new Insets(10)); h2.setPadding(new Insets(10)); // Put the HBox and Button in a VBox with 10 pixels of spacing. VBox root = new VBox(10, h1, h2, Label5); root.setPadding(new Insets(10)); // Create a Scene with the VBox as its root node. Scene scene = new Scene(root); // Set the scene's alignment to center. root.setAlignment(Pos.CENTER); // Add the Scene to the Stage. primaryStage.setScene(scene); // Set the stage title. primaryStage.setTitle("TextField Demo"); // Show the window. primaryStage.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic JLabel createLabel() {\r\n\t\treturn new JLabel();\r\n\t}", "private Label createLabel(String text, int offset) {\n\t\tLabel label = new Label(text);\n\t\t//label.setFont(Font.font(40));\n\t\tlabel.setTextFill(Color.YELLOW);\n\t\tlabel.getTransforms().add(new Rotate(-50, 300, 400, 20, Rotate.X_AXIS));\n\t\tlabel.setLayoutX(canvas.getWidth() / 2);\n\t\tlabel.setLayoutY(canvas.getHeight() / 2 + offset);\n\t\tlabel.setId(\"chooseFile\");\n\t\t\n\t\treturn label;\n\n\t}", "private Label initLabel(DraftKit_PropertyType labelProperty, String styleClass) {\n PropertiesManager props = PropertiesManager.getPropertiesManager();\n String labelText = props.getProperty(labelProperty);\n Label label = new Label(labelText);\n label.getStyleClass().add(styleClass);\n return label;\n }", "private JLabel _createNewLabel(String sCaption_) \n{\n Util.panicIf( sCaption_ == null );\n\n JLabel lblNew = new JLabel(sCaption_);\n lblNew.setFont( _pFont );\n \n return lblNew;\n }", "public static Label createInputLabel(String lblValue) {\n\t\tLabel lbl = new Label(lblValue);\n\t\tlbl.setFont(Font.font(\"Arial\", FontWeight.SEMI_BOLD, 20));\n\t\treturn lbl;\n\t}", "private Label initVBoxLabel(VBox container, DraftKit_PropertyType labelProperty, String styleClass) {\n Label label = initLabel(labelProperty, styleClass);\n container.getChildren().add(label);\n return label;\n }", "private Label initHBoxLabel(HBox container, DraftKit_PropertyType labelProperty, String styleClass) {\n Label label = initLabel(labelProperty, styleClass);\n container.getChildren().add(label);\n return label;\n }", "public Label() {\n }", "private Label initChildLabel(Pane container, DraftKit_PropertyType labelProperty, String styleClass) {\n Label label = initLabel(labelProperty, styleClass);\n container.getChildren().add(label);\n return label;\n }", "private void createLabel(String title, int row, int col, int fontsize) {\n \tLabel label1 = new Label(title);\n \tlabel1.setFont(Font.font(myResources.getString(\"font\"), \n \t\t\tFontWeight.EXTRA_BOLD, FontPosture.ITALIC, fontsize));\n \tlabel1.setTextFill(Color.RED);\n \tstartScreen.add(label1, row, col);\n }", "private void createStartingLabel() {\n \tcreateLabel(myResources.getString(\"title\"), 1, 0, TITLE_FONT);\n }", "private Label addNewLabel() {\n getElement().getChildren().forEach(e -> getElement().removeChild(e));\n // Create and add a new slotted label\n Label label = new Label();\n label.getElement().setAttribute(\"slot\", \"label\");\n this.getElement().appendChild(label.getElement());\n return label;\n }", "private Label createTitle() {\n Label titleLbl = new Label(\"Tank Royale\");\n titleLbl.setFont(Font.loadFont(getClass().getResourceAsStream(\"/resources/fonts/ToetheLineless.ttf\"), 50));\n titleLbl.setPrefWidth(400);\n titleLbl.setLayoutX(545 - titleLbl.getWidth() - 157);\n titleLbl.setLayoutY(125);\n return titleLbl;\n }", "private void generateLabelPanel() {\n speedLabel = new JLabel(\"\");\n loopbackLabel = new JLabel(\"\");\n playingLabel = new JLabel(\"\");\n\n JPanel labelPanel = new JPanel();\n labelPanel.setLayout(new FlowLayout());\n labelPanel.add(playingLabel);\n labelPanel.add(Box.createHorizontalStrut(50));\n labelPanel.add(speedLabel);\n labelPanel.add(Box.createHorizontalStrut(50));\n labelPanel.add(loopbackLabel);\n mainPanel.add(labelPanel);\n }", "private GLabel makeLabel(String labelString, GRect labelRect) {\r\n\t\tGLabel label = new GLabel(labelString);\r\n\t\tint labelXPadding = ((int) labelRect.getWidth() - (int) label.getWidth()) / 2;\r\n\t\tint labelYPadding = ((int) labelRect.getHeight() + (int) label.getAscent()) / 2;\r\n\t\tlabel.setLocation(labelRect.getX() + labelXPadding, labelRect.getY() + labelYPadding);\r\n\t\treturn label;\r\n\t}", "public LabelFactory() {\n this(0);\n }", "public MyGUIProgram() {\n Label MyLabel = new Label(\"Test string.\", Label.CENTER);\n this.add(MyLabel);\n\n }", "public Label newLabel(String labelStr, int options) {\r\n return newLabel(labelStr);\r\n }", "public static LabelTarget label() { throw Extensions.todo(); }", "public CustomLabel(String text){\n setHorizontalAlignment(JLabel.LEFT);\n Font font = new Font(\"Bold\", Font.BOLD, 20);\n setFont(font);\n setText(\" \" + text);\n }", "Label getLabel();", "Label getLabel();", "Label getLabel();", "public LLabel() {\n this(\"\");\n }", "public Button(final String textLabel) {\n label = new Label(textLabel);\n label.setHorizontalAlignment(HorizontalAlignment.CENTRE);\n label.setVerticalAlignment(VerticalAlignment.MIDDLE);\n label.setBackgroundColour(Color.GRAY);\n label.setOpaque(true);\n }", "protected JLabel makeLabel(String s) {\n JLabel label = new JLabel(s);\n label.setFont(new Font(QuizAppUtilities.UI_FONT, Font.PLAIN, 16));\n\n return label;\n }", "public HTMLLabel() {\n this(null);\n }", "public Label() {\n\t\tthis(\"L\");\n\t}", "public static ComponentBuilder<?, ?> createCustomTitleComponent(String label) {\n\n StyleBuilder bold12CenteredStyle = stl.style(boldStyle).setFontSize(12);\n StyleBuilder bold16CenteredStyle = stl.style(boldStyle).setFontSize(16).setForegroundColor(new Color(0, 0, 0));\n //StyleBuilder italicStyle = stl.style(rootStyle).italic();\n ComponentBuilder<?, ?> logoComponent = cmp.verticalList(\n //cmp.image(Templates.class.getResource(\"/logopalm.png\")).setFixedDimension(150, 60),\n cmp.text(label).setStyle(bold16CenteredStyle).setHorizontalAlignment(HorizontalAlignment.CENTER) \n );\n return logoComponent;\n }", "public WidgetLabelPanel(String labelText, Widget widget){\n\t\tsuper();\n\t\tthis.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);\n\t\tLabel myLabel = new Label(labelText);\n\t\tmyLabel.addStyleName(\"widgetLabel\");\n\t\tthis.add(myLabel);\n\t\tthis.add(widget);\n\t}", "private Label createInitializingLabel(Composite parent)\n\t{\n\t\tLabel initializingMessageLabel = new Label(parent, SWT.NONE);\n\t\tinitializationFont = new Font(Display.getDefault(), new FontData(\"Arial\", 20,\n\t\t\t\tSWT.BOLD));\n\t\tinitializingMessageLabel.setFont(initializationFont);\n\t\tinitializingMessageLabel\n\t\t\t\t.setText(\"iDocIt! is initializing at the moment. Please wait ...\");\n\t\tinitializingMessageLabel.setBackground(Display.getDefault().getSystemColor(\n\t\t\t\tSWT.COLOR_WHITE));\n\t\tGridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).grab(true, true)\n\t\t\t\t.applyTo(initializingMessageLabel);\n\n\t\treturn initializingMessageLabel;\n\t}", "public static JLabel newFormLabel(String text) {\n JLabel label = newLabel(text);\n label.setHorizontalAlignment(SwingConstants.RIGHT);\n label.setForeground(label.getForeground().brighter());\n return label;\n }", "public JLabel getJLabel(String txt) {\r\n\t\treturn new JLabel(txt);\r\n\t}", "protected Label newLabel(String id, IModel<String> model) {\n\t\tLabel label = new Label(id, model);\n\t\treturn label;\n\t}", "private void createLabels() {\n addLabels(\"Dog Name:\", 160);\n addLabels(\"Weight:\", 180);\n addLabels(\"Food:\", 200);\n }", "public static LabelTarget label(String name) { throw Extensions.todo(); }", "private void criaLabel(String nome, int eixoY) {\r\n\t\tJLabel nova = new JLabel(nome);\r\n\t\tnova.setFont(new Font(\"Arial\", Font.PLAIN, 14));\r\n\t\tnova.setForeground(Color.BLACK);\r\n\t\tnova.setBounds(28, eixoY, 70, 14);\r\n\t\tpainelPrincipal.add(nova);\r\n\t}", "String addLabel(String label);", "private Widget getLabel(String text, final List defList) {\n Image newField = getNewFieldButton(defList);\n\n HorizontalPanel h = new HorizontalPanel();\n h.add(new SmallLabel(text)); h.add(newField);\n return h;\n\t}", "public static HorizontalLayoutContainer FuncLabelToolItem(String textHtml) {\n\t\tSafeHtml labelHtml = SafeHtmlUtils.fromTrustedString(\"<left><font color='#909090' style='font-size:24px;font-weight:bold;'>\"+ textHtml +\"</font>\");\r\n\t\tLabelToolItem labelToolItem = new LabelToolItem(labelHtml);\r\n//\t\tlabelToolItem.setSize(\"200\", \"130\");\r\n//\t\tlabelToolItem.setLayoutData(new Margins(200, 0, 0, 0));\r\n\r\n\t\tHorizontalLayoutContainer hlc = new HorizontalLayoutContainer();\r\n\t\tHorizontalLayoutData hld = new HorizontalLayoutData();\r\n\t\tMargins margins = new Margins();\r\n\t\tmargins.setTop(60);\r\n\t\thld.setMargins(margins);\r\n\t\thlc.setWidth(210);\r\n\t\thlc.setHeight(134);\r\n\t\thlc.add(labelToolItem, hld);\r\n\t\t\r\n\t\treturn hlc;\r\n\t}", "private Label createScoreLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"Score:\",textStyle);\n text.setAlignment(Align.center);\n text.setFontScale(2f*scale,2f*scale);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.70f);\n return text;\n }", "private JLabel makeLabel(String title, boolean h1) {\n JLabel label = new JLabel(title);\n if (h1 == true) {//if the label is to be a title\n label.setForeground(themeColor);\n label.setFont(new Font(\"Terminal Bold\", Font.PLAIN, 48));\n } else {\n label.setFont(new Font(\"Terminal Bold\", Font.PLAIN, 25));\n label.setForeground(Color.white);\n }\n return label;\n\n }", "public Label create() {\n\t\t\tgeneratedValue += 1;\n\t\t\treturn new Label(Type.GENERATED, generatedValue);\n\t\t}", "public static JPanel createLabelPanel(String text) {\n JPanel lbl_pnl = new JPanel();\n lbl_pnl.setOpaque(false);\n JLabel id_lbl = new JLabel(text);\n id_lbl.setFont(Constants.LINK_FONT_BOLD);\n lbl_pnl.add(id_lbl);\n return lbl_pnl;\n }", "public TextWithLabel(Context context, AttributeSet attrs)\r\n {\r\n \r\n // Call the super class constructor to create a basic Textbox: \r\n super(context, attrs);\r\n \r\n // Generate new TextView for the label: \r\n labelView = new TextView(context, attrs);\r\n \r\n // Get custom attributes from XML file:\r\n getCustomAttributes(attrs);\r\n\r\n \r\n /**** Set some attributes: **********************\r\n * Could add more attributes?\r\n ************************************************/\r\n labelView.setTextSize(android.util.TypedValue.COMPLEX_UNIT_PT, labelSize);\r\n labelView.setGravity( android.view.Gravity.RIGHT );\r\n \r\n /**** Set text colour... ************************/\r\n //Resources res = getResources();\r\n //int color = res.getColor(R.color.normal_text);\r\n //labelView.setTextColor(color);\r\n //itemView.setTextColor(color);\r\n \r\n // Add the new text boxes to this layout: \r\n addView(labelView);\r\n \r\n }", "void setLabel(Label label);", "public void\nsetNewLabel()\nthrows Exception\n{\n\tdouble lineLength = this.getNucLabelLineLength();\n\tif (lineLength <= 0.0)\n\t\tlineLength = ComplexDefines.NUCLABEL_LINE_LENGTH;\n\tthis.setNewLabel(\n\t\tnew Font(\"Helvetica\", Font.PLAIN, 12),\n\t\tthis.getParentSSData2D().getNucLabelLineWidth(),\n\t\tlineLength, Color.black, this.getID());\n}", "private JLabel getTitleLabel(String txt) {\r\n\t\tif(lblTitle == null) {\r\n\t\t\tlblTitle = new JLabel(txt);\r\n\t\t\tlblTitle.setHorizontalAlignment(JLabel.CENTER);\r\n\t\t\tlblTitle.setFont(new Font(\"Segoe UI\", 0, 20));\r\n\t\t}\r\n\t\treturn lblTitle;\r\n\t}", "public JLabel addLabel(String texte) {\n JLabel label = new JLabel(texte);\n simplePanel.add(label);\n return label;\n }", "private Label initGridLabel(GridPane container, DraftKit_PropertyType labelProperty, String styleClass, int col, int row, int colSpan, int rowSpan) {\n Label label = initLabel(labelProperty, styleClass);\n container.add(label, col, row, colSpan, rowSpan);\n return label;\n }", "public Label(float x, float y, String text) {\n super(x, y);\n this.text = text;\n this.fontSize = DEFAULT_FONT_SIZE;\n this.font = DEFAULT_FONT;\n this.type = GraphicsObjectType.LABEL;\n }", "public static JButton createLabelButton(String text) {\n JButton but = createButton(text);\n but.setBorderPainted(false);\n but.setHorizontalAlignment(SwingConstants.LEFT);\n but.setFocusPainted(false);\n but.setMargin(new Insets(0, 0, 0, 0));\n but.setBorder(null);\n return but;\n }", "private JLabel makeJLabel(String title, int x, int y, int width, int height) {\r\n JLabel label = new JLabel(title);\r\n label.setBounds(x, y, width, height);\r\n return label;\r\n }", "public void setLabel( String label )\n { \n this.label = label;\n show_text();\n }", "private void createGrpLabel() {\n\n\t\tgrpLabel = new Group(grpPharmacyDetails, SWT.NONE);\n\t\tgrpLabel.setText(\"Preview of Label\");\n\t\tgrpLabel.setBounds(new Rectangle(390, 40, 310, 230));\n\t\tgrpLabel.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\n\t\tcanvasLabel = new Canvas(grpLabel, SWT.NONE);\n\t\tcanvasLabel.setBounds(new org.eclipse.swt.graphics.Rectangle(12, 18,\n\t\t\t\t285, 200));\n\t\tcanvasLabel.setBackground(ResourceUtils.getColor(iDartColor.WHITE));\n\t\tcreateCanvasBorders();\n\n\t\tlblCanvasPharmName = new Label(canvasLabel, SWT.NONE);\n\t\tlblCanvasPharmName.setText(\"Facility Name\");\n\t\tlblCanvasPharmName.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblCanvasPharmName.setBackground(ResourceUtils\n\t\t\t\t.getColor(iDartColor.WHITE));\n\t\tlblCanvasPharmName.setBounds(5, 6, 273, 20);\n\t\tlblCanvasPharmName\n\t\t.setFont(ResourceUtils.getFont(iDartFont.VERASANS_10));\n\t\tlblCanvasPharmName.setAlignment(SWT.CENTER);\n\n\t\tlblCanvasPharmacist = new Label(canvasLabel, SWT.NONE);\n\t\tlblCanvasPharmacist.setText(\"Pharmacist\");\n\t\tlblCanvasPharmacist\n\t\t.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblCanvasPharmacist.setBackground(ResourceUtils\n\t\t\t\t.getColor(iDartColor.WHITE));\n\t\tlblCanvasPharmacist.setBounds(5, 27, 273, 20);\n\t\tlblCanvasPharmacist.setFont(ResourceUtils\n\t\t\t\t.getFont(iDartFont.VERASANS_10));\n\t\tlblCanvasPharmacist.setAlignment(SWT.CENTER);\n\n\t\tlblCanvasAddress = new Label(canvasLabel, SWT.NONE);\n\t\tlblCanvasAddress.setText(\"Physical Address\");\n\t\tlblCanvasAddress.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblCanvasAddress\n\t\t.setBackground(ResourceUtils.getColor(iDartColor.WHITE));\n\t\tlblCanvasAddress.setBounds(5, 49, 273, 20);\n\t\tlblCanvasAddress.setFont(ResourceUtils.getFont(iDartFont.VERASANS_10));\n\t\tlblCanvasAddress.setAlignment(SWT.CENTER);\n\n\t}", "@Override\n\t\tpublic void addLabel(Label label) {\n\n\t\t}", "private void createNodeLabel(NodeAppearanceCalculator nac) {\r\n\t PassThroughMapping passThroughMapping = new PassThroughMapping(\"\",\r\n\t ObjectMapping.NODE_MAPPING);\r\n\t \r\n\t // change canonicalName to Label\r\n//\t passThroughMapping.setControllingAttributeName\r\n//\t (\"canonicalName\", null, false);\r\n\t passThroughMapping.setControllingAttributeName\r\n// (Semantics.LABEL, null, false);\r\n\t (Semantics.CANONICAL_NAME, null, false);\r\n\t\r\n\t GenericNodeLabelCalculator nodeLabelCalculator =\r\n\t new GenericNodeLabelCalculator(\"SimpleBioMoleculeEditor ID Label\"\r\n\t , passThroughMapping);\r\n\t nac.setNodeLabelCalculator(nodeLabelCalculator);\r\n\t }", "public void setLabel(String label) {\n this.label = label;\n }", "private void createLabels(){\n int pos = 10;\n for(Client client : clients){\n JLabel clientLabel = new JLabel(client.toString());\n selectColor(clientLabel, client);\n clientLabel.setBounds(10, pos, 200,20);\n pos += 25;\n labels.put(client.getID(), clientLabel);\n panel.add(clientLabel);\n }\n }", "public Builder setLabel(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n label_ = value;\n onChanged();\n return this;\n }", "DepartureBox(Label label)\n {\n label.getStyleClass().add(\"stopover-label\");\n getStyleClass().addAll(\"bordered-pane\", \"white-background\");\n getChildren().add(label);\n layoutControls();\n addEventHandlers();\n }", "void setLabel(String label);", "public void setLabel( String label ) {\r\n lbl = label;\r\n }", "public Label(String c, int x, int y, int w, int h) {\n\t\tlabel = c;\n\t\t\n\t\tcomponent_x = x;\n\t\tcomponent_y = y;\n\t\tcomponent_width = w;\n\t\tcomponent_height = h;\n\t}", "public static JLabel createLabelStripe(String cap) {\n JLabel label = new JLabel(cap, SwingConstants.CENTER);\n label.setOpaque(true);\n label.setForeground(Color.white);\n label.setBackground(Color.gray);\n return label;\n }", "public static LabelTarget label(Class type, String name) { throw Extensions.todo(); }", "public void setLabelText(String text);", "java.lang.String getLabel();", "public static LabelTarget label(Class type) { throw Extensions.todo(); }", "private void createTextFieldLabels() {\n // initialize empty textfield\n this.name = new TextField();\n this.id = new TextField();\n this.fiber = new TextField();\n this.calories = new TextField();\n this.fat = new TextField();\n this.carbohydrate = new TextField();\n this.protein = new TextField();\n // initialize labels\n this.nameLabel = new Label(\"Name:\");\n this.idLabel = new Label(\"ID:\");\n this.fiberLabel = new Label(\"Fiber:\");\n this.caloriesLabel = new Label(\"Calories:\");\n this.fatLabel = new Label(\"Fat:\");\n this.carbohydrateLabel = new Label(\"Carbohydrate:\");\n this.proteinLabel = new Label(\"Protein:\");\n }", "public void createLabels()\n {\n title = new JLabel(\"Game Over\");\n title.setForeground(Color.RED);\n title.setFont(new Font(title.getFont().getName(), Font.PLAIN, 42));\n title.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n roundLabel = new JLabel(\"CPU was infected on round \"+roundLost);\n roundLabel.setForeground(Color.RED);\n roundLabel.setFont(new Font(title.getFont().getName(), Font.PLAIN, 18));\n roundLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n }", "@Override\r\n\tprotected void onInitialize() {\n\t\tsuper.onInitialize();\r\n\t\tadd(new MultiLineLabel(LABEL_ID, LABEL_TEXT));\r\n\t}", "public abstract void addLabel(String str);", "private void _initLabels() \n {\n _lblName = _createNewLabel( \"Mother Teres@ Practice Management System\");\n _lblVersion = _createNewLabel(\"Version 1.0.1 (Beta)\");\n _lblAuthor = _createNewLabel( \"Company: Valkyrie Systems\" );\n _lblRealAuthor = _createNewLabel( \"Author: Hein Badenhorst\" );\n _lblDate = _createNewLabel( \"Build Date:\" );\n _lblRealDate = _createNewLabel( \"31 October 2010\");\n }", "public abstract Code addLabel(String label);", "public SimpleNodeLabel() {\n super();\n }", "String getLabel();", "String getLabel();", "public BLabel(String text, Position align)\n {\n component = createComponent(text, null);\n setAlignment(align);\n }", "public void setLabel(String label) {\r\n this.label = label;\r\n }", "private IMessageLabel buildLabel(final MessageSeverity severity) {\n return new MessageLabel(AppMessageKey.VIEW_MESSAGE_LABEL_TEXT,\n severity, severity);\n }", "public LabeledText(String label) {\n\t\tthis(new RegexMatcher(label + \"\\\\**\"));\n\t}", "private void crearLabels(){\n\t\tJLabel label = new JLabel(\" USER \");\n\t\tuser = new JTextField(15);\n\t\tthis.getContentPane().add(label);\n\t\tthis.getContentPane().add(user);\n\t\tJLabel label1 = new JLabel(\"PASSWORD\");\n\t\tpassword = new JPasswordField(15);\n\t\tthis.getContentPane().add(label1);\n\t\tthis.getContentPane().add(password);\n\t}", "private JLabel createResultLabel() {\r\n JLabel resultLabel = new JLabel(\"Result\");\r\n resultLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n resultLabel.setBorder(new EmptyBorder(8, 8, 8, 8));\r\n setResultLabelText(resultLabel);\r\n resultLabel.setFont(new Font(null, Font.BOLD, 30));\r\n return resultLabel;\r\n }", "public static LabelExpression label(LabelTarget labelTarget) { throw Extensions.todo(); }", "public static Labels build() {\n\t\treturn new Labels(new ArrayMixedObject());\n\t}", "public void createControl(Composite parent) {\r\n\t\tComposite container = new Composite(parent, SWT.NULL);\r\n\r\n\t\tsetControl(container);\r\n\t\tcontainer.setLayout(new GridLayout(2, false));\r\n\r\n\t\tLabel lblNewLabel = new Label(container, SWT.NONE);\r\n\t\tlblNewLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false,\r\n\t\t\t\tfalse, 1, 1));\r\n\t\tlblNewLabel.setText(\"Package:\");\r\n\r\n\t\ttext = new Text(container, SWT.BORDER);\r\n\t\ttext.addModifyListener(this);\r\n\t\ttext.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\r\n\t\tGroup grpAutoCreate = new Group(container, SWT.NONE);\r\n\t\tgrpAutoCreate.setText(\"auto create\");\r\n\t\tgrpAutoCreate.setLayout(new GridLayout(1, false));\r\n\t\tgrpAutoCreate.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,\r\n\t\t\t\tfalse, 2, 1));\r\n\r\n\t\tSelectionAdapter sa = new SelectionAdapter() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tButton b = (Button) e.getSource();\r\n\t\t\t\tInteger index = (Integer) b.getData(\"index\");\r\n\t\t\t\tselectionStats[index] = b.getSelection();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfor (int i = 0; i < chkBtns.length; i++) {\r\n\t\t\tButton b = chkBtns[i] = new Button(grpAutoCreate, SWT.CHECK);\r\n\t\t\tb.setSelection(selectionStats[i]);\r\n\t\t\tb.setText(baseFileNames[i]);\r\n\t\t\tb.setData(\"index\", i);\r\n\t\t\tb.addSelectionListener(sa);\r\n\t\t}\r\n\t}", "void addLabel(Object newLabel);", "void addLabel(Object newLabel);", "public ComponentBuilder<?, ?> createTitleComponent(String label) {\r\n\t\treturn cmp.horizontalList()\r\n\t\t\t\t.add(dynamicReportsComponent,\r\n\t\t\t\t\t\tcmp.text(label).setStyle(normal12LeftStyle)\r\n\t\t\t\t\t\t\t\t.setHorizontalTextAlignment(HorizontalTextAlignment.LEFT))\r\n\t\t\t\t.newRow().add(cmp.line()).newRow().add(cmp.verticalGap(10));\r\n\t}", "@Override\n\tpublic JComponent createWithAlignment(String text,String font, int x, int y, int w, int h,int Alignment) {\n\t\tJLabel label = new JLabel(text);\n\t\tlabel.setHorizontalAlignment(Alignment);\n\t label.setBounds(x,y,w,h);\n\t return label;\n\t}", "public Field label(String label);", "ReadOnlyStringProperty labelProperty();", "private Label createIcon(String name) {\n Label label = new Label();\n Image labelImg = new Image(getClass().getResourceAsStream(name));\n ImageView labelIcon = new ImageView(labelImg);\n label.setGraphic(labelIcon);\n return label;\n }", "private void initializeLabels() {\n labelVertexA = new Label(\"Vertex A\");\n labelVertexB = new Label(\"Vertex B\");\n labelVertexA.setTextFill(Color.web(\"#ffffff\"));\n labelVertexB.setTextFill(Color.web(\"#ffffff\"));\n }", "private JLabel makeText(String text, Font font) {\n JLabel label = new JLabel(text, JLabel.CENTER);\n label.setFont(font);\n label.setForeground(RRConstants.BORDER_COLOR);\n return label;\n }", "private void makeLabels() {\n infoPanel = new JPanel();\n\n infoText = new JTextArea(30,25);\n\n infoPanel.add(infoText);\n }", "public SimpleNodeLabel(String text, JGoArea parent) {\n super(text);\n mParent = parent;\n initialize(text, parent);\n }", "private void setupLabelUI(Label l, String ff, double f, double w, Pos p, double x, double y) {\n\t\tl.setFont(Font.font(ff, f));\n\t\tl.setMinWidth(w);\n\t\tl.setAlignment(p);\n\t\tl.setLayoutX(x);\n\t\tl.setLayoutY(y);\n\t}", "public String getLabelText();", "private String makeLabel(String label)\n {\n \treturn label + \"$\" + Integer.toString(labelCount++);\n }" ]
[ "0.81468254", "0.75340366", "0.7531787", "0.7399858", "0.72531", "0.72362477", "0.71577555", "0.7091153", "0.70452505", "0.6966546", "0.69219464", "0.69051534", "0.6894793", "0.6856519", "0.68432117", "0.68277186", "0.6798882", "0.6790861", "0.6766715", "0.67342126", "0.67247957", "0.67247957", "0.67247957", "0.66947544", "0.6668604", "0.66532564", "0.6647119", "0.66258025", "0.65995306", "0.65827274", "0.6579088", "0.6576695", "0.6550231", "0.65298307", "0.65272796", "0.65224004", "0.6521116", "0.652039", "0.6507545", "0.65074545", "0.64994276", "0.6479077", "0.64671284", "0.6447514", "0.6447193", "0.64223725", "0.64188457", "0.64042354", "0.6395652", "0.63883716", "0.63444483", "0.63390994", "0.6324854", "0.63085043", "0.6307835", "0.63001823", "0.6290304", "0.6281248", "0.62783676", "0.6266349", "0.625716", "0.62570614", "0.6244827", "0.62215865", "0.62128186", "0.6211417", "0.6207092", "0.6201586", "0.6186011", "0.61831635", "0.61776924", "0.617272", "0.6170559", "0.6169858", "0.61601806", "0.61573726", "0.61565876", "0.61565876", "0.6140669", "0.61382455", "0.61310136", "0.61218303", "0.6119245", "0.61183393", "0.61164886", "0.61146873", "0.61121273", "0.6111837", "0.6111837", "0.61063373", "0.6104429", "0.6099544", "0.6097658", "0.60957855", "0.60894287", "0.60885376", "0.6085571", "0.60849303", "0.6083739", "0.6079114", "0.60736924" ]
0.0
-1
Instantiates a new class comment plugin.
public ClassCommentPlugin() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Comment () {\n init();\n }", "public Comment() {\n\n }", "public Comments() {\n this(\"comments\", null);\n }", "Comment createComment();", "public ContactedUsComments() {\r\n }", "public DemoPluginFactory() {}", "private void addComment() {\r\n Editor classEditor = null;\r\n try {\r\n classEditor = curClass.getEditor();\r\n } catch (Exception e) {\r\n }\r\n if (classEditor == null) {\r\n System.out.println(\"Can't create Editor for \" + curClass);\r\n return;\r\n }\r\n\r\n int textLen = classEditor.getTextLength();\r\n TextLocation lastLine = classEditor.getTextLocationFromOffset(textLen);\r\n lastLine.setColumn(0);\r\n // The TextLocation now points before the first character of the last line of the current text\r\n // which we'll assume contains the closing } bracket for the class\r\n classEditor.setText(lastLine, lastLine, \"// Comment added by SimpleExtension\\n\");\r\n }", "public CompletionProvider createCommentCompletionProvider() {\n\t\tDefaultCompletionProvider cp = new DefaultCompletionProvider();\n\t\tcp.addCompletion(new BasicCompletion(cp, \"TODO:\", \"A to-do reminder\"));\n\t\tcp.addCompletion(new BasicCompletion(cp, \"FIXME:\", \"A bug that needs to be fixed\"));\n\t\treturn cp;\n\t}", "void create(Comment comment);", "public CommentExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public Comment() {\n\t\tthis._id = UUID.randomUUID();\n\t\tthis.timestamp = System.currentTimeMillis();\n\t}", "public static CommentFragment newInstance() {\n CommentFragment fragment = new CommentFragment();\n\n return fragment;\n }", "public ClassTemplate() {\n\t}", "public Comment createComment(String data, Element parent);", "public AbstractPlugin() { }", "@SuppressWarnings(\"unused\")\n public Comment() {\n edited = false;\n }", "public Comments(String alias) {\n this(alias, COMMENTS);\n }", "@Override\n\t/**\n\t * does nothing because comments are disabled for classes \n\t * \n\t * @param c\n\t */\n\tpublic void setComment(String c) {\n\t}", "public VjComment(VjCommentTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 0; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "public DiagramCreation(String name,String type,String prNm,String childClName) {\n this(name,type,prNm,childClName,ElementTypes.COMMENT,\"\");\n }", "private CommentDAO() {\n\n\t}", "@Function Comment createComment(String data);", "public XWikiPatch()\n {\n }", "public GoodsCommentExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "public NsdlRepositoryWriterPlugin() { }", "private Comment createSimpleComment(String content) {\n Comment comment = new Comment();\n comment.setContent(content);\n return comment;\n }", "private ICommentedElement createCommented() throws RodinDBException {\n\t\treturn createMachine(\"mch\");\n\t}", "void createCommentWithAllSingleFileComments(String string);", "public ModuleSnippet(String className) {\n super();\n this.className = className;\n moduleClass = findClass(className);\n if (moduleClass != null) {\n Exception exception = isModule(moduleClass);\n if (exception == null) {\n try {\n defaultConstructor = moduleClass.getConstructor((Class[]) null);\n } catch (NoSuchMethodException e) {\n defaultConstructor = null;\n }\n try {\n setDefaultConstructor();\n } catch (Exception e) {\n defaultConstructor = null;\n }\n } else {\n problems.add(new InvalidModuleProblem(className,exception));\n defaultConstructor = null;\n }\n }\n }", "public Note() {\n }", "public PushPluginConfigurationImpl() {\n }", "private PluginAPI() {\r\n\t\tsuper();\r\n\t}", "@Override\n\t/**\n\t * returns false because comments are disabled for classes\n\t * \n\t * @return false \n\t */\n\tpublic boolean hasComment() {\n\t\treturn false;\n\t}", "@Override\n\t/**\n\t * returns false because comments are disabled for classes\n\t * \n\t * @return false \n\t */\n\tpublic boolean isComment() {\n\t\treturn false;\n\t}", "public DiscoveryExtension() {\n }", "private Solution() {\n /**.\n * { constructor }\n */\n }", "public JCYDocument() {}", "public Comment(String data) {\n value = data;\n }", "Comment getBase_Comment();", "public CommentToken(String str, int col, int sub, boolean pseudo)\n /**********************************************************************\n * The constructor for this class. The third argument specifies the *\n * rsubtype. The fourth argument is true iff this comment is ended *\n * by the beginning of a PlusCal algorithm or begun by the end of a *\n * PlusCal algorithm. In either case, two delimiter characters that *\n * normally would have been deleted weren't. *\n **********************************************************************/\n { type = Token.COMMENT; \n column = col ;\n string = str;\n rsubtype = sub;\n subtype = 0 ;\n switch (rsubtype)\n { case NORMAL : delimiters = pseudo?2:4;\n break;\n case LINE :\n case BEGIN_OVERRUN :\n case END_OVERRUN : delimiters = pseudo?0:2;\n break ;\n\n case OVERRUN : break ;\n default : Debug.ReportBug(\n \"CommentToken constructor called with illegal subtype\"\n );\n } ;\n\n }", "public ConfigMetadataProcessor() {\n }", "static Plugin newInstance(String simpleClassName) throws Exception {\n final String className = Plugin.class.getPackageName() + \".\" + simpleClassName;\n return (Plugin) Class.forName(className).getDeclaredConstructor().newInstance();\n }", "public XMLPartitionScanner() {\n\n IToken xmlComment = new Token(XML_COMMENT);\n IToken tag = new Token(XML_TAG);\n\n IPredicateRule[] rules = new IPredicateRule[2];\n\n rules[0] = new MultiLineRule(\"<!--\", \"-->\", xmlComment);\n rules[1] = new TagRule(tag);\n\n setPredicateRules(rules);\n }", "public interface CommentGenerator {\n\n void addConfigurationProperties(Properties properties);\n\n void addFieldComment(Field field, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn);\n\n void addFieldComment(Field field, IntrospectedTable introspectedTable);\n\n void addClassComment(JavaElement element, IntrospectedTable introspectedTable);\n\n void addDataServiceComment(JavaElement element, IntrospectedTable introspectedTable);\n\n void addClassAnnotation(JavaElement element);\n\n void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable, boolean markAsDoNotDelete);\n\n void addEnumComment(InnerEnum innerEnum, IntrospectedTable introspectedTable);\n\n void addGeneralMethodComment(Method method, IntrospectedTable introspectedTable);\n\n void addDataServiceSaveMethodComment(Method method, IntrospectedTable introspectedTable);\n\n void addDataServiceQueryMethodComment(Method method, List<IntrospectedColumn> introspectedColumns, IntrospectedTable introspectedTable);\n\n void addGetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn);\n\n void addSetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn);\n\n void addJavaFileComment(CompilationUnit compilationUnit);\n\n void addComment(XmlElement xmlElement);\n\n void addRootComment(XmlElement rootElement);\n\n}", "public CommentsManipulationTest(String aName) {\n super(aName);\n }", "private Notes() {}", "private Instantiation(){}", "@Test\n public final void testGetXPathWithCommentProlog() {\n \n Document testDoc = TestDocHelper.createDocument(\n \"<!-- comment --><a>text</a>\");\n \n //Move to beforeclass method\n XPathFactory xPathFac = XPathFactory.newInstance();\n XPath xpathExpr = xPathFac.newXPath();\n \n testXPathForNode(testDoc, xpathExpr);\n \n }", "public CommunicationCommentsAdapter(ArrayList<Comment> myDataset) {\n mDataset = myDataset;\n mImageLoader = Requester.getInstance().getImageLoader();\n }", "public Comment(String data, String baseUri) {\n this(data);\n }", "public PgClass() {\n this(DSL.name(\"pg_class\"), null);\n }", "public void testCtor_Accuracy2() {\n assertNotNull(\"Failed to create the action!\",\n new CutCommentAction(this.comment, Toolkit.getDefaultToolkit().getSystemClipboard()));\n }", "@Override\n\t/**\n\t * returns nothing because comments are disabled for classes\n\t * \n\t * @return nothing\n\t */\n\tpublic String getComment() {\n\t\treturn \"\";\n\t}", "public Doc() {\n\n }", "private ReportPluginConstant() {\n\t\t// NO_PMD DUMMY CONSTRUCTOR\n\t}", "public void testCtor_Accuracy1() {\n assertNotNull(\"Failed to create the action!\",\n new CutCommentAction(this.comment, null));\n }", "public void testCtor_CommentWithoutNamespace() {\n try {\n new CutCommentAction(new CommentImpl(), null);\n fail(\"IllegalArgumentException is expected!\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "public NullLoggerPlugin () { }", "@Override\r\n public void instantiate() {\r\n }", "@Override\n\tpublic void comment() {\n\t\t\n\t}", "public VjComment(java.io.InputStream stream, String encoding) {\n try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }\n token_source = new VjCommentTokenManager(jj_input_stream);\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 0; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "public void insert(Comment com){\n //@todo implement method\n }", "@Override\n public void onCommentsReceived(String comment, String URL) {\n\n }", "public AnnotationInfoImpl()\n {\n }", "public Comment(JSONObject json) {\n if (json == null)\n return;\n\n this.commentID = json.optInt(\"ID\");\n this.status = JSONUtil.getString(json, \"status\");\n\n // note that the content often contains html, and on rare occasions may contain\n // script blocks that need to be removed (only seen with blogs that use the\n // sociable plugin)\n this.comment = HtmlUtils.stripScript(JSONUtil.getString(json, \"content\"));\n\n java.util.Date date = DateTimeUtils.iso8601ToJavaDate(JSONUtil.getString(json, \"date\"));\n if (date != null)\n this.dateCreatedFormatted = ApiHelper.getFormattedCommentDate(WordPress.getContext(), date);\n\n JSONObject jsonPost = json.optJSONObject(\"post\");\n if (jsonPost != null) {\n this.postID = Integer.toString(jsonPost.optInt(\"ID\"));\n // c.postTitle = ???\n }\n\n JSONObject jsonAuthor = json.optJSONObject(\"author\");\n if (jsonAuthor!=null) {\n // author names may contain html entities (esp. pingbacks)\n this.name = JSONUtil.getStringDecoded(jsonAuthor, \"name\");\n this.authorURL = JSONUtil.getString(jsonAuthor, \"URL\");\n\n // email address will be set to \"false\" when there isn't an email address\n this.authorEmail = JSONUtil.getString(jsonAuthor, \"email\");\n if (this.authorEmail.equals(\"false\"))\n this.authorEmail = \"\";\n this.emailURL = this.authorEmail;\n\n this.profileImageUrl = JSONUtil.getString(jsonAuthor, \"avatar_URL\");\n }\n }", "public Comment(UUID targetId, String author, String content) {\n\t\tthis(); \n\t\tthis.targetId = targetId;\n\t\tthis.author = author;\n\t\tthis.content = content;\n\t}", "public PrologPartitionScanner() {\r\n\t\tsuper();\r\n\r\n\t\tIToken prologComment = new Token(PROLOG_COMMENT);\r\n\t\tIToken prologList = new Token(PROLOG_LIST);\r\n\r\n\t\tPrologListRule list = new PrologListRule(prologList);\r\n\t\tMultiLineRule comment = new MultiLineRule(\"/*\", \"*/\", prologComment,\r\n\t\t\t\t(char) 0, true);\r\n\t\tEndOfLineRule comment2 = new EndOfLineRule(\"%\", prologComment);\r\n\r\n\t\tIPredicateRule[] rules = new IPredicateRule[] { list, comment, comment2 };\r\n\t\tsetPredicateRules(rules);\r\n\t}", "public Node newComment(String comment) {\n this.e.appendChild(d.createComment(comment));\n return this;\n }", "@Override\n\t/**\n\t * does nothing because comments are disabled for classes \n\t */\n\tpublic void removedComment() {\n\t}", "private PluginsInternal() {}", "@Override\n public void comment(String comment)\n {\n }", "@Override\n\tprotected CloudBaseAdapter getAdapter() {\n\t\treturn new CommentsAdapter(ca(), mListData, mLoadingImages);\n\t}", "void createSingleFileComment(ChangedFile file, Integer line, String comment);", "public static Object createBeanshellPlugin(String srcContent, String pluginName) throws Exception\n {\n Class coreClass;\n Interpreter i;\n \n i = new Interpreter();\n \n try\n {\n System.out.println(i.eval(srcContent));\n \n String classname = pluginName;\n \n Class newPlugin = i.getNameSpace().getClass(classname);\n \n if( newPlugin != null )\n {\n Object newPluginObject = newPlugin.newInstance();\n \n return newPluginObject;\n }\n else\n {\n throw new Exception(\"Could not load new plugin.\");\n }\n }\n catch( bsh.EvalError e )\n {\n throw new Exception(\"Could not compile plugin \" + e.getMessage(), e);\n }\n catch( Exception e )\n {\n throw new Exception(\"Could not compile plugin \" + e.getMessage(), e);\n }\n }", "public final void mCOMMENT() throws RecognitionException {\r\n try {\r\n int _type = COMMENT;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:253:9: ( '/*' ( options {greedy=false; } : . )* '*/' )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:253:12: '/*' ( options {greedy=false; } : . )* '*/'\r\n {\r\n match(\"/*\"); \r\n\r\n\r\n\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:253:17: ( options {greedy=false; } : . )*\r\n loop1:\r\n do {\r\n int alt1=2;\r\n int LA1_0 = input.LA(1);\r\n\r\n if ( (LA1_0=='*') ) {\r\n int LA1_1 = input.LA(2);\r\n\r\n if ( (LA1_1=='/') ) {\r\n alt1=2;\r\n }\r\n else if ( ((LA1_1 >= '\\u0000' && LA1_1 <= '.')||(LA1_1 >= '0' && LA1_1 <= '\\uFFFF')) ) {\r\n alt1=1;\r\n }\r\n\r\n\r\n }\r\n else if ( ((LA1_0 >= '\\u0000' && LA1_0 <= ')')||(LA1_0 >= '+' && LA1_0 <= '\\uFFFF')) ) {\r\n alt1=1;\r\n }\r\n\r\n\r\n switch (alt1) {\r\n \tcase 1 :\r\n \t // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:253:45: .\r\n \t {\r\n \t matchAny(); \r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop1;\r\n }\r\n } while (true);\r\n\r\n\r\n match(\"*/\"); \r\n\r\n\r\n\r\n _channel = HIDDEN; \r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }", "public ClassBundle() {\n }", "public ClassInformation(String className, String filepath, int startPos, int endPos, final SourceContext sourceContext) {\n super(startPos, endPos, sourceContext);\n\n this.className = className;\n this.filepath = filepath;\n this.fields = new ArrayList<>();\n this.methodDeclarations = new ArrayList<>();\n this.comments = new ArrayList<>();\n }", "protected DPlugin()\n\t{\n\t\t//Instantiate the DLogger object.\n\t\tlog \t\t = new DLogger();\n\t\t//Instantiate the DStorage object.\n\t\tstorageHandler = new DStorage();\n\t}", "protected void pluginInitialize() {}", "public Builder setComments(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n comments_ = value;\n onChanged();\n return this;\n }", "private PreferencesModule() {\n }", "public static LabNotes newInstance() {\n LabNotes fragment = new LabNotes();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "ClassCcft initClassCcft(ClassCcft iClassCcft)\n {\n iClassCcft.updateElementValue(\"ClassCcft\");\n return iClassCcft;\n }", "private PitchParser() {\n\n }", "private Template() {\r\n\r\n }", "public MeaFlarf(JavaPlugin plugin){\n\t\tthis.plugin = plugin;\n\t}", "public Builder setComment(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000020;\n comment_ = value;\n onChanged();\n return this;\n }", "public ScriptDocumentation() {\n this(null, null, null);\n }", "@Override\n public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable, boolean b) {\n }", "public ComponentFactory(Class<T> annotationType, String classElement) {\n this(annotationType,\n classElement,\n (context, annotation) -> {\n },\n (constructor, args) -> Reflection.invoke(constructor).withArgs(args));\n }", "public Annotation(String className) {\n\t//\tthis.id = newId();\n\t\tthis.annotatonClassName = className;\n\t\tattributes = new HashSetValuedHashMap<String, String>();\n\t}", "private Conf() {\n // empty hidden constructor\n }", "@Test\n public void testSetComments_1()\n throws Exception {\n Project fixture = new Project();\n fixture.setWorkloadNames(\"\");\n fixture.setName(\"\");\n fixture.setScriptDriver(ScriptDriver.SilkPerformer);\n fixture.setWorkloads(new LinkedList());\n fixture.setComments(\"\");\n fixture.setProductName(\"\");\n String comments = \"\";\n\n fixture.setComments(comments);\n\n }", "public Comment(User user, String content, Critical critical){\n\t\tthis.User = user;\n\t\tthis.Date = new Date();\n\t\tthis.Content = content;\n\t\tthis.Critical = critical;\t\n\t}", "public ObjectClassDefinitionImpl() {\n\t\t// empty\n\t}", "@Override\n public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable) {\n }", "public CommentSteps() {\n\t\tthis.storeUserName = \"\";\n\t\tthis.storePostIds = new ArrayList<Integer>();\n\t\tthis.storeEmail = new HashSet<String>();\n\t\tthis.storeEndPoint=\"\";\n\t}", "public PSRelation()\n {\n }", "public AutoBundleClassCreatorProxy(Elements elementUtils, TypeElement classElement) {\n super(elementUtils, classElement);\n isActivity = ProcessorUtil.isActivity(classElement);\n }", "public PjxParser()\r\n {\r\n LOG.info(this + \" instantiated\");\r\n }" ]
[ "0.68254805", "0.66234654", "0.6060428", "0.60322994", "0.59286034", "0.5822423", "0.5786407", "0.5568378", "0.55682003", "0.5549591", "0.5545831", "0.5410533", "0.5375718", "0.5364023", "0.53561527", "0.5354694", "0.5345376", "0.5344995", "0.53448886", "0.5281605", "0.5270893", "0.52080286", "0.5200257", "0.51752293", "0.5171858", "0.51480925", "0.513218", "0.5107435", "0.5080638", "0.5061437", "0.5058891", "0.5056417", "0.504286", "0.5042109", "0.50348854", "0.50183743", "0.50181204", "0.50084096", "0.49902567", "0.49802402", "0.49791968", "0.4959519", "0.49407867", "0.49189734", "0.49165896", "0.49159798", "0.49010226", "0.487953", "0.48702386", "0.48564988", "0.48491868", "0.484363", "0.4840934", "0.4834474", "0.48184592", "0.48167896", "0.4803223", "0.48009786", "0.47951627", "0.47946036", "0.4790709", "0.47895676", "0.4782258", "0.47812858", "0.4777199", "0.47726247", "0.47654405", "0.47635645", "0.4763364", "0.47604537", "0.47511783", "0.47425985", "0.47405154", "0.47300792", "0.472835", "0.47246495", "0.47106403", "0.4701717", "0.4696744", "0.46945918", "0.46940133", "0.4683359", "0.46827003", "0.4678152", "0.4670265", "0.46696514", "0.46688902", "0.4661763", "0.46600187", "0.46575657", "0.46553048", "0.4653716", "0.46536893", "0.46509916", "0.46489733", "0.46425563", "0.46402526", "0.46393538", "0.46348813", "0.46343392" ]
0.8543091
0
Getters and Setters for Attributes
public String getPassengerName() { return passengerName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Attributes getAttributes();", "IAttributes getAttributes();", "public Attributes getAttributes() { return this.attributes; }", "private Attributes getAttributes()\r\n\t{\r\n\t return attributes;\r\n\t}", "@Override\npublic void setAttributes() {\n\t\n}", "public interface IAttributes {\n\n\t/***\n\t * Integer index of the attribute. Should be used with defined public static final int values.\n\t * Chosen because of better extensibility (an enum cannot extend another enum).\n\t * More specific object attribute definitions should extend the ObjectAttributesBase class in order\n\t * to have access to all derived attributes.\n\t * \n\t * @param attribute integer index of attribute\n\t * @return\n\t */\n\tObject getAttribute(int attribute);\n\t\n\tvoid setAttribute(int attribute, Object value);\n}", "Attribute createAttribute();", "Attribute createAttribute();", "Attribute getAttribute();", "@Override\n\tpublic Attributes getAttributes() {\n\t\treturn (Attributes)map.get(ATTRIBUTES);\n\t}", "@Override\r\n\tpublic Map<String, String> getAttributes() {\r\n\t\treturn this.attributes;\r\n\t}", "public java.util.Collection getAttributes();", "@Override\n public List<MappedField<?>> getAttributes() {\n return attributes;\n }", "public WSLAttributeList getAttributes() {return attributes;}", "public String getAttributes() {\n return attributes;\n }", "public String getAttributes() {\n return attributes;\n }", "public void setAttributes(Attributes attributes) {\n this.attributes = attributes;\n }", "public GenericAttribute getAttribute () {\n return attribute;\n }", "@Override\n public boolean isAttribute()\n {\n return attribute;\n }", "public List<GenericAttribute> getAttributes() {\n return attributes;\n }", "public Attr() {\n\t\t\tsuper();\n\t\t}", "public List<TLAttribute> getAttributes();", "public String getAttr() {\n return attr;\n }", "public String getAttributes() {\n\t\treturn getProperty(\"attributes\");\n\t}", "@Override\n\t\tpublic void addAttribute(String name, String value) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void addAttribute(String name, String value) {\n\t\t\t\n\t\t}", "void setAttributes(String attributeName, String attributeValue);", "String attributeToSetter(String name);", "public abstract Map<String, Object> getAttributes();", "TAttribute createTAttribute();", "public Attribute[] getAttributes()\n {\n return _attrs;\n }", "public List<Attribute> getAttributes() {\r\n return attributes;\r\n }", "public org.omg.uml.foundation.core.Attribute getAttribute();", "public String getAttributeName() {\n/* 85 */ return this.attributeName;\n/* */ }", "Map<String, Object> getAttributes();", "Map<String, Object> getAttributes();", "Map<String, Object> getAttributes();", "public String attribute() {\n return this.attribute;\n }", "Map<String, String> getAttributes();", "public boolean isAttribute() {\n\t\treturn false;\n\t}", "public abstract Map getAttributes();", "public interface Attribute {\n\n /**\n * The id of the attribute. This will be unique for all attributes in a\n * graph. However, if an attribute is removed from the graph, future\n * attributes may (and probably will) reuse this id.\n *\n * @return the id of the attribute.\n */\n public int getId();\n\n /**\n * Sets the id of this attribute.\n *\n * @param id the new id of this attribute.\n */\n public void setId(final int id);\n\n /**\n * Returns the element type that this attribute is associated with.\n *\n * @return the element type that this attribute is associated with.\n */\n public GraphElementType getElementType();\n\n /**\n * Sets the element type of this attribute.\n *\n * @param elementType the new element type of this attribute.\n */\n public void setElementType(final GraphElementType elementType);\n\n /**\n * The type of this attribute.\n * <p>\n * This is a String as returned by\n * {@link au.gov.asd.tac.constellation.graph.attribute.AttributeDescription#getName()}\n * from one of the registered AttributeDescription instances.\n *\n * @return The type of this attribute.\n */\n public String getAttributeType();\n\n /**\n * Sets the type of this attribute.\n *\n * @param attributeType the new type of the attribute.\n */\n public void setAttributeType(final String attributeType);\n\n /**\n * Return the name of the attribute. This name will be unique for all\n * attributes associated with the same element type in a graph. This is the\n * value that is presented to the user in the UI and the most common way in\n * which attributes are looked up in the graph.\n *\n * @return the name of the attribute.\n */\n public String getName();\n\n /**\n * Sets a new name for this attribute.\n *\n * @param name the new name for the attribute.\n * @see Attribute#getName()\n */\n public void setName(final String name);\n\n /**\n * Returns the description of an attribute. The description provides more\n * detailed information about the attribute such as how it is being used or\n * and constraints that should be observed.\n *\n * @return the description of an attribute.\n */\n public String getDescription();\n\n /**\n * Sets a new description of an attribute.\n *\n * @param description the new description of the attribute.\n * @see Attribute#getDescription()\n */\n public void setDescription(final String description);\n\n /**\n * Returns the current default value for this attribute. This is the value\n * that new elements will get when they are created.\n *\n * @return the current default value for this attribute.\n */\n public Object getDefaultValue();\n\n /**\n * Sets the new default value for this attribute. This will not change the\n * values of any existing elements but rather the value that new elements\n * will get given when they are created.\n *\n * @param defaultValue the new default value for the attribute.\n */\n public void setDefaultValue(final Object defaultValue);\n\n /**\n * Returns the class of the attribute description that defines this\n * attribute.\n *\n * @return the class of the attribute description that defines this\n * attribute.\n */\n public Class<? extends AttributeDescription> getDataType();\n\n /**\n * Sets the data type of this attribute.\n *\n * @param dataType the new datatype of this attribute.\n */\n public void setDataType(final Class<? extends AttributeDescription> dataType);\n\n /**\n * Returns the attribute merger for this attribute.\n *\n * @return the attribute merger for this attribute.\n */\n public GraphAttributeMerger getAttributeMerger();\n\n /**\n * Sets the attribute merger for this attribute.\n *\n * @param attributeMerger the attribute merger for this attribute.\n */\n public void setAttributeMerger(final GraphAttributeMerger attributeMerger);\n}", "default Attribute getAttribute(AttributeName attributeName) {return (Attribute) attributeName;}", "@Test\n public void testAttributeManagement() {\n Tag tag = new BaseTag(\"testtag\");\n String attributeName = \"testAttr\";\n String attributeValue = \"testValue\";\n tag.addAttribute(attributeName, attributeValue);\n assertEquals(\"Wrong attribute value returned\", attributeValue, tag.getAttribute(attributeName));\n assertNotNull(\"No attribute map\", tag.getAttributes());\n assertEquals(\"Wrong attribute map size\", 1, tag.getAttributes().size());\n assertEquals(\"Wrong attribute in map\", attributeValue, tag.getAttributes().get(attributeName));\n tag.removeAttribute(attributeName);\n assertNull(\"Attribute was not removed\", tag.getAttribute(attributeName));\n }", "@Override\n\t\tpublic void setAttribute(String name, Object value) {\n\t\t\t\n\t\t}", "protected abstract void createAttributes();", "boolean isAttribute();", "public void setAttrib(String name, String value);", "java.lang.String getAttribute();", "protected LPDMODOMAttribute() {\n }", "public java.lang.Integer getAttributes() {\r\n return attributes;\r\n }", "public abstract ImportAttributes getAttributes();", "public Map<String, Object> getAttributes();", "public Map<String, Object> getAttributes();", "public List<Attribute<?>> getAttributes() {\r\n\t\treturn Collections.unmodifiableList(attributes);\r\n\t}", "public List<Attribute> getAttributes() {\n return Collections.unmodifiableList(attributes);\n }", "public Map<String, Set<String>> getAttributes() {\n return attributes;\n }", "public Object[] getAttributes() {\n\t\treturn new Object[] {true}; //true for re-init... \n\t}", "public Map<String, String> getAttributes();", "@Override\r\n protected void parseAttributes()\r\n {\n\r\n }", "public Collection<HbAttributeInternal> attributes();", "public String getTagName()\n {\n return \"Attribute\";\n }", "public TLAttribute getAttribute(String attributeName);", "public int getAttribute() {\n return Attribute;\n }", "public final native JsArray<Attribute> getAttributes() /*-{\n\t\t\treturn this.attributes;\n\t\t}-*/;", "void setInt(int attributeValue);", "private Attribute createAttribute() {\n\t\t\tAttribute att = AttributeFactory.createAttribute(getName(), getValueType());\n\t\t\tatt.getAnnotations().clear();\n\t\t\tatt.getAnnotations().putAll(getAnnotations());\n\t\t\tattribute = att;\n\t\t\treturn att;\n\t\t}", "String attributeToGetter(String name);", "AdditionalAttributes setAttribute(String name, Object value, boolean force);", "@Override\n\tpublic AttributeMap getAttributes() {\n\t\treturn defaultEdgle.getAttributes();\n\t}", "public Attributes getAttributes() {\n\t\treturn null;\r\n\t}", "List<Attribute<T, ?>> getAttributes();", "protected abstract boolean populateAttributes();", "public Map<String, String> getAttributes() {\n\t\treturn attributes;\n\t}", "public List<Pair<String, String>> getAttributes() {\n\t\treturn attributes;\n\t}", "public List<GenericAttribute> getGenericAttributes () {\n return genericAttributes;\n }", "String getAttribute();", "public final String[] getAttributes() {\n return this.attributes;\n }", "protected abstract void bindAttributes();", "public void setAttributes (List<GenericAttribute> attributes) {\n this.attributes = attributes;\n }", "public TableAttributes getAttributes() {\n\treturn attrs;\n }", "@Override\r\n\t\tpublic boolean hasAttributes()\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}", "@Override\n public synchronized Set<AttributeType> getAttributes() {\n return attributes = nonNullSet(attributes, AttributeType.class);\n }", "public String getReadWriteAttribute();", "public Map<String, String> getAttributes() {\n\t\treturn atts;\n\t}", "public PersonAttributeType getAttributeType() {\n return attributeType;\n }", "public List<String> attributes() {\n return this.attributes;\n }", "ArrayList getAttributes();", "@Override\r\n\tpublic void addAttr(String name, String value) {\n\t}", "void setInternal(ATTRIBUTES attribute, Object iValue);", "public String getattribut() \n\t{\n\t\treturn attribut;\n\t}", "@Override\npublic void processAttributes() {\n\t\n}", "@Override\n\tpublic void setAttribute(String arg0, Object arg1, int arg2) {\n\n\t}", "public Object attribute(String name) {\n return Classes.getFieldValue(this, name);\n }", "@Override\r\n\tpublic Map<String, Object> getAttributes() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void setAttribute(String arg0, Object arg1) {\n\n\t}", "@Override\n\t\tpublic void setAttribute(String name, Object o) {\n\t\t\t\n\t\t}", "@GET\r\n\t@Path(\"/imageattribs\")\r\n\t@Produces(MediaType.APPLICATION_JSON)\r\n\tpublic ImageAttribute getAttribute() {\r\n\t\tString directoryPath = ROOT_PATH_ON_MAC + \"/\" + AuxiliaryHelper.loadServerProperties().getProperty(\"image.folder\") + \"/\" ;\r\n\t\tFile folder = new File(directoryPath);\r\n\t\tFile[] files = folder.listFiles();\r\n\t\tString name = \"\";\r\n\t\tlong space = 0l;\r\n\t\tif(files.length > 0) {\r\n\t\t\tname = files[0].getName();\r\n\t\t\tspace = files[0].getTotalSpace();\r\n\t\t}\r\n\t\tImageAttribute imageAttribute = new ImageAttribute();\r\n\t\timageAttribute.setName(name);\r\n\t\timageAttribute.setSize(space);\r\n\t\treturn imageAttribute;\r\n\r\n\t}", "public String getATTR_ID() {\n return ATTR_ID;\n }", "public interface Attributable extends Serializable {\n\n Map<String, Object> getAttrs();\n\n default void setAttrs(Map<String, Object> attrs) {\n if (attrs != null && attrs.size() > 0) {\n getAttrs().putAll(attrs);\n }\n }\n\n default <V> V getOrDefault(String key, V defaultValue) {\n V v = defaultValue;\n if (containsKey(key)) {\n v = getAttr(key);\n }\n return v;\n }\n\n @SuppressWarnings(\"unchecked\")\n default <V> V getAttr(String key) {\n return (V) getAttrs().get(key);\n }\n\n\n default void setAttr(String key, Object value) {\n getAttrs().put(key, value);\n }\n\n default void remove(String key) {\n getAttrs().remove(key);\n }\n\n default boolean containsKey(String key) {\n return getAttrs().containsKey(key);\n }\n\n default boolean containsValue(Object value) {\n return getAttrs().containsValue(value);\n }\n}", "public String getAttribute() {\n return attribute;\n }" ]
[ "0.7598491", "0.7425643", "0.7374517", "0.73148316", "0.7154219", "0.67746264", "0.6763137", "0.6763137", "0.67508924", "0.6745928", "0.6727113", "0.6695269", "0.66862565", "0.66829985", "0.6657862", "0.6657862", "0.66530466", "0.6645474", "0.66409934", "0.6620024", "0.6614378", "0.66143197", "0.6582604", "0.65732175", "0.65663964", "0.65663964", "0.6561786", "0.6541331", "0.6535122", "0.6527484", "0.65268856", "0.6514097", "0.65121496", "0.65080345", "0.6507291", "0.6507291", "0.6507291", "0.6498218", "0.6474957", "0.6465989", "0.6464905", "0.6436587", "0.643037", "0.63917774", "0.638938", "0.638595", "0.6382", "0.6375473", "0.6374572", "0.63743347", "0.63696223", "0.63418895", "0.6336301", "0.6336301", "0.63325065", "0.6320449", "0.63166714", "0.63145834", "0.6301849", "0.62968075", "0.6286402", "0.6285511", "0.6282159", "0.6271557", "0.62706006", "0.6254026", "0.6252554", "0.62480044", "0.6244551", "0.6242792", "0.62426114", "0.6240342", "0.6237791", "0.623631", "0.62297124", "0.62242043", "0.6215408", "0.620967", "0.6207885", "0.62035155", "0.6200812", "0.61986935", "0.61931527", "0.61658007", "0.6156459", "0.6154891", "0.6152213", "0.6146337", "0.6132847", "0.6128057", "0.6116088", "0.6110755", "0.610263", "0.6094837", "0.6092287", "0.6088408", "0.6083063", "0.6078409", "0.60737705", "0.6068376", "0.604624" ]
0.0
-1
Initial database creation/connection which includes table creation.
private void initDatabase() { String sql = "CREATE TABLE IF NOT EXISTS books (\n" + " ISBN integer PRIMARY KEY,\n" + " BookName text NOT NULL,\n" + " AuthorName text NOT NULL, \n" + " Price integer\n" + ");"; try (Connection conn = DriverManager.getConnection(urlPath); Statement stmt = conn.createStatement()) { System.out.println("Database connected"); stmt.execute(sql); } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void go() {\n\t\tthis.conn = super.getConnection();\n\t\tcreateCustomersTable();\n\t\tcreateBankersTable();\n\t\tcreateCheckingAccountsTable();\n\t\tcreateSavingsAccountsTable();\n\t\tcreateCDAccountsTable();\n\t\tcreateTransactionsTable();\n\t\tcreateStocksTable();\n\t\tif(createAdminBanker) addAdminBanker();\n\t\tSystem.out.println(\"Database Created\");\n\n\t}", "protected void setupDB() {\n\t\tlog.info(\"------------------------------------------\");\n\t\tlog.info(\"Initialization database started\");\n\t\tlog.info(\"ddl: db-config.xml\");\n\t\tlog.info(\"------------------------------------------\");\n\t\ttry {\n\t\t\tfinal List<String> lines = Files.readAllLines(Paths.get(this.getClass()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getClassLoader()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getResource(\"create-campina-schema.sql\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toURI()), Charset.forName(\"UTF-8\"));\n\n\t\t\tfinal List<String> statements = new ArrayList<>(lines.size());\n\t\t\tString statement = \"\";\n\t\t\tfor (String string : lines) {\n\t\t\t\tstatement += \" \" + string;\n\t\t\t\tif (string.endsWith(\";\")) {\n\t\t\t\t\tstatements.add(statement);\n\t\t\t\t\tstatement = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry (final Connection con = conManager.getConnection(Boolean.FALSE)) {\n\t\t\t\ttry (final PreparedStatement pstmt = con.prepareStatement(\"DROP SCHEMA IF EXISTS campina\")) {\n\t\t\t\t\tpstmt.executeUpdate();\n\t\t\t\t}\n\t\t\t\tfor (String string : statements) {\n\t\t\t\t\tlog.info(\"Executing ddl: \" + string);\n\t\t\t\t\ttry (final PreparedStatement pstmt = con.prepareStatement(string)) {\n\t\t\t\t\t\tpstmt.executeUpdate();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tthrow new IllegalStateException(\"Could not setup db\", e);\n\t\t\t}\n\t\t} catch (Throwable e) {\n\t\t\tlog.error(\"Could not setup database\", e);\n\t\t\tthrow new IllegalStateException(\"ddl file load failed\", e);\n\t\t}\n\t\tlog.info(\"------------------------------------------\");\n\t\tlog.info(\"Initialization database finished\");\n\t\tlog.info(\"------------------------------------------\");\n\t}", "public void initDb() {\n String createVac = \"create table if not exists vacancies(id serial primary key,\"\n + \"name varchar(1500) NOT NULL UNIQUE, url varchar (1500), description text, dateVac timestamp);\";\n try (Statement st = connection.createStatement()) {\n st.execute(createVac);\n } catch (SQLException e) {\n LOG.error(e.getMessage());\n }\n }", "public void setupDB()\r\n\t{\n\tjdbcTemplateObject.execute(\"DROP TABLE IF EXISTS employee1 \");\r\n\r\n\tjdbcTemplateObject.\r\n\texecute(\"CREATE TABLE employee1\"\r\n\t+ \"(\" + \"name VARCHAR(255), id SERIAL)\");\r\n\t}", "private void initTables() {\n try (Connection connection = this.getConnection();\n Statement statement = connection.createStatement()) {\n statement.execute(INIT.CREATE_CITIES.toString());\n statement.execute(INIT.CREATE_ROLES.toString());\n statement.execute(INIT.CREATE_MUSIC.toString());\n statement.execute(INIT.CREATE_ADDRESS.toString());\n statement.execute(INIT.CREATE_USERS.toString());\n statement.execute(INIT.CREATE_USERS_TO_MUSIC.toString());\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n }\n }", "private static void initializeDatabase()\n\t{\n\t\tResultSet resultSet = dbConnect.getMetaData().getCatalogs();\n\t\tStatment statement = dbConnect.createStatement();\n\t\t\n\t\tif (resultSet.next())\n\t\t{\n\t\t\tstatement.execute(\"USE \" + resultSet.getString(1));\n\t\t\tstatement.close();\n\t\t\tresultSet.close();\n\t\t\treturn; //A database exists already\n\t\t}\n\t\tresultSet.close();\n\t\t//No database exists yet, create it.\n\t\t\n\t\tstatement.execute(\"CREATE DATABASE \" + dbName);\n\t\tstatement.execute(\"USE \" + dbName);\n\t\tstatement.execute(createTableStatement);\n\t\tstatement.close();\n\t\treturn;\n\t}", "public void dbCreate() {\n Logger.write(\"INFO\", \"DB\", \"Creating database\");\n try {\n if (!Database.DBDirExists())\n Database.createDBDir();\n dbConnect(false);\n for (int i = 0; i < DBStrings.createDB.length; i++)\n execute(DBStrings.createDB[i]);\n } catch (Exception e) {\n Logger.write(\"FATAL\", \"DB\", \"Failed to create databse: \" + e);\n }\n }", "public void createNewDataBase() {\n try (Connection conn = DriverManager.getConnection(url)) {\n if (conn != null) {\n DatabaseMetaData meta = conn.getMetaData();\n createNewTable();\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "private void setupDb(){\n try {\n openConnection();\n s.executeUpdate(\"CREATE TABLE IF NOT EXISTS LIB (NAME text UNIQUE , TYPE text, LANGUAGE text, INTRUSIVE text, OPENSOURCE text)\");\n }catch (SQLException e) {\n System.err.println(e.getMessage());\n }finally {\n if (c != null){\n close(c);\n }\n }\n }", "public void init() {\n\n\t\tConnection connection = null;\n\t\tStatement statement = null;\n\n\t\ttry {\n\n\t\t\tconnection = DatabaseInteractor.getConnection();\n\t\t\tstatement = connection.createStatement();\n\n\t\t} catch (SQLException exception) {\n\t\t\texception.printStackTrace();\n\t\t\treturn;\n\t\t} catch (ClassNotFoundException exception) {\n\t\t\texception.printStackTrace();\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\n\t\t\tDatabaseInteractor.createTable(StringConstants.USERS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.QUESTIONS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.ANSWERS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.TOPICS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.USER_QUESTION_VOTES_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.USER_ANSWER_VOTES_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.USER_TOPIC_RANKS_TABLE, statement);\n\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private void setupDatabase() {\r\n\t\tDatabaseHelperFactory.init(this);\r\n\t\tdatabase = DatabaseHelperFactory.getInstance();\r\n\t}", "private void setupDatabase()\n {\n try\n {\n Class.forName(\"com.mysql.jdbc.Driver\");\n }\n catch (ClassNotFoundException e)\n {\n simpleEconomy.getLogger().severe(\"Could not load database driver.\");\n simpleEconomy.getServer().getPluginManager().disablePlugin(simpleEconomy);\n e.printStackTrace();\n }\n\n try\n {\n connection = DriverManager\n .getConnection(String.format(\"jdbc:mysql://%s/%s?user=%s&password=%s\",\n simpleEconomy.getConfig().getString(\"db.host\"),\n simpleEconomy.getConfig().getString(\"db.database\"),\n simpleEconomy.getConfig().getString(\"db.username\"),\n simpleEconomy.getConfig().getString(\"db.password\")\n ));\n\n // Loads the ddl from the jar and commits it to the database.\n InputStream input = getClass().getResourceAsStream(\"/ddl.sql\");\n try\n {\n String s = IOUtils.toString(input);\n connection.createStatement().execute(s);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n finally\n {\n try\n {\n input.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n }\n catch (SQLException e)\n {\n simpleEconomy.getLogger().severe(\"Could not connect to database.\");\n simpleEconomy.getServer().getPluginManager().disablePlugin(simpleEconomy);\n e.printStackTrace();\n }\n }", "private void setupDatabase() throws SQLException {\n\t\tdb.open(\"localhost\", 3306, \"wow\", \"greeneconomyapple\");\n\t\tdb.use(\"auctionscan\");\n\t}", "Database createDatabase();", "private void createDB() {\n try {\n Statement stat = conn.createStatement();\n stat.execute(\"CREATE TABLE settings (name TEXT, state);\");\n stat.execute(\"CREATE TABLE expressions (id INTEGER PRIMARY KEY ASC AUTOINCREMENT, expression TEXT);\");\n stat.execute(\"CREATE TABLE summaries (id INTEGER PRIMARY KEY ASC, expression_id INTEGER, title TEXT, abstract TEXT);\");\n stat.execute(\"CREATE TABLE history (id INTEGER PRIMARY KEY ASC AUTOINCREMENT, expression TEXT);\");\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n }\n }", "private void initDb() {\n\t\tif (dbHelper == null) {\n\t\t\tdbHelper = new DatabaseOpenHelper(this);\n\t\t}\n\t\tif (dbAccess == null) {\n\t\t\tdbAccess = new DatabaseAccess(dbHelper.getWritableDatabase());\n\t\t}\n\t}", "public static void createDataBase() {\n final Configuration conf = new Configuration();\n\n addAnnotatedClass(conf);\n\n conf.configure();\n new SchemaExport(conf).create(true, true);\n }", "private void createDatabase() throws SQLException\r\n {\r\n myStmt.executeUpdate(\"create database \" + dbname);\r\n }", "public void createDB() {\n\t\ttry {\n\t\t\tBufferedReader br= new BufferedReader(new FileReader(\"db_schema.txt\"));\n\t\t\tString line= null;\n\t\t\tStringBuilder sb= new StringBuilder();\n\t\t\twhile ((line=br.readLine())!=null){\n\t\t\t\tsb.append(line);\n\t\t\t\tif(sb.length()>0 && sb.charAt(sb.length()-1)==';'){//see if it is the end of one line of command\n\t\t\t\t\tstatement.executeUpdate(sb.toString());\n\t\t\t\t\tsb= new StringBuilder();\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@BeforeAll\n public void init() throws SQLException, IOException {\n dataSource = DBCPDataSource.getDataSource();\n\n DatabaseUtil databaseUtil = new DatabaseUtil(dataSource);\n databaseUtil.dropTables();\n\n String initUsersTable = \"create table users (id serial primary key, email varchar not null, password varchar not null, birthday date);\";\n String initPostsTable = \"create table posts (id serial primary key, image varchar not null, caption varchar, likes integer not null default 0, userId integer not null references users(id));\";\n\n try (Connection connection = dataSource.getConnection()) {\n Statement statement = connection.createStatement();\n\n statement.execute(initUsersTable);\n statement.execute(initPostsTable);\n\n addUser(\"[email protected]\", \"HASHED_PASSWORD\", new Date(2001, 07, 24));\n addUser(\"[email protected]\", \"HASHED_PASSWORD\", new Date(2000, 01, 01));\n addUser(\"[email protected]\", \"HASHED_PASSWORD\", new Date(2001, 02, 01));\n addUser(\"[email protected]\", \"HASHED_PASSWORD\", new Date(2000, 05, 06));\n addUser(\"[email protected]\", \"HASHED_PASSWORD\", new Date(2001, 07, 24));\n }\n\n loggerUtil = new LoggerUtil();\n logFilePath = Paths.get(logDirectory, name + \".log\");\n logger = loggerUtil.initFileLogger(logFilePath.toAbsolutePath().toString(), name);\n\n Migrate migrate = new Migrate(dataSource);\n migrate.up(name);\n }", "private void initDb() throws SQLException {\n statement = conn.createStatement();\n for (String sql : TABLES_SQL) {\n statement.executeUpdate(sql);\n }\n }", "@Override\n public Database getAndInitialize() throws IOException {\n Database database = Databases.createPostgresDatabaseWithRetry(\n username,\n password,\n connectionString,\n isDatabaseConnected(databaseName));\n\n new ExceptionWrappingDatabase(database).transaction(ctx -> {\n boolean hasTables = tableNames.stream().allMatch(tableName -> hasTable(ctx, tableName));\n if (hasTables) {\n LOGGER.info(\"The {} database has been initialized\", databaseName);\n return null;\n }\n LOGGER.info(\"The {} database has not been initialized; initializing it with schema: {}\", databaseName, initialSchema);\n ctx.execute(initialSchema);\n return null;\n });\n\n return database;\n }", "private void initDB() {\n dataBaseHelper = new DataBaseHelper(this);\n }", "@Before\n public void createDatabase() {\n dbService.getDdlInitializer()\n .initDB();\n kicCrud = new KicCrud();\n }", "public static void createDatabase() throws SQLException {\n\t\tSystem.out.println(\"DROP database IF EXISTS project02;\");\n\t\tstatement = connection.prepareStatement(\"DROP database IF EXISTS project02;\");\n\t\tstatement.executeUpdate();\n\t\tSystem.out.println(\"CREATE database project02;\");\n\t\tstatement = connection.prepareStatement(\"CREATE database project02;\");\n\t\tstatement.executeUpdate();\n\t\tSystem.out.println(\"USE project02;\");\n\t\tstatement = connection.prepareStatement(\"USE project02;\");\n\t\tstatement.executeUpdate();\n\t}", "private createSingletonDatabase()\n\t{\n\t\tConnection conn = createDatabase();\n\t\tcreateTable();\n\t\tString filename = \"Summer expereince survey 2016 for oliver.csv\"; \n\t\timportData(conn, filename);\n\t}", "public static void InitializeDatabase() throws SQLException {\n dataSource = new SQLiteConnectionPoolDataSource();\n dataSource.setUrl(\"jdbc:sqlite:application.db\");\n\n // Optional Configuration Settings\n org.sqlite.SQLiteConfig config = new org.sqlite.SQLiteConfig();\n config.enforceForeignKeys(true);\n config.enableLoadExtension(true);\n dataSource.setConfig(config);\n\n connectionPool = dataSource.getPooledConnection();\n }", "public void createDB(String filename) throws SQLException {\n //System.out.printf(\"Connecting to the database %s.%n\", filename);\n /* \n * Connect to the database (file). If the file does not exist, create it.\n */\n Connection db_connection = DriverManager.getConnection(SQLITEDBPATH + filename);\n this.createTables(db_connection);\n this.initTableCities(db_connection);\n this.initTableTeams(db_connection);\n //System.out.printf(\"Connection to the database has been established.%n\");\n db_connection.close();\n //System.out.printf(\"Connection to the database has been closed.%n\");\n }", "public void createDB(){\r\n\t\t\r\n\t\t Connection connection = null;\r\n\t try\r\n\t {\r\n\t // create a database connection\r\n\t connection = DriverManager.getConnection(\"jdbc:sqlite:project.sqlite\");\r\n\t Statement statement = connection.createStatement();\r\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\r\n\r\n\t statement.executeUpdate(\"drop table if exists task\");\r\n\t statement.executeUpdate(\"create table task (taskId integer primary key asc, description string, status string, createDate datetime default current_timestamp)\");\r\n\t statement.executeUpdate(\"insert into task values(1, 'leo', 'Active', null)\");\r\n\t statement.executeUpdate(\"insert into task values(2, 'yui', 'Complete', null)\");\r\n\t }\r\n\t catch(SQLException ex){\r\n\t \tthrow new RuntimeException(ex);\r\n\t }\r\n\t\t\r\n\t}", "private Connection createDatabase() {\n\t\tSystem.out.println(\"We are creating a database\");\n\t\ttry (\n\t\t\t\t// Step 1: Allocate a database \"Connection\" object\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:\" + PORT_NUMBER + \"/\", \n\t\t\t\t\t\t\"root\", \"root\"); // MySQL\n\t\t\t\t// Step 2: Allocate a \"Statement\" object in the Connection\n\t\t\t\tStatement stmt = conn.createStatement();\n\t\t\t\t) {\n\t\t\t// Step 3 - create our database\n\t\t\tString sql = \"CREATE DATABASE IF NOT EXISTS experiences\";\n\t\t\tstmt.execute(sql);\n\t\t\treturn conn;\n\t\t\t\n\n\t\t} catch(SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null; }\n\t}", "private void makeSQLConn() {\n\t\ttry {\n\t\t\tmyDB = new MySQLAccess();\n\t\t} catch (Exception e) { e.printStackTrace(); }\n\t}", "private Database() throws SQLException {\n con = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:MusicAlbums\", \"c##dba\", \"sql\");\n }", "public Database()\r\n\t{\r\n\t\tinitializeDatabase();\r\n\t\t\r\n\t}", "public void initConnection() throws SQLException{\n\t\tuserCon = new UserDBHandler(\"jdbc:mysql://127.0.0.1:3306/users\", \"admin\", \"admin\");\n\t\tproductCon = new ProductDBHandler(\"jdbc:mysql://127.0.0.1:3306/products\", \"admin\", \"admin\");\n\t}", "public setup() {\n dbConnection = \"jdbc:\"+DEFAULT_DB_TYPE+\"://\"+DEFAULT_DB_HOST+\":\"+DEFAULT_DB_PORT+\"/\"+DEFAULT_DB_PATH;\n dbType = DEFAULT_DB_TYPE;\n dbUser = DEFAULT_DB_USER;\n dbPass = DEFAULT_DB_PASSWORD;\n beginSetup();\n }", "protected void createInitialTables() throws SQLException {\n\t\n\t\t// create one table per type with the corresponding attributes\n\t\tfor (String type: entityType2attributes.keySet()) {\n\t\t\tcreateTableForEntityType(type);\n\t\t}\n\t\t\n\t\t// TODO indexes !\n\t\t\n\t}", "public void start(){\n dbConnector = new DBConnector();\n tables = new HashSet<String>();\n tables.add(ALGORITHMS_TABLE);\n tables.add(DATA_STRUCTURES_TABLE);\n tables.add(SOFTWARE_DESIGN_TABLE);\n tables.add(USER_TABLE);\n }", "private void createNewDatabase() throws ConnectException {\n try (Connection sqlConnection = connect()) {\n if (sqlConnection != null) {\n sqlConnection.getMetaData();\n sqlConnection.close();\n }\n\n } catch (SQLException e) {\n LOGGER.error(\"Error when trying to create new database: {}\\n{}\", e.getMessage(), e);\n }\n }", "private void createDatabase() throws Exception{\n Statement stm = this.con.createStatement();\n stm.execute(\"CREATE DATABASE IF NOT EXISTS \" + database +\n \" DEFAULT CHARACTER SET utf8 COLLATE utf8_persian_ci\");\n }", "public void establishConnection() throws SQLException {\n if (!connectToDB(\"jdbc:mysql://localhost/EmployeesProject\")) {\n createDBAndTable();\n }\n }", "public static void SetupDB() {\n\t\tdb.execSQL(\"CREATE TABLE IF NOT EXISTS User(email TEXT,name TEXT, displayPic BLOB);\");\n\t\tdb.execSQL(\"CREATE TABLE IF NOT EXISTS FriendList(ID INTEGER PRIMARY KEY, email TEXT,name TEXT, displayPic BLOB);\");\n\t\tdb.execSQL(\"CREATE TABLE IF NOT EXISTS Category(ID INTEGER PRIMARY KEY,name TEXT);\");\n\t}", "public static LocalDatabase dbSetup(String name)\n\t{\n\t\tLocalDatabase local = new LocalDatabase(name);\n\t\tlocal.loadDriver();\n\t\tlocal.openConnection();\n\t\tlocal.createTablePersons();\n\t\tlocal.createTableListenings();\n\t\tlocal.createTableRecordings();\n\t\tlocal.closeConnection();\n\t\treturn local;\n\t}", "public void createTable() {\n\t\tString QUERY = \"CREATE TABLE person (id INT PRIMARY KEY, name VARCHAR(32) NOT NULL, phoneNumber VARCHAR(18) NOT NULL)\";\n\t\ttry (Connection con = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\t\tStatement stmt = con.createStatement();) {\n\t\t\tstmt.executeUpdate(QUERY);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"SQL Exception\");\n\t\t}\n\n\t}", "protected void createTable() throws Exception {\n startService();\n assertEquals(true, sqlDbManager.isReady());\n\n Connection conn = sqlDbManager.getConnection();\n assertNotNull(conn);\n assertFalse(sqlDbManager.tableExists(conn, \"testtable\"));\n assertTrue(sqlDbManager.createTableIfMissing(conn, \"testtable\",\n\t\t\t\t\t TABLE_CREATE_SQL));\n assertTrue(sqlDbManager.tableExists(conn, \"testtable\"));\n sqlDbManager.logTableSchema(conn, \"testtable\");\n assertFalse(sqlDbManager.createTableIfMissing(conn, \"testtable\",\n\t\t\t\t\t TABLE_CREATE_SQL));\n }", "@Override\n\tpublic void onCreate(SQLiteDatabase db, ConnectionSource connectionSource) {\n\t\tthis.connectionSource = connectionSource;\n\t\tcreateTable();\n\t}", "public void init() throws SQLException {\n EventBusInstance.getInstance().register(new BestEffortsDeliveryListener());\n if (TransactionLogDataSourceType.RDB == transactionConfig.getStorageType()) {\n Preconditions.checkNotNull(transactionConfig.getTransactionLogDataSource());\n createTable();\n }\n }", "public void createDatabase(String sDBName) throws SQLException{\n\t\tloadDriver();\n\t\tConnection conn = DriverManager.getConnection(protocol + dbName\n + \";create=true\", new Properties());\n\t\tcloseJDBCResources(conn);\t\t\n\t}", "@Override\n\tpublic void onCreate(SQLiteDatabase db, ConnectionSource connectionSource) {\n\t\ttry {\n\t\t\tLog.i(DatabaseHelper.class.getName(), \"onCreate\");\n\t\t\tTableUtils.createTable(connectionSource, Place.class);\n\t\t\tTableUtils.createTable(connectionSource, Lock.class);\n\t\t\tTableUtils.createTable(connectionSource, User.class);\n\t\t\tTableUtils.createTable(connectionSource, Locator.class);\n\t\t} catch (SQLException e) {\n\t\t\tLog.e(DatabaseHelper.class.getName(), \"Can't create database\", e);\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "private void setupDBs()\n {\n\t mSetupDBTask = new SetupDBTask(this);\n\t\tmSetupDBTask.execute((Void[])null);\n }", "public void setup() throws SQLException {\n // Create ACARS table\n final String createTableSQL = \"CREATE TABLE IF NOT EXISTS ACARS (\"\n + \"date DATE, time TIME, frequency CHAR(7), \"\n + \"registration VARCHAR(7), flight CHAR(6), \"\n + \"mode CHAR, label CHAR(2), blockId CHAR, msgId CHAR(4), \"\n + \"text VARCHAR(255), \"\n + \"PRIMARY KEY (date, registration, flight, mode, label, blockId, msgId), \"\n + \"INDEX datetime_idx (date, time), \"\n + \"INDEX registration_idx (registration), \"\n + \"INDEX flight_idx (flight)\"\n + \")\";\n\n final Statement createTableStmt = connection.createStatement();\n createTableStmt.execute(createTableSQL);\n }", "public static void initDB() {\r\n\t\tboolean ok = false;\r\n\t\ttry(Connection c = DriverManager.getConnection(\"jdbc:hsqldb:file:burst_db\", \"SA\", \"\")) {\r\n\t\t\tString testSQL = \"select count(*) from TB_USERS;\";\r\n\t\t\ttry(PreparedStatement s = c.prepareStatement(testSQL)) {\r\n\t\t\t\ttry(ResultSet rs = s.executeQuery()) {\r\n\t\t\t\t\trs.next();\r\n\t\t\t\t\tSystem.out.println(\"There are \"+rs.getInt(1)+\" known users.\");\r\n\t\t\t\t\tok = true;\r\n\t\t\t\t}\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t//Don't panic, table doesn't exist\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\t//Panic! Cannot connect to DB\r\n\t\t}\r\n\t\t\r\n\t\tif(!ok) {\r\n\t\t\tSystem.out.println(\"Creating Database\");\r\n\t\t\t\r\n\t\t\ttry(Connection c = DriverManager.getConnection(\"jdbc:hsqldb:file:burst_db\", \"SA\", \"\")) {\r\n\t\t\t\tString createSQL = \"create table TB_USERS (USERID varchar(255),BURSTADDRESS varchar(255), BURSTNUMERIC varchar(255));\";\r\n\t\t\t\ttry(Statement s = c.createStatement()) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\ts.execute(createSQL);\r\n\t\t\t\t\t\tok = true;\r\n\t\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void createDatabase() throws IOException {\n boolean dbExists = checkDatabase();\n\n if (dbExists) {\n // Do nothing - database already exists\n } else {\n // By calling this method an empty database will be created into the\n // default system path of our application so we are going to be able\n // to overwrite the database with our database.\n this.getReadableDatabase();\n\n try {\n copyDatabase();\n } catch (IOException e) {\n throw new Error(\"Error copying database\");\n }\n }\n }", "public void createNewSchema() throws SQLException {\n ResultSet resultSet = databaseStatement.executeQuery(\"select count(datname) from pg_database\");\n int uniqueID = 0;\n if(resultSet.next()) {\n uniqueID = resultSet.getInt(1);\n }\n if(uniqueID != 0) {\n uniqueID++;\n databaseStatement.executeQuery(\"CREATE DATABASE OSM\"+uniqueID+\";\");\n }\n }", "public void createTables()\n {\n String[] sqlStrings = createTablesStatementStrings();\n String sqlString;\n Statement statement;\n\n System.out.println(\"Creating table(s):\" +\n Arrays.toString(tableNames));\n for (int i=0; i<sqlStrings.length; i++)\n try\n {\n statement = connect.createStatement();\n\n sqlString = sqlStrings[i];\n\n System.out.println(\"SQL: \" + sqlString);\n\n statement.executeUpdate(sqlString);\n }\n catch (SQLException ex)\n {\n System.out.println(\"Error creating table: \" + ex);\n Logger.getLogger(DatabaseManagementDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private Database() throws SQLException, ClassNotFoundException {\r\n Class.forName(\"org.postgresql.Driver\");\r\n con = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/postgres\", \"postgres\", \"kuka\");\r\n }", "public void dbCreate() throws IOException\n {\n boolean dbExist = dbCheck();\n\n if(!dbExist)\n {\n //By calling this method an empty database will be created into the default system patt\n //of the application so we can overwrite that db with our db.\n this.getReadableDatabase(); // create a new empty database in the correct path\n try\n {\n //copy the data from the database in the Assets folder to the new empty database\n copyDBFromAssets();\n }\n catch(IOException e)\n {\n throw new Error(\"Error copying database\");\n }\n }\n }", "private void createTables() {\n\n\t\tAutoDao.createTable(db, true);\n\t\tAutoKepDao.createTable(db, true);\n\t\tMunkaDao.createTable(db, true);\n\t\tMunkaEszkozDao.createTable(db, true);\n\t\tMunkaKepDao.createTable(db, true);\n\t\tMunkaTipusDao.createTable(db, true);\n\t\tPartnerDao.createTable(db, true);\n\t\tPartnerKepDao.createTable(db, true);\n\t\tProfilKepDao.createTable(db, true);\n\t\tSoforDao.createTable(db, true);\n\t\tTelephelyDao.createTable(db, true);\n\t\tPushMessageDao.createTable(db, true);\n\n\t}", "public void createTable() {\r\n\t\tclient.createTable();\r\n\t}", "private Conexao() {\r\n\t\ttry {\r\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:hsqldb:mem:.\", \"sa\", \"\");\r\n\t\t\tnew LoadTables().creatScherma(connection);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Erro ao conectar com o banco: \"+e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Before\n public void initDb() {\n mDatabase = Room.inMemoryDatabaseBuilder(InstrumentationRegistry.getContext(),\n ToDoDatabase.class).build();\n }", "DataBase createDataBase();", "private void setupDB(){\n try {\n Class.forName(\"oracle.jdbc.driver.OracleDriver\");\n String url = \"jdbc:oracle:thin:@localhost:1521:orcl\";\n String username = \"sys as sysdba\"; //Provide username for your database\n String password = \"oracle\"; //provide password for your database\n\n con = DriverManager.getConnection(url, username, password);\n }\n catch(Exception e){\n System.out.println(e);\n }\n }", "public void createDataBase() throws IOException{\n \n \tboolean dbExist = checkDataBase();\n \t\n \n \tif(dbExist){\n \t\t//do nothing - database already exists\n \t\tLog.d(\"Database Check\", \"Database Exists\");\n\n \t}else{\n \t\tLog.d(\"Database Check\", \"Database Doesn't Exist\");\n \t\tthis.close();\n \t\t//By calling this method and empty database will be created into the default system path\n //of your application so we are gonna be able to overwrite that database with our database.\n \tthis.getReadableDatabase();\n \tthis.close();\n \ttry {\n \t\t\tcopyDataBase();\n \t\t\tLog.d(\"Database Check\", \"Database Copied\");\n \n \t\t} catch (IOException e) {\n \t\tLog.d(\"I/O Error\", e.toString());\n\n \t\tthrow new Error(\"Error copying database\");\n \t}\n \tcatch (Exception e) { \n \t\tLog.d(\"Exception in createDatabase\", e.toString());\n \t\t\n \t}\n \t}\n \n }", "private void createTable() {\n try (Statement st = this.conn.createStatement()) {\n st.execute(\"CREATE TABLE IF NOT EXISTS users (user_id SERIAL PRIMARY KEY, name VARCHAR(100) NOT NULL, \"\n + \"login VARCHAR(100) UNIQUE NOT NULL, email VARCHAR(100) NOT NULL, createDate TIMESTAMP NOT NULL);\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public DBCreator(DBConnection connection) {\n this.dbConnection = connection;\n }", "@Override\n public Database getInitialized() {\n return Databases.createPostgresDatabaseWithRetry(\n username,\n password,\n connectionString,\n isDatabaseReady);\n }", "public void createDatabase() throws IOException{\r\n\r\n boolean dbDoesExist = checkDatabase();\r\n if(!dbDoesExist)\r\n {\r\n // Create or open db if db is not connected\r\n this.getReadableDatabase();\r\n try{\r\n createNewDB();\r\n }catch (IOException e){\r\n throw new Error(\"DB Copy Failed\");\r\n }\r\n }\r\n }", "public static void createDatabase() throws ArcException {\n\t\tcreateDatabase(userWithRestrictedRights);\t\t\n\t}", "@Override\n public void setUp() throws SQLException {\n connection.createStatement().executeUpdate(\n \"CREATE TABLE IF NOT EXISTS \\\"ENTRY\\\" (\" +\n \"\\\"SHARED_ID\\\" SERIAL PRIMARY KEY, \" +\n \"\\\"TYPE\\\" VARCHAR, \" +\n \"\\\"VERSION\\\" INTEGER DEFAULT 1)\");\n\n connection.createStatement().executeUpdate(\n \"CREATE TABLE IF NOT EXISTS \\\"FIELD\\\" (\" +\n \"\\\"ENTRY_SHARED_ID\\\" INTEGER REFERENCES \\\"ENTRY\\\"(\\\"SHARED_ID\\\") ON DELETE CASCADE, \" +\n \"\\\"NAME\\\" VARCHAR, \" +\n \"\\\"VALUE\\\" TEXT)\");\n\n connection.createStatement().executeUpdate(\n \"CREATE TABLE IF NOT EXISTS \\\"METADATA\\\" (\"\n + \"\\\"KEY\\\" VARCHAR,\"\n + \"\\\"VALUE\\\" TEXT)\");\n }", "public void connectAndCreateDB() {\n\t\tString connectionURL = \"jdbc:derby://localhost:1527/DerbyBPI;create=true\";\n\t //String connectionURL = \"jdbc:derby:DerbyBPI;create=true\";\n\t //String connectionURL = \"jdbc:derby://localhost:1527/\"+dbName+\";create=true\";\n\t// String connectionURL = \"jdbc:derby://ORCDatabase:1527/\"+dbName+\";create=true\";\n\n try {\t \n\t\tClass.forName(driver).newInstance(); \n System.out.println(driver + \" loaded. \");\n \n } catch(java.lang.ClassNotFoundException e) {\n System.err.print(\"ClassNotFoundException: \");\n System.err.println(e.getMessage());\n System.out.println(\"\\n >>> Please check your CLASSPATH variable <<<\\n\");\n } catch (InstantiationException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t} catch (IllegalAccessException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\n\n\t// Create (if needed) and connect to the database\n \n\t\ttry {\n\t\t\t\n\t\t\tconn = DriverManager.getConnection(connectionURL);\n\t\t\tSystem.out.println(\"******* Connected to database \" + dbName);\t \n\t\t\t\n\t\t\tif (this.tablesExist() == true) {\n\t\t\t\tthis.deleteAllTable();\n\t\t\t\tthis.createTables();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.createTables();\n\t\t\t}\n\n\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\n\n \n \n\t}", "public void createTable()\n throws DBException\n {\n try {\n DBProvider.createTable(this);\n } catch (SQLException sqe) {\n throw new DBException(\"Table creation\", sqe);\n }\n }", "public void initializeDataBase() {\r\n\r\n\r\n\r\n\t\tgetWritableDatabase();\r\n\t\tLog.e(\"DBHelper initializeDataBase \", \"Entered\");\r\n\t\tcreateDatabase = true;\r\n\t\tif (createDatabase) {\r\n\t\t\tLog.e(\"DBHelper createDatabase \", \"true\");\r\n\t\t\t/*\r\n\t\t\t * If the database is created by the copy method, then the creation\r\n\t\t\t * code needs to go here. This method consists of copying the new\r\n\t\t\t * database from assets into internal storage and then caching it.\r\n\t\t\t */\r\n\t\t\ttry {\r\n\t\t\t\t/*\r\n\t\t\t\t * Write over the empty data that was created in internal\r\n\t\t\t\t * storage with the one in assets and then cache it.\r\n\t\t\t\t */\r\n\t\t\t\tcopyStream(DB_PATH_IN, new FileOutputStream(DB_PATH));\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) \r\n\t\t\t{\r\n\t\t\t\tthrow new Error(\"Error copying database\");\r\n\t\t\t}\r\n\t\t} \r\n\t\telse if (upgradeDatabase) \r\n\t\t{\r\n\t\t\tLog.e(\"DBHelper upgradeDatabase \", \"true\");\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t/*\r\n\t\t\t\t * Write over the empty data that was created in internal\r\n\t\t\t\t * storage with the one in assets and then cache it.\r\n\t\t\t\t */\r\n\t\t\t\tcopyStream(DB_PATH_IN, new FileOutputStream(DB_PATH));\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tthrow new Error(\"Error copying database\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tLog.e(\"DBHelper clear \", \"true\");\r\n\t}", "private void createTables() throws SQLException\r\n {\r\n createTableMenuItems();\r\n createTableOrdersWaiting();\r\n }", "@Before\n public void createAndFillTable() {\n try {\n DBhandler dBhandler = new DBhandler(h2DbConnection);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void setUp() throws IOException\r\n\t{\r\n\r\n\t\tgraphDb = new GraphDatabaseFactory().newEmbeddedDatabase( dbPath );\r\n\t\tSystem.out.println(\"Connecting to the database...\"); \r\n\t\tSystem.out.println(\"Done!\");\r\n\r\n\t}", "public GosplPopulationInDatabase() {\n\t\ttry {\n\t\t\tthis.connection = DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:hsqldb:mem:\"+mySqlDBname+\";shutdown=true\", \"SA\", \"\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"error while trying to initialize the HDSQL database engine in memory: \"+e.getMessage(), e);\n\t\t}\n\t}", "@Override\n\tpublic void createTable() {\n\t\tSystem.out.println(\"++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\ttry {\n\t\t\tTableUtils.createTable(connectionSource, UserEntity.class);\n\t\t\tTableUtils.createTable(connectionSource, Downloads.class);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\");\n\t\t}\n\t}", "@Override\n\t\tpublic void onCreate(SQLiteDatabase database) {\n\t\t\tcreateTable(database);\n\n\t\t}", "public DatabaseManager() {\n try {\n con = DriverManager.getConnection(DB_URL, \"root\", \"marko\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void bootstrapDatabase() throws Exception {\n\n }", "public DatabaseController()\n\t{\n\t\tconnectionString = \"jdbc:mysql://localhost/?user=root\";\n\t\tcheckDriver();\n\t\tsetupConnection();\n\t}", "private DatabaseHandler(){\n createConnection();\n }", "public void creatDataBase(String dbName);", "public void createDatabase(String dbName, String owner) throws Exception;", "static void resetTestDatabase() {\n String URL = \"jdbc:mysql://localhost:3306/?serverTimezone=CET\";\n String USER = \"fourthingsplustest\";\n\n InputStream stream = UserStory1Test.class.getClassLoader().getResourceAsStream(\"init.sql\");\n if (stream == null) throw new RuntimeException(\"init.sql\");\n try (Connection conn = DriverManager.getConnection(URL, USER, null)) {\n conn.setAutoCommit(false);\n ScriptRunner runner = new ScriptRunner(conn);\n runner.setStopOnError(true);\n runner.runScript(new BufferedReader(new InputStreamReader(stream)));\n conn.commit();\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n System.out.println(\"Done running migration\");\n }", "@Override\n\tpublic void onCreate(SQLiteDatabase db, ConnectionSource source) {\n\n\t\ttry {\n\t\t\tTableUtils.createTable(source, Priority.class);\n\t\t\tTableUtils.createTable(source, Category.class);\n\t\t\tTableUtils.createTable(source, Task.class);\n\t\t} catch (SQLException ex) {\n\t\t\tLog.e(LOG, \"error creating tables\", ex);\n\t\t}\n\n\t}", "private Connection createTable() {\n\t\tSystem.out.println(\"We are creating a table\");\n\t\ttry (\n\t\t\t\t// Step 1: Allocate a database \"Connection\" object\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:\" + PORT_NUMBER + \"/experiences?user=root&password=root\"); // MySQL\n\t\t\t\t// Step 2: Allocate a \"Statement\" object in the Connection\n\t\t\t\tStatement stmt = conn.createStatement();\n\t\t\t\t) {\n\t\t\t// Step 3 - create our database\n\t\t\tString sql2 = \"CREATE TABLE IF NOT EXISTS t1 ( \" +\n\t\t\t\t\t\"question1 varchar(500), \" +\n\t\t\t\t\t\"question2 varchar(500), \" +\n\t\t\t\t\t\"question3 varchar(500), \" +\n\t\t\t\t\t\"question4 varchar(500), \" +\n\t\t\t\t\t\"question5 varchar(500), \" +\n\t\t\t\t\t\"question6 varchar(500), \" +\n\t\t\t\t\t\"question7 varchar(500), \" +\n\t\t\t\t\t\"question8 varchar(500), \" +\n\t\t\t\t\t\"question9 varchar(500));\";\n\t\t\tstmt.execute(sql2);\n\t\t\treturn conn;\n\t\t\t\n\t\t\t\n\n\t\t} catch(SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null;}\n\t\t}", "public void initialize() {\r\n final String JDBC_DRIVER = \"org.h2.Driver\";\r\n final String DB_URL = \"jdbc:h2:./res/AnimalShelterDB\";\r\n final String USER = \"\";\r\n final String PASS;\r\n\r\n System.out.println(\"Attempting to connect to database\");\r\n try {\r\n Class.forName(JDBC_DRIVER);\r\n Properties prop = new Properties();\r\n prop.load(new FileInputStream(\"res/properties\"));\r\n PASS = prop.getProperty(\"password\");\r\n conn = DriverManager.getConnection(DB_URL, USER, PASS);\r\n stmt = conn.createStatement();\r\n System.out.println(\"Successfully connected to Animal database!\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n Alert a = new Alert(Alert.AlertType.ERROR);\r\n a.show();\r\n }\r\n startTA();\r\n }", "public void initialize() {\n for (TableInSchema tableInSchema : initialTables()) {\n addTable(tableInSchema);\n }\n }", "public static void setUpConnection()\n\t{\n\t\ttry{\n\t\t\t//The information necessary to create a connection to the database, need to figure out what this will be\n\t\n\t\t\n\t\t\t// Register driver by finding the class that corresponds do it \n\t\t\tString driverName = \"oracle.jdbc.OracleDriver\"; \n\t\t\tClass.forName(driverName);\n\t\t\n\t\t\tconn = DriverManager.getConnection(URL, USR, PWD);\n\t\t\n\t\t\tSystem.out.println(\"Connected to C325.\");\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void initialize() {\n if (databaseExists()) {\n SharedPreferences prefs = PreferenceManager\n .getDefaultSharedPreferences(mContext);\n int dbVersion = prefs.getInt(SP_KEY_DB_VER, 1);\n if (DATABASE_VERSION != dbVersion) {\n File dbFile = mContext.getDatabasePath(DBNAME);\n if (!dbFile.delete()) {\n Log.w(TAG, \"Unable to update database\");\n }\n }\n }\n if (!databaseExists()) {\n createDatabase();\n }\n }", "public void initDatabase(){\n CovidOpener cpHelper = new CovidOpener(this);\n cdb = cpHelper.getWritableDatabase();\n }", "DatabaseController() {\n\n\t\tloadDriver();\n\t\tconnection = getConnection(connection);\n\t}", "@Override\n\tpublic void onCreate(SQLiteDatabase database) {\n\t\tcreateTables(database);\n\t}", "public static void main(String[] args) throws IOException {\n\t\t\tSystem.out.println(\"Creating tables...\");\n\t\t\tDerbyDatabase db = new DerbyDatabase();\n\t\t\tdb.createTables();\n\t\t\t\n\t\t\tSystem.out.println(\"Loading initial data...\");\n\t\t\tdb.loadInitialData();\n\t\t\t\n\t\t\tSystem.out.println(\"Library DB successfully initialized!\");\n\t\t}", "private DBConnection() \n {\n initConnection();\n }", "public PostDatabase() {\r\n\ttry {\r\n\t Class.forName(DRIVER);\r\n\t db = DriverManager.getConnection(URI);\r\n\t Statement create = db.createStatement();\r\n\t create.execute(\"CREATE TABLE IF NOT EXISTS posts ( id INTEGER PRIMARY KEY, author TEXT, date INTEGER, isPublic INTEGER, content TEXT );\");\r\n\t} catch (ClassNotFoundException e) {\r\n\t System.err.println(\"Caught exception while attempting to use database driver: \" + e.getMessage());\r\n\t} catch (SQLException e) {\r\n\t System.err.println(\"Caught exception while doing something to the database: \" + e.getMessage());\r\n\t}\r\n }", "public void initConnection() throws DatabaseConnectionException, SQLException {\n\t\t\tString connectionString = DBMS+\"://\" + SERVER + \":\" + PORT + \"/\" + DATABASE;\n\t\t\ttry{\n\t\t\t\tClass.forName(DRIVER_CLASS_NAME).newInstance();\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.err.println(\"IMPOSSIBILE TROVARE DRIVER\");\n\t\t\t\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tconn=DriverManager.getConnection(connectionString, USER_ID, PASSWORD);\n\t\t\t\t\n\t\t\t}catch(SQLException e){\n\t\t\t\tSystem.err.println(\"IMPOSSIBILE STABILIRE CONNESSIONE DATABASE\");\n\t\t\t\t\n\t\t\t}\n\t\t}", "public FakeDatabase() {\n\t\t\n\t\t// Add initial data\n\t\t\n//\t\tSystem.out.println(authorList.size() + \" authors\");\n//\t\tSystem.out.println(bookList.size() + \" books\");\n\t}", "@Before\r\n\tpublic void setUp() throws SQLException {\n\t\tconn = DBManager.getInstance().getConnection();\r\n\t}" ]
[ "0.7735962", "0.76831645", "0.7660952", "0.7579815", "0.7507845", "0.7490628", "0.7466879", "0.74283904", "0.74102867", "0.7384798", "0.7359131", "0.7336229", "0.7280565", "0.71811336", "0.7174722", "0.7108779", "0.7094366", "0.7085373", "0.7067241", "0.7063436", "0.70290947", "0.6919283", "0.69066966", "0.68867904", "0.6875247", "0.6871943", "0.68628085", "0.6860324", "0.6850628", "0.6812731", "0.6806033", "0.68042046", "0.6791856", "0.6778853", "0.6778681", "0.6764079", "0.67629635", "0.6751453", "0.6744469", "0.6742772", "0.67355597", "0.67261964", "0.6682068", "0.66759217", "0.6670215", "0.66613674", "0.6658772", "0.66187334", "0.66174316", "0.6613336", "0.66018283", "0.65957403", "0.6587672", "0.6585828", "0.65844846", "0.6570432", "0.6567362", "0.6554444", "0.65479904", "0.6546965", "0.6534365", "0.6529562", "0.6526483", "0.65102565", "0.6503065", "0.649347", "0.64792067", "0.6472455", "0.64657897", "0.6464628", "0.6457634", "0.6457184", "0.6455461", "0.64535373", "0.64406693", "0.64364564", "0.6425721", "0.6424998", "0.641952", "0.6417886", "0.6412202", "0.64005387", "0.6387091", "0.6383258", "0.6381196", "0.63801605", "0.6374218", "0.6373712", "0.6363948", "0.6361507", "0.63428724", "0.6340403", "0.6327073", "0.6325506", "0.6316819", "0.631394", "0.63138396", "0.6311932", "0.63033354", "0.62997293" ]
0.7505181
5
Gets a connections to the database.
private Connection connect() { Connection conn = null; try { conn = DriverManager.getConnection(urlPath); } catch (SQLException e) { System.out.println(e.getMessage()); } return conn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Connection> getConnections(){\n\t\treturn manager.getConnectionsWith(this);\n\t}", "public Connections getConnections();", "public List<Connection> getConnections() {\n\t\treturn new ArrayList<Connection>(connectionsByUri.values());\n\t}", "public Connections getConnections() {\r\n return connections;\r\n }", "public static Connection GetConnection_s() {\n try {\n return connectionPool.getConnection(); \n } catch (SQLException e) {\n return null;\n }\n }", "public List<UserConnection> getUserConnections() {\n return jdbi.withHandle(handle -> {\n handle.registerRowMapper(ConstructorMapper.factory(UserConnection.class));\n return handle.createQuery(UserConnection.extractQuery)\n .mapTo(UserConnection.class)\n .list();\n });\n }", "Collection<TcpIpConnection> getConnections();", "public ConnInfo[] getConnections() {\n return connInfo;\n }", "public static List<Connection> getAllUserConnections() {\n List<Connection> userConnections = new ArrayList<Connection>();\n for (User user : UserManager.getUserStore()) {\n if (user.getConnection()!=null) {\n userConnections.add(user.getConnection());\n }\n }\n return userConnections;\n }", "java.util.List<io.netifi.proteus.admin.om.Connection> \n getConnectionsList();", "@Override\n public List<Link> getConnectionList()\n {\n return connections;\n }", "java.util.List<io.netifi.proteus.admin.om.Connection> \n getConnectionList();", "public static Connection getConnection() {\n \t\treturn connPool.getConnection();\n \t}", "public static List<Connection> getLoggedInUserConnections() {\n List<Connection> userConnections = new ArrayList<Connection>();\n for (User user : UserManager.getLoggedInUsers()) {\n if (user.getConnection() != null) {\n userConnections.add(user.getConnection());\n }\n }\n return userConnections;\n }", "public static Connection getConnection() {\n\n if (concount<conns-1) {\n concount++;\n } else {\n concount=0;\n }\n return con_pool[concount];\n }", "Collection<TcpIpConnection> getActiveConnections();", "public ConcurrentHashMap<String, SocketManager> getActiveConnections() {\n return threadListen.getActiveConnexion();\n }", "io.netifi.proteus.admin.om.Connection getConnections(int index);", "public List<ConnectionHandler> getClientConnections() {\r\n return clientConnections;\r\n }", "public ArrayList<Integer> getConnections() {\n\t\treturn connections;\n\t}", "public static long getConnections() {\n return connections;\n }", "public List<DatabaseAccountConnectionString> connectionStrings() {\n return this.connectionStrings;\n }", "public ConnectionDefinition[] getConnectionDefinition() {\n return instances;\n }", "public Room[] getConnections() {\n return connections;\n }", "Iterable<CurrentVersionCacheDao> getCurrentVersionCacheConnections();", "public static Connection getConnection() {\n\t\t\n\t\treturn conn;\n\t}", "@Override\n\tpublic List<Connexion> findAllConnexion() {\n\t\treturn dao.findAllConnexion();\n\t}", "public Connection getConnection() throws SQLException {\n\t\treturn Database.getConnection();\n\t}", "public DatabaseConnection getDatabaseConnection() {\n return query.getDatabaseConnection();\n }", "public Connection getConnection(){\n try {\n return connectionFactory.getConnection(); // wird doch schon im Konstruktor von TodoListApp aufgerufen ???\n } catch (SQLException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }", "public static Connection getConnection() throws Exception {\n\t\treturn jdbcConnectionPool.getConnection();\r\n\r\n\t\t// return getInstance().dataSourse.getConnection();\r\n\t}", "public String[] listConnections() {\n\t\t\tString[] conns = new String[keyToConn.entrySet().size()];\n\t\t\tint i = 0;\n\n\t\t\tfor (Map.Entry<String, Connection> entry : keyToConn.entrySet()) {\n\t\t\t\t// WebSocket ws = entry.getKey();\n\t\t\t\tConnection conn = entry.getValue();\n\t\t\t\tconns[i] = String.format(\"%s@%s\", conn.user, entry.getKey());\n\t\t\t\t++i;\n\t\t\t}\n\t\t\tArrays.sort(conns);\n\t\t\treturn conns;\n\t\t}", "public Connection getConnection() {\n try {\n return ds.getConnection();\n } catch (SQLException e) {\n System.err.println(\"Error while connecting to database: \" + e.toString());\n }\n return null;\n }", "public Connection getDbConnect() {\n return dbConnect;\n }", "public static DatabaseConnection getDb() {\n return db;\n }", "public List<Connection> getReferenceDataConnections()\n {\n if (referenceDataConnections == null)\n {\n return null;\n }\n else if (referenceDataConnections.isEmpty())\n {\n return null;\n }\n else\n {\n return referenceDataConnections;\n }\n }", "public static Connection getConnection() {\n return singleInstance.createConnection();\n }", "@Override\n public Map<String, List<Connection>> getAll() {\n return null;\n }", "public Connection getConexao() {\t\n\t\ttry {\n\t\t\t\n\t\t\tif (this.conn!=null) {\n\t\t\t\treturn this.conn;\n\t\t\t}\n\t\t\t\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/\"+this.db,this.user,this.pass);\n\t\t\t\n\t\t} catch(Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn this.conn;\n\t}", "public Connection getConnection();", "public Connection getConnection();", "public Connection getConnection();", "public Connection getConnection(){\n try{\n if(connection == null || connection.isClosed()){\n connection = FabricaDeConexao.getConnection();\n return connection;\n } else return connection;\n } catch (SQLException e){throw new RuntimeException(e);}\n }", "public Connection getDBConnection() {\n Connection con = connectDB();\n createTables(con);\n return con;\n }", "public Integer getConnection(int index) {\n\t\treturn connections.get(index);\n\t}", "public IDatabaseConnection getConnection() {\n try {\n DatabaseConnection databaseConnection = new DatabaseConnection(getDataSource().getConnection());\n editConfig(databaseConnection.getConfig());\n return databaseConnection;\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "@Override\n public Connection getConnection() {\n boolean createNewConnection = false;\n Connection returnConnection = null;\n synchronized (connections) { //Lock the arraylist\n if (connections.isEmpty()) { //Check if any connections available\n createNewConnection = true; //If not, create new one\n } else {\n returnConnection = connections.get(0); //Get first available one\n connections.remove(0); //And remove from list\n }\n }\n if (createNewConnection) { //If new connection needed\n returnConnection = createConnection();\n }\n return returnConnection;\n }", "public ChannelGroup getConnections();", "public Connection connection()\n {\n String host = main.getConfig().getString(\"db.host\");\n int port = main.getConfig().getInt(\"db.port\");\n String user = main.getConfig().getString(\"db.user\");\n String password = main.getConfig().getString(\"db.password\");\n String db = main.getConfig().getString(\"db.db\");\n\n MysqlDataSource dataSource = new MysqlDataSource();\n dataSource.setServerName(host);\n dataSource.setPort(port);\n dataSource.setUser(user);\n if (password != null ) dataSource.setPassword(password);\n dataSource.setDatabaseName(db);\n Connection connection = null;\n try\n {\n connection = dataSource.getConnection();\n }\n catch (SQLException sqlException)\n {\n sqlException.printStackTrace();\n }\n return connection;\n }", "public Connection getDatabaseConnection() {\n return con;\n }", "public Connection getConnection() {\n return conn;\n }", "public Connection getConnection() {\n return conn;\n }", "public synchronized List<ServerThread> getConnectionArray() {\r\n return connectionArray;\r\n }", "Optional<List<ConnectionResponse>> retrieveConnections();", "public Connection getConnection() throws SQLException{\n return ds.getConnection();\n }", "Vector<JPPFClientConnection> getAvailableConnections();", "public static Connection getConn() {\n return conn;\n }", "public Connection getConnection() {\n try {\n return dataSource.getConnection();\n } catch (SQLException e) {\n e.printStackTrace();\n return null;\n }\n }", "public Connection getConnection() {\n if(connection == null) throw new RuntimeException(\"Attempt to get database connection before it was initialized\");\n return connection;\n }", "public static Connection GetConnection() throws SQLException {\n return connectionPool.getConnection();\n }", "io.netifi.proteus.admin.om.ConnectionOrBuilder getConnectionsOrBuilder(\n int index);", "public static Connection getConnection() {\n\t\treturn null;\r\n\t}", "public Connection getConnection() {\n this.connect();\n return this.connection;\n }", "public static Connection getDbConnection() throws SQLException {\n return getDbConnection(FxContext.get().getDivisionId());\n }", "@Override\r\n\tpublic Connection getConnection() throws SQLException {\n\t\tif(listConnection.size() > 0){\r\n\t\t\tfinal Connection conn = listConnection.removeFirst();\r\n\t\t\treturn (Connection) Proxy.newProxyInstance(JdbcPool.class.getClassLoader(),\r\n\t\t\t\t\tconn.getClass().getInterfaces(), \r\n\t\t\t\t\tnew InvocationHandler() {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\r\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\tif(!method.getName().equals(\"close\")){\r\n\t\t\t\t\t\t\t\treturn method.invoke(conn, args);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tlistConnection.add(conn);\r\n\t\t\t\t\t\t\t\treturn null;\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}else{\r\n\t\t\tthrow new RuntimeException(\"对不起,数据库忙\");\r\n\t\t}\r\n\t}", "public String getConnection();", "public static Connection getConnection() {\n\t\ttry {\n\t\t\treturn DBUtil.getInstance().ds.getConnection();\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 null;\n\n\t}", "List<storage_server_connections> getAllForStoragePool(Guid pool);", "private Connection getConnection() throws SQLException{\n return ds.getConnection();\n }", "@Override\n\tpublic Connection getConnection() throws SQLException {\n\t\tConnection conn;\n\t\tconn = ConnectionFactory.getInstance().getConnection();\n\t\treturn conn;\n\t}", "public static Connection getConnection() {\n\t\treturn null;\n\t}", "public List<Connection> getConnections(int fromNode) {\r\n\t\tList<Connection> list = new ArrayList<Connection>();\r\n\t\tif (connectionLists.containsKey(fromNode))\r\n\t\t\tlist = connectionLists.get(fromNode);\r\n\t\treturn list;\r\n\t}", "private Connection getConn(){\n \n return new util.ConnectionPar().getConn();\n }", "public static MyConnection getConnection() throws SQLException{\n\t\treturn MyConnection.getConnection();\n\t}", "public final Connection getConnection() throws SQLException {\n\t\tString[] threadCredentials = (String[]) this.threadBoundCredentials.get();\n\t\tif (threadCredentials != null) {\n\t\t\treturn doGetConnection(threadCredentials[0], threadCredentials[1]);\n\t\t}\n\t\telse {\n\t\t\treturn doGetConnection(this.username, this.password);\n\t\t}\n\t}", "private synchronized Connection getConnection() throws SQLException {\n return datasource.getConnection();\r\n }", "protected Connection getConnection() {\n return con;\n }", "public static Connection getConnection() {\n\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = getConnectionPool().getConnection();\n\t\t} catch (Exception e) {\n\n\t\t\tthrow new SystemException(\"Getting Connection from DB Connection Pool\",e,SystemCode.UNABLE_TO_EXECUTE);\n\t\t}\n\t\treturn conn;\n\n\t}", "public Connection getConnection() {\n\n\t\tConnection conn=null;\n\n\t\tif(available){\n\t\t\tboolean gotOne = false;\n\n\t\t\tfor(int outerloop=1; outerloop<=10; outerloop++) {\n\n\t\t\t\ttry {\n\t\t\t\t\tint loop=0;\n\t\t\t\t\tint roundRobin = connLast + 1;\n\t\t\t\t\tif(roundRobin >= currConnections) roundRobin=0;\n\n\t\t\t\t\tdo {\n\t\t\t\t\t\tsynchronized(connStatus) {\n\t\t\t\t\t\t\tif((connStatus[roundRobin] < 1) &&\n\t\t\t\t\t\t\t\t\t(! connPool[roundRobin].isClosed())) {\n\t\t\t\t\t\t\t\tconn = connPool[roundRobin];\n\t\t\t\t\t\t\t\tconnStatus[roundRobin]=1;\n\t\t\t\t\t\t\t\tconnLockTime[roundRobin] =\n\t\t\t\t\t\t\t\t\t\tSystem.currentTimeMillis();\n\t\t\t\t\t\t\t\tconnLast = roundRobin;\n\t\t\t\t\t\t\t\tgotOne = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tloop++;\n\t\t\t\t\t\t\t\troundRobin++;\n\t\t\t\t\t\t\t\tif(roundRobin >= currConnections) roundRobin=0;\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\twhile((gotOne==false)&&(loop < currConnections));\n\n\t\t\t\t}\n\t\t\t\tcatch (SQLException e1) {\n\t\t\t\t\tlog.println(\"Error: \" + e1);\n\t\t\t\t}\n\n\t\t\t\tif(gotOne) {\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tsynchronized(this) { // Add new connections to the pool\n\t\t\t\t\t\tif(currConnections < maxConns) {\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tcreateConn(currConnections);\n\t\t\t\t\t\t\t\tcurrConnections++;\n\t\t\t\t\t\t\t} catch(SQLException e) {\n\t\t\t\t\t\t\t\tif(debugLevel > 0) {\n\t\t\t\t\t\t\t\t\tlog.println(\"Error: Unable to create new connection: \" + e);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttry { Thread.sleep(2000); }\n\t\t\t\t\tcatch(InterruptedException e) {}\n\t\t\t\t\tif(debugLevel > 0) {\n\t\t\t\t\t\tlog.println(\"-----> Connections Exhausted! Will wait and try again in loop \" +\n\t\t\t\t\t\t\t\tString.valueOf(outerloop));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} // End of try 10 times loop\n\n\t\t} else {\n\t\t\tif(debugLevel > 0) {\n\t\t\t\tlog.println(\"Unsuccessful getConnection() request during destroy()\");\n\t\t\t}\n\t\t} // End if(available)\n\n\t\tif(debugLevel > 2) {\n\t\t\tlog.println(\"Handing out connection \" +\n\t\t\t\t\tidOfConnection(conn) + \" --> \" +\n\t\t\t\t\t(new SimpleDateFormat(\"MM/dd/yyyy hh:mm:ss a\")).format(new java.util.Date()));\n\t\t}\n\n\t\treturn conn;\n\n\t}", "public static Collection<? extends ActiveHTTPConnection> getOpenConnections() {\n return openConnections.values();\n }", "private Connection getDb() throws TzException {\n if (conn != null) {\n return conn;\n }\n\n try {\n dbPath = cfg.getDbPath();\n\n if (debug()) {\n debug(\"Try to open db at \" + dbPath);\n }\n\n conn = DriverManager.getConnection(\"jdbc:h2:\" + dbPath,\n \"sa\", \"\");\n\n final ResultSet rset =\n conn.getMetaData().getTables(null, null,\n aliasTable, null);\n if (!rset.next()) {\n clearDb();\n loadInitialData();\n }\n } catch (final Throwable t) {\n // Always bad.\n error(t);\n throw new TzException(t);\n }\n\n return conn;\n }", "public Connection getConnection() {\r\n\tConnection result = null;\r\n\tif (isConnected()) {\r\n\t result = conn;\r\n\t}\r\n\treturn result;\r\n }", "public\n Connection getConnection();", "@Override\n public int getNumConnections()\n {\n return connections.size();\n }", "private Connection getConnection() {\n if ( conn==null ) {\n conn = Util.getConnection( \"root\", \"\" );\n }\n return conn;\n }", "public Connection getConnection()\n\t{\n\t\treturn connection;\n\t}", "public static String getConnectionDB(){\n return \"jdbc:mysql://\" + hostname +\":\"+ port+\"/\" + database;\n }", "public Connection getConnection() {\n \t\treturn this.connect;\n \t}", "public Connection getConnection() {\n if (con == null) {\n try {\n con = DriverManager.getConnection(url, user, password);\n return con;\n } catch (SQLException e) {\n System.err.println(e.getMessage());\n }\n }\n\n return con;\n }", "public synchronized Connection getConnection() throws Exception{\n System.err.println(\"START ConnectionPool.getConnection()\");\n PooledConnection pcon = null;\n System.err.print(\"pool size = \");\n System.err.println(pool.size());\n // Find a connection not in use\n for(int x=0; x<pool.size();x++){\n pcon = (PooledConnection)pool.elementAt(x);\n //Check to see if this connection is in use\n if(!pcon.inUse()){\n // Mark it as in use\n pcon.setInUse(true);\n // Return the JDBC conn stored in the PooledConnection object\n return pcon.getConnection();\n }\n }\n //Could not find a free connection, create and add a new one\n try{\n //Create a new JDBC Connection\n Connection con = createConnection();\n //Create a new PooledConnection, passing it the JDBC Connection\n pcon = new PooledConnection(con);\n //Mark the connection in use\n pcon.setInUse(true);\n //Add the new PooledConnection object to the pool\n pool.addElement(pcon);\n }catch(Exception e){\n System.err.println(e.getMessage() + \" in ConnectionPool.getConnection()\");\n }\n System.err.println(\"END ConnectionPool.getConnection()\");\n return pcon.getConnection();\n }", "protected IXConnection getConnection() {\n return eloCmisConnectionManager.getConnection(this.getCallContext());\n }", "public Connection getConnection() throws SQLServerException\n {\n return ds.getConnection();\n }", "public void getConnect() \n {\n con = new ConnectDB().getCn();\n \n }", "public Connection getConnection(){\n\t\tif(connection == null){\r\n\t\t\tinitConnection();\r\n\t\t}\r\n\t\treturn connection;\r\n\t}", "@Override\r\n\tpublic int getConnectionsCount() {\r\n\t\treturn currentConnections.get();\r\n\t}", "private Connection dbConnection() {\n\t\t\n\t\t///\n\t\t/// declare local variables\n\t\t///\n\t\t\n\t\tConnection result = null;\t// holds the resulting connection\n\t\t\n\t\t// try to make the connection\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t\tresult = DriverManager.getConnection(CONNECTION_STRING);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t\t\n\t\t// return the resulting connection\n\t\treturn result;\n\t\t\n\t}", "java.util.List<? extends io.netifi.proteus.admin.om.ConnectionOrBuilder> \n getConnectionsOrBuilderList();", "public Connection getConnection(){\r\n\t\treturn connection;\r\n\t}", "public long getConnectionCount() {\n return connectionCount.getCount();\n }", "protected Connection getConnection() {\r\n\t\treturn getProcessor().getConnection();\r\n\t}", "public Connection getConnection() {\n return connection;\n }" ]
[ "0.7995651", "0.7977267", "0.7620424", "0.72459656", "0.7230828", "0.7118988", "0.711134", "0.70824856", "0.69824666", "0.6929356", "0.685584", "0.6774656", "0.6744135", "0.6719072", "0.667557", "0.6672409", "0.6659425", "0.6633351", "0.66196704", "0.66179395", "0.6595029", "0.65807533", "0.65759563", "0.6557384", "0.64851445", "0.6479333", "0.6466177", "0.64420503", "0.6440169", "0.639965", "0.63542837", "0.63463473", "0.63334584", "0.63322973", "0.63292426", "0.62983567", "0.62567747", "0.6248458", "0.6245631", "0.6245071", "0.6245071", "0.6245071", "0.6243625", "0.6228539", "0.6225481", "0.6214903", "0.62059885", "0.62009025", "0.619127", "0.61906374", "0.618346", "0.618346", "0.61826205", "0.6167498", "0.6158733", "0.61546594", "0.61536366", "0.6149086", "0.6132249", "0.61193365", "0.61182654", "0.6104383", "0.60883534", "0.6082086", "0.60782105", "0.6065631", "0.60638803", "0.60619736", "0.60556746", "0.6048375", "0.6046882", "0.60360086", "0.6025644", "0.60245657", "0.60214055", "0.6015798", "0.6009839", "0.6008542", "0.60080445", "0.60062426", "0.6005473", "0.60046875", "0.59767884", "0.5975818", "0.5973033", "0.59729546", "0.59639376", "0.5959646", "0.5953073", "0.5951154", "0.59414494", "0.5939474", "0.59356403", "0.5922765", "0.59144115", "0.5912197", "0.5910972", "0.5910603", "0.5898993", "0.58898944", "0.5884686" ]
0.0
-1
Inserts a new book into the database
public void insertBook(int ISBN, String BookName, String AuthorName, int Price) { String sql = "INSERT INTO books (ISBN, BookName, AuthorName, Price) VALUES(?,?,?,?)"; try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) { // Set values pstmt.setInt(1, ISBN); pstmt.setString(2, BookName); pstmt.setString(3, AuthorName); pstmt.setInt(4, Price); pstmt.executeUpdate(); } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void insertBook() {\n /// Create a ContentValues object with the dummy data\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_BOOK_NAME, \"Harry Potter and the goblet of fire\");\n values.put(BookEntry.COLUMN_BOOK_PRICE, 100);\n values.put(BookEntry.COLUMN_BOOK_QUANTITY, 2);\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER_NAME, \"Supplier 1\");\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER_PHONE, \"972-3-1234567\");\n\n // Insert the dummy data to the database\n Uri uri = getContentResolver().insert(BookEntry.CONTENT_URI, values);\n // Show a toast message\n String message;\n if (uri == null) {\n message = getResources().getString(R.string.error_adding_book_toast).toString();\n } else {\n message = getResources().getString(R.string.book_added_toast).toString();\n }\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }", "boolean insertBook(Book book);", "@Override\n\tpublic String insertBook(Book book) {\n\t\treturn \"Book successfully inserted\";\n\t}", "public void insertBooking(Booking booking) throws SQLException, Exception;", "String insert(BookDO record);", "int insert(BookInfo record);", "int insert(Book record);", "int insert(Book record);", "private void insertDummyBook() {\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_NAME, getString(R.string.dummy_book_name));\n values.put(BookEntry.COLUMN_GENRE, BookEntry.GENRE_SELF_HELP);\n values.put(BookEntry.COLUMN_PRICE, getResources().getInteger(R.integer.dummy_book_price));\n values.put(BookEntry.COLUMN_QUANTITY, getResources().getInteger(R.integer.dummy_book_quantity));\n values.put(BookEntry.COLUMN_SUPPLIER, getString(R.string.dummy_book_supplier));\n values.put(DatabaseContract.BookEntry.COLUMN_SUPPLIER_PHONE, getString(R.string.dummy_supplier_phone_number));\n values.put(DatabaseContract.BookEntry.COLUMN_SUPPLIER_EMAIL, getString(R.string.dummy_book_supplier_email));\n getContentResolver().insert(BookEntry.CONTENT_URI, values);\n }", "int insert(CmsRoomBook record);", "public void addLivros( LivroModel book){\n Connection connection=ConexaoDB.getConnection();\n PreparedStatement pStatement=null;\n try {\n String query=\"Insert into book(id_book,title,author,category,publishing_company,release_year,page_number,description,cover)values(null,?,?,?,?,?,?,?,?)\";\n pStatement=connection.prepareStatement(query);\n pStatement.setString(1, book.getTitulo());\n pStatement.setString(2, book.getAutor());\n pStatement.setString(3, book.getCategoria());\n pStatement.setString(4, book.getEditora());\n pStatement.setInt(5, book.getAnoDeLancamento());\n pStatement.setInt(6, book.getPaginas());\n pStatement.setString(7, book.getDescricao());\n pStatement.setString(8, book.getCapa());\n pStatement.execute();\n } catch (Exception e) {\n \n }finally{\n ConexaoDB.closeConnection(connection);\n ConexaoDB.closeStatement(pStatement);\n }\n }", "@Override\r\n\tpublic int insertBook(Book book) {\n\t\treturn 0;\r\n\t}", "public void insertBook(){\n\n // Create a new map of values, where column names are the keys\n ContentValues values = new ContentValues();\n values.put(BookContract.BookEntry.COLUMN_PRODUCT_NAME, \"You Do You\");\n values.put(BookContract.BookEntry.COLUMN_PRICE, 10);\n values.put(BookContract.BookEntry.COLUMN_QUANTITY, 20);\n values.put(BookContract.BookEntry.COLUMN_SUPPLIER_NAME, \"Kedros\");\n values.put(BookContract.BookEntry.COLUMN_SUPPLIER_PHONE_NUMBER, \"210 27 10 48\");\n\n Uri newUri = getContentResolver().insert(BookContract.BookEntry.CONTENT_URI, values);\n }", "public com.huqiwen.demo.book.model.Books create(long bookId);", "@Override\r\n\tpublic void storedBook(Book book) {\n\t\tticketDao.insertBook(book);\r\n\t}", "public boolean insertBook(Book book) {\r\n books.add(book);\r\n return true;\r\n }", "public void create(String title, String numPages, String quantity, String category, String price, String publicationYear, String[] authorsId, String publisherId) {\n System.out.println(\"creating book \" + title + \" by \"+ authorsId[0] + \" published by \" + publisherId);\n dbmanager.open();\n \n JSONObject item = new JSONObject();\n item.put(\"idBOOK\", dbmanager.getNextId());\n item.put(\"title\", title);\n item.put(\"numPages\", numPages);\n item.put(\"quantity\", quantity);\n item.put(\"category\", category);\n item.put(\"price\", price);\n item.put(\"publicationYear\", publicationYear);\n item.put(\"authors\", authorsId); \n item.put(\"publisher\", publisherId);\n\n dbmanager.createCommit(getNextBookId(),item);\n \n dbmanager.close();\n }", "@Override\n\tpublic Book createBook(Book book) throws SQLException {\n\t\ttry {\n\t\t\treturn dao.insertBook(book);\n\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}return book;\n\t}", "public int addBook(Book addBook) throws Exception {\r\n\r\n\t\tString insert = \"INSERT into book\" + \"(title,description,date,author,isbn,price) VALUES \" + \" (?,?,?,?,?,?)\";\r\n\t\tint result = 0;\r\n\r\n\t\ttry (\r\n\t\t\t\t// Class.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\t\tConnection connection = DriverManager.getConnection(\r\n\t\t\t\t\t\t\"jdbc:mysql://localhost:3306/sjsu_textbookstore?autoReconnect=true&useSSL=false\", \"root\",\r\n\t\t\t\t\t\t\"N00bcakes\");\r\n\r\n\t\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(insert)) {\r\n\t\t\tpreparedStatement.setString(1, addBook.getTitle());\r\n//\t\t\t\tpreparedStatement.setInt(2, acc.getAccount_id());\r\n\t\t\tpreparedStatement.setString(2, addBook.getDescription());\r\n\t\t\tpreparedStatement.setDate(3, getCurrentDate());\r\n\t\t\tpreparedStatement.setString(4, addBook.getAuthor());\r\n\t\t\tpreparedStatement.setString(5, addBook.getIsbn());\r\n\t\t\tpreparedStatement.setString(6, addBook.getPrice());\r\n\r\n\t\t\tSystem.out.println(preparedStatement);\r\n\t\t\tresult = preparedStatement.executeUpdate();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn 0;\r\n\r\n\t}", "public void create(Book book) {\n\t\tentityManager.persist(book);\n\t\tSystem.out.println(\"BookDao.create()\" +book.getId());\n\t\t\n\t}", "public boolean insertBook(Book book) {\n \tassert _loggerHelper != null;\n \t\n \tif (book == null) {\n \t\tthrow new IllegalArgumentException();\n \t}\n \t\n \tboolean result = insertBook(book, false);\n \t_loggerHelper.logInfo(result ? \"Book was succesfully inserted\" : \"Book insertion failed\");\n \treturn result;\n }", "public boolean addBook(Books books){\n String sql=\"insert into Book(book_name,book_publish_date,book_author,book_price,scraption)values(?,?,?,?,?)\";\n boolean flag=dao.exeucteUpdate(sql,new Object[]{books.getBook_name(),books.getBook_publish_date(),\n books.getBook_author_name(),books.getBook_price(),books.getScraption()});\n return flag;\n }", "public static void addBook(Book book) throws HibernateException{\r\n session=sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n //Insert detail of the book to the database\r\n session.save(book);\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n }", "@Override\r\n\tpublic Book addBook(Book book) {\n\t\treturn bd.save(book);\r\n\t}", "public void insert() throws SQLException;", "int insert(IntegralBook record);", "@Override\n public int addBook(Book book) throws DaoException {\n DataBaseHelper helper = new DataBaseHelper();\n ResultSet resultSet = null;\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statementAdd =\n helper.prepareStatementAdd(connection, book);\n PreparedStatement statementSelect =\n helper.prepareStatementSelect(connection, book)) {\n statementAdd.executeUpdate();\n resultSet = statementSelect.executeQuery();\n resultSet.next();\n return new BookCreator().getBookId(resultSet);\n } catch (SQLException e) {\n throw new DaoException(e);\n } finally {\n close(resultSet);\n }\n }", "@Override\r\n\tpublic boolean addBook(BookDto book) {\n\t\tsqlSession.insert(ns + \"addBook\", book);\t\t\r\n\t\treturn true;\r\n\t}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tStoredBookDAO storeBookDAO = new StoredBookDAO(BookInfoActivity.this);\n\t\t\tBookStoredEntity testBookBorrowedEntity1 = new BookStoredEntity();\n\t\t\ttestBookBorrowedEntity1.setBookId(\"1\");\n\t\t\ttestBookBorrowedEntity1.setBookText(\"android\");\n\t\t\ttestBookBorrowedEntity1.setBookImageUrl(\"android\");\n\t\t\ttestBookBorrowedEntity1.setBookPress(\"android\");\n\t\t\ttestBookBorrowedEntity1.setBookPressTime(\"android\");\n\t\t\tstoreBookDAO.insert(testBookBorrowedEntity1);\n\t\t\tToast.makeText(BookInfoActivity.this, R.string.storesuccess, Toast.LENGTH_SHORT).show();\n\t\t}", "public void registerBooks(Book b) {\n\t\ttry (PreparedStatement stmt = LibraryConnection.getConnection()\n\t\t\t\t.prepareStatement(\n\t\t\t\t\t\t\"INSERT INTO book(isbn, title) VALUES ( ?, ?)\");) {\n\t\t\tstmt.setString(1, b.getIsbn());\n\t\t\tstmt.setString(2, b.getTitle());\n\t\t\tstmt.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void addBook(final @Valid Book book) {\n\t\tif (book.serie.id == null) {\r\n\t\t\tValidation.required(\"book.serie.name\", book.serie.name);\r\n\r\n\t\t\tif (book.serie.name != null) {\r\n\t\t\t\tSerie serie = Serie.find(\"byName\", book.serie.name).first();\r\n\t\t\t\tif (serie != null) {\r\n\t\t\t\t\tValidation.addError(\"book.serie.name\",\r\n\t\t\t\t\t\t\t\"La série existe déjà\",\r\n\t\t\t\t\t\t\tArrayUtils.EMPTY_STRING_ARRAY);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Validation errror treatment\r\n\t\tif (Validation.hasErrors()) {\r\n\r\n\t\t\tif (Logger.isDebugEnabled()) {\r\n\t\t\t\tfor (play.data.validation.Error error : Validation.errors()) {\r\n\t\t\t\t\tLogger.debug(error.message() + \" \" + error.getKey());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Specific treatment for isbn, just to provide example\r\n\t\t\tif (!Validation.errors(\"book.isbn\").isEmpty()) {\r\n\t\t\t\tflash.put(\"error_isbn\", Messages.get(\"error.book.isbn.msg\"));\r\n\t\t\t}\r\n\r\n\t\t\tparams.flash(); // add http parameters to the flash scope\r\n\t\t\tValidation.keep(); // keep the errors for the next request\r\n\t\t} else {\r\n\r\n\t\t\t// Create serie is needed\r\n\t\t\tif (book.serie.id == null) {\r\n\t\t\t\tbook.serie.create();\r\n\t\t\t}\r\n\r\n\t\t\tbook.create();\r\n\r\n\t\t\t// Send WebSocket message\r\n\t\t\tWebSocket.liveStream.publish(MessageFormat.format(\r\n\t\t\t\t\t\"La BD ''{0}'' a été ajoutée dans la série ''{1}''\",\r\n\t\t\t\t\tbook.title, book.serie.name));\r\n\r\n\t\t\tflash.put(\"message\",\r\n\t\t\t\t\t\"La BD a été ajoutée, vous pouvez créer à nouveau.\");\r\n\t\t}\r\n\r\n\t\tBookCtrl.prepareAdd(); // Redirection toward input form\r\n\t}", "@Override\n\tpublic void add() {\n\t\tHashMap<String, String> data = new HashMap<>();\n\t\tdata.put(\"title\", title);\n\t\tdata.put(\"author\", author);\n\t\tdata.put(\"publisher\", publisher);\n\t\tdata.put(\"isbn\", isbn);\n\t\tdata.put(\"bookID\", bookID);\n\t\tHashMap<String, Object> result = null;\n\t\tString endpoint = \"bookinfo/post.php\";\n\t\ttry {\n\t\t\tresult = APIClient.post(BookInfo.host + endpoint, data);\n\t\t\tvalid = result.get(\"status_code\").equals(\"Success\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public int insert(Listing listing) throws SQLException;", "public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}", "void insert(BnesBrowsingHis record) throws SQLException;", "@Override\n\tpublic void insertBookData(BookingBus b) {\n\t\tuserdao.insertBookData(b);\n\t}", "@Override\n\tpublic int insertWannaBook(WannaBookVO wannaBookvo) throws RemoteException {\n\t\treturn 0;\n\t}", "public void insert(BibliographicDetails bibDetails) {\n\n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n try {\n tx = session.beginTransaction();\n session.save(bibDetails);\n tx.commit();\n } catch (RuntimeException e) {\n \n tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n }", "public boolean add(Book item) {\r\n\t\ttry {\t\r\n\t\t\topenConnection();\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\tString sql = \"INSERT INTO db VALUES ('\" + item.ISBN13 + \"', '\" \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ item.title + \"', '\" \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ item.author + \"', '\" \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ item.publisher + \"', '\" \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ item.year + \"', '\" \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ item.ISBN10 + \"', '\" \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ item.link + \"', '1')\";\r\n\t\t\tstmt.executeUpdate(sql);\r\n\t\t\tSystem.out.println(item.title + \" added into the database\");\r\n\t\t\treturn true;\r\n\t\t} catch (SQLException e) {\t\t\r\n\t\t\t//e.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tcloseConnection();\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void addBook() {\n\t\t JTextField callno = new JTextField();\r\n\t\t JTextField name = new JTextField();\r\n\t\t JTextField author = new JTextField(); \r\n\t\t JTextField publisher = new JTextField(); \r\n\t\t JTextField quantity = new JTextField(); \r\n\t\t Object[] book = {\r\n\t\t\t\t \"Callno:\",callno,\r\n\t\t\t\t \"Name:\",name,\r\n\t\t\t\t \"Author:\",author,\r\n\t\t\t\t \"Publisher:\",publisher,\r\n\t\t\t\t \"Quantity:\",quantity\r\n\t\t\t\t\r\n\t\t };\r\n\t\t int option = JOptionPane.showConfirmDialog(null, book, \"New book\", JOptionPane.OK_CANCEL_OPTION);\r\n\t\t if(option==JOptionPane.OK_OPTION) {\r\n // add to the Book database\r\n\t\t try {\r\n\t\t\t \r\n\t\t String query = \"insert into Book(callno,name,author,publisher,quantity,added_date)\"\r\n\t\t\t\t +\" values(?,?,?,?,?,GETDATE())\";\r\n\t\t \r\n\t\t PreparedStatement s = SimpleLibraryMangement.connector.prepareStatement(query);\r\n\t\t s.setString(1, callno.getText());\r\n\t\t s.setString(2, name.getText());\r\n\t\t s.setString(3, author.getText());\r\n\t\t s.setString(4, publisher.getText());\r\n\t s.setInt(5, Integer.parseInt(quantity.getText()));\r\n\t\t s.executeUpdate();\r\n\t\t JOptionPane.showMessageDialog(null, \"Add book successfully\", null, JOptionPane.INFORMATION_MESSAGE);\r\n\r\n\t\t } catch(Exception e) {\r\n\t\t\t JOptionPane.showMessageDialog(null, \"Add book 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 persistBook(Book book) {\n\t\tEntityManager entityManager = factory.createEntityManager();\n\t\t// User user = new User(\"someuser2\",\"password2123\");\n\t\tentityManager.getTransaction().begin();\n\t\tentityManager.persist(book);\n\t\tentityManager.getTransaction().commit();\n\t\tSystem.out.println(\"added Book\");\n\t}", "public void addnew(book newbook) {\n\t\trepository.save(newbook);\n\t\t\n\t}", "public void reserveBook(String cardNo, String book_id) throws SQLException {\n\t\tPreparedStatement myStmt = null;\n\t\t\n\t\tString query = \" insert into book_loans (book_id, branch_id, card_no, date_out, date_due)\"\n\t\t + \" values (?, 9745, ?, curdate(), curdate()+7)\";\n\t\t\n\t\tmyStmt = myConn.prepareStatement(query);\n\t\t\n\t\tmyStmt.setString(1, book_id);\n\t\tmyStmt.setString(2, cardNo);\n\t\t\n\t\t\n\t\t\n\t\tmyStmt.execute();\n\t\t\n\t}", "public void insert() throws SQLException {\n String sql = \"INSERT INTO course (courseDept, courseNum, courseName, credit, info) \"\n + \" values ('\"\n + this.courseDept + \"', '\"\n + this.courseNum + \"', '\"\n + this.courseName + \"', \"\n + this.credit + \", '\"\n + this.info + \"')\";\n\n DatabaseConnector.updateQuery(sql);\n }", "public static Response createBook(String title, double price){\n Book b = new Book();\n b.setTitle(title);\n b.setPrice(price);\n EntityTransaction t = em.getTransaction();\n t.begin();\n em.persist(b);\n t.commit();\n return Response.ok().build();\n }", "public void insert(TdiaryArticle obj) throws SQLException {\n\r\n\t}", "public Book createBook(Book newBook) {\n\t\treturn this.sRepo.save(newBook);\n\t}", "public void createbook(Author a, Connection c) throws SQLException{\n\t a.insert(c, \"While the cows lie\", \"Cows are big and cannot run\", 2, 2, 0);\r\n\t\t\r\n\t\t\r\n\t\t//a.createTable(c);\r\n\t\t//String chapName= \"Toodloo\";\r\n\t\t//String chap = \"Bippidee boppidee\";\r\n\t\t//a.insert(c, chapName, chap);\r\n\t\t//a.viewnextchap(c,2);\r\n\t\t//a.getNextChap(c, 2);\r\n\t}", "@PostMapping(\"/books\")\n\tpublic Book createBook(@RequestBody Book book)\n\t{\n\t\treturn bookRepository.save(book);\n\t}", "public void insertFavoriteBook(BookTable bookTable) {\n new InsertFavoriteBookAsyncTask(bookTableDAO).execute(bookTable);\n }", "int insert(Course record);", "int insert(Course record);", "@Test\n\tpublic void addBook_EmptyTitle(){\n\t\tBook b = new Book(\"abc\", \"\");\n\t\tassertTrue(db.putBook(b));\n\t}", "int insertSelective(Book record);", "int insertSelective(Book record);", "public static void AddBooking(Booking booking){\n \n \n try (Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM booking\")){\n \n resultSet.moveToInsertRow();\n resultSet.updateInt(\"BookingNumber\", booking.getBookingNumber());\n resultSet.updateString(\"FlightNumber\", booking.getFlightNumber());\n resultSet.updateDouble(\"Price\", booking.getPrice());\n resultSet.updateString(\"CabinClass\", booking.getCabinClass());\n resultSet.updateInt(\"Quantity\", booking.getQuantity());\n resultSet.updateInt(\"Insurance\", booking.getInsurance());\n resultSet.insertRow();\n \n \n }\n catch(SQLException sqle){\n System.out.println(sqle.toString());\n } \n \n \n \n \n }", "int insertSelective(BookInfo record);", "public void insertCourse(){\n \n }", "String insertSelective(BookDO record);", "public void addCertainRow(String bookname, String ISBN, String author, String description,\n String quantity, String publisher, String category)\n {\n String insertStr;\n try{\n\n insertStr=\"INSERT IGNORE INTO material (bookname, ISBN, author, description, quantity, publisher, category) VALUES(\"\n +quotate(bookname)+\",\"\n +quotate(ISBN)+\",\"\n +quotate(author)+\",\"\n +quotate(publisher)+\",\"\n +quotate(quantity)+\",\"\n +quotate(publisher)+\",\"\n +quotate(category)\n +\")\";\n\n stmt.executeUpdate(insertStr);\n\n } catch(Exception e){\n System.out.println(\"Error occurred in inserting data\");\n }\n return;\n }", "int insert(AuthorDO record);", "int insertao(Author_of ao){\r\n int res=0;\r\n \r\n String a = \"INSERT INTO author_of VALUES(?,?);\";\r\n try {\r\n PreparedStatement statement = this.connection.prepareStatement(a);\r\n statement.setString(1, ao.getIsbn());\r\n statement.setInt(2, ao.getAuthor_id());\r\n res = statement.executeUpdate();\r\n statement.close(); //close\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n return res;\r\n }", "public void createBooking(Booking book) {\n\tStudentDAO studentDAO=new StudentDAO();\n\tstudentDAO.createBooking(book);\n}", "public void insert(){\r\n\t\tString query = \"INSERT INTO liveStock(name, eyeColor, sex, type, breed, \"\r\n\t\t\t\t+ \"height, weight, age, furColor, vetNumber) \"\r\n\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement prepareStatement = conn.prepareStatement(query);\r\n\t\t\t\r\n\t\t\tprepareStatement.setString(1, liveStock.getName());\r\n\t\t\tprepareStatement.setString(2, liveStock.getEyeColor());\r\n\t\t\tprepareStatement.setString(3, liveStock.getSex());\r\n\t\t\tprepareStatement.setString(4, liveStock.getAnimalType());\r\n\t\t\tprepareStatement.setString(5, liveStock.getAnimalBreed());\r\n\t\t\tprepareStatement.setString(6, liveStock.getHeight());\r\n\t\t\tprepareStatement.setString(7, liveStock.getWeight());\r\n\t\t\tprepareStatement.setInt(8, liveStock.getAge());\r\n\t\t\tprepareStatement.setString(9, liveStock.getFurColor());\r\n\t\t\tprepareStatement.setInt(10, liveStock.getVetNumber());\r\n\t\t\t\r\n\t\t\tprepareStatement.execute();\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic boolean createBooking(Booking_IF bk) {\r\n\t\tPreparedStatement myStatement = null;\r\n\t\tString query = null;\r\n\t\tint count = 0;\r\n\t\ttry{\r\n\t\t\tquery = \"insert into Booking values(?,?);\";\r\n\t\t\tmyStatement = myCon.prepareStatement(query);\r\n\t\t\tmyStatement.setInt(2, bk.getUserid());\r\n\t\t\tmyStatement.setInt(1, bk.getShiftid());\r\n\t\t\tcount = myStatement.executeUpdate();\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally{\r\n\t\t\ttry {\r\n\t\t\t\tif (myStatement != null)\r\n\t\t\t\t\tmyStatement.close();\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(count!=1){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t}", "int insert(BlogDetails record);", "Reservierung insert(Reservierung reservierung) throws ReservierungException;", "public int insert(ReadBookVO readBookVO) {\n\t\t\n\t\tSystem.out.println(\"리드북브이오인서트\"+ readBookVO.toString());\n\t\t\n\t\tint ret = readBookDao.insert(readBookVO);\n\t\treturn ret;\n\t}", "void insert(GfanCodeBanner record) throws SQLException;", "public void insert() throws SQLException {\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n\n int check = BusinessFacade.getInstance().checkIDinDB(this.productRelation.getID(),\n this.post.getID(), \"goods\", \"product_type_id\", \"post_id\");\n if (check == -1){\n stmtIn.executeUpdate(\"INSERT INTO ngaccount.goods (goods_id , product_type_id, post_id) \" +\n \"VALUES ('\" + this.goodID + \"', '\" + this.productRelation.getID() +\n \"', '\" + this.post.getID() + \"');\");\n }\n }", "int insertSelective(CmsRoomBook record);", "public Book save(Book book) {\n return bookRepository.save(book);\n }", "public void insert(Connection c, String name, String chap, int bookid, int id, int parid) {\n\t\tString query = \"insert into Text-to-game values('\" + name + \"', \" + id + \", '\" + chap + \"', NULL)\";\r\n\t\t\r\n\t\t Statement stmt = null;\r\n\t\t try {\r\n\t\t stmt = c.createStatement();\r\n\t\t stmt.executeUpdate(query);\r\n\t\t } catch (SQLException e) {\r\n\t\t e.printStackTrace();\r\n\t\t } \r\n\t\t\r\n\t}", "public void insert(Student student) {\t\t\r\n\t\tdao.insertStudent(student); \r\n\t}", "public void insert(Connection db) throws SQLException {\n this.insert(db, this.questionId);\n }", "int insert(courses record);", "int insertp(Publisher p){\r\n String pu = \"INSERT INTO publisher(publisher_id,publisher_name) VALUES(?,?);\";\r\n int res=0;\r\n try {\r\n PreparedStatement statement = this.connection.prepareStatement(pu);\r\n statement.setInt(1, p.getPublisher_id());\r\n statement.setString(2, p.getPublisher_name());\r\n res = statement.executeUpdate();\r\n statement.close(); //close\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n return res;\r\n }", "int insert(Prueba record);", "int insert(Storydetail record);", "public void insert(Recipe recipe ) {\n\t\tSession session = sessionFactory.openSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\tsession.save(recipe);\n\t\ttx.commit();\n\t\tsession.close();\n\t}", "public void insert(long key,BookObj book)\r\n\t{\r\n\t\t//go through node to insert\r\n\t\troot = insert(root,key,book);\r\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\tString url = \"jdbc:oracle:thin:@192.168.0.22:1521:orcl\";\n\t\t\tString id = \"hrm\";\n\t\t\tString pass = \"hrm\";\n\t\t\tConnection conn = DriverManager.getConnection(url,id,pass);\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(\"select max(book_id) from books\");\n\t\t\trs.next();\n\t\t\tint value = rs.getInt(1);\n\t\t\t\n\t\t\tvalue = value + 1;\n\t\t\tString sql = \"insert into books(book_id,title,publisher,year,price)\"\n\t\t\t\t\t+ \" values(?,?,?,?,?)\";\n\t\t\tPreparedStatement psmt = conn.prepareStatement(sql);\n\t\t\t\n\t\t\tpsmt.setInt(1, value);\n\t\t\tpsmt.setString(2, members.t1title.getText());\n\t\t\tpsmt.setString(3, members.t2pub.getText());\n\t\t\tpsmt.setString(4, members.t3year.getText());\n\t\t\tpsmt.setString(5, members.t4price.getText());\n\t\t\t\n\t\t\tpsmt.executeUpdate();\n\t\t\tpsmt.close();\n\t\t\tconn.close();\n\t\t} catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void post(BookCopies object) throws SQLException {\n\t\t\n\t}", "public void insert() throws SQLException {\r\n\t\t//SQL-Statement\r\n\r\n\t\tString sql = \"INSERT INTO \" + table +\" VALUES (\" + seq_genreID +\".nextval, ?)\";\r\n\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tstmt.setString(1, this.getGenre());\r\n\r\n\t\tint roswInserted = stmt.executeUpdate();\r\n\t\tSystem.out.println(\"Es wurden \" +roswInserted+ \"Zeilen hinzugefügt\");\r\n\r\n\t\tsql = \"SELECT \"+seq_genreID+\".currval FROM DUAL\";\r\n\t\tstmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tResultSet rs = stmt.executeQuery();\r\n\t\tif(rs.next())this.setGenreID(rs.getInt(1));\r\n\t\trs.close();\r\n\t\tstmt.close();\r\n\t}", "public void insertDB() {\n //defines Connection con as null\n Connection con = MainWindow.dbConnection();\n try {\n //tries to create a SQL statement to insert values of a User object into the database\n String query = \"INSERT INTO User VALUES ('\" + userID + \"','\" + password + \"','\" + firstName + \"','\" +\n lastName + \"');\";\n Statement statement = con.createStatement();\n statement.executeUpdate(query);\n //shows a message that a new user has been added successfully\n System.out.println(\"new user has been added into the data base successfully\");\n } catch (Exception e) {\n //catches exceptions and show message about them\n System.out.println(e.getMessage());\n Message errorMessage = new Message(\"Error\", \"Something wrong happened, when there was a attempt to add user into the database. Try again later.\");\n }//end try/catch\n //checks if Connection con is equaled null or not and closes it.\n MainWindow.closeConnection(con);\n }", "int insert(TrainingCourse record);", "public static int insert(Booking b)\n {\n Connection con = MyConnection.connect();\n int row_insert = 0;\n try\n {\n // Qry 1 -> Patient Booking\n String qry1 = \"insert into patient(name,phone,dob,problem) values(?,?,?,?)\";\n PreparedStatement stmt = con.prepareStatement(qry1);//query getting pre-compile\n //setting column values in student table\n \n stmt.setString(1,b.getName());\n stmt.setInt(2,b.getPhone());\n \n stmt.setString(3, b.getDob());\n stmt.setString(4, b.getProblem());\n \n row_insert = stmt.executeUpdate();\n }//try ends\n catch(Exception ex)\n {\n System.out.println(\"Insert error :\"+ex);//print error on server logs\n }//catch ends\n return row_insert;\n }", "@Override\n\tpublic void insert(String... args) throws SQLException {\n\t\t\n\t}", "public void insert(){\n Connection conn = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n \n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n conn = DriverManager.getConnection(\n \"jdbc:mysql://localhost:3306/process_checkout\",\"root\",\"\"\n );\n \n String query = \"INSERT INTO area (name) VALUES (?)\";\n \n PreparedStatement preparedStmt = conn.prepareStatement(query);\n preparedStmt.setString(1, name);\n preparedStmt.execute();\n \n }catch(SQLException e){\n \n } catch (ClassNotFoundException ex) {\n \n }finally{\n try {\n if(rs != null)rs.close();\n } catch (SQLException e) {\n /* ignored */ }\n try {\n if(ps != null)ps.close();\n } catch (SQLException e) {\n /* ignored */ }\n try {\n if(conn != null)conn.close();\n } catch (SQLException e) {\n /* ignored */ }\n }\n \n }", "void insert(OrderPreferential record) throws SQLException;", "int insert(Goods record);", "int insert(Cargo record);", "@Override\n\tpublic void insert(Connection c, Genre v) throws SQLException {\n\n\t}", "public void insertarRubro2(RubrosObject rubro) throws SQLException \r\n { \r\n PreparedStatement prepStmt = null;\r\n\r\n String insertStatement = \"INSERT INTO RUBROS (IDRUBRO, NOMBRE, MONTO, IDPRESUPUESTO,SALDO,TIPO_PAGO) VALUES (?,?,?,?,?,?)\";\r\n \r\n prepStmt = con.prepareStatement(insertStatement);\r\n \r\n prepStmt.setInt(1, Integer.parseInt(rubro.getIdentificador()));\r\n prepStmt.setString(2, rubro.getNombre());\r\n prepStmt.setDouble(3, Double.parseDouble(rubro.getMonto()));\r\n prepStmt.setInt(4, Integer.parseInt(rubro.getIdpresupuesto()));\r\n prepStmt.setDouble(5, Double.parseDouble(rubro.getMonto()));//EL SALDO SE INICIA IGUAL AL MONTO\r\n prepStmt.setString(6, rubro.getTipo_pago().trim());\r\n \r\n prepStmt.executeUpdate();\r\n \r\n \r\n if (prepStmt != null) {\r\n prepStmt.close();\r\n }\r\n\r\n }", "public void insert(Course course) {\n\t\tString sql = \"INSERT course(Cour_Name,CourCate_ID,Cour_BriefIntro) \"\n\t\t\t\t+ \"VALUES(?,?,?)\";\n\t\ttry {\n\t\t\t\n\t\t\tconn = dataSource.getConnection();\n\t\t\tsmt = conn.prepareStatement(sql);\n\t\t\tsmt.setString(1, course.getCourName());\n\t\t\tsmt.setInt(2, course.getCourseCate().getCourCateId());\t\t\t\n\t\t\tsmt.setString(3, course.getCourBriefIntro());\n\t\t\tsmt.executeUpdate();\t\t\t\n\t\t\tsmt.close();\n \n\t\t} catch (SQLException e) {\n\t\t\tthrow new RuntimeException(e);\n \n\t\t} finally {\n\t\t\tif (conn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {}\n\t\t\t}\n\t\t}\n\t}", "int insert(CmsVoteTitle record);", "private void save(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tBook book = new Book();\r\n\t\tbook.setId(bookService.list().size()+1);\r\n\t\tbook.setBookname(request.getParameter(\"bookname\"));\r\n\t\tbook.setAuthor(request.getParameter(\"author\"));\r\n\t\tbook.setPrice(Float.parseFloat(request.getParameter(\"price\")));\r\n\t\tbookService.save(book);\r\n\t\t//out.println(\"<script>window.location.href='index.html'</script>\");\r\n\t\tresponse.sendRedirect(\"index.html\");\r\n\t}", "public static void add( EntityManager em, UserTransaction ut, String isbn,\n String title, int year) throws Exception {\n ut.begin();\n Book book = new Book( isbn, title, year);\n em.persist( book);\n ut.commit();\n System.out.println( \"Book.add: the book \" + book + \" was saved.\");\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 }", "private void addSomeItemsToDB () throws Exception {\n/*\n Position pos;\n Course course;\n Ingredient ing;\n\n PositionDAO posdao = new PositionDAO();\n CourseDAO coursedao = new CourseDAO();\n IngredientDAO ingdao = new IngredientDAO();\n\n ing = new Ingredient(\"Mozzarella\", 10,30);\n ingdao.insert(ing);\n\n // Salads, Desserts, Main course, Drinks\n pos = new Position(\"Pizza\");\n posdao.insert(pos);\n\n course = new Course(\"Salads\", \"Greek\", \"Cucumber\", \"Tomato\", \"Feta\");\n coursedao.insert(course);\n\n ing = new Ingredient(\"-\", 0,0);\n ingdao.insert(ing);\n */\n }" ]
[ "0.8081809", "0.7646736", "0.7586933", "0.7568815", "0.74272364", "0.73674923", "0.73454475", "0.73454475", "0.72621614", "0.7214115", "0.7180849", "0.7150117", "0.71339583", "0.7107343", "0.70701844", "0.70696247", "0.69666964", "0.695436", "0.69352627", "0.69350374", "0.690711", "0.68722934", "0.6870081", "0.6808856", "0.6747879", "0.6742598", "0.6603589", "0.6562503", "0.65620315", "0.65165913", "0.65084356", "0.64889616", "0.6481107", "0.64608324", "0.6456854", "0.64561206", "0.64480984", "0.6435709", "0.64094037", "0.64014035", "0.63848054", "0.6375953", "0.6375795", "0.63717127", "0.6352542", "0.6342618", "0.63260376", "0.63185316", "0.63146365", "0.6313679", "0.6300366", "0.6300366", "0.6298039", "0.6283642", "0.6283642", "0.62834466", "0.62706494", "0.62666893", "0.6265823", "0.6236249", "0.6231782", "0.6225729", "0.6192454", "0.61866814", "0.6186669", "0.61845565", "0.6172436", "0.6157483", "0.6156467", "0.6151345", "0.6149775", "0.6145663", "0.6140796", "0.61208755", "0.6105156", "0.6088051", "0.60816157", "0.6076991", "0.60480505", "0.6018845", "0.6008881", "0.60062945", "0.6004416", "0.59930944", "0.59913707", "0.5991158", "0.5990641", "0.59888506", "0.59847635", "0.597814", "0.59774554", "0.5973143", "0.5971951", "0.59674937", "0.5966397", "0.5965473", "0.5964314", "0.59587574", "0.59582645", "0.595575" ]
0.7288705
8
Prints out every book in the database
public void listBooks() { String sql = "SELECT ISBN, BookName, AuthorName, Price FROM books"; try (Connection conn = this.connect(); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(sql)) { // Print results while(rs.next()) { System.out.println(rs.getInt("ISBN") + "\t" + rs.getString("BookName") + "\t" + rs.getString("AuthorName") + "\t" + rs.getInt("Price")); } } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void listAll() throws SQLException { \n\t\t List<SearchList> bookList = searchListDao.listAll();\n\t\t System.out.printf(\"%-5s %-35s %-30s %-30s \\n\",\"Id#\", \"Title\", \"Author\", \"Series\"); \n\t\t for (SearchList book : bookList) { \n\t\t\t System.out.printf(\"%-5s %-35s %-30s %-30s \\n\", book.getBookIdNum(), book.getTitle(), book.getAuthor(), book.getSeries());\n\t\t }\n\t }", "public void listBooks() {\n for (int g = 0; g < books.length; g++) {\n books[g].toString();\n }\n// List all books in Bookstore\n }", "public void print() {\n System.out.println(\"**List of books in the library.\");\n for (Book b : books){\n if(b != null) {\n System.out.println(b);\n }\n }\n System.out.println(\"**End of list\");\n }", "@Override\n\tpublic void printBook(List<Book> books) {\n\t\tIterator<Book> it = books.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tSystem.out.println(it.next());\n\t\t}\n\t\t\n\t}", "public void print()\n {\n System.out.println(name + \"\\n\");\n for(int iterator = 0; iterator < bookList.size() ; iterator++)\n {\n System.out.println((iterator+1) +\". \" + bookList.get(iterator).getTitle()+\" by \" +bookList.get(iterator).getAuthor()); \n }\n }", "public void displayBook()\n\t{\n\t\tb.display();\n\t\tSystem.out.println(\"Available Books=\"+availableBooks+\"\\n\");\n\t}", "private static void outputBook() {\n\t\toutput(\"\");\r\n\t\tfor (book book : library.outputBook()) { // method name changes BOOKS to outputBook()\r\n\t\t\toutput(book + \"\\n\");\r\n\t\t}\t\t\r\n\t}", "public void show_book()\n\t{\n\t\tsize=arr.size();\n\t\tif(size>0)\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(\"===========================================================\");\n\t\t\tSystem.out.println(\"Address Book List\");\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t\tint i=1;\n\n\t\t\t//Special loop:= For Each loop for array list\n\t\t\tfor(String x: arr)\n\t\t\t{\n\t\t\t\tSystem.out.println(i+\". \"+x);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"No data Found\");\n\t\t}\n\t}", "public void viewLibraryBooks(){\n\t\tIterator booksIterator = bookMap.keySet().iterator();\n\t\tint number, i=1;\n\t\tSystem.out.println(\"\\n\\t\\t===Books in the Library===\\n\");\n\t\twhile(booksIterator.hasNext()){\t\n\t\t\tString current = booksIterator.next().toString();\n\t\t\tnumber = bookMap.get(current).size();\n\t\t\tSystem.out.println(\"\\t\\t[\" + i + \"] \" + \"Title: \" + current);\n\t\t\tSystem.out.println(\"\\t\\t Quantity: \" + number + \"\\n\");\t\t\t\n\t\t\ti += 1; \n\t\t}\n\t}", "private void printAvailableBooks() {\n\t\t\n\t}", "private static void showStudentDB () {\n for (Student s : studentDB) {\n System.out.println(\"ID: \" + s.getID() + \"\\n\" + \"Student: \" + s.getName());\n }\n }", "void printBook()\r\n\t{\r\n\t\tfor(int i = 0; i < this.size(); i++)\r\n\t\t{\r\n\t\t\tthis.get(i).printContact();\r\n\t\t}\r\n\t}", "public static void printBooks(List<Book> books) {\r\n System.out.println(\"AUTHOR, \" + \"TITLE, \" + \"GENRE, \" + \"SERIES (if any), \" + \"PART (if any), \" + \"PAGES, \" + \"YEAR, \" + \"PRICE\");\r\n\r\n for (Book book : books) {\r\n System.out.println(book.getTitle() + \", \" + book.getAuthor() + \", \" + book.getGenre() + \", \" + book.getSeries() + \", \" + book.getPartNumber() + \", \" + book.getPagesQuantity() + \", \" + book.getYearPublished() + \", \" + book.getPrice());\r\n }\r\n\r\n }", "private void displayBook() {\n NumberFormat formatter = NumberFormat.getCurrencyInstance();\n\n System.out.println(\"Book title: \" + getTitle());\n System.out.println(\"Book author: \" + getAuthor());\n System.out.println(\"Book description: \" + getDescription());\n System.out.println((\"The price is: \" + formatter.format(getPrice())));\n if (isInStock()) {\n System.out.println(\"Currently the book is in stock.\");\n }\n else {\n System.out.println(\"Currently the book is not in stock.\");\n }\n System.out.println();\n }", "@Override\n\tpublic void printBook(Book book) {\n\t\t\n\t\tSystem.out.println(book);\n\t\t\n\t}", "public void outputBook(){\n\t\tSystem.out.println(\"\\nOrder book: \");\n\t\tNode position = head.next;\n\t\twhile (position!=null){\n\t\t\tSystem.out.println(position.ord);\n\t\t\tposition=position.next; //next or previous\n\t\t}\n\t}", "void availableBooks(){\n\t\tSystem.out.println(\")))))Available books((((((\");\n\t\tfor(int i=0;i<books.length;i++){\n\t\t\tString book=books[i];\n\t\t\tif(book==null){\n\t\t\tcontinue;\n\t\t}\n\t\t\tSystem.out.println(\"*\"+books[i]);\n\t\t}\n\t\t\n\t}", "private void displaySchalorship() {\n\n for (Scholarship scholarship : scholarshipDatabase) {\n\n stdOut.println(scholarship.toString() + \"\\n\");\n\n }\n }", "public List<Books> showAllBooks(){\n String sql=\"select * from Book\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{});\n List<Books> list=new ArrayList<>();\n list=resultSetToBook(baseDao);\n return list;\n }", "public String toString() {\r\n return books.toString();\r\n }", "private void printAllCourseInDB(){\n\n System.out.println(\"--------------------------------------------------------------------------------------\");\n System.out.println(\"COURSE SCHOOL AU INDEX SLOT TYPE DAY TIME\");\n System.out.println(\"--------------------------------------------------------------------------------------\");\n ArrayList<String> courseIDList = courseMgr.readAllCourseIDFromDB();\n for(String courseID: courseIDList){\n System.out.print(String.format(\"%6s \", courseID));\n Course course = courseMgr.readCourseByID(courseID);\n System.out.print(String.format(\"%5s \", course.getSchool()));\n int j = 0;\n for(CourseIndex courseIndex:course.getCourseIndices()){\n if (j==0)\n System.out.print(String.format(\" %d \", courseIndex.getAu()));\n else\n System.out.print(String.format(\" \", courseIndex.getAu()));\n System.out.print(String.format(\"%6s \", courseIndex.getIndex()));\n System.out.print(String.format(\"%3d \", courseIndex.getSlot()));\n int i = 0;\n for (CourseCompo courseCompo : courseIndex.getCourseCompos()){\n if(i==0){\n System.out.print(String.format(\"%3s \", courseCompo.getCompoType()));\n System.out.print(String.format(\"%3s \", courseCompo.getDay()));\n System.out.println(String.format(\"%3s \", courseCompo.getTimeSlot()));\n }\n else{\n System.out.print(String.format(\" %3s \", courseCompo.getCompoType()));\n System.out.print(String.format(\"%3s \", courseCompo.getDay()));\n System.out.println(String.format(\"%3s \", courseCompo.getTimeSlot()));\n }\n i++;\n }\n j++;\n System.out.println(\"\");\n }\n }\n\n System.out.println(\"--------------------------------------------------------------------------------------\\n\");\n }", "void display() {\n System.out.println(\"============================================================================================\");\n System.out.println(\"Name of the book:: \" + Bname);\n System.out.println(\"Price of the book:: Rs \" + price);\n System.out.println(\"============================================================================================\");\n }", "private void enterAll() {\n\n String sku = \"Java1001\";\n Book book1 = new Book(\"Head First Java\", \"Kathy Sierra and Bert Bates\", \"Easy to read Java workbook\", 47.50, true);\n bookDB.put(sku, book1);\n\n sku = \"Java1002\";\n Book book2 = new Book(\"Thinking in Java\", \"Bruce Eckel\", \"Details about Java under the hood.\", 20.00, true);\n bookDB.put(sku, book2);\n\n sku = \"Orcl1003\";\n Book book3 = new Book(\"OCP: Oracle Certified Professional Jave SE\", \"Jeanne Boyarsky\", \"Everything you need to know in one place\", 45.00, true);\n bookDB.put(sku, book3);\n\n sku = \"Python1004\";\n Book book4 = new Book(\"Automate the Boring Stuff with Python\", \"Al Sweigart\", \"Fun with Python\", 10.50, true);\n bookDB.put(sku, book4);\n\n sku = \"Zombie1005\";\n Book book5 = new Book(\"The Maker's Guide to the Zombie Apocalypse\", \"Simon Monk\", \"Defend Your Base with Simple Circuits, Arduino and Raspberry Pi\", 16.50, false);\n bookDB.put(sku, book5);\n\n sku = \"Rasp1006\";\n Book book6 = new Book(\"Raspberry Pi Projects for the Evil Genius\", \"Donald Norris\", \"A dozen friendly fun projects for the Raspberry Pi!\", 14.75, true);\n bookDB.put(sku, book6);\n }", "public List<Book> allBooks() {\n return bookRepository.findAll();\n }", "public void printInfo() throws IOException {\n System.out.println();\n System.out.println(\"* Current books in the database.\\n\");\n for(Book book :bookdatabase){\n System.out.println(book.getTitle());\n }\n System.out.println();\n System.out.println(\"* Current students in the database.\\n\");\n for(Student student :studentdatabase){\n System.out.println(student.getUsername());\n }\n System.out.println();\n System.out.println(\"* Current librarians in the database.\\n\");\n for(Librarian l :lib_db){\n System.out.println(l.getUsername());\n }\n\n\n\n }", "public void displayAll() {\r\n \t Item currentItem;\r\n \t \r\n \t System.out.println(\"-----BOOKS-----\");\r\n \t for(int i=0; i<items.size(); i++) {\r\n \t currentItem = items.get(i);\r\n \t \t //This next line checks if the current item is a book.\r\n \t if(currentItem.getItemType() == Item.ItemTypes.BOOK) \r\n \t System.out.println(currentItem.toString());\r\n \t }\r\n \t \t\r\n \t System.out.println(\"-----MAGAZINES-----\");\r\n \t for(int i=0; i<items.size(); i++) {\r\n \t currentItem = items.get(i);\r\n \t \t //This next line checks if the current item is a magazine.\r\n \t if(currentItem.getItemType() == Item.ItemTypes.MAGAZINE)\r\n \t System.out.println(currentItem.toString());\r\n \t }\r\n\r\n }", "private void printLibrary() {\n dao.listAll().stream().forEach((dvd) -> {\n //for every dvd print the title plus \" id #\" and the actual id\n System.out.println(dvd.getTitle() + \" id #\" + dvd.getId());\n });\n\n }", "void printList() {\n BookList current = this;\n\n while (current.next!=null){\n current.book.display();\n current = current.next;\n if (current.next == null){\n current.book.display();\n }\n }\n \n }", "public void printBookings(){\r\n\t\t//Treemap is used to sort the bookings into calendar order\r\n\t\tTreeMap<Calendar, Integer> m = new TreeMap<Calendar, Integer>();\r\n\t\tSet<Integer> booking = listBookings();\r\n\t\t\r\n\t\t//loops through getting each booking and puts it into the treemap\r\n\t\tfor (Integer id: booking){\r\n\t\t\tBooking b = bookings.get(id);\r\n\t\t\tm.put(b.start(), b.getLength());\r\n\t\t}\r\n\t\t\r\n\t\t//For each calendar in treemap it prints out the date and length of the booking\r\n\t\tSet<Calendar> cal = m.keySet();\r\n\t\tfor(Calendar c: cal) {\r\n\t\t\tprint(c);\r\n\t\t\tSystem.out.print(\" \" + m.get(c));\r\n\t\t}\r\n\t}", "public void listTitles() {\n for (int i = 0; i < books.length; i++) {\n System.out.println(\"The title of book\" + (i + 1) + \": \" + books[i].getTitle());\n }\n }", "public List<Book> getAll() {\n return bookFacade.findAll(); \n }", "@Override\n public String toString() {\n return \"Book:\" + \" \" + itemTitle + \" \" + itemPath + \" \" + itemYear + \" \" + itemAuthor;\n }", "@Override\r\n\tpublic List<Book> getBooks() {\n\t\treturn bd.findAll();\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"Book[ID: \" + this.id +\", Title: \" + this.title + \n\t\t\t\t\", Author: \" + this.author + \"]\";\n\t}", "public static void printBooksInTable(List<Book> books) {\r\n\r\n String format = \"%-17s %-45s %-15s %-30s %-12s %-10s %-8s %-8s \\n\";\r\n String formatTable = \"%-17s %-45s %-15s %-25s %9s %13d %9d %9.2f \\n\";\r\n System.out.format(format, \"AUTHOR\", \"TITLE\", \"GENRE\", \"SERIES\", \"PART\", \"PAGES\", \"YEAR\", \"PRICE\");\r\n System.out.println(\"-----------------------------------------------------------------------------------------------------------------------------------------------------\");\r\n\r\n for (Book book : books) {\r\n System.out.format(formatTable, book.getAuthor(), book.getTitle(), book.getGenre(), book.getSeries(), book.getPartNumber(), book.getPagesQuantity(), book.getYearPublished(), book.getPrice());\r\n System.out.println(\"-----------------------------------------------------------------------------------------------------------------------------------------------------\");\r\n }\r\n\r\n }", "Collection<Book> getAll();", "public List<Book> getAllBooks(){\n\t\treturn this.bRepo.findAll();\n\t}", "public void showCatalogue() {\n for (Record r : cataloue) {\n System.out.println(r);\n }\n }", "public ObservableList<Object> selectAllBooks(){\n System.out.println(\"Printing all books...\");\n dbmanager.open();\n ObservableList<Object> books = FXCollections.observableArrayList();\n\n try{\n try (DBIterator keyIterator = dbmanager.getDB().iterator()) {\n keyIterator.seekToFirst();\n while (keyIterator.hasNext()) {\n String key = asString(keyIterator.peekNext().getKey());\n String[] splittedString = key.split(\"-\");\n\n dbmanager.incrementNextId(Integer.parseInt(splittedString[1]));\n\n if(!\"book\".equals(splittedString[0])){\n keyIterator.next();\n continue;\n }\n String resultAttribute = asString(dbmanager.getDB().get(bytes(key)));\n JSONObject jbook = new JSONObject(resultAttribute);\n\n Book book = new Book(jbook);\n \n book.setPublisher(dbmanager.getPmanager().read(jbook.getInt(\"publisher\")));\n \n JSONArray jauthors = jbook.getJSONArray(\"authors\");\n List<Author> authors = new ArrayList();\n for(int i=0; i<jauthors.length(); i++){\n \n int a=-1;\n a=jauthors.getInt(i);\n if(a>=0){ \n authors.add(dbmanager.getAmanager().read(a));\n }else{\n System.out.println(\"A book has mysterious author\"); \n }\n \n }\n \n book.setAuthors(authors);\n books.add(book);\n keyIterator.next();\n }\n }\n } catch(IOException e){\n e.printStackTrace();\n }\n dbmanager.close();\n return books;\n }", "public void listBooksByName(String name) {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price \" +\n \"FROM books \" +\n \"WHERE BookName = ?\";\n\n try (Connection conn = this.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n // Set values\n pstmt.setString(1, name);\n\n ResultSet rs = pstmt.executeQuery();\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public String displayBooks(List<Books> bookList) {\r\n if (bookList.size() == 1) {\r\n productBB.setBook(bookList.get(0));\r\n return \"product-page\";\r\n } else {\r\n resultBB.setBookList(bookList);\r\n return \"results\";\r\n }\r\n }", "private void showAllBook() {\n db = new DatabaseAdapter(context);\n db.open();\n\n Cursor c = db.getAllNiyay();\n floop = c.getCount();\n Log.e(\"floop\", Integer.toString(floop));\n if (floop == 0) {\n Log.e(\"ck db\", \"not ok\");\n db.close();\n return;\n } else {\n Log.e(\"ok ?\", \"ok\");\n }\n int i2 = 0;\n c.moveToFirst();\n\n do {\n i2++;\n displayBook(c);\n } while (c.moveToNext());\n\n Log.e(\"loop end\", Integer.toString(i2));\n db.close();\n //Toast.makeText(context, \"Show Data\", Toast.LENGTH_SHORT).show();\n }", "public List<Book> listBooks() {\n\t\tArrayList<Book> books = new ArrayList<>();\n\t\ttry (Connection con = LibraryConnection.getConnection()) {\n\t\t\tPreparedStatement stmt = con.prepareStatement(\"SELECT * FROM book\");\n\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tbooks.add(new Book(rs.getString(\"isbn\"), rs.getString(\"title\")));\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 books;\n\t}", "public void listar()\n\t{\n\t\tdatabase.list().forEach(\n\t\t\t(entidade) -> { IO.println(entidade.print() + \"\\n\"); }\n\t\t);\n\t}", "void viewBooks();", "public List<Book> findAll() {\n\t\treturn bookDao.findAll();\r\n\t}", "private void loopAuthors(Book book) {\n for (String s : book.getAuthors()) {\n print(s);\n }\n }", "public static void main(String[] args) {\n\t\tArrayList<Book> bookList=new ArrayList<Book>();\r\n\t\tBook book1= new Book(1001,\"2 States\",\"Chetan Bhagat\",652.32f);\r\n\t\tBook book2= new Book(1002,\"Three idiots\",\"Chetan Bhagat\",650.40f);\r\n\t\tBook book3= new Book(1003,\"Hopeless\",\"Collen Hoover\",456.32f);\r\n\t\tBook book4= new Book(1004,\"The Deal\",\"Ellen Kennedy\",345.32f);\r\n\t\tBook book5= new Book(1005,\"The Goal\",\"Ellen Kennedy\",895.32f);\r\n\t\t\r\n\t\tbookList.add(book1);\r\n\t\tbookList.add(book2);\r\n\t\tbookList.add(book3);\r\n\t\tbookList.add(book4);\r\n\t\tbookList.add(book5);\r\n\t\tfor(Book book:bookList){\r\n\t\t\tSystem.out.println(book.getId()+\" \"+\r\n\t\t\t\t\t\t\t\tbook.getBname()+\" \"+\r\n\t\t\t\t\t\t\t\tbook.getAuthor()+\" \"+\r\n\t\t\t\t\t\t\t\tbook.getPrice());\r\n\t\t}\r\n\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tAuthor au1=new Author(\"Ma Ma\",\"[email protected]\",'F');\r\n\t\tAuthor au2=new Author(\"Mg Mg\",\"[email protected]\",'M');\r\n\t\tAuthor au3=new Author(\"Su Su\",\"[email protected]\",'F');\r\n\t\tBook b1=new Book(\"Software Engineering\",au1,7000);\r\n\t\tBook b2=new Book(\"Java\",au1,8000,2);\r\n\t\tSystem.out.println(\"BookInfo writing by Ma Ma:\");\r\n\t\tSystem.out.println(\"BookName:\"+b1.name+\"\\nAuthor:\"+au1.name+\"\\nPrice:\"+b1.price);\r\n\t\tSystem.out.println(\"BookName:\"+b2.name+\"\\nAuthor:\"+au1.name+\"\\nPrice:\"+b2.price+\"\\nQty:\"+b2.qty);\r\n\t\tSystem.out.println();\r\n\t\tBook b3=new Book(\"Digital\",au2,4000);\r\n\t\tBook b4=new Book(\"Management\",au2,6000,3);\r\n\t\tSystem.out.println(\"BookInfo writing by Mg Mg:\");\r\n\t\tSystem.out.println(\"BookName:\"+b3.name+\"\\nAuthor:\"+au2.name+\"\\nPrice:\"+b3.price);\r\n\t\tSystem.out.println(\"BookName:\"+b4.name+\"\\nAuthor:\"+au2.name+\"\\nPrice:\"+b4.price+\"\\nQty:\"+b4.qty);\r\n\t\tSystem.out.println();\r\n\t\tBook b5=new Book(\"Accounting\",au3,5000);\r\n\t\tBook b6=new Book(\"Javascript\",au3,9000,4);\r\n\t\tSystem.out.println(\"BookInfo writing by Su Su:\");\r\n\t\tSystem.out.println(\"BookName:\"+b5.name+\"\\nAuthor:\"+au3.name+\"\\nPrice:\"+b5.price);\r\n\t\tSystem.out.println(\"BookName:\"+b6.name+\"\\nAuthor:\"+au3.name+\"\\nPrice:\"+b6.price+\"\\nQty:\"+b6.qty);\r\n\t}", "private void displayByAuthor() {\n\t\tString authorHolder; // declares authorHolder\n\t\t\n\t\tSystem.out.println(\"Please enter author of the book you would like displayed:\");\n\t\tauthorHolder = scan.next();\n\t\tscan.nextLine();\n\t\tSystem.out.println(inventoryObject.displayByAuthor(authorHolder));\n\t\tgetUserInfo();\n\t}", "public void printTable(){ \r\n System.out.println( \"Auction ID | Bid | Seller | Buyer \"\r\n + \" | Time | Item Info\");\r\n System.out.println(\"===========================================\"\r\n + \"========================================================================\"\r\n + \"========================\");\r\n for(Auction auctions : values()){\r\n System.out.println(auctions.toString());\r\n } \r\n }", "List<Book> getAllBooks();", "public static void main(String[] args) {\n\r\n\t\tBook b1 = new Book(23,\"The mads in heaven\",200);\r\n\t\tBook b2 = new Book(25,\"Island Treasury\",300);\r\n\t\tBook b3 = new Book(27,\"Watery heart\",400);\r\n\t\t\r\n\t\tArrayList<Book> al = new ArrayList<Book>();\r\n\t\tal.add(b1);\r\n\t\tal.add(b2);\r\n\t\tal.add(b3);\r\n\t\t\r\n\t\tIterator<Book> itr1 = al.iterator();\r\n\t\twhile(itr1.hasNext())\r\n\t\t{\r\n\t\t\tBook book = itr1.next();\r\n\t\t\tSystem.out.println(\"Book price is: \"+book.price);\r\n\t\t\tSystem.out.println(\"Number of pages in the book are: \"+book.pages);\r\n\t\t\tSystem.out.println(\"The book name is: \"+book.name);\t\r\n\t\t}\r\n\t}", "public void listBooksByISBN(int ISBN) {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price \" +\n \"FROM books \" +\n \"WHERE ISBN = ?\";\n\n try (Connection conn = this.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n // Set values\n pstmt.setInt(1, ISBN);\n\n ResultSet rs = pstmt.executeQuery();\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public void display()\r\n\t{\r\n\t\tif(this.isEmpty())\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Empty... nothing to display\");\r\n\t\t}else\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The Array: \");\t\r\n\t\tfor (int i =0; i<bookArray.length; i++)\r\n\t\t{\r\n\t\t\tif(bookArray[i]!=null)\r\n\t\t\t\tSystem.out.println(\"\\t\"+'\"'+bookArray[i]+'\"');\r\n\t\t}\r\n\t }\r\n\t}", "public List<Book> getAllBooks() {\n return entityManager.createQuery(\"select b from Book b\", Book.class).getResultList();\n }", "public static <T> void queryAll() {\n\t\tString sql = \"SELECT * FROM LIBRARY ORDER BY BID \";\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tClass<T> clazz = (Class<T>) Lib.class;\n\t\tSystem.out.println(\"All books info is displayed below: \");\n\t\ttry {\n\t\t\tList<T> eleList = dao.queryData(sql, clazz);\n\t\t\tfor (T ele : eleList) {\n\t\t\t\tSystem.out.println(\"\\t\"+ele);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n public String toString() {\n return bookName + \"-\" + authorName;\n }", "public void listBooksByAuthor(String name) {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price \" +\n \"FROM books \" +\n \"WHERE AuthorName = ?\";\n\n try (Connection conn = this.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n // Set values\n pstmt.setString(1, name);\n\n ResultSet rs = pstmt.executeQuery();\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public List<Book> findAll() {\n return bookRepository.findAll();\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Book> getAllBook() {\n\t\treturn entityManager.createQuery(\"from Book\").getResultList();\n\t}", "private void populateBooks() {\n\n PrintWriter out;\n try {\n out = new PrintWriter(\"books.txt\");\n String ISBN, title, publisher, publicationPlace, shelfNum;\n int cost, copyrightYear, subjectCounter = 0, shelfNumCounter = 0, floor = 1, aisle = 1, shelf = 1, isbnCounter = 0;\n\n for (int subject = 0; subject < 6; subject++) {\n for (int book = 0; book < 20; book++) {\n title = BOOKS[randomInt(0, BOOKS.length - 1)];\n copyrightYear = randomInt(1970, 2012);\n shelfNum = \"\";\n shelfNum += Integer.toString(floor);\n shelfNum += Integer.toString(aisle);\n shelfNum += Integer.toString(shelf);\n for (int edition = 1; edition < 4; edition++) {\n publisher = PUBLISHERS[randomInt(0,\n PUBLISHERS.length - 1)];\n publicationPlace = PUBLICATION_PLACES[randomInt(0,\n PUBLICATION_PLACES.length - 1)];\n cost = randomInt(10, 200);\n ISBN = \"\";\n ISBN += Integer.toString(subject) + \"-\";\n ISBN += String.format(\"%03d\", randomInt(0, 999)) + \"-\";\n ISBN += String.format(\"%05d\", isbnCounter++) + \"-\";\n ISBN += edition;\n out.println(\"INSERT INTO `4400`.`Book` (`isbn`, `title`, `cost`, `isReserved`, `edition`, `publisher`, `publicationPlace`, `copyrightYear`, `shelfNumber`, `subjectName`) VALUES \"\n + \"('\"\n + ISBN\n + \"', '\"\n + title\n + \"', '\"\n + cost\n + \"', '0', '\"\n + edition\n + \"', '\"\n + publisher\n + \"', '\"\n + publicationPlace\n + \"', '\"\n + copyrightYear\n + \"', '\"\n + shelfNum\n + \"', '\"\n + SUBJECTS[subject] + \"');\");\n copyrightYear++;\n }\n if (shelfNumCounter++ == 3) {\n shelfNumCounter = 0;\n if (shelf++ == 2) {\n shelf = 1;\n aisle++;\n\n }\n }\n }\n\n if (subjectCounter++ == 1) {\n subjectCounter = 0;\n floor++;\n aisle = 1;\n shelf = 1;\n }\n }\n System.out.println(\"RAN\");\n out.close();\n } catch (final FileNotFoundException e) {\n System.out.println(\"TEST\");\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "@Override\n\tpublic List<Book> findAll() {\n\t\treturn dao.findAll();\n\t}", "@Override\n public String toString() {\n return \"Books{\" +\n \"bookTitle='\" + bookTitle + '\\'' +\n \", bookAuthor='\" + bookAuthor + '\\'' +\n \", bookPrice=\" + bookPrice +\n \", quantity=\" + quantity +\n '}';\n }", "public void print() {\r\n \tfor (int i = 0; i < arbres.size(); i++) {\r\n \t\tSystem.out.println(\"Ordre de \" + arbres.get(i).ordre + \":\");\r\n \t\tarbres.get(i).print(\"\");\r\n \t\tSystem.out.println();\r\n \t}\r\n }", "public static void display(){\n\n try {\n Connection myConnection = ConnectionFactory.getConnection();\n Statement stat = myConnection.createStatement();\n ResultSet rs = stat.executeQuery(\"SELECT * from product\");\n\n System.out.println(\"PRODUCT\");\n while(rs.next()){\n\n System.out.println(rs.getInt(\"id\") + \", \" + rs.getString(\"quantity\") + \", \" + rs.getString(\"productName\") + \", \" + rs.getDouble(\"price\")+ \", \" + rs.getString(\"deleted\"));\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n System.out.println();\n\n }", "public void saveBooks(){\n\t\ttry{\t\n\t\t\tPrintWriter pw = new PrintWriter(new FileWriter(\"../bin/books.csv\"));\t\n\t\t\tIterator bookIterator = bookMap.keySet().iterator();\n\t\t\twhile(bookIterator.hasNext() != false){\n\t\t\t\tString current = bookIterator.next().toString();\n\t\t\t\tfor(int i=0;i<bookMap.get(current).size();i++){\t\n\t\t\t\t\tpw.write(bookMap.get(current).get(i).getTitle() \n\t\t\t\t\t\t+ \",\" + bookMap.get(current).get(i).getAuthor()\n\t\t\t\t\t\t+ \",\" + bookMap.get(current).get(i).getYear()\n\t\t\t\t\t\t+ \",\" + bookMap.get(current).get(i).getType()\n\t\t\t\t\t\t+ \",\" + bookMap.get(current).get(i).getId());\n\t\t\t\t\tpw.write(\"\\n\");\n\t\t\t\t}\n\t\t\t}\t\n\t\t\tpw.close();\n\t\t\tSystem.out.println(\"\\tDone!\");\n\t\t}catch(IOException e){\n\t\t\tSystem.out.println(e.toString());\n\t\t}\n\n\t}", "public void printBorrowerDetails()\r\n {\r\n System.out.println( firstName + \" \" + lastName \r\n + \"\\n\" + address.getFullAddress()\r\n + \"\\nLibrary Number: \" + libraryNumber\r\n + \"\\nNumber of loans: \" + noOfBooks);\r\n }", "@Override\n\tpublic void displayTheDatabase() {\n\t\t\n\t}", "private void displayByTitle() {\n\t\tString titleHolder; // declares titleHolder\n\t\t\n\t\tSystem.out.println(\"Please enter title of the book you would like displayed:\");\n\t\ttitleHolder = scan.next();\n\t\tscan.nextLine();\n\t\tSystem.out.println(inventoryObject.displayByTitle(titleHolder));\n\t\tgetUserInfo();\n\t}", "@Override\n public String toString() {\n final StringBuilder sb = new StringBuilder(\"Book{\");\n sb.append(\"id=\").append(id);\n sb.append(\", name='\").append(name).append('\\'');\n sb.append('}');\n return sb.toString();\n }", "@Override\n\tpublic String toString() {\n\t\tSystem.out.println(\"_____Fiction Book_____\");\n\t\treturn \"Title :\" + getTitle() + \"\\nPrice :$\" + getPrice() + \"\\n\";\n\t}", "public void printAll() {\n \tfor (int i = 0; i < Table.size(); i++) {\n \t\tList<T> data = Table.get(i);\n \t\tdata.placeIterator();\n \t\twhile (!data.offEnd()) {\n \t\t\tSystem.out.print(data.getIterator() + \"\\n\");\n \t\t\tdata.advanceIterator();\n \t\t}\n \t\t\n \t}\n }", "private void printAllStudentInDB(){\n ArrayList studentInformation = AdminManager.loadDBStudentInformation();\n System.out.println(\"--------------------------------------------------------------------------------------\");\n System.out.println(\"USERNAME STUDENT NAME MATRIC NUMBER GENDER NATIONALITY\");\n System.out.println(\"--------------------------------------------------------------------------------------\");\n\n for(int i=0; i<studentInformation.size();i++){\n String st = (String)studentInformation.get(i);\n StringTokenizer star = new StringTokenizer(st, \",\");\n System.out.print(String.format(\"%7s \",star.nextToken().trim()));\n String printPassword = star.nextToken().trim();\n System.out.println(String.format(\"%20s %9s %6s %s\",star.nextToken().trim(),star.nextToken().trim(),star.nextToken().trim(),star.nextToken().trim()));\n }\n System.out.println(\"--------------------------------------------------------------------------------------\\n\");\n }", "private void displayStudentByGrade() {\n\n studentDatabase.sortArrayList();\n\n for (Student student : studentDatabase) {\n\n stdOut.println(student.toStringsort() + \"\\n\");\n }\n }", "Collection<Book> readAll();", "public String toString(){\n\t\treturn name + \": \" + books + \" books checked out\";\n\t}", "public void printBookDetails(Book bookToSearch) {\n boolean exists = false;\n\n //Search if the given book exists in the library\n // There are better ways. But not with arrays!!\n for (Book element : books) {\n if (element.equals(bookToSearch)) {\n exists = true;\n }\n\n //Print book details if boook found\n if (exists) {\n System.out.print(bookToSearch.toString());\n } else {\n System.out.print(bookToSearch.toString() + \" not found\");\n }\n }\n }", "public void printTable(){\n \tfor (int i = 0; i < Table.size(); i++) {\n \t\tList<T> data = Table.get(i);\n \t\ttry {\n \t\t\tSystem.out.println(\"Bucket: \" + i);\n \t\t\tSystem.out.println(data.getFirst());\n \t\t\tSystem.out.println(\"+ \" + (data.getLength() - 1) + \" more at this bucket\\n\\n\");\n \t\t} catch (NoSuchElementException e) {\n \t\t\tSystem.out.println(\"This bucket is empty.\\n\\n\");\n \t\t}\n \t}\n }", "@Override\n\tpublic List<BookInfoVO> findAll() {\n\t\treturn bookInfoDao.findAll();\n\t}", "private static void printAllElements(Iterator<String> iter) {\n\t\tint count = 0;\n\t\t\n\t\tif(!iter.hasNext()) //if the list is empty then print out 'Empty!'\n\t\t\tSystem.out.println(\"Sorry! There are no such books in our records!\");\n\t\t\n\t\t//else if list is not empty then print out all its elements\n\t\twhile(iter.hasNext()){\n\t\t\tcount++;\n\t\t\tString bookTitle = iter.next();\n\t\t\tSystem.out.println(count + \". \" + bookTitle);\n\t\t}\n\t}", "public void printByNumber() {\n for (int i = 0; i < numBooks; i++) {\n for (int j = i + 1; j < numBooks; j++) {\n if (books[i].getNumber().compareTo(books[j].getNumber()) > 0)\n {\n Book temp = books[i];\n books[i] = books[j];\n books[j] = temp;\n }\n }\n }\n System.out.println(\"**List of books by the book numbers.\");\n for (Book b : books){\n if(b != null) {\n System.out.println(b);\n }\n }\n System.out.println(\"**End of list\");\n }", "public List<BookData> getAllBooks() throws Exception{\n\t\tList<BookData> list = new ArrayList<>();\n\t\tStatement myStmt = null;\n\t\tResultSet myRs = null;\n\t\t\n\t\ttry {\n\t\t\tmyStmt = myConn.createStatement();\n\t\t\tmyRs = myStmt.executeQuery(\"select title, author_name, publisher_name, book_id from books natural join book_authors\");\n\t\t\t\n\t\t\twhile (myRs.next()) {\n\t\t\t\tBookData tempbook = convertRowToBook(myRs);\n\t\t\t\tlist.add(tempbook);\n\t\t\t}\n\t\t\t\n\t\t\treturn list;\n\t\t}\n\t\tfinally {\n\t\t\tmyRs.close();\n\t\t\tmyStmt.close();\n\t\t\t\n\t\t}\n\t\t\n\t}", "public ArrayList<Book> getBooks()\n {\n ArrayList<Book> books = new ArrayList<>();\n String sql = \"SELECT [book_id]\\n\" +\n \" ,[book_title]\\n \" +\n \" ,[book_author]\\n\" +\n \" ,[book_publish_year]\\n\" +\n \" ,[book_category]\\n\" +\n \" ,[book_keyword]\\n\" +\n \" ,[book_status]\\n \" +\n \" FROM [lib_book_master]\";\n try {\n PreparedStatement statement = connection.prepareStatement(sql);\n ResultSet rs = statement.executeQuery();\n //cursor\n while(rs.next()) \n { \n int book_id = rs.getInt(\"book_id\");\n String book_title = rs.getString(\"book_title\");\n String book_author = rs.getString(\"book_author\");\n String book_publish_year = rs.getString(\"book_publish_year\");\n String book_category = rs.getString(\"book_category\");\n String book_keyword = rs.getString(\"book_keyword\");\n String book_status = rs.getString(\"book_status\");\n \n Book s = new Book(book_id,book_title, book_author, book_publish_year,book_category,book_keyword,book_status);\n books.add(s);\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(DBContext.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return books;\n }", "private static void queryBooksByAuthor(){\n\t\tSystem.out.println(\"===Query Books By Author===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter First Name of Author to Query Books by: \");\n\t\tString author_firstname = string_input.next();\n\t\t\n\t\tSystem.out.println(\"Enter Middle Name of Author to Query Books by (Type 'null' if Author has no middlename): \");\n\t\tString author_middlename = string_input.next();\n\t\tif(author_middlename.equalsIgnoreCase(\"null\"))\n\t\t\tauthor_middlename = \"\";\n\t\t\n\t\tSystem.out.println(\"Enter Last Name of Author to Query Books by: \");\n\t\tString author_lastname = string_input.next();\n\t\t\n\t\tString author_fullname = author_firstname + \" \" + author_middlename + \" \" + author_lastname;\n\t\t\n\t\tif(ALL_AUTHORS.containsKey(author_fullname)){//if author_full_name exists in the Hashtable then print out all of the author's book titles\n\t\t\tSystem.out.println(\"Author found!\");\n\t\t\tSystem.out.println(author_fullname + \"'s list of book titles are: \"); \n\t\t\tIterator<String> iter = ALL_AUTHORS.get(author_fullname).iterator();\n\t\t\tprintAllElements(iter);\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Sorry Author name entered does not exist in our records\");\n\t}", "public static void main(String[] args) {\n\t\tint choice;\n\t\tScanner s=new Scanner(System.in);\n\t\tdatabase db=new database();\n\t\tchar c;\n\t\t\n\t\tdo {\n\t\t\n\t\tSystem.out.println(\"press 1 to view all books\");\n\t\tSystem.out.println(\"press 2 to search book by title\");\n\t\tSystem.out.println(\"press 3 to insert a book\");\n\t\tSystem.out.println(\"press 4 to delete book\");\n\t\tSystem.out.println(\"press 5 to update the book\");\n\t\tSystem.out.println(\"press 6 to exit\");\n\t\t\n\t\tchoice=s.nextInt();\n\t\tswitch(choice)\n\t\t{\n\t\tcase 1:\n\t\t\t\n\t\t\tdb.showDetails();\n\t\t\t break;\n\t\tcase 2:\n\t\t\tSystem.out.println(\"enter the title of book\");\n\t\t\tString name=s.next();\n\t\t\tdb.viewByname(name);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 3:\n\t\t System.out.println(\"enter the book id\");\n\t\t int id1=s.nextInt();\n\t\t System.out.println(\"enter the book name\");\n\t\t String name1=s.next();\n\t\t System.out.println(\"enter the author name\");\n\t\t String author=s.next();\n\t\t System.out.println(\"enter the book price\");\n\t\t double price=s.nextDouble();\n\t\t Book ib=new Book(id1,name1,author,price);\n\t\t db.insert(ib);\n\t\t \n\t\t break;\n\t\t \n\t\tcase 4:\n\t\t\tSystem.out.println(\"enter the id of the book you want to delete\");\n\t\t\tint id9=s.nextInt();\n\t\t\tdb.delete(id9);\n\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\tcase 5:\tSystem.out.println(\"enter the id of the book you want to update\");\n\t\t int id5=s.nextInt();\n\t\t System.out.println(\"enter the new price\");\n\t\t double price1=s.nextDouble();\n\t\t \n\t\t db.update(id5,price1);\n\t\t System.out.println(\"updated successfully\");\n\t\t\t\n\t\tcase 6:\n\t\t\tdefault:\n\t\t\t \n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"press y for menu:\");\n\t\tc=s.next().charAt(0);\n\t\t\n\t\t\n\t\t\n\n\t}while(c=='Y' || c=='y');\n\n}", "@Override\n\tpublic List<Book> getAllBooks() {\n\t\treturn bookList;\n\t}", "List<Book> findAll();", "@Override\n\tpublic List<ShoppingCart> getAllBook() {\n\t\treturn dao.findAll();\n\t}", "public List<Book> getAllBooks()\n {\n List<Book> books = new LinkedList<Book>();\n\n //1. Query para la consulta\n String query = \"Select * FROM \"+ BookReaderContract.FeedBook.TABLE_NAME;\n\n //2. Obtener la referencia a la DB\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(query, null);\n\n //3. Recorrer el resultado y crear un objeto Book\n Book book = null;\n if(cursor.moveToFirst()){\n do{\n book = new Book();\n book.setId(Integer.parseInt(cursor.getString(0)));\n book.setTitle(cursor.getString(1));\n book.setAuthor(cursor.getString(2));\n books.add(book);\n }while(cursor.moveToNext());\n }\n Log.d(\"getAllBooks\",books.toString());\n return books;\n }", "public void scandb_book_info(String table_name) {\n sql = \" SELECT * from \" + table_name + \";\";\n\n try {\n result = statement.executeQuery(sql);\n while (result.next()) {\n set_book_info(result.getInt(\"id\"), result.getString(\"name\"), result.getString(\"url\"));\n\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public String toString() {\n\treturn \"--------------------\" +\n\t\t\t\"\\n ID: \" + this.book_id +\n\t\t\t\"\\n Title: \" + this.title +\n\t\t\t\"\\n Author: \" + this.author +\n\t\t\t\"\\n Year: \" + this.year +\n\t\t\t\"\\n Edition: \" + this.edition +\n\t\t\t\"\\n Publisher: \" + this.publisher +\n\t\t\t\"\\n ISBN: \" + this.isbn +\n\t\t\t\"\\n Cover: \" + this.cover +\n\t\t\t\"\\n Condition: \" + this.condition +\n\t\t\t\"\\n Price: \" + this.price +\n\t\t\t\"\\n Notes: \" + this.notes +\n\t\t\t\"\\n--------------------\";\n}", "public void printAll() {\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"################\");\r\n\t\tSystem.out.println(\"Filename:\" +getFileName());\r\n\t\tSystem.out.println(\"Creation Date:\" +getCreationDate());\r\n\t\tSystem.out.println(\"Genre:\" +getGenre());\r\n\t\tSystem.out.println(\"Month:\" +getMonth());\r\n\t\tSystem.out.println(\"Plot:\" +getPlot());\r\n\t\tSystem.out.println(\"New Folder Name:\" + getNewFolder());\r\n\t\tSystem.out.println(\"New Thumbnail File Name:\" +getNewThumbnailName());\r\n\t\tSystem.out.println(\"New File Name:\" +getNewFilename());\r\n\t\tSystem.out.println(\"Season:\" +getSeason());\r\n\t\tSystem.out.println(\"Episode:\" +getEpisode());\r\n\t\tSystem.out.println(\"Selected:\" +getSelectEdit());\r\n\t\tSystem.out.println(\"Title:\" +getTitle());\r\n\t\tSystem.out.println(\"Year:\" +getYear());\r\n\t\tSystem.out.println(\"Remarks:\" +getRemarks());\r\n\t\tSystem.out.println(\"################\");\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public PageInfo<Book> getBookList() {\n \tPageHelper.startPage(1,2);\r\n List<Book> list = bookMapper.getBookList();\r\n PageInfo<Book> pageInfo=new PageInfo<Book>(list);\r\n\t\treturn pageInfo;\r\n \r\n }", "public void loadBook() {\n List<Book> books = new ArrayList<>();\n for (int i = 0; i < 5; i++) {\n Book book = new Book(\"Book-\" + i, \"Test book \" + i);\n books.add(book);\n }\n this.setBooks(books);\n }", "@GetMapping(\"/bookworm/showAllAuthors\")\n public ResponseEntity<List> showAllAuthors() {\n\n log.debug(\"Showing all the Authors whose books are present in library\");\n return ResponseEntity.ok(authorService.getAuthor());\n }", "public String toString(){\r\n\t\tString a, b, c, d;\r\n\r\n\t\ta = \"Book ID: \" + (new Integer(id)).toString() + \"\\n\";\r\n\t\tb = \"Book Title: \" + title + \"\\n\";\r\n\t\tc = \"Book Author: \" + author + \"\\n\";\r\n\t\td = \"Book Date: \" + dateToString(dateOfPublication) + \"\\n\";\r\n\t\t\r\n\t\treturn a + b + c + d;\r\n\t}", "public static void printAll() {\n // Print all the data in the hashtable\n RocksIterator iter = db.newIterator();\n\n for (iter.seekToFirst(); iter.isValid(); iter.next()) {\n System.out.println(new String(iter.key()) + \"\\t=\\t\" + ByteIntUtilities.convertByteArrayToDouble(iter.value()));\n }\n\n iter.close();\n }", "public java.util.List<com.huqiwen.demo.book.model.Books> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public static void AllBookVerse(Statement stmt)throws SQLException,java.lang.ClassNotFoundException\n\t{\n\t String sql=\"SELECT * FROM verse_info\";\n\t ResultSet rs = stmt.executeQuery(sql);\n\t int cnt=1;\n\t while(rs.next()){\n // 根据列名称检索\n //int question_no = rs.getInt(\"question_no\");\n String book = rs.getString(\"book\");\n int chapter_no=rs.getInt(\"chapter_no\");\n int verse_no=rs.getInt(\"verse_no\");\n String verse = rs.getString(\"verse\");\n\n // 显示值\n //System.out.println(book+\",\"+chapter_no+\",\"+verse_no+\"[\"+verse+\"]\");\n if(cnt%1000==0)\n {\n\t System.out.println(book+\",\"+chapter_no+\",\"+verse_no);\n }\n cnt++;\n \n {\n\t \n\t\tint pos1=0;\n\t\tString line=verse;\n\t\tString finding=\" \";\n\t\tint pos2=line.indexOf(finding,pos1);\n\t\tString possible_word,word;\n\t\twhile(pos2!=-1)\n\t\t{\n\t\t possible_word=line.substring(pos1,pos2);\n\t\t //parseword(chapter_no,verse_no,possible_word,word,mark_set,word_1st_appearance,verse_words_list);\n\t\t word=parseword(possible_word);\n\t\t add_word_place_info(word,book,chapter_no,verse_no);\n\t\t pos1=pos2+1;\n\t\t if(pos1>=line.length())\n\t\t {\n\t\t break;\n\t\t }\n\t\t pos2=line.indexOf(finding,pos1);\n\t\t}\n\t\tpossible_word=line.substring(pos1,line.length());\n\t\t//parseword(chap_dig,no_dig,possible_word,word,mark_set,word_1st_appearance,verse_words_list);\n\t\tword=parseword(possible_word);\n\t\tadd_word_place_info(word,book,chapter_no,verse_no);\n }\n }\n \n\t}" ]
[ "0.7419028", "0.7321415", "0.7314236", "0.7259762", "0.72540814", "0.7217454", "0.7122926", "0.70845896", "0.7052736", "0.7039054", "0.69088125", "0.68713814", "0.6814269", "0.6787665", "0.6772188", "0.6754989", "0.67380214", "0.6629306", "0.6625538", "0.6602797", "0.65580213", "0.6546585", "0.6497152", "0.64768505", "0.64730513", "0.64479786", "0.6443798", "0.6410773", "0.63882685", "0.63647074", "0.63616705", "0.63445073", "0.6341881", "0.63407385", "0.63172215", "0.6298163", "0.62900424", "0.62887186", "0.628551", "0.62820303", "0.62795585", "0.62431705", "0.62382853", "0.62329286", "0.622775", "0.6221252", "0.621647", "0.6208153", "0.62032497", "0.61874044", "0.6161323", "0.6159748", "0.6157353", "0.61393845", "0.6137404", "0.61218697", "0.6119581", "0.6093627", "0.60915035", "0.6080781", "0.6080099", "0.60774493", "0.6075115", "0.6074455", "0.6049619", "0.6023473", "0.6020808", "0.6015024", "0.601451", "0.60091656", "0.6006996", "0.59773844", "0.5975797", "0.59737957", "0.59675694", "0.59675395", "0.5964312", "0.59454453", "0.59443027", "0.59319174", "0.59297776", "0.5929217", "0.5926949", "0.59164953", "0.58878475", "0.5883544", "0.5878227", "0.5875233", "0.58675635", "0.5867441", "0.58581185", "0.58502275", "0.5849632", "0.5840049", "0.5839485", "0.5835396", "0.5812215", "0.58085287", "0.5808493", "0.5805944" ]
0.780829
0
Prints out every book that matches equals given values.
public void listBooksByName(String name) { String sql = "SELECT ISBN, BookName, AuthorName, Price " + "FROM books " + "WHERE BookName = ?"; try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) { // Set values pstmt.setString(1, name); ResultSet rs = pstmt.executeQuery(); // Print results while(rs.next()) { System.out.println(rs.getInt("ISBN") + "\t" + rs.getString("BookName") + "\t" + rs.getString("AuthorName") + "\t" + rs.getInt("Price")); } } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\t\n\t\tHashSet<BookList> set = new HashSet<BookList>();\n\t\t\n\t\tBookList b1 = new BookList(101,\" Let us C\", \" Yashwant Kanetkar\", \" BPB \", 8);\n\t\tBookList b2 = new BookList(102, \" Data communication & Networking\", \" Forouzan\", \" Mc Graw Hill \", 4);\n\t\tBookList b3 = new BookList(103, \" Operating System\", \" Galvin\", \" Wiley \", 6);\n\t\tBookList b4 = new BookList(103, \" Operating System\", \" Galvin\", \" Wiley \", 6);\n\t\t\n\t\tset.add(b1);\n\t\tset.add(b2);\n\t\tset.add(b3);\n\t\tset.add(b4);\n\t\t\n\t\tfor(BookList b:set) {\n\t\t\tSystem.out.println(b.id+\" \"+b.name+\" \"+b.author+\" \"+b.publisher+\" \"+b.quantity);\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tIterator<BookList> itr = set.iterator();\n\t\t\n\t\twhile (itr.hasNext()) {\n\t\tSystem.out.println(itr.next().toString());\n\t\t\n\t\t}\n\n\t}", "public static void main(String[] args) {\n Iterable<Book> notCheckedOut = FluentIterable\n .from(Library.ALL_BOOKS)\n .filter(Utils.IS_NOT_LOANED);\n System.out.println(\"not checked out\");\n System.out.println(Utils.JOINER.join(notCheckedOut));\n System.out.println();\n \n // books that are checked out to Zeb\n Iterable<Book> checkedOutToZeb = FluentIterable\n .from(Library.ALL_BOOKS)\n .filter(Utils.IS_LOANED_TO_ZEB);\n System.out.println(\"checked out to Zeb\");\n System.out.println(Utils.JOINER.join(checkedOutToZeb));\n System.out.println();\n \n // books that are checked out to someone named \"Tobias\"\n Iterable<Book> checkedOutToSomeoneNamedTobias = FluentIterable\n .from(Library.ALL_BOOKS)\n .filter(Utils.IS_LOANED_TO_SOMEONE_NAMED_TOBIAS);\n System.out.println(\"checked out to someone named 'Tobias'\");\n System.out.println(Utils.JOINER.join(checkedOutToSomeoneNamedTobias));\n System.out.println();\n }", "public ArrayList<Book> search(String part){ \n this.searchBooks = new ArrayList<Book>();\n this.numberedListOfSearch = new HashMap<Integer, Book>();\n if (part.length()>=4){\n //Adding all the searching books into an ArrayList<Book>\n //No duplicating for books having the same title\n boolean bookExist = false;\n for (Book book : this.libraryBooks){\n if ((book.getTitle().toLowerCase().contains(part.toLowerCase())) || (book.getAuthor().toLowerCase().contains(part.toLowerCase()))){\n //Check whether any books having the same title in the list\n for (Book bookSearch : this.searchBooks){\n if (bookSearch.getTitle().equals(book.getTitle())){\n bookExist = true;\n break;\n }\n }\n //If none!\n if(!bookExist){\n this.searchBooks.add(book);\n }\n }\n bookExist = false;\n }\n //To put into a numbered list for printing\n //No duplicating for books having the same title\n for (int i =0; i < (this.searchBooks.size());i++){\n // put the book in the HashMap for printing \n this.numberedListOfSearch.put(i+1, this.searchBooks.get(i));\n }\n\n //To print out\n this.println(\"The searching process has finished!\");\n String researchBooks=\"\";\n //check whether the numbered list is empty or not\n if(this.numberedListOfSearch.size() >0){\n researchBooks += \"{\";\n for (int i = 0; i < this.numberedListOfSearch.size();i++){\n researchBooks += (i+1);\n researchBooks += \": \";\n researchBooks += this.numberedListOfSearch.get(i+1).toString();\n researchBooks += \"; \";\n }\n researchBooks = researchBooks.substring(0, researchBooks.length()-2);\n researchBooks += \"}\"; \n }\n //if the numbered list is empty\n else if ( this.numberedListOfSearch.size() == 0){\n researchBooks += \"Nothing found!\";\n }\n this.println(researchBooks);\n }\n\n //If not enough input key words!\n else{\n this.println(\"Please enter more key words! At least four!!\");\n }\n return this.searchBooks;\n }", "private static void queryBooksByAuthor(){\n\t\tSystem.out.println(\"===Query Books By Author===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter First Name of Author to Query Books by: \");\n\t\tString author_firstname = string_input.next();\n\t\t\n\t\tSystem.out.println(\"Enter Middle Name of Author to Query Books by (Type 'null' if Author has no middlename): \");\n\t\tString author_middlename = string_input.next();\n\t\tif(author_middlename.equalsIgnoreCase(\"null\"))\n\t\t\tauthor_middlename = \"\";\n\t\t\n\t\tSystem.out.println(\"Enter Last Name of Author to Query Books by: \");\n\t\tString author_lastname = string_input.next();\n\t\t\n\t\tString author_fullname = author_firstname + \" \" + author_middlename + \" \" + author_lastname;\n\t\t\n\t\tif(ALL_AUTHORS.containsKey(author_fullname)){//if author_full_name exists in the Hashtable then print out all of the author's book titles\n\t\t\tSystem.out.println(\"Author found!\");\n\t\t\tSystem.out.println(author_fullname + \"'s list of book titles are: \"); \n\t\t\tIterator<String> iter = ALL_AUTHORS.get(author_fullname).iterator();\n\t\t\tprintAllElements(iter);\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Sorry Author name entered does not exist in our records\");\n\t}", "public void printBookDetails(Book bookToSearch) {\n boolean exists = false;\n\n //Search if the given book exists in the library\n // There are better ways. But not with arrays!!\n for (Book element : books) {\n if (element.equals(bookToSearch)) {\n exists = true;\n }\n\n //Print book details if boook found\n if (exists) {\n System.out.print(bookToSearch.toString());\n } else {\n System.out.print(bookToSearch.toString() + \" not found\");\n }\n }\n }", "public static void bookNameSearch(Set<Book> books) {\n Pattern pattern = Pattern.compile(SEARCH_PARAMETER);\n for (Book book : books) {\n Matcher matcher = pattern.matcher(book.getBookName());\n if (matcher.find()) {\n System.out.println(book);\n }\n }\n }", "public void printByNumber() {\n for (int i = 0; i < numBooks; i++) {\n for (int j = i + 1; j < numBooks; j++) {\n if (books[i].getNumber().compareTo(books[j].getNumber()) > 0)\n {\n Book temp = books[i];\n books[i] = books[j];\n books[j] = temp;\n }\n }\n }\n System.out.println(\"**List of books by the book numbers.\");\n for (Book b : books){\n if(b != null) {\n System.out.println(b);\n }\n }\n System.out.println(\"**End of list\");\n }", "public static void main(String[] args) {\n\t\tint SizeX = 10 , SizeY = 7;\n\t\tString search_type =\"\";//用書名還是書號\n\t\tString answer =\"\";\n\t\tString query = \"\";//搜尋的關鍵字\n\t\tString operation = \"\";//儲存操作的動作: 借書/還書等\n\t\tString identity = \"\";//儲存使用者身分,student/staff/exit\n\t\tScanner in = new Scanner(System.in);\n\t\tString [][] booklists = new String[SizeX][SizeY];\n\t\t//建立資料庫\n\t\tbooklists = AddBooks(\"82101\",\"Cihai\",\"Reference\",\"Shu Xincheng\",\"20000\",booklists,0);\n\t\tbooklists = AddBooks(\"80001\",\"WW2 History\",\"History\",\"Winston Churchill\",\"971\",booklists,1);\n\t\tbooklists = AddBooks(\"00003\",\"Egg 100\",\"Cookbook\",\"Su yuan ma\",\"104\",booklists,2);\n\t\tbooklists = AddBooks(\"50001\",\"Be a honest man\",\"Political\",\"Ma Ying jeou\",\"520\",booklists,3);\n\t\tbooklists = AddBooks(\"85719\",\"Sword Art Online\",\"Novel\",\"Reki Kawahara\",\"8763\",booklists,4);\n\t\tbooklists = AddBooks(\"85728\",\"Spice and Wolf\",\"Novel\",\"Isuna Hasekura\",\"510\",booklists,5);\n\t\tbooklists = AddBooks(\"85707\",\"The Old Man and the Sea\",\"Novel\",\"Ernest Hemingway\",\"127\",booklists,6);\n\t\tbooklists = AddBooks(\"85703\",\"Romance of the Three Kingdoms\",\"Novel\",\"Luo Guanzhong\",\"480\",booklists,7);\n\t\tbooklists = AddBooks(\"80005\",\"Records of the Grand Historian\",\"History\",\"Sima Qian\",\"6000\",booklists,8);\n\t\tbooklists[4][5] = \"true\";\n\t\tbooklists[4][6] = \"1\";\n\t\t\n\t\tSystem.out.println(\"【圖書館租借模擬系統】\");\n\t\tBookSystem bs = new BookSystem();\n\t\tdo{\n\t\t\tSystem.out.println(\"請問你是何種身分?學生(student)或者圖書館人員(staff)?(輸入exit離開)\");\n\t\t\tidentity = in.nextLine();\n\t\t\tif(identity.equals(\"student\")){\n\t\t\t\tdo{\n\t\t\t\t\tbs.ViewStudent(booklists, SizeX);\n\t\t\t\t\tSystem.out.println(\"請問你要進行何種操作?\");\n\t\t\t\t\tSystem.out.println(\"1. 借書(borrow)\");\n\t\t\t\t\tSystem.out.println(\"2. 還書(return)\");\n\t\t\t\t\tSystem.out.println(\"3. 預約書籍(reserve)\");\n\t\t\t\t\tSystem.out.println(\"4. 取消預約書籍(reservecancel)\");\n\t\t\t\t\tSystem.out.println(\"5. 查詢書單(search)\");\n\t\t\t\t\tSystem.out.println(\"6. 離開(exit)\");\n\t\t\t\t\toperation = in.nextLine();\n\t\t\t\t\twhile(!operation.equals(\"borrow\")&&!operation.equals(\"1\")\n\t\t\t\t\t\t&&!operation.equals(\"return\")&&!operation.equals(\"2\")\n\t\t\t\t\t\t&&!operation.equals(\"reserve\")&&!operation.equals(\"3\")\n\t\t\t\t\t\t&&!operation.equals(\"reservecancel\")&&!operation.equals(\"4\")\n\t\t\t\t\t\t&&!operation.equals(\"search\")&&!operation.equals(\"5\")\n\t\t\t\t\t\t&&!operation.equals(\"exit\")&&!operation.equals(\"6\")){\n\t\t\t\t\t\t\tSystem.out.println(\"輸入錯誤!請重新輸入:\");\n\t\t\t\t\t\t\toperation = in.nextLine();\n\t\t\t\t\t}\n\t\t\t\t\tif(!operation.equals(\"search\") && !operation.equals(\"5\")&&!operation.equals(\"exit\")&&!operation.equals(\"6\") ){\n\t\t\t\t\t\tif(operation.equals(\"borrow\")|| operation.equals(\"1\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來借閱呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"return\")||operation.equals(\"2\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來還書呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"reserve\")||operation.equals(\"3\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來預借呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"reservecancel\")||operation.equals(\"4\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來取消預借呢?\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(search_type.equals(\"bookname\"))\tSystem.out.print(\"請輸入書名:\");\n\t\t\t\t\t\telse if(search_type.equals(\"booknum\"))\tSystem.out.print(\"請輸入書號:\");\n\t\t\t\t\t\tanswer = in.nextLine();\n\t\t\t\t\t\tif(operation.equals(\"borrow\")||operation.equals(\"1\")) \n\t\t\t\t\t\t\tbooklists = bs.BorrowBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"return\")||operation.equals(\"2\")) \n\t\t\t\t\t\t\tbooklists = bs.ReturnBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"reserve\")||operation.equals(\"3\")) \n\t\t\t\t\t\t\tbooklists = bs.ReserveBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"reservecancel\")||operation.equals(\"4\")) \n\t\t\t\t\t\t\tbooklists = bs.ReserveCancel(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(operation.equals(\"search\")||operation.equals(\"5\")){\n\t\t\t\t\t\tSystem.out.println(\"請問你要以何種方式查詢呢?\");\n\t\t\t\t\t\tSystem.out.println(\"1. [書號](booknum)\");\n\t\t\t\t\t\tSystem.out.println(\"2. [書名](bookname)\");\n\t\t\t\t\t\tSystem.out.println(\"3. [種類](booktype)\");\n\t\t\t\t\t\tSystem.out.println(\"4. [全部列出](all)\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\n\t\t\t\t\t\tint OrderIndex = 0;\n\t\t\t\t\t\tint TypeIndex = 0;\n\t\t\t\t\t\tif(search_type.equals(\"booknum\")){\n\t\t\t\t\t\t\tOrderIndex = 0;//依書號排列\n\t\t\t\t\t\t\tTypeIndex = 0;\n\t\t\t\t\t\t}else if(search_type.equals(\"bookname\")||search_type.equals(\"all\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 1;\n\t\t\t\t\t\t}else if(search_type.equals(\"booktype\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!search_type.equals(\"all\")){\n\t\t\t\t\t\t\tSystem.out.print(\"請輸入 \"+search_type+\"的關鍵字:\");\n\t\t\t\t\t\t\tquery = in.nextLine();\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,query,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}while(!operation.equals(\"exit\"));\n\t\t\t}else if(identity.equals(\"staff\")){\n\t\t\t\tdo{\n\t\t\t\t\tSystem.out.println(\"=========This is staff page=============\");\n\t\t\t\t\tSystem.out.println(\"請問你要進行何種操作?\");\n\t\t\t\t\tSystem.out.println(\"1. 登錄新書籍(bookregister)\");\n\t\t\t\t\tSystem.out.println(\"2. 刪除書籍(bookdelete)\");\n\t\t\t\t\tSystem.out.println(\"3. 更新書籍資料(bookedit)\");\n\t\t\t\t\tSystem.out.println(\"4. 查詢書單(search)\");\n\t\t\t\t\tSystem.out.println(\"5. 查詢學生資料(viewstudent)\");\n\t\t\t\t\tSystem.out.println(\"6. 離開(exit)\");\n\t\t\t\t\toperation = in.nextLine();\n\t\t\t\t\tif(operation.equals(\"bookregister\")||operation.equals(\"1\")){\n\t\t\t\t\t\tbooklists = bs.RregisterBook(booklists,SizeX);\n\t\t\t\t\t}else if(operation.equals(\"bookdelete\")||operation.equals(\"2\")\n\t\t\t\t\t\t\t||operation.equals(\"bookedit\")||operation.equals(\"3\")){\n\t\t\t\t\t\tif(operation.equals(\"bookdelete\")||operation.equals(\"2\"))\n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來刪除書籍呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"bookedit\")||operation.equals(\"3\"))\n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來修改書籍呢?\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\t\t\t\t\t\t\n\t\t\t\t\t\tif(search_type.equals(\"bookname\"))\tSystem.out.print(\"請輸入書名:\");\n\t\t\t\t\t\telse if(search_type.equals(\"booknum\"))\tSystem.out.print(\"請輸入書號:\");\n\t\t\t\t\t\tanswer = in.nextLine();\n\t\t\t\t\t\tif(operation.equals(\"bookdelete\")||operation.equals(\"2\"))\n\t\t\t\t\t\t\tbooklists = bs.DeleteBooks(booklists,SizeX,SizeY,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"bookedit\")||operation.equals(\"3\"))\n\t\t\t\t\t\t\tbooklists = bs.EditBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\n\t\t\t\t\t}else if(operation.equals(\"search\")||operation.equals(\"4\")){\n\t\t\t\t\t\tSystem.out.println(\"請問你要以何種方式查詢呢?\");\n\t\t\t\t\t\tSystem.out.println(\"1. [書號](booknum)\");\n\t\t\t\t\t\tSystem.out.println(\"2. [書名](bookname)\");\n\t\t\t\t\t\tSystem.out.println(\"3. [種類](booktype)\");\n\t\t\t\t\t\tSystem.out.println(\"4. [全部列出](all)\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\n\t\t\t\t\t\tint OrderIndex = 0;\n\t\t\t\t\t\tint TypeIndex = 0;\n\t\t\t\t\t\tif(search_type.equals(\"booknum\")||search_type.equals(\"1\")){\n\t\t\t\t\t\t\tOrderIndex = 0;//依書號排列\n\t\t\t\t\t\t\tTypeIndex = 0;\n\t\t\t\t\t\t}else if(search_type.equals(\"bookname\")||search_type.equals(\"all\")||search_type.equals(\"2\")||search_type.equals(\"3\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 1;\n\t\t\t\t\t\t}else if(search_type.equals(\"booktype\")||search_type.equals(\"3\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!search_type.equals(\"all\")){\n\t\t\t\t\t\t\tSystem.out.print(\"請輸入 \"+search_type+\"的關鍵字:\");\n\t\t\t\t\t\t\tquery = in.nextLine();\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,query,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(operation.equals(\"viewstudent\")||operation.equals(\"5\")){\n\t\t\t\t\t\tbs.ViewStudent(booklists,SizeX);\n\t\t\t\t\t}\n\t\t\t\t}while(!operation.equals(\"exit\"));\n\t\t\t}\n\t\t\t\n\t\t}while(!identity.equals(\"exit\"));\n\t\t\n\t\tSystem.out.println(\"感謝您使用此系統!\");\n\t}", "public static void main(String[] args) {\n Book book0 = new Book(\"Ulysses\", \"James Joyce\", 732);\n Book book0copy2 = new Book(\"Ulysses\", \"James Joyce\", 732);\n Book book1 = new Book(\"Ender's Game\", \"Orson S. Card\", 324);\n Book book3; //just creates unassigned reference\n Book[] lotr = new Book[3];\n lotr[0] = new Book(\"The Fellowship of the Ring\", \"J.R.R. Tolkien\", 432);\n lotr[1] = new Book(\"The Two Towers\", \"J.R.R. Tolkien\", 322);\n lotr[2] = new Book(\"The Return of the King\", \"J.R.R. Tolkien\", 490);\n\n book0.ripOutPage();\n System.out.print(book0); //calls toString() object method\n\n book1.setAuthor(\"Orson Scott Card\");\n\n for(Book b : lotr) {\n System.out.print(b);\n }\n\n if (book0.isLong()) {\n System.out.println(book0.getTitle() + \" is a long book.\");\n } else {\n System.out.println(book0.getTitle() + \" is a short book.\");\n }\n \n System.out.printf(\"The title of %s by %s is %d characters long.%n\", \n book0.getTitle(), book0.getAuthor(), book0.getTitleLength());\n\n System.out.println(book0.equals(book0copy2));\n System.out.println(book0.equals(book1));\n }", "public static void main(String[] args) {\n\t\tArrayList<Book> bookList=new ArrayList<Book>();\r\n\t\tBook book1= new Book(1001,\"2 States\",\"Chetan Bhagat\",652.32f);\r\n\t\tBook book2= new Book(1002,\"Three idiots\",\"Chetan Bhagat\",650.40f);\r\n\t\tBook book3= new Book(1003,\"Hopeless\",\"Collen Hoover\",456.32f);\r\n\t\tBook book4= new Book(1004,\"The Deal\",\"Ellen Kennedy\",345.32f);\r\n\t\tBook book5= new Book(1005,\"The Goal\",\"Ellen Kennedy\",895.32f);\r\n\t\t\r\n\t\tbookList.add(book1);\r\n\t\tbookList.add(book2);\r\n\t\tbookList.add(book3);\r\n\t\tbookList.add(book4);\r\n\t\tbookList.add(book5);\r\n\t\tfor(Book book:bookList){\r\n\t\t\tSystem.out.println(book.getId()+\" \"+\r\n\t\t\t\t\t\t\t\tbook.getBname()+\" \"+\r\n\t\t\t\t\t\t\t\tbook.getAuthor()+\" \"+\r\n\t\t\t\t\t\t\t\tbook.getPrice());\r\n\t\t}\r\n\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tAuthor au1=new Author(\"Ma Ma\",\"[email protected]\",'F');\r\n\t\tAuthor au2=new Author(\"Mg Mg\",\"[email protected]\",'M');\r\n\t\tAuthor au3=new Author(\"Su Su\",\"[email protected]\",'F');\r\n\t\tBook b1=new Book(\"Software Engineering\",au1,7000);\r\n\t\tBook b2=new Book(\"Java\",au1,8000,2);\r\n\t\tSystem.out.println(\"BookInfo writing by Ma Ma:\");\r\n\t\tSystem.out.println(\"BookName:\"+b1.name+\"\\nAuthor:\"+au1.name+\"\\nPrice:\"+b1.price);\r\n\t\tSystem.out.println(\"BookName:\"+b2.name+\"\\nAuthor:\"+au1.name+\"\\nPrice:\"+b2.price+\"\\nQty:\"+b2.qty);\r\n\t\tSystem.out.println();\r\n\t\tBook b3=new Book(\"Digital\",au2,4000);\r\n\t\tBook b4=new Book(\"Management\",au2,6000,3);\r\n\t\tSystem.out.println(\"BookInfo writing by Mg Mg:\");\r\n\t\tSystem.out.println(\"BookName:\"+b3.name+\"\\nAuthor:\"+au2.name+\"\\nPrice:\"+b3.price);\r\n\t\tSystem.out.println(\"BookName:\"+b4.name+\"\\nAuthor:\"+au2.name+\"\\nPrice:\"+b4.price+\"\\nQty:\"+b4.qty);\r\n\t\tSystem.out.println();\r\n\t\tBook b5=new Book(\"Accounting\",au3,5000);\r\n\t\tBook b6=new Book(\"Javascript\",au3,9000,4);\r\n\t\tSystem.out.println(\"BookInfo writing by Su Su:\");\r\n\t\tSystem.out.println(\"BookName:\"+b5.name+\"\\nAuthor:\"+au3.name+\"\\nPrice:\"+b5.price);\r\n\t\tSystem.out.println(\"BookName:\"+b6.name+\"\\nAuthor:\"+au3.name+\"\\nPrice:\"+b6.price+\"\\nQty:\"+b6.qty);\r\n\t}", "private void printingSearchResults() {\n HashMap<Integer, Double> resultsMap = new HashMap<>();\n for (DocCollector collector : resultsCollector) {\n if (resultsMap.containsKey(collector.getDocId())) {\n double score = resultsMap.get(collector.getDocId()) + collector.getTermScore();\n resultsMap.put(collector.getDocId(), score);\n } else {\n resultsMap.put(collector.getDocId(), collector.getTermScore());\n }\n }\n List<Map.Entry<Integer, Double>> list = new LinkedList<>(resultsMap.entrySet());\n Collections.sort(list, new Comparator<Map.Entry<Integer, Double>>() {\n public int compare(Map.Entry<Integer, Double> o1,\n Map.Entry<Integer, Double> o2) {\n return (o2.getValue()).compareTo(o1.getValue());\n }\n });\n if (list.isEmpty())\n System.out.println(\"no match\");\n else {\n DecimalFormat df = new DecimalFormat(\".##\");\n for (Map.Entry<Integer, Double> each : list)\n System.out.println(\"docId: \" + each.getKey() + \" score: \" + df.format(each.getValue()));\n }\n\n }", "@Override\n\tpublic void printBook(List<Book> books) {\n\t\tIterator<Book> it = books.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tSystem.out.println(it.next());\n\t\t}\n\t\t\n\t}", "protected static void searchByKeysHashYear(String keys, int lowerYear, int upperYear) {\n System.out.println(\"searching in hasher using search terms and year\");\n System.out.println(\"lowerYear: \" + lowerYear);\n System.out.println(\"upperYear: \" + upperYear);\n String[] splitWords = new String[keys.split(\"[ ]+\").length];\n splitWords = keys.split(\"[ ]+\");\n System.out.println(splitWords[0]);\n for (String keyWord : splitWords) {\n keyWord = keyWord.toLowerCase();\n if (map.get(keyWord) != null) {\n ArrayList<Integer> allInstancesofWord = (ArrayList<Integer>) map.get(keyWord);\n {\n for (int i = 0; i < allInstancesofWord.size(); i++) {\n\n Product e = productList.get(allInstancesofWord.get(i));\n if (e.productYearMatch(lowerYear, upperYear)) // if an element is between range of the years. and it has the correct key terms. it is printed.\n {\n \n System.out.println(productList.get(allInstancesofWord.get(i)));\n ProductGUI.Display(e.toString() + \"\\n\");\n }\n else\n System.out.println(\"not in the year \"+ keys + \" \"+lowerYear+ \" \"+ upperYear);\n }\n }\n }\n if (map.get(keyWord) == null) {\n System.out.println(\"The products you are searching for were not found\");\n }\n }\n\n }", "public static void main(String[] args) {\n Set<String> list = new TreeSet<>();\n list.add(\"Song\");\n list.add(\"Album\");\n list.add(\"Artist\");\n list.add(\"Year\");\n list.add(\"Genre\");\n list.add(\"Song\");\n list.add(\"Song\");\n\n System.out.println();\n for(String x : list){\n System.out.println(x);\n }\n\n //NO REPITTED VALUES AND ASCENDED ORDER WHIT COMPARABLE, HASHCODE AND EQUALS\n Set<Persona> list2 = new TreeSet<>();\n list2.add(new Persona(1, \"Rayman\"));\n list2.add(new Persona(2, \"Castlevania\"));\n list2.add(new Persona(3, \"Silent Hill\"));\n list2.add(new Persona(4, \"Silent Hill\"));\n list2.add(new Persona(1, \"Rayman\"));\n\n System.out.println();\n for(Persona x : list2){\n System.out.println(x.getId() + \" - \" + x.getName());\n }\n }", "public void matchingcouple()\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Output :\");\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Following are the matching pairs \");\r\n\t\t\t\t\r\n\t\t\t\tfor(int i=0;i<womenmatchinlist.size();i++)\r\n\t\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t// print the matching pair from same index of men and women matching list\r\n\t\t\t\tSystem.out.println(menmatchinglist.get(i)+\" is engaged with \"+womenmatchinlist.get(i));\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}", "public void viewLibraryBooks(){\n\t\tIterator booksIterator = bookMap.keySet().iterator();\n\t\tint number, i=1;\n\t\tSystem.out.println(\"\\n\\t\\t===Books in the Library===\\n\");\n\t\twhile(booksIterator.hasNext()){\t\n\t\t\tString current = booksIterator.next().toString();\n\t\t\tnumber = bookMap.get(current).size();\n\t\t\tSystem.out.println(\"\\t\\t[\" + i + \"] \" + \"Title: \" + current);\n\t\t\tSystem.out.println(\"\\t\\t Quantity: \" + number + \"\\n\");\t\t\t\n\t\t\ti += 1; \n\t\t}\n\t}", "private static void queryBooksByGenre(){\n\t\tSystem.out.println(\"===Query Books By Genre===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter Genre to Query Books by: \");\n\t\tString genre = string_input.next();\n\t\tint genre_index = getGenreIndex(genre); //returns the index of the genre entered, in ALL_GENRES\n\t\t\n\t\tif(genre_index > -1){//valid genre was entered\n\t\t\tIterator<String> iter = ALL_GENRES.get(genre_index).iterator();\n\t\t\tSystem.out.println(\"All \" + genre + \" books are: \");\n\t\t\tprintAllElements(iter);\n\t\t}\n\t}", "public String searchBooks() {\r\n if (keywords.isEmpty()) {\r\n return \"advanced-search\";\r\n }\r\n\r\n keywords = keywords.trim();\r\n \r\n //Get list of all the queries\r\n List<List<Books>> listOfLists = new ArrayList<List<Books>>();\r\n listOfLists.add(findBooksByGenre(keywords));\r\n listOfLists.add(findBooksByIdentifier(keywords));\r\n listOfLists.add(findBooksByContributor(keywords));\r\n listOfLists.add(findBooksByFormat(keywords));\r\n listOfLists.add(findBooksByPublisher(keywords));\r\n listOfLists.add(findBooksByTitle(keywords));\r\n listOfLists.add(findBooksByYear(keywords));\r\n\r\n clearFields();\r\n\r\n List<Books> books = new ArrayList<Books>();\r\n\r\n //Filter out useless data\r\n List<Books> tempBookList;\r\n for (int cntr = 0; cntr < listOfLists.size(); cntr++) {\r\n tempBookList = listOfLists.get(cntr);\r\n\r\n if (tempBookList == null) {\r\n continue;\r\n }\r\n\r\n if (tempBookList.isEmpty()) {\r\n continue;\r\n }\r\n\r\n books.addAll(tempBookList);\r\n }\r\n\r\n //Remove duplicates\r\n Set<Books> bookSet = new HashSet<Books>();\r\n bookSet.addAll(books);\r\n books.clear();\r\n books.addAll(bookSet);\r\n\r\n return displayBooks(books);\r\n }", "public static void main(String[] args) {\n\n String[] array = {\"AAA\", \"BBB\", \"ABA\", \"ABB\", \"AAA\", \"ABB\", \"ABB\"};\n\n\n for (\n int i = 0;\n i < array.length - 1; i++)\n {\n for (int j = i + 1; j < array.length; j++) {\n\n if ((array[i].equals(array[j])) && (i != j)) {\n System.out.println(\"Дублирующийся элемент \" + array[j]);\n }\n }\n }\n }", "@Override\n\n public boolean equals(Object obj) {\n if (this == obj) {\n return true;\n }\n if (obj == null || getClass() != obj.getClass()) {\n return false;\n }\n Book book = (Book) obj;\n return getBookAuthorName() == book.getBookAuthorName() &&\n bookIsbnNumber() == book.getBookIsbnNumber() &&\n Objects.equals(getBookName(), book.getBookName());\n }", "public void printBookings(){\r\n\t\t//Treemap is used to sort the bookings into calendar order\r\n\t\tTreeMap<Calendar, Integer> m = new TreeMap<Calendar, Integer>();\r\n\t\tSet<Integer> booking = listBookings();\r\n\t\t\r\n\t\t//loops through getting each booking and puts it into the treemap\r\n\t\tfor (Integer id: booking){\r\n\t\t\tBooking b = bookings.get(id);\r\n\t\t\tm.put(b.start(), b.getLength());\r\n\t\t}\r\n\t\t\r\n\t\t//For each calendar in treemap it prints out the date and length of the booking\r\n\t\tSet<Calendar> cal = m.keySet();\r\n\t\tfor(Calendar c: cal) {\r\n\t\t\tprint(c);\r\n\t\t\tSystem.out.print(\" \" + m.get(c));\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString [] array = {\"A\", \"A\", \"B\", \"C\", \"C\"};\n\t\t\n\t\tfor (int j = 0; j < array.length; j++) {\n\t\t\t\n\t\t\tint count = 0;\n\t\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\t\tif (array[i].equals(array[j]))\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\n\t\t\tif (count == 1)\n\t\t\tSystem.out.print(array[j] + \" \");\n\t\t\n\t\t}\n\t\t\n\t}", "public static void printBooks(List<Book> books) {\r\n System.out.println(\"AUTHOR, \" + \"TITLE, \" + \"GENRE, \" + \"SERIES (if any), \" + \"PART (if any), \" + \"PAGES, \" + \"YEAR, \" + \"PRICE\");\r\n\r\n for (Book book : books) {\r\n System.out.println(book.getTitle() + \", \" + book.getAuthor() + \", \" + book.getGenre() + \", \" + book.getSeries() + \", \" + book.getPartNumber() + \", \" + book.getPagesQuantity() + \", \" + book.getYearPublished() + \", \" + book.getPrice());\r\n }\r\n\r\n }", "void availableBooks(){\n\t\tSystem.out.println(\")))))Available books((((((\");\n\t\tfor(int i=0;i<books.length;i++){\n\t\t\tString book=books[i];\n\t\t\tif(book==null){\n\t\t\tcontinue;\n\t\t}\n\t\t\tSystem.out.println(\"*\"+books[i]);\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n\r\n\t\tBook b1 = new Book(23,\"The mads in heaven\",200);\r\n\t\tBook b2 = new Book(25,\"Island Treasury\",300);\r\n\t\tBook b3 = new Book(27,\"Watery heart\",400);\r\n\t\t\r\n\t\tArrayList<Book> al = new ArrayList<Book>();\r\n\t\tal.add(b1);\r\n\t\tal.add(b2);\r\n\t\tal.add(b3);\r\n\t\t\r\n\t\tIterator<Book> itr1 = al.iterator();\r\n\t\twhile(itr1.hasNext())\r\n\t\t{\r\n\t\t\tBook book = itr1.next();\r\n\t\t\tSystem.out.println(\"Book price is: \"+book.price);\r\n\t\t\tSystem.out.println(\"Number of pages in the book are: \"+book.pages);\r\n\t\t\tSystem.out.println(\"The book name is: \"+book.name);\t\r\n\t\t}\r\n\t}", "public void run(){\n\t\tif(searchHow==0){\n\t\t\tint isbnCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestIsbn = new SearchRequest(db, searchForThis, isbnCount, db.size());\n\t\t\t\t\tdb.searchByISBN(requestIsbn);\n\t\t\t\t\tisbnCount = requestIsbn.foundPos;\n\t\t\t\t\tif (requestIsbn.foundPos >= 0) {\n\t\t\t\t\t\tisbnCount++;\n\t\t\t\t\t\tString formatThis = \"Matched ISBN at position: \" + requestIsbn.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestIsbn.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==1){\n\t\t\tint titleCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestTitle = new SearchRequest(db, searchForThis, titleCount, db.size());\n\t\t\t\t\tdb.searchByTitle(requestTitle);\n\t\t\t\t\ttitleCount = requestTitle.foundPos;\n\t\t\t\t\tif (requestTitle.foundPos >= 0) {\n\t\t\t\t\t\ttitleCount++;\n\t\t\t\t\t\tString formatThis = \"Matched title at position: \" + requestTitle.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestTitle.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==2){\n\t\t\tint authorCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestAuthor = new SearchRequest(db, searchForThis, authorCount, db.size());\n\t\t\t\t\tdb.searchByAuthor(requestAuthor);\n\t\t\t\t\tauthorCount = requestAuthor.foundPos;\n\t\t\t\t\tif (requestAuthor.foundPos >= 0) {\n\t\t\t\t\t\tauthorCount++;\n\t\t\t\t\t\tString formatThis = \"Matched author at position: \" + requestAuthor.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestAuthor.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==3){\n\t\t\tint pageCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestPage = new SearchRequest(db, searchForThis, pageCount, db.size());\n\t\t\t\t\tdb.searchByNumPages(requestPage);\n\t\t\t\t\tpageCount = requestPage.foundPos;\n\t\t\t\t\tif (requestPage.foundPos >= 0) {\n\t\t\t\t\t\tpageCount++;\n\t\t\t\t\t\tString formatThis = \"Matched pages at position: \" + requestPage.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestPage.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==4){\n\t\t\tint yearCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestYear = new SearchRequest(db, searchForThis, yearCount, db.size());\n\t\t\t\t\tdb.searchByYear(requestYear);\n\t\t\t\t\tyearCount = requestYear.foundPos;\n\t\t\t\t\tif (requestYear.foundPos >= 0) {\n\t\t\t\t\t\tyearCount++;\n\t\t\t\t\t\tString formatThis = \"Matched year at position: \" + requestYear.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestYear.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t}", "public static ArrayList<Book> search(String title, ArrayList<String> authors, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer)\n if(containsAllAuthors(authors, b))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "private static void outputBook() {\n\t\toutput(\"\");\r\n\t\tfor (book book : library.outputBook()) { // method name changes BOOKS to outputBook()\r\n\t\t\toutput(book + \"\\n\");\r\n\t\t}\t\t\r\n\t}", "public void showBookingsByName(JTextArea output, String firstName, String lastName)\r\n {\r\n output.setText(\"Bookinger på \" + firstName + \" \" + lastName + \"\\n\\n\");\r\n \r\n Iterator<Booking> iter = bookings.iterator();\r\n \r\n while(iter.hasNext())\r\n {\r\n Booking booking = iter.next();\r\n \r\n if(booking.getGuest().getFirstname().equals(firstName) || \r\n booking.getGuest().getLastname().equals(lastName))\r\n {\r\n output.append(booking.toString() \r\n + \"\\n*******************************************************\\n\");\r\n }//End of if\r\n }// End of while\r\n }", "private static void queryBooksByPublisher(){\n\t\tSystem.out.println(\"===Query Books By Publisher===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter Publisher to Query Books by: \");\n\t\tString publisher = string_input.nextLine();\n\t\t\n\t\tif(ALL_PUBLISHERS.containsKey(publisher)){\n\t\t\tIterator<String> iter = ALL_PUBLISHERS.get(publisher).iterator();\n\t\t\tSystem.out.println(\"All books published by \" + publisher + \" are:\"); \n\t\t\tprintAllElements(iter);\n\t\t}\n\t\t\n\t\telse\n\t\t\tSystem.out.println(\"Sorry! There are no such publishers in our records!\");\n\t}", "private void loopAuthors(Book book) {\n for (String s : book.getAuthors()) {\n print(s);\n }\n }", "public static void printValues(HashMap<String, Book> hashmap) {\n for (Book book: hashmap.values()) {\n System.out.println(book);\n }\n }", "public static void main(String[] args) {\n\t\tList<Score> scores = Arrays.asList(\n\t\t\t\tnew Score(\"a\", 61, 71,71),\n\t\t\t\tnew Score(\"b\", 62, 72,82),\n\t\t\t\tnew Score(\"c\", 63, 74,55)\n\t\t\t\t);\n\t\t\n\t\tboolean result1 = scores.stream().anyMatch(x -> x.getMat() > 39);\n\t\tSystem.out.println(\"수학 과락이 아닌사람 T/F \" + result1);\n\t\t\n\t\tboolean result2 = scores.stream().allMatch(x -> x.getKor() > 39);\n\t\tSystem.out.println(\"국어 과락없나요\" + result2);\n\t\t\n\t\tboolean result3 = scores.stream().noneMatch(x -> x.getEng() > 39);\n\t\tSystem.out.println(\"영어 모두 과락?\" + result3);\n\t}", "public static void main(String[] args) {\n\t\tint a, b, c;\r\n\t\t\r\n\t\tfor(a = 1; a <= 20; a++) {\r\n\t\t\tfor(b = 1; b <= 20; b++) {\r\n\t\t\t\tfor(c = 1; c <= 20; c++) {\r\n\t\t\t\t\tif ( (c*c) == (a*a)+(b*b) && (a+b+c) <=20 )\r\n\t\t\t\t\t\tSystem.out.printf(\"%2d,%5d,%10d\\n\",a,b,c);\r\n\t\t\t\t} //%와 d사이에있는 2는 2칸 띄어쓰기 %d는 정수형\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tBook b1 = new Book(111, \"Hello Java\");\r\n\t\tBook b2 = new Book(111, \"Hello Java\");\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(b1 ==b2);\r\n\t\tSystem.out.println(b1.equals(b2));\r\n\t\tSystem.out.println(b1.hashCode());\r\n\t\tSystem.out.println(b2.hashCode());\r\n\t\t\t\r\n\t}", "private void printAvailableBooks() {\n\t\t\n\t}", "public void matchesDemo() \n {\n Map<String, Set<String>> clientMap = new HashMap<>();\n Set<String> interests = new HashSet<>();\n\n interests.add(\"Food\");\n interests.add(\"Wine\");\n interests.add(\"Tandems\");\n clientMap.put(\"Hal\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Walking\");\n interests.add(\"Welding\");\n clientMap.put(\"Gemma\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Cinema\");\n interests.add(\"Wine\");\n clientMap.put(\"Caroline\", interests);\n\n Set<String> halsInterests = clientMap.get(\"Hal\");\n String outputString;\n Set<String> eachClientInterests;\n Set<String> intersection;\n\n for (String eachClient : clientMap.keySet()) \n {\n eachClientInterests = clientMap.get(eachClient);\n intersection = new HashSet<>(halsInterests);\n intersection.retainAll(eachClientInterests);\n outputString = \"Hal and \" + eachClient \n + \" have common interests: \"\n + intersection;\n System.out.println(outputString) ;\n }\n }", "public static void main(String[] theArgs) {\n for (HashSet<String> set : findParens(new ArrayList<HashSet<String>>(), 3)) {\n for (String element : set) {\n System.out.print(element + \" \");\n }\n System.out.println();\n }\n }", "public void search() {\n while (!done) {\n num2 = mNums.get(cntr);\n num1 = mSum - num2;\n\n if (mKeys.contains(num1)) {\n System.out.printf(\"We found our pair!...%d and %d\\n\\n\",num1,num2);\n done = true;\n } //end if\n\n mKeys.add(num2);\n cntr++;\n\n if (cntr > mNums.size()) {\n System.out.println(\"Unable to find a matching pair of Integers. Sorry :(\\n\");\n done = true;\n }\n } //end while\n }", "public void searchYear()\r\n\t{\r\n\r\n\t\tSystem.out.print(\"Please provide a year: \");\r\n\t\tint year = scan.nextInt();\r\n\t\tboolean display = false;\r\n\t\tboolean found = false;\r\n\t\tfor (int i = 0; i < actualSize; i++)\r\n\t\t{\r\n\r\n\t\t\tif (year == data[i].getYear())\r\n\t\t\t{\r\n\t\t\t\tif (display == false)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Title\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\" + \"Year\\t\" + \"rating\\t\" + \"score\");\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(data[i].toString());\r\n\t\t\t\tdisplay = true;\r\n\t\t\t\tfound = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif (found == false)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The year does not match any of the movies.\");\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tint count=0;\n String[] ab= {\"A\", \"B\", \"B\", \"F\", \"A\"};\n \n for(int i=0; i<ab.length;i++){\n\t for(int j=0;j<ab.length;j++){\n\t\t if(ab[i]==ab[j]){\n\t\t\t count++;\n\t\t\t \n\t\t\t if(count==2){\n\t\t\t\t System.out.println(ab[i]);\n\t\t\t\t count= --count-1;\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t }\n\t }\n }\n\t}", "public void addMultipleBook() {\n Set set = new TreeSet();\n System.out.println(\" yours choice how many addressbook you want to create it:--\");\n int number = scanner.nextInt();\n\n for (int index = 1; index <= number; index++) {\n System.out.println(\"give name to your dictionary:--\");\n String name = scanner.next();\n set.add(name);\n }\n System.out.println(set);\n }", "public void getSubject() {\n System.out.println(\"give any Subject: \");\n String subject = input.next();\n for (Card s: cards) {\n if (s.subjectOfBook.equals(subject)) {\n System.out.println(s.titleOfBook + \" \" + s.autherOfBook + \" \" + s.subjectOfBook);\n } \n }\n System.out.println(\"not Found\");\n }", "public static ArrayList<Book> search(String title, ArrayList<String> authors, String isbn, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, authors, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer)\n if(b.getBookIsbn().equals(isbn) || isbn.equals(\"*\"))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "public static void main(String[] args) {\r\n\t\tint x[] = { 1, 2, 5, 8, 10, 7 };\r\n\t\tint y[] = { 3, 5, 9, 10, 9 };\r\n\t\tfor (int i = 0; i < x.length; i++) {\r\n\t\t\tfor (int j = 0; j < y.length; j++) {\r\n\t\t\t\tif (x[i] == y[j]) {\r\n\t\t\t\t\tSystem.out.println(x[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public static void main(String... args) {\n\n Set<Long> As = new HashSet<>();\n int N = 100;\n for (long p = -N; p <= N; ++p) {\n for (long q = -N; q <= p; ++q) {\n for (long r = -N; r <= q; ++r) {\n if (r==0 || p==0 || q==0)\n continue;\n\n long nom = r*p*q;\n long den = r*p + r*q + p*q;\n\n if (den != 0 && nom % den==0 && (nom^den)>=0) {\n long A = nom/den;\n\n if (A==nom) {\n As.add(A);\n System.out.printf(\"A=%d (p=%d, q=%d, r=%d)\\n\", A, p, q, r);\n }\n }\n }\n }\n }\n Long[] aa = As.toArray(new Long[As.size()]);\n Arrays.sort(aa);\n System.out.printf(\"============\\n\");\n System.out.printf(\"A(%d)=%s\\n\", aa.length, Arrays.toString(aa));\n\n for (long a = 1; a < 100; ++a) {\n if (isAlexandrian(a))\n System.out.printf(\"A=%dn\", a);\n }\n }", "protected static void searchByKeysHashIDYear(String keys, String myId, int lowerYear, int upperYear) {\n System.out.println(\"in hasher for keys and id and year\");\n System.out.println(\"lowerYear: \" + lowerYear);\n System.out.println(\"upperYear: \" + upperYear);\n String[] splitWords = new String[keys.split(\"[ ]+\").length];\n splitWords = keys.split(\"[ ]+\");\n System.out.println(splitWords[0]);\n for (String keyWord : splitWords) {\n keyWord = keyWord.toLowerCase();\n if (map.get(keyWord) != null) {\n ArrayList<Integer> allInstancesofWord = (ArrayList<Integer>) map.get(keyWord);\n {\n for (int i = 0; i < allInstancesofWord.size(); i++) {\n\n Product e = productList.get(allInstancesofWord.get(i));\n if (e.productIdMatch(myId) && e.productYearMatch(lowerYear, upperYear)) // if an element has the desired id and it has the correct key terms. it is printed.\n {\n System.out.println(\"Printing keys id and year\");\n ProductGUI.Display(\"\\n\");\n System.out.println(productList.get(allInstancesofWord.get(i)));\n ProductGUI.Display((e.toString() + \"\\n\"));\n }\n }\n }\n }\n if (map.get(keyWord) == null) {\n System.out.println(\"The products you are searching for were not found\");\n }\n }\n\n }", "void printAssociations(HashMap<BitSet, Integer> allAssociations){\n try{\n boolean firstLine = true;\n FileWriter fw = new FileWriter(this.outputFilePath);\n \n for(Map.Entry<BitSet, Integer> entry : allAssociations.entrySet()){\n BitSet bs = entry.getKey();\n if(firstLine)\n firstLine = false;\n else\n fw.write(\"\\n\");\n \n for(int i=0; i<bs.length() ; i++){\n if(bs.get(i))\n fw.write(intToStrItem.get(frequentItemListSetLenOne.get(i).getKey())+\" \");\n }\n\n fw.write(\"(\" + entry.getValue() +\")\");\n }\n \n fw.close();\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }", "public void printMap() {\n Set<String> manufacturers = cars.keySet();\n\n for (String manufacturer : cars.keySet()) {\n System.out.println(String.format(\"The following %s models are in stock: \", manufacturer));\n System.out.println(cars.get(manufacturer));\n\n }\n }", "private void printAnswerResults(){\n\t\tSystem.out.print(\"\\nCorrect Answer Set: \" + q.getCorrectAnswers().toString());\n\t\tSystem.out.print(\"\\nCorrect Answers: \"+correctAnswers+\n\t\t\t\t\t\t \"\\nWrong Answers: \"+wrongAnswers);\n\t}", "public String searchByMaterial(String string, ArrayList<String> materiallist, int count, Set<String> keys, Collection<String> values, Map<String, String> dataTable1) {\nfor(String s:materiallist) {\r\n\t\t\t\r\n\t\t\tif (string.equals(s)) {\r\n\t\t\t//\tSystem.out.print(s);\r\n\t\t\t\tcount--;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t\t}\r\nSystem.out.println(\"A List of Home that matches the Material \"+string+\":\");\r\n\r\nfor(String k: keys) {\r\n\t\r\n\tarraytoprintkey=k.split(\"_\");\r\n\r\n\r\n\t\r\n\t\tif(arraytoprintkey[1].equals(string)) {\r\n\t\t\t\r\n\t\t\t\tSystem.out.print(k);\r\n\t\t\t\tSystem.out.println(\" \"+dataTable1.get(k));\r\n\t\t\t\t\r\n\t\t}\r\n\r\n\t\t\r\n}\r\nSystem.out.println();\r\n\t\tif(count==0) {\r\n\t\t\treturn string;\r\n\t\t}\r\n\t\t\t\r\n\t\treturn null;\r\n\t}", "public String searchByFilter() {\n if (selectedFilter.size() != 0) {\n for (Genre filterOption : selectedFilter) {\n searchTerm = searchResultTerm;\n searchBook();\n\n System.out.println(\"CURRENT NUMBER OF BOOKS: \" + books.size());\n\n BookCollection temp = this.db.getCollectionByGenre(filterOption);\n System.out.println(\"GETTING COLLECTION FOR FILTERING: \" + temp.getCollectionName() + \" NUM OF BOOKS: \"\n + temp.getCollectionBooks().size());\n filterBookList(temp.getCollectionBooks());\n System.out.println(\"UPDATED NUMBER OF BOOKS: \" + books.size());\n }\n } else {\n searchTerm = searchResultTerm;\n searchBook();\n }\n\n return \"list.xhtml?faces-redirect=true\";\n }", "public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t/*80\r\n\t\tint matches = 3162;\r\n\t\tint results = 1218;\r\n\t\tint pairs = 146;\r\n\t\t*/\r\n\t\t//70\r\n\t\t/*int matches = 3302;\r\n\t\tint results = 909;\r\n\t\tint pairs = 59;*/\r\n\r\n\t\tfor(int i=1;i<=10;i++)\r\n\t\t{\r\n\t\t\tdouble b = (0.1*i)*((matches*3)+(results*3)+(pairs*3));\r\n\t\t\tSystem.out.print(Math.round(b)+\",\");\r\n\t\t}\t\r\n\t\r\n\t}", "public void listBooks() {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price FROM books\";\n\n try (Connection conn = this.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public static void seqfilter(ArrayList<String> x, ArrayList<String> y, ArrayList<String> z, JTextArea ta) {\n\t\tfor (int i=0; i<x.size(); i++)\n\t\t{\n\t\t\tfor (int j=0; j<y.size(); j++)\n\t\t\t{\n\t\t\t\tif (x.get(i).equals(y.get(j)))\n\t\t\t\t{\n\t\t\t\t\tz.add(x.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//This is the loop to print all the items of the results array list\n\t\tta.setText(\"< \");\n\t\tfor (int i=0; i<z.size(); i++)\n\t\t{\n\t\t\tta.append(z.get(i)+\" \");\n\t\t}\n\t\tta.append(\">\");\n\t}", "public void getATitle() {\n System.out.println(\"Give any title: \");\n String key = input.next();\n for (Card s: cards) {\n if (s.titleOfBook.equals(key)) {\n System.out.println(s.titleOfBook + \" \" + s.autherOfBook + \" \" + s.subjectOfBook);\n } \n }\n System.out.println(\"not Found\");\n }", "public void sensibleMatches2() \n { \n Map<String, Set<String>> clientMap = new HashMap<>();\n Set<String> interests = new HashSet<>();\n\n interests.add(\"Food\");\n interests.add(\"Wine\");\n interests.add(\"Tandems\");\n clientMap.put(\"Hal\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Walking\");\n interests.add(\"Welding\");\n clientMap.put(\"Gemma\", interests);\n\n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Cinema\");\n interests.add(\"Wine\");\n clientMap.put(\"Caroline\", interests);\n\n Set<String> halsInterests = clientMap.get(\"Hal\");\n String outputString;\n Set<String> eachClientInterests;\n Set<String> intersection ;\n\n for (String eachClient : clientMap.keySet()) \n {\n if (!eachClient.equals(\"Hal\")) \n {\n eachClientInterests = clientMap.get(eachClient);\n intersection = new HashSet<>(halsInterests);\n intersection.retainAll(eachClientInterests);\n outputString = \"Hal and \" + eachClient \n + \" have common interests: \"\n + intersection;\n System.out.println(outputString);\n }\n }\n }", "private void enterAll() {\n\n String sku = \"Java1001\";\n Book book1 = new Book(\"Head First Java\", \"Kathy Sierra and Bert Bates\", \"Easy to read Java workbook\", 47.50, true);\n bookDB.put(sku, book1);\n\n sku = \"Java1002\";\n Book book2 = new Book(\"Thinking in Java\", \"Bruce Eckel\", \"Details about Java under the hood.\", 20.00, true);\n bookDB.put(sku, book2);\n\n sku = \"Orcl1003\";\n Book book3 = new Book(\"OCP: Oracle Certified Professional Jave SE\", \"Jeanne Boyarsky\", \"Everything you need to know in one place\", 45.00, true);\n bookDB.put(sku, book3);\n\n sku = \"Python1004\";\n Book book4 = new Book(\"Automate the Boring Stuff with Python\", \"Al Sweigart\", \"Fun with Python\", 10.50, true);\n bookDB.put(sku, book4);\n\n sku = \"Zombie1005\";\n Book book5 = new Book(\"The Maker's Guide to the Zombie Apocalypse\", \"Simon Monk\", \"Defend Your Base with Simple Circuits, Arduino and Raspberry Pi\", 16.50, false);\n bookDB.put(sku, book5);\n\n sku = \"Rasp1006\";\n Book book6 = new Book(\"Raspberry Pi Projects for the Evil Genius\", \"Donald Norris\", \"A dozen friendly fun projects for the Raspberry Pi!\", 14.75, true);\n bookDB.put(sku, book6);\n }", "public static void printAll() {\n // Print all the data in the hashtable\n RocksIterator iter = db.newIterator();\n\n for (iter.seekToFirst(); iter.isValid(); iter.next()) {\n System.out.println(new String(iter.key()) + \"\\t=\\t\" + ByteIntUtilities.convertByteArrayToDouble(iter.value()));\n }\n\n iter.close();\n }", "public void showAllSchedulesFiltered(ArrayList<Scheduler> schedulesToPrint) {\n ArrayList<String> filters = new ArrayList<>();\n while (yesNoQuestion(\"Would you like to filter for another class?\")) {\n System.out.println(\"What is the Base name of the class you want to filter for \"\n + \"(eg. CPSC 210, NOT CPSC 210 201)\");\n filters.add(scanner.nextLine());\n }\n for (int i = 0; i < schedulesToPrint.size(); i++) {\n for (String s : filters) {\n if (Arrays.stream(schedulesToPrint.get(i).getCoursesInSchedule()).anyMatch(s::equals)) {\n System.out.println(\" ____ \" + (i + 1) + \":\");\n printSchedule(schedulesToPrint.get(i));\n System.out.println(\" ____ \");\n }\n }\n }\n }", "public String advancedSearchBooks() {\r\n List<Books> books = new ArrayList<Books>();\r\n keywords = keywords.trim();\r\n \r\n switch (searchBy) {\r\n case \"all\":\r\n return searchBooks();\r\n case \"title\":\r\n books = findBooksByTitle(keywords);\r\n break;\r\n case \"identifier\":\r\n books = findBooksByIdentifier(keywords);\r\n break;\r\n case \"contributor\":\r\n books = findBooksByContributor(keywords);\r\n break;\r\n case \"publisher\":\r\n books = findBooksByPublisher(keywords);\r\n break;\r\n case \"year\":\r\n books = findBooksByYear(keywords);\r\n break;\r\n case \"genre\":\r\n books = findBooksByGenre(keywords);\r\n break;\r\n case \"format\":\r\n books = findBooksByFormat(keywords);\r\n break;\r\n }\r\n clearFields();\r\n\r\n if (books == null || books.isEmpty()) {\r\n books = new ArrayList<Books>();\r\n }\r\n\r\n return displayBooks(books);\r\n }", "public static void main(String[] args) {\n\t\tList l=new ArrayList();\r\n\t\tl.add(12);\r\n\t\tl.add(45);\r\n\t\tl.add(15);\r\n\t\tl.add(78);\r\n\t\t\r\n\t\tList l2=new ArrayList();\r\n\t\tl2.add(12);\r\n\t\tl2.add(45);\r\n\t\tl2.add(10);\r\n\t\tl2.add(78);\r\n\t\t\r\n\t\tBoolean m=l.containsAll(l2);\r\n\t\t\r\n\t\tif(m)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Elements are same\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Not equal\");\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n Inventory inventory = new Inventory();\n initializeInventory(inventory);\n\n GuitarSpec test = \n new GuitarSpec(\"b\", \"b\", \"b\", \"b\");\n List matchingGuitars = inventory.search(test);\n if (!matchingGuitars.isEmpty()) {\n System.out.println(\"搜索结果----\");\n for (Iterator i = matchingGuitars.iterator(); i.hasNext(); ) {\n Guitar guitar = (Guitar)i.next();\n GuitarSpec spec = guitar.getSpec();\n System.out.println(\"你搜索的这款吉他:品牌为\" +spec.getBuilder() + \"--型号为\" + spec.getModel() + \"--类型为\" +\n spec.getType() + \"--材质为\" +spec.getWood() + \"--价格为¥\" +\n guitar.getPrice()+\"--ID为\"+guitar.getID());\n }\n } else {\n System.out.println(\"Sorry, 我们没有这一款吉他.\");\n }\n }", "public String toString(){\n\t\treturn name + \": \" + books + \" books checked out\";\n\t}", "public static void main(String[] args) {\n\t\tint[] a={1,2,3,4,5};\r\n\t\tint[] b={2,3,7,8,9,4,5};\r\n\t\tfor(int i=0;i<a.length;i++){\r\n\t\t\tfor(int j=0;j<b.length;j++){\r\n\t\t\t\tif(a[i]==b[j])\r\n\t\t\t\t\tSystem.out.println(b[j]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private boolean Equals(ArrayList<Integer> list) {\n f = list.get(0);\n o = list.get(1);\n r = list.get(2);\n t = list.get(3);\n y = list.get(4);\n s = list.get(5);\n i = list.get(6);\n x = list.get(7);\n e = list.get(8);\n n = list.get(9);\n // Y is in 1's place, T in 10's, R in 100's, O in 1000's place and finally F in 10000's place. assign these\n // values approprately for each number.\n FORTY = (f * 10000 + o * 1000 + r * 100 + t * 10 + y * 1);\n SIXTY = (s * 10000 + i * 1000 + x * 100 + t * 10 + y * 1);\n TEN = (t * 100 + e * 10 + n * 1);\n int sum = FORTY + TEN + TEN;\n\n // if our values match up correctly, then we will show the values of each.\n if (sum == SIXTY) {\n System.out.printf(\"Forty: %d,\\nTen: %d,\\nSixty: %d\\n\", FORTY, TEN, SIXTY);\n System.out.printf(\"The values of each letters are as follows:\\nF = %d,\\nO = %d,\\nR = %d,\\nT = %d,\\nY = %d,\\n\" +\n \"S = %d,\\nI = %d,\\nX = %d,\\nE = %d,\\nand N = %d.\", f, o, r, t, y, s, i, x, e, n);\n return true;\n }\n return false;\n }", "public static void main(String[] args) {\r\n\t\tCard aceHearts = new Card(\"Ace\", \"Hearts\", 14);\r\n\t\tSystem.out.println(aceHearts.rank());\r\n\t\tSystem.out.println(aceHearts.suit());\r\n\t\tSystem.out.println(aceHearts.pointValue());\r\n\t\tSystem.out.println(aceHearts.toString());\r\n\t\tCard tenDiamonds = new Card(\"Ten\", \"Diamonds\", 10);\r\n\t\tSystem.out.println(tenDiamonds.rank());\r\n\t\tSystem.out.println(tenDiamonds.suit());\r\n\t\tSystem.out.println(tenDiamonds.pointValue());\r\n\t\tSystem.out.println(tenDiamonds.toString());\r\n\t\tCard fiveSpades = new Card(\"Five\", \"Spades\", 5);\r\n\t\tSystem.out.println(fiveSpades.rank());\r\n\t\tSystem.out.println(fiveSpades.suit());\r\n\t\tSystem.out.println(fiveSpades.pointValue());\r\n\t\tSystem.out.println(fiveSpades.toString());\r\n\t\tSystem.out.println(aceHearts.matches(tenDiamonds));\r\n\t\tSystem.out.println(aceHearts.matches(fiveSpades));\r\n\t\tSystem.out.println(aceHearts.matches(aceHearts));\r\n\t\tSystem.out.println(tenDiamonds.matches(fiveSpades));\r\n\t\tSystem.out.println(tenDiamonds.matches(aceHearts));\r\n\t\tSystem.out.println(tenDiamonds.matches(tenDiamonds));\r\n\t\tSystem.out.println(fiveSpades.matches(aceHearts));\r\n\t\tSystem.out.println(fiveSpades.matches(tenDiamonds));\r\n\t\tSystem.out.println(fiveSpades.matches(fiveSpades));\r\n\t}", "public static void main(String[] args) {\n Map<Integer, Integer> map = new HashMap();\n for (int i = 0; i < 5; i++) {\n int j = nextInt();\n map.put(j, map.getOrDefault(j, 0)+1);\n }\n if (map.size() != 2) {\n out.println(\"No\");\n } else {\n if (map.values().stream().sorted().collect(Collectors.toList()).equals(List.of(2, 3))) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }\n\n out.flush();\n }", "public void showGenre(Genre genre) {\n for (Record r : cataloue) {\n if (r.getGenre() == genre) {\n System.out.println(r);\n }\n }\n\n }", "private void displayStudentByName(String name) {\n\n int falg = 0;\n\n for (Student student : studentDatabase) {\n\n if (student.getName().equals(name)) {\n\n stdOut.println(student.toString());\n\n falg = 1;\n\n break;\n }\n }\n\n if (falg == 0) {\n\n stdOut.println(\"cannot find student\\n\");\n }\n }", "protected static void searchByYear(int yearLow, int yearHigh) {\n for (Product element : productList) {\n System.out.println(\"lowerYear: \" + yearLow);\n System.out.println(\"upperYear: \" + yearHigh);\n if (element.productYearMatch(yearLow, yearHigh)) // if product years match, the product will be printed\n {\n System.out.println(\"\");\n ProductGUI.Display(\"\\n\");\n System.out.println(element);\n ProductGUI.Display(element.toString());\n }\n }\n }", "public static void printMatches(ArrayList<Glootie> aliens, Glootie g) {\r\n\t\tSystem.out.println(\"Matches for \"+ g);\r\n\t\tArrayList<Glootie> gMatches = findMatches(g,aliens);\r\n\t\tif(gMatches.size() < 10) {\r\n\t\t\tSystem.out.println(gMatches);\r\n\t\t}else {\r\n\t\t\tSystem.out.println(gMatches.size() + \" matches is too many to print\");\r\n\t\t}\r\n\r\n\t}", "public static void printBooksInTable(List<Book> books) {\r\n\r\n String format = \"%-17s %-45s %-15s %-30s %-12s %-10s %-8s %-8s \\n\";\r\n String formatTable = \"%-17s %-45s %-15s %-25s %9s %13d %9d %9.2f \\n\";\r\n System.out.format(format, \"AUTHOR\", \"TITLE\", \"GENRE\", \"SERIES\", \"PART\", \"PAGES\", \"YEAR\", \"PRICE\");\r\n System.out.println(\"-----------------------------------------------------------------------------------------------------------------------------------------------------\");\r\n\r\n for (Book book : books) {\r\n System.out.format(formatTable, book.getAuthor(), book.getTitle(), book.getGenre(), book.getSeries(), book.getPartNumber(), book.getPagesQuantity(), book.getYearPublished(), book.getPrice());\r\n System.out.println(\"-----------------------------------------------------------------------------------------------------------------------------------------------------\");\r\n }\r\n\r\n }", "private static void print_Assignment(Gradebook gradebook, String[] flags) {\n //sort grades highest to lowest\n if (flags[3] != null && flags[3].equals(\"G\")) {\n List<Student> studentList = gradebook.getAllStudents();\n Map<Integer, Set<Student>> gradeToName = new HashMap<Integer, Set<Student>>();\n Set<Integer> grades = new HashSet<Integer>();\n\n for(Student s : studentList){\n Assignment assign = gradebook.getAssignment(flags[0]);\n Map<Assignment, Integer> gradeMap = gradebook.getStudentGrades(s);\n Integer grade = gradeMap.get(assign);\n\n Set<Student> studs = gradeToName.get(grade);\n if(studs == null){\n\n studs = new HashSet<Student>();\n }\n\n studs.add(s);\n gradeToName.put(grade, studs);\n grades.add(grade);\n }\n\n List<Integer> sortedList = new ArrayList<Integer>(grades);\n Collections.sort(sortedList, Collections.reverseOrder());\n\n for(Integer i : sortedList){\n Set<Student> studs = gradeToName.get(i);\n for(Student s : studs)\n System.out.println(\"(\" + s.getLast() + \", \" + s.getFirst() + \", \" + i + \")\");\n }\n\n // sort display aplhabetically\n } else if (flags[4] != null && flags[4].equals(\"A\")){\n //compare override class at bottom of file\n List<Student> studentsAlpha = gradebook.getAllStudents();\n Collections.sort(studentsAlpha, new Comparator<Student>() {\n @Override\n public int compare(Student o1, Student o2) {\n if ( o2.getLast().compareToIgnoreCase(o1.getLast()) == 0) {\n return o1.getFirst().compareToIgnoreCase(o2.getFirst());\n } else {\n return o1.getLast().compareToIgnoreCase(o2.getLast());\n }\n }\n });\n\n for (Student stud: studentsAlpha) {\n // flags[0] should be assign name\n System.out.println(\"(\" + stud.getLast() + \", \" + stud.getFirst() + \", \" + gradebook.getPointsAssignment(stud, gradebook.getAssignment(flags[0])) + \")\");\n }\n\n } else {\n throw new IllegalArgumentException(\"Please specify if you want the display to be alphabetical or by grades highest to lowest.\");\n }\n return;\n }", "public static void main(String[] args) {\n // for testing, add books and find book using it's name\n /* Library.books.add(book1);\n Library.books.add(book2);\n Library.books.add(book3);\n System.out.println(\"Enter namer for Book:\");\n String bookName = sc.nextLine();\n \n for (int i = 0; i <3 ; i++) {\n\n if (Library.books.get(i).getName().equalsIgnoreCase(bookName)) {\n \n System.out.println(books.get(i).getName());\n System.out.println(i);\n }\n }*/\n \n do{\n choicesInMenu(menu());\n } while (goOn);\n //Library.addBook();\n //Library.showAllBooks();\n\n }", "public static void main(String[] args) {\n Set<String> mySet = new HashSet<String>(100,50);\n mySet.add(\"APPLE\");\n mySet.add(\"LG\");\n mySet.add(\"HTTC\");\n mySet.add(\"APPLE\");\n mySet.add(\"SAMSUNG\");\n Iterator<String> iterator = mySet.iterator();\n while (iterator.hasNext()){\n System.out.println(iterator.next());\n }\n\n\n\n }", "private static void print_Final(Gradebook gradebook, String[] flags){\n if (flags[3] != null && flags[3].equals(\"G\")){\n List<Student> studentsList = gradebook.getAllStudents();\n //Map<Student, Double>\n Map<Double, List<Student>> grades = new HashMap<Double, List<Student>>();\n Set<Double> gradeSet = new HashSet<Double>();\n\n for(Student s : studentsList){\n double grade = gradebook.getGradeStudent(s);\n List<Student> studs = grades.get(grade);\n\n if(studs == null){\n studs = new ArrayList<Student>();\n }\n\n studs.add(s);\n grades.put(grade, studs);\n gradeSet.add(grade);\n }\n\n List<Double> gradeList = new ArrayList<Double>(gradeSet);\n Collections.sort(gradeList, Collections.reverseOrder());\n\n DecimalFormat df = new DecimalFormat(\"#.####\"); //Round to 4 decimal places\n df.setRoundingMode(RoundingMode.HALF_UP);\n for(Double d : gradeList){\n\n List<Student> studs = grades.get(d);\n for(Student s : studs){\n\n System.out.println(\"(\" + s.getLast() + \", \" + s.getFirst() + \", \" + df.format(d) + \")\");\n }\n }\n } else if (flags[4] != null && flags[4].equals(\"A\")){\n //compare override class at bottom of file\n List<Student> studentsAlpha = gradebook.getAllStudents();\n Collections.sort(studentsAlpha, new Comparator<Student>() {\n @Override\n public int compare(Student o1, Student o2) {\n if ( o2.getLast().compareToIgnoreCase(o1.getLast()) == 0) {\n return o1.getFirst().compareToIgnoreCase(o2.getFirst());\n } else {\n return o1.getLast().compareToIgnoreCase(o2.getLast());\n }\n }\n });\n\n DecimalFormat df = new DecimalFormat(\"#.####\"); //Round to 4 decimal places\n df.setRoundingMode(RoundingMode.HALF_UP);\n for (Student stud: studentsAlpha) {\n System.out.println(\"(\" + stud.getLast() + \", \" + stud.getFirst() + \", \" + df.format(gradebook.getGradeStudent(stud)) + \")\");\n }\n\n }\n else{\n throw new IllegalArgumentException(\"Grade or Alphabetical flag missing.\");\n }\n return;\n }", "public static void main(String[] args) {\n\t\tHashMap<Price,String> hm = new HashMap<Price,String>();\n\t\tPrice p1 = new Price(100,\"mango\");\n\t\tPrice p2 = new Price(200,\"apple\");\n\t\tPrice p3 = new Price(500,\"custard\");\n\t\tPrice p4 = new Price(700,\"grapes\");\n\t\thm.put(p1, \"mango\"); // key cannot accept duplicate keys so inserting price as a key\n\t\thm.put(p2, \"apple\");\n\t\thm.put(p3, \"custard\");\n\t\thm.put(p4, \"grapes\");\n\t\tPrice p5 = new Price(200,\"apple\");\n\t\thm.put(p5, \"apple\");\n\t\tSet set1 = hm.keySet();\n\t\tSystem.out.println(set1);\n\t\tCollection c = hm.values();\n\t\t\n\t\tfor(Map.Entry<Price, String> map : hm.entrySet()){\n\t\t\tPrice key =map.getKey();\n\t\t\tString value = map.getValue();\n\t\t\tSystem.out.println(key+\" \"+value);\n\t\t}\n\t}", "public void listBooks() {\n for (int g = 0; g < books.length; g++) {\n books[g].toString();\n }\n// List all books in Bookstore\n }", "public static ArrayList<Book> search(String title, ArrayList<String> authors, String isbn, String publisher, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, authors, isbn, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer)\n if(b.getBookPublisher().equals(publisher) || publisher.equals(\"*\"))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "public static void main(String[] args) {\n\t\tList <String> color = new ArrayList<String>(5);\r\n\t\tcolor.add(\"Red\");\r\n\t\tcolor.add(\"Green\");\r\n\t\tcolor.add(\"Orange\");\r\n\t\tcolor.add(\"white\");\r\n\t\tcolor.add(\"black\");\r\n\t\t\r\n\t\tList<String>color2 =new ArrayList<String>(5);\r\n\t\tcolor2.add(\"red\");\r\n\t\tcolor2.add(\"Green\");\r\n\t\tcolor2.add(\"orange\");\r\n\t\tcolor2.add(\"White\");\r\n\t\tcolor2.add(\"Black\");\r\n\t\t\r\n\t\tArrayList<String>color3 = new ArrayList<String>();\r\n\t\t\tfor(String temp:color)\r\n\t\t\t\tcolor3.add(color2.contains(temp)? \"Yes\" : \"No\");\r\n\t\t\tSystem.out.println(color3);\r\n\t}", "public void searchByArtist()\n {\n String input = JOptionPane.showInputDialog(null,\"Enter the artist you'd like to search for:\");\n input = input.replaceAll(\" \", \"_\").toUpperCase(); //standardize output.\n \n Collections.sort(catalog, new ArtistComparator());\n int index = Collections.binarySearch(catalog, \n new Album(input,\"\",null), new ArtistComparator());\n //Since an artist could be listed multiple times, there is *no guarantee*\n //which artist index we find. So, we have to look at the artists\n //left and right of the initial match until we stop matching.\n if(index >= 0)\n {\n Album initial = catalog.get(index);\n String artist = initial.getArtist();\n \n ArrayList<Album> foundAlbums = new ArrayList<>();\n //this ArrayList will have only the albums of our found artist \n foundAlbums.add(initial);\n try { \n int j = index, k = index;\n while(artist.equalsIgnoreCase(catalog.get(j+1).getArtist()))\n {\n foundAlbums.add(catalog.get(j+1));\n j++;\n }\n while(artist.equalsIgnoreCase(catalog.get(k-1).getArtist()))\n {\n foundAlbums.add(catalog.get(k-1));\n k--;\n }\n }\n catch(IndexOutOfBoundsException e) {\n //happens on the last round of the while-loop test expressions\n //don't do anyhting because now we need to print out our albums.\n }\n System.out.print(\"Artist: \" + artist + \"\\nAlbums: \");\n for(Album a : foundAlbums)\n System.out.print(a.getAlbum() + \"\\n\\t\");\n System.out.println();\n }\n else System.err.println(\"Artist '\" + input + \"' not found!\\n\"); \n }", "public static ArrayList<Book> search(String title, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: purchasedBooks.keySet())\n if(b.getBookName().equals(title) || title.equals(\"*\"))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "public void exercise() {\n List<Transaction> ex1 = transactions.stream()\n .filter(transaction -> transaction.getYear() == 2011)\n .sorted(Comparator.comparing(Transaction::getValue))\n .collect(Collectors.toList());\n System.out.println(ex1);\n\n //2 What are all the unique cities where the traders work?\n List<String> ex2 = transactions.stream()\n .map(transaction -> transaction.getTrader().getCity())\n .distinct()\n .collect(Collectors.toList());\n System.out.println(ex2);\n\n //alternative solution\n Set<String> ex2alt = transactions.stream()\n .map(transaction -> transaction.getTrader().getCity())\n .collect(Collectors.toSet());\n\n //3 Find all traders from Cambridge and sort them by name.\n List<Trader> ex3 = transactions.stream()\n .map(Transaction::getTrader)\n .distinct()\n .filter(trader -> trader.getCity() == \"Cambridge\")\n .sorted(Comparator.comparing(Trader::getName))\n .collect(Collectors.toList());\n System.out.println(ex3);\n\n //4 Return a string of all traders’ names sorted alphabetically.\n String ex4 = transactions.stream()\n .map(transaction -> transaction.getTrader().getName())\n .distinct()\n .sorted()\n .reduce(\"\", (n1, n2) -> n1 + n2);\n System.out.println(ex4);\n\n //alternative solution\n String ex4Alt = transactions.stream()\n .map(transaction -> transaction.getTrader().getName())\n .distinct()\n .sorted()\n .collect(Collectors.joining());\n System.out.println(ex4Alt);\n\n //5 Are any traders based in Milan?\n Boolean ex5 = transactions.stream()\n .anyMatch(transaction -> transaction.getTrader().getCity().equals(\"Milan\"));\n System.out.println(ex5);\n\n //6 Print the values of all transactions from the traders living in Cambridge.\n transactions.stream()\n .filter(transaction -> transaction.getTrader().getCity().equals(\"Cambridge\"))\n .forEach(System.out::println);\n\n //7 What’s the highest value of all the transactions?\n Optional<Integer> ex7 = transactions.stream()\n .map(Transaction::getValue)\n .reduce(Integer::max);\n System.out.println(ex7);\n\n //8 Find the transaction with the smallest value.\n Optional<Transaction> ex8 = transactions.stream()\n .reduce((t1, t2) -> t1.getValue() < t2.getValue() ? t1 : t2);\n System.out.println(ex8);\n\n //alternative solution\n Optional<Transaction> ex8Alt = transactions.stream()\n .min(Comparator.comparing(Transaction::getValue));\n System.out.println(ex8Alt);\n\n }", "private void displayScholarshipByName(String name) {\n\n int falg = 0;\n\n stdOut.println(name + \"\\n\");\n\n for (Scholarship scholarship : scholarshipDatabase) {\n\n stdOut.println(scholarship.getName() + \"\\n\");\n\n if (scholarship.getName().equals(name)) {\n\n stdOut.println(scholarship.toString());\n\n falg = 1;\n\n break;\n }\n }\n\n if (falg == 0) {\n\n stdOut.println(\"cannot find scholarship\\n\");\n\n }\n }", "private void searchBooks(String callNumber, String[] keywords,int startYear, int endYear) {\n\t\t/* Loop to sequentially search master list 'Reference' */\n\t\tfor (int i = 0; i < items.size(); i++)\n\t\t\tif ((callNumber.equals(\"\") || items.get(i).getCallNumber()\n\t\t\t\t\t.equalsIgnoreCase(callNumber))\n\t\t\t\t\t&& (keywords == null || matchedKeywords(keywords, items\n\t\t\t\t\t\t\t.get(i).getTitle()))\n\t\t\t\t\t&& (items.get(i).getYear() >= startYear && items.get(i)\n\t\t\t\t\t\t\t.getYear() <= endYear)) {\n\t\t\t\tReference ref = items.get(i);\n\t\t\t\t/* Checks if reference is of a 'Book' type */\n\t\t\t\tif (ref instanceof Book) {\n\t\t\t\t\tBook book = (Book) ref;\n\t\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\t\tSystem.out.println(book.toString());\n\t\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\t}\n\n\t\t\t}\n\t}", "public String toString() {\r\n return books.toString();\r\n }", "public static void main(String[] args) {\n\t\tMap<String,Double> items = new HashMap<>();\r\n\t\t\r\n\t\titems.put(\"Toaster\",350.00);\t\t//inits elements into map [STRING == KEY; DOUBLE == VALUE]\r\n\t\titems.put(\"Dongle\", 5.99);\r\n\t\titems.put(\"Sham Wow\", 19.99);\r\n\t\titems.put(\"Flex Seal\",19.99);\r\n\t\t\r\n\t\tSet<String> setOKeys = items.keySet();\r\n\t\tint count = 0;\r\n\t\tfor(String key : items.keySet()){\r\n\t\t\tSystem.out.print(++count + \") \" + key + \": $\" /*+ items.get(key)USED IN NORMAL FORMAT; NEEDED TO UPDATE FOR 2 DECI POINTS see below*/);\r\n\t\t\tSystem.out.printf(\"%.2f\\n\", items.get(key));\t//printf; decimal format to help\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(items.containsKey(\"Sham Wow\"));\r\n\t\tSystem.out.println(items.containsValue(19.99));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t//ANIMAL BOOK HASH MAP EXAMPLE\r\n\t\tMap<String, Integer> ani = new HashMap<>();\r\n\t\tani.put(\"Toucan\", 40);\r\n\t\tani.put(\"Lizard\", 7);\t\t\t//Stored by Integer value\r\n\t\tani.put(\"Wallaby\", 18);\r\n\t\t\r\n\t\tSystem.out.println(ani.get(\"Lizard\"));\r\n\t\t\r\n\t\tani.remove(\"Toucan\");\r\n\t\t\r\n\t\tSystem.out.println(ani); //toString Method is in the collections class automatically\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t//TREE MAP\r\n\t\tSet<Character> letters = new TreeSet<>(); //LINKEDHASHSET will be unordered\r\n\t\tletters.add('b');\r\n\t\tletters.add('c');\r\n\t\tletters.add('a');\r\n\t\tletters.add('c');\t\t//duplicate REMOVED automatically\r\n\t\t\r\n\t\tSystem.out.println(letters);\r\n\t\t\r\n\t\tletters.remove('b');\r\n\t\tSystem.out.println(letters);\r\n\t\t\r\n\t\tSystem.out.println(letters.contains('f'));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tLinkedList<String> food = new LinkedList<>(); //can do list-linked list, linked list-linked list\r\n\t\t\r\n\t\tfood.add(\"Sauerkraut\");\r\n\t\tfood.add(\"Carrots\");\r\n\t\tfood.add(\"Mud\");\r\n\t\tfood.add(1, \"Margarine\"); //at indx 1; Margarine\r\n\t\t\r\n\t\tCollections.sort(food); //method in collections class which sorts\r\n\t\tfood.toString();\r\n\t\t//food.clear(); clears list\r\n\t\t\r\n\t\tString marg = food.get(3);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tQueue<String> cities = new PriorityQueue<>();\r\n\t\t\r\n\t\tcities.offer(\"Detroit\");\t\t//QUEUES 'OFFER'\r\n\t\tcities.offer(\"Los Angeles\");\r\n\t\tcities.offer(\"Vienna\");\r\n\t\tcities.offer(\"Windsor\");\r\n\t\t\r\n\t\tSystem.out.println(cities.peek()); //insertion order\r\n\t\tSystem.out.println(cities);\r\n\t\t\r\n\t\tStack<String> dishes = new Stack<>();\r\n\t\t\r\n\t\tdishes.add(\"Cereal bowl\");\r\n\t\tdishes.add(\"Lunch tray\");\r\n\t\tdishes.add(\"Pots and pans\");\r\n\t\tdishes.add(\"Dinner fork\");\r\n\t\t\r\n\t\tSystem.out.println(dishes.peek());\r\n\t\t\r\n\t\tdishes.pop();\r\n\t\tdishes.pop();\t\t//removing the oldest; fifo \r\n\t\t\r\n\t\tSystem.out.println(dishes);\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tTreeSet<Integer> treeset = new TreeSet<Integer>();\n\t\ttreeset.add(1);\n\t\tint a=0,b=0;\n\t\tint number = sc.nextInt();\n\t\tint pairnumber = sc.nextInt();\n\t\tArrayList<matching> arraylist = new ArrayList<matching>();\n\t\t//연결 정보를 arraylist에 저장\n\t\tfor(int i =0;i<pairnumber;i++) {\n\t\t\ta=sc.nextInt();\n\t\t\tb=sc.nextInt();\n\t\t\tarraylist.add(new matching(a,b));\n\t\t}\n\n\t\tIterator<matching> itr = arraylist.iterator();\n\t\t//연결된 컴퓨터를 set에 넣는다.\n\t\tfor(int i =0;i<pairnumber;i++)\n\t\t{\n\t\t\titr = arraylist.iterator();\n\t\t\twhile(itr.hasNext()) {\n\t\t\t\tmatching temp2 = itr.next();\n\t\t\t\t//System.out.println(temp2.getnum1());\n\t\t\t\tif(treeset.contains(temp2.getnum1())|| treeset.contains(temp2.getnum2())) {\n\t\t\t\t\ttreeset.add(temp2.getnum2());\n\t\t\t\t\ttreeset.add(temp2.getnum1());\n\t\t\t\t\titr.remove();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(treeset.size()-1);\n\t}", "void compareSearch();", "@Override\n public List<Book> result(List<Book> books) {\n return search.result(books);\n }", "public static void main(String[] args) {\n\t\tLinkedHashSet<String> set=new LinkedHashSet<>();\n\t\tset.add(\"name\");\n\t\tset.add(\"surname\");\n\t\tset.add(\"address\");\n\t\tset.add(\"name\");\n\t\tset.add(\"surname\");\n\t\tset.add(\"address\");\n\t\t\n\t\tfor(String s:set)\n\t\t{\n\t\t\tSystem.out.println(s);\n\t\t}\n\t\n\n\t}", "public static void main(String[] args) {\n\t\tBook bookArray[] = { new Fiction(\"Nineteen Eighty-Four \"), new Fiction(\"The Handmaid's Tale\"),\n\t\t\t\tnew Fiction(\"The Great Gatsby\"), new Fiction(\"Pride and Prejudice\"),\n\t\t\t\tnew Fiction(\"The Catcher in the Rye\"), new NonFiction(\"The Story of Silent Spring \"),\n\t\t\t\tnew NonFiction(\"Between the World and Me\"), new NonFiction(\"Black Boy\"),\n\t\t\t\tnew NonFiction(\"In Cold Blood\"), new NonFiction(\"Meditations\") };\n\n\t\t// This for loop will displays the Each Fiction and Non-Fiction book details\n\t\tfor (int i = 0; i < bookArray.length; i++) {\n\t\t\t// Displaying the information of each book\n\t\t\tSystem.out.println(bookArray[i].toString());\n\t\t}\n\t}", "public static void main(String[] args) {\n // Reflexive\n System.out.println(o.equals(o));\n System.out.println(r.equals(r));\n\n // Symmetric\n System.out.println(o.equals(p) + \" = \" + p.equals(o));\n System.out.println(r.equals(s) + \" = \" + s.equals(r));\n\n // Transitive\n System.out.println(o.equals(p) + \" = \" + p.equals(q) + \" = \" + o.equals(q));\n System.out.println(r.equals(s) + \" = \" + s.equals(t) + \" = \" + r.equals(t));\n\n // Comparing Point to ColorPoint\n System.out.println(p.equals(s.asPoint()));\n System.out.println(s.asPoint().equals(p));\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(search(ar, 0, num, 90));\n\t}", "public static ArrayList<Book> search(String title, ArrayList<String> authors, String isbn, String publisher, String sortOrder, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, authors, isbn, publisher, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer) {\n if (b.getBookPublisher().equals(publisher) || publisher.equals(\"*\"))\n searchedBooks.add(b);\n }\n if (sortOrder.equals(\"title\")) {\n Collections.sort(searchedBooks, Book.BookTitleComparator);\n }\n else if(sortOrder.equals(\"publish-date\")){\n Collections.sort(searchedBooks,Book.BookDateComparator);\n }\n else{\n\n }\n return searchedBooks;\n }", "public static void main(String[] args) {\n ArrayList<Contact> contactBook = new ArrayList();\n\n Contact contact1 = new Contact(\"Gabe Newell\", \"[email protected]\");\n Contact contact2 = new Contact(\"Todd Howard\", \"[email protected]\");\n\n contactBook.add(contact1);\n contactBook.add(contact2);\n \n for (Contact contacts : contactBook) {\n System.out.println(contacts.toString());\n }\n\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Books)) {\n return false;\n }\n Books other = (Books) object;\n if ((this.bookno == null && other.bookno != null) || (this.bookno != null && !this.bookno.equals(other.bookno))) {\n return false;\n }\n return true;\n }", "public void show_book()\n\t{\n\t\tsize=arr.size();\n\t\tif(size>0)\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(\"===========================================================\");\n\t\t\tSystem.out.println(\"Address Book List\");\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t\tint i=1;\n\n\t\t\t//Special loop:= For Each loop for array list\n\t\t\tfor(String x: arr)\n\t\t\t{\n\t\t\t\tSystem.out.println(i+\". \"+x);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"No data Found\");\n\t\t}\n\t}", "public void listEntries() {\n\t\t// Get the entries as a linked list\n\t\tLinkedList<BookEntry> entries = new LinkedList<>(phoneBook.values());\n\t\tCollections.sort(entries); // Sort the entries\n\n\t\tfor (BookEntry entry : entries) {\n\t\t\tSystem.out.println(\"Name = \" + entry.getPerson());\n\t\t\tSystem.out.printf(\"Number =(%s) %s%n\", entry.getNumber().getAreaCode(), entry.getNumber().getPhoneNumberNotAreaCode());\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}" ]
[ "0.6029367", "0.56720525", "0.5666578", "0.5603096", "0.55917144", "0.5558397", "0.5556992", "0.5511476", "0.5493243", "0.54698753", "0.5417855", "0.5350883", "0.5349979", "0.53449774", "0.5324482", "0.5313602", "0.5307809", "0.529509", "0.5294402", "0.5269696", "0.5266791", "0.52574193", "0.52567554", "0.5251406", "0.5206507", "0.5200065", "0.51944596", "0.5186656", "0.5176332", "0.5155162", "0.5152425", "0.51404846", "0.5137507", "0.51332664", "0.51205957", "0.5117535", "0.50993097", "0.5093142", "0.5083634", "0.5075573", "0.5069377", "0.50594294", "0.5054169", "0.50404567", "0.5028733", "0.50215733", "0.5020935", "0.4995543", "0.49923766", "0.49845397", "0.49762315", "0.49609962", "0.4958684", "0.49582368", "0.4955595", "0.49552175", "0.49471003", "0.49401292", "0.49362898", "0.4925028", "0.492171", "0.492081", "0.4918774", "0.49137986", "0.49067003", "0.49034497", "0.48960823", "0.48953056", "0.48931384", "0.48896015", "0.4886912", "0.48836333", "0.48824194", "0.48798224", "0.48790357", "0.48776552", "0.4872426", "0.4864944", "0.48575044", "0.48490185", "0.48432922", "0.48415077", "0.4840265", "0.48287296", "0.48227495", "0.48207244", "0.48172078", "0.4802705", "0.47938776", "0.4791825", "0.47882962", "0.47831717", "0.4783142", "0.47826076", "0.47810915", "0.47799292", "0.47699994", "0.4768998", "0.4767262", "0.476453", "0.4761154" ]
0.0
-1
Prints out every book that matches equals given values.
public void listBooksByAuthor(String name) { String sql = "SELECT ISBN, BookName, AuthorName, Price " + "FROM books " + "WHERE AuthorName = ?"; try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) { // Set values pstmt.setString(1, name); ResultSet rs = pstmt.executeQuery(); // Print results while(rs.next()) { System.out.println(rs.getInt("ISBN") + "\t" + rs.getString("BookName") + "\t" + rs.getString("AuthorName") + "\t" + rs.getInt("Price")); } } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\t\n\t\tHashSet<BookList> set = new HashSet<BookList>();\n\t\t\n\t\tBookList b1 = new BookList(101,\" Let us C\", \" Yashwant Kanetkar\", \" BPB \", 8);\n\t\tBookList b2 = new BookList(102, \" Data communication & Networking\", \" Forouzan\", \" Mc Graw Hill \", 4);\n\t\tBookList b3 = new BookList(103, \" Operating System\", \" Galvin\", \" Wiley \", 6);\n\t\tBookList b4 = new BookList(103, \" Operating System\", \" Galvin\", \" Wiley \", 6);\n\t\t\n\t\tset.add(b1);\n\t\tset.add(b2);\n\t\tset.add(b3);\n\t\tset.add(b4);\n\t\t\n\t\tfor(BookList b:set) {\n\t\t\tSystem.out.println(b.id+\" \"+b.name+\" \"+b.author+\" \"+b.publisher+\" \"+b.quantity);\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tIterator<BookList> itr = set.iterator();\n\t\t\n\t\twhile (itr.hasNext()) {\n\t\tSystem.out.println(itr.next().toString());\n\t\t\n\t\t}\n\n\t}", "public static void main(String[] args) {\n Iterable<Book> notCheckedOut = FluentIterable\n .from(Library.ALL_BOOKS)\n .filter(Utils.IS_NOT_LOANED);\n System.out.println(\"not checked out\");\n System.out.println(Utils.JOINER.join(notCheckedOut));\n System.out.println();\n \n // books that are checked out to Zeb\n Iterable<Book> checkedOutToZeb = FluentIterable\n .from(Library.ALL_BOOKS)\n .filter(Utils.IS_LOANED_TO_ZEB);\n System.out.println(\"checked out to Zeb\");\n System.out.println(Utils.JOINER.join(checkedOutToZeb));\n System.out.println();\n \n // books that are checked out to someone named \"Tobias\"\n Iterable<Book> checkedOutToSomeoneNamedTobias = FluentIterable\n .from(Library.ALL_BOOKS)\n .filter(Utils.IS_LOANED_TO_SOMEONE_NAMED_TOBIAS);\n System.out.println(\"checked out to someone named 'Tobias'\");\n System.out.println(Utils.JOINER.join(checkedOutToSomeoneNamedTobias));\n System.out.println();\n }", "public ArrayList<Book> search(String part){ \n this.searchBooks = new ArrayList<Book>();\n this.numberedListOfSearch = new HashMap<Integer, Book>();\n if (part.length()>=4){\n //Adding all the searching books into an ArrayList<Book>\n //No duplicating for books having the same title\n boolean bookExist = false;\n for (Book book : this.libraryBooks){\n if ((book.getTitle().toLowerCase().contains(part.toLowerCase())) || (book.getAuthor().toLowerCase().contains(part.toLowerCase()))){\n //Check whether any books having the same title in the list\n for (Book bookSearch : this.searchBooks){\n if (bookSearch.getTitle().equals(book.getTitle())){\n bookExist = true;\n break;\n }\n }\n //If none!\n if(!bookExist){\n this.searchBooks.add(book);\n }\n }\n bookExist = false;\n }\n //To put into a numbered list for printing\n //No duplicating for books having the same title\n for (int i =0; i < (this.searchBooks.size());i++){\n // put the book in the HashMap for printing \n this.numberedListOfSearch.put(i+1, this.searchBooks.get(i));\n }\n\n //To print out\n this.println(\"The searching process has finished!\");\n String researchBooks=\"\";\n //check whether the numbered list is empty or not\n if(this.numberedListOfSearch.size() >0){\n researchBooks += \"{\";\n for (int i = 0; i < this.numberedListOfSearch.size();i++){\n researchBooks += (i+1);\n researchBooks += \": \";\n researchBooks += this.numberedListOfSearch.get(i+1).toString();\n researchBooks += \"; \";\n }\n researchBooks = researchBooks.substring(0, researchBooks.length()-2);\n researchBooks += \"}\"; \n }\n //if the numbered list is empty\n else if ( this.numberedListOfSearch.size() == 0){\n researchBooks += \"Nothing found!\";\n }\n this.println(researchBooks);\n }\n\n //If not enough input key words!\n else{\n this.println(\"Please enter more key words! At least four!!\");\n }\n return this.searchBooks;\n }", "private static void queryBooksByAuthor(){\n\t\tSystem.out.println(\"===Query Books By Author===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter First Name of Author to Query Books by: \");\n\t\tString author_firstname = string_input.next();\n\t\t\n\t\tSystem.out.println(\"Enter Middle Name of Author to Query Books by (Type 'null' if Author has no middlename): \");\n\t\tString author_middlename = string_input.next();\n\t\tif(author_middlename.equalsIgnoreCase(\"null\"))\n\t\t\tauthor_middlename = \"\";\n\t\t\n\t\tSystem.out.println(\"Enter Last Name of Author to Query Books by: \");\n\t\tString author_lastname = string_input.next();\n\t\t\n\t\tString author_fullname = author_firstname + \" \" + author_middlename + \" \" + author_lastname;\n\t\t\n\t\tif(ALL_AUTHORS.containsKey(author_fullname)){//if author_full_name exists in the Hashtable then print out all of the author's book titles\n\t\t\tSystem.out.println(\"Author found!\");\n\t\t\tSystem.out.println(author_fullname + \"'s list of book titles are: \"); \n\t\t\tIterator<String> iter = ALL_AUTHORS.get(author_fullname).iterator();\n\t\t\tprintAllElements(iter);\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Sorry Author name entered does not exist in our records\");\n\t}", "public void printBookDetails(Book bookToSearch) {\n boolean exists = false;\n\n //Search if the given book exists in the library\n // There are better ways. But not with arrays!!\n for (Book element : books) {\n if (element.equals(bookToSearch)) {\n exists = true;\n }\n\n //Print book details if boook found\n if (exists) {\n System.out.print(bookToSearch.toString());\n } else {\n System.out.print(bookToSearch.toString() + \" not found\");\n }\n }\n }", "public static void bookNameSearch(Set<Book> books) {\n Pattern pattern = Pattern.compile(SEARCH_PARAMETER);\n for (Book book : books) {\n Matcher matcher = pattern.matcher(book.getBookName());\n if (matcher.find()) {\n System.out.println(book);\n }\n }\n }", "public void printByNumber() {\n for (int i = 0; i < numBooks; i++) {\n for (int j = i + 1; j < numBooks; j++) {\n if (books[i].getNumber().compareTo(books[j].getNumber()) > 0)\n {\n Book temp = books[i];\n books[i] = books[j];\n books[j] = temp;\n }\n }\n }\n System.out.println(\"**List of books by the book numbers.\");\n for (Book b : books){\n if(b != null) {\n System.out.println(b);\n }\n }\n System.out.println(\"**End of list\");\n }", "public static void main(String[] args) {\n\t\tint SizeX = 10 , SizeY = 7;\n\t\tString search_type =\"\";//用書名還是書號\n\t\tString answer =\"\";\n\t\tString query = \"\";//搜尋的關鍵字\n\t\tString operation = \"\";//儲存操作的動作: 借書/還書等\n\t\tString identity = \"\";//儲存使用者身分,student/staff/exit\n\t\tScanner in = new Scanner(System.in);\n\t\tString [][] booklists = new String[SizeX][SizeY];\n\t\t//建立資料庫\n\t\tbooklists = AddBooks(\"82101\",\"Cihai\",\"Reference\",\"Shu Xincheng\",\"20000\",booklists,0);\n\t\tbooklists = AddBooks(\"80001\",\"WW2 History\",\"History\",\"Winston Churchill\",\"971\",booklists,1);\n\t\tbooklists = AddBooks(\"00003\",\"Egg 100\",\"Cookbook\",\"Su yuan ma\",\"104\",booklists,2);\n\t\tbooklists = AddBooks(\"50001\",\"Be a honest man\",\"Political\",\"Ma Ying jeou\",\"520\",booklists,3);\n\t\tbooklists = AddBooks(\"85719\",\"Sword Art Online\",\"Novel\",\"Reki Kawahara\",\"8763\",booklists,4);\n\t\tbooklists = AddBooks(\"85728\",\"Spice and Wolf\",\"Novel\",\"Isuna Hasekura\",\"510\",booklists,5);\n\t\tbooklists = AddBooks(\"85707\",\"The Old Man and the Sea\",\"Novel\",\"Ernest Hemingway\",\"127\",booklists,6);\n\t\tbooklists = AddBooks(\"85703\",\"Romance of the Three Kingdoms\",\"Novel\",\"Luo Guanzhong\",\"480\",booklists,7);\n\t\tbooklists = AddBooks(\"80005\",\"Records of the Grand Historian\",\"History\",\"Sima Qian\",\"6000\",booklists,8);\n\t\tbooklists[4][5] = \"true\";\n\t\tbooklists[4][6] = \"1\";\n\t\t\n\t\tSystem.out.println(\"【圖書館租借模擬系統】\");\n\t\tBookSystem bs = new BookSystem();\n\t\tdo{\n\t\t\tSystem.out.println(\"請問你是何種身分?學生(student)或者圖書館人員(staff)?(輸入exit離開)\");\n\t\t\tidentity = in.nextLine();\n\t\t\tif(identity.equals(\"student\")){\n\t\t\t\tdo{\n\t\t\t\t\tbs.ViewStudent(booklists, SizeX);\n\t\t\t\t\tSystem.out.println(\"請問你要進行何種操作?\");\n\t\t\t\t\tSystem.out.println(\"1. 借書(borrow)\");\n\t\t\t\t\tSystem.out.println(\"2. 還書(return)\");\n\t\t\t\t\tSystem.out.println(\"3. 預約書籍(reserve)\");\n\t\t\t\t\tSystem.out.println(\"4. 取消預約書籍(reservecancel)\");\n\t\t\t\t\tSystem.out.println(\"5. 查詢書單(search)\");\n\t\t\t\t\tSystem.out.println(\"6. 離開(exit)\");\n\t\t\t\t\toperation = in.nextLine();\n\t\t\t\t\twhile(!operation.equals(\"borrow\")&&!operation.equals(\"1\")\n\t\t\t\t\t\t&&!operation.equals(\"return\")&&!operation.equals(\"2\")\n\t\t\t\t\t\t&&!operation.equals(\"reserve\")&&!operation.equals(\"3\")\n\t\t\t\t\t\t&&!operation.equals(\"reservecancel\")&&!operation.equals(\"4\")\n\t\t\t\t\t\t&&!operation.equals(\"search\")&&!operation.equals(\"5\")\n\t\t\t\t\t\t&&!operation.equals(\"exit\")&&!operation.equals(\"6\")){\n\t\t\t\t\t\t\tSystem.out.println(\"輸入錯誤!請重新輸入:\");\n\t\t\t\t\t\t\toperation = in.nextLine();\n\t\t\t\t\t}\n\t\t\t\t\tif(!operation.equals(\"search\") && !operation.equals(\"5\")&&!operation.equals(\"exit\")&&!operation.equals(\"6\") ){\n\t\t\t\t\t\tif(operation.equals(\"borrow\")|| operation.equals(\"1\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來借閱呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"return\")||operation.equals(\"2\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來還書呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"reserve\")||operation.equals(\"3\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來預借呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"reservecancel\")||operation.equals(\"4\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來取消預借呢?\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(search_type.equals(\"bookname\"))\tSystem.out.print(\"請輸入書名:\");\n\t\t\t\t\t\telse if(search_type.equals(\"booknum\"))\tSystem.out.print(\"請輸入書號:\");\n\t\t\t\t\t\tanswer = in.nextLine();\n\t\t\t\t\t\tif(operation.equals(\"borrow\")||operation.equals(\"1\")) \n\t\t\t\t\t\t\tbooklists = bs.BorrowBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"return\")||operation.equals(\"2\")) \n\t\t\t\t\t\t\tbooklists = bs.ReturnBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"reserve\")||operation.equals(\"3\")) \n\t\t\t\t\t\t\tbooklists = bs.ReserveBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"reservecancel\")||operation.equals(\"4\")) \n\t\t\t\t\t\t\tbooklists = bs.ReserveCancel(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(operation.equals(\"search\")||operation.equals(\"5\")){\n\t\t\t\t\t\tSystem.out.println(\"請問你要以何種方式查詢呢?\");\n\t\t\t\t\t\tSystem.out.println(\"1. [書號](booknum)\");\n\t\t\t\t\t\tSystem.out.println(\"2. [書名](bookname)\");\n\t\t\t\t\t\tSystem.out.println(\"3. [種類](booktype)\");\n\t\t\t\t\t\tSystem.out.println(\"4. [全部列出](all)\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\n\t\t\t\t\t\tint OrderIndex = 0;\n\t\t\t\t\t\tint TypeIndex = 0;\n\t\t\t\t\t\tif(search_type.equals(\"booknum\")){\n\t\t\t\t\t\t\tOrderIndex = 0;//依書號排列\n\t\t\t\t\t\t\tTypeIndex = 0;\n\t\t\t\t\t\t}else if(search_type.equals(\"bookname\")||search_type.equals(\"all\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 1;\n\t\t\t\t\t\t}else if(search_type.equals(\"booktype\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!search_type.equals(\"all\")){\n\t\t\t\t\t\t\tSystem.out.print(\"請輸入 \"+search_type+\"的關鍵字:\");\n\t\t\t\t\t\t\tquery = in.nextLine();\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,query,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}while(!operation.equals(\"exit\"));\n\t\t\t}else if(identity.equals(\"staff\")){\n\t\t\t\tdo{\n\t\t\t\t\tSystem.out.println(\"=========This is staff page=============\");\n\t\t\t\t\tSystem.out.println(\"請問你要進行何種操作?\");\n\t\t\t\t\tSystem.out.println(\"1. 登錄新書籍(bookregister)\");\n\t\t\t\t\tSystem.out.println(\"2. 刪除書籍(bookdelete)\");\n\t\t\t\t\tSystem.out.println(\"3. 更新書籍資料(bookedit)\");\n\t\t\t\t\tSystem.out.println(\"4. 查詢書單(search)\");\n\t\t\t\t\tSystem.out.println(\"5. 查詢學生資料(viewstudent)\");\n\t\t\t\t\tSystem.out.println(\"6. 離開(exit)\");\n\t\t\t\t\toperation = in.nextLine();\n\t\t\t\t\tif(operation.equals(\"bookregister\")||operation.equals(\"1\")){\n\t\t\t\t\t\tbooklists = bs.RregisterBook(booklists,SizeX);\n\t\t\t\t\t}else if(operation.equals(\"bookdelete\")||operation.equals(\"2\")\n\t\t\t\t\t\t\t||operation.equals(\"bookedit\")||operation.equals(\"3\")){\n\t\t\t\t\t\tif(operation.equals(\"bookdelete\")||operation.equals(\"2\"))\n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來刪除書籍呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"bookedit\")||operation.equals(\"3\"))\n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來修改書籍呢?\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\t\t\t\t\t\t\n\t\t\t\t\t\tif(search_type.equals(\"bookname\"))\tSystem.out.print(\"請輸入書名:\");\n\t\t\t\t\t\telse if(search_type.equals(\"booknum\"))\tSystem.out.print(\"請輸入書號:\");\n\t\t\t\t\t\tanswer = in.nextLine();\n\t\t\t\t\t\tif(operation.equals(\"bookdelete\")||operation.equals(\"2\"))\n\t\t\t\t\t\t\tbooklists = bs.DeleteBooks(booklists,SizeX,SizeY,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"bookedit\")||operation.equals(\"3\"))\n\t\t\t\t\t\t\tbooklists = bs.EditBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\n\t\t\t\t\t}else if(operation.equals(\"search\")||operation.equals(\"4\")){\n\t\t\t\t\t\tSystem.out.println(\"請問你要以何種方式查詢呢?\");\n\t\t\t\t\t\tSystem.out.println(\"1. [書號](booknum)\");\n\t\t\t\t\t\tSystem.out.println(\"2. [書名](bookname)\");\n\t\t\t\t\t\tSystem.out.println(\"3. [種類](booktype)\");\n\t\t\t\t\t\tSystem.out.println(\"4. [全部列出](all)\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\n\t\t\t\t\t\tint OrderIndex = 0;\n\t\t\t\t\t\tint TypeIndex = 0;\n\t\t\t\t\t\tif(search_type.equals(\"booknum\")||search_type.equals(\"1\")){\n\t\t\t\t\t\t\tOrderIndex = 0;//依書號排列\n\t\t\t\t\t\t\tTypeIndex = 0;\n\t\t\t\t\t\t}else if(search_type.equals(\"bookname\")||search_type.equals(\"all\")||search_type.equals(\"2\")||search_type.equals(\"3\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 1;\n\t\t\t\t\t\t}else if(search_type.equals(\"booktype\")||search_type.equals(\"3\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!search_type.equals(\"all\")){\n\t\t\t\t\t\t\tSystem.out.print(\"請輸入 \"+search_type+\"的關鍵字:\");\n\t\t\t\t\t\t\tquery = in.nextLine();\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,query,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(operation.equals(\"viewstudent\")||operation.equals(\"5\")){\n\t\t\t\t\t\tbs.ViewStudent(booklists,SizeX);\n\t\t\t\t\t}\n\t\t\t\t}while(!operation.equals(\"exit\"));\n\t\t\t}\n\t\t\t\n\t\t}while(!identity.equals(\"exit\"));\n\t\t\n\t\tSystem.out.println(\"感謝您使用此系統!\");\n\t}", "public static void main(String[] args) {\n Book book0 = new Book(\"Ulysses\", \"James Joyce\", 732);\n Book book0copy2 = new Book(\"Ulysses\", \"James Joyce\", 732);\n Book book1 = new Book(\"Ender's Game\", \"Orson S. Card\", 324);\n Book book3; //just creates unassigned reference\n Book[] lotr = new Book[3];\n lotr[0] = new Book(\"The Fellowship of the Ring\", \"J.R.R. Tolkien\", 432);\n lotr[1] = new Book(\"The Two Towers\", \"J.R.R. Tolkien\", 322);\n lotr[2] = new Book(\"The Return of the King\", \"J.R.R. Tolkien\", 490);\n\n book0.ripOutPage();\n System.out.print(book0); //calls toString() object method\n\n book1.setAuthor(\"Orson Scott Card\");\n\n for(Book b : lotr) {\n System.out.print(b);\n }\n\n if (book0.isLong()) {\n System.out.println(book0.getTitle() + \" is a long book.\");\n } else {\n System.out.println(book0.getTitle() + \" is a short book.\");\n }\n \n System.out.printf(\"The title of %s by %s is %d characters long.%n\", \n book0.getTitle(), book0.getAuthor(), book0.getTitleLength());\n\n System.out.println(book0.equals(book0copy2));\n System.out.println(book0.equals(book1));\n }", "public static void main(String[] args) {\n\t\tArrayList<Book> bookList=new ArrayList<Book>();\r\n\t\tBook book1= new Book(1001,\"2 States\",\"Chetan Bhagat\",652.32f);\r\n\t\tBook book2= new Book(1002,\"Three idiots\",\"Chetan Bhagat\",650.40f);\r\n\t\tBook book3= new Book(1003,\"Hopeless\",\"Collen Hoover\",456.32f);\r\n\t\tBook book4= new Book(1004,\"The Deal\",\"Ellen Kennedy\",345.32f);\r\n\t\tBook book5= new Book(1005,\"The Goal\",\"Ellen Kennedy\",895.32f);\r\n\t\t\r\n\t\tbookList.add(book1);\r\n\t\tbookList.add(book2);\r\n\t\tbookList.add(book3);\r\n\t\tbookList.add(book4);\r\n\t\tbookList.add(book5);\r\n\t\tfor(Book book:bookList){\r\n\t\t\tSystem.out.println(book.getId()+\" \"+\r\n\t\t\t\t\t\t\t\tbook.getBname()+\" \"+\r\n\t\t\t\t\t\t\t\tbook.getAuthor()+\" \"+\r\n\t\t\t\t\t\t\t\tbook.getPrice());\r\n\t\t}\r\n\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tAuthor au1=new Author(\"Ma Ma\",\"[email protected]\",'F');\r\n\t\tAuthor au2=new Author(\"Mg Mg\",\"[email protected]\",'M');\r\n\t\tAuthor au3=new Author(\"Su Su\",\"[email protected]\",'F');\r\n\t\tBook b1=new Book(\"Software Engineering\",au1,7000);\r\n\t\tBook b2=new Book(\"Java\",au1,8000,2);\r\n\t\tSystem.out.println(\"BookInfo writing by Ma Ma:\");\r\n\t\tSystem.out.println(\"BookName:\"+b1.name+\"\\nAuthor:\"+au1.name+\"\\nPrice:\"+b1.price);\r\n\t\tSystem.out.println(\"BookName:\"+b2.name+\"\\nAuthor:\"+au1.name+\"\\nPrice:\"+b2.price+\"\\nQty:\"+b2.qty);\r\n\t\tSystem.out.println();\r\n\t\tBook b3=new Book(\"Digital\",au2,4000);\r\n\t\tBook b4=new Book(\"Management\",au2,6000,3);\r\n\t\tSystem.out.println(\"BookInfo writing by Mg Mg:\");\r\n\t\tSystem.out.println(\"BookName:\"+b3.name+\"\\nAuthor:\"+au2.name+\"\\nPrice:\"+b3.price);\r\n\t\tSystem.out.println(\"BookName:\"+b4.name+\"\\nAuthor:\"+au2.name+\"\\nPrice:\"+b4.price+\"\\nQty:\"+b4.qty);\r\n\t\tSystem.out.println();\r\n\t\tBook b5=new Book(\"Accounting\",au3,5000);\r\n\t\tBook b6=new Book(\"Javascript\",au3,9000,4);\r\n\t\tSystem.out.println(\"BookInfo writing by Su Su:\");\r\n\t\tSystem.out.println(\"BookName:\"+b5.name+\"\\nAuthor:\"+au3.name+\"\\nPrice:\"+b5.price);\r\n\t\tSystem.out.println(\"BookName:\"+b6.name+\"\\nAuthor:\"+au3.name+\"\\nPrice:\"+b6.price+\"\\nQty:\"+b6.qty);\r\n\t}", "private void printingSearchResults() {\n HashMap<Integer, Double> resultsMap = new HashMap<>();\n for (DocCollector collector : resultsCollector) {\n if (resultsMap.containsKey(collector.getDocId())) {\n double score = resultsMap.get(collector.getDocId()) + collector.getTermScore();\n resultsMap.put(collector.getDocId(), score);\n } else {\n resultsMap.put(collector.getDocId(), collector.getTermScore());\n }\n }\n List<Map.Entry<Integer, Double>> list = new LinkedList<>(resultsMap.entrySet());\n Collections.sort(list, new Comparator<Map.Entry<Integer, Double>>() {\n public int compare(Map.Entry<Integer, Double> o1,\n Map.Entry<Integer, Double> o2) {\n return (o2.getValue()).compareTo(o1.getValue());\n }\n });\n if (list.isEmpty())\n System.out.println(\"no match\");\n else {\n DecimalFormat df = new DecimalFormat(\".##\");\n for (Map.Entry<Integer, Double> each : list)\n System.out.println(\"docId: \" + each.getKey() + \" score: \" + df.format(each.getValue()));\n }\n\n }", "@Override\n\tpublic void printBook(List<Book> books) {\n\t\tIterator<Book> it = books.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tSystem.out.println(it.next());\n\t\t}\n\t\t\n\t}", "protected static void searchByKeysHashYear(String keys, int lowerYear, int upperYear) {\n System.out.println(\"searching in hasher using search terms and year\");\n System.out.println(\"lowerYear: \" + lowerYear);\n System.out.println(\"upperYear: \" + upperYear);\n String[] splitWords = new String[keys.split(\"[ ]+\").length];\n splitWords = keys.split(\"[ ]+\");\n System.out.println(splitWords[0]);\n for (String keyWord : splitWords) {\n keyWord = keyWord.toLowerCase();\n if (map.get(keyWord) != null) {\n ArrayList<Integer> allInstancesofWord = (ArrayList<Integer>) map.get(keyWord);\n {\n for (int i = 0; i < allInstancesofWord.size(); i++) {\n\n Product e = productList.get(allInstancesofWord.get(i));\n if (e.productYearMatch(lowerYear, upperYear)) // if an element is between range of the years. and it has the correct key terms. it is printed.\n {\n \n System.out.println(productList.get(allInstancesofWord.get(i)));\n ProductGUI.Display(e.toString() + \"\\n\");\n }\n else\n System.out.println(\"not in the year \"+ keys + \" \"+lowerYear+ \" \"+ upperYear);\n }\n }\n }\n if (map.get(keyWord) == null) {\n System.out.println(\"The products you are searching for were not found\");\n }\n }\n\n }", "public static void main(String[] args) {\n Set<String> list = new TreeSet<>();\n list.add(\"Song\");\n list.add(\"Album\");\n list.add(\"Artist\");\n list.add(\"Year\");\n list.add(\"Genre\");\n list.add(\"Song\");\n list.add(\"Song\");\n\n System.out.println();\n for(String x : list){\n System.out.println(x);\n }\n\n //NO REPITTED VALUES AND ASCENDED ORDER WHIT COMPARABLE, HASHCODE AND EQUALS\n Set<Persona> list2 = new TreeSet<>();\n list2.add(new Persona(1, \"Rayman\"));\n list2.add(new Persona(2, \"Castlevania\"));\n list2.add(new Persona(3, \"Silent Hill\"));\n list2.add(new Persona(4, \"Silent Hill\"));\n list2.add(new Persona(1, \"Rayman\"));\n\n System.out.println();\n for(Persona x : list2){\n System.out.println(x.getId() + \" - \" + x.getName());\n }\n }", "public void matchingcouple()\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Output :\");\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Following are the matching pairs \");\r\n\t\t\t\t\r\n\t\t\t\tfor(int i=0;i<womenmatchinlist.size();i++)\r\n\t\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t// print the matching pair from same index of men and women matching list\r\n\t\t\t\tSystem.out.println(menmatchinglist.get(i)+\" is engaged with \"+womenmatchinlist.get(i));\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}", "public void viewLibraryBooks(){\n\t\tIterator booksIterator = bookMap.keySet().iterator();\n\t\tint number, i=1;\n\t\tSystem.out.println(\"\\n\\t\\t===Books in the Library===\\n\");\n\t\twhile(booksIterator.hasNext()){\t\n\t\t\tString current = booksIterator.next().toString();\n\t\t\tnumber = bookMap.get(current).size();\n\t\t\tSystem.out.println(\"\\t\\t[\" + i + \"] \" + \"Title: \" + current);\n\t\t\tSystem.out.println(\"\\t\\t Quantity: \" + number + \"\\n\");\t\t\t\n\t\t\ti += 1; \n\t\t}\n\t}", "private static void queryBooksByGenre(){\n\t\tSystem.out.println(\"===Query Books By Genre===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter Genre to Query Books by: \");\n\t\tString genre = string_input.next();\n\t\tint genre_index = getGenreIndex(genre); //returns the index of the genre entered, in ALL_GENRES\n\t\t\n\t\tif(genre_index > -1){//valid genre was entered\n\t\t\tIterator<String> iter = ALL_GENRES.get(genre_index).iterator();\n\t\t\tSystem.out.println(\"All \" + genre + \" books are: \");\n\t\t\tprintAllElements(iter);\n\t\t}\n\t}", "public String searchBooks() {\r\n if (keywords.isEmpty()) {\r\n return \"advanced-search\";\r\n }\r\n\r\n keywords = keywords.trim();\r\n \r\n //Get list of all the queries\r\n List<List<Books>> listOfLists = new ArrayList<List<Books>>();\r\n listOfLists.add(findBooksByGenre(keywords));\r\n listOfLists.add(findBooksByIdentifier(keywords));\r\n listOfLists.add(findBooksByContributor(keywords));\r\n listOfLists.add(findBooksByFormat(keywords));\r\n listOfLists.add(findBooksByPublisher(keywords));\r\n listOfLists.add(findBooksByTitle(keywords));\r\n listOfLists.add(findBooksByYear(keywords));\r\n\r\n clearFields();\r\n\r\n List<Books> books = new ArrayList<Books>();\r\n\r\n //Filter out useless data\r\n List<Books> tempBookList;\r\n for (int cntr = 0; cntr < listOfLists.size(); cntr++) {\r\n tempBookList = listOfLists.get(cntr);\r\n\r\n if (tempBookList == null) {\r\n continue;\r\n }\r\n\r\n if (tempBookList.isEmpty()) {\r\n continue;\r\n }\r\n\r\n books.addAll(tempBookList);\r\n }\r\n\r\n //Remove duplicates\r\n Set<Books> bookSet = new HashSet<Books>();\r\n bookSet.addAll(books);\r\n books.clear();\r\n books.addAll(bookSet);\r\n\r\n return displayBooks(books);\r\n }", "public static void main(String[] args) {\n\n String[] array = {\"AAA\", \"BBB\", \"ABA\", \"ABB\", \"AAA\", \"ABB\", \"ABB\"};\n\n\n for (\n int i = 0;\n i < array.length - 1; i++)\n {\n for (int j = i + 1; j < array.length; j++) {\n\n if ((array[i].equals(array[j])) && (i != j)) {\n System.out.println(\"Дублирующийся элемент \" + array[j]);\n }\n }\n }\n }", "@Override\n\n public boolean equals(Object obj) {\n if (this == obj) {\n return true;\n }\n if (obj == null || getClass() != obj.getClass()) {\n return false;\n }\n Book book = (Book) obj;\n return getBookAuthorName() == book.getBookAuthorName() &&\n bookIsbnNumber() == book.getBookIsbnNumber() &&\n Objects.equals(getBookName(), book.getBookName());\n }", "public static void main(String[] args) {\n\t\t\n\t\tString [] array = {\"A\", \"A\", \"B\", \"C\", \"C\"};\n\t\t\n\t\tfor (int j = 0; j < array.length; j++) {\n\t\t\t\n\t\t\tint count = 0;\n\t\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\t\tif (array[i].equals(array[j]))\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\n\t\t\tif (count == 1)\n\t\t\tSystem.out.print(array[j] + \" \");\n\t\t\n\t\t}\n\t\t\n\t}", "public void printBookings(){\r\n\t\t//Treemap is used to sort the bookings into calendar order\r\n\t\tTreeMap<Calendar, Integer> m = new TreeMap<Calendar, Integer>();\r\n\t\tSet<Integer> booking = listBookings();\r\n\t\t\r\n\t\t//loops through getting each booking and puts it into the treemap\r\n\t\tfor (Integer id: booking){\r\n\t\t\tBooking b = bookings.get(id);\r\n\t\t\tm.put(b.start(), b.getLength());\r\n\t\t}\r\n\t\t\r\n\t\t//For each calendar in treemap it prints out the date and length of the booking\r\n\t\tSet<Calendar> cal = m.keySet();\r\n\t\tfor(Calendar c: cal) {\r\n\t\t\tprint(c);\r\n\t\t\tSystem.out.print(\" \" + m.get(c));\r\n\t\t}\r\n\t}", "public static void printBooks(List<Book> books) {\r\n System.out.println(\"AUTHOR, \" + \"TITLE, \" + \"GENRE, \" + \"SERIES (if any), \" + \"PART (if any), \" + \"PAGES, \" + \"YEAR, \" + \"PRICE\");\r\n\r\n for (Book book : books) {\r\n System.out.println(book.getTitle() + \", \" + book.getAuthor() + \", \" + book.getGenre() + \", \" + book.getSeries() + \", \" + book.getPartNumber() + \", \" + book.getPagesQuantity() + \", \" + book.getYearPublished() + \", \" + book.getPrice());\r\n }\r\n\r\n }", "void availableBooks(){\n\t\tSystem.out.println(\")))))Available books((((((\");\n\t\tfor(int i=0;i<books.length;i++){\n\t\t\tString book=books[i];\n\t\t\tif(book==null){\n\t\t\tcontinue;\n\t\t}\n\t\t\tSystem.out.println(\"*\"+books[i]);\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n\r\n\t\tBook b1 = new Book(23,\"The mads in heaven\",200);\r\n\t\tBook b2 = new Book(25,\"Island Treasury\",300);\r\n\t\tBook b3 = new Book(27,\"Watery heart\",400);\r\n\t\t\r\n\t\tArrayList<Book> al = new ArrayList<Book>();\r\n\t\tal.add(b1);\r\n\t\tal.add(b2);\r\n\t\tal.add(b3);\r\n\t\t\r\n\t\tIterator<Book> itr1 = al.iterator();\r\n\t\twhile(itr1.hasNext())\r\n\t\t{\r\n\t\t\tBook book = itr1.next();\r\n\t\t\tSystem.out.println(\"Book price is: \"+book.price);\r\n\t\t\tSystem.out.println(\"Number of pages in the book are: \"+book.pages);\r\n\t\t\tSystem.out.println(\"The book name is: \"+book.name);\t\r\n\t\t}\r\n\t}", "public void run(){\n\t\tif(searchHow==0){\n\t\t\tint isbnCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestIsbn = new SearchRequest(db, searchForThis, isbnCount, db.size());\n\t\t\t\t\tdb.searchByISBN(requestIsbn);\n\t\t\t\t\tisbnCount = requestIsbn.foundPos;\n\t\t\t\t\tif (requestIsbn.foundPos >= 0) {\n\t\t\t\t\t\tisbnCount++;\n\t\t\t\t\t\tString formatThis = \"Matched ISBN at position: \" + requestIsbn.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestIsbn.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==1){\n\t\t\tint titleCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestTitle = new SearchRequest(db, searchForThis, titleCount, db.size());\n\t\t\t\t\tdb.searchByTitle(requestTitle);\n\t\t\t\t\ttitleCount = requestTitle.foundPos;\n\t\t\t\t\tif (requestTitle.foundPos >= 0) {\n\t\t\t\t\t\ttitleCount++;\n\t\t\t\t\t\tString formatThis = \"Matched title at position: \" + requestTitle.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestTitle.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==2){\n\t\t\tint authorCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestAuthor = new SearchRequest(db, searchForThis, authorCount, db.size());\n\t\t\t\t\tdb.searchByAuthor(requestAuthor);\n\t\t\t\t\tauthorCount = requestAuthor.foundPos;\n\t\t\t\t\tif (requestAuthor.foundPos >= 0) {\n\t\t\t\t\t\tauthorCount++;\n\t\t\t\t\t\tString formatThis = \"Matched author at position: \" + requestAuthor.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestAuthor.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==3){\n\t\t\tint pageCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestPage = new SearchRequest(db, searchForThis, pageCount, db.size());\n\t\t\t\t\tdb.searchByNumPages(requestPage);\n\t\t\t\t\tpageCount = requestPage.foundPos;\n\t\t\t\t\tif (requestPage.foundPos >= 0) {\n\t\t\t\t\t\tpageCount++;\n\t\t\t\t\t\tString formatThis = \"Matched pages at position: \" + requestPage.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestPage.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==4){\n\t\t\tint yearCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestYear = new SearchRequest(db, searchForThis, yearCount, db.size());\n\t\t\t\t\tdb.searchByYear(requestYear);\n\t\t\t\t\tyearCount = requestYear.foundPos;\n\t\t\t\t\tif (requestYear.foundPos >= 0) {\n\t\t\t\t\t\tyearCount++;\n\t\t\t\t\t\tString formatThis = \"Matched year at position: \" + requestYear.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestYear.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t}", "public static ArrayList<Book> search(String title, ArrayList<String> authors, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer)\n if(containsAllAuthors(authors, b))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "private static void outputBook() {\n\t\toutput(\"\");\r\n\t\tfor (book book : library.outputBook()) { // method name changes BOOKS to outputBook()\r\n\t\t\toutput(book + \"\\n\");\r\n\t\t}\t\t\r\n\t}", "public void showBookingsByName(JTextArea output, String firstName, String lastName)\r\n {\r\n output.setText(\"Bookinger på \" + firstName + \" \" + lastName + \"\\n\\n\");\r\n \r\n Iterator<Booking> iter = bookings.iterator();\r\n \r\n while(iter.hasNext())\r\n {\r\n Booking booking = iter.next();\r\n \r\n if(booking.getGuest().getFirstname().equals(firstName) || \r\n booking.getGuest().getLastname().equals(lastName))\r\n {\r\n output.append(booking.toString() \r\n + \"\\n*******************************************************\\n\");\r\n }//End of if\r\n }// End of while\r\n }", "private static void queryBooksByPublisher(){\n\t\tSystem.out.println(\"===Query Books By Publisher===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter Publisher to Query Books by: \");\n\t\tString publisher = string_input.nextLine();\n\t\t\n\t\tif(ALL_PUBLISHERS.containsKey(publisher)){\n\t\t\tIterator<String> iter = ALL_PUBLISHERS.get(publisher).iterator();\n\t\t\tSystem.out.println(\"All books published by \" + publisher + \" are:\"); \n\t\t\tprintAllElements(iter);\n\t\t}\n\t\t\n\t\telse\n\t\t\tSystem.out.println(\"Sorry! There are no such publishers in our records!\");\n\t}", "private void loopAuthors(Book book) {\n for (String s : book.getAuthors()) {\n print(s);\n }\n }", "public static void printValues(HashMap<String, Book> hashmap) {\n for (Book book: hashmap.values()) {\n System.out.println(book);\n }\n }", "public static void main(String[] args) {\n\t\tList<Score> scores = Arrays.asList(\n\t\t\t\tnew Score(\"a\", 61, 71,71),\n\t\t\t\tnew Score(\"b\", 62, 72,82),\n\t\t\t\tnew Score(\"c\", 63, 74,55)\n\t\t\t\t);\n\t\t\n\t\tboolean result1 = scores.stream().anyMatch(x -> x.getMat() > 39);\n\t\tSystem.out.println(\"수학 과락이 아닌사람 T/F \" + result1);\n\t\t\n\t\tboolean result2 = scores.stream().allMatch(x -> x.getKor() > 39);\n\t\tSystem.out.println(\"국어 과락없나요\" + result2);\n\t\t\n\t\tboolean result3 = scores.stream().noneMatch(x -> x.getEng() > 39);\n\t\tSystem.out.println(\"영어 모두 과락?\" + result3);\n\t}", "public static void main(String[] args) {\n\t\tint a, b, c;\r\n\t\t\r\n\t\tfor(a = 1; a <= 20; a++) {\r\n\t\t\tfor(b = 1; b <= 20; b++) {\r\n\t\t\t\tfor(c = 1; c <= 20; c++) {\r\n\t\t\t\t\tif ( (c*c) == (a*a)+(b*b) && (a+b+c) <=20 )\r\n\t\t\t\t\t\tSystem.out.printf(\"%2d,%5d,%10d\\n\",a,b,c);\r\n\t\t\t\t} //%와 d사이에있는 2는 2칸 띄어쓰기 %d는 정수형\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tBook b1 = new Book(111, \"Hello Java\");\r\n\t\tBook b2 = new Book(111, \"Hello Java\");\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(b1 ==b2);\r\n\t\tSystem.out.println(b1.equals(b2));\r\n\t\tSystem.out.println(b1.hashCode());\r\n\t\tSystem.out.println(b2.hashCode());\r\n\t\t\t\r\n\t}", "private void printAvailableBooks() {\n\t\t\n\t}", "public void matchesDemo() \n {\n Map<String, Set<String>> clientMap = new HashMap<>();\n Set<String> interests = new HashSet<>();\n\n interests.add(\"Food\");\n interests.add(\"Wine\");\n interests.add(\"Tandems\");\n clientMap.put(\"Hal\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Walking\");\n interests.add(\"Welding\");\n clientMap.put(\"Gemma\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Cinema\");\n interests.add(\"Wine\");\n clientMap.put(\"Caroline\", interests);\n\n Set<String> halsInterests = clientMap.get(\"Hal\");\n String outputString;\n Set<String> eachClientInterests;\n Set<String> intersection;\n\n for (String eachClient : clientMap.keySet()) \n {\n eachClientInterests = clientMap.get(eachClient);\n intersection = new HashSet<>(halsInterests);\n intersection.retainAll(eachClientInterests);\n outputString = \"Hal and \" + eachClient \n + \" have common interests: \"\n + intersection;\n System.out.println(outputString) ;\n }\n }", "public static void main(String[] theArgs) {\n for (HashSet<String> set : findParens(new ArrayList<HashSet<String>>(), 3)) {\n for (String element : set) {\n System.out.print(element + \" \");\n }\n System.out.println();\n }\n }", "public void search() {\n while (!done) {\n num2 = mNums.get(cntr);\n num1 = mSum - num2;\n\n if (mKeys.contains(num1)) {\n System.out.printf(\"We found our pair!...%d and %d\\n\\n\",num1,num2);\n done = true;\n } //end if\n\n mKeys.add(num2);\n cntr++;\n\n if (cntr > mNums.size()) {\n System.out.println(\"Unable to find a matching pair of Integers. Sorry :(\\n\");\n done = true;\n }\n } //end while\n }", "public void searchYear()\r\n\t{\r\n\r\n\t\tSystem.out.print(\"Please provide a year: \");\r\n\t\tint year = scan.nextInt();\r\n\t\tboolean display = false;\r\n\t\tboolean found = false;\r\n\t\tfor (int i = 0; i < actualSize; i++)\r\n\t\t{\r\n\r\n\t\t\tif (year == data[i].getYear())\r\n\t\t\t{\r\n\t\t\t\tif (display == false)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Title\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\" + \"Year\\t\" + \"rating\\t\" + \"score\");\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(data[i].toString());\r\n\t\t\t\tdisplay = true;\r\n\t\t\t\tfound = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif (found == false)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The year does not match any of the movies.\");\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tint count=0;\n String[] ab= {\"A\", \"B\", \"B\", \"F\", \"A\"};\n \n for(int i=0; i<ab.length;i++){\n\t for(int j=0;j<ab.length;j++){\n\t\t if(ab[i]==ab[j]){\n\t\t\t count++;\n\t\t\t \n\t\t\t if(count==2){\n\t\t\t\t System.out.println(ab[i]);\n\t\t\t\t count= --count-1;\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t }\n\t }\n }\n\t}", "public void addMultipleBook() {\n Set set = new TreeSet();\n System.out.println(\" yours choice how many addressbook you want to create it:--\");\n int number = scanner.nextInt();\n\n for (int index = 1; index <= number; index++) {\n System.out.println(\"give name to your dictionary:--\");\n String name = scanner.next();\n set.add(name);\n }\n System.out.println(set);\n }", "public void getSubject() {\n System.out.println(\"give any Subject: \");\n String subject = input.next();\n for (Card s: cards) {\n if (s.subjectOfBook.equals(subject)) {\n System.out.println(s.titleOfBook + \" \" + s.autherOfBook + \" \" + s.subjectOfBook);\n } \n }\n System.out.println(\"not Found\");\n }", "public static ArrayList<Book> search(String title, ArrayList<String> authors, String isbn, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, authors, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer)\n if(b.getBookIsbn().equals(isbn) || isbn.equals(\"*\"))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "public static void main(String[] args) {\r\n\t\tint x[] = { 1, 2, 5, 8, 10, 7 };\r\n\t\tint y[] = { 3, 5, 9, 10, 9 };\r\n\t\tfor (int i = 0; i < x.length; i++) {\r\n\t\t\tfor (int j = 0; j < y.length; j++) {\r\n\t\t\t\tif (x[i] == y[j]) {\r\n\t\t\t\t\tSystem.out.println(x[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public static void main(String... args) {\n\n Set<Long> As = new HashSet<>();\n int N = 100;\n for (long p = -N; p <= N; ++p) {\n for (long q = -N; q <= p; ++q) {\n for (long r = -N; r <= q; ++r) {\n if (r==0 || p==0 || q==0)\n continue;\n\n long nom = r*p*q;\n long den = r*p + r*q + p*q;\n\n if (den != 0 && nom % den==0 && (nom^den)>=0) {\n long A = nom/den;\n\n if (A==nom) {\n As.add(A);\n System.out.printf(\"A=%d (p=%d, q=%d, r=%d)\\n\", A, p, q, r);\n }\n }\n }\n }\n }\n Long[] aa = As.toArray(new Long[As.size()]);\n Arrays.sort(aa);\n System.out.printf(\"============\\n\");\n System.out.printf(\"A(%d)=%s\\n\", aa.length, Arrays.toString(aa));\n\n for (long a = 1; a < 100; ++a) {\n if (isAlexandrian(a))\n System.out.printf(\"A=%dn\", a);\n }\n }", "protected static void searchByKeysHashIDYear(String keys, String myId, int lowerYear, int upperYear) {\n System.out.println(\"in hasher for keys and id and year\");\n System.out.println(\"lowerYear: \" + lowerYear);\n System.out.println(\"upperYear: \" + upperYear);\n String[] splitWords = new String[keys.split(\"[ ]+\").length];\n splitWords = keys.split(\"[ ]+\");\n System.out.println(splitWords[0]);\n for (String keyWord : splitWords) {\n keyWord = keyWord.toLowerCase();\n if (map.get(keyWord) != null) {\n ArrayList<Integer> allInstancesofWord = (ArrayList<Integer>) map.get(keyWord);\n {\n for (int i = 0; i < allInstancesofWord.size(); i++) {\n\n Product e = productList.get(allInstancesofWord.get(i));\n if (e.productIdMatch(myId) && e.productYearMatch(lowerYear, upperYear)) // if an element has the desired id and it has the correct key terms. it is printed.\n {\n System.out.println(\"Printing keys id and year\");\n ProductGUI.Display(\"\\n\");\n System.out.println(productList.get(allInstancesofWord.get(i)));\n ProductGUI.Display((e.toString() + \"\\n\"));\n }\n }\n }\n }\n if (map.get(keyWord) == null) {\n System.out.println(\"The products you are searching for were not found\");\n }\n }\n\n }", "void printAssociations(HashMap<BitSet, Integer> allAssociations){\n try{\n boolean firstLine = true;\n FileWriter fw = new FileWriter(this.outputFilePath);\n \n for(Map.Entry<BitSet, Integer> entry : allAssociations.entrySet()){\n BitSet bs = entry.getKey();\n if(firstLine)\n firstLine = false;\n else\n fw.write(\"\\n\");\n \n for(int i=0; i<bs.length() ; i++){\n if(bs.get(i))\n fw.write(intToStrItem.get(frequentItemListSetLenOne.get(i).getKey())+\" \");\n }\n\n fw.write(\"(\" + entry.getValue() +\")\");\n }\n \n fw.close();\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }", "public void printMap() {\n Set<String> manufacturers = cars.keySet();\n\n for (String manufacturer : cars.keySet()) {\n System.out.println(String.format(\"The following %s models are in stock: \", manufacturer));\n System.out.println(cars.get(manufacturer));\n\n }\n }", "private void printAnswerResults(){\n\t\tSystem.out.print(\"\\nCorrect Answer Set: \" + q.getCorrectAnswers().toString());\n\t\tSystem.out.print(\"\\nCorrect Answers: \"+correctAnswers+\n\t\t\t\t\t\t \"\\nWrong Answers: \"+wrongAnswers);\n\t}", "public String searchByMaterial(String string, ArrayList<String> materiallist, int count, Set<String> keys, Collection<String> values, Map<String, String> dataTable1) {\nfor(String s:materiallist) {\r\n\t\t\t\r\n\t\t\tif (string.equals(s)) {\r\n\t\t\t//\tSystem.out.print(s);\r\n\t\t\t\tcount--;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t\t}\r\nSystem.out.println(\"A List of Home that matches the Material \"+string+\":\");\r\n\r\nfor(String k: keys) {\r\n\t\r\n\tarraytoprintkey=k.split(\"_\");\r\n\r\n\r\n\t\r\n\t\tif(arraytoprintkey[1].equals(string)) {\r\n\t\t\t\r\n\t\t\t\tSystem.out.print(k);\r\n\t\t\t\tSystem.out.println(\" \"+dataTable1.get(k));\r\n\t\t\t\t\r\n\t\t}\r\n\r\n\t\t\r\n}\r\nSystem.out.println();\r\n\t\tif(count==0) {\r\n\t\t\treturn string;\r\n\t\t}\r\n\t\t\t\r\n\t\treturn null;\r\n\t}", "public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t/*80\r\n\t\tint matches = 3162;\r\n\t\tint results = 1218;\r\n\t\tint pairs = 146;\r\n\t\t*/\r\n\t\t//70\r\n\t\t/*int matches = 3302;\r\n\t\tint results = 909;\r\n\t\tint pairs = 59;*/\r\n\r\n\t\tfor(int i=1;i<=10;i++)\r\n\t\t{\r\n\t\t\tdouble b = (0.1*i)*((matches*3)+(results*3)+(pairs*3));\r\n\t\t\tSystem.out.print(Math.round(b)+\",\");\r\n\t\t}\t\r\n\t\r\n\t}", "public String searchByFilter() {\n if (selectedFilter.size() != 0) {\n for (Genre filterOption : selectedFilter) {\n searchTerm = searchResultTerm;\n searchBook();\n\n System.out.println(\"CURRENT NUMBER OF BOOKS: \" + books.size());\n\n BookCollection temp = this.db.getCollectionByGenre(filterOption);\n System.out.println(\"GETTING COLLECTION FOR FILTERING: \" + temp.getCollectionName() + \" NUM OF BOOKS: \"\n + temp.getCollectionBooks().size());\n filterBookList(temp.getCollectionBooks());\n System.out.println(\"UPDATED NUMBER OF BOOKS: \" + books.size());\n }\n } else {\n searchTerm = searchResultTerm;\n searchBook();\n }\n\n return \"list.xhtml?faces-redirect=true\";\n }", "public static void seqfilter(ArrayList<String> x, ArrayList<String> y, ArrayList<String> z, JTextArea ta) {\n\t\tfor (int i=0; i<x.size(); i++)\n\t\t{\n\t\t\tfor (int j=0; j<y.size(); j++)\n\t\t\t{\n\t\t\t\tif (x.get(i).equals(y.get(j)))\n\t\t\t\t{\n\t\t\t\t\tz.add(x.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//This is the loop to print all the items of the results array list\n\t\tta.setText(\"< \");\n\t\tfor (int i=0; i<z.size(); i++)\n\t\t{\n\t\t\tta.append(z.get(i)+\" \");\n\t\t}\n\t\tta.append(\">\");\n\t}", "public void listBooks() {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price FROM books\";\n\n try (Connection conn = this.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public void getATitle() {\n System.out.println(\"Give any title: \");\n String key = input.next();\n for (Card s: cards) {\n if (s.titleOfBook.equals(key)) {\n System.out.println(s.titleOfBook + \" \" + s.autherOfBook + \" \" + s.subjectOfBook);\n } \n }\n System.out.println(\"not Found\");\n }", "public void sensibleMatches2() \n { \n Map<String, Set<String>> clientMap = new HashMap<>();\n Set<String> interests = new HashSet<>();\n\n interests.add(\"Food\");\n interests.add(\"Wine\");\n interests.add(\"Tandems\");\n clientMap.put(\"Hal\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Walking\");\n interests.add(\"Welding\");\n clientMap.put(\"Gemma\", interests);\n\n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Cinema\");\n interests.add(\"Wine\");\n clientMap.put(\"Caroline\", interests);\n\n Set<String> halsInterests = clientMap.get(\"Hal\");\n String outputString;\n Set<String> eachClientInterests;\n Set<String> intersection ;\n\n for (String eachClient : clientMap.keySet()) \n {\n if (!eachClient.equals(\"Hal\")) \n {\n eachClientInterests = clientMap.get(eachClient);\n intersection = new HashSet<>(halsInterests);\n intersection.retainAll(eachClientInterests);\n outputString = \"Hal and \" + eachClient \n + \" have common interests: \"\n + intersection;\n System.out.println(outputString);\n }\n }\n }", "private void enterAll() {\n\n String sku = \"Java1001\";\n Book book1 = new Book(\"Head First Java\", \"Kathy Sierra and Bert Bates\", \"Easy to read Java workbook\", 47.50, true);\n bookDB.put(sku, book1);\n\n sku = \"Java1002\";\n Book book2 = new Book(\"Thinking in Java\", \"Bruce Eckel\", \"Details about Java under the hood.\", 20.00, true);\n bookDB.put(sku, book2);\n\n sku = \"Orcl1003\";\n Book book3 = new Book(\"OCP: Oracle Certified Professional Jave SE\", \"Jeanne Boyarsky\", \"Everything you need to know in one place\", 45.00, true);\n bookDB.put(sku, book3);\n\n sku = \"Python1004\";\n Book book4 = new Book(\"Automate the Boring Stuff with Python\", \"Al Sweigart\", \"Fun with Python\", 10.50, true);\n bookDB.put(sku, book4);\n\n sku = \"Zombie1005\";\n Book book5 = new Book(\"The Maker's Guide to the Zombie Apocalypse\", \"Simon Monk\", \"Defend Your Base with Simple Circuits, Arduino and Raspberry Pi\", 16.50, false);\n bookDB.put(sku, book5);\n\n sku = \"Rasp1006\";\n Book book6 = new Book(\"Raspberry Pi Projects for the Evil Genius\", \"Donald Norris\", \"A dozen friendly fun projects for the Raspberry Pi!\", 14.75, true);\n bookDB.put(sku, book6);\n }", "public static void printAll() {\n // Print all the data in the hashtable\n RocksIterator iter = db.newIterator();\n\n for (iter.seekToFirst(); iter.isValid(); iter.next()) {\n System.out.println(new String(iter.key()) + \"\\t=\\t\" + ByteIntUtilities.convertByteArrayToDouble(iter.value()));\n }\n\n iter.close();\n }", "public void showAllSchedulesFiltered(ArrayList<Scheduler> schedulesToPrint) {\n ArrayList<String> filters = new ArrayList<>();\n while (yesNoQuestion(\"Would you like to filter for another class?\")) {\n System.out.println(\"What is the Base name of the class you want to filter for \"\n + \"(eg. CPSC 210, NOT CPSC 210 201)\");\n filters.add(scanner.nextLine());\n }\n for (int i = 0; i < schedulesToPrint.size(); i++) {\n for (String s : filters) {\n if (Arrays.stream(schedulesToPrint.get(i).getCoursesInSchedule()).anyMatch(s::equals)) {\n System.out.println(\" ____ \" + (i + 1) + \":\");\n printSchedule(schedulesToPrint.get(i));\n System.out.println(\" ____ \");\n }\n }\n }\n }", "public static void main(String[] args) {\n\t\tList l=new ArrayList();\r\n\t\tl.add(12);\r\n\t\tl.add(45);\r\n\t\tl.add(15);\r\n\t\tl.add(78);\r\n\t\t\r\n\t\tList l2=new ArrayList();\r\n\t\tl2.add(12);\r\n\t\tl2.add(45);\r\n\t\tl2.add(10);\r\n\t\tl2.add(78);\r\n\t\t\r\n\t\tBoolean m=l.containsAll(l2);\r\n\t\t\r\n\t\tif(m)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Elements are same\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Not equal\");\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "public String advancedSearchBooks() {\r\n List<Books> books = new ArrayList<Books>();\r\n keywords = keywords.trim();\r\n \r\n switch (searchBy) {\r\n case \"all\":\r\n return searchBooks();\r\n case \"title\":\r\n books = findBooksByTitle(keywords);\r\n break;\r\n case \"identifier\":\r\n books = findBooksByIdentifier(keywords);\r\n break;\r\n case \"contributor\":\r\n books = findBooksByContributor(keywords);\r\n break;\r\n case \"publisher\":\r\n books = findBooksByPublisher(keywords);\r\n break;\r\n case \"year\":\r\n books = findBooksByYear(keywords);\r\n break;\r\n case \"genre\":\r\n books = findBooksByGenre(keywords);\r\n break;\r\n case \"format\":\r\n books = findBooksByFormat(keywords);\r\n break;\r\n }\r\n clearFields();\r\n\r\n if (books == null || books.isEmpty()) {\r\n books = new ArrayList<Books>();\r\n }\r\n\r\n return displayBooks(books);\r\n }", "public static void main(String[] args) {\n Inventory inventory = new Inventory();\n initializeInventory(inventory);\n\n GuitarSpec test = \n new GuitarSpec(\"b\", \"b\", \"b\", \"b\");\n List matchingGuitars = inventory.search(test);\n if (!matchingGuitars.isEmpty()) {\n System.out.println(\"搜索结果----\");\n for (Iterator i = matchingGuitars.iterator(); i.hasNext(); ) {\n Guitar guitar = (Guitar)i.next();\n GuitarSpec spec = guitar.getSpec();\n System.out.println(\"你搜索的这款吉他:品牌为\" +spec.getBuilder() + \"--型号为\" + spec.getModel() + \"--类型为\" +\n spec.getType() + \"--材质为\" +spec.getWood() + \"--价格为¥\" +\n guitar.getPrice()+\"--ID为\"+guitar.getID());\n }\n } else {\n System.out.println(\"Sorry, 我们没有这一款吉他.\");\n }\n }", "public String toString(){\n\t\treturn name + \": \" + books + \" books checked out\";\n\t}", "public static void main(String[] args) {\n\t\tint[] a={1,2,3,4,5};\r\n\t\tint[] b={2,3,7,8,9,4,5};\r\n\t\tfor(int i=0;i<a.length;i++){\r\n\t\t\tfor(int j=0;j<b.length;j++){\r\n\t\t\t\tif(a[i]==b[j])\r\n\t\t\t\t\tSystem.out.println(b[j]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private boolean Equals(ArrayList<Integer> list) {\n f = list.get(0);\n o = list.get(1);\n r = list.get(2);\n t = list.get(3);\n y = list.get(4);\n s = list.get(5);\n i = list.get(6);\n x = list.get(7);\n e = list.get(8);\n n = list.get(9);\n // Y is in 1's place, T in 10's, R in 100's, O in 1000's place and finally F in 10000's place. assign these\n // values approprately for each number.\n FORTY = (f * 10000 + o * 1000 + r * 100 + t * 10 + y * 1);\n SIXTY = (s * 10000 + i * 1000 + x * 100 + t * 10 + y * 1);\n TEN = (t * 100 + e * 10 + n * 1);\n int sum = FORTY + TEN + TEN;\n\n // if our values match up correctly, then we will show the values of each.\n if (sum == SIXTY) {\n System.out.printf(\"Forty: %d,\\nTen: %d,\\nSixty: %d\\n\", FORTY, TEN, SIXTY);\n System.out.printf(\"The values of each letters are as follows:\\nF = %d,\\nO = %d,\\nR = %d,\\nT = %d,\\nY = %d,\\n\" +\n \"S = %d,\\nI = %d,\\nX = %d,\\nE = %d,\\nand N = %d.\", f, o, r, t, y, s, i, x, e, n);\n return true;\n }\n return false;\n }", "public static void main(String[] args) {\r\n\t\tCard aceHearts = new Card(\"Ace\", \"Hearts\", 14);\r\n\t\tSystem.out.println(aceHearts.rank());\r\n\t\tSystem.out.println(aceHearts.suit());\r\n\t\tSystem.out.println(aceHearts.pointValue());\r\n\t\tSystem.out.println(aceHearts.toString());\r\n\t\tCard tenDiamonds = new Card(\"Ten\", \"Diamonds\", 10);\r\n\t\tSystem.out.println(tenDiamonds.rank());\r\n\t\tSystem.out.println(tenDiamonds.suit());\r\n\t\tSystem.out.println(tenDiamonds.pointValue());\r\n\t\tSystem.out.println(tenDiamonds.toString());\r\n\t\tCard fiveSpades = new Card(\"Five\", \"Spades\", 5);\r\n\t\tSystem.out.println(fiveSpades.rank());\r\n\t\tSystem.out.println(fiveSpades.suit());\r\n\t\tSystem.out.println(fiveSpades.pointValue());\r\n\t\tSystem.out.println(fiveSpades.toString());\r\n\t\tSystem.out.println(aceHearts.matches(tenDiamonds));\r\n\t\tSystem.out.println(aceHearts.matches(fiveSpades));\r\n\t\tSystem.out.println(aceHearts.matches(aceHearts));\r\n\t\tSystem.out.println(tenDiamonds.matches(fiveSpades));\r\n\t\tSystem.out.println(tenDiamonds.matches(aceHearts));\r\n\t\tSystem.out.println(tenDiamonds.matches(tenDiamonds));\r\n\t\tSystem.out.println(fiveSpades.matches(aceHearts));\r\n\t\tSystem.out.println(fiveSpades.matches(tenDiamonds));\r\n\t\tSystem.out.println(fiveSpades.matches(fiveSpades));\r\n\t}", "public static void main(String[] args) {\n Map<Integer, Integer> map = new HashMap();\n for (int i = 0; i < 5; i++) {\n int j = nextInt();\n map.put(j, map.getOrDefault(j, 0)+1);\n }\n if (map.size() != 2) {\n out.println(\"No\");\n } else {\n if (map.values().stream().sorted().collect(Collectors.toList()).equals(List.of(2, 3))) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }\n\n out.flush();\n }", "public void showGenre(Genre genre) {\n for (Record r : cataloue) {\n if (r.getGenre() == genre) {\n System.out.println(r);\n }\n }\n\n }", "private void displayStudentByName(String name) {\n\n int falg = 0;\n\n for (Student student : studentDatabase) {\n\n if (student.getName().equals(name)) {\n\n stdOut.println(student.toString());\n\n falg = 1;\n\n break;\n }\n }\n\n if (falg == 0) {\n\n stdOut.println(\"cannot find student\\n\");\n }\n }", "protected static void searchByYear(int yearLow, int yearHigh) {\n for (Product element : productList) {\n System.out.println(\"lowerYear: \" + yearLow);\n System.out.println(\"upperYear: \" + yearHigh);\n if (element.productYearMatch(yearLow, yearHigh)) // if product years match, the product will be printed\n {\n System.out.println(\"\");\n ProductGUI.Display(\"\\n\");\n System.out.println(element);\n ProductGUI.Display(element.toString());\n }\n }\n }", "public static void printMatches(ArrayList<Glootie> aliens, Glootie g) {\r\n\t\tSystem.out.println(\"Matches for \"+ g);\r\n\t\tArrayList<Glootie> gMatches = findMatches(g,aliens);\r\n\t\tif(gMatches.size() < 10) {\r\n\t\t\tSystem.out.println(gMatches);\r\n\t\t}else {\r\n\t\t\tSystem.out.println(gMatches.size() + \" matches is too many to print\");\r\n\t\t}\r\n\r\n\t}", "public static void printBooksInTable(List<Book> books) {\r\n\r\n String format = \"%-17s %-45s %-15s %-30s %-12s %-10s %-8s %-8s \\n\";\r\n String formatTable = \"%-17s %-45s %-15s %-25s %9s %13d %9d %9.2f \\n\";\r\n System.out.format(format, \"AUTHOR\", \"TITLE\", \"GENRE\", \"SERIES\", \"PART\", \"PAGES\", \"YEAR\", \"PRICE\");\r\n System.out.println(\"-----------------------------------------------------------------------------------------------------------------------------------------------------\");\r\n\r\n for (Book book : books) {\r\n System.out.format(formatTable, book.getAuthor(), book.getTitle(), book.getGenre(), book.getSeries(), book.getPartNumber(), book.getPagesQuantity(), book.getYearPublished(), book.getPrice());\r\n System.out.println(\"-----------------------------------------------------------------------------------------------------------------------------------------------------\");\r\n }\r\n\r\n }", "private static void print_Assignment(Gradebook gradebook, String[] flags) {\n //sort grades highest to lowest\n if (flags[3] != null && flags[3].equals(\"G\")) {\n List<Student> studentList = gradebook.getAllStudents();\n Map<Integer, Set<Student>> gradeToName = new HashMap<Integer, Set<Student>>();\n Set<Integer> grades = new HashSet<Integer>();\n\n for(Student s : studentList){\n Assignment assign = gradebook.getAssignment(flags[0]);\n Map<Assignment, Integer> gradeMap = gradebook.getStudentGrades(s);\n Integer grade = gradeMap.get(assign);\n\n Set<Student> studs = gradeToName.get(grade);\n if(studs == null){\n\n studs = new HashSet<Student>();\n }\n\n studs.add(s);\n gradeToName.put(grade, studs);\n grades.add(grade);\n }\n\n List<Integer> sortedList = new ArrayList<Integer>(grades);\n Collections.sort(sortedList, Collections.reverseOrder());\n\n for(Integer i : sortedList){\n Set<Student> studs = gradeToName.get(i);\n for(Student s : studs)\n System.out.println(\"(\" + s.getLast() + \", \" + s.getFirst() + \", \" + i + \")\");\n }\n\n // sort display aplhabetically\n } else if (flags[4] != null && flags[4].equals(\"A\")){\n //compare override class at bottom of file\n List<Student> studentsAlpha = gradebook.getAllStudents();\n Collections.sort(studentsAlpha, new Comparator<Student>() {\n @Override\n public int compare(Student o1, Student o2) {\n if ( o2.getLast().compareToIgnoreCase(o1.getLast()) == 0) {\n return o1.getFirst().compareToIgnoreCase(o2.getFirst());\n } else {\n return o1.getLast().compareToIgnoreCase(o2.getLast());\n }\n }\n });\n\n for (Student stud: studentsAlpha) {\n // flags[0] should be assign name\n System.out.println(\"(\" + stud.getLast() + \", \" + stud.getFirst() + \", \" + gradebook.getPointsAssignment(stud, gradebook.getAssignment(flags[0])) + \")\");\n }\n\n } else {\n throw new IllegalArgumentException(\"Please specify if you want the display to be alphabetical or by grades highest to lowest.\");\n }\n return;\n }", "public static void main(String[] args) {\n // for testing, add books and find book using it's name\n /* Library.books.add(book1);\n Library.books.add(book2);\n Library.books.add(book3);\n System.out.println(\"Enter namer for Book:\");\n String bookName = sc.nextLine();\n \n for (int i = 0; i <3 ; i++) {\n\n if (Library.books.get(i).getName().equalsIgnoreCase(bookName)) {\n \n System.out.println(books.get(i).getName());\n System.out.println(i);\n }\n }*/\n \n do{\n choicesInMenu(menu());\n } while (goOn);\n //Library.addBook();\n //Library.showAllBooks();\n\n }", "public static void main(String[] args) {\n Set<String> mySet = new HashSet<String>(100,50);\n mySet.add(\"APPLE\");\n mySet.add(\"LG\");\n mySet.add(\"HTTC\");\n mySet.add(\"APPLE\");\n mySet.add(\"SAMSUNG\");\n Iterator<String> iterator = mySet.iterator();\n while (iterator.hasNext()){\n System.out.println(iterator.next());\n }\n\n\n\n }", "private static void print_Final(Gradebook gradebook, String[] flags){\n if (flags[3] != null && flags[3].equals(\"G\")){\n List<Student> studentsList = gradebook.getAllStudents();\n //Map<Student, Double>\n Map<Double, List<Student>> grades = new HashMap<Double, List<Student>>();\n Set<Double> gradeSet = new HashSet<Double>();\n\n for(Student s : studentsList){\n double grade = gradebook.getGradeStudent(s);\n List<Student> studs = grades.get(grade);\n\n if(studs == null){\n studs = new ArrayList<Student>();\n }\n\n studs.add(s);\n grades.put(grade, studs);\n gradeSet.add(grade);\n }\n\n List<Double> gradeList = new ArrayList<Double>(gradeSet);\n Collections.sort(gradeList, Collections.reverseOrder());\n\n DecimalFormat df = new DecimalFormat(\"#.####\"); //Round to 4 decimal places\n df.setRoundingMode(RoundingMode.HALF_UP);\n for(Double d : gradeList){\n\n List<Student> studs = grades.get(d);\n for(Student s : studs){\n\n System.out.println(\"(\" + s.getLast() + \", \" + s.getFirst() + \", \" + df.format(d) + \")\");\n }\n }\n } else if (flags[4] != null && flags[4].equals(\"A\")){\n //compare override class at bottom of file\n List<Student> studentsAlpha = gradebook.getAllStudents();\n Collections.sort(studentsAlpha, new Comparator<Student>() {\n @Override\n public int compare(Student o1, Student o2) {\n if ( o2.getLast().compareToIgnoreCase(o1.getLast()) == 0) {\n return o1.getFirst().compareToIgnoreCase(o2.getFirst());\n } else {\n return o1.getLast().compareToIgnoreCase(o2.getLast());\n }\n }\n });\n\n DecimalFormat df = new DecimalFormat(\"#.####\"); //Round to 4 decimal places\n df.setRoundingMode(RoundingMode.HALF_UP);\n for (Student stud: studentsAlpha) {\n System.out.println(\"(\" + stud.getLast() + \", \" + stud.getFirst() + \", \" + df.format(gradebook.getGradeStudent(stud)) + \")\");\n }\n\n }\n else{\n throw new IllegalArgumentException(\"Grade or Alphabetical flag missing.\");\n }\n return;\n }", "public static void main(String[] args) {\n\t\tHashMap<Price,String> hm = new HashMap<Price,String>();\n\t\tPrice p1 = new Price(100,\"mango\");\n\t\tPrice p2 = new Price(200,\"apple\");\n\t\tPrice p3 = new Price(500,\"custard\");\n\t\tPrice p4 = new Price(700,\"grapes\");\n\t\thm.put(p1, \"mango\"); // key cannot accept duplicate keys so inserting price as a key\n\t\thm.put(p2, \"apple\");\n\t\thm.put(p3, \"custard\");\n\t\thm.put(p4, \"grapes\");\n\t\tPrice p5 = new Price(200,\"apple\");\n\t\thm.put(p5, \"apple\");\n\t\tSet set1 = hm.keySet();\n\t\tSystem.out.println(set1);\n\t\tCollection c = hm.values();\n\t\t\n\t\tfor(Map.Entry<Price, String> map : hm.entrySet()){\n\t\t\tPrice key =map.getKey();\n\t\t\tString value = map.getValue();\n\t\t\tSystem.out.println(key+\" \"+value);\n\t\t}\n\t}", "public void listBooks() {\n for (int g = 0; g < books.length; g++) {\n books[g].toString();\n }\n// List all books in Bookstore\n }", "public static ArrayList<Book> search(String title, ArrayList<String> authors, String isbn, String publisher, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, authors, isbn, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer)\n if(b.getBookPublisher().equals(publisher) || publisher.equals(\"*\"))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "public static void main(String[] args) {\n\t\tList <String> color = new ArrayList<String>(5);\r\n\t\tcolor.add(\"Red\");\r\n\t\tcolor.add(\"Green\");\r\n\t\tcolor.add(\"Orange\");\r\n\t\tcolor.add(\"white\");\r\n\t\tcolor.add(\"black\");\r\n\t\t\r\n\t\tList<String>color2 =new ArrayList<String>(5);\r\n\t\tcolor2.add(\"red\");\r\n\t\tcolor2.add(\"Green\");\r\n\t\tcolor2.add(\"orange\");\r\n\t\tcolor2.add(\"White\");\r\n\t\tcolor2.add(\"Black\");\r\n\t\t\r\n\t\tArrayList<String>color3 = new ArrayList<String>();\r\n\t\t\tfor(String temp:color)\r\n\t\t\t\tcolor3.add(color2.contains(temp)? \"Yes\" : \"No\");\r\n\t\t\tSystem.out.println(color3);\r\n\t}", "public void searchByArtist()\n {\n String input = JOptionPane.showInputDialog(null,\"Enter the artist you'd like to search for:\");\n input = input.replaceAll(\" \", \"_\").toUpperCase(); //standardize output.\n \n Collections.sort(catalog, new ArtistComparator());\n int index = Collections.binarySearch(catalog, \n new Album(input,\"\",null), new ArtistComparator());\n //Since an artist could be listed multiple times, there is *no guarantee*\n //which artist index we find. So, we have to look at the artists\n //left and right of the initial match until we stop matching.\n if(index >= 0)\n {\n Album initial = catalog.get(index);\n String artist = initial.getArtist();\n \n ArrayList<Album> foundAlbums = new ArrayList<>();\n //this ArrayList will have only the albums of our found artist \n foundAlbums.add(initial);\n try { \n int j = index, k = index;\n while(artist.equalsIgnoreCase(catalog.get(j+1).getArtist()))\n {\n foundAlbums.add(catalog.get(j+1));\n j++;\n }\n while(artist.equalsIgnoreCase(catalog.get(k-1).getArtist()))\n {\n foundAlbums.add(catalog.get(k-1));\n k--;\n }\n }\n catch(IndexOutOfBoundsException e) {\n //happens on the last round of the while-loop test expressions\n //don't do anyhting because now we need to print out our albums.\n }\n System.out.print(\"Artist: \" + artist + \"\\nAlbums: \");\n for(Album a : foundAlbums)\n System.out.print(a.getAlbum() + \"\\n\\t\");\n System.out.println();\n }\n else System.err.println(\"Artist '\" + input + \"' not found!\\n\"); \n }", "public static ArrayList<Book> search(String title, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: purchasedBooks.keySet())\n if(b.getBookName().equals(title) || title.equals(\"*\"))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "public void exercise() {\n List<Transaction> ex1 = transactions.stream()\n .filter(transaction -> transaction.getYear() == 2011)\n .sorted(Comparator.comparing(Transaction::getValue))\n .collect(Collectors.toList());\n System.out.println(ex1);\n\n //2 What are all the unique cities where the traders work?\n List<String> ex2 = transactions.stream()\n .map(transaction -> transaction.getTrader().getCity())\n .distinct()\n .collect(Collectors.toList());\n System.out.println(ex2);\n\n //alternative solution\n Set<String> ex2alt = transactions.stream()\n .map(transaction -> transaction.getTrader().getCity())\n .collect(Collectors.toSet());\n\n //3 Find all traders from Cambridge and sort them by name.\n List<Trader> ex3 = transactions.stream()\n .map(Transaction::getTrader)\n .distinct()\n .filter(trader -> trader.getCity() == \"Cambridge\")\n .sorted(Comparator.comparing(Trader::getName))\n .collect(Collectors.toList());\n System.out.println(ex3);\n\n //4 Return a string of all traders’ names sorted alphabetically.\n String ex4 = transactions.stream()\n .map(transaction -> transaction.getTrader().getName())\n .distinct()\n .sorted()\n .reduce(\"\", (n1, n2) -> n1 + n2);\n System.out.println(ex4);\n\n //alternative solution\n String ex4Alt = transactions.stream()\n .map(transaction -> transaction.getTrader().getName())\n .distinct()\n .sorted()\n .collect(Collectors.joining());\n System.out.println(ex4Alt);\n\n //5 Are any traders based in Milan?\n Boolean ex5 = transactions.stream()\n .anyMatch(transaction -> transaction.getTrader().getCity().equals(\"Milan\"));\n System.out.println(ex5);\n\n //6 Print the values of all transactions from the traders living in Cambridge.\n transactions.stream()\n .filter(transaction -> transaction.getTrader().getCity().equals(\"Cambridge\"))\n .forEach(System.out::println);\n\n //7 What’s the highest value of all the transactions?\n Optional<Integer> ex7 = transactions.stream()\n .map(Transaction::getValue)\n .reduce(Integer::max);\n System.out.println(ex7);\n\n //8 Find the transaction with the smallest value.\n Optional<Transaction> ex8 = transactions.stream()\n .reduce((t1, t2) -> t1.getValue() < t2.getValue() ? t1 : t2);\n System.out.println(ex8);\n\n //alternative solution\n Optional<Transaction> ex8Alt = transactions.stream()\n .min(Comparator.comparing(Transaction::getValue));\n System.out.println(ex8Alt);\n\n }", "private void displayScholarshipByName(String name) {\n\n int falg = 0;\n\n stdOut.println(name + \"\\n\");\n\n for (Scholarship scholarship : scholarshipDatabase) {\n\n stdOut.println(scholarship.getName() + \"\\n\");\n\n if (scholarship.getName().equals(name)) {\n\n stdOut.println(scholarship.toString());\n\n falg = 1;\n\n break;\n }\n }\n\n if (falg == 0) {\n\n stdOut.println(\"cannot find scholarship\\n\");\n\n }\n }", "private void searchBooks(String callNumber, String[] keywords,int startYear, int endYear) {\n\t\t/* Loop to sequentially search master list 'Reference' */\n\t\tfor (int i = 0; i < items.size(); i++)\n\t\t\tif ((callNumber.equals(\"\") || items.get(i).getCallNumber()\n\t\t\t\t\t.equalsIgnoreCase(callNumber))\n\t\t\t\t\t&& (keywords == null || matchedKeywords(keywords, items\n\t\t\t\t\t\t\t.get(i).getTitle()))\n\t\t\t\t\t&& (items.get(i).getYear() >= startYear && items.get(i)\n\t\t\t\t\t\t\t.getYear() <= endYear)) {\n\t\t\t\tReference ref = items.get(i);\n\t\t\t\t/* Checks if reference is of a 'Book' type */\n\t\t\t\tif (ref instanceof Book) {\n\t\t\t\t\tBook book = (Book) ref;\n\t\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\t\tSystem.out.println(book.toString());\n\t\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\t}\n\n\t\t\t}\n\t}", "public String toString() {\r\n return books.toString();\r\n }", "public static void main(String[] args) {\n\t\tMap<String,Double> items = new HashMap<>();\r\n\t\t\r\n\t\titems.put(\"Toaster\",350.00);\t\t//inits elements into map [STRING == KEY; DOUBLE == VALUE]\r\n\t\titems.put(\"Dongle\", 5.99);\r\n\t\titems.put(\"Sham Wow\", 19.99);\r\n\t\titems.put(\"Flex Seal\",19.99);\r\n\t\t\r\n\t\tSet<String> setOKeys = items.keySet();\r\n\t\tint count = 0;\r\n\t\tfor(String key : items.keySet()){\r\n\t\t\tSystem.out.print(++count + \") \" + key + \": $\" /*+ items.get(key)USED IN NORMAL FORMAT; NEEDED TO UPDATE FOR 2 DECI POINTS see below*/);\r\n\t\t\tSystem.out.printf(\"%.2f\\n\", items.get(key));\t//printf; decimal format to help\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(items.containsKey(\"Sham Wow\"));\r\n\t\tSystem.out.println(items.containsValue(19.99));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t//ANIMAL BOOK HASH MAP EXAMPLE\r\n\t\tMap<String, Integer> ani = new HashMap<>();\r\n\t\tani.put(\"Toucan\", 40);\r\n\t\tani.put(\"Lizard\", 7);\t\t\t//Stored by Integer value\r\n\t\tani.put(\"Wallaby\", 18);\r\n\t\t\r\n\t\tSystem.out.println(ani.get(\"Lizard\"));\r\n\t\t\r\n\t\tani.remove(\"Toucan\");\r\n\t\t\r\n\t\tSystem.out.println(ani); //toString Method is in the collections class automatically\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t//TREE MAP\r\n\t\tSet<Character> letters = new TreeSet<>(); //LINKEDHASHSET will be unordered\r\n\t\tletters.add('b');\r\n\t\tletters.add('c');\r\n\t\tletters.add('a');\r\n\t\tletters.add('c');\t\t//duplicate REMOVED automatically\r\n\t\t\r\n\t\tSystem.out.println(letters);\r\n\t\t\r\n\t\tletters.remove('b');\r\n\t\tSystem.out.println(letters);\r\n\t\t\r\n\t\tSystem.out.println(letters.contains('f'));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tLinkedList<String> food = new LinkedList<>(); //can do list-linked list, linked list-linked list\r\n\t\t\r\n\t\tfood.add(\"Sauerkraut\");\r\n\t\tfood.add(\"Carrots\");\r\n\t\tfood.add(\"Mud\");\r\n\t\tfood.add(1, \"Margarine\"); //at indx 1; Margarine\r\n\t\t\r\n\t\tCollections.sort(food); //method in collections class which sorts\r\n\t\tfood.toString();\r\n\t\t//food.clear(); clears list\r\n\t\t\r\n\t\tString marg = food.get(3);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tQueue<String> cities = new PriorityQueue<>();\r\n\t\t\r\n\t\tcities.offer(\"Detroit\");\t\t//QUEUES 'OFFER'\r\n\t\tcities.offer(\"Los Angeles\");\r\n\t\tcities.offer(\"Vienna\");\r\n\t\tcities.offer(\"Windsor\");\r\n\t\t\r\n\t\tSystem.out.println(cities.peek()); //insertion order\r\n\t\tSystem.out.println(cities);\r\n\t\t\r\n\t\tStack<String> dishes = new Stack<>();\r\n\t\t\r\n\t\tdishes.add(\"Cereal bowl\");\r\n\t\tdishes.add(\"Lunch tray\");\r\n\t\tdishes.add(\"Pots and pans\");\r\n\t\tdishes.add(\"Dinner fork\");\r\n\t\t\r\n\t\tSystem.out.println(dishes.peek());\r\n\t\t\r\n\t\tdishes.pop();\r\n\t\tdishes.pop();\t\t//removing the oldest; fifo \r\n\t\t\r\n\t\tSystem.out.println(dishes);\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tTreeSet<Integer> treeset = new TreeSet<Integer>();\n\t\ttreeset.add(1);\n\t\tint a=0,b=0;\n\t\tint number = sc.nextInt();\n\t\tint pairnumber = sc.nextInt();\n\t\tArrayList<matching> arraylist = new ArrayList<matching>();\n\t\t//연결 정보를 arraylist에 저장\n\t\tfor(int i =0;i<pairnumber;i++) {\n\t\t\ta=sc.nextInt();\n\t\t\tb=sc.nextInt();\n\t\t\tarraylist.add(new matching(a,b));\n\t\t}\n\n\t\tIterator<matching> itr = arraylist.iterator();\n\t\t//연결된 컴퓨터를 set에 넣는다.\n\t\tfor(int i =0;i<pairnumber;i++)\n\t\t{\n\t\t\titr = arraylist.iterator();\n\t\t\twhile(itr.hasNext()) {\n\t\t\t\tmatching temp2 = itr.next();\n\t\t\t\t//System.out.println(temp2.getnum1());\n\t\t\t\tif(treeset.contains(temp2.getnum1())|| treeset.contains(temp2.getnum2())) {\n\t\t\t\t\ttreeset.add(temp2.getnum2());\n\t\t\t\t\ttreeset.add(temp2.getnum1());\n\t\t\t\t\titr.remove();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(treeset.size()-1);\n\t}", "void compareSearch();", "public static void main(String[] args) {\n\t\tLinkedHashSet<String> set=new LinkedHashSet<>();\n\t\tset.add(\"name\");\n\t\tset.add(\"surname\");\n\t\tset.add(\"address\");\n\t\tset.add(\"name\");\n\t\tset.add(\"surname\");\n\t\tset.add(\"address\");\n\t\t\n\t\tfor(String s:set)\n\t\t{\n\t\t\tSystem.out.println(s);\n\t\t}\n\t\n\n\t}", "@Override\n public List<Book> result(List<Book> books) {\n return search.result(books);\n }", "public static void main(String[] args) {\n\t\tBook bookArray[] = { new Fiction(\"Nineteen Eighty-Four \"), new Fiction(\"The Handmaid's Tale\"),\n\t\t\t\tnew Fiction(\"The Great Gatsby\"), new Fiction(\"Pride and Prejudice\"),\n\t\t\t\tnew Fiction(\"The Catcher in the Rye\"), new NonFiction(\"The Story of Silent Spring \"),\n\t\t\t\tnew NonFiction(\"Between the World and Me\"), new NonFiction(\"Black Boy\"),\n\t\t\t\tnew NonFiction(\"In Cold Blood\"), new NonFiction(\"Meditations\") };\n\n\t\t// This for loop will displays the Each Fiction and Non-Fiction book details\n\t\tfor (int i = 0; i < bookArray.length; i++) {\n\t\t\t// Displaying the information of each book\n\t\t\tSystem.out.println(bookArray[i].toString());\n\t\t}\n\t}", "public static void main(String[] args) {\n // Reflexive\n System.out.println(o.equals(o));\n System.out.println(r.equals(r));\n\n // Symmetric\n System.out.println(o.equals(p) + \" = \" + p.equals(o));\n System.out.println(r.equals(s) + \" = \" + s.equals(r));\n\n // Transitive\n System.out.println(o.equals(p) + \" = \" + p.equals(q) + \" = \" + o.equals(q));\n System.out.println(r.equals(s) + \" = \" + s.equals(t) + \" = \" + r.equals(t));\n\n // Comparing Point to ColorPoint\n System.out.println(p.equals(s.asPoint()));\n System.out.println(s.asPoint().equals(p));\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(search(ar, 0, num, 90));\n\t}", "public static ArrayList<Book> search(String title, ArrayList<String> authors, String isbn, String publisher, String sortOrder, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, authors, isbn, publisher, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer) {\n if (b.getBookPublisher().equals(publisher) || publisher.equals(\"*\"))\n searchedBooks.add(b);\n }\n if (sortOrder.equals(\"title\")) {\n Collections.sort(searchedBooks, Book.BookTitleComparator);\n }\n else if(sortOrder.equals(\"publish-date\")){\n Collections.sort(searchedBooks,Book.BookDateComparator);\n }\n else{\n\n }\n return searchedBooks;\n }", "public static void main(String[] args) {\n ArrayList<Contact> contactBook = new ArrayList();\n\n Contact contact1 = new Contact(\"Gabe Newell\", \"[email protected]\");\n Contact contact2 = new Contact(\"Todd Howard\", \"[email protected]\");\n\n contactBook.add(contact1);\n contactBook.add(contact2);\n \n for (Contact contacts : contactBook) {\n System.out.println(contacts.toString());\n }\n\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Books)) {\n return false;\n }\n Books other = (Books) object;\n if ((this.bookno == null && other.bookno != null) || (this.bookno != null && !this.bookno.equals(other.bookno))) {\n return false;\n }\n return true;\n }", "public void show_book()\n\t{\n\t\tsize=arr.size();\n\t\tif(size>0)\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(\"===========================================================\");\n\t\t\tSystem.out.println(\"Address Book List\");\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t\tint i=1;\n\n\t\t\t//Special loop:= For Each loop for array list\n\t\t\tfor(String x: arr)\n\t\t\t{\n\t\t\t\tSystem.out.println(i+\". \"+x);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"No data Found\");\n\t\t}\n\t}", "public void sensibleMatches1() \n { \n Map<String, Set<String>> clientMap = new HashMap<>();\n Set<String> interests = new HashSet<>();\n\n interests.add(\"Food\");\n interests.add(\"Wine\");\n interests.add(\"Tandems\");\n clientMap.put(\"Hal\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Walking\");\n interests.add(\"Welding\");\n clientMap.put(\"Gemma\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Cinema\");\n interests.add(\"Wine\");\n clientMap.put(\"Caroline\", interests);\n\n Set<String> halsInterests = clientMap.get(\"Hal\");\n String outputString;\n Set<String> eachClientInterests;\n Set<String> intersection ;\n\n Map<String, Set<String>> mapWithoutHal = new HashMap<>(clientMap);\n mapWithoutHal.remove(\"Hal\");\n for (String eachClient : mapWithoutHal.keySet()) \n {\n eachClientInterests = clientMap.get(eachClient);\n intersection = new HashSet<>(halsInterests);\n intersection.retainAll(eachClientInterests);\n outputString = \"Hal and \" + eachClient \n + \" have common interests: \"\n + intersection;\n System.out.println(outputString);\n }\n }" ]
[ "0.6029113", "0.56715435", "0.5666051", "0.5602083", "0.55897003", "0.55565816", "0.55550075", "0.55106276", "0.5492182", "0.5469197", "0.54166687", "0.535012", "0.5347257", "0.53445727", "0.5324776", "0.531375", "0.5305515", "0.5294675", "0.5293576", "0.5270972", "0.5265175", "0.5257912", "0.5255495", "0.52480805", "0.5204243", "0.51994", "0.51938987", "0.5186689", "0.51749825", "0.5154206", "0.51515245", "0.51395667", "0.51358324", "0.5132686", "0.5121268", "0.5117109", "0.5096686", "0.5094385", "0.5084142", "0.50763494", "0.506861", "0.5060692", "0.50534946", "0.50396454", "0.5028579", "0.50221825", "0.5021573", "0.49949333", "0.49910957", "0.49825883", "0.49744108", "0.49612662", "0.49582738", "0.49582264", "0.49546155", "0.49542665", "0.4945743", "0.49415094", "0.49349046", "0.4924224", "0.4921468", "0.4920356", "0.49191707", "0.49135992", "0.49051076", "0.49044096", "0.48966652", "0.48952803", "0.48944467", "0.48879135", "0.48859665", "0.48832712", "0.48823076", "0.4877696", "0.4877463", "0.48766813", "0.4873259", "0.4863879", "0.48586625", "0.48478928", "0.4843004", "0.48423502", "0.4840124", "0.4828557", "0.4823286", "0.48203853", "0.48157722", "0.48010066", "0.4793736", "0.4792322", "0.47887707", "0.4784109", "0.47824576", "0.47814348", "0.4780911", "0.47800103", "0.4769597", "0.4769276", "0.47658485", "0.47633198", "0.47607484" ]
0.0
-1
Prints out every book that matches equals given values.
public void listBooksByISBN(int ISBN) { String sql = "SELECT ISBN, BookName, AuthorName, Price " + "FROM books " + "WHERE ISBN = ?"; try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) { // Set values pstmt.setInt(1, ISBN); ResultSet rs = pstmt.executeQuery(); // Print results while(rs.next()) { System.out.println(rs.getInt("ISBN") + "\t" + rs.getString("BookName") + "\t" + rs.getString("AuthorName") + "\t" + rs.getInt("Price")); } } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\t\n\t\tHashSet<BookList> set = new HashSet<BookList>();\n\t\t\n\t\tBookList b1 = new BookList(101,\" Let us C\", \" Yashwant Kanetkar\", \" BPB \", 8);\n\t\tBookList b2 = new BookList(102, \" Data communication & Networking\", \" Forouzan\", \" Mc Graw Hill \", 4);\n\t\tBookList b3 = new BookList(103, \" Operating System\", \" Galvin\", \" Wiley \", 6);\n\t\tBookList b4 = new BookList(103, \" Operating System\", \" Galvin\", \" Wiley \", 6);\n\t\t\n\t\tset.add(b1);\n\t\tset.add(b2);\n\t\tset.add(b3);\n\t\tset.add(b4);\n\t\t\n\t\tfor(BookList b:set) {\n\t\t\tSystem.out.println(b.id+\" \"+b.name+\" \"+b.author+\" \"+b.publisher+\" \"+b.quantity);\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tIterator<BookList> itr = set.iterator();\n\t\t\n\t\twhile (itr.hasNext()) {\n\t\tSystem.out.println(itr.next().toString());\n\t\t\n\t\t}\n\n\t}", "public static void main(String[] args) {\n Iterable<Book> notCheckedOut = FluentIterable\n .from(Library.ALL_BOOKS)\n .filter(Utils.IS_NOT_LOANED);\n System.out.println(\"not checked out\");\n System.out.println(Utils.JOINER.join(notCheckedOut));\n System.out.println();\n \n // books that are checked out to Zeb\n Iterable<Book> checkedOutToZeb = FluentIterable\n .from(Library.ALL_BOOKS)\n .filter(Utils.IS_LOANED_TO_ZEB);\n System.out.println(\"checked out to Zeb\");\n System.out.println(Utils.JOINER.join(checkedOutToZeb));\n System.out.println();\n \n // books that are checked out to someone named \"Tobias\"\n Iterable<Book> checkedOutToSomeoneNamedTobias = FluentIterable\n .from(Library.ALL_BOOKS)\n .filter(Utils.IS_LOANED_TO_SOMEONE_NAMED_TOBIAS);\n System.out.println(\"checked out to someone named 'Tobias'\");\n System.out.println(Utils.JOINER.join(checkedOutToSomeoneNamedTobias));\n System.out.println();\n }", "public ArrayList<Book> search(String part){ \n this.searchBooks = new ArrayList<Book>();\n this.numberedListOfSearch = new HashMap<Integer, Book>();\n if (part.length()>=4){\n //Adding all the searching books into an ArrayList<Book>\n //No duplicating for books having the same title\n boolean bookExist = false;\n for (Book book : this.libraryBooks){\n if ((book.getTitle().toLowerCase().contains(part.toLowerCase())) || (book.getAuthor().toLowerCase().contains(part.toLowerCase()))){\n //Check whether any books having the same title in the list\n for (Book bookSearch : this.searchBooks){\n if (bookSearch.getTitle().equals(book.getTitle())){\n bookExist = true;\n break;\n }\n }\n //If none!\n if(!bookExist){\n this.searchBooks.add(book);\n }\n }\n bookExist = false;\n }\n //To put into a numbered list for printing\n //No duplicating for books having the same title\n for (int i =0; i < (this.searchBooks.size());i++){\n // put the book in the HashMap for printing \n this.numberedListOfSearch.put(i+1, this.searchBooks.get(i));\n }\n\n //To print out\n this.println(\"The searching process has finished!\");\n String researchBooks=\"\";\n //check whether the numbered list is empty or not\n if(this.numberedListOfSearch.size() >0){\n researchBooks += \"{\";\n for (int i = 0; i < this.numberedListOfSearch.size();i++){\n researchBooks += (i+1);\n researchBooks += \": \";\n researchBooks += this.numberedListOfSearch.get(i+1).toString();\n researchBooks += \"; \";\n }\n researchBooks = researchBooks.substring(0, researchBooks.length()-2);\n researchBooks += \"}\"; \n }\n //if the numbered list is empty\n else if ( this.numberedListOfSearch.size() == 0){\n researchBooks += \"Nothing found!\";\n }\n this.println(researchBooks);\n }\n\n //If not enough input key words!\n else{\n this.println(\"Please enter more key words! At least four!!\");\n }\n return this.searchBooks;\n }", "private static void queryBooksByAuthor(){\n\t\tSystem.out.println(\"===Query Books By Author===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter First Name of Author to Query Books by: \");\n\t\tString author_firstname = string_input.next();\n\t\t\n\t\tSystem.out.println(\"Enter Middle Name of Author to Query Books by (Type 'null' if Author has no middlename): \");\n\t\tString author_middlename = string_input.next();\n\t\tif(author_middlename.equalsIgnoreCase(\"null\"))\n\t\t\tauthor_middlename = \"\";\n\t\t\n\t\tSystem.out.println(\"Enter Last Name of Author to Query Books by: \");\n\t\tString author_lastname = string_input.next();\n\t\t\n\t\tString author_fullname = author_firstname + \" \" + author_middlename + \" \" + author_lastname;\n\t\t\n\t\tif(ALL_AUTHORS.containsKey(author_fullname)){//if author_full_name exists in the Hashtable then print out all of the author's book titles\n\t\t\tSystem.out.println(\"Author found!\");\n\t\t\tSystem.out.println(author_fullname + \"'s list of book titles are: \"); \n\t\t\tIterator<String> iter = ALL_AUTHORS.get(author_fullname).iterator();\n\t\t\tprintAllElements(iter);\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Sorry Author name entered does not exist in our records\");\n\t}", "public void printBookDetails(Book bookToSearch) {\n boolean exists = false;\n\n //Search if the given book exists in the library\n // There are better ways. But not with arrays!!\n for (Book element : books) {\n if (element.equals(bookToSearch)) {\n exists = true;\n }\n\n //Print book details if boook found\n if (exists) {\n System.out.print(bookToSearch.toString());\n } else {\n System.out.print(bookToSearch.toString() + \" not found\");\n }\n }\n }", "public static void bookNameSearch(Set<Book> books) {\n Pattern pattern = Pattern.compile(SEARCH_PARAMETER);\n for (Book book : books) {\n Matcher matcher = pattern.matcher(book.getBookName());\n if (matcher.find()) {\n System.out.println(book);\n }\n }\n }", "public void printByNumber() {\n for (int i = 0; i < numBooks; i++) {\n for (int j = i + 1; j < numBooks; j++) {\n if (books[i].getNumber().compareTo(books[j].getNumber()) > 0)\n {\n Book temp = books[i];\n books[i] = books[j];\n books[j] = temp;\n }\n }\n }\n System.out.println(\"**List of books by the book numbers.\");\n for (Book b : books){\n if(b != null) {\n System.out.println(b);\n }\n }\n System.out.println(\"**End of list\");\n }", "public static void main(String[] args) {\n\t\tint SizeX = 10 , SizeY = 7;\n\t\tString search_type =\"\";//用書名還是書號\n\t\tString answer =\"\";\n\t\tString query = \"\";//搜尋的關鍵字\n\t\tString operation = \"\";//儲存操作的動作: 借書/還書等\n\t\tString identity = \"\";//儲存使用者身分,student/staff/exit\n\t\tScanner in = new Scanner(System.in);\n\t\tString [][] booklists = new String[SizeX][SizeY];\n\t\t//建立資料庫\n\t\tbooklists = AddBooks(\"82101\",\"Cihai\",\"Reference\",\"Shu Xincheng\",\"20000\",booklists,0);\n\t\tbooklists = AddBooks(\"80001\",\"WW2 History\",\"History\",\"Winston Churchill\",\"971\",booklists,1);\n\t\tbooklists = AddBooks(\"00003\",\"Egg 100\",\"Cookbook\",\"Su yuan ma\",\"104\",booklists,2);\n\t\tbooklists = AddBooks(\"50001\",\"Be a honest man\",\"Political\",\"Ma Ying jeou\",\"520\",booklists,3);\n\t\tbooklists = AddBooks(\"85719\",\"Sword Art Online\",\"Novel\",\"Reki Kawahara\",\"8763\",booklists,4);\n\t\tbooklists = AddBooks(\"85728\",\"Spice and Wolf\",\"Novel\",\"Isuna Hasekura\",\"510\",booklists,5);\n\t\tbooklists = AddBooks(\"85707\",\"The Old Man and the Sea\",\"Novel\",\"Ernest Hemingway\",\"127\",booklists,6);\n\t\tbooklists = AddBooks(\"85703\",\"Romance of the Three Kingdoms\",\"Novel\",\"Luo Guanzhong\",\"480\",booklists,7);\n\t\tbooklists = AddBooks(\"80005\",\"Records of the Grand Historian\",\"History\",\"Sima Qian\",\"6000\",booklists,8);\n\t\tbooklists[4][5] = \"true\";\n\t\tbooklists[4][6] = \"1\";\n\t\t\n\t\tSystem.out.println(\"【圖書館租借模擬系統】\");\n\t\tBookSystem bs = new BookSystem();\n\t\tdo{\n\t\t\tSystem.out.println(\"請問你是何種身分?學生(student)或者圖書館人員(staff)?(輸入exit離開)\");\n\t\t\tidentity = in.nextLine();\n\t\t\tif(identity.equals(\"student\")){\n\t\t\t\tdo{\n\t\t\t\t\tbs.ViewStudent(booklists, SizeX);\n\t\t\t\t\tSystem.out.println(\"請問你要進行何種操作?\");\n\t\t\t\t\tSystem.out.println(\"1. 借書(borrow)\");\n\t\t\t\t\tSystem.out.println(\"2. 還書(return)\");\n\t\t\t\t\tSystem.out.println(\"3. 預約書籍(reserve)\");\n\t\t\t\t\tSystem.out.println(\"4. 取消預約書籍(reservecancel)\");\n\t\t\t\t\tSystem.out.println(\"5. 查詢書單(search)\");\n\t\t\t\t\tSystem.out.println(\"6. 離開(exit)\");\n\t\t\t\t\toperation = in.nextLine();\n\t\t\t\t\twhile(!operation.equals(\"borrow\")&&!operation.equals(\"1\")\n\t\t\t\t\t\t&&!operation.equals(\"return\")&&!operation.equals(\"2\")\n\t\t\t\t\t\t&&!operation.equals(\"reserve\")&&!operation.equals(\"3\")\n\t\t\t\t\t\t&&!operation.equals(\"reservecancel\")&&!operation.equals(\"4\")\n\t\t\t\t\t\t&&!operation.equals(\"search\")&&!operation.equals(\"5\")\n\t\t\t\t\t\t&&!operation.equals(\"exit\")&&!operation.equals(\"6\")){\n\t\t\t\t\t\t\tSystem.out.println(\"輸入錯誤!請重新輸入:\");\n\t\t\t\t\t\t\toperation = in.nextLine();\n\t\t\t\t\t}\n\t\t\t\t\tif(!operation.equals(\"search\") && !operation.equals(\"5\")&&!operation.equals(\"exit\")&&!operation.equals(\"6\") ){\n\t\t\t\t\t\tif(operation.equals(\"borrow\")|| operation.equals(\"1\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來借閱呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"return\")||operation.equals(\"2\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來還書呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"reserve\")||operation.equals(\"3\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來預借呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"reservecancel\")||operation.equals(\"4\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來取消預借呢?\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(search_type.equals(\"bookname\"))\tSystem.out.print(\"請輸入書名:\");\n\t\t\t\t\t\telse if(search_type.equals(\"booknum\"))\tSystem.out.print(\"請輸入書號:\");\n\t\t\t\t\t\tanswer = in.nextLine();\n\t\t\t\t\t\tif(operation.equals(\"borrow\")||operation.equals(\"1\")) \n\t\t\t\t\t\t\tbooklists = bs.BorrowBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"return\")||operation.equals(\"2\")) \n\t\t\t\t\t\t\tbooklists = bs.ReturnBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"reserve\")||operation.equals(\"3\")) \n\t\t\t\t\t\t\tbooklists = bs.ReserveBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"reservecancel\")||operation.equals(\"4\")) \n\t\t\t\t\t\t\tbooklists = bs.ReserveCancel(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(operation.equals(\"search\")||operation.equals(\"5\")){\n\t\t\t\t\t\tSystem.out.println(\"請問你要以何種方式查詢呢?\");\n\t\t\t\t\t\tSystem.out.println(\"1. [書號](booknum)\");\n\t\t\t\t\t\tSystem.out.println(\"2. [書名](bookname)\");\n\t\t\t\t\t\tSystem.out.println(\"3. [種類](booktype)\");\n\t\t\t\t\t\tSystem.out.println(\"4. [全部列出](all)\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\n\t\t\t\t\t\tint OrderIndex = 0;\n\t\t\t\t\t\tint TypeIndex = 0;\n\t\t\t\t\t\tif(search_type.equals(\"booknum\")){\n\t\t\t\t\t\t\tOrderIndex = 0;//依書號排列\n\t\t\t\t\t\t\tTypeIndex = 0;\n\t\t\t\t\t\t}else if(search_type.equals(\"bookname\")||search_type.equals(\"all\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 1;\n\t\t\t\t\t\t}else if(search_type.equals(\"booktype\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!search_type.equals(\"all\")){\n\t\t\t\t\t\t\tSystem.out.print(\"請輸入 \"+search_type+\"的關鍵字:\");\n\t\t\t\t\t\t\tquery = in.nextLine();\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,query,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}while(!operation.equals(\"exit\"));\n\t\t\t}else if(identity.equals(\"staff\")){\n\t\t\t\tdo{\n\t\t\t\t\tSystem.out.println(\"=========This is staff page=============\");\n\t\t\t\t\tSystem.out.println(\"請問你要進行何種操作?\");\n\t\t\t\t\tSystem.out.println(\"1. 登錄新書籍(bookregister)\");\n\t\t\t\t\tSystem.out.println(\"2. 刪除書籍(bookdelete)\");\n\t\t\t\t\tSystem.out.println(\"3. 更新書籍資料(bookedit)\");\n\t\t\t\t\tSystem.out.println(\"4. 查詢書單(search)\");\n\t\t\t\t\tSystem.out.println(\"5. 查詢學生資料(viewstudent)\");\n\t\t\t\t\tSystem.out.println(\"6. 離開(exit)\");\n\t\t\t\t\toperation = in.nextLine();\n\t\t\t\t\tif(operation.equals(\"bookregister\")||operation.equals(\"1\")){\n\t\t\t\t\t\tbooklists = bs.RregisterBook(booklists,SizeX);\n\t\t\t\t\t}else if(operation.equals(\"bookdelete\")||operation.equals(\"2\")\n\t\t\t\t\t\t\t||operation.equals(\"bookedit\")||operation.equals(\"3\")){\n\t\t\t\t\t\tif(operation.equals(\"bookdelete\")||operation.equals(\"2\"))\n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來刪除書籍呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"bookedit\")||operation.equals(\"3\"))\n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來修改書籍呢?\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\t\t\t\t\t\t\n\t\t\t\t\t\tif(search_type.equals(\"bookname\"))\tSystem.out.print(\"請輸入書名:\");\n\t\t\t\t\t\telse if(search_type.equals(\"booknum\"))\tSystem.out.print(\"請輸入書號:\");\n\t\t\t\t\t\tanswer = in.nextLine();\n\t\t\t\t\t\tif(operation.equals(\"bookdelete\")||operation.equals(\"2\"))\n\t\t\t\t\t\t\tbooklists = bs.DeleteBooks(booklists,SizeX,SizeY,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"bookedit\")||operation.equals(\"3\"))\n\t\t\t\t\t\t\tbooklists = bs.EditBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\n\t\t\t\t\t}else if(operation.equals(\"search\")||operation.equals(\"4\")){\n\t\t\t\t\t\tSystem.out.println(\"請問你要以何種方式查詢呢?\");\n\t\t\t\t\t\tSystem.out.println(\"1. [書號](booknum)\");\n\t\t\t\t\t\tSystem.out.println(\"2. [書名](bookname)\");\n\t\t\t\t\t\tSystem.out.println(\"3. [種類](booktype)\");\n\t\t\t\t\t\tSystem.out.println(\"4. [全部列出](all)\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\n\t\t\t\t\t\tint OrderIndex = 0;\n\t\t\t\t\t\tint TypeIndex = 0;\n\t\t\t\t\t\tif(search_type.equals(\"booknum\")||search_type.equals(\"1\")){\n\t\t\t\t\t\t\tOrderIndex = 0;//依書號排列\n\t\t\t\t\t\t\tTypeIndex = 0;\n\t\t\t\t\t\t}else if(search_type.equals(\"bookname\")||search_type.equals(\"all\")||search_type.equals(\"2\")||search_type.equals(\"3\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 1;\n\t\t\t\t\t\t}else if(search_type.equals(\"booktype\")||search_type.equals(\"3\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!search_type.equals(\"all\")){\n\t\t\t\t\t\t\tSystem.out.print(\"請輸入 \"+search_type+\"的關鍵字:\");\n\t\t\t\t\t\t\tquery = in.nextLine();\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,query,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(operation.equals(\"viewstudent\")||operation.equals(\"5\")){\n\t\t\t\t\t\tbs.ViewStudent(booklists,SizeX);\n\t\t\t\t\t}\n\t\t\t\t}while(!operation.equals(\"exit\"));\n\t\t\t}\n\t\t\t\n\t\t}while(!identity.equals(\"exit\"));\n\t\t\n\t\tSystem.out.println(\"感謝您使用此系統!\");\n\t}", "public static void main(String[] args) {\n Book book0 = new Book(\"Ulysses\", \"James Joyce\", 732);\n Book book0copy2 = new Book(\"Ulysses\", \"James Joyce\", 732);\n Book book1 = new Book(\"Ender's Game\", \"Orson S. Card\", 324);\n Book book3; //just creates unassigned reference\n Book[] lotr = new Book[3];\n lotr[0] = new Book(\"The Fellowship of the Ring\", \"J.R.R. Tolkien\", 432);\n lotr[1] = new Book(\"The Two Towers\", \"J.R.R. Tolkien\", 322);\n lotr[2] = new Book(\"The Return of the King\", \"J.R.R. Tolkien\", 490);\n\n book0.ripOutPage();\n System.out.print(book0); //calls toString() object method\n\n book1.setAuthor(\"Orson Scott Card\");\n\n for(Book b : lotr) {\n System.out.print(b);\n }\n\n if (book0.isLong()) {\n System.out.println(book0.getTitle() + \" is a long book.\");\n } else {\n System.out.println(book0.getTitle() + \" is a short book.\");\n }\n \n System.out.printf(\"The title of %s by %s is %d characters long.%n\", \n book0.getTitle(), book0.getAuthor(), book0.getTitleLength());\n\n System.out.println(book0.equals(book0copy2));\n System.out.println(book0.equals(book1));\n }", "public static void main(String[] args) {\n\t\tArrayList<Book> bookList=new ArrayList<Book>();\r\n\t\tBook book1= new Book(1001,\"2 States\",\"Chetan Bhagat\",652.32f);\r\n\t\tBook book2= new Book(1002,\"Three idiots\",\"Chetan Bhagat\",650.40f);\r\n\t\tBook book3= new Book(1003,\"Hopeless\",\"Collen Hoover\",456.32f);\r\n\t\tBook book4= new Book(1004,\"The Deal\",\"Ellen Kennedy\",345.32f);\r\n\t\tBook book5= new Book(1005,\"The Goal\",\"Ellen Kennedy\",895.32f);\r\n\t\t\r\n\t\tbookList.add(book1);\r\n\t\tbookList.add(book2);\r\n\t\tbookList.add(book3);\r\n\t\tbookList.add(book4);\r\n\t\tbookList.add(book5);\r\n\t\tfor(Book book:bookList){\r\n\t\t\tSystem.out.println(book.getId()+\" \"+\r\n\t\t\t\t\t\t\t\tbook.getBname()+\" \"+\r\n\t\t\t\t\t\t\t\tbook.getAuthor()+\" \"+\r\n\t\t\t\t\t\t\t\tbook.getPrice());\r\n\t\t}\r\n\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tAuthor au1=new Author(\"Ma Ma\",\"[email protected]\",'F');\r\n\t\tAuthor au2=new Author(\"Mg Mg\",\"[email protected]\",'M');\r\n\t\tAuthor au3=new Author(\"Su Su\",\"[email protected]\",'F');\r\n\t\tBook b1=new Book(\"Software Engineering\",au1,7000);\r\n\t\tBook b2=new Book(\"Java\",au1,8000,2);\r\n\t\tSystem.out.println(\"BookInfo writing by Ma Ma:\");\r\n\t\tSystem.out.println(\"BookName:\"+b1.name+\"\\nAuthor:\"+au1.name+\"\\nPrice:\"+b1.price);\r\n\t\tSystem.out.println(\"BookName:\"+b2.name+\"\\nAuthor:\"+au1.name+\"\\nPrice:\"+b2.price+\"\\nQty:\"+b2.qty);\r\n\t\tSystem.out.println();\r\n\t\tBook b3=new Book(\"Digital\",au2,4000);\r\n\t\tBook b4=new Book(\"Management\",au2,6000,3);\r\n\t\tSystem.out.println(\"BookInfo writing by Mg Mg:\");\r\n\t\tSystem.out.println(\"BookName:\"+b3.name+\"\\nAuthor:\"+au2.name+\"\\nPrice:\"+b3.price);\r\n\t\tSystem.out.println(\"BookName:\"+b4.name+\"\\nAuthor:\"+au2.name+\"\\nPrice:\"+b4.price+\"\\nQty:\"+b4.qty);\r\n\t\tSystem.out.println();\r\n\t\tBook b5=new Book(\"Accounting\",au3,5000);\r\n\t\tBook b6=new Book(\"Javascript\",au3,9000,4);\r\n\t\tSystem.out.println(\"BookInfo writing by Su Su:\");\r\n\t\tSystem.out.println(\"BookName:\"+b5.name+\"\\nAuthor:\"+au3.name+\"\\nPrice:\"+b5.price);\r\n\t\tSystem.out.println(\"BookName:\"+b6.name+\"\\nAuthor:\"+au3.name+\"\\nPrice:\"+b6.price+\"\\nQty:\"+b6.qty);\r\n\t}", "private void printingSearchResults() {\n HashMap<Integer, Double> resultsMap = new HashMap<>();\n for (DocCollector collector : resultsCollector) {\n if (resultsMap.containsKey(collector.getDocId())) {\n double score = resultsMap.get(collector.getDocId()) + collector.getTermScore();\n resultsMap.put(collector.getDocId(), score);\n } else {\n resultsMap.put(collector.getDocId(), collector.getTermScore());\n }\n }\n List<Map.Entry<Integer, Double>> list = new LinkedList<>(resultsMap.entrySet());\n Collections.sort(list, new Comparator<Map.Entry<Integer, Double>>() {\n public int compare(Map.Entry<Integer, Double> o1,\n Map.Entry<Integer, Double> o2) {\n return (o2.getValue()).compareTo(o1.getValue());\n }\n });\n if (list.isEmpty())\n System.out.println(\"no match\");\n else {\n DecimalFormat df = new DecimalFormat(\".##\");\n for (Map.Entry<Integer, Double> each : list)\n System.out.println(\"docId: \" + each.getKey() + \" score: \" + df.format(each.getValue()));\n }\n\n }", "@Override\n\tpublic void printBook(List<Book> books) {\n\t\tIterator<Book> it = books.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tSystem.out.println(it.next());\n\t\t}\n\t\t\n\t}", "protected static void searchByKeysHashYear(String keys, int lowerYear, int upperYear) {\n System.out.println(\"searching in hasher using search terms and year\");\n System.out.println(\"lowerYear: \" + lowerYear);\n System.out.println(\"upperYear: \" + upperYear);\n String[] splitWords = new String[keys.split(\"[ ]+\").length];\n splitWords = keys.split(\"[ ]+\");\n System.out.println(splitWords[0]);\n for (String keyWord : splitWords) {\n keyWord = keyWord.toLowerCase();\n if (map.get(keyWord) != null) {\n ArrayList<Integer> allInstancesofWord = (ArrayList<Integer>) map.get(keyWord);\n {\n for (int i = 0; i < allInstancesofWord.size(); i++) {\n\n Product e = productList.get(allInstancesofWord.get(i));\n if (e.productYearMatch(lowerYear, upperYear)) // if an element is between range of the years. and it has the correct key terms. it is printed.\n {\n \n System.out.println(productList.get(allInstancesofWord.get(i)));\n ProductGUI.Display(e.toString() + \"\\n\");\n }\n else\n System.out.println(\"not in the year \"+ keys + \" \"+lowerYear+ \" \"+ upperYear);\n }\n }\n }\n if (map.get(keyWord) == null) {\n System.out.println(\"The products you are searching for were not found\");\n }\n }\n\n }", "public static void main(String[] args) {\n Set<String> list = new TreeSet<>();\n list.add(\"Song\");\n list.add(\"Album\");\n list.add(\"Artist\");\n list.add(\"Year\");\n list.add(\"Genre\");\n list.add(\"Song\");\n list.add(\"Song\");\n\n System.out.println();\n for(String x : list){\n System.out.println(x);\n }\n\n //NO REPITTED VALUES AND ASCENDED ORDER WHIT COMPARABLE, HASHCODE AND EQUALS\n Set<Persona> list2 = new TreeSet<>();\n list2.add(new Persona(1, \"Rayman\"));\n list2.add(new Persona(2, \"Castlevania\"));\n list2.add(new Persona(3, \"Silent Hill\"));\n list2.add(new Persona(4, \"Silent Hill\"));\n list2.add(new Persona(1, \"Rayman\"));\n\n System.out.println();\n for(Persona x : list2){\n System.out.println(x.getId() + \" - \" + x.getName());\n }\n }", "public void matchingcouple()\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Output :\");\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Following are the matching pairs \");\r\n\t\t\t\t\r\n\t\t\t\tfor(int i=0;i<womenmatchinlist.size();i++)\r\n\t\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t// print the matching pair from same index of men and women matching list\r\n\t\t\t\tSystem.out.println(menmatchinglist.get(i)+\" is engaged with \"+womenmatchinlist.get(i));\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}", "public void viewLibraryBooks(){\n\t\tIterator booksIterator = bookMap.keySet().iterator();\n\t\tint number, i=1;\n\t\tSystem.out.println(\"\\n\\t\\t===Books in the Library===\\n\");\n\t\twhile(booksIterator.hasNext()){\t\n\t\t\tString current = booksIterator.next().toString();\n\t\t\tnumber = bookMap.get(current).size();\n\t\t\tSystem.out.println(\"\\t\\t[\" + i + \"] \" + \"Title: \" + current);\n\t\t\tSystem.out.println(\"\\t\\t Quantity: \" + number + \"\\n\");\t\t\t\n\t\t\ti += 1; \n\t\t}\n\t}", "public String searchBooks() {\r\n if (keywords.isEmpty()) {\r\n return \"advanced-search\";\r\n }\r\n\r\n keywords = keywords.trim();\r\n \r\n //Get list of all the queries\r\n List<List<Books>> listOfLists = new ArrayList<List<Books>>();\r\n listOfLists.add(findBooksByGenre(keywords));\r\n listOfLists.add(findBooksByIdentifier(keywords));\r\n listOfLists.add(findBooksByContributor(keywords));\r\n listOfLists.add(findBooksByFormat(keywords));\r\n listOfLists.add(findBooksByPublisher(keywords));\r\n listOfLists.add(findBooksByTitle(keywords));\r\n listOfLists.add(findBooksByYear(keywords));\r\n\r\n clearFields();\r\n\r\n List<Books> books = new ArrayList<Books>();\r\n\r\n //Filter out useless data\r\n List<Books> tempBookList;\r\n for (int cntr = 0; cntr < listOfLists.size(); cntr++) {\r\n tempBookList = listOfLists.get(cntr);\r\n\r\n if (tempBookList == null) {\r\n continue;\r\n }\r\n\r\n if (tempBookList.isEmpty()) {\r\n continue;\r\n }\r\n\r\n books.addAll(tempBookList);\r\n }\r\n\r\n //Remove duplicates\r\n Set<Books> bookSet = new HashSet<Books>();\r\n bookSet.addAll(books);\r\n books.clear();\r\n books.addAll(bookSet);\r\n\r\n return displayBooks(books);\r\n }", "private static void queryBooksByGenre(){\n\t\tSystem.out.println(\"===Query Books By Genre===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter Genre to Query Books by: \");\n\t\tString genre = string_input.next();\n\t\tint genre_index = getGenreIndex(genre); //returns the index of the genre entered, in ALL_GENRES\n\t\t\n\t\tif(genre_index > -1){//valid genre was entered\n\t\t\tIterator<String> iter = ALL_GENRES.get(genre_index).iterator();\n\t\t\tSystem.out.println(\"All \" + genre + \" books are: \");\n\t\t\tprintAllElements(iter);\n\t\t}\n\t}", "public static void main(String[] args) {\n\n String[] array = {\"AAA\", \"BBB\", \"ABA\", \"ABB\", \"AAA\", \"ABB\", \"ABB\"};\n\n\n for (\n int i = 0;\n i < array.length - 1; i++)\n {\n for (int j = i + 1; j < array.length; j++) {\n\n if ((array[i].equals(array[j])) && (i != j)) {\n System.out.println(\"Дублирующийся элемент \" + array[j]);\n }\n }\n }\n }", "@Override\n\n public boolean equals(Object obj) {\n if (this == obj) {\n return true;\n }\n if (obj == null || getClass() != obj.getClass()) {\n return false;\n }\n Book book = (Book) obj;\n return getBookAuthorName() == book.getBookAuthorName() &&\n bookIsbnNumber() == book.getBookIsbnNumber() &&\n Objects.equals(getBookName(), book.getBookName());\n }", "public static void main(String[] args) {\n\t\t\n\t\tString [] array = {\"A\", \"A\", \"B\", \"C\", \"C\"};\n\t\t\n\t\tfor (int j = 0; j < array.length; j++) {\n\t\t\t\n\t\t\tint count = 0;\n\t\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\t\tif (array[i].equals(array[j]))\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\n\t\t\tif (count == 1)\n\t\t\tSystem.out.print(array[j] + \" \");\n\t\t\n\t\t}\n\t\t\n\t}", "public void printBookings(){\r\n\t\t//Treemap is used to sort the bookings into calendar order\r\n\t\tTreeMap<Calendar, Integer> m = new TreeMap<Calendar, Integer>();\r\n\t\tSet<Integer> booking = listBookings();\r\n\t\t\r\n\t\t//loops through getting each booking and puts it into the treemap\r\n\t\tfor (Integer id: booking){\r\n\t\t\tBooking b = bookings.get(id);\r\n\t\t\tm.put(b.start(), b.getLength());\r\n\t\t}\r\n\t\t\r\n\t\t//For each calendar in treemap it prints out the date and length of the booking\r\n\t\tSet<Calendar> cal = m.keySet();\r\n\t\tfor(Calendar c: cal) {\r\n\t\t\tprint(c);\r\n\t\t\tSystem.out.print(\" \" + m.get(c));\r\n\t\t}\r\n\t}", "public static void printBooks(List<Book> books) {\r\n System.out.println(\"AUTHOR, \" + \"TITLE, \" + \"GENRE, \" + \"SERIES (if any), \" + \"PART (if any), \" + \"PAGES, \" + \"YEAR, \" + \"PRICE\");\r\n\r\n for (Book book : books) {\r\n System.out.println(book.getTitle() + \", \" + book.getAuthor() + \", \" + book.getGenre() + \", \" + book.getSeries() + \", \" + book.getPartNumber() + \", \" + book.getPagesQuantity() + \", \" + book.getYearPublished() + \", \" + book.getPrice());\r\n }\r\n\r\n }", "void availableBooks(){\n\t\tSystem.out.println(\")))))Available books((((((\");\n\t\tfor(int i=0;i<books.length;i++){\n\t\t\tString book=books[i];\n\t\t\tif(book==null){\n\t\t\tcontinue;\n\t\t}\n\t\t\tSystem.out.println(\"*\"+books[i]);\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n\r\n\t\tBook b1 = new Book(23,\"The mads in heaven\",200);\r\n\t\tBook b2 = new Book(25,\"Island Treasury\",300);\r\n\t\tBook b3 = new Book(27,\"Watery heart\",400);\r\n\t\t\r\n\t\tArrayList<Book> al = new ArrayList<Book>();\r\n\t\tal.add(b1);\r\n\t\tal.add(b2);\r\n\t\tal.add(b3);\r\n\t\t\r\n\t\tIterator<Book> itr1 = al.iterator();\r\n\t\twhile(itr1.hasNext())\r\n\t\t{\r\n\t\t\tBook book = itr1.next();\r\n\t\t\tSystem.out.println(\"Book price is: \"+book.price);\r\n\t\t\tSystem.out.println(\"Number of pages in the book are: \"+book.pages);\r\n\t\t\tSystem.out.println(\"The book name is: \"+book.name);\t\r\n\t\t}\r\n\t}", "public void run(){\n\t\tif(searchHow==0){\n\t\t\tint isbnCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestIsbn = new SearchRequest(db, searchForThis, isbnCount, db.size());\n\t\t\t\t\tdb.searchByISBN(requestIsbn);\n\t\t\t\t\tisbnCount = requestIsbn.foundPos;\n\t\t\t\t\tif (requestIsbn.foundPos >= 0) {\n\t\t\t\t\t\tisbnCount++;\n\t\t\t\t\t\tString formatThis = \"Matched ISBN at position: \" + requestIsbn.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestIsbn.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==1){\n\t\t\tint titleCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestTitle = new SearchRequest(db, searchForThis, titleCount, db.size());\n\t\t\t\t\tdb.searchByTitle(requestTitle);\n\t\t\t\t\ttitleCount = requestTitle.foundPos;\n\t\t\t\t\tif (requestTitle.foundPos >= 0) {\n\t\t\t\t\t\ttitleCount++;\n\t\t\t\t\t\tString formatThis = \"Matched title at position: \" + requestTitle.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestTitle.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==2){\n\t\t\tint authorCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestAuthor = new SearchRequest(db, searchForThis, authorCount, db.size());\n\t\t\t\t\tdb.searchByAuthor(requestAuthor);\n\t\t\t\t\tauthorCount = requestAuthor.foundPos;\n\t\t\t\t\tif (requestAuthor.foundPos >= 0) {\n\t\t\t\t\t\tauthorCount++;\n\t\t\t\t\t\tString formatThis = \"Matched author at position: \" + requestAuthor.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestAuthor.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==3){\n\t\t\tint pageCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestPage = new SearchRequest(db, searchForThis, pageCount, db.size());\n\t\t\t\t\tdb.searchByNumPages(requestPage);\n\t\t\t\t\tpageCount = requestPage.foundPos;\n\t\t\t\t\tif (requestPage.foundPos >= 0) {\n\t\t\t\t\t\tpageCount++;\n\t\t\t\t\t\tString formatThis = \"Matched pages at position: \" + requestPage.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestPage.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==4){\n\t\t\tint yearCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestYear = new SearchRequest(db, searchForThis, yearCount, db.size());\n\t\t\t\t\tdb.searchByYear(requestYear);\n\t\t\t\t\tyearCount = requestYear.foundPos;\n\t\t\t\t\tif (requestYear.foundPos >= 0) {\n\t\t\t\t\t\tyearCount++;\n\t\t\t\t\t\tString formatThis = \"Matched year at position: \" + requestYear.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestYear.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t}", "public static ArrayList<Book> search(String title, ArrayList<String> authors, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer)\n if(containsAllAuthors(authors, b))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "private static void outputBook() {\n\t\toutput(\"\");\r\n\t\tfor (book book : library.outputBook()) { // method name changes BOOKS to outputBook()\r\n\t\t\toutput(book + \"\\n\");\r\n\t\t}\t\t\r\n\t}", "public void showBookingsByName(JTextArea output, String firstName, String lastName)\r\n {\r\n output.setText(\"Bookinger på \" + firstName + \" \" + lastName + \"\\n\\n\");\r\n \r\n Iterator<Booking> iter = bookings.iterator();\r\n \r\n while(iter.hasNext())\r\n {\r\n Booking booking = iter.next();\r\n \r\n if(booking.getGuest().getFirstname().equals(firstName) || \r\n booking.getGuest().getLastname().equals(lastName))\r\n {\r\n output.append(booking.toString() \r\n + \"\\n*******************************************************\\n\");\r\n }//End of if\r\n }// End of while\r\n }", "private static void queryBooksByPublisher(){\n\t\tSystem.out.println(\"===Query Books By Publisher===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter Publisher to Query Books by: \");\n\t\tString publisher = string_input.nextLine();\n\t\t\n\t\tif(ALL_PUBLISHERS.containsKey(publisher)){\n\t\t\tIterator<String> iter = ALL_PUBLISHERS.get(publisher).iterator();\n\t\t\tSystem.out.println(\"All books published by \" + publisher + \" are:\"); \n\t\t\tprintAllElements(iter);\n\t\t}\n\t\t\n\t\telse\n\t\t\tSystem.out.println(\"Sorry! There are no such publishers in our records!\");\n\t}", "private void loopAuthors(Book book) {\n for (String s : book.getAuthors()) {\n print(s);\n }\n }", "public static void printValues(HashMap<String, Book> hashmap) {\n for (Book book: hashmap.values()) {\n System.out.println(book);\n }\n }", "public static void main(String[] args) {\n\t\tList<Score> scores = Arrays.asList(\n\t\t\t\tnew Score(\"a\", 61, 71,71),\n\t\t\t\tnew Score(\"b\", 62, 72,82),\n\t\t\t\tnew Score(\"c\", 63, 74,55)\n\t\t\t\t);\n\t\t\n\t\tboolean result1 = scores.stream().anyMatch(x -> x.getMat() > 39);\n\t\tSystem.out.println(\"수학 과락이 아닌사람 T/F \" + result1);\n\t\t\n\t\tboolean result2 = scores.stream().allMatch(x -> x.getKor() > 39);\n\t\tSystem.out.println(\"국어 과락없나요\" + result2);\n\t\t\n\t\tboolean result3 = scores.stream().noneMatch(x -> x.getEng() > 39);\n\t\tSystem.out.println(\"영어 모두 과락?\" + result3);\n\t}", "public static void main(String[] args) {\n\t\tint a, b, c;\r\n\t\t\r\n\t\tfor(a = 1; a <= 20; a++) {\r\n\t\t\tfor(b = 1; b <= 20; b++) {\r\n\t\t\t\tfor(c = 1; c <= 20; c++) {\r\n\t\t\t\t\tif ( (c*c) == (a*a)+(b*b) && (a+b+c) <=20 )\r\n\t\t\t\t\t\tSystem.out.printf(\"%2d,%5d,%10d\\n\",a,b,c);\r\n\t\t\t\t} //%와 d사이에있는 2는 2칸 띄어쓰기 %d는 정수형\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tBook b1 = new Book(111, \"Hello Java\");\r\n\t\tBook b2 = new Book(111, \"Hello Java\");\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(b1 ==b2);\r\n\t\tSystem.out.println(b1.equals(b2));\r\n\t\tSystem.out.println(b1.hashCode());\r\n\t\tSystem.out.println(b2.hashCode());\r\n\t\t\t\r\n\t}", "private void printAvailableBooks() {\n\t\t\n\t}", "public void matchesDemo() \n {\n Map<String, Set<String>> clientMap = new HashMap<>();\n Set<String> interests = new HashSet<>();\n\n interests.add(\"Food\");\n interests.add(\"Wine\");\n interests.add(\"Tandems\");\n clientMap.put(\"Hal\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Walking\");\n interests.add(\"Welding\");\n clientMap.put(\"Gemma\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Cinema\");\n interests.add(\"Wine\");\n clientMap.put(\"Caroline\", interests);\n\n Set<String> halsInterests = clientMap.get(\"Hal\");\n String outputString;\n Set<String> eachClientInterests;\n Set<String> intersection;\n\n for (String eachClient : clientMap.keySet()) \n {\n eachClientInterests = clientMap.get(eachClient);\n intersection = new HashSet<>(halsInterests);\n intersection.retainAll(eachClientInterests);\n outputString = \"Hal and \" + eachClient \n + \" have common interests: \"\n + intersection;\n System.out.println(outputString) ;\n }\n }", "public static void main(String[] theArgs) {\n for (HashSet<String> set : findParens(new ArrayList<HashSet<String>>(), 3)) {\n for (String element : set) {\n System.out.print(element + \" \");\n }\n System.out.println();\n }\n }", "public void search() {\n while (!done) {\n num2 = mNums.get(cntr);\n num1 = mSum - num2;\n\n if (mKeys.contains(num1)) {\n System.out.printf(\"We found our pair!...%d and %d\\n\\n\",num1,num2);\n done = true;\n } //end if\n\n mKeys.add(num2);\n cntr++;\n\n if (cntr > mNums.size()) {\n System.out.println(\"Unable to find a matching pair of Integers. Sorry :(\\n\");\n done = true;\n }\n } //end while\n }", "public void searchYear()\r\n\t{\r\n\r\n\t\tSystem.out.print(\"Please provide a year: \");\r\n\t\tint year = scan.nextInt();\r\n\t\tboolean display = false;\r\n\t\tboolean found = false;\r\n\t\tfor (int i = 0; i < actualSize; i++)\r\n\t\t{\r\n\r\n\t\t\tif (year == data[i].getYear())\r\n\t\t\t{\r\n\t\t\t\tif (display == false)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Title\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\" + \"Year\\t\" + \"rating\\t\" + \"score\");\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(data[i].toString());\r\n\t\t\t\tdisplay = true;\r\n\t\t\t\tfound = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif (found == false)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The year does not match any of the movies.\");\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tint count=0;\n String[] ab= {\"A\", \"B\", \"B\", \"F\", \"A\"};\n \n for(int i=0; i<ab.length;i++){\n\t for(int j=0;j<ab.length;j++){\n\t\t if(ab[i]==ab[j]){\n\t\t\t count++;\n\t\t\t \n\t\t\t if(count==2){\n\t\t\t\t System.out.println(ab[i]);\n\t\t\t\t count= --count-1;\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t }\n\t }\n }\n\t}", "public void addMultipleBook() {\n Set set = new TreeSet();\n System.out.println(\" yours choice how many addressbook you want to create it:--\");\n int number = scanner.nextInt();\n\n for (int index = 1; index <= number; index++) {\n System.out.println(\"give name to your dictionary:--\");\n String name = scanner.next();\n set.add(name);\n }\n System.out.println(set);\n }", "public void getSubject() {\n System.out.println(\"give any Subject: \");\n String subject = input.next();\n for (Card s: cards) {\n if (s.subjectOfBook.equals(subject)) {\n System.out.println(s.titleOfBook + \" \" + s.autherOfBook + \" \" + s.subjectOfBook);\n } \n }\n System.out.println(\"not Found\");\n }", "public static ArrayList<Book> search(String title, ArrayList<String> authors, String isbn, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, authors, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer)\n if(b.getBookIsbn().equals(isbn) || isbn.equals(\"*\"))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "public static void main(String[] args) {\r\n\t\tint x[] = { 1, 2, 5, 8, 10, 7 };\r\n\t\tint y[] = { 3, 5, 9, 10, 9 };\r\n\t\tfor (int i = 0; i < x.length; i++) {\r\n\t\t\tfor (int j = 0; j < y.length; j++) {\r\n\t\t\t\tif (x[i] == y[j]) {\r\n\t\t\t\t\tSystem.out.println(x[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public static void main(String... args) {\n\n Set<Long> As = new HashSet<>();\n int N = 100;\n for (long p = -N; p <= N; ++p) {\n for (long q = -N; q <= p; ++q) {\n for (long r = -N; r <= q; ++r) {\n if (r==0 || p==0 || q==0)\n continue;\n\n long nom = r*p*q;\n long den = r*p + r*q + p*q;\n\n if (den != 0 && nom % den==0 && (nom^den)>=0) {\n long A = nom/den;\n\n if (A==nom) {\n As.add(A);\n System.out.printf(\"A=%d (p=%d, q=%d, r=%d)\\n\", A, p, q, r);\n }\n }\n }\n }\n }\n Long[] aa = As.toArray(new Long[As.size()]);\n Arrays.sort(aa);\n System.out.printf(\"============\\n\");\n System.out.printf(\"A(%d)=%s\\n\", aa.length, Arrays.toString(aa));\n\n for (long a = 1; a < 100; ++a) {\n if (isAlexandrian(a))\n System.out.printf(\"A=%dn\", a);\n }\n }", "protected static void searchByKeysHashIDYear(String keys, String myId, int lowerYear, int upperYear) {\n System.out.println(\"in hasher for keys and id and year\");\n System.out.println(\"lowerYear: \" + lowerYear);\n System.out.println(\"upperYear: \" + upperYear);\n String[] splitWords = new String[keys.split(\"[ ]+\").length];\n splitWords = keys.split(\"[ ]+\");\n System.out.println(splitWords[0]);\n for (String keyWord : splitWords) {\n keyWord = keyWord.toLowerCase();\n if (map.get(keyWord) != null) {\n ArrayList<Integer> allInstancesofWord = (ArrayList<Integer>) map.get(keyWord);\n {\n for (int i = 0; i < allInstancesofWord.size(); i++) {\n\n Product e = productList.get(allInstancesofWord.get(i));\n if (e.productIdMatch(myId) && e.productYearMatch(lowerYear, upperYear)) // if an element has the desired id and it has the correct key terms. it is printed.\n {\n System.out.println(\"Printing keys id and year\");\n ProductGUI.Display(\"\\n\");\n System.out.println(productList.get(allInstancesofWord.get(i)));\n ProductGUI.Display((e.toString() + \"\\n\"));\n }\n }\n }\n }\n if (map.get(keyWord) == null) {\n System.out.println(\"The products you are searching for were not found\");\n }\n }\n\n }", "void printAssociations(HashMap<BitSet, Integer> allAssociations){\n try{\n boolean firstLine = true;\n FileWriter fw = new FileWriter(this.outputFilePath);\n \n for(Map.Entry<BitSet, Integer> entry : allAssociations.entrySet()){\n BitSet bs = entry.getKey();\n if(firstLine)\n firstLine = false;\n else\n fw.write(\"\\n\");\n \n for(int i=0; i<bs.length() ; i++){\n if(bs.get(i))\n fw.write(intToStrItem.get(frequentItemListSetLenOne.get(i).getKey())+\" \");\n }\n\n fw.write(\"(\" + entry.getValue() +\")\");\n }\n \n fw.close();\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }", "public void printMap() {\n Set<String> manufacturers = cars.keySet();\n\n for (String manufacturer : cars.keySet()) {\n System.out.println(String.format(\"The following %s models are in stock: \", manufacturer));\n System.out.println(cars.get(manufacturer));\n\n }\n }", "private void printAnswerResults(){\n\t\tSystem.out.print(\"\\nCorrect Answer Set: \" + q.getCorrectAnswers().toString());\n\t\tSystem.out.print(\"\\nCorrect Answers: \"+correctAnswers+\n\t\t\t\t\t\t \"\\nWrong Answers: \"+wrongAnswers);\n\t}", "public String searchByMaterial(String string, ArrayList<String> materiallist, int count, Set<String> keys, Collection<String> values, Map<String, String> dataTable1) {\nfor(String s:materiallist) {\r\n\t\t\t\r\n\t\t\tif (string.equals(s)) {\r\n\t\t\t//\tSystem.out.print(s);\r\n\t\t\t\tcount--;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t\t}\r\nSystem.out.println(\"A List of Home that matches the Material \"+string+\":\");\r\n\r\nfor(String k: keys) {\r\n\t\r\n\tarraytoprintkey=k.split(\"_\");\r\n\r\n\r\n\t\r\n\t\tif(arraytoprintkey[1].equals(string)) {\r\n\t\t\t\r\n\t\t\t\tSystem.out.print(k);\r\n\t\t\t\tSystem.out.println(\" \"+dataTable1.get(k));\r\n\t\t\t\t\r\n\t\t}\r\n\r\n\t\t\r\n}\r\nSystem.out.println();\r\n\t\tif(count==0) {\r\n\t\t\treturn string;\r\n\t\t}\r\n\t\t\t\r\n\t\treturn null;\r\n\t}", "public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t/*80\r\n\t\tint matches = 3162;\r\n\t\tint results = 1218;\r\n\t\tint pairs = 146;\r\n\t\t*/\r\n\t\t//70\r\n\t\t/*int matches = 3302;\r\n\t\tint results = 909;\r\n\t\tint pairs = 59;*/\r\n\r\n\t\tfor(int i=1;i<=10;i++)\r\n\t\t{\r\n\t\t\tdouble b = (0.1*i)*((matches*3)+(results*3)+(pairs*3));\r\n\t\t\tSystem.out.print(Math.round(b)+\",\");\r\n\t\t}\t\r\n\t\r\n\t}", "public String searchByFilter() {\n if (selectedFilter.size() != 0) {\n for (Genre filterOption : selectedFilter) {\n searchTerm = searchResultTerm;\n searchBook();\n\n System.out.println(\"CURRENT NUMBER OF BOOKS: \" + books.size());\n\n BookCollection temp = this.db.getCollectionByGenre(filterOption);\n System.out.println(\"GETTING COLLECTION FOR FILTERING: \" + temp.getCollectionName() + \" NUM OF BOOKS: \"\n + temp.getCollectionBooks().size());\n filterBookList(temp.getCollectionBooks());\n System.out.println(\"UPDATED NUMBER OF BOOKS: \" + books.size());\n }\n } else {\n searchTerm = searchResultTerm;\n searchBook();\n }\n\n return \"list.xhtml?faces-redirect=true\";\n }", "public static void seqfilter(ArrayList<String> x, ArrayList<String> y, ArrayList<String> z, JTextArea ta) {\n\t\tfor (int i=0; i<x.size(); i++)\n\t\t{\n\t\t\tfor (int j=0; j<y.size(); j++)\n\t\t\t{\n\t\t\t\tif (x.get(i).equals(y.get(j)))\n\t\t\t\t{\n\t\t\t\t\tz.add(x.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//This is the loop to print all the items of the results array list\n\t\tta.setText(\"< \");\n\t\tfor (int i=0; i<z.size(); i++)\n\t\t{\n\t\t\tta.append(z.get(i)+\" \");\n\t\t}\n\t\tta.append(\">\");\n\t}", "public void listBooks() {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price FROM books\";\n\n try (Connection conn = this.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public void getATitle() {\n System.out.println(\"Give any title: \");\n String key = input.next();\n for (Card s: cards) {\n if (s.titleOfBook.equals(key)) {\n System.out.println(s.titleOfBook + \" \" + s.autherOfBook + \" \" + s.subjectOfBook);\n } \n }\n System.out.println(\"not Found\");\n }", "public void sensibleMatches2() \n { \n Map<String, Set<String>> clientMap = new HashMap<>();\n Set<String> interests = new HashSet<>();\n\n interests.add(\"Food\");\n interests.add(\"Wine\");\n interests.add(\"Tandems\");\n clientMap.put(\"Hal\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Walking\");\n interests.add(\"Welding\");\n clientMap.put(\"Gemma\", interests);\n\n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Cinema\");\n interests.add(\"Wine\");\n clientMap.put(\"Caroline\", interests);\n\n Set<String> halsInterests = clientMap.get(\"Hal\");\n String outputString;\n Set<String> eachClientInterests;\n Set<String> intersection ;\n\n for (String eachClient : clientMap.keySet()) \n {\n if (!eachClient.equals(\"Hal\")) \n {\n eachClientInterests = clientMap.get(eachClient);\n intersection = new HashSet<>(halsInterests);\n intersection.retainAll(eachClientInterests);\n outputString = \"Hal and \" + eachClient \n + \" have common interests: \"\n + intersection;\n System.out.println(outputString);\n }\n }\n }", "private void enterAll() {\n\n String sku = \"Java1001\";\n Book book1 = new Book(\"Head First Java\", \"Kathy Sierra and Bert Bates\", \"Easy to read Java workbook\", 47.50, true);\n bookDB.put(sku, book1);\n\n sku = \"Java1002\";\n Book book2 = new Book(\"Thinking in Java\", \"Bruce Eckel\", \"Details about Java under the hood.\", 20.00, true);\n bookDB.put(sku, book2);\n\n sku = \"Orcl1003\";\n Book book3 = new Book(\"OCP: Oracle Certified Professional Jave SE\", \"Jeanne Boyarsky\", \"Everything you need to know in one place\", 45.00, true);\n bookDB.put(sku, book3);\n\n sku = \"Python1004\";\n Book book4 = new Book(\"Automate the Boring Stuff with Python\", \"Al Sweigart\", \"Fun with Python\", 10.50, true);\n bookDB.put(sku, book4);\n\n sku = \"Zombie1005\";\n Book book5 = new Book(\"The Maker's Guide to the Zombie Apocalypse\", \"Simon Monk\", \"Defend Your Base with Simple Circuits, Arduino and Raspberry Pi\", 16.50, false);\n bookDB.put(sku, book5);\n\n sku = \"Rasp1006\";\n Book book6 = new Book(\"Raspberry Pi Projects for the Evil Genius\", \"Donald Norris\", \"A dozen friendly fun projects for the Raspberry Pi!\", 14.75, true);\n bookDB.put(sku, book6);\n }", "public static void printAll() {\n // Print all the data in the hashtable\n RocksIterator iter = db.newIterator();\n\n for (iter.seekToFirst(); iter.isValid(); iter.next()) {\n System.out.println(new String(iter.key()) + \"\\t=\\t\" + ByteIntUtilities.convertByteArrayToDouble(iter.value()));\n }\n\n iter.close();\n }", "public void showAllSchedulesFiltered(ArrayList<Scheduler> schedulesToPrint) {\n ArrayList<String> filters = new ArrayList<>();\n while (yesNoQuestion(\"Would you like to filter for another class?\")) {\n System.out.println(\"What is the Base name of the class you want to filter for \"\n + \"(eg. CPSC 210, NOT CPSC 210 201)\");\n filters.add(scanner.nextLine());\n }\n for (int i = 0; i < schedulesToPrint.size(); i++) {\n for (String s : filters) {\n if (Arrays.stream(schedulesToPrint.get(i).getCoursesInSchedule()).anyMatch(s::equals)) {\n System.out.println(\" ____ \" + (i + 1) + \":\");\n printSchedule(schedulesToPrint.get(i));\n System.out.println(\" ____ \");\n }\n }\n }\n }", "public String advancedSearchBooks() {\r\n List<Books> books = new ArrayList<Books>();\r\n keywords = keywords.trim();\r\n \r\n switch (searchBy) {\r\n case \"all\":\r\n return searchBooks();\r\n case \"title\":\r\n books = findBooksByTitle(keywords);\r\n break;\r\n case \"identifier\":\r\n books = findBooksByIdentifier(keywords);\r\n break;\r\n case \"contributor\":\r\n books = findBooksByContributor(keywords);\r\n break;\r\n case \"publisher\":\r\n books = findBooksByPublisher(keywords);\r\n break;\r\n case \"year\":\r\n books = findBooksByYear(keywords);\r\n break;\r\n case \"genre\":\r\n books = findBooksByGenre(keywords);\r\n break;\r\n case \"format\":\r\n books = findBooksByFormat(keywords);\r\n break;\r\n }\r\n clearFields();\r\n\r\n if (books == null || books.isEmpty()) {\r\n books = new ArrayList<Books>();\r\n }\r\n\r\n return displayBooks(books);\r\n }", "public static void main(String[] args) {\n\t\tList l=new ArrayList();\r\n\t\tl.add(12);\r\n\t\tl.add(45);\r\n\t\tl.add(15);\r\n\t\tl.add(78);\r\n\t\t\r\n\t\tList l2=new ArrayList();\r\n\t\tl2.add(12);\r\n\t\tl2.add(45);\r\n\t\tl2.add(10);\r\n\t\tl2.add(78);\r\n\t\t\r\n\t\tBoolean m=l.containsAll(l2);\r\n\t\t\r\n\t\tif(m)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Elements are same\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Not equal\");\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n Inventory inventory = new Inventory();\n initializeInventory(inventory);\n\n GuitarSpec test = \n new GuitarSpec(\"b\", \"b\", \"b\", \"b\");\n List matchingGuitars = inventory.search(test);\n if (!matchingGuitars.isEmpty()) {\n System.out.println(\"搜索结果----\");\n for (Iterator i = matchingGuitars.iterator(); i.hasNext(); ) {\n Guitar guitar = (Guitar)i.next();\n GuitarSpec spec = guitar.getSpec();\n System.out.println(\"你搜索的这款吉他:品牌为\" +spec.getBuilder() + \"--型号为\" + spec.getModel() + \"--类型为\" +\n spec.getType() + \"--材质为\" +spec.getWood() + \"--价格为¥\" +\n guitar.getPrice()+\"--ID为\"+guitar.getID());\n }\n } else {\n System.out.println(\"Sorry, 我们没有这一款吉他.\");\n }\n }", "public String toString(){\n\t\treturn name + \": \" + books + \" books checked out\";\n\t}", "public static void main(String[] args) {\n\t\tint[] a={1,2,3,4,5};\r\n\t\tint[] b={2,3,7,8,9,4,5};\r\n\t\tfor(int i=0;i<a.length;i++){\r\n\t\t\tfor(int j=0;j<b.length;j++){\r\n\t\t\t\tif(a[i]==b[j])\r\n\t\t\t\t\tSystem.out.println(b[j]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private boolean Equals(ArrayList<Integer> list) {\n f = list.get(0);\n o = list.get(1);\n r = list.get(2);\n t = list.get(3);\n y = list.get(4);\n s = list.get(5);\n i = list.get(6);\n x = list.get(7);\n e = list.get(8);\n n = list.get(9);\n // Y is in 1's place, T in 10's, R in 100's, O in 1000's place and finally F in 10000's place. assign these\n // values approprately for each number.\n FORTY = (f * 10000 + o * 1000 + r * 100 + t * 10 + y * 1);\n SIXTY = (s * 10000 + i * 1000 + x * 100 + t * 10 + y * 1);\n TEN = (t * 100 + e * 10 + n * 1);\n int sum = FORTY + TEN + TEN;\n\n // if our values match up correctly, then we will show the values of each.\n if (sum == SIXTY) {\n System.out.printf(\"Forty: %d,\\nTen: %d,\\nSixty: %d\\n\", FORTY, TEN, SIXTY);\n System.out.printf(\"The values of each letters are as follows:\\nF = %d,\\nO = %d,\\nR = %d,\\nT = %d,\\nY = %d,\\n\" +\n \"S = %d,\\nI = %d,\\nX = %d,\\nE = %d,\\nand N = %d.\", f, o, r, t, y, s, i, x, e, n);\n return true;\n }\n return false;\n }", "public static void main(String[] args) {\r\n\t\tCard aceHearts = new Card(\"Ace\", \"Hearts\", 14);\r\n\t\tSystem.out.println(aceHearts.rank());\r\n\t\tSystem.out.println(aceHearts.suit());\r\n\t\tSystem.out.println(aceHearts.pointValue());\r\n\t\tSystem.out.println(aceHearts.toString());\r\n\t\tCard tenDiamonds = new Card(\"Ten\", \"Diamonds\", 10);\r\n\t\tSystem.out.println(tenDiamonds.rank());\r\n\t\tSystem.out.println(tenDiamonds.suit());\r\n\t\tSystem.out.println(tenDiamonds.pointValue());\r\n\t\tSystem.out.println(tenDiamonds.toString());\r\n\t\tCard fiveSpades = new Card(\"Five\", \"Spades\", 5);\r\n\t\tSystem.out.println(fiveSpades.rank());\r\n\t\tSystem.out.println(fiveSpades.suit());\r\n\t\tSystem.out.println(fiveSpades.pointValue());\r\n\t\tSystem.out.println(fiveSpades.toString());\r\n\t\tSystem.out.println(aceHearts.matches(tenDiamonds));\r\n\t\tSystem.out.println(aceHearts.matches(fiveSpades));\r\n\t\tSystem.out.println(aceHearts.matches(aceHearts));\r\n\t\tSystem.out.println(tenDiamonds.matches(fiveSpades));\r\n\t\tSystem.out.println(tenDiamonds.matches(aceHearts));\r\n\t\tSystem.out.println(tenDiamonds.matches(tenDiamonds));\r\n\t\tSystem.out.println(fiveSpades.matches(aceHearts));\r\n\t\tSystem.out.println(fiveSpades.matches(tenDiamonds));\r\n\t\tSystem.out.println(fiveSpades.matches(fiveSpades));\r\n\t}", "public static void main(String[] args) {\n Map<Integer, Integer> map = new HashMap();\n for (int i = 0; i < 5; i++) {\n int j = nextInt();\n map.put(j, map.getOrDefault(j, 0)+1);\n }\n if (map.size() != 2) {\n out.println(\"No\");\n } else {\n if (map.values().stream().sorted().collect(Collectors.toList()).equals(List.of(2, 3))) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }\n\n out.flush();\n }", "public void showGenre(Genre genre) {\n for (Record r : cataloue) {\n if (r.getGenre() == genre) {\n System.out.println(r);\n }\n }\n\n }", "private void displayStudentByName(String name) {\n\n int falg = 0;\n\n for (Student student : studentDatabase) {\n\n if (student.getName().equals(name)) {\n\n stdOut.println(student.toString());\n\n falg = 1;\n\n break;\n }\n }\n\n if (falg == 0) {\n\n stdOut.println(\"cannot find student\\n\");\n }\n }", "protected static void searchByYear(int yearLow, int yearHigh) {\n for (Product element : productList) {\n System.out.println(\"lowerYear: \" + yearLow);\n System.out.println(\"upperYear: \" + yearHigh);\n if (element.productYearMatch(yearLow, yearHigh)) // if product years match, the product will be printed\n {\n System.out.println(\"\");\n ProductGUI.Display(\"\\n\");\n System.out.println(element);\n ProductGUI.Display(element.toString());\n }\n }\n }", "public static void printMatches(ArrayList<Glootie> aliens, Glootie g) {\r\n\t\tSystem.out.println(\"Matches for \"+ g);\r\n\t\tArrayList<Glootie> gMatches = findMatches(g,aliens);\r\n\t\tif(gMatches.size() < 10) {\r\n\t\t\tSystem.out.println(gMatches);\r\n\t\t}else {\r\n\t\t\tSystem.out.println(gMatches.size() + \" matches is too many to print\");\r\n\t\t}\r\n\r\n\t}", "public static void printBooksInTable(List<Book> books) {\r\n\r\n String format = \"%-17s %-45s %-15s %-30s %-12s %-10s %-8s %-8s \\n\";\r\n String formatTable = \"%-17s %-45s %-15s %-25s %9s %13d %9d %9.2f \\n\";\r\n System.out.format(format, \"AUTHOR\", \"TITLE\", \"GENRE\", \"SERIES\", \"PART\", \"PAGES\", \"YEAR\", \"PRICE\");\r\n System.out.println(\"-----------------------------------------------------------------------------------------------------------------------------------------------------\");\r\n\r\n for (Book book : books) {\r\n System.out.format(formatTable, book.getAuthor(), book.getTitle(), book.getGenre(), book.getSeries(), book.getPartNumber(), book.getPagesQuantity(), book.getYearPublished(), book.getPrice());\r\n System.out.println(\"-----------------------------------------------------------------------------------------------------------------------------------------------------\");\r\n }\r\n\r\n }", "private static void print_Assignment(Gradebook gradebook, String[] flags) {\n //sort grades highest to lowest\n if (flags[3] != null && flags[3].equals(\"G\")) {\n List<Student> studentList = gradebook.getAllStudents();\n Map<Integer, Set<Student>> gradeToName = new HashMap<Integer, Set<Student>>();\n Set<Integer> grades = new HashSet<Integer>();\n\n for(Student s : studentList){\n Assignment assign = gradebook.getAssignment(flags[0]);\n Map<Assignment, Integer> gradeMap = gradebook.getStudentGrades(s);\n Integer grade = gradeMap.get(assign);\n\n Set<Student> studs = gradeToName.get(grade);\n if(studs == null){\n\n studs = new HashSet<Student>();\n }\n\n studs.add(s);\n gradeToName.put(grade, studs);\n grades.add(grade);\n }\n\n List<Integer> sortedList = new ArrayList<Integer>(grades);\n Collections.sort(sortedList, Collections.reverseOrder());\n\n for(Integer i : sortedList){\n Set<Student> studs = gradeToName.get(i);\n for(Student s : studs)\n System.out.println(\"(\" + s.getLast() + \", \" + s.getFirst() + \", \" + i + \")\");\n }\n\n // sort display aplhabetically\n } else if (flags[4] != null && flags[4].equals(\"A\")){\n //compare override class at bottom of file\n List<Student> studentsAlpha = gradebook.getAllStudents();\n Collections.sort(studentsAlpha, new Comparator<Student>() {\n @Override\n public int compare(Student o1, Student o2) {\n if ( o2.getLast().compareToIgnoreCase(o1.getLast()) == 0) {\n return o1.getFirst().compareToIgnoreCase(o2.getFirst());\n } else {\n return o1.getLast().compareToIgnoreCase(o2.getLast());\n }\n }\n });\n\n for (Student stud: studentsAlpha) {\n // flags[0] should be assign name\n System.out.println(\"(\" + stud.getLast() + \", \" + stud.getFirst() + \", \" + gradebook.getPointsAssignment(stud, gradebook.getAssignment(flags[0])) + \")\");\n }\n\n } else {\n throw new IllegalArgumentException(\"Please specify if you want the display to be alphabetical or by grades highest to lowest.\");\n }\n return;\n }", "public static void main(String[] args) {\n // for testing, add books and find book using it's name\n /* Library.books.add(book1);\n Library.books.add(book2);\n Library.books.add(book3);\n System.out.println(\"Enter namer for Book:\");\n String bookName = sc.nextLine();\n \n for (int i = 0; i <3 ; i++) {\n\n if (Library.books.get(i).getName().equalsIgnoreCase(bookName)) {\n \n System.out.println(books.get(i).getName());\n System.out.println(i);\n }\n }*/\n \n do{\n choicesInMenu(menu());\n } while (goOn);\n //Library.addBook();\n //Library.showAllBooks();\n\n }", "public static void main(String[] args) {\n Set<String> mySet = new HashSet<String>(100,50);\n mySet.add(\"APPLE\");\n mySet.add(\"LG\");\n mySet.add(\"HTTC\");\n mySet.add(\"APPLE\");\n mySet.add(\"SAMSUNG\");\n Iterator<String> iterator = mySet.iterator();\n while (iterator.hasNext()){\n System.out.println(iterator.next());\n }\n\n\n\n }", "private static void print_Final(Gradebook gradebook, String[] flags){\n if (flags[3] != null && flags[3].equals(\"G\")){\n List<Student> studentsList = gradebook.getAllStudents();\n //Map<Student, Double>\n Map<Double, List<Student>> grades = new HashMap<Double, List<Student>>();\n Set<Double> gradeSet = new HashSet<Double>();\n\n for(Student s : studentsList){\n double grade = gradebook.getGradeStudent(s);\n List<Student> studs = grades.get(grade);\n\n if(studs == null){\n studs = new ArrayList<Student>();\n }\n\n studs.add(s);\n grades.put(grade, studs);\n gradeSet.add(grade);\n }\n\n List<Double> gradeList = new ArrayList<Double>(gradeSet);\n Collections.sort(gradeList, Collections.reverseOrder());\n\n DecimalFormat df = new DecimalFormat(\"#.####\"); //Round to 4 decimal places\n df.setRoundingMode(RoundingMode.HALF_UP);\n for(Double d : gradeList){\n\n List<Student> studs = grades.get(d);\n for(Student s : studs){\n\n System.out.println(\"(\" + s.getLast() + \", \" + s.getFirst() + \", \" + df.format(d) + \")\");\n }\n }\n } else if (flags[4] != null && flags[4].equals(\"A\")){\n //compare override class at bottom of file\n List<Student> studentsAlpha = gradebook.getAllStudents();\n Collections.sort(studentsAlpha, new Comparator<Student>() {\n @Override\n public int compare(Student o1, Student o2) {\n if ( o2.getLast().compareToIgnoreCase(o1.getLast()) == 0) {\n return o1.getFirst().compareToIgnoreCase(o2.getFirst());\n } else {\n return o1.getLast().compareToIgnoreCase(o2.getLast());\n }\n }\n });\n\n DecimalFormat df = new DecimalFormat(\"#.####\"); //Round to 4 decimal places\n df.setRoundingMode(RoundingMode.HALF_UP);\n for (Student stud: studentsAlpha) {\n System.out.println(\"(\" + stud.getLast() + \", \" + stud.getFirst() + \", \" + df.format(gradebook.getGradeStudent(stud)) + \")\");\n }\n\n }\n else{\n throw new IllegalArgumentException(\"Grade or Alphabetical flag missing.\");\n }\n return;\n }", "public static void main(String[] args) {\n\t\tHashMap<Price,String> hm = new HashMap<Price,String>();\n\t\tPrice p1 = new Price(100,\"mango\");\n\t\tPrice p2 = new Price(200,\"apple\");\n\t\tPrice p3 = new Price(500,\"custard\");\n\t\tPrice p4 = new Price(700,\"grapes\");\n\t\thm.put(p1, \"mango\"); // key cannot accept duplicate keys so inserting price as a key\n\t\thm.put(p2, \"apple\");\n\t\thm.put(p3, \"custard\");\n\t\thm.put(p4, \"grapes\");\n\t\tPrice p5 = new Price(200,\"apple\");\n\t\thm.put(p5, \"apple\");\n\t\tSet set1 = hm.keySet();\n\t\tSystem.out.println(set1);\n\t\tCollection c = hm.values();\n\t\t\n\t\tfor(Map.Entry<Price, String> map : hm.entrySet()){\n\t\t\tPrice key =map.getKey();\n\t\t\tString value = map.getValue();\n\t\t\tSystem.out.println(key+\" \"+value);\n\t\t}\n\t}", "public void listBooks() {\n for (int g = 0; g < books.length; g++) {\n books[g].toString();\n }\n// List all books in Bookstore\n }", "public static ArrayList<Book> search(String title, ArrayList<String> authors, String isbn, String publisher, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, authors, isbn, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer)\n if(b.getBookPublisher().equals(publisher) || publisher.equals(\"*\"))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "public static void main(String[] args) {\n\t\tList <String> color = new ArrayList<String>(5);\r\n\t\tcolor.add(\"Red\");\r\n\t\tcolor.add(\"Green\");\r\n\t\tcolor.add(\"Orange\");\r\n\t\tcolor.add(\"white\");\r\n\t\tcolor.add(\"black\");\r\n\t\t\r\n\t\tList<String>color2 =new ArrayList<String>(5);\r\n\t\tcolor2.add(\"red\");\r\n\t\tcolor2.add(\"Green\");\r\n\t\tcolor2.add(\"orange\");\r\n\t\tcolor2.add(\"White\");\r\n\t\tcolor2.add(\"Black\");\r\n\t\t\r\n\t\tArrayList<String>color3 = new ArrayList<String>();\r\n\t\t\tfor(String temp:color)\r\n\t\t\t\tcolor3.add(color2.contains(temp)? \"Yes\" : \"No\");\r\n\t\t\tSystem.out.println(color3);\r\n\t}", "public void searchByArtist()\n {\n String input = JOptionPane.showInputDialog(null,\"Enter the artist you'd like to search for:\");\n input = input.replaceAll(\" \", \"_\").toUpperCase(); //standardize output.\n \n Collections.sort(catalog, new ArtistComparator());\n int index = Collections.binarySearch(catalog, \n new Album(input,\"\",null), new ArtistComparator());\n //Since an artist could be listed multiple times, there is *no guarantee*\n //which artist index we find. So, we have to look at the artists\n //left and right of the initial match until we stop matching.\n if(index >= 0)\n {\n Album initial = catalog.get(index);\n String artist = initial.getArtist();\n \n ArrayList<Album> foundAlbums = new ArrayList<>();\n //this ArrayList will have only the albums of our found artist \n foundAlbums.add(initial);\n try { \n int j = index, k = index;\n while(artist.equalsIgnoreCase(catalog.get(j+1).getArtist()))\n {\n foundAlbums.add(catalog.get(j+1));\n j++;\n }\n while(artist.equalsIgnoreCase(catalog.get(k-1).getArtist()))\n {\n foundAlbums.add(catalog.get(k-1));\n k--;\n }\n }\n catch(IndexOutOfBoundsException e) {\n //happens on the last round of the while-loop test expressions\n //don't do anyhting because now we need to print out our albums.\n }\n System.out.print(\"Artist: \" + artist + \"\\nAlbums: \");\n for(Album a : foundAlbums)\n System.out.print(a.getAlbum() + \"\\n\\t\");\n System.out.println();\n }\n else System.err.println(\"Artist '\" + input + \"' not found!\\n\"); \n }", "public static ArrayList<Book> search(String title, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: purchasedBooks.keySet())\n if(b.getBookName().equals(title) || title.equals(\"*\"))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "public void exercise() {\n List<Transaction> ex1 = transactions.stream()\n .filter(transaction -> transaction.getYear() == 2011)\n .sorted(Comparator.comparing(Transaction::getValue))\n .collect(Collectors.toList());\n System.out.println(ex1);\n\n //2 What are all the unique cities where the traders work?\n List<String> ex2 = transactions.stream()\n .map(transaction -> transaction.getTrader().getCity())\n .distinct()\n .collect(Collectors.toList());\n System.out.println(ex2);\n\n //alternative solution\n Set<String> ex2alt = transactions.stream()\n .map(transaction -> transaction.getTrader().getCity())\n .collect(Collectors.toSet());\n\n //3 Find all traders from Cambridge and sort them by name.\n List<Trader> ex3 = transactions.stream()\n .map(Transaction::getTrader)\n .distinct()\n .filter(trader -> trader.getCity() == \"Cambridge\")\n .sorted(Comparator.comparing(Trader::getName))\n .collect(Collectors.toList());\n System.out.println(ex3);\n\n //4 Return a string of all traders’ names sorted alphabetically.\n String ex4 = transactions.stream()\n .map(transaction -> transaction.getTrader().getName())\n .distinct()\n .sorted()\n .reduce(\"\", (n1, n2) -> n1 + n2);\n System.out.println(ex4);\n\n //alternative solution\n String ex4Alt = transactions.stream()\n .map(transaction -> transaction.getTrader().getName())\n .distinct()\n .sorted()\n .collect(Collectors.joining());\n System.out.println(ex4Alt);\n\n //5 Are any traders based in Milan?\n Boolean ex5 = transactions.stream()\n .anyMatch(transaction -> transaction.getTrader().getCity().equals(\"Milan\"));\n System.out.println(ex5);\n\n //6 Print the values of all transactions from the traders living in Cambridge.\n transactions.stream()\n .filter(transaction -> transaction.getTrader().getCity().equals(\"Cambridge\"))\n .forEach(System.out::println);\n\n //7 What’s the highest value of all the transactions?\n Optional<Integer> ex7 = transactions.stream()\n .map(Transaction::getValue)\n .reduce(Integer::max);\n System.out.println(ex7);\n\n //8 Find the transaction with the smallest value.\n Optional<Transaction> ex8 = transactions.stream()\n .reduce((t1, t2) -> t1.getValue() < t2.getValue() ? t1 : t2);\n System.out.println(ex8);\n\n //alternative solution\n Optional<Transaction> ex8Alt = transactions.stream()\n .min(Comparator.comparing(Transaction::getValue));\n System.out.println(ex8Alt);\n\n }", "private void displayScholarshipByName(String name) {\n\n int falg = 0;\n\n stdOut.println(name + \"\\n\");\n\n for (Scholarship scholarship : scholarshipDatabase) {\n\n stdOut.println(scholarship.getName() + \"\\n\");\n\n if (scholarship.getName().equals(name)) {\n\n stdOut.println(scholarship.toString());\n\n falg = 1;\n\n break;\n }\n }\n\n if (falg == 0) {\n\n stdOut.println(\"cannot find scholarship\\n\");\n\n }\n }", "private void searchBooks(String callNumber, String[] keywords,int startYear, int endYear) {\n\t\t/* Loop to sequentially search master list 'Reference' */\n\t\tfor (int i = 0; i < items.size(); i++)\n\t\t\tif ((callNumber.equals(\"\") || items.get(i).getCallNumber()\n\t\t\t\t\t.equalsIgnoreCase(callNumber))\n\t\t\t\t\t&& (keywords == null || matchedKeywords(keywords, items\n\t\t\t\t\t\t\t.get(i).getTitle()))\n\t\t\t\t\t&& (items.get(i).getYear() >= startYear && items.get(i)\n\t\t\t\t\t\t\t.getYear() <= endYear)) {\n\t\t\t\tReference ref = items.get(i);\n\t\t\t\t/* Checks if reference is of a 'Book' type */\n\t\t\t\tif (ref instanceof Book) {\n\t\t\t\t\tBook book = (Book) ref;\n\t\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\t\tSystem.out.println(book.toString());\n\t\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\t}\n\n\t\t\t}\n\t}", "public String toString() {\r\n return books.toString();\r\n }", "public static void main(String[] args) {\n\t\tMap<String,Double> items = new HashMap<>();\r\n\t\t\r\n\t\titems.put(\"Toaster\",350.00);\t\t//inits elements into map [STRING == KEY; DOUBLE == VALUE]\r\n\t\titems.put(\"Dongle\", 5.99);\r\n\t\titems.put(\"Sham Wow\", 19.99);\r\n\t\titems.put(\"Flex Seal\",19.99);\r\n\t\t\r\n\t\tSet<String> setOKeys = items.keySet();\r\n\t\tint count = 0;\r\n\t\tfor(String key : items.keySet()){\r\n\t\t\tSystem.out.print(++count + \") \" + key + \": $\" /*+ items.get(key)USED IN NORMAL FORMAT; NEEDED TO UPDATE FOR 2 DECI POINTS see below*/);\r\n\t\t\tSystem.out.printf(\"%.2f\\n\", items.get(key));\t//printf; decimal format to help\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(items.containsKey(\"Sham Wow\"));\r\n\t\tSystem.out.println(items.containsValue(19.99));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t//ANIMAL BOOK HASH MAP EXAMPLE\r\n\t\tMap<String, Integer> ani = new HashMap<>();\r\n\t\tani.put(\"Toucan\", 40);\r\n\t\tani.put(\"Lizard\", 7);\t\t\t//Stored by Integer value\r\n\t\tani.put(\"Wallaby\", 18);\r\n\t\t\r\n\t\tSystem.out.println(ani.get(\"Lizard\"));\r\n\t\t\r\n\t\tani.remove(\"Toucan\");\r\n\t\t\r\n\t\tSystem.out.println(ani); //toString Method is in the collections class automatically\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t//TREE MAP\r\n\t\tSet<Character> letters = new TreeSet<>(); //LINKEDHASHSET will be unordered\r\n\t\tletters.add('b');\r\n\t\tletters.add('c');\r\n\t\tletters.add('a');\r\n\t\tletters.add('c');\t\t//duplicate REMOVED automatically\r\n\t\t\r\n\t\tSystem.out.println(letters);\r\n\t\t\r\n\t\tletters.remove('b');\r\n\t\tSystem.out.println(letters);\r\n\t\t\r\n\t\tSystem.out.println(letters.contains('f'));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tLinkedList<String> food = new LinkedList<>(); //can do list-linked list, linked list-linked list\r\n\t\t\r\n\t\tfood.add(\"Sauerkraut\");\r\n\t\tfood.add(\"Carrots\");\r\n\t\tfood.add(\"Mud\");\r\n\t\tfood.add(1, \"Margarine\"); //at indx 1; Margarine\r\n\t\t\r\n\t\tCollections.sort(food); //method in collections class which sorts\r\n\t\tfood.toString();\r\n\t\t//food.clear(); clears list\r\n\t\t\r\n\t\tString marg = food.get(3);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tQueue<String> cities = new PriorityQueue<>();\r\n\t\t\r\n\t\tcities.offer(\"Detroit\");\t\t//QUEUES 'OFFER'\r\n\t\tcities.offer(\"Los Angeles\");\r\n\t\tcities.offer(\"Vienna\");\r\n\t\tcities.offer(\"Windsor\");\r\n\t\t\r\n\t\tSystem.out.println(cities.peek()); //insertion order\r\n\t\tSystem.out.println(cities);\r\n\t\t\r\n\t\tStack<String> dishes = new Stack<>();\r\n\t\t\r\n\t\tdishes.add(\"Cereal bowl\");\r\n\t\tdishes.add(\"Lunch tray\");\r\n\t\tdishes.add(\"Pots and pans\");\r\n\t\tdishes.add(\"Dinner fork\");\r\n\t\t\r\n\t\tSystem.out.println(dishes.peek());\r\n\t\t\r\n\t\tdishes.pop();\r\n\t\tdishes.pop();\t\t//removing the oldest; fifo \r\n\t\t\r\n\t\tSystem.out.println(dishes);\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tTreeSet<Integer> treeset = new TreeSet<Integer>();\n\t\ttreeset.add(1);\n\t\tint a=0,b=0;\n\t\tint number = sc.nextInt();\n\t\tint pairnumber = sc.nextInt();\n\t\tArrayList<matching> arraylist = new ArrayList<matching>();\n\t\t//연결 정보를 arraylist에 저장\n\t\tfor(int i =0;i<pairnumber;i++) {\n\t\t\ta=sc.nextInt();\n\t\t\tb=sc.nextInt();\n\t\t\tarraylist.add(new matching(a,b));\n\t\t}\n\n\t\tIterator<matching> itr = arraylist.iterator();\n\t\t//연결된 컴퓨터를 set에 넣는다.\n\t\tfor(int i =0;i<pairnumber;i++)\n\t\t{\n\t\t\titr = arraylist.iterator();\n\t\t\twhile(itr.hasNext()) {\n\t\t\t\tmatching temp2 = itr.next();\n\t\t\t\t//System.out.println(temp2.getnum1());\n\t\t\t\tif(treeset.contains(temp2.getnum1())|| treeset.contains(temp2.getnum2())) {\n\t\t\t\t\ttreeset.add(temp2.getnum2());\n\t\t\t\t\ttreeset.add(temp2.getnum1());\n\t\t\t\t\titr.remove();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(treeset.size()-1);\n\t}", "void compareSearch();", "public static void main(String[] args) {\n\t\tLinkedHashSet<String> set=new LinkedHashSet<>();\n\t\tset.add(\"name\");\n\t\tset.add(\"surname\");\n\t\tset.add(\"address\");\n\t\tset.add(\"name\");\n\t\tset.add(\"surname\");\n\t\tset.add(\"address\");\n\t\t\n\t\tfor(String s:set)\n\t\t{\n\t\t\tSystem.out.println(s);\n\t\t}\n\t\n\n\t}", "@Override\n public List<Book> result(List<Book> books) {\n return search.result(books);\n }", "public static void main(String[] args) {\n // Reflexive\n System.out.println(o.equals(o));\n System.out.println(r.equals(r));\n\n // Symmetric\n System.out.println(o.equals(p) + \" = \" + p.equals(o));\n System.out.println(r.equals(s) + \" = \" + s.equals(r));\n\n // Transitive\n System.out.println(o.equals(p) + \" = \" + p.equals(q) + \" = \" + o.equals(q));\n System.out.println(r.equals(s) + \" = \" + s.equals(t) + \" = \" + r.equals(t));\n\n // Comparing Point to ColorPoint\n System.out.println(p.equals(s.asPoint()));\n System.out.println(s.asPoint().equals(p));\n }", "public static void main(String[] args) {\n\t\tBook bookArray[] = { new Fiction(\"Nineteen Eighty-Four \"), new Fiction(\"The Handmaid's Tale\"),\n\t\t\t\tnew Fiction(\"The Great Gatsby\"), new Fiction(\"Pride and Prejudice\"),\n\t\t\t\tnew Fiction(\"The Catcher in the Rye\"), new NonFiction(\"The Story of Silent Spring \"),\n\t\t\t\tnew NonFiction(\"Between the World and Me\"), new NonFiction(\"Black Boy\"),\n\t\t\t\tnew NonFiction(\"In Cold Blood\"), new NonFiction(\"Meditations\") };\n\n\t\t// This for loop will displays the Each Fiction and Non-Fiction book details\n\t\tfor (int i = 0; i < bookArray.length; i++) {\n\t\t\t// Displaying the information of each book\n\t\t\tSystem.out.println(bookArray[i].toString());\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(search(ar, 0, num, 90));\n\t}", "public static ArrayList<Book> search(String title, ArrayList<String> authors, String isbn, String publisher, String sortOrder, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, authors, isbn, publisher, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer) {\n if (b.getBookPublisher().equals(publisher) || publisher.equals(\"*\"))\n searchedBooks.add(b);\n }\n if (sortOrder.equals(\"title\")) {\n Collections.sort(searchedBooks, Book.BookTitleComparator);\n }\n else if(sortOrder.equals(\"publish-date\")){\n Collections.sort(searchedBooks,Book.BookDateComparator);\n }\n else{\n\n }\n return searchedBooks;\n }", "public static void main(String[] args) {\n ArrayList<Contact> contactBook = new ArrayList();\n\n Contact contact1 = new Contact(\"Gabe Newell\", \"[email protected]\");\n Contact contact2 = new Contact(\"Todd Howard\", \"[email protected]\");\n\n contactBook.add(contact1);\n contactBook.add(contact2);\n \n for (Contact contacts : contactBook) {\n System.out.println(contacts.toString());\n }\n\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Books)) {\n return false;\n }\n Books other = (Books) object;\n if ((this.bookno == null && other.bookno != null) || (this.bookno != null && !this.bookno.equals(other.bookno))) {\n return false;\n }\n return true;\n }", "public void show_book()\n\t{\n\t\tsize=arr.size();\n\t\tif(size>0)\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(\"===========================================================\");\n\t\t\tSystem.out.println(\"Address Book List\");\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t\tint i=1;\n\n\t\t\t//Special loop:= For Each loop for array list\n\t\t\tfor(String x: arr)\n\t\t\t{\n\t\t\t\tSystem.out.println(i+\". \"+x);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"No data Found\");\n\t\t}\n\t}", "public void sensibleMatches1() \n { \n Map<String, Set<String>> clientMap = new HashMap<>();\n Set<String> interests = new HashSet<>();\n\n interests.add(\"Food\");\n interests.add(\"Wine\");\n interests.add(\"Tandems\");\n clientMap.put(\"Hal\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Walking\");\n interests.add(\"Welding\");\n clientMap.put(\"Gemma\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Cinema\");\n interests.add(\"Wine\");\n clientMap.put(\"Caroline\", interests);\n\n Set<String> halsInterests = clientMap.get(\"Hal\");\n String outputString;\n Set<String> eachClientInterests;\n Set<String> intersection ;\n\n Map<String, Set<String>> mapWithoutHal = new HashMap<>(clientMap);\n mapWithoutHal.remove(\"Hal\");\n for (String eachClient : mapWithoutHal.keySet()) \n {\n eachClientInterests = clientMap.get(eachClient);\n intersection = new HashSet<>(halsInterests);\n intersection.retainAll(eachClientInterests);\n outputString = \"Hal and \" + eachClient \n + \" have common interests: \"\n + intersection;\n System.out.println(outputString);\n }\n }" ]
[ "0.60284257", "0.56714505", "0.566595", "0.5602261", "0.55901307", "0.55582297", "0.55546045", "0.551109", "0.549233", "0.54683733", "0.54162264", "0.53505075", "0.5347388", "0.5344857", "0.53247803", "0.5314413", "0.5305157", "0.52941775", "0.52936643", "0.52704704", "0.52659184", "0.52570707", "0.52548397", "0.5248606", "0.52044266", "0.5198109", "0.51947606", "0.5187434", "0.51745814", "0.5153916", "0.5151402", "0.5140039", "0.513546", "0.51336026", "0.51201254", "0.5116988", "0.5096513", "0.5094743", "0.50844735", "0.507607", "0.5068608", "0.5060474", "0.5052499", "0.50400096", "0.5029247", "0.50217164", "0.50211376", "0.49952456", "0.4990719", "0.498224", "0.49752155", "0.4960772", "0.49586162", "0.495822", "0.49556708", "0.4953516", "0.49455822", "0.4941566", "0.4934468", "0.49239168", "0.4921897", "0.4919958", "0.49197736", "0.49134475", "0.4904717", "0.49036607", "0.48963672", "0.48957574", "0.48928684", "0.4887619", "0.488493", "0.48823494", "0.4881944", "0.48777646", "0.48770332", "0.48760864", "0.48721614", "0.48629627", "0.4856913", "0.4847436", "0.4843757", "0.48422736", "0.48400304", "0.4828767", "0.48229733", "0.4819066", "0.48164174", "0.48011073", "0.47938028", "0.47923836", "0.47892243", "0.47834858", "0.47828895", "0.47815925", "0.47810698", "0.4779639", "0.47700283", "0.47689822", "0.47662675", "0.47623318", "0.47609314" ]
0.0
-1
Prints out every book that matches equals given values.
public void listBooksByPrice(int price) { String sql = "SELECT ISBN, BookName, AuthorName, Price " + "FROM books " + "WHERE Price = ?"; try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) { // Set values pstmt.setInt(1, price); ResultSet rs = pstmt.executeQuery(); // Print results while(rs.next()) { System.out.println(rs.getInt("ISBN") + "\t" + rs.getString("BookName") + "\t" + rs.getString("AuthorName") + "\t" + rs.getInt("Price")); } } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\t\n\t\tHashSet<BookList> set = new HashSet<BookList>();\n\t\t\n\t\tBookList b1 = new BookList(101,\" Let us C\", \" Yashwant Kanetkar\", \" BPB \", 8);\n\t\tBookList b2 = new BookList(102, \" Data communication & Networking\", \" Forouzan\", \" Mc Graw Hill \", 4);\n\t\tBookList b3 = new BookList(103, \" Operating System\", \" Galvin\", \" Wiley \", 6);\n\t\tBookList b4 = new BookList(103, \" Operating System\", \" Galvin\", \" Wiley \", 6);\n\t\t\n\t\tset.add(b1);\n\t\tset.add(b2);\n\t\tset.add(b3);\n\t\tset.add(b4);\n\t\t\n\t\tfor(BookList b:set) {\n\t\t\tSystem.out.println(b.id+\" \"+b.name+\" \"+b.author+\" \"+b.publisher+\" \"+b.quantity);\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tIterator<BookList> itr = set.iterator();\n\t\t\n\t\twhile (itr.hasNext()) {\n\t\tSystem.out.println(itr.next().toString());\n\t\t\n\t\t}\n\n\t}", "public static void main(String[] args) {\n Iterable<Book> notCheckedOut = FluentIterable\n .from(Library.ALL_BOOKS)\n .filter(Utils.IS_NOT_LOANED);\n System.out.println(\"not checked out\");\n System.out.println(Utils.JOINER.join(notCheckedOut));\n System.out.println();\n \n // books that are checked out to Zeb\n Iterable<Book> checkedOutToZeb = FluentIterable\n .from(Library.ALL_BOOKS)\n .filter(Utils.IS_LOANED_TO_ZEB);\n System.out.println(\"checked out to Zeb\");\n System.out.println(Utils.JOINER.join(checkedOutToZeb));\n System.out.println();\n \n // books that are checked out to someone named \"Tobias\"\n Iterable<Book> checkedOutToSomeoneNamedTobias = FluentIterable\n .from(Library.ALL_BOOKS)\n .filter(Utils.IS_LOANED_TO_SOMEONE_NAMED_TOBIAS);\n System.out.println(\"checked out to someone named 'Tobias'\");\n System.out.println(Utils.JOINER.join(checkedOutToSomeoneNamedTobias));\n System.out.println();\n }", "public ArrayList<Book> search(String part){ \n this.searchBooks = new ArrayList<Book>();\n this.numberedListOfSearch = new HashMap<Integer, Book>();\n if (part.length()>=4){\n //Adding all the searching books into an ArrayList<Book>\n //No duplicating for books having the same title\n boolean bookExist = false;\n for (Book book : this.libraryBooks){\n if ((book.getTitle().toLowerCase().contains(part.toLowerCase())) || (book.getAuthor().toLowerCase().contains(part.toLowerCase()))){\n //Check whether any books having the same title in the list\n for (Book bookSearch : this.searchBooks){\n if (bookSearch.getTitle().equals(book.getTitle())){\n bookExist = true;\n break;\n }\n }\n //If none!\n if(!bookExist){\n this.searchBooks.add(book);\n }\n }\n bookExist = false;\n }\n //To put into a numbered list for printing\n //No duplicating for books having the same title\n for (int i =0; i < (this.searchBooks.size());i++){\n // put the book in the HashMap for printing \n this.numberedListOfSearch.put(i+1, this.searchBooks.get(i));\n }\n\n //To print out\n this.println(\"The searching process has finished!\");\n String researchBooks=\"\";\n //check whether the numbered list is empty or not\n if(this.numberedListOfSearch.size() >0){\n researchBooks += \"{\";\n for (int i = 0; i < this.numberedListOfSearch.size();i++){\n researchBooks += (i+1);\n researchBooks += \": \";\n researchBooks += this.numberedListOfSearch.get(i+1).toString();\n researchBooks += \"; \";\n }\n researchBooks = researchBooks.substring(0, researchBooks.length()-2);\n researchBooks += \"}\"; \n }\n //if the numbered list is empty\n else if ( this.numberedListOfSearch.size() == 0){\n researchBooks += \"Nothing found!\";\n }\n this.println(researchBooks);\n }\n\n //If not enough input key words!\n else{\n this.println(\"Please enter more key words! At least four!!\");\n }\n return this.searchBooks;\n }", "private static void queryBooksByAuthor(){\n\t\tSystem.out.println(\"===Query Books By Author===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter First Name of Author to Query Books by: \");\n\t\tString author_firstname = string_input.next();\n\t\t\n\t\tSystem.out.println(\"Enter Middle Name of Author to Query Books by (Type 'null' if Author has no middlename): \");\n\t\tString author_middlename = string_input.next();\n\t\tif(author_middlename.equalsIgnoreCase(\"null\"))\n\t\t\tauthor_middlename = \"\";\n\t\t\n\t\tSystem.out.println(\"Enter Last Name of Author to Query Books by: \");\n\t\tString author_lastname = string_input.next();\n\t\t\n\t\tString author_fullname = author_firstname + \" \" + author_middlename + \" \" + author_lastname;\n\t\t\n\t\tif(ALL_AUTHORS.containsKey(author_fullname)){//if author_full_name exists in the Hashtable then print out all of the author's book titles\n\t\t\tSystem.out.println(\"Author found!\");\n\t\t\tSystem.out.println(author_fullname + \"'s list of book titles are: \"); \n\t\t\tIterator<String> iter = ALL_AUTHORS.get(author_fullname).iterator();\n\t\t\tprintAllElements(iter);\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Sorry Author name entered does not exist in our records\");\n\t}", "public void printBookDetails(Book bookToSearch) {\n boolean exists = false;\n\n //Search if the given book exists in the library\n // There are better ways. But not with arrays!!\n for (Book element : books) {\n if (element.equals(bookToSearch)) {\n exists = true;\n }\n\n //Print book details if boook found\n if (exists) {\n System.out.print(bookToSearch.toString());\n } else {\n System.out.print(bookToSearch.toString() + \" not found\");\n }\n }\n }", "public static void bookNameSearch(Set<Book> books) {\n Pattern pattern = Pattern.compile(SEARCH_PARAMETER);\n for (Book book : books) {\n Matcher matcher = pattern.matcher(book.getBookName());\n if (matcher.find()) {\n System.out.println(book);\n }\n }\n }", "public void printByNumber() {\n for (int i = 0; i < numBooks; i++) {\n for (int j = i + 1; j < numBooks; j++) {\n if (books[i].getNumber().compareTo(books[j].getNumber()) > 0)\n {\n Book temp = books[i];\n books[i] = books[j];\n books[j] = temp;\n }\n }\n }\n System.out.println(\"**List of books by the book numbers.\");\n for (Book b : books){\n if(b != null) {\n System.out.println(b);\n }\n }\n System.out.println(\"**End of list\");\n }", "public static void main(String[] args) {\n\t\tint SizeX = 10 , SizeY = 7;\n\t\tString search_type =\"\";//用書名還是書號\n\t\tString answer =\"\";\n\t\tString query = \"\";//搜尋的關鍵字\n\t\tString operation = \"\";//儲存操作的動作: 借書/還書等\n\t\tString identity = \"\";//儲存使用者身分,student/staff/exit\n\t\tScanner in = new Scanner(System.in);\n\t\tString [][] booklists = new String[SizeX][SizeY];\n\t\t//建立資料庫\n\t\tbooklists = AddBooks(\"82101\",\"Cihai\",\"Reference\",\"Shu Xincheng\",\"20000\",booklists,0);\n\t\tbooklists = AddBooks(\"80001\",\"WW2 History\",\"History\",\"Winston Churchill\",\"971\",booklists,1);\n\t\tbooklists = AddBooks(\"00003\",\"Egg 100\",\"Cookbook\",\"Su yuan ma\",\"104\",booklists,2);\n\t\tbooklists = AddBooks(\"50001\",\"Be a honest man\",\"Political\",\"Ma Ying jeou\",\"520\",booklists,3);\n\t\tbooklists = AddBooks(\"85719\",\"Sword Art Online\",\"Novel\",\"Reki Kawahara\",\"8763\",booklists,4);\n\t\tbooklists = AddBooks(\"85728\",\"Spice and Wolf\",\"Novel\",\"Isuna Hasekura\",\"510\",booklists,5);\n\t\tbooklists = AddBooks(\"85707\",\"The Old Man and the Sea\",\"Novel\",\"Ernest Hemingway\",\"127\",booklists,6);\n\t\tbooklists = AddBooks(\"85703\",\"Romance of the Three Kingdoms\",\"Novel\",\"Luo Guanzhong\",\"480\",booklists,7);\n\t\tbooklists = AddBooks(\"80005\",\"Records of the Grand Historian\",\"History\",\"Sima Qian\",\"6000\",booklists,8);\n\t\tbooklists[4][5] = \"true\";\n\t\tbooklists[4][6] = \"1\";\n\t\t\n\t\tSystem.out.println(\"【圖書館租借模擬系統】\");\n\t\tBookSystem bs = new BookSystem();\n\t\tdo{\n\t\t\tSystem.out.println(\"請問你是何種身分?學生(student)或者圖書館人員(staff)?(輸入exit離開)\");\n\t\t\tidentity = in.nextLine();\n\t\t\tif(identity.equals(\"student\")){\n\t\t\t\tdo{\n\t\t\t\t\tbs.ViewStudent(booklists, SizeX);\n\t\t\t\t\tSystem.out.println(\"請問你要進行何種操作?\");\n\t\t\t\t\tSystem.out.println(\"1. 借書(borrow)\");\n\t\t\t\t\tSystem.out.println(\"2. 還書(return)\");\n\t\t\t\t\tSystem.out.println(\"3. 預約書籍(reserve)\");\n\t\t\t\t\tSystem.out.println(\"4. 取消預約書籍(reservecancel)\");\n\t\t\t\t\tSystem.out.println(\"5. 查詢書單(search)\");\n\t\t\t\t\tSystem.out.println(\"6. 離開(exit)\");\n\t\t\t\t\toperation = in.nextLine();\n\t\t\t\t\twhile(!operation.equals(\"borrow\")&&!operation.equals(\"1\")\n\t\t\t\t\t\t&&!operation.equals(\"return\")&&!operation.equals(\"2\")\n\t\t\t\t\t\t&&!operation.equals(\"reserve\")&&!operation.equals(\"3\")\n\t\t\t\t\t\t&&!operation.equals(\"reservecancel\")&&!operation.equals(\"4\")\n\t\t\t\t\t\t&&!operation.equals(\"search\")&&!operation.equals(\"5\")\n\t\t\t\t\t\t&&!operation.equals(\"exit\")&&!operation.equals(\"6\")){\n\t\t\t\t\t\t\tSystem.out.println(\"輸入錯誤!請重新輸入:\");\n\t\t\t\t\t\t\toperation = in.nextLine();\n\t\t\t\t\t}\n\t\t\t\t\tif(!operation.equals(\"search\") && !operation.equals(\"5\")&&!operation.equals(\"exit\")&&!operation.equals(\"6\") ){\n\t\t\t\t\t\tif(operation.equals(\"borrow\")|| operation.equals(\"1\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來借閱呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"return\")||operation.equals(\"2\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來還書呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"reserve\")||operation.equals(\"3\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來預借呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"reservecancel\")||operation.equals(\"4\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來取消預借呢?\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(search_type.equals(\"bookname\"))\tSystem.out.print(\"請輸入書名:\");\n\t\t\t\t\t\telse if(search_type.equals(\"booknum\"))\tSystem.out.print(\"請輸入書號:\");\n\t\t\t\t\t\tanswer = in.nextLine();\n\t\t\t\t\t\tif(operation.equals(\"borrow\")||operation.equals(\"1\")) \n\t\t\t\t\t\t\tbooklists = bs.BorrowBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"return\")||operation.equals(\"2\")) \n\t\t\t\t\t\t\tbooklists = bs.ReturnBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"reserve\")||operation.equals(\"3\")) \n\t\t\t\t\t\t\tbooklists = bs.ReserveBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"reservecancel\")||operation.equals(\"4\")) \n\t\t\t\t\t\t\tbooklists = bs.ReserveCancel(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(operation.equals(\"search\")||operation.equals(\"5\")){\n\t\t\t\t\t\tSystem.out.println(\"請問你要以何種方式查詢呢?\");\n\t\t\t\t\t\tSystem.out.println(\"1. [書號](booknum)\");\n\t\t\t\t\t\tSystem.out.println(\"2. [書名](bookname)\");\n\t\t\t\t\t\tSystem.out.println(\"3. [種類](booktype)\");\n\t\t\t\t\t\tSystem.out.println(\"4. [全部列出](all)\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\n\t\t\t\t\t\tint OrderIndex = 0;\n\t\t\t\t\t\tint TypeIndex = 0;\n\t\t\t\t\t\tif(search_type.equals(\"booknum\")){\n\t\t\t\t\t\t\tOrderIndex = 0;//依書號排列\n\t\t\t\t\t\t\tTypeIndex = 0;\n\t\t\t\t\t\t}else if(search_type.equals(\"bookname\")||search_type.equals(\"all\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 1;\n\t\t\t\t\t\t}else if(search_type.equals(\"booktype\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!search_type.equals(\"all\")){\n\t\t\t\t\t\t\tSystem.out.print(\"請輸入 \"+search_type+\"的關鍵字:\");\n\t\t\t\t\t\t\tquery = in.nextLine();\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,query,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}while(!operation.equals(\"exit\"));\n\t\t\t}else if(identity.equals(\"staff\")){\n\t\t\t\tdo{\n\t\t\t\t\tSystem.out.println(\"=========This is staff page=============\");\n\t\t\t\t\tSystem.out.println(\"請問你要進行何種操作?\");\n\t\t\t\t\tSystem.out.println(\"1. 登錄新書籍(bookregister)\");\n\t\t\t\t\tSystem.out.println(\"2. 刪除書籍(bookdelete)\");\n\t\t\t\t\tSystem.out.println(\"3. 更新書籍資料(bookedit)\");\n\t\t\t\t\tSystem.out.println(\"4. 查詢書單(search)\");\n\t\t\t\t\tSystem.out.println(\"5. 查詢學生資料(viewstudent)\");\n\t\t\t\t\tSystem.out.println(\"6. 離開(exit)\");\n\t\t\t\t\toperation = in.nextLine();\n\t\t\t\t\tif(operation.equals(\"bookregister\")||operation.equals(\"1\")){\n\t\t\t\t\t\tbooklists = bs.RregisterBook(booklists,SizeX);\n\t\t\t\t\t}else if(operation.equals(\"bookdelete\")||operation.equals(\"2\")\n\t\t\t\t\t\t\t||operation.equals(\"bookedit\")||operation.equals(\"3\")){\n\t\t\t\t\t\tif(operation.equals(\"bookdelete\")||operation.equals(\"2\"))\n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來刪除書籍呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"bookedit\")||operation.equals(\"3\"))\n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來修改書籍呢?\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\t\t\t\t\t\t\n\t\t\t\t\t\tif(search_type.equals(\"bookname\"))\tSystem.out.print(\"請輸入書名:\");\n\t\t\t\t\t\telse if(search_type.equals(\"booknum\"))\tSystem.out.print(\"請輸入書號:\");\n\t\t\t\t\t\tanswer = in.nextLine();\n\t\t\t\t\t\tif(operation.equals(\"bookdelete\")||operation.equals(\"2\"))\n\t\t\t\t\t\t\tbooklists = bs.DeleteBooks(booklists,SizeX,SizeY,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"bookedit\")||operation.equals(\"3\"))\n\t\t\t\t\t\t\tbooklists = bs.EditBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\n\t\t\t\t\t}else if(operation.equals(\"search\")||operation.equals(\"4\")){\n\t\t\t\t\t\tSystem.out.println(\"請問你要以何種方式查詢呢?\");\n\t\t\t\t\t\tSystem.out.println(\"1. [書號](booknum)\");\n\t\t\t\t\t\tSystem.out.println(\"2. [書名](bookname)\");\n\t\t\t\t\t\tSystem.out.println(\"3. [種類](booktype)\");\n\t\t\t\t\t\tSystem.out.println(\"4. [全部列出](all)\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\n\t\t\t\t\t\tint OrderIndex = 0;\n\t\t\t\t\t\tint TypeIndex = 0;\n\t\t\t\t\t\tif(search_type.equals(\"booknum\")||search_type.equals(\"1\")){\n\t\t\t\t\t\t\tOrderIndex = 0;//依書號排列\n\t\t\t\t\t\t\tTypeIndex = 0;\n\t\t\t\t\t\t}else if(search_type.equals(\"bookname\")||search_type.equals(\"all\")||search_type.equals(\"2\")||search_type.equals(\"3\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 1;\n\t\t\t\t\t\t}else if(search_type.equals(\"booktype\")||search_type.equals(\"3\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!search_type.equals(\"all\")){\n\t\t\t\t\t\t\tSystem.out.print(\"請輸入 \"+search_type+\"的關鍵字:\");\n\t\t\t\t\t\t\tquery = in.nextLine();\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,query,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(operation.equals(\"viewstudent\")||operation.equals(\"5\")){\n\t\t\t\t\t\tbs.ViewStudent(booklists,SizeX);\n\t\t\t\t\t}\n\t\t\t\t}while(!operation.equals(\"exit\"));\n\t\t\t}\n\t\t\t\n\t\t}while(!identity.equals(\"exit\"));\n\t\t\n\t\tSystem.out.println(\"感謝您使用此系統!\");\n\t}", "public static void main(String[] args) {\n Book book0 = new Book(\"Ulysses\", \"James Joyce\", 732);\n Book book0copy2 = new Book(\"Ulysses\", \"James Joyce\", 732);\n Book book1 = new Book(\"Ender's Game\", \"Orson S. Card\", 324);\n Book book3; //just creates unassigned reference\n Book[] lotr = new Book[3];\n lotr[0] = new Book(\"The Fellowship of the Ring\", \"J.R.R. Tolkien\", 432);\n lotr[1] = new Book(\"The Two Towers\", \"J.R.R. Tolkien\", 322);\n lotr[2] = new Book(\"The Return of the King\", \"J.R.R. Tolkien\", 490);\n\n book0.ripOutPage();\n System.out.print(book0); //calls toString() object method\n\n book1.setAuthor(\"Orson Scott Card\");\n\n for(Book b : lotr) {\n System.out.print(b);\n }\n\n if (book0.isLong()) {\n System.out.println(book0.getTitle() + \" is a long book.\");\n } else {\n System.out.println(book0.getTitle() + \" is a short book.\");\n }\n \n System.out.printf(\"The title of %s by %s is %d characters long.%n\", \n book0.getTitle(), book0.getAuthor(), book0.getTitleLength());\n\n System.out.println(book0.equals(book0copy2));\n System.out.println(book0.equals(book1));\n }", "public static void main(String[] args) {\n\t\tArrayList<Book> bookList=new ArrayList<Book>();\r\n\t\tBook book1= new Book(1001,\"2 States\",\"Chetan Bhagat\",652.32f);\r\n\t\tBook book2= new Book(1002,\"Three idiots\",\"Chetan Bhagat\",650.40f);\r\n\t\tBook book3= new Book(1003,\"Hopeless\",\"Collen Hoover\",456.32f);\r\n\t\tBook book4= new Book(1004,\"The Deal\",\"Ellen Kennedy\",345.32f);\r\n\t\tBook book5= new Book(1005,\"The Goal\",\"Ellen Kennedy\",895.32f);\r\n\t\t\r\n\t\tbookList.add(book1);\r\n\t\tbookList.add(book2);\r\n\t\tbookList.add(book3);\r\n\t\tbookList.add(book4);\r\n\t\tbookList.add(book5);\r\n\t\tfor(Book book:bookList){\r\n\t\t\tSystem.out.println(book.getId()+\" \"+\r\n\t\t\t\t\t\t\t\tbook.getBname()+\" \"+\r\n\t\t\t\t\t\t\t\tbook.getAuthor()+\" \"+\r\n\t\t\t\t\t\t\t\tbook.getPrice());\r\n\t\t}\r\n\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tAuthor au1=new Author(\"Ma Ma\",\"[email protected]\",'F');\r\n\t\tAuthor au2=new Author(\"Mg Mg\",\"[email protected]\",'M');\r\n\t\tAuthor au3=new Author(\"Su Su\",\"[email protected]\",'F');\r\n\t\tBook b1=new Book(\"Software Engineering\",au1,7000);\r\n\t\tBook b2=new Book(\"Java\",au1,8000,2);\r\n\t\tSystem.out.println(\"BookInfo writing by Ma Ma:\");\r\n\t\tSystem.out.println(\"BookName:\"+b1.name+\"\\nAuthor:\"+au1.name+\"\\nPrice:\"+b1.price);\r\n\t\tSystem.out.println(\"BookName:\"+b2.name+\"\\nAuthor:\"+au1.name+\"\\nPrice:\"+b2.price+\"\\nQty:\"+b2.qty);\r\n\t\tSystem.out.println();\r\n\t\tBook b3=new Book(\"Digital\",au2,4000);\r\n\t\tBook b4=new Book(\"Management\",au2,6000,3);\r\n\t\tSystem.out.println(\"BookInfo writing by Mg Mg:\");\r\n\t\tSystem.out.println(\"BookName:\"+b3.name+\"\\nAuthor:\"+au2.name+\"\\nPrice:\"+b3.price);\r\n\t\tSystem.out.println(\"BookName:\"+b4.name+\"\\nAuthor:\"+au2.name+\"\\nPrice:\"+b4.price+\"\\nQty:\"+b4.qty);\r\n\t\tSystem.out.println();\r\n\t\tBook b5=new Book(\"Accounting\",au3,5000);\r\n\t\tBook b6=new Book(\"Javascript\",au3,9000,4);\r\n\t\tSystem.out.println(\"BookInfo writing by Su Su:\");\r\n\t\tSystem.out.println(\"BookName:\"+b5.name+\"\\nAuthor:\"+au3.name+\"\\nPrice:\"+b5.price);\r\n\t\tSystem.out.println(\"BookName:\"+b6.name+\"\\nAuthor:\"+au3.name+\"\\nPrice:\"+b6.price+\"\\nQty:\"+b6.qty);\r\n\t}", "private void printingSearchResults() {\n HashMap<Integer, Double> resultsMap = new HashMap<>();\n for (DocCollector collector : resultsCollector) {\n if (resultsMap.containsKey(collector.getDocId())) {\n double score = resultsMap.get(collector.getDocId()) + collector.getTermScore();\n resultsMap.put(collector.getDocId(), score);\n } else {\n resultsMap.put(collector.getDocId(), collector.getTermScore());\n }\n }\n List<Map.Entry<Integer, Double>> list = new LinkedList<>(resultsMap.entrySet());\n Collections.sort(list, new Comparator<Map.Entry<Integer, Double>>() {\n public int compare(Map.Entry<Integer, Double> o1,\n Map.Entry<Integer, Double> o2) {\n return (o2.getValue()).compareTo(o1.getValue());\n }\n });\n if (list.isEmpty())\n System.out.println(\"no match\");\n else {\n DecimalFormat df = new DecimalFormat(\".##\");\n for (Map.Entry<Integer, Double> each : list)\n System.out.println(\"docId: \" + each.getKey() + \" score: \" + df.format(each.getValue()));\n }\n\n }", "@Override\n\tpublic void printBook(List<Book> books) {\n\t\tIterator<Book> it = books.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tSystem.out.println(it.next());\n\t\t}\n\t\t\n\t}", "protected static void searchByKeysHashYear(String keys, int lowerYear, int upperYear) {\n System.out.println(\"searching in hasher using search terms and year\");\n System.out.println(\"lowerYear: \" + lowerYear);\n System.out.println(\"upperYear: \" + upperYear);\n String[] splitWords = new String[keys.split(\"[ ]+\").length];\n splitWords = keys.split(\"[ ]+\");\n System.out.println(splitWords[0]);\n for (String keyWord : splitWords) {\n keyWord = keyWord.toLowerCase();\n if (map.get(keyWord) != null) {\n ArrayList<Integer> allInstancesofWord = (ArrayList<Integer>) map.get(keyWord);\n {\n for (int i = 0; i < allInstancesofWord.size(); i++) {\n\n Product e = productList.get(allInstancesofWord.get(i));\n if (e.productYearMatch(lowerYear, upperYear)) // if an element is between range of the years. and it has the correct key terms. it is printed.\n {\n \n System.out.println(productList.get(allInstancesofWord.get(i)));\n ProductGUI.Display(e.toString() + \"\\n\");\n }\n else\n System.out.println(\"not in the year \"+ keys + \" \"+lowerYear+ \" \"+ upperYear);\n }\n }\n }\n if (map.get(keyWord) == null) {\n System.out.println(\"The products you are searching for were not found\");\n }\n }\n\n }", "public static void main(String[] args) {\n Set<String> list = new TreeSet<>();\n list.add(\"Song\");\n list.add(\"Album\");\n list.add(\"Artist\");\n list.add(\"Year\");\n list.add(\"Genre\");\n list.add(\"Song\");\n list.add(\"Song\");\n\n System.out.println();\n for(String x : list){\n System.out.println(x);\n }\n\n //NO REPITTED VALUES AND ASCENDED ORDER WHIT COMPARABLE, HASHCODE AND EQUALS\n Set<Persona> list2 = new TreeSet<>();\n list2.add(new Persona(1, \"Rayman\"));\n list2.add(new Persona(2, \"Castlevania\"));\n list2.add(new Persona(3, \"Silent Hill\"));\n list2.add(new Persona(4, \"Silent Hill\"));\n list2.add(new Persona(1, \"Rayman\"));\n\n System.out.println();\n for(Persona x : list2){\n System.out.println(x.getId() + \" - \" + x.getName());\n }\n }", "public void matchingcouple()\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Output :\");\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Following are the matching pairs \");\r\n\t\t\t\t\r\n\t\t\t\tfor(int i=0;i<womenmatchinlist.size();i++)\r\n\t\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t// print the matching pair from same index of men and women matching list\r\n\t\t\t\tSystem.out.println(menmatchinglist.get(i)+\" is engaged with \"+womenmatchinlist.get(i));\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}", "public void viewLibraryBooks(){\n\t\tIterator booksIterator = bookMap.keySet().iterator();\n\t\tint number, i=1;\n\t\tSystem.out.println(\"\\n\\t\\t===Books in the Library===\\n\");\n\t\twhile(booksIterator.hasNext()){\t\n\t\t\tString current = booksIterator.next().toString();\n\t\t\tnumber = bookMap.get(current).size();\n\t\t\tSystem.out.println(\"\\t\\t[\" + i + \"] \" + \"Title: \" + current);\n\t\t\tSystem.out.println(\"\\t\\t Quantity: \" + number + \"\\n\");\t\t\t\n\t\t\ti += 1; \n\t\t}\n\t}", "public String searchBooks() {\r\n if (keywords.isEmpty()) {\r\n return \"advanced-search\";\r\n }\r\n\r\n keywords = keywords.trim();\r\n \r\n //Get list of all the queries\r\n List<List<Books>> listOfLists = new ArrayList<List<Books>>();\r\n listOfLists.add(findBooksByGenre(keywords));\r\n listOfLists.add(findBooksByIdentifier(keywords));\r\n listOfLists.add(findBooksByContributor(keywords));\r\n listOfLists.add(findBooksByFormat(keywords));\r\n listOfLists.add(findBooksByPublisher(keywords));\r\n listOfLists.add(findBooksByTitle(keywords));\r\n listOfLists.add(findBooksByYear(keywords));\r\n\r\n clearFields();\r\n\r\n List<Books> books = new ArrayList<Books>();\r\n\r\n //Filter out useless data\r\n List<Books> tempBookList;\r\n for (int cntr = 0; cntr < listOfLists.size(); cntr++) {\r\n tempBookList = listOfLists.get(cntr);\r\n\r\n if (tempBookList == null) {\r\n continue;\r\n }\r\n\r\n if (tempBookList.isEmpty()) {\r\n continue;\r\n }\r\n\r\n books.addAll(tempBookList);\r\n }\r\n\r\n //Remove duplicates\r\n Set<Books> bookSet = new HashSet<Books>();\r\n bookSet.addAll(books);\r\n books.clear();\r\n books.addAll(bookSet);\r\n\r\n return displayBooks(books);\r\n }", "private static void queryBooksByGenre(){\n\t\tSystem.out.println(\"===Query Books By Genre===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter Genre to Query Books by: \");\n\t\tString genre = string_input.next();\n\t\tint genre_index = getGenreIndex(genre); //returns the index of the genre entered, in ALL_GENRES\n\t\t\n\t\tif(genre_index > -1){//valid genre was entered\n\t\t\tIterator<String> iter = ALL_GENRES.get(genre_index).iterator();\n\t\t\tSystem.out.println(\"All \" + genre + \" books are: \");\n\t\t\tprintAllElements(iter);\n\t\t}\n\t}", "public static void main(String[] args) {\n\n String[] array = {\"AAA\", \"BBB\", \"ABA\", \"ABB\", \"AAA\", \"ABB\", \"ABB\"};\n\n\n for (\n int i = 0;\n i < array.length - 1; i++)\n {\n for (int j = i + 1; j < array.length; j++) {\n\n if ((array[i].equals(array[j])) && (i != j)) {\n System.out.println(\"Дублирующийся элемент \" + array[j]);\n }\n }\n }\n }", "@Override\n\n public boolean equals(Object obj) {\n if (this == obj) {\n return true;\n }\n if (obj == null || getClass() != obj.getClass()) {\n return false;\n }\n Book book = (Book) obj;\n return getBookAuthorName() == book.getBookAuthorName() &&\n bookIsbnNumber() == book.getBookIsbnNumber() &&\n Objects.equals(getBookName(), book.getBookName());\n }", "public static void main(String[] args) {\n\t\t\n\t\tString [] array = {\"A\", \"A\", \"B\", \"C\", \"C\"};\n\t\t\n\t\tfor (int j = 0; j < array.length; j++) {\n\t\t\t\n\t\t\tint count = 0;\n\t\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\t\tif (array[i].equals(array[j]))\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\n\t\t\tif (count == 1)\n\t\t\tSystem.out.print(array[j] + \" \");\n\t\t\n\t\t}\n\t\t\n\t}", "public void printBookings(){\r\n\t\t//Treemap is used to sort the bookings into calendar order\r\n\t\tTreeMap<Calendar, Integer> m = new TreeMap<Calendar, Integer>();\r\n\t\tSet<Integer> booking = listBookings();\r\n\t\t\r\n\t\t//loops through getting each booking and puts it into the treemap\r\n\t\tfor (Integer id: booking){\r\n\t\t\tBooking b = bookings.get(id);\r\n\t\t\tm.put(b.start(), b.getLength());\r\n\t\t}\r\n\t\t\r\n\t\t//For each calendar in treemap it prints out the date and length of the booking\r\n\t\tSet<Calendar> cal = m.keySet();\r\n\t\tfor(Calendar c: cal) {\r\n\t\t\tprint(c);\r\n\t\t\tSystem.out.print(\" \" + m.get(c));\r\n\t\t}\r\n\t}", "public static void printBooks(List<Book> books) {\r\n System.out.println(\"AUTHOR, \" + \"TITLE, \" + \"GENRE, \" + \"SERIES (if any), \" + \"PART (if any), \" + \"PAGES, \" + \"YEAR, \" + \"PRICE\");\r\n\r\n for (Book book : books) {\r\n System.out.println(book.getTitle() + \", \" + book.getAuthor() + \", \" + book.getGenre() + \", \" + book.getSeries() + \", \" + book.getPartNumber() + \", \" + book.getPagesQuantity() + \", \" + book.getYearPublished() + \", \" + book.getPrice());\r\n }\r\n\r\n }", "void availableBooks(){\n\t\tSystem.out.println(\")))))Available books((((((\");\n\t\tfor(int i=0;i<books.length;i++){\n\t\t\tString book=books[i];\n\t\t\tif(book==null){\n\t\t\tcontinue;\n\t\t}\n\t\t\tSystem.out.println(\"*\"+books[i]);\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n\r\n\t\tBook b1 = new Book(23,\"The mads in heaven\",200);\r\n\t\tBook b2 = new Book(25,\"Island Treasury\",300);\r\n\t\tBook b3 = new Book(27,\"Watery heart\",400);\r\n\t\t\r\n\t\tArrayList<Book> al = new ArrayList<Book>();\r\n\t\tal.add(b1);\r\n\t\tal.add(b2);\r\n\t\tal.add(b3);\r\n\t\t\r\n\t\tIterator<Book> itr1 = al.iterator();\r\n\t\twhile(itr1.hasNext())\r\n\t\t{\r\n\t\t\tBook book = itr1.next();\r\n\t\t\tSystem.out.println(\"Book price is: \"+book.price);\r\n\t\t\tSystem.out.println(\"Number of pages in the book are: \"+book.pages);\r\n\t\t\tSystem.out.println(\"The book name is: \"+book.name);\t\r\n\t\t}\r\n\t}", "public void run(){\n\t\tif(searchHow==0){\n\t\t\tint isbnCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestIsbn = new SearchRequest(db, searchForThis, isbnCount, db.size());\n\t\t\t\t\tdb.searchByISBN(requestIsbn);\n\t\t\t\t\tisbnCount = requestIsbn.foundPos;\n\t\t\t\t\tif (requestIsbn.foundPos >= 0) {\n\t\t\t\t\t\tisbnCount++;\n\t\t\t\t\t\tString formatThis = \"Matched ISBN at position: \" + requestIsbn.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestIsbn.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==1){\n\t\t\tint titleCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestTitle = new SearchRequest(db, searchForThis, titleCount, db.size());\n\t\t\t\t\tdb.searchByTitle(requestTitle);\n\t\t\t\t\ttitleCount = requestTitle.foundPos;\n\t\t\t\t\tif (requestTitle.foundPos >= 0) {\n\t\t\t\t\t\ttitleCount++;\n\t\t\t\t\t\tString formatThis = \"Matched title at position: \" + requestTitle.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestTitle.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==2){\n\t\t\tint authorCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestAuthor = new SearchRequest(db, searchForThis, authorCount, db.size());\n\t\t\t\t\tdb.searchByAuthor(requestAuthor);\n\t\t\t\t\tauthorCount = requestAuthor.foundPos;\n\t\t\t\t\tif (requestAuthor.foundPos >= 0) {\n\t\t\t\t\t\tauthorCount++;\n\t\t\t\t\t\tString formatThis = \"Matched author at position: \" + requestAuthor.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestAuthor.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==3){\n\t\t\tint pageCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestPage = new SearchRequest(db, searchForThis, pageCount, db.size());\n\t\t\t\t\tdb.searchByNumPages(requestPage);\n\t\t\t\t\tpageCount = requestPage.foundPos;\n\t\t\t\t\tif (requestPage.foundPos >= 0) {\n\t\t\t\t\t\tpageCount++;\n\t\t\t\t\t\tString formatThis = \"Matched pages at position: \" + requestPage.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestPage.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==4){\n\t\t\tint yearCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestYear = new SearchRequest(db, searchForThis, yearCount, db.size());\n\t\t\t\t\tdb.searchByYear(requestYear);\n\t\t\t\t\tyearCount = requestYear.foundPos;\n\t\t\t\t\tif (requestYear.foundPos >= 0) {\n\t\t\t\t\t\tyearCount++;\n\t\t\t\t\t\tString formatThis = \"Matched year at position: \" + requestYear.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestYear.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t}", "public static ArrayList<Book> search(String title, ArrayList<String> authors, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer)\n if(containsAllAuthors(authors, b))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "private static void outputBook() {\n\t\toutput(\"\");\r\n\t\tfor (book book : library.outputBook()) { // method name changes BOOKS to outputBook()\r\n\t\t\toutput(book + \"\\n\");\r\n\t\t}\t\t\r\n\t}", "public void showBookingsByName(JTextArea output, String firstName, String lastName)\r\n {\r\n output.setText(\"Bookinger på \" + firstName + \" \" + lastName + \"\\n\\n\");\r\n \r\n Iterator<Booking> iter = bookings.iterator();\r\n \r\n while(iter.hasNext())\r\n {\r\n Booking booking = iter.next();\r\n \r\n if(booking.getGuest().getFirstname().equals(firstName) || \r\n booking.getGuest().getLastname().equals(lastName))\r\n {\r\n output.append(booking.toString() \r\n + \"\\n*******************************************************\\n\");\r\n }//End of if\r\n }// End of while\r\n }", "private static void queryBooksByPublisher(){\n\t\tSystem.out.println(\"===Query Books By Publisher===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter Publisher to Query Books by: \");\n\t\tString publisher = string_input.nextLine();\n\t\t\n\t\tif(ALL_PUBLISHERS.containsKey(publisher)){\n\t\t\tIterator<String> iter = ALL_PUBLISHERS.get(publisher).iterator();\n\t\t\tSystem.out.println(\"All books published by \" + publisher + \" are:\"); \n\t\t\tprintAllElements(iter);\n\t\t}\n\t\t\n\t\telse\n\t\t\tSystem.out.println(\"Sorry! There are no such publishers in our records!\");\n\t}", "private void loopAuthors(Book book) {\n for (String s : book.getAuthors()) {\n print(s);\n }\n }", "public static void printValues(HashMap<String, Book> hashmap) {\n for (Book book: hashmap.values()) {\n System.out.println(book);\n }\n }", "public static void main(String[] args) {\n\t\tList<Score> scores = Arrays.asList(\n\t\t\t\tnew Score(\"a\", 61, 71,71),\n\t\t\t\tnew Score(\"b\", 62, 72,82),\n\t\t\t\tnew Score(\"c\", 63, 74,55)\n\t\t\t\t);\n\t\t\n\t\tboolean result1 = scores.stream().anyMatch(x -> x.getMat() > 39);\n\t\tSystem.out.println(\"수학 과락이 아닌사람 T/F \" + result1);\n\t\t\n\t\tboolean result2 = scores.stream().allMatch(x -> x.getKor() > 39);\n\t\tSystem.out.println(\"국어 과락없나요\" + result2);\n\t\t\n\t\tboolean result3 = scores.stream().noneMatch(x -> x.getEng() > 39);\n\t\tSystem.out.println(\"영어 모두 과락?\" + result3);\n\t}", "public static void main(String[] args) {\n\t\tint a, b, c;\r\n\t\t\r\n\t\tfor(a = 1; a <= 20; a++) {\r\n\t\t\tfor(b = 1; b <= 20; b++) {\r\n\t\t\t\tfor(c = 1; c <= 20; c++) {\r\n\t\t\t\t\tif ( (c*c) == (a*a)+(b*b) && (a+b+c) <=20 )\r\n\t\t\t\t\t\tSystem.out.printf(\"%2d,%5d,%10d\\n\",a,b,c);\r\n\t\t\t\t} //%와 d사이에있는 2는 2칸 띄어쓰기 %d는 정수형\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tBook b1 = new Book(111, \"Hello Java\");\r\n\t\tBook b2 = new Book(111, \"Hello Java\");\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(b1 ==b2);\r\n\t\tSystem.out.println(b1.equals(b2));\r\n\t\tSystem.out.println(b1.hashCode());\r\n\t\tSystem.out.println(b2.hashCode());\r\n\t\t\t\r\n\t}", "private void printAvailableBooks() {\n\t\t\n\t}", "public void matchesDemo() \n {\n Map<String, Set<String>> clientMap = new HashMap<>();\n Set<String> interests = new HashSet<>();\n\n interests.add(\"Food\");\n interests.add(\"Wine\");\n interests.add(\"Tandems\");\n clientMap.put(\"Hal\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Walking\");\n interests.add(\"Welding\");\n clientMap.put(\"Gemma\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Cinema\");\n interests.add(\"Wine\");\n clientMap.put(\"Caroline\", interests);\n\n Set<String> halsInterests = clientMap.get(\"Hal\");\n String outputString;\n Set<String> eachClientInterests;\n Set<String> intersection;\n\n for (String eachClient : clientMap.keySet()) \n {\n eachClientInterests = clientMap.get(eachClient);\n intersection = new HashSet<>(halsInterests);\n intersection.retainAll(eachClientInterests);\n outputString = \"Hal and \" + eachClient \n + \" have common interests: \"\n + intersection;\n System.out.println(outputString) ;\n }\n }", "public static void main(String[] theArgs) {\n for (HashSet<String> set : findParens(new ArrayList<HashSet<String>>(), 3)) {\n for (String element : set) {\n System.out.print(element + \" \");\n }\n System.out.println();\n }\n }", "public void search() {\n while (!done) {\n num2 = mNums.get(cntr);\n num1 = mSum - num2;\n\n if (mKeys.contains(num1)) {\n System.out.printf(\"We found our pair!...%d and %d\\n\\n\",num1,num2);\n done = true;\n } //end if\n\n mKeys.add(num2);\n cntr++;\n\n if (cntr > mNums.size()) {\n System.out.println(\"Unable to find a matching pair of Integers. Sorry :(\\n\");\n done = true;\n }\n } //end while\n }", "public void searchYear()\r\n\t{\r\n\r\n\t\tSystem.out.print(\"Please provide a year: \");\r\n\t\tint year = scan.nextInt();\r\n\t\tboolean display = false;\r\n\t\tboolean found = false;\r\n\t\tfor (int i = 0; i < actualSize; i++)\r\n\t\t{\r\n\r\n\t\t\tif (year == data[i].getYear())\r\n\t\t\t{\r\n\t\t\t\tif (display == false)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Title\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\" + \"Year\\t\" + \"rating\\t\" + \"score\");\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(data[i].toString());\r\n\t\t\t\tdisplay = true;\r\n\t\t\t\tfound = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif (found == false)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The year does not match any of the movies.\");\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tint count=0;\n String[] ab= {\"A\", \"B\", \"B\", \"F\", \"A\"};\n \n for(int i=0; i<ab.length;i++){\n\t for(int j=0;j<ab.length;j++){\n\t\t if(ab[i]==ab[j]){\n\t\t\t count++;\n\t\t\t \n\t\t\t if(count==2){\n\t\t\t\t System.out.println(ab[i]);\n\t\t\t\t count= --count-1;\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t }\n\t }\n }\n\t}", "public void addMultipleBook() {\n Set set = new TreeSet();\n System.out.println(\" yours choice how many addressbook you want to create it:--\");\n int number = scanner.nextInt();\n\n for (int index = 1; index <= number; index++) {\n System.out.println(\"give name to your dictionary:--\");\n String name = scanner.next();\n set.add(name);\n }\n System.out.println(set);\n }", "public void getSubject() {\n System.out.println(\"give any Subject: \");\n String subject = input.next();\n for (Card s: cards) {\n if (s.subjectOfBook.equals(subject)) {\n System.out.println(s.titleOfBook + \" \" + s.autherOfBook + \" \" + s.subjectOfBook);\n } \n }\n System.out.println(\"not Found\");\n }", "public static ArrayList<Book> search(String title, ArrayList<String> authors, String isbn, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, authors, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer)\n if(b.getBookIsbn().equals(isbn) || isbn.equals(\"*\"))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "public static void main(String[] args) {\r\n\t\tint x[] = { 1, 2, 5, 8, 10, 7 };\r\n\t\tint y[] = { 3, 5, 9, 10, 9 };\r\n\t\tfor (int i = 0; i < x.length; i++) {\r\n\t\t\tfor (int j = 0; j < y.length; j++) {\r\n\t\t\t\tif (x[i] == y[j]) {\r\n\t\t\t\t\tSystem.out.println(x[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public static void main(String... args) {\n\n Set<Long> As = new HashSet<>();\n int N = 100;\n for (long p = -N; p <= N; ++p) {\n for (long q = -N; q <= p; ++q) {\n for (long r = -N; r <= q; ++r) {\n if (r==0 || p==0 || q==0)\n continue;\n\n long nom = r*p*q;\n long den = r*p + r*q + p*q;\n\n if (den != 0 && nom % den==0 && (nom^den)>=0) {\n long A = nom/den;\n\n if (A==nom) {\n As.add(A);\n System.out.printf(\"A=%d (p=%d, q=%d, r=%d)\\n\", A, p, q, r);\n }\n }\n }\n }\n }\n Long[] aa = As.toArray(new Long[As.size()]);\n Arrays.sort(aa);\n System.out.printf(\"============\\n\");\n System.out.printf(\"A(%d)=%s\\n\", aa.length, Arrays.toString(aa));\n\n for (long a = 1; a < 100; ++a) {\n if (isAlexandrian(a))\n System.out.printf(\"A=%dn\", a);\n }\n }", "protected static void searchByKeysHashIDYear(String keys, String myId, int lowerYear, int upperYear) {\n System.out.println(\"in hasher for keys and id and year\");\n System.out.println(\"lowerYear: \" + lowerYear);\n System.out.println(\"upperYear: \" + upperYear);\n String[] splitWords = new String[keys.split(\"[ ]+\").length];\n splitWords = keys.split(\"[ ]+\");\n System.out.println(splitWords[0]);\n for (String keyWord : splitWords) {\n keyWord = keyWord.toLowerCase();\n if (map.get(keyWord) != null) {\n ArrayList<Integer> allInstancesofWord = (ArrayList<Integer>) map.get(keyWord);\n {\n for (int i = 0; i < allInstancesofWord.size(); i++) {\n\n Product e = productList.get(allInstancesofWord.get(i));\n if (e.productIdMatch(myId) && e.productYearMatch(lowerYear, upperYear)) // if an element has the desired id and it has the correct key terms. it is printed.\n {\n System.out.println(\"Printing keys id and year\");\n ProductGUI.Display(\"\\n\");\n System.out.println(productList.get(allInstancesofWord.get(i)));\n ProductGUI.Display((e.toString() + \"\\n\"));\n }\n }\n }\n }\n if (map.get(keyWord) == null) {\n System.out.println(\"The products you are searching for were not found\");\n }\n }\n\n }", "void printAssociations(HashMap<BitSet, Integer> allAssociations){\n try{\n boolean firstLine = true;\n FileWriter fw = new FileWriter(this.outputFilePath);\n \n for(Map.Entry<BitSet, Integer> entry : allAssociations.entrySet()){\n BitSet bs = entry.getKey();\n if(firstLine)\n firstLine = false;\n else\n fw.write(\"\\n\");\n \n for(int i=0; i<bs.length() ; i++){\n if(bs.get(i))\n fw.write(intToStrItem.get(frequentItemListSetLenOne.get(i).getKey())+\" \");\n }\n\n fw.write(\"(\" + entry.getValue() +\")\");\n }\n \n fw.close();\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }", "public void printMap() {\n Set<String> manufacturers = cars.keySet();\n\n for (String manufacturer : cars.keySet()) {\n System.out.println(String.format(\"The following %s models are in stock: \", manufacturer));\n System.out.println(cars.get(manufacturer));\n\n }\n }", "private void printAnswerResults(){\n\t\tSystem.out.print(\"\\nCorrect Answer Set: \" + q.getCorrectAnswers().toString());\n\t\tSystem.out.print(\"\\nCorrect Answers: \"+correctAnswers+\n\t\t\t\t\t\t \"\\nWrong Answers: \"+wrongAnswers);\n\t}", "public String searchByMaterial(String string, ArrayList<String> materiallist, int count, Set<String> keys, Collection<String> values, Map<String, String> dataTable1) {\nfor(String s:materiallist) {\r\n\t\t\t\r\n\t\t\tif (string.equals(s)) {\r\n\t\t\t//\tSystem.out.print(s);\r\n\t\t\t\tcount--;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t\t}\r\nSystem.out.println(\"A List of Home that matches the Material \"+string+\":\");\r\n\r\nfor(String k: keys) {\r\n\t\r\n\tarraytoprintkey=k.split(\"_\");\r\n\r\n\r\n\t\r\n\t\tif(arraytoprintkey[1].equals(string)) {\r\n\t\t\t\r\n\t\t\t\tSystem.out.print(k);\r\n\t\t\t\tSystem.out.println(\" \"+dataTable1.get(k));\r\n\t\t\t\t\r\n\t\t}\r\n\r\n\t\t\r\n}\r\nSystem.out.println();\r\n\t\tif(count==0) {\r\n\t\t\treturn string;\r\n\t\t}\r\n\t\t\t\r\n\t\treturn null;\r\n\t}", "public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t/*80\r\n\t\tint matches = 3162;\r\n\t\tint results = 1218;\r\n\t\tint pairs = 146;\r\n\t\t*/\r\n\t\t//70\r\n\t\t/*int matches = 3302;\r\n\t\tint results = 909;\r\n\t\tint pairs = 59;*/\r\n\r\n\t\tfor(int i=1;i<=10;i++)\r\n\t\t{\r\n\t\t\tdouble b = (0.1*i)*((matches*3)+(results*3)+(pairs*3));\r\n\t\t\tSystem.out.print(Math.round(b)+\",\");\r\n\t\t}\t\r\n\t\r\n\t}", "public String searchByFilter() {\n if (selectedFilter.size() != 0) {\n for (Genre filterOption : selectedFilter) {\n searchTerm = searchResultTerm;\n searchBook();\n\n System.out.println(\"CURRENT NUMBER OF BOOKS: \" + books.size());\n\n BookCollection temp = this.db.getCollectionByGenre(filterOption);\n System.out.println(\"GETTING COLLECTION FOR FILTERING: \" + temp.getCollectionName() + \" NUM OF BOOKS: \"\n + temp.getCollectionBooks().size());\n filterBookList(temp.getCollectionBooks());\n System.out.println(\"UPDATED NUMBER OF BOOKS: \" + books.size());\n }\n } else {\n searchTerm = searchResultTerm;\n searchBook();\n }\n\n return \"list.xhtml?faces-redirect=true\";\n }", "public static void seqfilter(ArrayList<String> x, ArrayList<String> y, ArrayList<String> z, JTextArea ta) {\n\t\tfor (int i=0; i<x.size(); i++)\n\t\t{\n\t\t\tfor (int j=0; j<y.size(); j++)\n\t\t\t{\n\t\t\t\tif (x.get(i).equals(y.get(j)))\n\t\t\t\t{\n\t\t\t\t\tz.add(x.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//This is the loop to print all the items of the results array list\n\t\tta.setText(\"< \");\n\t\tfor (int i=0; i<z.size(); i++)\n\t\t{\n\t\t\tta.append(z.get(i)+\" \");\n\t\t}\n\t\tta.append(\">\");\n\t}", "public void listBooks() {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price FROM books\";\n\n try (Connection conn = this.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public void getATitle() {\n System.out.println(\"Give any title: \");\n String key = input.next();\n for (Card s: cards) {\n if (s.titleOfBook.equals(key)) {\n System.out.println(s.titleOfBook + \" \" + s.autherOfBook + \" \" + s.subjectOfBook);\n } \n }\n System.out.println(\"not Found\");\n }", "public void sensibleMatches2() \n { \n Map<String, Set<String>> clientMap = new HashMap<>();\n Set<String> interests = new HashSet<>();\n\n interests.add(\"Food\");\n interests.add(\"Wine\");\n interests.add(\"Tandems\");\n clientMap.put(\"Hal\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Walking\");\n interests.add(\"Welding\");\n clientMap.put(\"Gemma\", interests);\n\n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Cinema\");\n interests.add(\"Wine\");\n clientMap.put(\"Caroline\", interests);\n\n Set<String> halsInterests = clientMap.get(\"Hal\");\n String outputString;\n Set<String> eachClientInterests;\n Set<String> intersection ;\n\n for (String eachClient : clientMap.keySet()) \n {\n if (!eachClient.equals(\"Hal\")) \n {\n eachClientInterests = clientMap.get(eachClient);\n intersection = new HashSet<>(halsInterests);\n intersection.retainAll(eachClientInterests);\n outputString = \"Hal and \" + eachClient \n + \" have common interests: \"\n + intersection;\n System.out.println(outputString);\n }\n }\n }", "private void enterAll() {\n\n String sku = \"Java1001\";\n Book book1 = new Book(\"Head First Java\", \"Kathy Sierra and Bert Bates\", \"Easy to read Java workbook\", 47.50, true);\n bookDB.put(sku, book1);\n\n sku = \"Java1002\";\n Book book2 = new Book(\"Thinking in Java\", \"Bruce Eckel\", \"Details about Java under the hood.\", 20.00, true);\n bookDB.put(sku, book2);\n\n sku = \"Orcl1003\";\n Book book3 = new Book(\"OCP: Oracle Certified Professional Jave SE\", \"Jeanne Boyarsky\", \"Everything you need to know in one place\", 45.00, true);\n bookDB.put(sku, book3);\n\n sku = \"Python1004\";\n Book book4 = new Book(\"Automate the Boring Stuff with Python\", \"Al Sweigart\", \"Fun with Python\", 10.50, true);\n bookDB.put(sku, book4);\n\n sku = \"Zombie1005\";\n Book book5 = new Book(\"The Maker's Guide to the Zombie Apocalypse\", \"Simon Monk\", \"Defend Your Base with Simple Circuits, Arduino and Raspberry Pi\", 16.50, false);\n bookDB.put(sku, book5);\n\n sku = \"Rasp1006\";\n Book book6 = new Book(\"Raspberry Pi Projects for the Evil Genius\", \"Donald Norris\", \"A dozen friendly fun projects for the Raspberry Pi!\", 14.75, true);\n bookDB.put(sku, book6);\n }", "public static void printAll() {\n // Print all the data in the hashtable\n RocksIterator iter = db.newIterator();\n\n for (iter.seekToFirst(); iter.isValid(); iter.next()) {\n System.out.println(new String(iter.key()) + \"\\t=\\t\" + ByteIntUtilities.convertByteArrayToDouble(iter.value()));\n }\n\n iter.close();\n }", "public void showAllSchedulesFiltered(ArrayList<Scheduler> schedulesToPrint) {\n ArrayList<String> filters = new ArrayList<>();\n while (yesNoQuestion(\"Would you like to filter for another class?\")) {\n System.out.println(\"What is the Base name of the class you want to filter for \"\n + \"(eg. CPSC 210, NOT CPSC 210 201)\");\n filters.add(scanner.nextLine());\n }\n for (int i = 0; i < schedulesToPrint.size(); i++) {\n for (String s : filters) {\n if (Arrays.stream(schedulesToPrint.get(i).getCoursesInSchedule()).anyMatch(s::equals)) {\n System.out.println(\" ____ \" + (i + 1) + \":\");\n printSchedule(schedulesToPrint.get(i));\n System.out.println(\" ____ \");\n }\n }\n }\n }", "public String advancedSearchBooks() {\r\n List<Books> books = new ArrayList<Books>();\r\n keywords = keywords.trim();\r\n \r\n switch (searchBy) {\r\n case \"all\":\r\n return searchBooks();\r\n case \"title\":\r\n books = findBooksByTitle(keywords);\r\n break;\r\n case \"identifier\":\r\n books = findBooksByIdentifier(keywords);\r\n break;\r\n case \"contributor\":\r\n books = findBooksByContributor(keywords);\r\n break;\r\n case \"publisher\":\r\n books = findBooksByPublisher(keywords);\r\n break;\r\n case \"year\":\r\n books = findBooksByYear(keywords);\r\n break;\r\n case \"genre\":\r\n books = findBooksByGenre(keywords);\r\n break;\r\n case \"format\":\r\n books = findBooksByFormat(keywords);\r\n break;\r\n }\r\n clearFields();\r\n\r\n if (books == null || books.isEmpty()) {\r\n books = new ArrayList<Books>();\r\n }\r\n\r\n return displayBooks(books);\r\n }", "public static void main(String[] args) {\n\t\tList l=new ArrayList();\r\n\t\tl.add(12);\r\n\t\tl.add(45);\r\n\t\tl.add(15);\r\n\t\tl.add(78);\r\n\t\t\r\n\t\tList l2=new ArrayList();\r\n\t\tl2.add(12);\r\n\t\tl2.add(45);\r\n\t\tl2.add(10);\r\n\t\tl2.add(78);\r\n\t\t\r\n\t\tBoolean m=l.containsAll(l2);\r\n\t\t\r\n\t\tif(m)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Elements are same\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Not equal\");\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n Inventory inventory = new Inventory();\n initializeInventory(inventory);\n\n GuitarSpec test = \n new GuitarSpec(\"b\", \"b\", \"b\", \"b\");\n List matchingGuitars = inventory.search(test);\n if (!matchingGuitars.isEmpty()) {\n System.out.println(\"搜索结果----\");\n for (Iterator i = matchingGuitars.iterator(); i.hasNext(); ) {\n Guitar guitar = (Guitar)i.next();\n GuitarSpec spec = guitar.getSpec();\n System.out.println(\"你搜索的这款吉他:品牌为\" +spec.getBuilder() + \"--型号为\" + spec.getModel() + \"--类型为\" +\n spec.getType() + \"--材质为\" +spec.getWood() + \"--价格为¥\" +\n guitar.getPrice()+\"--ID为\"+guitar.getID());\n }\n } else {\n System.out.println(\"Sorry, 我们没有这一款吉他.\");\n }\n }", "public String toString(){\n\t\treturn name + \": \" + books + \" books checked out\";\n\t}", "public static void main(String[] args) {\n\t\tint[] a={1,2,3,4,5};\r\n\t\tint[] b={2,3,7,8,9,4,5};\r\n\t\tfor(int i=0;i<a.length;i++){\r\n\t\t\tfor(int j=0;j<b.length;j++){\r\n\t\t\t\tif(a[i]==b[j])\r\n\t\t\t\t\tSystem.out.println(b[j]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private boolean Equals(ArrayList<Integer> list) {\n f = list.get(0);\n o = list.get(1);\n r = list.get(2);\n t = list.get(3);\n y = list.get(4);\n s = list.get(5);\n i = list.get(6);\n x = list.get(7);\n e = list.get(8);\n n = list.get(9);\n // Y is in 1's place, T in 10's, R in 100's, O in 1000's place and finally F in 10000's place. assign these\n // values approprately for each number.\n FORTY = (f * 10000 + o * 1000 + r * 100 + t * 10 + y * 1);\n SIXTY = (s * 10000 + i * 1000 + x * 100 + t * 10 + y * 1);\n TEN = (t * 100 + e * 10 + n * 1);\n int sum = FORTY + TEN + TEN;\n\n // if our values match up correctly, then we will show the values of each.\n if (sum == SIXTY) {\n System.out.printf(\"Forty: %d,\\nTen: %d,\\nSixty: %d\\n\", FORTY, TEN, SIXTY);\n System.out.printf(\"The values of each letters are as follows:\\nF = %d,\\nO = %d,\\nR = %d,\\nT = %d,\\nY = %d,\\n\" +\n \"S = %d,\\nI = %d,\\nX = %d,\\nE = %d,\\nand N = %d.\", f, o, r, t, y, s, i, x, e, n);\n return true;\n }\n return false;\n }", "public static void main(String[] args) {\r\n\t\tCard aceHearts = new Card(\"Ace\", \"Hearts\", 14);\r\n\t\tSystem.out.println(aceHearts.rank());\r\n\t\tSystem.out.println(aceHearts.suit());\r\n\t\tSystem.out.println(aceHearts.pointValue());\r\n\t\tSystem.out.println(aceHearts.toString());\r\n\t\tCard tenDiamonds = new Card(\"Ten\", \"Diamonds\", 10);\r\n\t\tSystem.out.println(tenDiamonds.rank());\r\n\t\tSystem.out.println(tenDiamonds.suit());\r\n\t\tSystem.out.println(tenDiamonds.pointValue());\r\n\t\tSystem.out.println(tenDiamonds.toString());\r\n\t\tCard fiveSpades = new Card(\"Five\", \"Spades\", 5);\r\n\t\tSystem.out.println(fiveSpades.rank());\r\n\t\tSystem.out.println(fiveSpades.suit());\r\n\t\tSystem.out.println(fiveSpades.pointValue());\r\n\t\tSystem.out.println(fiveSpades.toString());\r\n\t\tSystem.out.println(aceHearts.matches(tenDiamonds));\r\n\t\tSystem.out.println(aceHearts.matches(fiveSpades));\r\n\t\tSystem.out.println(aceHearts.matches(aceHearts));\r\n\t\tSystem.out.println(tenDiamonds.matches(fiveSpades));\r\n\t\tSystem.out.println(tenDiamonds.matches(aceHearts));\r\n\t\tSystem.out.println(tenDiamonds.matches(tenDiamonds));\r\n\t\tSystem.out.println(fiveSpades.matches(aceHearts));\r\n\t\tSystem.out.println(fiveSpades.matches(tenDiamonds));\r\n\t\tSystem.out.println(fiveSpades.matches(fiveSpades));\r\n\t}", "public static void main(String[] args) {\n Map<Integer, Integer> map = new HashMap();\n for (int i = 0; i < 5; i++) {\n int j = nextInt();\n map.put(j, map.getOrDefault(j, 0)+1);\n }\n if (map.size() != 2) {\n out.println(\"No\");\n } else {\n if (map.values().stream().sorted().collect(Collectors.toList()).equals(List.of(2, 3))) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }\n\n out.flush();\n }", "public void showGenre(Genre genre) {\n for (Record r : cataloue) {\n if (r.getGenre() == genre) {\n System.out.println(r);\n }\n }\n\n }", "private void displayStudentByName(String name) {\n\n int falg = 0;\n\n for (Student student : studentDatabase) {\n\n if (student.getName().equals(name)) {\n\n stdOut.println(student.toString());\n\n falg = 1;\n\n break;\n }\n }\n\n if (falg == 0) {\n\n stdOut.println(\"cannot find student\\n\");\n }\n }", "protected static void searchByYear(int yearLow, int yearHigh) {\n for (Product element : productList) {\n System.out.println(\"lowerYear: \" + yearLow);\n System.out.println(\"upperYear: \" + yearHigh);\n if (element.productYearMatch(yearLow, yearHigh)) // if product years match, the product will be printed\n {\n System.out.println(\"\");\n ProductGUI.Display(\"\\n\");\n System.out.println(element);\n ProductGUI.Display(element.toString());\n }\n }\n }", "public static void printMatches(ArrayList<Glootie> aliens, Glootie g) {\r\n\t\tSystem.out.println(\"Matches for \"+ g);\r\n\t\tArrayList<Glootie> gMatches = findMatches(g,aliens);\r\n\t\tif(gMatches.size() < 10) {\r\n\t\t\tSystem.out.println(gMatches);\r\n\t\t}else {\r\n\t\t\tSystem.out.println(gMatches.size() + \" matches is too many to print\");\r\n\t\t}\r\n\r\n\t}", "public static void printBooksInTable(List<Book> books) {\r\n\r\n String format = \"%-17s %-45s %-15s %-30s %-12s %-10s %-8s %-8s \\n\";\r\n String formatTable = \"%-17s %-45s %-15s %-25s %9s %13d %9d %9.2f \\n\";\r\n System.out.format(format, \"AUTHOR\", \"TITLE\", \"GENRE\", \"SERIES\", \"PART\", \"PAGES\", \"YEAR\", \"PRICE\");\r\n System.out.println(\"-----------------------------------------------------------------------------------------------------------------------------------------------------\");\r\n\r\n for (Book book : books) {\r\n System.out.format(formatTable, book.getAuthor(), book.getTitle(), book.getGenre(), book.getSeries(), book.getPartNumber(), book.getPagesQuantity(), book.getYearPublished(), book.getPrice());\r\n System.out.println(\"-----------------------------------------------------------------------------------------------------------------------------------------------------\");\r\n }\r\n\r\n }", "private static void print_Assignment(Gradebook gradebook, String[] flags) {\n //sort grades highest to lowest\n if (flags[3] != null && flags[3].equals(\"G\")) {\n List<Student> studentList = gradebook.getAllStudents();\n Map<Integer, Set<Student>> gradeToName = new HashMap<Integer, Set<Student>>();\n Set<Integer> grades = new HashSet<Integer>();\n\n for(Student s : studentList){\n Assignment assign = gradebook.getAssignment(flags[0]);\n Map<Assignment, Integer> gradeMap = gradebook.getStudentGrades(s);\n Integer grade = gradeMap.get(assign);\n\n Set<Student> studs = gradeToName.get(grade);\n if(studs == null){\n\n studs = new HashSet<Student>();\n }\n\n studs.add(s);\n gradeToName.put(grade, studs);\n grades.add(grade);\n }\n\n List<Integer> sortedList = new ArrayList<Integer>(grades);\n Collections.sort(sortedList, Collections.reverseOrder());\n\n for(Integer i : sortedList){\n Set<Student> studs = gradeToName.get(i);\n for(Student s : studs)\n System.out.println(\"(\" + s.getLast() + \", \" + s.getFirst() + \", \" + i + \")\");\n }\n\n // sort display aplhabetically\n } else if (flags[4] != null && flags[4].equals(\"A\")){\n //compare override class at bottom of file\n List<Student> studentsAlpha = gradebook.getAllStudents();\n Collections.sort(studentsAlpha, new Comparator<Student>() {\n @Override\n public int compare(Student o1, Student o2) {\n if ( o2.getLast().compareToIgnoreCase(o1.getLast()) == 0) {\n return o1.getFirst().compareToIgnoreCase(o2.getFirst());\n } else {\n return o1.getLast().compareToIgnoreCase(o2.getLast());\n }\n }\n });\n\n for (Student stud: studentsAlpha) {\n // flags[0] should be assign name\n System.out.println(\"(\" + stud.getLast() + \", \" + stud.getFirst() + \", \" + gradebook.getPointsAssignment(stud, gradebook.getAssignment(flags[0])) + \")\");\n }\n\n } else {\n throw new IllegalArgumentException(\"Please specify if you want the display to be alphabetical or by grades highest to lowest.\");\n }\n return;\n }", "public static void main(String[] args) {\n // for testing, add books and find book using it's name\n /* Library.books.add(book1);\n Library.books.add(book2);\n Library.books.add(book3);\n System.out.println(\"Enter namer for Book:\");\n String bookName = sc.nextLine();\n \n for (int i = 0; i <3 ; i++) {\n\n if (Library.books.get(i).getName().equalsIgnoreCase(bookName)) {\n \n System.out.println(books.get(i).getName());\n System.out.println(i);\n }\n }*/\n \n do{\n choicesInMenu(menu());\n } while (goOn);\n //Library.addBook();\n //Library.showAllBooks();\n\n }", "public static void main(String[] args) {\n Set<String> mySet = new HashSet<String>(100,50);\n mySet.add(\"APPLE\");\n mySet.add(\"LG\");\n mySet.add(\"HTTC\");\n mySet.add(\"APPLE\");\n mySet.add(\"SAMSUNG\");\n Iterator<String> iterator = mySet.iterator();\n while (iterator.hasNext()){\n System.out.println(iterator.next());\n }\n\n\n\n }", "private static void print_Final(Gradebook gradebook, String[] flags){\n if (flags[3] != null && flags[3].equals(\"G\")){\n List<Student> studentsList = gradebook.getAllStudents();\n //Map<Student, Double>\n Map<Double, List<Student>> grades = new HashMap<Double, List<Student>>();\n Set<Double> gradeSet = new HashSet<Double>();\n\n for(Student s : studentsList){\n double grade = gradebook.getGradeStudent(s);\n List<Student> studs = grades.get(grade);\n\n if(studs == null){\n studs = new ArrayList<Student>();\n }\n\n studs.add(s);\n grades.put(grade, studs);\n gradeSet.add(grade);\n }\n\n List<Double> gradeList = new ArrayList<Double>(gradeSet);\n Collections.sort(gradeList, Collections.reverseOrder());\n\n DecimalFormat df = new DecimalFormat(\"#.####\"); //Round to 4 decimal places\n df.setRoundingMode(RoundingMode.HALF_UP);\n for(Double d : gradeList){\n\n List<Student> studs = grades.get(d);\n for(Student s : studs){\n\n System.out.println(\"(\" + s.getLast() + \", \" + s.getFirst() + \", \" + df.format(d) + \")\");\n }\n }\n } else if (flags[4] != null && flags[4].equals(\"A\")){\n //compare override class at bottom of file\n List<Student> studentsAlpha = gradebook.getAllStudents();\n Collections.sort(studentsAlpha, new Comparator<Student>() {\n @Override\n public int compare(Student o1, Student o2) {\n if ( o2.getLast().compareToIgnoreCase(o1.getLast()) == 0) {\n return o1.getFirst().compareToIgnoreCase(o2.getFirst());\n } else {\n return o1.getLast().compareToIgnoreCase(o2.getLast());\n }\n }\n });\n\n DecimalFormat df = new DecimalFormat(\"#.####\"); //Round to 4 decimal places\n df.setRoundingMode(RoundingMode.HALF_UP);\n for (Student stud: studentsAlpha) {\n System.out.println(\"(\" + stud.getLast() + \", \" + stud.getFirst() + \", \" + df.format(gradebook.getGradeStudent(stud)) + \")\");\n }\n\n }\n else{\n throw new IllegalArgumentException(\"Grade or Alphabetical flag missing.\");\n }\n return;\n }", "public static void main(String[] args) {\n\t\tHashMap<Price,String> hm = new HashMap<Price,String>();\n\t\tPrice p1 = new Price(100,\"mango\");\n\t\tPrice p2 = new Price(200,\"apple\");\n\t\tPrice p3 = new Price(500,\"custard\");\n\t\tPrice p4 = new Price(700,\"grapes\");\n\t\thm.put(p1, \"mango\"); // key cannot accept duplicate keys so inserting price as a key\n\t\thm.put(p2, \"apple\");\n\t\thm.put(p3, \"custard\");\n\t\thm.put(p4, \"grapes\");\n\t\tPrice p5 = new Price(200,\"apple\");\n\t\thm.put(p5, \"apple\");\n\t\tSet set1 = hm.keySet();\n\t\tSystem.out.println(set1);\n\t\tCollection c = hm.values();\n\t\t\n\t\tfor(Map.Entry<Price, String> map : hm.entrySet()){\n\t\t\tPrice key =map.getKey();\n\t\t\tString value = map.getValue();\n\t\t\tSystem.out.println(key+\" \"+value);\n\t\t}\n\t}", "public void listBooks() {\n for (int g = 0; g < books.length; g++) {\n books[g].toString();\n }\n// List all books in Bookstore\n }", "public static ArrayList<Book> search(String title, ArrayList<String> authors, String isbn, String publisher, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, authors, isbn, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer)\n if(b.getBookPublisher().equals(publisher) || publisher.equals(\"*\"))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "public static void main(String[] args) {\n\t\tList <String> color = new ArrayList<String>(5);\r\n\t\tcolor.add(\"Red\");\r\n\t\tcolor.add(\"Green\");\r\n\t\tcolor.add(\"Orange\");\r\n\t\tcolor.add(\"white\");\r\n\t\tcolor.add(\"black\");\r\n\t\t\r\n\t\tList<String>color2 =new ArrayList<String>(5);\r\n\t\tcolor2.add(\"red\");\r\n\t\tcolor2.add(\"Green\");\r\n\t\tcolor2.add(\"orange\");\r\n\t\tcolor2.add(\"White\");\r\n\t\tcolor2.add(\"Black\");\r\n\t\t\r\n\t\tArrayList<String>color3 = new ArrayList<String>();\r\n\t\t\tfor(String temp:color)\r\n\t\t\t\tcolor3.add(color2.contains(temp)? \"Yes\" : \"No\");\r\n\t\t\tSystem.out.println(color3);\r\n\t}", "public void searchByArtist()\n {\n String input = JOptionPane.showInputDialog(null,\"Enter the artist you'd like to search for:\");\n input = input.replaceAll(\" \", \"_\").toUpperCase(); //standardize output.\n \n Collections.sort(catalog, new ArtistComparator());\n int index = Collections.binarySearch(catalog, \n new Album(input,\"\",null), new ArtistComparator());\n //Since an artist could be listed multiple times, there is *no guarantee*\n //which artist index we find. So, we have to look at the artists\n //left and right of the initial match until we stop matching.\n if(index >= 0)\n {\n Album initial = catalog.get(index);\n String artist = initial.getArtist();\n \n ArrayList<Album> foundAlbums = new ArrayList<>();\n //this ArrayList will have only the albums of our found artist \n foundAlbums.add(initial);\n try { \n int j = index, k = index;\n while(artist.equalsIgnoreCase(catalog.get(j+1).getArtist()))\n {\n foundAlbums.add(catalog.get(j+1));\n j++;\n }\n while(artist.equalsIgnoreCase(catalog.get(k-1).getArtist()))\n {\n foundAlbums.add(catalog.get(k-1));\n k--;\n }\n }\n catch(IndexOutOfBoundsException e) {\n //happens on the last round of the while-loop test expressions\n //don't do anyhting because now we need to print out our albums.\n }\n System.out.print(\"Artist: \" + artist + \"\\nAlbums: \");\n for(Album a : foundAlbums)\n System.out.print(a.getAlbum() + \"\\n\\t\");\n System.out.println();\n }\n else System.err.println(\"Artist '\" + input + \"' not found!\\n\"); \n }", "public static ArrayList<Book> search(String title, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: purchasedBooks.keySet())\n if(b.getBookName().equals(title) || title.equals(\"*\"))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "public void exercise() {\n List<Transaction> ex1 = transactions.stream()\n .filter(transaction -> transaction.getYear() == 2011)\n .sorted(Comparator.comparing(Transaction::getValue))\n .collect(Collectors.toList());\n System.out.println(ex1);\n\n //2 What are all the unique cities where the traders work?\n List<String> ex2 = transactions.stream()\n .map(transaction -> transaction.getTrader().getCity())\n .distinct()\n .collect(Collectors.toList());\n System.out.println(ex2);\n\n //alternative solution\n Set<String> ex2alt = transactions.stream()\n .map(transaction -> transaction.getTrader().getCity())\n .collect(Collectors.toSet());\n\n //3 Find all traders from Cambridge and sort them by name.\n List<Trader> ex3 = transactions.stream()\n .map(Transaction::getTrader)\n .distinct()\n .filter(trader -> trader.getCity() == \"Cambridge\")\n .sorted(Comparator.comparing(Trader::getName))\n .collect(Collectors.toList());\n System.out.println(ex3);\n\n //4 Return a string of all traders’ names sorted alphabetically.\n String ex4 = transactions.stream()\n .map(transaction -> transaction.getTrader().getName())\n .distinct()\n .sorted()\n .reduce(\"\", (n1, n2) -> n1 + n2);\n System.out.println(ex4);\n\n //alternative solution\n String ex4Alt = transactions.stream()\n .map(transaction -> transaction.getTrader().getName())\n .distinct()\n .sorted()\n .collect(Collectors.joining());\n System.out.println(ex4Alt);\n\n //5 Are any traders based in Milan?\n Boolean ex5 = transactions.stream()\n .anyMatch(transaction -> transaction.getTrader().getCity().equals(\"Milan\"));\n System.out.println(ex5);\n\n //6 Print the values of all transactions from the traders living in Cambridge.\n transactions.stream()\n .filter(transaction -> transaction.getTrader().getCity().equals(\"Cambridge\"))\n .forEach(System.out::println);\n\n //7 What’s the highest value of all the transactions?\n Optional<Integer> ex7 = transactions.stream()\n .map(Transaction::getValue)\n .reduce(Integer::max);\n System.out.println(ex7);\n\n //8 Find the transaction with the smallest value.\n Optional<Transaction> ex8 = transactions.stream()\n .reduce((t1, t2) -> t1.getValue() < t2.getValue() ? t1 : t2);\n System.out.println(ex8);\n\n //alternative solution\n Optional<Transaction> ex8Alt = transactions.stream()\n .min(Comparator.comparing(Transaction::getValue));\n System.out.println(ex8Alt);\n\n }", "private void displayScholarshipByName(String name) {\n\n int falg = 0;\n\n stdOut.println(name + \"\\n\");\n\n for (Scholarship scholarship : scholarshipDatabase) {\n\n stdOut.println(scholarship.getName() + \"\\n\");\n\n if (scholarship.getName().equals(name)) {\n\n stdOut.println(scholarship.toString());\n\n falg = 1;\n\n break;\n }\n }\n\n if (falg == 0) {\n\n stdOut.println(\"cannot find scholarship\\n\");\n\n }\n }", "private void searchBooks(String callNumber, String[] keywords,int startYear, int endYear) {\n\t\t/* Loop to sequentially search master list 'Reference' */\n\t\tfor (int i = 0; i < items.size(); i++)\n\t\t\tif ((callNumber.equals(\"\") || items.get(i).getCallNumber()\n\t\t\t\t\t.equalsIgnoreCase(callNumber))\n\t\t\t\t\t&& (keywords == null || matchedKeywords(keywords, items\n\t\t\t\t\t\t\t.get(i).getTitle()))\n\t\t\t\t\t&& (items.get(i).getYear() >= startYear && items.get(i)\n\t\t\t\t\t\t\t.getYear() <= endYear)) {\n\t\t\t\tReference ref = items.get(i);\n\t\t\t\t/* Checks if reference is of a 'Book' type */\n\t\t\t\tif (ref instanceof Book) {\n\t\t\t\t\tBook book = (Book) ref;\n\t\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\t\tSystem.out.println(book.toString());\n\t\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\t}\n\n\t\t\t}\n\t}", "public String toString() {\r\n return books.toString();\r\n }", "public static void main(String[] args) {\n\t\tMap<String,Double> items = new HashMap<>();\r\n\t\t\r\n\t\titems.put(\"Toaster\",350.00);\t\t//inits elements into map [STRING == KEY; DOUBLE == VALUE]\r\n\t\titems.put(\"Dongle\", 5.99);\r\n\t\titems.put(\"Sham Wow\", 19.99);\r\n\t\titems.put(\"Flex Seal\",19.99);\r\n\t\t\r\n\t\tSet<String> setOKeys = items.keySet();\r\n\t\tint count = 0;\r\n\t\tfor(String key : items.keySet()){\r\n\t\t\tSystem.out.print(++count + \") \" + key + \": $\" /*+ items.get(key)USED IN NORMAL FORMAT; NEEDED TO UPDATE FOR 2 DECI POINTS see below*/);\r\n\t\t\tSystem.out.printf(\"%.2f\\n\", items.get(key));\t//printf; decimal format to help\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(items.containsKey(\"Sham Wow\"));\r\n\t\tSystem.out.println(items.containsValue(19.99));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t//ANIMAL BOOK HASH MAP EXAMPLE\r\n\t\tMap<String, Integer> ani = new HashMap<>();\r\n\t\tani.put(\"Toucan\", 40);\r\n\t\tani.put(\"Lizard\", 7);\t\t\t//Stored by Integer value\r\n\t\tani.put(\"Wallaby\", 18);\r\n\t\t\r\n\t\tSystem.out.println(ani.get(\"Lizard\"));\r\n\t\t\r\n\t\tani.remove(\"Toucan\");\r\n\t\t\r\n\t\tSystem.out.println(ani); //toString Method is in the collections class automatically\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t//TREE MAP\r\n\t\tSet<Character> letters = new TreeSet<>(); //LINKEDHASHSET will be unordered\r\n\t\tletters.add('b');\r\n\t\tletters.add('c');\r\n\t\tletters.add('a');\r\n\t\tletters.add('c');\t\t//duplicate REMOVED automatically\r\n\t\t\r\n\t\tSystem.out.println(letters);\r\n\t\t\r\n\t\tletters.remove('b');\r\n\t\tSystem.out.println(letters);\r\n\t\t\r\n\t\tSystem.out.println(letters.contains('f'));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tLinkedList<String> food = new LinkedList<>(); //can do list-linked list, linked list-linked list\r\n\t\t\r\n\t\tfood.add(\"Sauerkraut\");\r\n\t\tfood.add(\"Carrots\");\r\n\t\tfood.add(\"Mud\");\r\n\t\tfood.add(1, \"Margarine\"); //at indx 1; Margarine\r\n\t\t\r\n\t\tCollections.sort(food); //method in collections class which sorts\r\n\t\tfood.toString();\r\n\t\t//food.clear(); clears list\r\n\t\t\r\n\t\tString marg = food.get(3);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tQueue<String> cities = new PriorityQueue<>();\r\n\t\t\r\n\t\tcities.offer(\"Detroit\");\t\t//QUEUES 'OFFER'\r\n\t\tcities.offer(\"Los Angeles\");\r\n\t\tcities.offer(\"Vienna\");\r\n\t\tcities.offer(\"Windsor\");\r\n\t\t\r\n\t\tSystem.out.println(cities.peek()); //insertion order\r\n\t\tSystem.out.println(cities);\r\n\t\t\r\n\t\tStack<String> dishes = new Stack<>();\r\n\t\t\r\n\t\tdishes.add(\"Cereal bowl\");\r\n\t\tdishes.add(\"Lunch tray\");\r\n\t\tdishes.add(\"Pots and pans\");\r\n\t\tdishes.add(\"Dinner fork\");\r\n\t\t\r\n\t\tSystem.out.println(dishes.peek());\r\n\t\t\r\n\t\tdishes.pop();\r\n\t\tdishes.pop();\t\t//removing the oldest; fifo \r\n\t\t\r\n\t\tSystem.out.println(dishes);\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tTreeSet<Integer> treeset = new TreeSet<Integer>();\n\t\ttreeset.add(1);\n\t\tint a=0,b=0;\n\t\tint number = sc.nextInt();\n\t\tint pairnumber = sc.nextInt();\n\t\tArrayList<matching> arraylist = new ArrayList<matching>();\n\t\t//연결 정보를 arraylist에 저장\n\t\tfor(int i =0;i<pairnumber;i++) {\n\t\t\ta=sc.nextInt();\n\t\t\tb=sc.nextInt();\n\t\t\tarraylist.add(new matching(a,b));\n\t\t}\n\n\t\tIterator<matching> itr = arraylist.iterator();\n\t\t//연결된 컴퓨터를 set에 넣는다.\n\t\tfor(int i =0;i<pairnumber;i++)\n\t\t{\n\t\t\titr = arraylist.iterator();\n\t\t\twhile(itr.hasNext()) {\n\t\t\t\tmatching temp2 = itr.next();\n\t\t\t\t//System.out.println(temp2.getnum1());\n\t\t\t\tif(treeset.contains(temp2.getnum1())|| treeset.contains(temp2.getnum2())) {\n\t\t\t\t\ttreeset.add(temp2.getnum2());\n\t\t\t\t\ttreeset.add(temp2.getnum1());\n\t\t\t\t\titr.remove();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(treeset.size()-1);\n\t}", "void compareSearch();", "public static void main(String[] args) {\n\t\tLinkedHashSet<String> set=new LinkedHashSet<>();\n\t\tset.add(\"name\");\n\t\tset.add(\"surname\");\n\t\tset.add(\"address\");\n\t\tset.add(\"name\");\n\t\tset.add(\"surname\");\n\t\tset.add(\"address\");\n\t\t\n\t\tfor(String s:set)\n\t\t{\n\t\t\tSystem.out.println(s);\n\t\t}\n\t\n\n\t}", "@Override\n public List<Book> result(List<Book> books) {\n return search.result(books);\n }", "public static void main(String[] args) {\n // Reflexive\n System.out.println(o.equals(o));\n System.out.println(r.equals(r));\n\n // Symmetric\n System.out.println(o.equals(p) + \" = \" + p.equals(o));\n System.out.println(r.equals(s) + \" = \" + s.equals(r));\n\n // Transitive\n System.out.println(o.equals(p) + \" = \" + p.equals(q) + \" = \" + o.equals(q));\n System.out.println(r.equals(s) + \" = \" + s.equals(t) + \" = \" + r.equals(t));\n\n // Comparing Point to ColorPoint\n System.out.println(p.equals(s.asPoint()));\n System.out.println(s.asPoint().equals(p));\n }", "public static void main(String[] args) {\n\t\tBook bookArray[] = { new Fiction(\"Nineteen Eighty-Four \"), new Fiction(\"The Handmaid's Tale\"),\n\t\t\t\tnew Fiction(\"The Great Gatsby\"), new Fiction(\"Pride and Prejudice\"),\n\t\t\t\tnew Fiction(\"The Catcher in the Rye\"), new NonFiction(\"The Story of Silent Spring \"),\n\t\t\t\tnew NonFiction(\"Between the World and Me\"), new NonFiction(\"Black Boy\"),\n\t\t\t\tnew NonFiction(\"In Cold Blood\"), new NonFiction(\"Meditations\") };\n\n\t\t// This for loop will displays the Each Fiction and Non-Fiction book details\n\t\tfor (int i = 0; i < bookArray.length; i++) {\n\t\t\t// Displaying the information of each book\n\t\t\tSystem.out.println(bookArray[i].toString());\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(search(ar, 0, num, 90));\n\t}", "public static ArrayList<Book> search(String title, ArrayList<String> authors, String isbn, String publisher, String sortOrder, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, authors, isbn, publisher, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer) {\n if (b.getBookPublisher().equals(publisher) || publisher.equals(\"*\"))\n searchedBooks.add(b);\n }\n if (sortOrder.equals(\"title\")) {\n Collections.sort(searchedBooks, Book.BookTitleComparator);\n }\n else if(sortOrder.equals(\"publish-date\")){\n Collections.sort(searchedBooks,Book.BookDateComparator);\n }\n else{\n\n }\n return searchedBooks;\n }", "public static void main(String[] args) {\n ArrayList<Contact> contactBook = new ArrayList();\n\n Contact contact1 = new Contact(\"Gabe Newell\", \"[email protected]\");\n Contact contact2 = new Contact(\"Todd Howard\", \"[email protected]\");\n\n contactBook.add(contact1);\n contactBook.add(contact2);\n \n for (Contact contacts : contactBook) {\n System.out.println(contacts.toString());\n }\n\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Books)) {\n return false;\n }\n Books other = (Books) object;\n if ((this.bookno == null && other.bookno != null) || (this.bookno != null && !this.bookno.equals(other.bookno))) {\n return false;\n }\n return true;\n }", "public void show_book()\n\t{\n\t\tsize=arr.size();\n\t\tif(size>0)\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(\"===========================================================\");\n\t\t\tSystem.out.println(\"Address Book List\");\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t\tint i=1;\n\n\t\t\t//Special loop:= For Each loop for array list\n\t\t\tfor(String x: arr)\n\t\t\t{\n\t\t\t\tSystem.out.println(i+\". \"+x);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"No data Found\");\n\t\t}\n\t}", "public void sensibleMatches1() \n { \n Map<String, Set<String>> clientMap = new HashMap<>();\n Set<String> interests = new HashSet<>();\n\n interests.add(\"Food\");\n interests.add(\"Wine\");\n interests.add(\"Tandems\");\n clientMap.put(\"Hal\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Walking\");\n interests.add(\"Welding\");\n clientMap.put(\"Gemma\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Cinema\");\n interests.add(\"Wine\");\n clientMap.put(\"Caroline\", interests);\n\n Set<String> halsInterests = clientMap.get(\"Hal\");\n String outputString;\n Set<String> eachClientInterests;\n Set<String> intersection ;\n\n Map<String, Set<String>> mapWithoutHal = new HashMap<>(clientMap);\n mapWithoutHal.remove(\"Hal\");\n for (String eachClient : mapWithoutHal.keySet()) \n {\n eachClientInterests = clientMap.get(eachClient);\n intersection = new HashSet<>(halsInterests);\n intersection.retainAll(eachClientInterests);\n outputString = \"Hal and \" + eachClient \n + \" have common interests: \"\n + intersection;\n System.out.println(outputString);\n }\n }" ]
[ "0.60284257", "0.56714505", "0.566595", "0.5602261", "0.55901307", "0.55582297", "0.55546045", "0.551109", "0.549233", "0.54683733", "0.54162264", "0.53505075", "0.5347388", "0.5344857", "0.53247803", "0.5314413", "0.5305157", "0.52941775", "0.52936643", "0.52704704", "0.52659184", "0.52570707", "0.52548397", "0.5248606", "0.52044266", "0.5198109", "0.51947606", "0.5187434", "0.51745814", "0.5153916", "0.5151402", "0.5140039", "0.513546", "0.51336026", "0.51201254", "0.5116988", "0.5096513", "0.5094743", "0.50844735", "0.507607", "0.5068608", "0.5060474", "0.5052499", "0.50400096", "0.5029247", "0.50217164", "0.50211376", "0.49952456", "0.4990719", "0.498224", "0.49752155", "0.4960772", "0.49586162", "0.495822", "0.49556708", "0.4953516", "0.49455822", "0.4941566", "0.4934468", "0.49239168", "0.4921897", "0.4919958", "0.49197736", "0.49134475", "0.4904717", "0.49036607", "0.48963672", "0.48957574", "0.48928684", "0.4887619", "0.488493", "0.48823494", "0.4881944", "0.48777646", "0.48770332", "0.48760864", "0.48721614", "0.48629627", "0.4856913", "0.4847436", "0.4843757", "0.48422736", "0.48400304", "0.4828767", "0.48229733", "0.4819066", "0.48164174", "0.48011073", "0.47938028", "0.47923836", "0.47892243", "0.47834858", "0.47828895", "0.47815925", "0.47810698", "0.4779639", "0.47700283", "0.47689822", "0.47662675", "0.47623318", "0.47609314" ]
0.0
-1
Deletes a book from the database
public void removeBook(int ISBN) { String sql = "DELETE FROM books WHERE ISBN = ?"; try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) { // Set value pstmt.setInt(1, ISBN); pstmt.executeUpdate(); } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void delete(Book book){\n try{\n String query = \"DELETE FROM testdb.book WHERE id=\" + book.getId();\n DbConnection.update(query);\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }", "private void deleteBook() {\n if (currentBookUri != null) {\n int rowsDeleted = getContentResolver().delete(currentBookUri, null, null);\n\n // Confirmation or failure message on whether row was deleted from database\n if (rowsDeleted == 0)\n Toast.makeText(this, R.string.editor_activity_book_deleted_error, Toast.LENGTH_SHORT).show();\n else\n Toast.makeText(this, R.string.editor_activity_book_deleted, Toast.LENGTH_SHORT).show();\n }\n finish();\n }", "private void deleteBook() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Delete the book only if mBookId matches DEFAULT_BOOK_ID\n if (mBookId != DEFAULT_BOOK_ID) {\n bookEntry.setId(mBookId);\n mDb.bookDao().deleteBook(bookEntry);\n }\n finish();\n }\n });\n\n }", "private void deleteBook() {\n // Only perform the delete if this is an existing book.\n if (currentBookUri != null) {\n // Delete an existing book.\n int rowsDeleted = getContentResolver().delete(currentBookUri, null,\n null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, R.string.delete_error, Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful, display a toast.\n Toast.makeText(this, R.string.delete_successful, Toast.LENGTH_SHORT).show();\n }\n }\n // Exit the activity.\n finish();\n }", "int deleteByPrimaryKey(String bookId);", "@Override\r\n\tpublic int deleteBook(int book_id) {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic void deletebook(int seq) {\n\t\tsqlSession.delete(ns + \"deletebook\", seq);\r\n\t}", "@Override\n\tpublic void deleteBook() {\n\t\t\n\t}", "void delete(Book book);", "int deleteByPrimaryKey(String bookIsbn);", "public void delete(int bookId){ \n dbmanager.open();\n try (DBIterator keyIterator = dbmanager.getDB().iterator()) {\n keyIterator.seekToFirst();\n\n while (keyIterator.hasNext()) {\n String key = asString(keyIterator.peekNext().getKey());\n String[] splittedString = key.split(\"-\");\n\n if(!\"book\".equals(splittedString[0])){\n keyIterator.next();\n continue;\n }\n\n String resultAttribute = asString(dbmanager.getDB().get(bytes(key)));\n JSONObject jauthor = new JSONObject(resultAttribute);\n\n if(jauthor.getInt(\"idBOOK\")==bookId){\n \n dbmanager.getDB().delete(bytes(key));\n break;\n }\n keyIterator.next(); \n }\n } catch(Exception ex){\n ex.printStackTrace();\n } \n dbmanager.close();\n }", "@Override\n\tpublic int deleteBook(int bookID) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic boolean deleteBook(int idBook) throws DAOException {\n\t\treturn false;\n\t}", "int deleteByPrimaryKey(Long integralBookId);", "@Override\n public void delete(int id) {\n Book bookDb = repository.findById(id)\n .orElseThrow(RecordNotFoundException::new);\n // delete\n repository.delete(bookDb);\n }", "public void delete(Book book) {\n\t\tif (entityManager.contains(book))\n\t\t\tentityManager.remove(book);\n\t\tentityManager.remove(entityManager.merge(book));\n\t\treturn;\n\n\t}", "@DeleteMapping(\"/delete/{id}\")\n public void deleteBookById(@PathVariable(\"id\") Long id) throws BookNotFoundException {\n bookService.deleteBookById(id);\n }", "public void deleteBook(int num)\n { \n bookList.remove(num); \n }", "@DeleteMapping(\"/{username}/books/{bookId}\")\n public void deleteBookFromLibrary(@PathVariable String username,\n @PathVariable Long bookId) {\n userService.deleteBook(username, bookId);\n }", "public void delete(String book_id){\n\t\tmap.remove(book_id);\n\t\t\n\t}", "public int delete(int rb_seq) {\n\t\t\n\t\tint ret = readBookDao.delete(rb_seq);\n\t\treturn ret;\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString number=textFieldn.getText();\n\t\t\t\t\t\t\t\n\t\t\t\tBookModel bookModel=new BookModel();\n\t\t\t\tbookModel.setBook_number(number);\n\t\t\t\t\n\t\t\t\tBookDao bookDao=new BookDao();\n\t\t\t\t\n\t\t\t\tDbUtil dbUtil = new DbUtil();\n\t\t\t\tConnection con =null;\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tcon = dbUtil.getCon();\n\t\t\t\t\tint db=bookDao.deletebook(con,bookModel);\n\t\t\t\t\t\n\t\t\t\t\tif(db==1) {\n\t\t\t\t\t JOptionPane.showMessageDialog(null, \"删除成功\");\n\t\t\t\t\t } \t\t\t\t\t\n\t\t\t\t}catch (Exception e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "void deleteBookingById(BookingKey bookingKey);", "private void deleteEmployeeBooking() {\n BookingModel bookingModel1 = new BookingModel();\n try {\n bookingModel1.deleteBooking(employeeID);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "int deleteByExample(BookExample example);", "public void onClick(View v) {\n MySQLiteHelper.deleteBookByID(currentBookID);\n // Then go back to book list\n startActivity(new Intent(BookDetailActivity.this, BookListViewActivity.class));\n }", "@DeleteMapping(\"/book\")\n public ResponseEntity<?> delete(@RequestBody Book book) {\n bookService.delete(book);\n return ResponseEntity.ok().body(\"Book has been deleted successfully.\");\n }", "public void deleteEntry(String book1)\n{\n}", "int deleteByPrimaryKey(String bid);", "boolean deleteAuthor(Author author) throws PersistenceException, IllegalArgumentException;", "public abstract void deleteAPriceBook(String priceBookName);", "@Override\n\tpublic Response deleteOrder(BookDeleteRequest request) {\n\t\treturn null;\n\t}", "@Test\n\tpublic void testDeleteBook() {\n\t\t//System.out.println(\"Deleting book from bookstore...\");\n\t\tstore.deleteBook(b1);\n\t\tassertFalse(store.getBooks().contains(b1));\n\t\t//System.out.println(store);\n\t}", "int deleteByPrimaryKey(Long authorId);", "public static int deleteBook(String itemCode) throws HibernateException{\r\n session=sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_deleteBook\").setString(\"itemCode\", itemCode);\r\n \r\n //Execute the query which delete the detail of the book from the database\r\n int res=query.executeUpdate();\r\n \r\n //check whether transaction is correctly done\r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return res;\r\n \r\n }", "@Override\n public Book removeBookById(int id) throws DaoException {\n DataBaseHelper helper = new DataBaseHelper();\n Book book = Book.newBuilder().build();\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statementSelectById =\n helper.prepareStatementSelectById(connection, id);\n ResultSet resultSet = statementSelectById.executeQuery()) {\n while (resultSet.next()) {\n BookCreator bookCreator = new BookCreator();\n book = bookCreator.create(resultSet);\n resultSet.deleteRow();\n }\n if (book.getId() == 0) {\n throw new DaoException(\"There is no such book in warehouse!\");\n }\n } catch (SQLException e) {\n throw new DaoException(e);\n }\n return book;\n }", "@Override\n\tpublic void delete(String id) {\n\t\tString query=\"Delete from Book Where id='\"+id+\"'\";\n\t\texecuteQuery(query);\n\t\tnotifyAllObservers();\n\t\t\n\t}", "public boolean deleteBook(int book_id[]){\n String sql=\"delete from Book where id=?\";\n for (int i=0;i<book_id.length;i++){\n if( !dao.exeucteUpdate(sql,new Object[]{book_id[i]})){\n return false;\n }\n }\n return true;\n }", "public void delete() throws SQLException {\n DatabaseConnector.updateQuery(\"DELETE FROM course \"\n + \"WHERE courseDept='\" + this.courseDept \n + \"' AND courseNum = '\" + this.courseNum + \"'\");\n }", "@Override\n\tpublic void delete(BookInfoVO vo) {\n\t\tbookInfoDao.delete(vo);\n\t}", "@Override\r\n\tpublic boolean deleteBook(long ISBN) {\n\t\tif (searchBook(ISBN).getISBN() == ISBN) {\r\n\t\ttransactionTemplate.setReadOnly(false);\t\r\n\t\t\t\treturn transactionTemplate.execute(new TransactionCallback<Boolean>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic Boolean doInTransaction(TransactionStatus status) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\ttry {\r\n\t\t\t\t\t\tboolean result = bookDAO.deleteBook(ISBN);\r\n\t\t\t\t\t\treturn result;\r\n\r\n\t\t\t\t} catch (Exception exception) {\r\n\t\t\t\t\tstatus.setRollbackOnly();\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@DeleteMapping(\"/{isbn}\")\n\tpublic ResponseEntity<?> deleteBook(@PathVariable(name = \"isbn\") String isbn){\n\t\treturn bookRepository.findByIsbn(isbn).\n\t\t\tmap(bookDelete -> {\n\t\t\t\tbookRepository.delete(bookDelete);\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NO_CONTENT);\n\t\t\t})\n\t\t\t.orElseThrow(() -> new BookNotFoundException(\"Wrong isbn\"));\n\t}", "@RequestMapping(\"/book/delete/{id}\")\n public String delete(@PathVariable Long id){\n bookService.deleteBook(id);\n return \"redirect:/books\";\n }", "@Override\n\tpublic void deleteKeyword(Integer bookId) {\n\t\tdao.removeKeyword(bookId);\n\t\t\n\t\t\n\t}", "public void delete(String id)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tbookdao.openCurrentSessionwithTransation();\r\n\t\t\tBook book=bookdao.findById(id);\r\n\t\t\tbookdao.delete(book);\r\n\t\t\tbookdao.closeSessionwithTransaction();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic boolean deleteBooking(Booking_IF bk) {\r\n\t\tPreparedStatement myStatement = null;\r\n\t\tString query = null;\r\n\t\tint count = 0;\r\n\t\ttry{\r\n\t\t\tquery = \"delete from Booking where Shift_ID = ? AND User_ID = ?\";\r\n\t\t\tmyStatement = myCon.prepareStatement(query);\r\n\t\t\tmyStatement.setInt(1, bk.getShiftid());\r\n\t\t\tmyStatement.setInt(2, bk.getUserid());\r\n\t\t\tcount = myStatement.executeUpdate();\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\ttry {\r\n\t\t\t\tif (myStatement != null)\r\n\t\t\t\t\tmyStatement.close();\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(count!=1){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public void deleteBook(String title)\n {\n for(int iterator = 0; iterator < bookList.size() ; iterator++)\n {\n if(bookList.get(iterator).getTitle().equals(title))\n {\n bookList.remove(iterator); \n }\n }\n }", "int deleteByExample(BnesBrowsingHisExample example) throws SQLException;", "public void delete(Book entity) {\n\t\tentityManager.remove(entityManager.contains(entity) ? entity : entityManager.merge(entity));\n\t}", "@Override\n public Optional<BookDto> deleteBook(Integer bookId) {\n try {\n Optional<BookEntity> bookEntity = bookRepository.findByBookId(bookId);\n if (bookEntity.isPresent()) {\n bookRepository.deleteByBookId(bookId);\n LogUtils.getInfoLogger().info(\"Book Deleted: {}\",bookEntity.get().toString());\n return Optional.of(bookDtoBookEntityMapper.bookEntityToBookDto(bookEntity.get()));\n } else {\n LogUtils.getInfoLogger().info(\"Book not Deleted\");\n return Optional.empty();\n }\n }catch (Exception exception){\n throw new BookException(exception.getMessage());\n }\n }", "@RequestMapping(value = \"/{branch}/stackRoom/{book}\", method = RequestMethod.DELETE)\n public String removeBookFromStock(@PathVariable String branch, @PathVariable String book) {\n branchBookService.removeBook(branch, book);\n return \"Success\";\n }", "private void deleteAllBooks(){\n int rowsDeleted = getContentResolver().delete(BookContract.BookEntry.CONTENT_URI, null, null);\n Log.v(\"MainActivity\", rowsDeleted + \" rows deleted from database\");\n }", "public void delete1(int biblio_id, String library_id, String sub_library_id) {\n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n \n\n try {\n tx = session.beginTransaction();\n \n Query query = session.createQuery(\"DELETE FROM DocumentDetails WHERE biblioId = :biblioId and id.libraryId = :libraryId and id.sublibraryId = :subLibraryId\");\n\n query.setInteger(\"biblioId\", biblio_id);\n query.setString(\"libraryId\", library_id);\n query.setString(\"subLibraryId\", sub_library_id);\n query.executeUpdate();\n tx.commit();\n \n } catch (RuntimeException e) {\n\n tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n }", "@Override\r\n\tpublic void remove(Book book) {\r\n\r\n\t}", "void deleteBooking(int detail_id) throws DataAccessException;", "int deleteByExample(IntegralBookExample example);", "@GetMapping(\"/deleteBook\")\n public String deleteBook(@RequestParam(\"id\") int id, Model model){\n bookService.deleteBook(id);\n return \"redirect:/1\";\n }", "@RequestMapping(value = \"/delete/{bookId}\", method = RequestMethod.GET)\n\tpublic @ResponseBody()\n\tStatus deleteEmployee(@PathVariable(\"bookId\") long bookId) {\n\t\ttry {\n\t\t\tbookService.deleteBook(bookId);;\n\t\t\treturn new Status(1, \"book deleted Successfully !\");\n\t\t} catch (Exception e) {\n\t\t\treturn new Status(0, e.toString());\n\t\t}\n\t}", "public void delete() throws SQLException {\r\n\t\t//SQL Statement\r\n\r\n\t\tString sql = \"DELETE FROM \" + table+ \" WHERE \" + col_genreID + \" = ?\";\r\n\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tstmt.setInt(1, this.getGenreID());\r\n\r\n\t\tint rowsDeleted = stmt.executeUpdate();\r\n\t\tSystem.out.println(\"Es wurden \"+rowsDeleted+ \"Zeilen gelöscht\");\r\n\t\tstmt.close();\r\n\t}", "public void delete(int biblio_id, String library_id, String sub_library_id) {\n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n //Object acqdocentry = null;\n\n try {\n tx = session.beginTransaction();\n //acqdocentry = session.load(BibliographicDetails.class, id);\n Query query = session.createQuery(\"DELETE FROM BibliographicDetails WHERE id.biblioId = :biblioId and id.libraryId = :libraryId and id.sublibraryId = :subLibraryId\");\n\n query.setInteger(\"biblioId\", biblio_id);\n query.setString(\"libraryId\", library_id);\n query.setString(\"subLibraryId\", sub_library_id);\n query.executeUpdate();\n tx.commit();\n //return (BibliographicDetails) query.uniqueResult();\n } catch (RuntimeException e) {\n\n tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n }", "@DeleteMapping(\"/{id}/shoppingcart\")\n public ShoppingCart removeBookFromShoppingCart(@PathVariable long id, @RequestBody Book book){\n Customer b = customerRepository.findById(id);\n ShoppingCart sc = b.getShoppingCart();\n sc.removeBook(book);\n b = customerRepository.save(b);\n \n return b.getShoppingCart();\n }", "@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tdeleteBook(position);\n\t\t\t\t\tcandelete =-1;\n\t\t\t\t}", "@Override\r\n\tpublic boolean deleteByBookId(String id) {\n\t\tConnection conn=null;\r\n\t\tPreparedStatement pst=null;\r\n\t\r\n\t\tboolean flag=false;\r\n\t\ttry {\r\n\t\t\tconn=Dbconn.getConnection();\r\n\t\t\tString sql = \"update books set tag=0 where id=?\";\r\n\t\t\tpst = conn.prepareStatement(sql);\r\n\t\t\tpst.setString(1, id);\r\n\t\t\tif(0<pst.executeUpdate()){\r\n\t\t\t\tflag=true;\r\n\t\t\t}\r\n\t\t\treturn flag;\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}finally{\r\n\t\t\tDbconn.closeConn(pst, null, conn);\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "public void removeBook(Book book) {\n this.bookList.remove(book);\n }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Books : {}\", id);\n booksRepository.deleteById(id);\n booksSearchRepository.deleteById(id);\n }", "int deleteByPrimaryKey(String courseId);", "@Override\n public int deleteByUserIdAndBookshelfIdAndBookId(\n final int userId,\n final int shelfId,\n final int bookId) {\n return jdbcTemplate.update(\"delete from MyBook where user_id = ? \"\n + \"and book_id = ? and bookshelf_id = ?\",\n new Object[] {userId, bookId, shelfId});\n }", "int deleteByPrimaryKey(Long bId);", "@Override\n\tpublic void deleteBourse(Bourse brs) {\n\t\t\n\t}", "int deleteByPrimaryKey(Long articleTagId);", "@Override\n\tpublic void delete(int chapter_id) {\n\t\trDao.delete(chapter_id);\n\t}", "int deleteByPrimaryKey(String goodsId);", "public void delete(final Book key) {\n root = delete(root, key);\n }", "public void eliminar(){\n SQLiteDatabase db = conn.getWritableDatabase();\n String[] parametros = {cajaId.getText().toString()};\n db.delete(\"personal\", \"id = ?\", parametros);\n Toast.makeText(getApplicationContext(), \"Se eliminó el personal\", Toast.LENGTH_SHORT).show();\n db.close();\n }", "int deleteByPrimaryKey(String idTipoComprobante) throws SQLException;", "@RequestMapping(value=\"/book/{isbn}\",method=RequestMethod.DELETE)\n\t\t\tpublic @ResponseBody ResponseEntity<Books> deleteBookDetails(@PathVariable Long isbn)throws Exception{\n\t\t\t\tBooks book=null;\n\t\t\t\tbook=booksDAO.findOne(isbn);\n\t\t\t\tif(book!=null)\n\t\t\t\t{\ttry{\t\n\t\t\t\t\t\t\tbook.setLastModifiedTime(new Date());\n\t\t\t\t\t\t\tif(book.getIsActive())\n\t\t\t\t\t\t\t\tbook.setIsActive(false);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tbook.setIsActive(true);\n\t\t\t\t\t\t\tbooksDAO.save(book);\n\t\t\t\t\t\t\treturn new ResponseEntity<Books>(book, HttpStatus.OK);\n\t\t\t\t\t\t}catch(Exception e){\n\t\t\t\t\t\t\tthrow new Exception(\"Could not change the status of book. \",e);\n\t\t\t\t\t\t}\n\t\t\t\t}else\n\t\t\t\t\treturn new ResponseEntity<Books>(HttpStatus.NOT_FOUND); \n\t\t\t}", "int deleteByPrimaryKey(Long tagid);", "public void delete() throws SQLException {\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n int safeCheck = BusinessFacade.getInstance().checkIDinDB(this.goodID,\n \"orders\", \"goods_id\");\n if (safeCheck == -1) {\n stmtIn.executeUpdate(\"DELETE FROM ngaccount.goods WHERE goods.goods_id = \" +\n this.goodID + \" LIMIT 1;\");\n }\n }", "public void deleteDB() {\n \n sql = \"Delete from Order where OrderID = \" + getOrderID();\n db.deleteDB(sql);\n \n }", "public void deleteTitle(Title title) {\n db.deleteTitle(title);\n }", "public void delete() {\n \t\t try(Connection con = DB.sql2o.open()) {\n \t\t\t String sql = \"DELETE FROM sightings where id=:id\";\n\t\t\t con.createQuery(sql)\n\t\t\t.addParameter(\"id\", this.id)\n\t\t\t.executeUpdate();\n\n \t\t }\n \t }", "@Override\n @DELETE\n @Path(\"/delete/{id}\")\n public void delete(@PathParam(\"id\") int id) {\n EntityManager em = PersistenceUtil.getEntityManagerFactory().createEntityManager();\n DaoImp dao = new DaoImp(em);\n dao.delete(Author.class, id);\n }", "int deleteByPrimaryKey(String detailId);", "@Override\n\tpublic void delete(String... args) throws SQLException {\n\t\t\n\t}", "@Override\n @Transactional\n public int deleteById(final int id) {\n return jdbcTemplate.update(\"delete from MyBook where id = ?\",\n new Object[] {id});\n }", "@RequestMapping(\"/delete\")\n\tpublic String delete(@RequestParam Long bookingId) {\n\t\tbookingRepository.delete(bookingId);\n\t return \"booking #\"+bookingId+\" deleted successfully\";\n\t}", "int deleteByExample(CTipoComprobanteExample example) throws SQLException;", "int deleteByPrimaryKey(String studentId);", "@DeleteMapping(\"/books/{id}\")\n\tpublic ResponseEntity<Map<String, Boolean>> deleteBook(@PathVariable Long id)\n\t{\n\t\tBook book = bookRepository.findById(id)\n\t\t\t\t.orElseThrow(() -> new ResourceNotFoundException(\"Book Not found with id\" + id));\n\t\tbookRepository.delete(book);\n\t\tMap<String, Boolean> response = new HashMap<>();\n\t\tresponse.put(\"deleted\", Boolean.TRUE);\n\t\treturn ResponseEntity.ok(response);\n\t}", "public void delete() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.delete(this);\r\n\t}", "void deleteDocument(Long documentID) throws EntityNotFoundException;", "int deleteByPrimaryKey(Integer rebateId);", "int deleteByPrimaryKey(String ponumberGoodsId);", "public void deleteCar(Car car) {\n DatabaseManager.deleteCar(car);\n }", "int deleteByExample(GfanCodeBannerExample example) throws SQLException;", "int deleteByPrimaryKey(Integer r_p_i);", "void deleteconBooking(int confirm_id) throws DataAccessException;", "public void delete() {\n\t\tTimelineUpdater timelineUpdater = TimelineUpdater.getCurrentInstance(\":mainForm:timeline\");\n\t\tmodel.delete(event, timelineUpdater);\n\n\t\tFacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"The booking \" + getRoom() + \" has been deleted\", null);\n\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t}", "public void remove()\r\n {\r\n if(bookCount>0)\r\n {\r\n bookCount-=1;\r\n }\r\n }", "public void deleteByPrimaryKey(Long tagId) {\n }" ]
[ "0.8562235", "0.8161067", "0.81473833", "0.80585617", "0.79583687", "0.7786559", "0.77571106", "0.7714241", "0.7571642", "0.7379153", "0.73788905", "0.73781663", "0.73292595", "0.73281914", "0.71468467", "0.71249974", "0.7089395", "0.70345384", "0.70166487", "0.69691205", "0.69516194", "0.6947527", "0.69202054", "0.69088584", "0.68324584", "0.67991555", "0.67742145", "0.66766274", "0.6666596", "0.66588145", "0.66551584", "0.66337746", "0.66161776", "0.66046166", "0.6604611", "0.65960675", "0.6578973", "0.65521634", "0.65470076", "0.65312654", "0.65251034", "0.65204084", "0.65130186", "0.651048", "0.65081245", "0.64869684", "0.6486948", "0.6473922", "0.64443976", "0.643846", "0.6434975", "0.64297867", "0.6412263", "0.6406199", "0.64059395", "0.63886595", "0.6382201", "0.63736564", "0.63579625", "0.6351137", "0.6345634", "0.63400704", "0.63106656", "0.62969637", "0.62840635", "0.62728506", "0.62664557", "0.6262983", "0.62618905", "0.6258022", "0.62542593", "0.62529385", "0.62490046", "0.62479436", "0.6226751", "0.6225606", "0.62171984", "0.620895", "0.6206605", "0.6191245", "0.6184492", "0.61745477", "0.61715555", "0.6169165", "0.6162842", "0.61524135", "0.6147565", "0.6146705", "0.6131224", "0.610833", "0.61068916", "0.61032706", "0.6101484", "0.60977083", "0.6090433", "0.6088767", "0.6082208", "0.6075633", "0.60739213", "0.6073907" ]
0.650425
45
Update a book's name
public void replaceBookName(int ISBN, String replacement) { String sql = "UPDATE books SET BookName = ? WHERE ISBN = ?"; try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) { // Set values pstmt.setString(1, replacement); pstmt.setInt(2, ISBN); pstmt.executeUpdate(); } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBookName(java.lang.String value);", "public void setBookName(String value) {\n setAttributeInternal(BOOKNAME, value);\n }", "void update(Book book);", "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 setBookName(final String bookName) {\n\t\tthis.bookName = bookName;\n\t}", "public void update(String name) {\n\n\t}", "public void updateName(String newName)\r\n {\r\n name = newName;\r\n }", "public void setName (String name){\n \n boyName = name;\n }", "@Override\r\n\tpublic void updateName(int eno, String newName) {\n\r\n\t}", "@Override\r\n\tpublic void updatebook(BookDto book) {\n\t\tsqlSession.update(ns + \"updatebook\", book);\r\n\t}", "public void setName(String newname){\n name = newname; \n }", "@Override\n public void update(String name, String surname) {\n this.name = name;\n this.surname = surname;\n }", "public void setBookname(String bookname) {\n this.bookname = bookname == null ? null : bookname.trim();\n }", "public void setName(String newname)\n {\n name = newname;\n \n }", "@Override\r\n\tpublic int updateBookInfo(Book book, int book_id) {\n\t\treturn 0;\r\n\t}", "public void update(String name){\n\n return;\n }", "public void setName(String new_name){\n this.name=new_name;\n }", "public void updateAuthor(Author author);", "int updateName(String cdNameSuffix, int idPerson, String indNameInvalid, String indNamePrimary,\n String nmNameFirst, String nmNameLast, String nmNameMiddle, int idName, Date lastUpdate);", "@Override\r\n\tpublic Book updateBook(Book book) {\n\t\treturn bd.save(book);\r\n\t}", "public void setName(String newName){\n\n //assigns the value newName to the name field\n this.name = newName;\n }", "public void setName(String newName) {\n this.name = newName;\n }", "public static void update( EntityManager em, UserTransaction ut, String isbn,\n String title, int year) throws Exception {\n ut.begin();\n Book book = em.find( Book.class, isbn);\n if ( title != null && !title.equals( book.title)) {\n book.setTitle( title);\n }\n if ( year != book.year) {\n book.setYear( year);\n }\n ut.commit();\n System.out.println( \"Book.update: the book \" + book + \" was updated.\");\n }", "public void setName(String newName){\n name=newName;\n }", "public void setName(final String name);", "public void modify(AddressBookDict addressBook) {\n\t\tlog.info(\"Enter the address book name whose contact you want to edit\");\n\t\tString addressBookName = obj.next();\n\t\tlog.info(\"Enter the name whose contact you want to edit\");\n\t\tString name = obj.next();\n\t\tPersonInfo p = addressBook.getContactByName(addressBookName, name);\n\t\tif (p == null) {\n\t\t\tlog.info(\"No such contact exists\");\n\t\t} else {\n\t\t\twhile (true) {\n\t\t\t\tlog.info(\n\t\t\t\t\t\t\"1. First name\\n 2.Last name\\n 3.Address\\n 4. City\\n 5. State\\n 6. Zip\\n 7. Phone number\\n 8.Email\\n 0. Exit\");\n\t\t\t\tlog.info(\"Enter the info to be modified\");\n\t\t\t\tint info_name = obj.nextInt();\n\t\t\t\tswitch (info_name) {\n\t\t\t\tcase 1:\n\t\t\t\t\tlog.info(\"Enter new First Name\");\n\t\t\t\t\tp.setFirst_name(obj.next());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tlog.info(\"Enter new Last Name\");\n\t\t\t\t\tp.setLast_name(obj.next());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tlog.info(\"Enter new Address\");\n\t\t\t\t\tp.setAddress(obj.next());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tlog.info(\"Enter new City\");\n\t\t\t\t\tp.setCity(obj.next());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tlog.info(\"Enter new State\");\n\t\t\t\t\tp.setState(obj.next());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tlog.info(\"Enter new Zip Code\");\n\t\t\t\t\tp.setZip(obj.next());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tlog.info(\"Enter new Phone Number\");\n\t\t\t\t\tp.setPhno(obj.next());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\t\tlog.info(\"Enter new Email\");\n\t\t\t\t\tp.setEmail(obj.next());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (info_name == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setName(java.lang.String newName)\r\n{\r\n\tname = newName;\r\n}", "public void setName(String newName){\n name = newName;\n }", "public void updateSurname(String newSurname)\r\n {\r\n surname = newSurname;\r\n }", "void updateNames(Long id, String firstName, String lastName);", "void setName(java.lang.String name);", "void setName(java.lang.String name);", "void setName(java.lang.String name);", "public void updateBooks(String oldIsbn, String newIsbn, String title) {\n\t\ttry (PreparedStatement stmt = LibraryConnection\n\t\t\t\t.getConnection()\n\t\t\t\t.prepareStatement(\"UPDATE book SET isbn=?,title=? WHERE isbn=?\")) {\n\t\t\tstmt.setString(1, newIsbn);\n\t\t\tstmt.setString(2, title);\n\t\t\tstmt.setString(3, oldIsbn);\n\t\t\t// System.out.println(query);\n\t\t\tstmt.executeUpdate();\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 setName(String name) {\n this.name = name;\n incModCount();\n }", "public void setName(String newname) {\n name=newname;\n }", "void setName(String name_);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String newValue);", "public void setName(String newValue);", "public void setAddressBookName(String addressBookName) {\n this.addressBookName = addressBookName;\n }", "public final void setName(String name) {_name = name;}", "public void setName(String name)\n {\n _name = name;\n }", "public void editEmployeeInformationName(String text) {\n\t\tthis.name=text;\n\t\tResourceCatalogue resCat = new ResourceCatalogue();\t\t\n\t\tresCat.getResource(rid).editResource(name, this.sectionId);\n\t\tHashMap<String, String> setVars = new HashMap<String, String>();\n\t\tsetVars.put(\"empname\", \"\\'\"+name+\"\\'\");\n\t\tsubmitToDB(setVars);\n\n\t}", "public void setName(java.lang.String aName);", "public String getBookName()\r\n {\r\n\treturn bookName;\r\n }", "public void setName(String name)\n\t{\n\t\tthis._name=name;\n\t}", "void setName(String name);", "void setName(String name);", "void setName(String name);", "void setName(String name);", "void setName(String name);", "void setName(String name);", "private void updateName(Widget sender){\r\n\t\tint index = getWidgetIndex(sender) - 1;\r\n\t\tTaskParam param = taskDef.getParamAt(index);\r\n\t\tparam.setName(((TextBox)sender).getText());\r\n\t\ttaskDef.setDirty(true);\r\n\t}", "void notifyChange(String name, T addressBook) {\n if (!addressBook.equals(history.get(current).getData())) {\n if (hasRedo()) {\n history.subList(current + 1, history.size()).clear();\n }\n history.get(current).subsequentCause = name;\n current++;\n history.add(new State(name, addressBook));\n }\n }", "public String getBookname() {\n return bookname;\n }", "public void doChangeAlbumName()\n/* */ {\n/* 73 */ AlbumDTO changed = this.galleryManager.saveAlbum(this.selectedAlbum);\n/* 74 */ for (AlbumDTO dto : this.albumList)\n/* */ {\n/* 76 */ if (dto.getId().equals(changed.getId()))\n/* */ {\n/* 78 */ dto.setName(changed.getName());\n/* 79 */ break;\n/* */ }\n/* */ }\n/* */ }", "public void setName(String _name)\r\n\t{\r\n\t\tthis._name=_name;\r\n\t}", "public void editStudentLastName(Student changeStudent, String name)\n\t{\n\t\tchangeStudent.setStrNameLast (name);\n\t\tthis.saveNeed = true;\n\n\n\t}", "public void setName(String new_name) {\n\t\t_name = new_name;\n\t}", "Update withTitle(String title);", "public void setName(String name) {\n\t\tthis.name = name;\n\t\tmarkDirty(\"name\",name);\n\t}", "public void setName (String newName)\n {\n this.name = newName; \n }", "public void updateName() {\n try {\n userFound = clientefacadelocal.find(this.idcliente);\n if (userFound != null) {\n userFound.setNombre(objcliente.getNombre());\n clientefacadelocal.edit(userFound);\n objcliente = new Cliente();\n mensaje = \"sia\";\n } else {\n mensaje = \"noa\";\n System.out.println(\"Usuario No Encontrado\");\n }\n } catch (Exception e) {\n mensaje = \"noa\";\n System.out.println(\"El error al actualizar el nombre es \" + e);\n }\n }", "@PutMapping(\"/book\")\n public ResponseEntity<?> update(@RequestBody Book book) {\n bookService.update(book);\n\n return ResponseEntity.ok().body(\"Book has been updated successfully.\");\n }", "public void Buy (String bookName) throws IOException{ \r\n \r\n //Reads the \"Book.txt\" file. \r\n out = new FileReader(\"Book.txt\");\r\n read = new BufferedReader(out);\r\n \r\n String thisLine;\r\n String data = \"\";\r\n String newLine;\r\n while((thisLine = read.readLine()) != null){\r\n data += thisLine + \"\\r\\n\";\r\n }\r\n read.close();\r\n newLine = data.replaceAll(bookName, \"DELETED\");\r\n in = new FileWriter(\"Book.txt\");\r\n in.write(newLine);\r\n in.close();\r\n }", "public void changeProductName(int id,String name)\n {\n Product product = findProduct(id);\n \n if(product != null)\n {\n System.out.println(\"Name change from \" + product.getName() + \" to \"\n + name);\n product.name = name;\n }\n }", "public void setName(String name) {\r\n this._name = name;\r\n }", "public void setName(String name) {\r\n\t\tthis.title = name;\r\n\t}", "public void update(int bookId, int quantity){ \n JSONObject jbook = dbmanager.getBmanager().readJSON(bookId);\n dbmanager.getBmanager().delete(bookId);\n jbook.remove(\"quantity\");\n jbook.put(\"quantity\", Integer.toString(quantity));\n dbmanager.open();\n dbmanager.createCommit(getNextBookId(),jbook);\n dbmanager.close();\n \n }", "public void setBook(Book book) {\n this.book = book;\n }", "public void setName (String Name);", "public void setName (String Name);", "public void setName (String Name);", "public void setName(String newName) {\n this.name = newName;\n }", "public void setName(String newName) {\n this.name = newName;\n }", "public void rename(String title) {\n setTitle(title);\n xlList.setChanged();\n }", "public void setName(String name){\r\n this.name = name;\r\n }", "public void setName(String name){\r\n this.name = name;\r\n }", "public void setName(String name){\r\n this.name = name;\r\n }", "public void setName(String name) {\n _name = name;\n }", "@Override\r\n\tpublic void setName(String newName) \r\n\t{\r\n\t\tthis._name = newName;\r\n\t}", "public void changeName(String name) {\n this.name = name;\n }", "private void setName(String name) {\n name = name.trim().replaceAll(\"\\\"\", \"\");\n name = name.substring(0,1).toUpperCase() + name.substring(1);\n\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "@Override\r\n\tpublic Book update(Book book) {\r\n\t\treturn null;\r\n\t}", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }" ]
[ "0.7836445", "0.72900933", "0.6820327", "0.677023", "0.6705612", "0.6641737", "0.66163635", "0.65651435", "0.65581065", "0.6549664", "0.64491725", "0.63907903", "0.6348466", "0.6344248", "0.6329749", "0.6285056", "0.62555915", "0.6251443", "0.6245907", "0.62364036", "0.6184576", "0.6167725", "0.6164285", "0.6152246", "0.61465603", "0.61282325", "0.6125826", "0.6109985", "0.6107952", "0.6103192", "0.6085279", "0.6085279", "0.6085279", "0.6063931", "0.60604835", "0.6051208", "0.6047893", "0.60419226", "0.60419226", "0.60419226", "0.60419226", "0.60419226", "0.60419226", "0.60419226", "0.60419226", "0.60419226", "0.60419226", "0.60419226", "0.6031802", "0.6031802", "0.60234284", "0.60155135", "0.60151535", "0.60090363", "0.59990543", "0.5984668", "0.5984624", "0.5976118", "0.5976118", "0.5976118", "0.5976118", "0.5976118", "0.5976118", "0.5975851", "0.59748864", "0.5971427", "0.5967097", "0.5958918", "0.59452164", "0.59440833", "0.5943644", "0.5942539", "0.5938545", "0.5935036", "0.5932989", "0.5928826", "0.5925338", "0.5923419", "0.59190536", "0.59145874", "0.59104705", "0.5903907", "0.5903907", "0.5903907", "0.59001786", "0.59001786", "0.5896144", "0.58926904", "0.58926904", "0.58926904", "0.58919036", "0.589104", "0.5881265", "0.58806795", "0.5873612", "0.5873197", "0.58712643", "0.58712643", "0.58712643", "0.58712643" ]
0.6161402
23
Update a book's author
public void replaceAuthor(int ISBN, String replacement) { String sql = "UPDATE books SET AuthorName = ? WHERE ISBN = ?"; try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) { // Set values pstmt.setString(1, replacement); pstmt.setInt(2, ISBN); pstmt.executeUpdate(); } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateAuthor(Author author);", "boolean updateAuthor(Author author) throws PersistenceException, IllegalArgumentException;", "public void setAuthor(String author) {\r\n this.author = author;\r\n }", "public void setAuthor(String author) {\n this.author = author;\n }", "public void setAuthor(String author) {\n this.author = author;\n }", "public void setAuthor(String author) {\n this.author = author;\n }", "public void setAuthor(String author) {\n this.author = author;\n }", "public void setAuthor(String author) {\n this.author = author;\n }", "public void setAuthor(String author) {\r\n String old = this.author;\r\n this.author = author;\r\n this.changeSupport.firePropertyChange(\"author\", old, this.author );\r\n }", "public void setAuthor(String author)\r\n {\r\n m_author = author;\r\n }", "public void setAuthor(String author) {\n\tthis.author = author;\n}", "public void setAuthor(String author) {\r\n\t\tthis.author = author;\r\n\t}", "public void setAuthor(Author author) {\r\n if (author != null) {\r\n this.author = author;\r\n }\r\n }", "public void setAuthor(String value) {\n setAttributeInternal(AUTHOR, value);\n }", "public void setAuthor(Person author)\n {\n this.author = author;\n }", "@Override\n @PUT\n @Path(\"/update/{id}\")\n public void update(@PathParam(\"id\") int id, Author author) {\n EntityManager em = PersistenceUtil.getEntityManagerFactory().createEntityManager();\n AuthorDao authorDao = new AuthorDao(em);\n authorDao.update(id,author);\n }", "public void setAuthor(Player author){\n this.playerAuthor = author;\n }", "Builder addAuthor(String value);", "@Override\r\n\tpublic void setAuthor(String author) {\n\t\tsuper.setAuthor(author);\r\n\t}", "public com.babbler.ws.io.avro.model.BabbleValue.Builder setAuthor(java.lang.String value) {\n validate(fields()[0], value);\n this.author = value;\n fieldSetFlags()[0] = true;\n return this;\n }", "public final native void setAuthor(String author) /*-{\n this.setAuthor(author);\n }-*/;", "void update(Book book);", "int updateByPrimaryKey(AuthorDO record);", "public void updateAuthorInfo(CommitInfo commitInfo) {\n\t\tString authorName = commitInfo.getAuthor();\n\t\tAuthorInfo authorInfo = this.authors.get(authorName);\n\t\tif (authorInfo == null) {\n\t\t\tauthorInfo = new AuthorInfo(authorName, null);\n\t\t\tthis.authors.put(authorName, authorInfo);\n\t\t}\n\t\tauthorInfo.addCommit(commitInfo.getNumChanges());\n\t}", "@Override\n public void author_()\n {\n }", "public void setAuthor(final Author author) {\n\t\tthis.author = author;\n\t}", "public void setAuthor(String author) {\n this.author = author == null ? null : author.trim();\n }", "public void setAuthor(String author) {\n this.author = author == null ? null : author.trim();\n }", "public void setAuthor(String author) {\n this.author = author == null ? null : author.trim();\n }", "public void setAuthor(String author) {\n this.author = author == null ? null : author.trim();\n }", "public String update() throws IOException {\n\n authorManager.update(detailAuthor);\n\n reload();\n return \"author_detail.xhtml\";\n }", "public void setAuthorName(String authorName) {\n this.authorName = authorName;\n }", "public void setAuthorName(String authorName) {\n this.authorName = authorName;\n }", "public void setAuthorisor(String authorisor)\n\t{\n\t\tthis.authorisor = Toolbox.trim(authorisor, 4);\n\t}", "public static void update( EntityManager em, UserTransaction ut, String isbn,\n String title, int year) throws Exception {\n ut.begin();\n Book book = em.find( Book.class, isbn);\n if ( title != null && !title.equals( book.title)) {\n book.setTitle( title);\n }\n if ( year != book.year) {\n book.setYear( year);\n }\n ut.commit();\n System.out.println( \"Book.update: the book \" + book + \" was updated.\");\n }", "public void setAuthor(String author) {\n\t\tauth = author;\n\t}", "public void saveAuthor(Author authorObject);", "public final void author() throws RecognitionException {\n Token ID1=null;\n\n try {\n // /Users/valliant/Projects/java/CFML/cfml.parsing/antlr/Javadoc.g:13:8: ( '@author' ID )\n // /Users/valliant/Projects/java/CFML/cfml.parsing/antlr/Javadoc.g:13:10: '@author' ID\n {\n match(input,7,FOLLOW_7_in_author42); \n\n ID1=(Token)match(input,ID,FOLLOW_ID_in_author44); \n\n System.out.println(\"author \"+(ID1!=null?ID1.getText():null));\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return ;\n }", "public void setAuthorLocal(String author) {\r\n\t\toAuthor = author;\r\n\t}", "@Override\n\tpublic void setAuthor(java.lang.String author) {\n\t\t_news_Blogs.setAuthor(author);\n\t}", "public String getAuthor() {\r\n\t\treturn oAuthor;\r\n\t}", "public void saveCommitAuthor(String author) {\n List<String> previousCommitAuthors = myState.getPreviousCommitAuthors();\n previousCommitAuthors.remove(author);\n while (previousCommitAuthors.size() >= PREVIOUS_COMMIT_AUTHORS_LIMIT) {\n previousCommitAuthors.remove(previousCommitAuthors.size() - 1);\n }\n previousCommitAuthors.add(0, author);\n }", "public void setAuthorId(String authorId) {\n this.authorId = authorId;\n }", "public String getBookAuthor() {\n return bookAuthor;\n }", "public void setBookAuthor(String bookAuthor) {\n this.bookAuthor = bookAuthor == null ? null : bookAuthor.trim();\n }", "@Override\n \tpublic void setAuthorString(String authorString) {\n \t\tthis.authorString = authorString;\n \t}", "@Override\n public void author()\n {\n }", "public void setAuthor(String v) {\n if (MetadataUGWD_Type.featOkTst && ((MetadataUGWD_Type)jcasType).casFeat_author == null)\n jcasType.jcas.throwFeatMissing(\"author\", \"de.aitools.ie.uima.type.argumentation.MetadataUGWD\");\n jcasType.ll_cas.ll_setStringValue(addr, ((MetadataUGWD_Type)jcasType).casFeatCode_author, v);}", "public String getAuthor() {\r\n\t\treturn author;\r\n\t}", "Builder addAuthor(Person value);", "@Override\r\n\tpublic void updatebook(BookDto book) {\n\t\tsqlSession.update(ns + \"updatebook\", book);\r\n\t}", "public void addAuthor(Author author){\n authors.add(author);\n }", "public void setAuthor(IPerson author) throws IllegalArgumentException {\n\t\tif (null == author)\n\t\t\tthrow new IllegalArgumentException(\"author null\");\n\n\t\tIPerson oldAuthor = getAuthor();\n\n\t\tif (author.equals(oldAuthor))\n\t\t\treturn;\n\n\t\tfAuthor = author;\n\n\t\tfAuthor.addPropertyChangeListener(new PropertyChangeListener() {\n\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\n\t\t\t\tfirePropertyChange(evt);\n\t\t\t}\n\t\t});\n\n\t\tfirePropertyChange(\"author\", oldAuthor, author);\n\t}", "public String getAuthor() {\r\n return author;\r\n }", "public String getAuthor() { return author_; }", "public void setAuthorId(Integer authorId) {\n this.authorId = authorId;\n }", "public void setAuthorId(Integer authorId) {\n this.authorId = authorId;\n }", "public String getAuthor() {\n return author;\n }", "public String getAuthor() {\n return author;\n }", "public String getAuthor() {\n return author;\n }", "public String getAuthor() {\n return author;\n }", "public String getAuthor() {\n return author;\n }", "public String getAuthor() {\n return author;\n }", "public String getAuthor() {\n return author;\n }", "public String getAuthor() {\n return author;\n }", "public String getAuthor() {\n return author;\n }", "public String getAuthor() {\n return author;\n }", "public String getAuthor() {\n return author;\n }", "public String getAuthor() {\n return author;\n }", "@Override\r\n\tpublic int updateBookInfo(Book book, int book_id) {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic Book updateBook(Book book) {\n\t\treturn bd.save(book);\r\n\t}", "public void editAuthor(final View view) {\n final Author author = (Author) view.getTag();\n\n final Dialog dialog = new Dialog(this);\n dialog.setContentView(R.layout.dialog_edit_author);\n dialog.setTitle(R.string.title_dialog_edit_author);\n\n final AutoCompleteTextView textAuthor = (AutoCompleteTextView) dialog.findViewById(R.id.editAuthor_textAuthor);\n textAuthor.setText(author.name);\n textAuthor.setAdapter(mAutoCompleteAdapter);\n\n Button saveButton = (Button) dialog.findViewById(R.id.editAuthor_confirm);\n Button cancelButton = (Button) dialog.findViewById(R.id.editAuthor_cancel);\n\n saveButton.setOnClickListener(new OnClickListener() {\n\n @Override\n public void onClick(View v) {\n String authorName = textAuthor.getText().toString().trim();\n\n String errorMessage = null;\n if (authorName.length() == 0) {\n errorMessage = getString(R.string.message_author_missing);\n } else if (!author.name.equals(authorName)) {\n if (mAuthorMap.containsKey(authorName)) {\n String message = getString(R.string.message_author_already_present);\n errorMessage = String.format(message, authorName);\n } else {\n int authorIndex = mAuthorList.indexOf(author);\n\n Author a = new Author();\n a.name = authorName;\n Author authorDb = authorService.getAuthorByCriteria(a);\n\n if (authorDb != null) {\n a = authorDb;\n }\n mAuthorList.remove(authorIndex);\n mAuthorList.add(authorIndex, a);\n mAuthorArrayAdapter.notifyDataSetChanged();\n mAuthorMap.remove(author.name);\n mAuthorMap.put(authorName, a);\n }\n }\n\n if (errorMessage == null) {\n textAuthor.setText(null);\n textAuthor.setError(null);\n dialog.dismiss();\n } else {\n textAuthor.setError(errorMessage);\n }\n }\n });\n cancelButton.setOnClickListener(new OnClickListener() {\n\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n dialog.show();\n }", "public String getAuthor(){\n return author;\n \n }", "@RequestMapping(\"/author/update/{id}\")\n public ModelAndView showUpdateAuthorPage(@PathVariable(name = \"id\") Long id) {\n ModelAndView mav = new ModelAndView(\"/author/update\");\n Author author = authorservice.getAuthor(id);\n final Logger log = LoggerFactory.getLogger(ProjectApplication.class);\n log.info(\"---------------update author----------------\");\n mav.addObject(\"author\", author);\n\n return mav;\n }", "public String getAuthorName() {\n return this.authorName;\n }", "Builder addAuthor(Organization value);", "public void /*IFieldUpdatingCallback.*/fieldUpdating(Field field) {\n if (field.getType() == FieldType.FIELD_AUTHOR)\n {\n FieldAuthor fieldAuthor = (FieldAuthor) field;\n try {\n fieldAuthor.setAuthorName(\"Updating John Doe\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n\tpublic String author() {\n\t\treturn author;\n\t}", "public void setAuthors(String _authors) { authors = _authors; }", "public String getAuthorName() {\n return authorName;\n }", "public String getAuthorName() {\n return authorName;\n }", "public void setModifiAuthor(String modifiAuthor) {\n this.modifiAuthor = modifiAuthor;\n }", "public void setAuthorInfo(int i, String n, String s, String e)\r\n {\r\n name = n;\r\n idAuthor = i;\r\n surname = s;\r\n email = e;\r\n }", "public java.lang.String getAuthor() {\n return author;\n }", "public void setLastUpdateAuthor(String lastUpdateAuthor) {\n content.put(LAST_UPDATE_AUTHOR, lastUpdateAuthor);\n }", "public String getAuthor();", "public String getAuthor() {\n return mAuthor;\n }", "public java.lang.String getAuthor() {\n return author;\n }", "String getAuthor();", "String getAuthor();", "public void printAuthor()\n {\n System.out.println(\"by: \" + author);\n }", "public String getAuthorName() {\n return mAuthorName;\n }", "public String getAuthor() {\n\treturn author;\n}", "public void setAuthorId(Integer authorId) {\n\t\tthis.authorId = authorId;\n\t}", "public void getAnAuthor() {\n System.out.println(\"Give author name: \");\n String key = input.next();\n for (Card s: cards) {\n if (s.autherOfBook.equals(key)) {\n System.out.println(s.titleOfBook + \" \" + s.autherOfBook + \" \" + s.subjectOfBook);\n } \n }\n }", "public int insertAuthor(Author author);", "public String getAuthorId() {\n return authorId;\n }", "public void updateChapter(Chapter chapter);", "String getAuthorName();", "@Override\n\tpublic void setAuthorId(long authorId) {\n\t\t_scienceApp.setAuthorId(authorId);\n\t}", "private void displayByAuthor() {\n\t\tString authorHolder; // declares authorHolder\n\t\t\n\t\tSystem.out.println(\"Please enter author of the book you would like displayed:\");\n\t\tauthorHolder = scan.next();\n\t\tscan.nextLine();\n\t\tSystem.out.println(inventoryObject.displayByAuthor(authorHolder));\n\t\tgetUserInfo();\n\t}" ]
[ "0.8669274", "0.75554854", "0.71692365", "0.7123321", "0.7123321", "0.7123321", "0.7123321", "0.7123321", "0.71227884", "0.7111058", "0.70708096", "0.70123637", "0.6920894", "0.68893147", "0.6827786", "0.6746796", "0.6736455", "0.67220265", "0.6714081", "0.6685168", "0.6671973", "0.6661147", "0.66263926", "0.66104317", "0.6606731", "0.65931404", "0.6582974", "0.6582974", "0.6582974", "0.6582974", "0.6563116", "0.6561639", "0.6561639", "0.65205765", "0.65118355", "0.6507972", "0.6495495", "0.6491565", "0.6472575", "0.63892287", "0.637348", "0.63618934", "0.6359132", "0.63563", "0.635406", "0.63372546", "0.633465", "0.6326889", "0.6321476", "0.6300262", "0.6300256", "0.6280579", "0.627222", "0.6267101", "0.6254289", "0.62478745", "0.62478745", "0.6226979", "0.6226979", "0.6226979", "0.6226979", "0.6226979", "0.6226979", "0.6226979", "0.6226979", "0.6226979", "0.6226979", "0.6226979", "0.6226979", "0.6202044", "0.62009263", "0.6198762", "0.618083", "0.61553675", "0.6152586", "0.6129837", "0.6114986", "0.611074", "0.60917896", "0.6089943", "0.6089943", "0.60885435", "0.6078494", "0.60765576", "0.6074362", "0.606997", "0.6059992", "0.60508597", "0.6033", "0.6033", "0.60263556", "0.60249573", "0.60128766", "0.6012084", "0.6008605", "0.59869", "0.5981708", "0.5980595", "0.5975206", "0.5955829", "0.5951798" ]
0.0
-1
Update a book's Price
public void replacePrice(int ISBN, int replacement) { String sql = "UPDATE books SET Price = ? WHERE ISBN = ?"; try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) { // Set values pstmt.setInt(1, replacement); pstmt.setInt(2, ISBN); pstmt.executeUpdate(); } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changePrice(Booking booking, float price);", "private void changePrice() {\n\t\tint sic_idHolder; // declares sic_idHolder\n\t\tdouble priceHolder; // declares priceHolder\n\t\t\n\t\tSystem.out.println(\"Please enter the SIC-ID of the book you'd like to change the price of:\");\n\t\tsic_idHolder = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\tif(inventoryObject.cardExists(sic_idHolder)) { // checks to see if card exists\n\t\t\tSystem.out.println(\"Please enter the new price of the book:\");\n\t\t\tpriceHolder = scan.nextDouble();\n\t\t\tscan.nextLine();\n\t\t\tif(priceHolder < 0) { // checks to see if priceHolder is negative\n\t\t\t\tSystem.out.println(\"The price cannot be below zero\\n\");\n\t\t\t\tgetUserInfo();\n\t\t\t}\n\t\t\tinventoryObject.changePrice(sic_idHolder, priceHolder);\n\t\t\tgetUserInfo();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"The ID you entered does not exist\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t}", "public void setBookPrice(Float bookPrice) {\n this.bookPrice = bookPrice;\n }", "public void priceUpdate(String security, double price) {\n logger.debug(\"There is a price update for stock: \" + security + \" :: updated price: \" + price);\n stockMap.get(security).setPricePerUnit(price);\n for (Map.Entry<String, PersonalStock> entrySet : personalStockMap.entrySet()) {\n entrySet.getValue().priceUpdate(security, price);\n }\n }", "public void changePrice(TripDTO trip, BigDecimal price);", "public void updateJobPrice(int job_ID, double total_price, double total_discount){\n try {\n Stm = conn.prepareStatement(\"UPDATE `bapers`.`Job` SET Total_discount = ?, Total_price = ? WHERE Job_ID = ?;\");\n Stm.setDouble(1, total_discount);\n Stm.setDouble(2,total_price);\n Stm.setInt(3, job_ID);\n Stm.executeUpdate();\n Stm.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "void edit(Price Price);", "public void updatehotelincome(double price ){\n String query = \"update Hotel set Income = Income + ? \";\n \n try {\n PreparedStatement Query = conn.prepareStatement(query);\n Query.setDouble(1,price);\n Query.execute();\n \n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public void setPrice(double newPrice) {\r\n price = newPrice;\r\n }", "public void setPrice(double price)\n {\n this.price = price;\n }", "public void setPrice(double price)\n {\n this.price = price;\n }", "void update(Book book);", "public void changePrice(Product p, int price){\r\n\t\tp.price = price;\r\n\t}", "public void increasePrice() {\n //price doubled\n itemToSell.setBuyPrice(itemToSell.getBuyPrice() * 2);\n }", "public void editProductPrice(String price){\r\n\t\twdlib.waitForElement(getProductText());\r\n\t\tif(getProductText().getText().equals(\"None Included\")){\r\n\t\t\tselPproductBtn.click();\r\n\t\t\tProductsPage pdpage=new ProductsPage();\r\n\t\t\tpdpage.selectProducts();\r\n\t\t\tdriver.navigate().refresh();\r\n\t\t\tselProductOpt.click();\r\n\t\t\twdlib.waitForElement(getProductText());\r\n\t\t\teditBtn.click();\r\n\t\t\taddNewPrice(price);\r\n\t\t}\r\n\t\telse{\r\n\t\t\t\r\n\t\t\teditBtn.click();\r\n\t\t\taddNewPrice(price);\r\n\t\t}\r\n\t\tdriver.navigate().refresh();\r\n\t}", "public void setPrice(double price) {\r\n this.price = price;\r\n }", "public void setPrice(double price) {\r\n this.price = price;\r\n }", "public void setPrice(double price) {\r\n this.price = price;\r\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "ResponseEntity<Price> updatePrice(String cartId);", "public void setPrice(Double price);", "public void setPrice(Double price) {\r\n this.price = price;\r\n }", "void updatePriceReference(final ApplicationAssetPairTicker applicationAssetPairTicker);", "public void setPrice(int price) {\n this.price = (double)price;\n }", "public void setPrice(Money price) {\n this.price = price;\n }", "@Override\n\tpublic void doUpdate(SellOfer model, HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\t\t if(StringUtil.isEmpty(model.getPrice())){\n\t\t\t\t model.setPrice(\"0\");\n\t\t\t }\n\t\t\t double dprice =Double.parseDouble(model.getPrice());\n\t\t BigDecimal bg = new BigDecimal(dprice/10000);\n\t\t double f1 = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();\n\t\t model.setPrice(f1+\"\");\n\t\t model.setSource(\"001\");\n\t\t model.setSellContent(\"\");\n\t\tsuper.doUpdate(model, request, response);\n\t}", "public void setPrice(double p)\r\n\t{\r\n\t\tprice = p;\r\n\t}", "public void setPrice(double price){this.price=price;}", "public void changePrice(String a) {\r\n getPrice().editAmount(a);\r\n }", "private void updatePriceAndSaving() {\n movieOrder = new MovieOrder(movie, Weekday.weekdayForValue(selectedDay), flagsApplied, numberOfTickets);\n\n tvTotalPriceNewTickets.setText(getResources().getString(\n R.string.total_price_new_tickets,\n movieOrder.getTotalPriceAfterDiscount(),\n movieOrder.getNumberOfTicketsAfterOfferIsApplied())\n );\n\n tvSavingsNewTickets.setText(getResources().getString(\n R.string.today_saving_new_tickets,\n movieOrder.getTotalSaving()\n ));\n }", "public void setPrice(Double price) {\n this.price = price;\n }", "public void setPrice(Double price) {\n this.price = price;\n }", "public static String updatePrice(final double price, final int argItemId) {\r\n String msg = \"Update Unsuccessful\";\r\n\r\n int res = dao().updateItemPrice(price, argItemId);\r\n if (res > 0) {\r\n msg = \"Price updated successfully\";\r\n }\r\n return msg;\r\n }", "@Override\r\n\tpublic void updatebook(BookDto book) {\n\t\tsqlSession.update(ns + \"updatebook\", book);\r\n\t}", "public void putNewPrice(String symbol, double price);", "public void setPrice(int price) {\r\n this.price = price;\r\n }", "public void setPrice(int price) {\n this.price = price;\n }", "public void editServicePrice(String price){\r\n\t\twdlib.waitForElement(getServiceText());\r\n\t\tif(getServiceText().getText().equals(\"None Included\")){\r\n\t\t\tselServiceBtn.click();\r\n\t\t\tServicesPage srvpage=new ServicesPage();\r\n\t\t\tsrvpage.selectServices();\r\n//\t\t\tdriver.navigate().refresh();\r\n\t\t\tselServicOpt.click();\r\n\t\t\twdlib.waitForElement(getServiceText());\r\n\t\t\teditService.click();\r\n\t\t\taddNewPrice(price);\r\n\t\t}\r\n\t\telse{\r\n\t\t\teditService.click();\r\n\t\t\taddNewPrice(price);\r\n\t\t}\r\n\t\tdriver.navigate().refresh();\r\n\t}", "public void setPrice(double price) \n\t{\n\t\tthis.price = price;\n\t}", "public void setPrice(double price) {\r\n\t\tthis.price = price;\r\n\t}", "public void setPrice(double price) {\r\n\t\tthis.price = price;\r\n\t}", "public void setPrice(java.lang.Integer _price)\n {\n price = _price;\n }", "protected void updateOptionPrice(String optionName, float price)\n\t\t\tthrows AutoException {\n\t\tif (getOption(optionName) == null) {\n\t\t\tthrow new AutoException(CustomExceptionEnum.OptionNotFound);\n\t\t} else {\n\t\t\tgetOption(optionName).setPrice(price);\n\t\t}\n\t}", "public ProductWithStockItemTO changePrice(long storeID, StockItemTO stockItemTO) throws NotInDatabaseException, UpdateException;", "@Override\r\n\tpublic void setPrice(double p) {\n\t\tprice = p;\r\n\t}", "public void setPrice(int price) {\n\tthis.price = price;\n}", "public void updateOptionPrice(String modelName, String optionName, String option, float newPrice){\n\t\tAutomobile auto= autoSet.readModel(modelName);\n\t\tauto.updateOptionPrice(optionName, option, newPrice);\n\t}", "@Override\n\tpublic void updatePrice(Goods goods) {\n\t\tgoodsMapper.updateByPrimaryKeySelective(goods);\n\t}", "public void changePrices()\n {\n String publisher = (String) publishers.getSelectedItem();\n if (publisher.equals(\"Any\"))\n {\n result.setText(\"I am sorry, but I cannot do that.\");\n return;\n }\n try\n { \n if (priceUpdateStmt == null)\n priceUpdateStmt = conn.prepareStatement(priceUpdate);\n priceUpdateStmt.setString(1, priceChange.getText());\n priceUpdateStmt.setString(2, publisher);\n int r = priceUpdateStmt.executeUpdate();\n result.setText(r + \" records updated.\"); \n } \n catch (SQLException e)\n {\n result.setText(\"\");\n while (e != null)\n {\n result.append(\"\" + e);\n e = e.getNextException();\n }\n }\n }", "@Override\r\n\tpublic Book updateBook(Book book) {\n\t\treturn bd.save(book);\r\n\t}", "public void setPrice(double p) {\n\t\tprice = p;\n\t}", "public void setPrice(double value) {\n this.price = value;\n }", "public void setPrice(double value) {\n this.price = value;\n }", "public void setPrice(Integer price) {\r\n this.price = price;\r\n }", "public void setPrice(Integer price) {\r\n this.price = price;\r\n }", "public boolean updatePricingForId(int productId, Pricing pricing);", "public void setPrice(Integer price) {\n this.price = price;\n }", "public void setPrice(Integer price) {\n this.price = price;\n }", "public void setPrice(Integer price) {\n this.price = price;\n }", "public void setPrice(Integer price) {\n this.price = price;\n }", "@Override\r\n\tpublic boolean updateBook(long ISBN, int price) {\n\t\tif (searchBook(ISBN).getISBN() == ISBN) {\r\n\t\t\ttransactionTemplate.setReadOnly(false);\r\n\t\treturn transactionTemplate.execute(new TransactionCallback<Boolean>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic Boolean doInTransaction(TransactionStatus status) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\ttry {\r\n\t\t\t\r\n\t\t\t\t\t\tint rows = bookDAO.updateBook(ISBN, price);\r\n\t\t\t\t\t\tif (rows > 0)\r\n\t\t\t\t\t\t\treturn true;\r\n\r\n\t\t\t\t} catch (Exception exception) {\r\n\t\t\t\t\tstatus.setRollbackOnly();\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void setPrice(double price) {\n\t\tthis.price = price;\n\t}", "public void setPrice(double price) {\n\t\tthis.price = price;\n\t}", "public void setPrice(double price) {\n\t\tthis.price = price;\n\t}", "public void updatePrice(){\n\t\tprice = 0;\n\t\tfor (ParseObject selectedItem : selectedItems){\n\t\t\tprice += selectedItem.getInt(\"price\");\n\t\t}\n\n\t\tTextView orderTotal = (TextView) findViewById(R.id.orderTotal);\n\t\torderTotal.setText(\"$\" + price + \".00\");\n\t}", "public void setPrice(double p){\n\t\t// store into the instance variable price the value of the parameter p\n\t\tprice = p;\n\t}", "public void priceUpdate(){\n \n double attractionPrices = 0;\n Attraction attraction;\n for(int i=0; i< getAttractionsList().size();i++)\n {\n attraction = (Attraction) getAttractionsList().get(i);\n attractionPrices += attraction.getPrice();\n }\n hotelPrice = diff(getEndDate(), getStartDate());\n price = getTravel().getPrice() + getHotel().getPrice()*(hotelPrice) \n + getTransport().getPrice()*getTravel().getDistance()\n + attractionPrices;\n }", "public void setPrice(double price) \n\t{\n\t\tthis.price = price * quantity;\n\t}", "public void updatePriceArticle(int id, Float newPrice) {\n\n\t\tObjectSet result = db.queryByExample(new Article(id, null, null, null, 0));\n\n\t\tArticle articleTrobat = (Article) result.next();\n\t\tarticleTrobat.setRecommendedPrice(newPrice);\n\t\tdb.store(articleTrobat);\n\n\t\tSystem.out.println(\"Actualitzat preu del article \" + id);\n\t}", "@FXML\n\t private void updateProductPrice (ActionEvent actionEvent) throws SQLException, ClassNotFoundException {\n\t try {\n\t ProductDAO.updateProdPrice(prodIdText.getText(),newPriceText.getText());\n\t resultArea.setText(\"Price has been updated for, product id: \" + prodIdText.getText() + \"\\n\");\n\t } catch (SQLException e) {\n\t resultArea.setText(\"Problem occurred while updating price: \" + e);\n\t }\n\t }", "public void setPrice (double ticketPrice)\r\n {\r\n price = ticketPrice;\r\n }", "public void increasePrice(int percentage);", "public void setEBookPrice(Number value) {\n setAttributeInternal(EBOOKPRICE, value);\n }", "public void setPrice(Double price) {\n\t\tthis.price = price;\n\t}", "public void setPrice(int value) {\n this.price = value;\n }", "public void setPrice(Float price) {\r\n this.price = price;\r\n }", "public void setPrice(float itemPrice) \n {\n price = itemPrice;\n }", "public void setPrice(float price) {\n this.price = price;\n }", "public void setPrice(float price) {\n this.price = price;\n }", "public void setPrice(Float price) {\n this.price = price;\n }", "public void setPrice(BigDecimal price) {\r\n this.price = price;\r\n }", "public void setPrice(BigDecimal price) {\r\n this.price = price;\r\n }", "public void setPrice(BigDecimal price) {\n this.price = price;\n }", "public void setPrice(BigDecimal price) {\n this.price = price;\n }", "private void updatePrice() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tfor(int i = first;i<last;i++){\r\n\t\t\tProduct product = products.get(i);\r\n\t\t\tproduct.setPrivce(product.getPrivce()*(1+increment));\r\n\t\t}\r\n\t\t\r\n\t}", "public void setPotatoesPrice(double p);", "@Transactional\n @Modifying\n @Query(\"update Item i set i.price = i.price * 1.1\")\n void increacePriceBy10Percent();", "public void updateStockPrice(String ticker, double currentUnitValue) {\n\t\tStock stock = this.findStockByTicker(ticker);\n\t\tstock.setCurrentUnitValue(currentUnitValue);\n\t\tstockRepo.save(stock);\t\n\t}", "public void update(int bookId, int quantity){ \n JSONObject jbook = dbmanager.getBmanager().readJSON(bookId);\n dbmanager.getBmanager().delete(bookId);\n jbook.remove(\"quantity\");\n jbook.put(\"quantity\", Integer.toString(quantity));\n dbmanager.open();\n dbmanager.createCommit(getNextBookId(),jbook);\n dbmanager.close();\n \n }", "void update(Seller obj);", "void update(Seller obj);", "public void setPrice(Long price) {\n this.price = price;\n }", "public void setPrice(java.math.BigDecimal price) {\n this.price = price;\n }", "int updateByPrimaryKey(ProductPricelistEntity record);", "@Override\r\n\tpublic int updateBookInfo(Book book, int book_id) {\n\t\treturn 0;\r\n\t}" ]
[ "0.77858925", "0.7104239", "0.7007472", "0.6964306", "0.69613314", "0.6957477", "0.69318825", "0.69238037", "0.6879426", "0.6859384", "0.68405956", "0.68293667", "0.68267816", "0.6813222", "0.6811154", "0.67902684", "0.67902684", "0.67902684", "0.67788935", "0.67788935", "0.67788935", "0.67788935", "0.67788935", "0.67788935", "0.67788935", "0.67779464", "0.6774117", "0.6758296", "0.67441845", "0.67385995", "0.6722109", "0.67069656", "0.6703832", "0.66996115", "0.66983485", "0.6684658", "0.6682303", "0.6682303", "0.66788465", "0.6675367", "0.66652197", "0.66621774", "0.6643283", "0.6616914", "0.66104335", "0.6579995", "0.6579995", "0.6575366", "0.65624595", "0.65566933", "0.65512496", "0.65346473", "0.65346396", "0.6527681", "0.6527188", "0.65262175", "0.6519222", "0.6518872", "0.6518872", "0.65130246", "0.65130246", "0.65113056", "0.65031075", "0.65031075", "0.65031075", "0.65031075", "0.6490808", "0.64907676", "0.64907676", "0.64907676", "0.64749414", "0.644395", "0.6439969", "0.6418951", "0.64180684", "0.6412928", "0.64028394", "0.6388283", "0.63855773", "0.63818574", "0.63704234", "0.63653284", "0.63602424", "0.6356476", "0.6356476", "0.6351324", "0.6348997", "0.6348997", "0.6348737", "0.6348737", "0.634451", "0.6319285", "0.6312181", "0.63050103", "0.63023216", "0.62993234", "0.62993234", "0.6295946", "0.62876916", "0.62861466", "0.6285375" ]
0.0
-1
Construct a linked list of strings in the Cons, based on the provided inputs.
public Cons(String first, BagOfWordsList restOfBag) { this.first = first; this.restOfBag = restOfBag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ArrayList<String> createList(String finalInput);", "public static void main(String [] args) {\n DoublyLinkedList<String> ll = new DoublyLinkedList<String>();\n\n String[] alphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".split(\"\");\n\n for (String s : alphabet) {\n ll.addFirst(s);\n ll.addLast(s);\n }\n System.out.println(ll.toString());\n\n for (String s : ll) {\n System.out.print(s + \", \");\n }\n }", "public InputLinkedList(String sInputList) \n\t{\n\t\t//String array for storing each element after ectracting them from the input string\n\t\tString[] splitString = new String[sInputList.length()];\n\t\t\n\t\t//Gives the number of elements in the input List \n\t\tint len = 0;\n\t\t\n\t\t//Checking the input string for presence of spaces\n\t\tfor(int i=0; i < sInputList.length(); i++)\n\t\t{\n\t\t\t\n\t\t\t//Checking whether the character at the current position is a space or not\n\t\t\tif(sInputList.charAt(i) != ' ')\n\t\t\t{\n\t\t\t\t\n\t\t\t\t//Extracting each element from the string and storing them in a string array\n\t\t\t\tsplitString[len] = sInputList.substring(i, sInputList.indexOf(' ', i) == -1 ? sInputList.length() : sInputList.indexOf(' ', i));\n\t\t\t\t\n\t\t\t\t//Updating the value of i\n\t\t\t\ti = sInputList.indexOf(' ', i) == -1 ? sInputList.length() : sInputList.indexOf(' ', i);\n\t\t\t\t\n\t\t\t\t//Incrementing len\n\t\t\t\tlen++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Getting the reference of the head of the Linked List\n\t\tNode ref = head;\n\t\tfor (int i = 0; i < len; i++)\n\t\t{\n\t\t\tif(i == 0)\n\t\t\t{\n\t\t\t\t//If it is the 1st element then create a new \n\t\t\t\t//Node object and assign it to ref and head\n\t\t\t\tref = new Node();\n\t\t\t\thead = ref;\n\t\t\t}\n\t\t\t\n\t\t\t//Create a temporary Node object\n\t\t\tNode temp = new Node();\n\t\t\t\n\t\t\t//Getting the Integer value of the element which are stored as string \n\t\t\t//in the string array and assigning them to the value part of the temp Node\n\t\t\ttemp.value = Integer.parseInt(splitString[i]);\n\t\t\t\n\t\t\t//Assigning the next reference of ref to temp \n\t\t\tref.next = temp;\n\t\t\t\n\t\t\t//Assigning the reference of temp to ref\n\t\t\tref = temp;\n\t\t}\n\t}", "ListString createListString();", "private void createList(String[] toAdd) {\n FixData fixedList;\n for (int i = 0; i < toAdd.length; ++i) {\n fixedList = new FixData(toAdd[i]);\n if (pickAdjacent(fixedList))\n this.head = createListWrap(this.head, fixedList);\n else\n fixedList = null;\n }\n }", "public static ListNode stringToListNode(String input) {\n int[] nodeValues = stringToIntegerArray(input);\n\n // Now convert that list into linked list\n ListNode dummyRoot = new ListNode(0);\n ListNode ptr = dummyRoot;\n for (int item : nodeValues) {\n ptr.next = new ListNode(item);\n ptr = ptr.next;\n }\n return dummyRoot.next;\n }", "public void buildAList(String s)\n {\n if(head == null)\n {\n Node tempFirst = new Node(s);\n \n head = tempFirst;\n tempFirst.next = head;\n }\n else\n {\n Node current = head;\n \n while(current.next != head)\n {\n current = current.next;\n }\n \n Node temp = new Node(s);\n \n current.next = temp;\n current = temp;\n temp.next = head;\n }\n }", "StringList createStringList();", "public static void main(String [] args) {\n ArrayList<String> all;\n LinkedList<String> ll;\n CircularlyLinkedList<String> sll = new CircularlyLinkedList<>();\n\n String[] alphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".split(\"\");\n\n for (String s : alphabet) {\n sll.addFirst(s);\n sll.addLast(s);\n }\n System.out.println(sll.toString());\n\n sll.rotate();\n sll.rotate();\n\n for (String s : sll) {\n System.out.print(s + \", \");\n }\n\n }", "public StringLinkedList() {\n super();\n }", "public LinkList(String data){\n this.head = new Node(data, null);\n this.tail = this.head;\n }", "private void generateLists(String num, Stack<String> numberList)\n {\n\tfor(int i = 0, len = num.length(); i < len; i++)\n\t numberList.push(new Character(num.charAt(i)).toString());\n }", "public FrequencyList (String input){\n\tadd(input);\n }", "private static AbstractList construct(LinkedList arg) {\n if (arg.isEmpty())\n return new EmptyList();\n else {\n Object fst = arg.pollFirst();\n //FIXME: The stupid bug in Gson.\n if (fst instanceof Double) fst = ((Double) fst).intValue();\n return new Cons(fst, construct(arg));\n }\n }", "public static PropertyDescriptionBuilder<List<String>> listOfStringsProperty(String name) {\n // Trick to work-around type erasure\n // https://stackoverflow.com/a/30754982/2535153\n @SuppressWarnings(\"unchecked\")\n Class<List<String>> clazz = (Class<List<String>>)(Class<?>)List.class;\n return PropertyDescriptionBuilder.start(name, clazz, Parsers.parseList(Parsers::parseString));\n }", "public static void main(String[] args) {\n// LinkedList\n String leWord = \"meow\";\n char[] arrChar = leWord.toCharArray();\n LinkedList newLinkList = new LinkedList(arrChar);\n\n\n\n\n//\n\n\n }", "@Override\n\tpublic void initialize(String source) {\n\t\tmyFirst = new Node(source);\n\t\tmyLast = new Node(\"\");\n\t\tmyLast = myFirst;\n\t\t\n\t\tmyFirst.next = myLast;\n\t\tmyLast.next = null;\n\t\t//myFirst.info = s;\n\t\t//myFirst.next = myLast;\n\t\t//myLast.info =s;\n\t\t//myLast.next = null;\n\t\tmySize = source.length();\n\t\tmyAppends = 0;\n\t\t\n\t\tmyIndex = 0;\n\t\tmyLocalIndex = 0;\n\t\tmyCurrent = myFirst;\n\t\t\n\t}", "public static LinkedList_Details createList() {\n\n\t\t\t\t\tSystem.out.print(\"\\nEnter min length of list : \");\n\t\t\t\t\tScanner sc = new Scanner(System.in);\n\t\t\t\t\tint len = sc.nextInt(); //take min length of list \n\t\t\t\t\tint i = 0; //loop counter variable\n\t\t\t\t\tint v; //list values will be assigned to this variable in loop\n\n\t\t\t\t\tNode head = null; //head node declaration\n\t\t\t\t\tNode temp = null; //temp node to keep track of node in loop\n\n\t\t\t\t\t//If we dont want to enter list values manually, we can generate random values\n\t\t\t\t\tSystem.out.println(\"\\nDo you want enter your own values for the list? if Yes, enter 1 \\nif No, enter 0\");\n\t\t\t\t\tScanner rd_sc = new Scanner(System.in);\n\t\t\t\t\tint rd_val = rd_sc.nextInt();\n\t\t\t\t\t\n\t\t\t\t\twhile (i <= len) {\n\n\t\t\t\t\t\t\t\tif( i == len) {\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\nYou have created a list of \" + len + \" values.\"); \n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Do you still want to enter values in the list?\");\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"if Yes, enter the length by which you want to extend the list\");\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"if No, enter 0\");\n\n\t\t\t\t\t\t\t\t\t\tScanner li_sc = new Scanner(System.in);\n\t\t\t\t\t\t\t\t\t\tint ext_len = li_sc.nextInt();\n\t\t\t\t\t\t\t\t\t\tlen = len + ext_len;\n\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\tif(i < len){\t\t\t\t\t\t\t\t\t\n\t\n\t\t\t\t\t\t\t\t\t\tif(rd_val == 0) {\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tRandom rand = new Random(); \n\t\t\t\t\t\t\t\t\t\t\t\t\tv = rand.nextInt(1000);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Enter a value for the list\");\n\t\t\t\t\t\t\t\t\t\t\tScanner val_sc = new Scanner(System.in);\n\t\t\t\t\t\t\t\t\t\t\tv = val_sc.nextInt();\n\t\t\t\t\t\t\t\t\t\t} \n\t\t\n\t\t\t\t\t\t\t\t\t\tif(head == null) { temp = new Node(v); head = temp; }\n\t\t\t\n\t\t\t\t\t\t\t\t\t\telse {\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\ttemp.next = new Node(v);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\ttemp = temp.next;\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\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\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tLinkedList_Details ld = new LinkedList_Details(len, head);\n\n\t\t\t\t\treturn ld;\n\t\t\t}", "private void doLists () {\n char lastListChar = ' ';\n char thisListChar = ' ';\n\n // Determine how deeply lists are nested\n int listDepth = context.lastListChars.length();\n if (listChars.length() > listDepth) {\n listDepth = listChars.length();\n }\n\n // Determine how deeply we are maintaining existing lists with new line\n int listCharsMatchingDepth = 0;\n for (int i = 0; i < listDepth; i++) {\n thisListChar = charAt (listChars.toString(), i);\n lastListChar = charAt (context.lastListChars, i);\n if (thisListChar == lastListChar) {\n listCharsMatchingDepth = i + 1;\n }\n }\n\n // Where list characters don't match, end any lists in progress\n for (int i = listDepth - 1; i >= listCharsMatchingDepth; i--) {\n lastListChar = charAt (context.lastListChars, i);\n if (lastListChar == '*') {\n lineInsert (\"</li>\");\n lineInsert (\"</ul>\");\n }\n else\n if (lastListChar == '#') {\n lineInsert (\"</li>\");\n lineInsert (\"</ol>\");\n }\n else\n if (lastListChar == ';') {\n lineInsert (closeDefinitionTag(lastDefChar));\n lastDefChar = ' ';\n lineInsert (\"</dl>\");\n }\n }\n\n // Where list characters don't match, start any new lists needed\n for (int i = listCharsMatchingDepth; i < listDepth; i++) {\n thisListChar = charAt (listChars.toString(), i);\n StringBuffer listStart = new StringBuffer();\n if (thisListChar == '*') {\n listStart.append (\"ul\");\n }\n else\n if (thisListChar == ';') {\n listStart.append (\"dl\");\n } else {\n listStart.append (\"ol\");\n }\n if (klass.length() > 0) {\n listStart.append (\" class=\\\"\" + klass + \"\\\"\");\n }\n if (thisListChar == '*') {\n lineInsert (\"<\" + listStart.toString() + \">\");\n lineInsert (\"<li>\");\n }\n else\n if (thisListChar == '#') {\n lineInsert (\"<\" + listStart.toString() + \">\");\n lineInsert (\"<li>\");\n }\n else\n if (thisListChar == ';') {\n lineInsert (\"<\" + listStart.toString() + \">\");\n lineInsert (openDefinitionTag(thisListChar));\n }\n }\n\n // If List characters all match, then continue list in process\n if (listCharsMatchingDepth == listDepth && listDepth > 0) {\n if (thisListChar == ';') {\n lineInsert (closeDefinitionTag(lastDefChar));\n lastDefChar = ' ';\n lineInsert (\"<dt>\");\n } else {\n lineInsert (\"</li>\");\n lineInsert (\"<li>\");\n }\n }\n\n // If some lists ended, but some continuing, start new list item\n if (listCharsMatchingDepth > 0\n && listCharsMatchingDepth < listDepth) {\n thisListChar = charAt (listChars.toString(), listCharsMatchingDepth - 1);\n if (thisListChar == '*') {\n lineInsert (\"<li>\");\n }\n else\n if (thisListChar == '#') {\n lineInsert (\"<li>\");\n } else\n if (thisListChar == ';') {\n lineInsert (openDefinitionTag(thisListChar));\n }\n }\n\n // Save latest list characters\n context.lastListChars = listChars.toString();\n }", "List<String> mo5877c(String str);", "public ConsList<String> tryToConsumeInput( ConsList<String> unprocessedInput );", "@NonNull\n @SafeVarargs\n static <V> ConsList<V> list(@NonNull V... elements) {\n ConsList<V> cons = nil();\n for (int i = elements.length - 1; i >= 0; i--) {\n cons = new ConsListImpl<>(elements[i], cons);\n }\n return cons;\n }", "public static Node createList(){\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Enter size of linked list:\");\n int n = sc.nextInt();\n\n Node head = new Node(sc.nextInt());\n Node ref = head;\n while(--n!=0) {\n head.next = new Node(sc.nextInt());\n head = head.next;\n }\n return ref;\n\n }", "private List<String> buildList() {\n List<String> list = new ArrayList<>();\n list.add(\"Traveled Meters by Day\");\n list.add(\"Sensor Coverage\");\n list.add(\"No Movement Detection\");\n return list;\n }", "public static List<String> createCompetencyList() {\n List<String> list = new ArrayList<String>();\n list.add(\"Line number 1\");\n list.add(\"Line number 2\");\n return list;\n }", "interface ILoString {\n \n // Initiates translating this list of nucleotides into a list of proteins\n ILoLoString translate(); \n \n // Translates this list of nucleotides into a list of proteins\n ILoLoString ribosome(ILoString loc, ILoLoString lop, boolean go); \n \n // Take the first n characters from this list of nucleotides\n String getFirst(int n); \n \n // Remove the first n characters from this list of nucleotides/codons\n ILoString removeFirst(int n);\n \n // Append given string onto this list of nucleotides/codons\n ILoString append(String that); \n \n // Finds the length of this list of nucleotides/codons\n int length(); \n \n}", "private static TriNode buildTri(String[] str) {\r\n TriNode n = new TriNode();\r\n for (String s : str) {\r\n n.append(s);\r\n }\r\n return n;\r\n }", "public StringList(int capacity) {\n super(capacity);\n }", "@Override\n\tpublic INode build(List<INode> input) {\n\t\treturn null;\n\t}", "public static void main(String[] args) {\n StringLinkedList list = new StringLinkedList();\n list.add(\"First\");\n list.add(\"Second\");\n list.add(\"Third\");\n\n System.out.println(list.get(0));\n System.out.println(list.get(1));\n System.out.println(list.get(2));\n System.out.println(list.get(3));\n }", "@Override\r\n // WEI XU METHOD 2\r\n \r\n public void train(String sourceText) {\r\n String[] words1 = sourceText.split(\"[\\\\s]+\");\r\n // add starter to be a next word for the last word in the source text.\r\n List<String> words = new ArrayList<String>(Arrays.asList(words1));\r\n words.add(words1[0]);\r\n starter = words1[0];\r\n String prevWord = starter;\r\n for (int i = 1; i < words.size(); i++) {\r\n ListNode node = findNode(prevWord);//todo:it's a reference? but not a new Listnode? so no need set back?\r\n if (node == null) {\r\n node = new ListNode(prevWord);\r\n wordList.add(node);\r\n }\r\n node.addNextWord(words.get(i));//todo: why hashmap need set back value, linkedlist don't need?\r\n prevWord = words.get(i);\r\n }\r\n }", "public UtillLinkList() {\n\t\tlist = new LinkedList<String>();\n\t}", "private CXNode generateSubNodes(String[] strs, CXCSVSchemaNode schema)\n\t{\n\t\tCXNode root = new CXNode(schema.name);\n\t\tList<CXCSVSchemaNode> childrenSchema = schema.children;\n\t\tif (childrenSchema == null)\n\t\t{\n\t\t\t// the leaf node\n\t\t\troot.content = strs[schema.startIdx];\n\t\t} else\n\t\t{\n\t\t\tfor (int i = 0; i < childrenSchema.size(); i++)\n\t\t\t{\n\t\t\t\tCXCSVSchemaNode childSchema = childrenSchema.get(i);\n\t\t\t\tCXNode child = generateSubNodes(strs, childSchema);\n\t\t\t\troot.addChild(child);\n\t\t\t}\n\t\t}\n\t\treturn root;\n\t}", "private LinkedList<TermDocList> generateTermDocList(LinkedList<String> list){ \n \n LinkedList<TermDocList> merge_list = new LinkedList<TermDocList>();\n //extract a string from a slave node\n for (int i = 0; i < list.size(); i++) {\n String[] termList = list.get(i).split(\"\\n\");\n// System.out.println(\"termList: \"+list.get(i)); \n \n //extract a string lead by a term\n for (int j = 0; j < termList.length; j++) {\n //process the string, store in the termInfo, insert into termInfo list\n TermDocList jtermDocList = new TermDocList();\n String[] temp = termList[j].split(\" \");\n// System.out.println(\"temp length: \"+temp.length); \n jtermDocList.term = temp[0];\n\n jtermDocList.totalfreq = Integer.parseInt(temp[1]);\n jtermDocList.docList = new ArrayList<DocInfo>();\n //convert temp[2] to an arraylist\n String regular = \"(\\\\w{6},\\\\w+)\";\n Pattern p = Pattern.compile(regular);\n Matcher m = p.matcher(temp[2]);\n while (m.find()) {\n String[] docTemp = m.group(1).split(\",\");\n DocInfo newdocInfo = new DocInfo(docTemp[0], Integer.parseInt(docTemp[1]));\n jtermDocList.docList.add(newdocInfo);\n }\n merge_list.add(jtermDocList);\n }\n }\n return merge_list;\n }", "public List<Person> createPersonListUsingNew() {\n return names.stream()\n // .parallel()\n .map(Person::new)\n .collect(LinkedList::new, // Supplier<LinkedList>\n LinkedList::add, // BiConsumer<LinkedList,Person>\n LinkedList::addAll); // BiConsumer<LinkedList,LinkedList>\n }", "public List<String> generateParenthesis(int n) {\n List<String> res = new LinkedList<>();\n backTrack(n, n, \"\", res);\n return res;\n}", "private static List<String> testStringGenerator(List<String> palString) {\n\t\tList<String> list = new ArrayList<>();\n\t\tfor (String pal : palString) {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tsb.append(pal);\n\t\t\t\tfor (int j = 0; j < pal.length(); j++) {\n\t\t\t\t\tsb.append(j % 10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(sb.toString());\n\t\t}\n\t\treturn list;\n\t}", "public ListNode createList(int len) {\r\n\t\tListNode head = null;\r\n\t\tRandom r = new Random(10);\r\n\t\tfor (int i = 0; i < len; ++i) {\r\n\r\n\t\t\thead = createNode(head, r.nextInt(20) + 1);\r\n\t\t}\r\n\r\n\t\treturn head;\r\n\t}", "public void addListMembers(String cat, List<String> inputs) {\n addListMembers(cat, inputs.toArray(new String[0]));\n }", "public final TList addList(final List<String> strings, final int x,\n final int y, final int width, final int height,\n final TAction enterAction) {\n\n return new TList(this, strings, x, y, width, height, enterAction);\n }", "private static String list(Iterable iterable, String initialString, String delimiter) {\n Iterator iterator = iterable.iterator();\n if (!iterator.hasNext()) return \"\"; // empty?\n StringBuilder buffer = new StringBuilder(initialString + iterator.next().toString());\n while (iterator.hasNext()) buffer.append(delimiter).append(iterator.next().toString());\n return buffer.toString();\n }", "public listNode(String val) {\n\t\t\tdata= val;\n\t\t\tnext= null;\n\t\t\tprevious= null;\n\t\t}", "private List<String> getList(String digits) {\n\t\tif(digits.length() == 0) \n\t\t\treturn new LinkedList<String>();\n\t\t\n\t\n\t\treturn Arrays.asList(getCrossProduct(digits));\n\n\t\t\n\t}", "public static void main(String[] args) {\n String input = \"ABC\";\n List<String> result = new ArrayList <> ();\n result = permutations(input);\n System.out.println(Arrays.asList(result)); \n }", "abstract void makeList();", "public static void main(String args[]) {\n LinkedList list = new LinkedList();\n // add elements to the linked list\n list.add(\"M\");\n list.add(\"A\");\n list.add(\"N\");\n list.add(\"is\");\n list.add(\"#\");\n list.addLast(\"1\");\n list.addFirst(\"A\");\n list.add(0, \"A2\");\n System.out.println(\"The contents of the linked list are: \" + list); \n }", "InductiveList<E> cons(E elem);", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in, \"utf-8\");\n CircularLinkedList<String> q = new CircularLinkedList<String>();\n while (sc.hasNext()) {\n q.append(sc.next());\n System.out.println(\"Elements in queue:\\t\\t\\t\" + q);\n System.out.println(\"Number of elements in queue:\\t\\t\" + q.size());\n }\n while (! q.isEmpty()) {\n System.out.println(\"Returned element from queue:\\t\\t\" + q.getFirst());\n System.out.println(\"Elements in queue:\\t\\t\\t\" + q);\n System.out.println(\"Number of elements in queue:\\t\\t\" + q.size());\n }\n\n sc = new Scanner(System.in, \"utf-8\");\n while (sc.hasNext()) {\n q.prepend(sc.next());\n System.out.println(\"Elements in queue:\\t\\t\\t\" + q);\n System.out.println(\"Number of elements in queue:\\t\\t\" + q.size());\n }\n while (! q.isEmpty()) {\n System.out.println(\"Returned element from queue:\\t\\t\" + q.getLast());\n System.out.println(\"Elements in queue:\\t\\t\\t\" + q);\n System.out.println(\"Number of elements in queue:\\t\\t\" + q.size());\n }\n }", "public static SList<Character> make(String str) {\n SList<Character> ans = new SList<Character>();\n for (int i=0; i<str.length(); i++)\n ans.add(str.charAt(i));\n return ans;\n }", "public WordChain(String input_a) {\n\t\tint i;\n\t\tint start;\n\t\tint finish;\n\t\tString input;\n\n\t\t//Initialise\n\t\twc = new Vector();\n\t\tstart = 0;\n\t\tfinish = 0;\n\t\ti = 0;\n\n\t\t//Get rid of non-word characters\n\t\tinput = removePunctuation(input_a, false);\n\n\t\t//Each word chain has a \"_start_node_\" and an \"_end_node_\"\n\t\twc.add(\"_start_node_\");\n\n\t\t//Search for white space and grab characters from in between\n\t\twhile ((start < input.length()) && (finish < input.length())) {\n\t\t\twhile (((input.charAt(start) == ' ') || (input.charAt(start) == '\\t') || (input.charAt(start) == '\\n'))\n\t\t\t\t\t && (start < input.length() - 1)) {\n\t\t\t\tstart++;\n\t\t\t}\n\n\t\t\tfinish = start;\n\t\t\twhile (((input.charAt(finish) != ' ') && (input.charAt(finish) != '\\t') && (input.charAt(finish) != '\\n'))\n\t\t\t\t\t && (finish < input.length() - 1)) {\n\t\t\t\tfinish++;\n\t\t\t}\n\n\t\t\t//Add new word to chain\n\t\t\tif (start < finish) {\n\t\t\t\twc.add(input.substring(start, finish));\n\t\t\t}\n\t\t\tstart = finish + 1;\n\t\t}\n\n\t\t//add end node\n\t\twc.add(\"_end_node_\");\n\t}", "public List<List<String>> partition(String s) {\n if(s == null || s.length() == 0){\n return output;\n }\n \n helper(s, 0, new ArrayList<String>());\n \n return output;\n }", "public void genLists() {\n\t}", "public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tString str;\n\t\tSystem.out.print(\"Enter the string : \");\n\t\tstr = scan.next();\n\t\tint len = str.length();\n\t\tAssignment obj = new Assignment();\n\t\tobj.recursiveCall(str, 0, len);\n\n\t\tfor (int i = 0; i <= lst.size() - 1; i++) {\n\t\t\tSystem.out.println(lst.get(i));\n\t\t}\n\t}", "public void pushFront(String value)\n {\n\tStringListNode node = new StringListNode(value);\n\tnode.next = head;\n\tif (null == head) {\t// the list was empty\n\t tail = node;\n\t}\n\telse {\n\t head.prev = node;\n\t}\n\thead = node;\n }", "public static MutableLinearList start () {\r\n\t\t\r\n\t\tMutableLinearList list = new MutableLinearList();\r\n\t\tMutableLinearList item2 = new MutableLinearList();\r\n\t\tMutableLinearList item3 = new MutableLinearList();\r\n\t\t\r\n\t\tlist.head = 42;\r\n\t\tlist.tail = item2;\r\n\t\t\r\n\t\titem2.head = 8;\r\n\t\titem2.tail = item3;\r\n\t\t\r\n\t\titem3.head = 15;\r\n\t\titem3.tail = null;\r\n\t\t\r\n\t\t\r\n/*\t\t// alternative Implementierung:\r\n\t\tMutableLinearList list = new MutableLinearList();\r\n\t\tlist.head = 15;\r\n\t\tlist.addInFront(8);\r\n\t\tlist.addInFront(42);\r\n*/\t\t\r\n\t\t\r\n\t\treturn list;\r\n\t}", "String getStringList();", "public static void stringConstructionMain(String[] args) {\n Scanner in = new Scanner(System.in);\n int q = in.nextInt();\n for(int a0 = 0; a0 < q; a0++){\n String s = in.next();\n int result = stringConstruction(s);\n System.out.println(result);\n }\n in.close();\n }", "private static Node createLoopedList()\n {\n Node n1 = new Node(1);\n Node n2 = new Node(2);\n Node n3 = new Node(3);\n Node n4 = new Node(4);\n Node n5 = new Node(5);\n Node n6 = new Node(6);\n Node n7 = new Node(7);\n Node n8 = new Node(8);\n Node n9 = new Node(9);\n Node n10 = new Node(10);\n Node n11 = new Node(11);\n\n n1.next = n2;\n n2.next = n3;\n n3.next = n4;\n n4.next = n5;\n n5.next = n6;\n n6.next = n7;\n n7.next = n8;\n n8.next = n9;\n n9.next = n10;\n n10.next = n11;\n n11.next = n5;\n\n return n1;\n }", "public static void main(String [] args)\r\n\t{\n\t\t\r\n\t\tArrayList<String> arl = new ArrayList<String>();\r\n\t\t\t//addAryList(arl);\r\n\t\tprintArryList(arl);\r\n\t\t//n = sc.nextInt();\r\n\t LinkedList<String> lst = new LinkedList<String>();\r\n\t\tprintLList(lst);\r\n\r\n\t}", "public String toString(){\n\t\tString list=\"\";\n\t\tif(isEmpty()==false){\n\t\t\tDoubleNode temp=head;\n\t\t\twhile(temp!=null){\n\t\t\tlist += temp.getC();\n\t\t\ttemp=temp.getNext();\n\t\t\t}\n\t\t\treturn list;\n\t\t}\n\t\telse{\n\t\t\treturn list;\n\t\t}\n\t}", "public static void main(String[] args)\n {\n reverse_linkedlist reverse=new reverse_linkedlist();\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n\n for(int i=0;i<n;i++)\n {\n int data=sc.nextInt();\n reverse.append(data);\n }\n reverse.reverse_recursion(reverse.head);\n // reverse.printlist();\n\n }", "List<Node> getNode(String str);", "public void addListMembers(String cat, String[] inputs) {\n clearKeyCategory(cat);\n int i = 0;\n\n for (String v : inputs) {\n setProperty(cat + keyDigs.format(i++), v);\n }\n }", "public void addToStart(String value) {\n ListElement current = new ListElement(value);\n if (count == 0) {\n head = current;\n tail = current;\n } else {\n current.connectNext(head);\n head = current;\n }\n count++;\n }", "public static StringList createFrom(String list1[], String list2[], String list3[]) {\n StringList list = new StringList(list1);\n list.merge(list2);\n list.merge(list3);\n return list;\n }", "public static void main(String[] args) {\n\t\tList<Integer> list = new ArrayList<>();\n\t\tlist.add(5);\n\t\tlist.add(6);\n\t\tlist.add(9);\n\t\tlist.add(7);\n\t\tlist.add(11);\n\t\t\n\t\tList<String> list1 = new ArrayList<>();\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t list1.add(i, list.get(i)+\"*\");\n\t\t}\n\t\tSystem.out.println(list1);\n\t\t\n\t\t\n\t\t\n\n\t}", "private List<Suggestion> createSuggestionsForLinearization(\n List<NameResult> namesInQuestion,\n Suggestion input,\n List<List<NameResult>> additionalNames) {\n\n List<Suggestion> suggestions = new ArrayList<>();\n\n String linearization = fillTemplate(input.getText(), namesInQuestion);\n\n int nrUnknowns = defTempl.listVariables(linearization).size();\n if (nrUnknowns > additionalNames.size()) {\n throw new InternalError(\"No suggestions for unknown template variables.\");\n }\n if (nrUnknowns == 0) {\n return Arrays.asList(new Suggestion(\n linearization,\n true, input.getAdditionalNamesCount(),\n input.getAdditionalGrammarWords(),\n input.getAlteredGrammarWordsCount()));\n }\n\n while (true) {\n String currentSuggestion = linearization;\n boolean allNamesFilled = true;\n\n for (List<NameResult> currentNames : additionalNames) {\n\n if (currentNames.size() <= suggestions.size()) {\n allNamesFilled = false;\n break;\n }\n\n currentSuggestion = fillTemplate(currentSuggestion,\n currentNames.get(suggestions.size()));\n }\n\n if (allNamesFilled) {\n suggestions.add(new Suggestion(\n currentSuggestion, true,\n input.getAdditionalNamesCount(),\n input.getAdditionalGrammarWords(),\n input.getAlteredGrammarWordsCount()));\n }\n else {\n break;\n }\n }\n\n return suggestions;\n }", "static List DuplicateElements(List<Character> characters){\r\n\t\tList newlist=new ArrayList<>();\r\n\t\tfor(char c:characters)\r\n\t\t{\r\n\t\t\tnewlist.add(Collections.nCopies(2,c ));\r\n\t\r\n\t\t}\r\n\tSystem.out.println(newlist);\r\n\treturn newlist;\r\n\t}", "public void cbuild(String in) {\n\r\n\t\tPattern p = Pattern.compile(\"(\\\\w+)\\\\s*\\\\[([a-zA-Z-0-9,]+)\\\\]\");\r\n\t\tMatcher mm = p.matcher(in);\r\n\t\tint i = 0;\r\n\r\n\t\twhile (mm.find()) {\r\n\t\t\ti++;\r\n\r\n\t\t\tString[] temp = mm.group(2).split(\",\");\r\n\t\t\tcliques.put(mm.group(1), new ArrayList<String>());\r\n\t\t\tfor (int j = 0; j < temp.length; j++) {\r\n\t\t\t\tcliques.get(\"c\" + i).add(temp[j]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public LinkedList concatenate(LinkedList anotherList) {\n\t\tLinkedList newString = stringList;\n\t\t\n\t\treturn newString;\n\t}", "void testListMethods(Tester t) {\n IList<Integer> mt = new Empty<Integer>();\n IList<Integer> l1 = new Cons<Integer>(1,\n new Cons<Integer>(2, new Cons<Integer>(3, \n new Cons<Integer>(4, mt))));\n\n t.checkExpect(mt.len(), 0);\n t.checkExpect(l1.len(), 4);\n\n t.checkExpect(mt.append(l1), l1);\n t.checkExpect(l1.append(mt), l1);\n\n t.checkExpect(mt.getData(), null);\n t.checkExpect(l1.getData(), 1);\n\n t.checkExpect(l1.getNext(), new Cons<Integer>(2 , new Cons<Integer>(3 , \n new Cons<Integer>(4 , mt))));\n }", "public static List<Input> inputList_with_dependency_no_timeout() {\n Input t6 = new Input(\"T6\",2, 46);\n Input t5 = new Input(\"T5\",1, 45);\n Input t4 = new Input(\"T4\",4, 44);\n Input t3 = new Input(\"T3\",3, 43);\n Input t2 = new Input(\"T2\",2, 42);\n Input t1 = new Input(\"T1\",1, 41);\n List<String> t4Dependencies = new ArrayList<>(); t4Dependencies.add(\"T5\"); t4Dependencies.add(\"T6\");\n t4.setDependencies(t4Dependencies);\n List<String> t3Dependencies = new ArrayList<>(); t3Dependencies.add(\"T4\");\n t3.setDependencies(t3Dependencies);\n List<String> t2Dependencies = new ArrayList<>(); t2Dependencies.add(\"T4\");\n t2.setDependencies(t2Dependencies);\n List<String> t1Dependencies = new ArrayList<>(); t1Dependencies.add(\"T4\"); t1Dependencies.add(\"T5\");\n t1.setDependencies(t1Dependencies);\n List<Input> input = new ArrayList<>(); input.add(t6); input.add(t1); input.add(t4); input.add(t2); input.add(t5);\n input.add(t3);\n return input;\n }", "public final TList addList(final List<String> strings, final int x,\n final int y, final int width, final int height,\n final TAction enterAction, final TAction moveAction) {\n\n return new TList(this, strings, x, y, width, height, enterAction,\n moveAction);\n }", "void fillList(List<String> toFill) {\n for (int i = 0; i < number; i++) {\n toFill.add(i + \"\");\n }\n }", "private String constructList(String[] elements) throws UnsupportedEncodingException {\n if (null == elements || 0 == elements.length)\n return null;\n StringBuffer elementList = new StringBuffer();\n\n for (int i = 0; i < elements.length; i++) {\n if (0 < i)\n elementList.append(\",\");\n elementList.append(elements[i]);\n }\n return elementList.toString();\n }", "public static void main(String[] args) {\n List<String> res = lcs(\"LCLC\",\"CLCL\");\r\n for(String s:res){\r\n \t System.out.print(s +\",\");\r\n }\r\n\t}", "public static void main(String[] args) {\n String []str={\"A\",\"B\",\"C\"};\r\n \r\n String [][]str1={{\"A\",\"B\",\"3\"},{\"B\",\"C\",\"4\"},{\"A\",\"C\",\"5\"}};\r\n\t\tListUDirected lud=new ListUDirected(str,str1);\r\n\t\tSystem.out.println(\"以下是有向图的邻接表\");\r\n\t\tlud.printList();\r\n\t\t\r\n\t\t\r\n\t\t String [][]str2={{\"A\",\"B\",\"2\"},{\"B\",\"A\",\"2\"},{\"B\",\"C\",\"3\"},{\"C\",\"B\",\"3\"},{\"A\",\"C\",\"4\"},{\"C\",\"A\",\"4\"}};\r\n\t\tListUDirected lud2=new ListUDirected(str,str2);\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"以下是无向图的邻接表\");\r\n\t\tlud2.printList();\r\n\t\t\r\n\t\t \r\n\t}", "public LinkedList() {\n\t\tthis(\"list\");\n\t}", "public static StringList createFrom(String list1[], String list2[]) {\n StringList list = new StringList(list1);\n list.merge(list2);\n return list;\n }", "public static void main(String[] args) {\n\t\tLinkedList<String> nuevaLista = new LinkedList<String>();\n\n\t\tnuevaLista.add(\"Uno\");\n\t\tnuevaLista.add(\"Dos\");\n\t\tnuevaLista.add(\"Tres\");\n\t\tnuevaLista.add(\"Cuatro\");\n\t\tnuevaLista.add(\"Cinco\");\n\t\tnuevaLista.add(\"Seis\");\n\t\tSystem.out.println(nuevaLista);\n\n\t\tnuevaLista.offerLast(\"Siete\");\n\n\t\tSystem.out.println(nuevaLista);\n\t}", "private void permutation(String prefix, String str) {\n \r\n int n = str.length();\r\n if (n == 0)\r\n {\r\n \r\n ls.add(prefix);\r\n System.out.print(prefix+\",\");\r\n if(ls.isEmpty()==true)\r\n {\r\n ls.remove(ls.indexOf(n)); \r\n }\r\n \r\n al.add(ls);\r\n calc(al);\r\n \r\n }\r\n\r\n else {\r\n \r\n //System.out.print(ls);\r\n \r\n for (int i = 0; i < n; i++)\r\n permutation(prefix + str.charAt(i), str.substring(0, i) + str.substring(i+1, n));\r\n \r\n \r\n }\r\n \r\n \r\n \r\n}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Enter some integers and end with 0 \\n\");\n\t\tScanner in = new Scanner(System.in);\n\t\tNode1 top,np,last=null;\n\t\ttop=null;\n\t\tint n=in.nextInt();\n\t\twhile(n!=0) {\n\t\t\tnp = new Node1(n);\n\t\t\tif (top==null){\n\t\t\t\ttop=np;\n\t\t\t}\n\t\t\telse last.next=np;\n\t\t\tlast=np;\n\t\t\tn=in.nextInt();\t\t\t\n\t\t}\n\t\tSystem.out.println(\"The items in the list are: \");\n\t\tprintList(top);\n\n\t}", "public ArrayBackedList(String ... strings) {\n insertArray(Arrays.asList(strings));\n }", "public MyList(String name) {\n nameList = name;\n }", "public void creatList()\n\t{\n\t\tbowlers.add(new Bowler(\"A\",44));\n\t\tbowlers.add(new Bowler(\"B\",25));\n\t\tbowlers.add(new Bowler(\"C\",2));\n\t\tbowlers.add(new Bowler(\"D\",10));\n\t\tbowlers.add(new Bowler(\"E\",6));\n\t}", "@Override\n public String toString(){\n String str = \"\";\n DLNode<T> current = first;//a reference to the first node\n while (current != null) {//loop as long as we reach the end of the list\n str += current + \"\\n\";//store current element in a String at every iteration\n current = current.next;\n }\n return str;\n }", "public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"<\" + mainList.input);\n for (MainNode n = mainList.mainNext; n != null; n = n.mainNext) {\n if (n.next == null) {\n sb.append(\", \" + n.input);\n } else {\n for (NextNode m = n.next; m != null; m = m.next) {\n sb.append(\", \" + m.input);\n }\n sb.append(n.input);\n }\n }\n sb.append(\">\");\n return sb.toString();\n }", "public static void main(String[] args) {\n\t\tLinkedList<String> l_list=new LinkedList<String>();\n\t\t// use add() method to add values in the linked list \n\t\tl_list.add(\"Elsa\");\n\t\tl_list.add(\"Anna\");\n\t\tl_list.add(\"Olaf\");\n\t\tl_list.add(\"Kristoff\");\n\t\tl_list.add(\"Sven\");\n\t\t// print the list\n\t\tSystem.out.println(\"The linked list : \"+l_list);\n\t}", "private void dfs(int start, int end, String str, String s, List<Integer>[] cache, LinkedList<String> res) {\n\t\tif (start == -1) {\n\t\t\tres.add(str.substring(1));\n\t\t} else {\n\t\t\tfor (int n : cache[start]) {\n\t\t\t\tdfs(n, start, \" \" + s.substring(start, end) + str, s, cache, res);\n\t\t\t}\n\t\t}\n\t}", "public void setDetails() {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n//\t\tList<String> list1 = new ArrayList<String>();\n//\t\tlist1.add(\"Jhone\");\n//\t\tlist1.add(\"Jim\");\n\t\t\n//\t\tList<String> list2 = new ArrayList<String>();\n//\t\tlist2.add(\"USA\");\n//\t\tlist2.add(\"CA\");\n\n\t\tSystem.out.println(\"Enter Names : \");\n\t\tString names = input.nextLine();\n\t\tScanner tokenizer = new Scanner(names);\n\t\ttokenizer.useDelimiter(\" \");\n\t\tArrayList<String> arr = new ArrayList<String>();\n\t\twhile (tokenizer.hasNext()) {\n\t\t\tarr.add(tokenizer.next());\n//\t\t\tSystem.out.println(arr.get(arr.size() - 1));\n\t\t}\n\t\tSystem.out.println(arr);\n\t\t\n\t\tSystem.out.println(\"Enter Names : \");\n\t\tString address = input.nextLine();\n\t\tScanner tokenizerAdd = new Scanner(names);\n\t\ttokenizer.useDelimiter(\" \");\n\t\tArrayList<String> arr1 = new ArrayList<String>();\n\t\twhile (tokenizerAdd.hasNext()) {\n\t\t\tarr1.add(tokenizerAdd.next());\n//\t\t\tSystem.out.println(arr.get(arr.size() - 1));\n\t\t}\n\t\tSystem.out.println(arr1);\n\t\t\n\t\t\n\t\t// using addAll( ) method to concatenate the lists\n\t\tList<String> concatenated_list = new ArrayList<String>();\n\t\tconcatenated_list.addAll(arr);\n\t\tconcatenated_list.addAll(arr1);\n\t\tSystem.out.println(\"Name : \" + arr + \" Address : \" + arr1);\n\t}", "public LinkedString(char[] value)\n {\n numNodes = 0;\n Node head = null;\n for(int i = 0; i < value.length; i++)\n {\n this.insert(i, value[i]);\n }\n }", "private ArrayList<String> createNewListWithCombinedDescription(ArrayList<String> parameters) {\n ArrayList<String> resultArray = new ArrayList<String>();\n int lastWordIndex = findIndexOfLastWord(parameters);\n String description = createDescription(parameters, lastWordIndex);\n if (!(description == null)) {\n ArrayList<String> timeArray = getTimeArray(parameters, lastWordIndex);\n resultArray.add(description);\n resultArray.addAll(timeArray);\n } else {\n resultArray = null;\n }\n return resultArray;\n }", "public List<String> MakeLadder(String fromWord, String toWord) {\n \tMap<String, String> parentMap = new HashMap<String, String>();\n \tif(isOneLetterOff(fromWord, toWord) || fromWord.equals(toWord)){ //if input is same or one letter off\n \t\tparentMap.put(toWord, fromWord);\n \t\tList<String> ladder = mapToList(fromWord, toWord, parentMap);\n \t\treturn ladder;\n \t}\n \tMap<String, List<String>> wordMap = new HashMap<String, List<String>>(); //lists of all words off by one char from dictionary word (key)\n \tfillMap(wordMap);\n \tQueue<String> q = new LinkedList<String>();\n \tList<String> visited = new ArrayList<String>();\t//list of words already visited\n \tq.add(fromWord);\n \tvisited.add(fromWord);\n \twhile(!q.isEmpty()){\n \t\tString word = q.poll();\n \t\tif(isOneLetterOff(word,toWord)){\n \t\t\tparentMap.put(toWord, word); //parent of end word is the word that is one letter off\n \t\t\tList<String> ladder = mapToList(fromWord, toWord, parentMap);\n \t\treturn ladder;\n \t\t}\n \t\tList<String> nextLayer = wordMap.get(word);\t//all words one letter off from current word\n \t\tfor(String node : nextLayer){\n \t\t\tif(visited.contains(node))\n \t\t\t\tcontinue; //node has already been visited\n \t\t\tq.add(node); //add newly discovered nodes to queue\n \t\t\tvisited.add(node); //mark as visited\n \t\t\tparentMap.put(node, word);\n \t\t}\n \t}\n \treturn null; //no ladder could be found\n }", "public static List<Input> inputList_with_dependency_no_timeout_1() {\n Input t3 = new Input(\"T3\",3, 5);\n Input t2 = new Input(\"T2\",2, 8);\n Input t1 = new Input(\"T1\",1, 9);\n List<String> t2Dependencies = new ArrayList<>(); t2Dependencies.add(\"T3\");\n t2.setDependencies(t2Dependencies);\n List<String> t1Dependencies = new ArrayList<>(); t1Dependencies.add(\"T3\");\n t1.setDependencies(t1Dependencies);\n List<Input> input = new ArrayList<>(); input.add(t1); input.add(t2); input.add(t3);\n return input;\n }", "public List<String> mapToList (String startWord, String endWord, Map<String, String> map){\n \tLinkedList<String> ladder = new LinkedList<String>();\n \tif(startWord.equals(endWord)){\n \t\tladder.add(startWord);\n \t\tladder.add(endWord);\n \t\treturn ladder;\n \t}\n \tladder.add(endWord);\n \tString word = endWord;\n \twhile(!word.equals(startWord)){\n \t\tString parent = map.get(word);\n \t\tladder.addFirst(parent);\n \t\tword = parent;\n \t}\n \treturn ladder;\n \t\n }", "public static ListInitExpression listInit(NewExpression newExpression, ElementInit[] elementInits) { throw Extensions.todo(); }", "private Command createListCommand(){\n\t\tList<Command> commands = new ArrayList<>();\n\t\twhile(!codeReader.hasNext(END_LIST)) {\n\t\t\ttry {\n\t\t\t\tString s = codeReader.next();\n\t\t\t\tcommands.add(parseCommand(s));\n\t\t\t}\n\t\t\tcatch(NoSuchElementException n) {\n\t\t\t\tthrow new SLogoException(\"Unclosed Bracket.\");\n\t\t\t}\n\t\t}\n\t\tcodeReader.next();\n\t\treturn new ListCommand(commands);\n\t}", "public Linked_list() {\n pre = new Node();\n post = new Node();\n pre.next = post;\n post.prev = pre;\n }", "public String toString()\n { \t\n \t//initialize String variable to return \n \tString listString = \"\";\n \t//create local node variable to update in while loop\n LinkedListNode<T> localNode = getFirstNode();\n \n //concatenate String of all nodes in list\n while(localNode != null)\n {\n listString += localNode.toString();\n localNode = localNode.getNext();\n }\n \n //return the string to the method\n return listString;\n }", "Concat createConcat();" ]
[ "0.63416004", "0.6187919", "0.6105468", "0.6078127", "0.5869738", "0.5858476", "0.5836052", "0.5691092", "0.5601494", "0.55376905", "0.5384472", "0.53641456", "0.5313589", "0.53038234", "0.5296413", "0.525923", "0.51970077", "0.512299", "0.51208353", "0.5095321", "0.5077173", "0.50647694", "0.50626314", "0.5018974", "0.5015482", "0.49979517", "0.49917746", "0.4978573", "0.49779645", "0.49726716", "0.49699578", "0.49490362", "0.49356878", "0.4931986", "0.49225765", "0.49164954", "0.4911057", "0.49088013", "0.49060613", "0.48986334", "0.4887951", "0.48838148", "0.4882565", "0.48720858", "0.48691872", "0.4858876", "0.48510253", "0.48405954", "0.48390517", "0.48322403", "0.48191938", "0.48178193", "0.4816786", "0.48167682", "0.48085865", "0.48020425", "0.47970074", "0.4774232", "0.477071", "0.4767428", "0.47668952", "0.47629163", "0.47495294", "0.4739425", "0.47369242", "0.4718312", "0.47129688", "0.4712512", "0.47108126", "0.46960938", "0.46854162", "0.46805617", "0.4676807", "0.46757975", "0.4666433", "0.46619812", "0.46617755", "0.4652403", "0.46494174", "0.46484447", "0.4646724", "0.46427047", "0.4642261", "0.4641391", "0.46403468", "0.46329305", "0.46290722", "0.46260995", "0.46146685", "0.46127644", "0.46072724", "0.46021363", "0.45951018", "0.45925093", "0.45804182", "0.45731226", "0.45640898", "0.45602393", "0.4550549", "0.45412052" ]
0.45856887
94
The BagOfWordsList is sorted in ascending order when new String is added into it. No need to override the equals() and hashcode()
@Override public boolean equals(Object object) { if (this == object) { return true; } if (object == null || getClass() != object.getClass()) { return false; } Cons cons = (Cons) object; return Objects.equals(first, cons.first) && Objects.equals(restOfBag, cons.restOfBag); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}", "private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }", "void addWordToCandidatesSet(String word) {\n candidates.add(word);\n }", "public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}", "public void add(ArrayList<String> phrase) {\t\t\r\n\t\tfor (int i = 0 ; i < phrase.size(); i++) {\r\n\t\t\tWordTrieNode cur = root;\r\n\t\t\tfor (int j = i; j < phrase.size(); j++) {\r\n\t\t\t\tString word = phrase.get(j);\r\n\t\t\t\tif (!cur.getMap().containsKey(word)) {\r\n\t\t\t\t\tcur.getMap().put(word, new WordTrieNode(word));\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tcur = cur.getMap().get(word);\r\n\t\t\t\tcur.increaseFrequence();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public String[] topHotWords( int count ){\r\n //If the number put in the arguments is greater than the number of distinct hotwords\r\n //in the document, limit it to distinctCount\r\n if (count > distinctCount()){\r\n count = distinctCount();\r\n }\r\n //Creating the array that will hold all the hotwords in order of number of appearances \r\n String[] topWord = new String[words.size()];\r\n //This is the subset of the array above that will return the amount specified by the count argument\r\n String[] output = new String[count];\r\n //Fills the array with blank strings\r\n Arrays.fill(topWord, \"\");\r\n //Iterator for moving through topWord for assignment\r\n int iterator = 0;\r\n //Loop through every hotword in words and puts those words in topWord\r\n for(String key: words.keySet()){\r\n topWord[iterator] = key;\r\n iterator++;\r\n }\r\n //Sorts the words in topword\r\n for(int i = 0; i < words.size(); i++){\r\n for(int j = words.size()-1; j > 0; j-- ){\r\n \r\n if(count(topWord[j]) > count(topWord[i])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[j];\r\n topWord[j] = temp;\r\n }\r\n \r\n }\r\n }\r\n //Does a secondary check to be certain all words are in proper appearance number order\r\n for(int i = words.size()-1; i >0; i--){\r\n if(count(topWord[i]) > count(topWord[i-1])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[i-1];\r\n topWord[i-1] = temp;\r\n }\r\n }\r\n //Orders the words with the same number of appearances by order of appearance in the document\r\n for (int i = 0; i < words.size(); i++){\r\n for(int j = i+1; j < words.size(); j++){\r\n if (count(topWord[i]) == count(topWord[j])){\r\n if (consec.indexOf(topWord[j]) < consec.indexOf(topWord[i])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[j];\r\n topWord[j] = temp;\r\n }\r\n }\r\n }\r\n }\r\n //Gets the subset requested for return\r\n for (int i = 0; i < count; i++){\r\n output[i] = topWord[i];\r\n }\r\n return output;\r\n\t}", "public void modifyWordsList(Item item, List<List<String>> tokenizedCollect, List<String> bagOfWords) {\n\n // handling user item description\n String desc = item.getDescription();\n List<String> tokenizedText = tokenizeText(desc);\n List<String> cleanText = removeStopWords2(tokenizedText);\n\n // add to collection of tokenized words (a list of list of tokenized words)\n tokenizedCollect.add(cleanText);\n\n // add userA's clean text to bag of words\n for (String word : cleanText) {\n if (!bagOfWords.contains(word)) {\n bagOfWords.add(word);\n }\n }\n }", "private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}", "public static void main(String[] args){\n \tunsortedWords = new ArrayList<String>();\n sortedWords = new ArrayList<String>();\n \ttry{\n \t\tInputStreamReader in = new InputStreamReader(System.in);\n \t\tBufferedReader input = new BufferedReader(in);\n \t\talphabetString = input.readLine();\n \t\tif (alphabetString == null || alphabetString == \"\"){\n \t\t\tthrow new IllegalArgumentException();\n \t\t}\n\n \t\tstr = input.readLine();\n if (str == null || str == \"\"){\n throw new IllegalArgumentException();\n }\n \n \t\twhile (str != null){\n \t\t\tunsortedWords.add(str);\n \t\t\tstr = input.readLine();\n numberOfWords += 1;\n \t\t}\n\n\n\n \t}\n \tcatch (IOException io){\n \t\tSystem.out.println(\"There are no words given\");\n \t\tthrow new IllegalArgumentException();\n\n \t}\n\n alphabetMap = new HashMap<String, Integer>();\n String[] alphabetLetters = alphabetString.split(\"\");\n \tint j = 0;\n \tString letter;\n \t// String[] alphabetLetters = alphabetString.split(\"\");\n \twhile (j < alphabetLetters.length){\n letter = alphabetLetters[j];\n if (alphabetString.length() - alphabetString.replace(letter, \"\").length() > 1) {\n System.out.println(letter);\n throw new IllegalArgumentException();\n }\n alphabetMap.put(alphabetLetters[j], j);\n j += 1;\n }\n //for checking the last value something is in the outputed list. \n lastArrayIndex = 0;\n\n //sorts words\n int k = 0;\n String chosenWord;\n while (k < unsortedWords.size()){\n chosenWord = unsortedWords.get(k);\n sorting(chosenWord, sortedWords);\n k += 1; \n }\n\n //prints words\n int l = 0;\n String printedWord;\n while (l < sortedWords.size()){\n printedWord = sortedWords.get(l);\n System.out.println(printedWord);\n l += 1;\n }\n\n\n \t//making the trie\n // usedTrie = makeATrie(unsortedWords);\n\n //printing out the order\n // recursiveAlphabetSorting(usedTrie, \"\", alphabetString);\n\n\n }", "private static SortingMachine<Pair<String, Integer>> sortWords(\n Map<String, Integer> words, int numberOfWords) {\n AlphabeticalComparator stringComp = new AlphabeticalComparator();\n IntComparator intComp = new IntComparator();\n\n SortingMachine<Pair<String, Integer>> intMachine = new SortingMachine1L<>(\n intComp);\n SortingMachine<Pair<String, Integer>> stringMachine = new SortingMachine1L<>(\n stringComp);\n\n for (Map.Pair<String, Integer> pair : words) {\n intMachine.add(pair);\n }\n\n intMachine.changeToExtractionMode();\n\n for (int i = 0; i < numberOfWords; i++) {\n Pair<String, Integer> pair = intMachine.removeFirst();\n System.out.println(pair);\n stringMachine.add(pair);\n }\n\n stringMachine.changeToExtractionMode();\n\n return stringMachine;\n }", "WordList(){\r\n\t\tm_words = new HashMap();\r\n\t}", "public int addList(String word) {\n\n\t\tif (slist.traverse(word) == 1) {\n\t\t\tslist.add(word);\n\t\t\tcount++;\n\n\t\t} else {\n\t\t\tslist.deleteElement(word);\n\t\t\tcount--;\n\n\t\t}\n\n\t\treturn count;\n\n\t}", "public void loadList () {\r\n ArrayList<String> list = fileManager.loadWordList();\r\n if (list != null) {\r\n for (String s : list) {\r\n addWord(s);\r\n }\r\n }\r\n }", "@Override\n\tpublic void setTraining(String text) {\n\t\tmyWords = text.split(\"\\\\s+\");\n\t\tmyMap = new HashMap<String , ArrayList<String>>();\n\t\t\n\t\tfor (int i = 0; i <= myWords.length-myOrder; i++)\n\t\t{\n\t\t\tWordGram key = new WordGram(myWords, i, myOrder);\n\t\t\tif (!myMap.containsKey(key))\n\t\t\t{\n\t\t\t\tArrayList<String> list = new ArrayList<String>();\n\t\t\t\tif (i+myOrder != myWords.length)\n\t\t\t\t{\n\t\t\t\t\tlist.add(myWords[i+myOrder]);\n\t\t\t\t\tmyMap.put(key, list);\n\t\t\t\t} else {\n\t\t\t\t\tlist.add(PSEUDO_EOS);\n\t\t\t\t\tmyMap.put(key, list);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (i+myOrder != myWords.length)\n\t\t\t\t{\n\t\t\t\t\t((ArrayList<String>) myMap.get(key)).add(myWords[i+myOrder]);\n\t\t\t\t} else {\n\t\t\t\t\t((ArrayList<String>) myMap.get(key)).add(PSEUDO_EOS);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void addWordsFromFile(File file){\n \n FileResource fr = new FileResource(file);\n String fileName = file.getName();\n for (String word : fr.words()) {\n if (!hashWords.containsKey(word)) {// if hash map doesnt contain the key word\n ArrayList<String> newList = new ArrayList<String>();//create a new Arraylist\n newList.add(fileName);//add the file name to it \n hashWords.put(word, newList);// map the word to the new list\n } else if (hashWords.containsKey(word)\n && !hashWords.get(word).contains(fileName)) {\n //the hash map contains the keyword but not the filename\n // it gets stored as a new value in the\n //arraylist of the hashmap:\n \n ArrayList<String> currentList = hashWords.get(word);//currentList is the existing array list of files\n //for the given word\n currentList.add(fileName);//Add new file name to existing list\n hashWords.put(word, currentList);//map the 'word' to the updated arraylist\n }\n }\n }", "public void add (List words) {\n\t\tint pos = 0;\n\t\tfor (Iterator it = words.iterator(); it.hasNext(); ) {\n\t\t\tWord word = (Word)it.next();\n\t\t\tInfo info = (Info)map.get(word);\n\t\t\tif (info == null) {\n\t\t\t\tinfo = new Info();\n\t\t\t\tinfo.loaded = false;\n\t\t\t\tmap.put(word, info);\n\t\t\t}\n\t\t\tinfo.list = words;\n\t\t\tinfo.pos = pos;\n\t\t\tpos++;\n\t\t}\n\t}", "public void addToQueue(ArrayList<String> words)\n\t{\n\t\tfor(String wordToAdd: words)\n\t\t{\n\t\twordQueue.add(wordToAdd);\n\t\t}\n\t\tif(wordQueue.isEmpty())\n\t\t{\n\t\t\tSystem.out.println(\"Can not generate ladder\");\n\t\t\tuserInter.optionSelect();\n\t\t}\n\t\tprocessQueue(wordQueue.poll());\n\t}", "public Dictionary ( ArrayList < String > listOfWords ) {\n\t\tsuper(listOfWords.get((listOfWords.size()-1)/2));\n\t\t\n\t\t//store words list as binary tree\n\t\t//starts with left side then with right\n\t\tint start = 0;\n\t\tint end = listOfWords.size()-1;\n\t\tint mid = (start+end)/2;\n\t\tmakeTree(listOfWords, start, mid-1);\n\t\tmakeTree(listOfWords, mid+1, end);\n\t\t\n\t\t\n\t\t/**old code written by Professor below\n\t\t * \n\t\t */\n\t\t//words = listOfWords;\n\t\t//if (null == words) {\n\t\t//\twords = new ArrayList <String> ();\n\t\t//}\n\t\t\n\n\t\t\n\t}", "public void add(WordList words) {\n \twordLists.add(words);\n \tfor (String word : words) {\n \t\tindex.put(word, words);\n \t}\n }", "public List<DictionaryData> frequencyOrderedList() {\n List<DictionaryData> wordlist = alphabeticalList();\r\n\r\n //using insertion sort\r\n int j;\r\n DictionaryData k;\r\n for (int i = 1; i < wordlist.size(); i++) {\r\n j = i;\r\n\r\n while (j > 0 && compare_dictdata(wordlist.get(j), wordlist.get(j - 1))) {\r\n k = wordlist.get(j);\r\n wordlist.set(j, wordlist.get(j - 1));\r\n wordlist.set(j - 1, k);\r\n j--;\r\n\r\n }\r\n //i++;\r\n }\r\n return wordlist;\r\n }", "public StringBag(){\n\n list = new ArrayList();\n\n\t}", "private ArrayList<String> matchingWords(String word){\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tfor(int i=0; i<words.size();i++){\n\t\t\tif(oneCharOff(word,words.get(i))){\n\t\t\t\tlist.add(words.get(i));\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "@SuppressWarnings(\"unchecked\") // <.>\n static void wordList(){\n ArrayList wordList = new ArrayList<>(); // <.>\n wordList.add(\"cat\");\n wordList.add(\"dog\");\n\n System.out.println(\"Word list => \" + wordList);\n }", "public void add(String alphabetizedWord, String word){\n int index = word.length();\n if(index >= tree.size()){\n tree.setSize(index + 1);\n }\n if(tree.get(index) == null){\n tree.set(index, new Trie());\n }\n //add word to appropriate trie\n tree.get(index).addWord(alphabetizedWord, word);\n }", "public static List<String> sortUniqueWords(HashMap<String, Integer> tracker, List<String> allWords) {\n List<Integer> frequency = new ArrayList<>(tracker.values());\n frequency.sort(Collections.reverseOrder());\n List<String> result = new ArrayList<>();\n\n while(!tracker.isEmpty()){\n for (String key : allWords) {\n if(frequency.size()!= 0 && frequency.get(0) == tracker.get(key)){\n frequency.remove(0);\n\n result.add(key + \" \" + tracker.get(key));\n tracker.remove(key);\n }\n\n }\n }\n return result;\n\n\n }", "@Override\n public void add(String text) {\n String[] fromWords = text.split(\"\\\\s+\");\n wordsArray = new String[fromWords.length];\n wordsArray = fromWords;\n }", "private void update() {\n\t\twhile(words.size()<length) {\n\t\t\twords.add(new Word());\n\t\t}\n\t}", "public void populateDisplayedList() {\n \t\t// putting first five words into wordsDisplayed\n \t\tcurrFirstLetters = new HashSet<Character>();\n \t\tfor (int i = 0; i < numWordsDisplayed; i++) {\n \t\t\twhile (currFirstLetters.contains(wordsList[nextWordIndex].charAt(0))) {\n \t\t\t\tnextWordIndex++;\n \t\t\t}\n \t\t\tcurrFirstLetters.add(wordsList[nextWordIndex].charAt(0));\n \t\t\twordsDisplayed[i] = nextWordIndex;\n \t\t\tcurrWordIndex = i;\n \t\t\tsetChanged();\n \t\t\tnotifyObservers(States.update.FINISHED_WORD);\n\t\t}\n\t\tnextWordIndex++;\n \t\tcurrWordIndex = -1;\n \t}", "public void createHashTable() {\n\n String[] tempArray = new String[words.size()];\n\n for (int i = 0; i < words.size(); i++) {\n char[] word = words.get(i).toCharArray(); // char[] snarf\n Arrays.sort(word); // char[] afnrs\n tempArray[i] = toString(word); // String afnrs\n }\n\n for (int i = 0; i < words.size(); i++) {\n String word = tempArray[i];\n hashTable.put(word.substring(0, 4), i); // plocka bort bokstav nr 5\n String subString4 = (word.substring(0, 3) + word.substring(4, 5)); // plocka bort bokstav nr 4\n hashTable.put(subString4, i);\n String subString3 = (word.substring(0, 2) + word.substring(3, 5)); // plocka bort bokstav nr 3\n hashTable.put(subString3, i);\n String subString2 = (word.substring(0, 1) + word.substring(2, 5)); // plocka bort bokstav nr 2\n hashTable.put(subString2, i);\n hashTable.put(word.substring(1, 5), i); // plocka bort bokstav nr 1\n }\n }", "public static List<List<String>> breakIntoWords(String longWord, Collection<String> dict) {\n List<List<String>>[] words = new ArrayList[longWord.length() + 1];\n // words[i] = list of matching words at longWord length i\n // words[longWord.length()] is answer\n Arrays.stream(words).forEach((wl) -> wl = null);\n // contains empty list of lists\n // the first element contains an emtpty list of strings\n words[0] = new ArrayList<List<String>>();\n\n int beginIndx = -1;\n while (beginIndx < longWord.length()) {\n // beginIndx starts from 0 and goes up to length of the word -1\n // start with -1 and first index where the words[beginIndx] != null is 0\n // last value for beingIndx is wordlength -1\n while ((words[++beginIndx] == null) && (beginIndx < longWord.length())) ;\n // non null List of Lists of String\n // for index 0 it will be empty. For subsequent indices it may be non empty\n List<List<String>> beginIndxLists = words[beginIndx];\n // if beginIndx has not reached the end of the word\n // last value of beingIndx is longWord.length-1\n // need to compare the last character for which substring(wordlength-1, wordlength)\n if (beginIndx < longWord.length()) {\n // beginIdx is the start of the word, end Indx is end\n // last value for endIndx is longWord.length\n for (int endIndx = beginIndx + 1; endIndx <= longWord.length(); endIndx++) {\n String matchW = longWord.substring(beginIndx, endIndx);\n if ((matchW != null) && (!matchW.isEmpty())) {\n if (dict.contains(matchW)) {\n // list of list of Strings for getting to the endIndx\n List<List<String>> mwordsList = words[endIndx];\n if (mwordsList == null) {\n mwordsList = new ArrayList<List<String>>();\n }\n if((beginIndxLists==null)||(beginIndxLists.isEmpty())) {\n mwordsList.add(new ArrayList(Arrays.asList(matchW)));\n }\n // words[endIndx] has list of list initialized\n // there is a list at beginIndx\n // get the list of words at begingIndx. It contains at least one empty list\n else {\n for (List<String> beginList : beginIndxLists) {\n // at the matched word in the list at beginIndx and then copy it to mwordsList at endIndx\n beginList.add(matchW);\n mwordsList.add(beginList);\n }\n }\n words[endIndx] = mwordsList;\n }\n }\n }\n\n }\n\n }\n return words[longWord.length()];\n }", "private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}", "public List<DictionaryData> alphabeticalList() {\r\n //System.out.println(\"Checkpoint 5: alphabeticalList() not implemented yet\");\r\n //using the java collection set\r\n //wordlist here is the collection containing elements to be added to this set values\r\n Collection<DictionaryData> wordlist = dictionaryMap.values();\r\n //return list of words as an arrarylist using the same format as above\r\n return new ArrayList<DictionaryData>(wordlist);\r\n\r\n //return null;\r\n }", "public EfficientWordMarkov(int order)\n\t{\n\t\tsuper(order);\n\t\tmyMap = new HashMap<WordGram , ArrayList<String>>();\n\t}", "public void sortWordTokens (String [] list, int count){\n \n String[] sortedWordsCopy = new String[count];\n \n \n //Makes a copy of list and stores it in sortedWordsCopy\n for (int i = 0; i < count; i++)\n sortedWordsCopy[i] = list[i];\n \n //Sorts sortedWordsCopy which is a copy of list\n Arrays.sort(sortedWordsCopy);\n \n //Copies the sorted list back out to list\n for (int i = 0; i < count; i++)\n list[i] = sortedWordsCopy[i];\n \n }", "private static void buildWordList(){\n\t\ttry {\n\t\t\t@SuppressWarnings(\"resource\")\n\t\t\tScanner inScanner = new Scanner(new FileReader(LIST_LOCATION));\n\t\t\tfor(int i = 0; i < collegiateWords.length ; i++){\n\t\t\t\tcollegiateWords[i] = inScanner.nextLine();\n\t\t\t}\n\t\t\t\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t\n\t\t\te1.printStackTrace();\n\t\t}\t\n\t\tSystem.out.println(\"Word List Built.\");\n\t}", "void add(String str) {\n assertEquals(!words.contains(str), trie.add(str));\n words.add(str);\n dictionary.add(str);\n assertEquals(words.size(), trie.size());\n checkConsistency();\n }", "public void insert( Word x )\n {\n WordList whichList = theLists[ myhash( x.key ) ];\n //System.out.println(\"WordList found\");\n \n\t whichList.add( x );\n\t //System.out.println(\"Word \" + x.value + \" successfully added\");\n }", "@Test\n public void myTest() {\n // FIXME: Delete this function and add your own tests\n ech.put(\"c\");\n assertEquals(ech.contains(\"c\"),true);\n\n ech.put(\"d\");\n assertEquals(ech.contains(\"d\"),true);\n\n ArrayList<String> tmp = new ArrayList();\n tmp.add(\"d\");\n tmp.add(\"c\");\n assertEquals(tmp,ech.asList());\n\n ech.put(\"a\");\n ArrayList<String> tmp0 = new ArrayList();\n tmp0.add(\"d\");\n tmp0.add(\"a\");\n tmp0.add(\"c\");\n assertEquals(tmp0,ech.asList());\n\n ech.put(\"v\");\n ech.put(\"A\");\n ech.put(\"r\");\n ArrayList<String> tmp1 = new ArrayList();\n tmp1.add(\"d\");\n tmp1.add(\"A\");\n tmp1.add(\"a\");\n tmp1.add(\"v\");\n tmp1.add(\"c\");\n tmp1.add(\"r\");\n assertEquals(tmp1,ech.asList());\n\n ech.put(\"I LOVE 61B\");\n ArrayList<String> tmp2 = new ArrayList();\n tmp2.add(\"d\");\n tmp2.add(\"A\");\n tmp2.add(\"a\");\n tmp2.add(\"I LOVE 61B\");\n tmp2.add(\"v\");\n tmp2.add(\"c\");\n tmp2.add(\"r\");\n assertEquals(tmp2,ech.asList());\n assertEquals(true,ech.contains(\"I LOVE 61B\"));\n\n for(int i = 0;i<10000;i++){\n ech.put((Integer.toString(i)));\n }\n assertEquals(true,ech.contains(\"9999\"));\n }", "public EfficientWordMarkov()\n\t{\n\t\tsuper();\n\t\tmyMap = new HashMap<WordGram , ArrayList<String>>();\n\t}", "private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }", "private static List<List<String>> groupAnagramsBestCase(String[] strings) {\n List<List<String>> result = new ArrayList<>();\n Map<String, List<String>> keyToValues = new HashMap<>();\n\n for(String str : strings) {\n String key = getKey(str);\n List<String> anagrams = keyToValues.getOrDefault(key, new ArrayList<>());\n anagrams.add(str);\n\n keyToValues.put(key, anagrams);\n }\n\n result.addAll(keyToValues.values());\n return result;\n }", "private void addWordsToBuffer(String [] words) {\r\n\t\tfor(String s : words) {\r\n\t\t\tbuffer.add(s);\r\n\t\t}\r\n \r\n }", "private void getWordsList(final States.difficulty diff) {\n \t\tString file;\n \t\tif (diff == States.difficulty.EASY) {\n \t\t\tfile = \"4words.txt\";\n \t\t} else if (diff == States.difficulty.MEDIUM) {\n \t\t\tfile = \"5words.txt\";\n \t\t} else {\n \t\t\tfile = \"6words.txt\";\n \t\t}\n \n \t\t// read entire file as string, parsed into array by new line\n \t\ttry {\n \t\t\tInputStream stream = am.open(file);\n \t\t\tString contents = IOUtils.toString(stream, \"UTF-8\");\n \t\t\twordsList = contents.split(System.getProperty(\"line.separator\"));\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// Shuffle the elements in the array\n \t\tCollections.shuffle(Arrays.asList(wordsList));\n \t}", "public void add(String word, String url) {\n \n // don't need to add this word if it's a stop word\n for (String stopWord : Settings.getStopWords()) {\n if (word.equalsIgnoreCase(stopWord)) return;\n }\n \n // don't need to add this word if it's already in here\n StringNode check = locate(word);\n if (check != null) {\n check.getPagesContainingWord().add(url);\n return;\n }\n \n // not a stop word, not present--need to add it\n StringNode newNode = new StringNode(word, new URLLinkedList());\n newNode.getPagesContainingWord().add(url);\n if (first == null) { // if first is null, there's nothing in the list\n first = newNode; // set first to this new node\n newNode.getPagesContainingWord().add(url);\n }\n else { // first isn't null, so we want to find the correct place to put this new node\n StringNode current = first;\n // this barebones linked list is very inconvenient, so we have to make a special \n // check for the first item in the list.\n if (word.compareTo(current.getWord()) < 0) { // the word in the new node goes before the word in the first node\n first = newNode; // now the new node is the first one\n newNode.setNext(current); // and its next is the old first one\n }\n else if (!current.hasNext()) { // no next node, so this word goes after current\n current.setNext(newNode);\n }\n else { // new node doesn't go before first, so check the rest of the list\n boolean newNodePlaced = false;\n StringNode previous;\n while (current.hasNext() && !newNodePlaced) { \n previous = current;\n current = current.getNext(); // grab next node\n if (word.compareTo(current.getWord()) < 0) { // new word goes before this one\n// StringNode oldNext = current.getNext();\n// current.setNext(newNode);\n// newNode.setNext(oldNext);\n// newNodePlaced = true;\n previous.setNext(newNode);\n newNode.setNext(current);\n newNodePlaced = true;\n }\n }\n if (!newNodePlaced) { // if we're here and haven't yet placed the node, it goes at the end\n current.setNext(newNode);\n }\n }\n }\n size++;\n }", "public void add(String word) {\n\t\twordList.add(word);\n\t\t// TODO Add your code here\n\t}", "public void updateWordPoints() {\n for (String word: myList.keySet()) {\n int wordValue = 0;\n for (int i = 0; i < word.length(); i++) {\n // gets individual characters from word and\n // from that individual character get the value from scrabble list\n int charValue = scrabbleList.get(word.toUpperCase().charAt(i));\n // add character value gotten from character key from scrabble map to word value\n wordValue = wordValue + charValue;\n }\n\n // update the value of the word in myList map\n myList.put(word, wordValue);\n }\n }", "private static void testAdd(BagInterface<String> aBag, String[] content)\n {\n System.out.print(\"Adding the following strings to the bag: \");\n for (int index = 0; index < content.length; index++)\n {\n if (aBag.add(content[index]))\n System.out.print(content[index] + \" \");\n else\n System.out.print(\"\\nUnable to add \" + content[index] +\n \" to the bag.\");\n } // end for\n System.out.println();\n\n displayBag(aBag);\n }", "public ArrayList<String> wordList(){\n\t\treturn list;\n\t}", "private void wordAdd(String word){\n if (!fileWords.containsKey(word)){\n fileWords.put(word,1);\n if (probabilities.containsKey(word)) {\n double oldCount = probabilities.get(word);\n probabilities.put(word, oldCount+1);\n } else {\n probabilities.put(word, 1.0);\n }\n }\n }", "public void addWord(Word word);", "private static void Print(String s, AnagramDictionary ADictionary) {\r\n\t\tRack r = new Rack(s);\r\n\t\tArrayList<String> Subsets = r.getAllSubsets();\r\n\t\tArrayList<Word> words = new ArrayList<Word>();\r\n\t\tfor (int i = 0; i < Subsets.size(); i++) {\r\n\t\t\tArrayList<String> Anagrams = ADictionary.getAnagramsOf(Subsets.get(i));\r\n\t\t\tfor (int j = 0; j < Anagrams.size(); j++) {\r\n\t\t\t\twords.add(new Word(Anagrams.get(j)));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Sorting\r\n\t\tCollections.sort(words, new Comparator<Word>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(Word i, Word j) {\r\n\t\t\t\tScoreTable table = new ScoreTable();\r\n\t\t\t\tString iString = i.toString();\r\n\t\t\t\tString jString = j.toString();\r\n\t\t\t\t// For words with the same scrabble score\r\n\t\t\t\tif (table.getScore(jString) - table.getScore(iString) == 0) {\r\n\t\t\t\t\tint trials = (jString.length() > iString.length()) ? iString.length() : jString.length();\r\n\t\t\t\t\tfor (int t = 0; t < trials; t++) {\r\n\t\t\t\t\t\tif (iString.charAt(t) != jString.charAt(t)) {\r\n\t\t\t\t\t\t\treturn iString.charAt(t) - jString.charAt(t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t\t// For words with the different scrabble score\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn table.getScore(j.toString()) - table.getScore(i.toString());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// Print out\r\n\t\tSystem.out.println(\"We can make \" + words.size() + \" words from \\\"\" + s + \"\\\"\");\r\n\t\tif (words.size() > 0) {\r\n\t\t\tSystem.out.println(\"All of the words with their scores (sorted by score):\");\r\n\t\t}\r\n\t\tfor (int i = 0; i < words.size(); i++) {\r\n\t\t\tWord word = words.get(i);\r\n\t\t\tScoreTable table = new ScoreTable();\r\n\t\t\tSystem.out.println(table.getScore(word.toString()) + \": \" + word.toString());\r\n\t\t}\r\n\t}", "public boolean put(String word){\n\n\t\tif (word != null){\n\t\t\tint hash = getHash(word);\n\t\t\tif (hash != INVALID){\n\t\t\t\tm_arraylists[hash].put(word);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public void add(String word) {\n if (hashTable.contains(word)) {\n hashTable.put(word, hashTable.get(word) + 1);\n }\n else {\n hashTable.put(word,1);\n }\n }", "public boolean add(Word words) {\n\t // Insert words as active\n\t\t \twords.removeNonAlphaNum();\n\t\t \ttotalWords++;\n\t int currentPosition = findPos(words.getContent());\n\t if (isActive(array, currentPosition)) {\n\t \tarray[currentPosition].element.addLineNumbers((Integer)words.getLines().getHead().data);\n\t return false;\n\t }\n\n\t array[currentPosition] = new HashEntry(words, true);\n\t theSize++;\n\t \n\t // Rehashing\n\t if(++occupied > array.length / 2)\n\t rehash();\n\t \n\t return true;\n\t }", "public void addWord (String word) {\r\n word = word.toUpperCase ();\r\n if (word.length () > 1) {\r\n String s = validateWord (word);\r\n if (!s.equals (\"\")) {\r\n JOptionPane.showMessageDialog (null, \"The word you have entered contained invalid characters\\nInvalid characters are: \" + s, \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n return;\r\n }\r\n checkEasterEgg (word);\r\n words.add (word);\r\n Components.wordList.getContents ().addElement (word);\r\n } else {\r\n JOptionPane.showMessageDialog (null, \"The word you have entered does not meet the minimum requirement length of 2\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "public static List<String> sortWords(List<String> words) {\n\t\tfor (int i = 0; i < words.size()-1; i++) {\n\t\tint worrds= \twords.get(i).compareTo(words.get(i+1));\n\t\t\tSystem.out.println(worrds);\n\t\t\tif (worrds<0) {\n\t\t\t\tString temp = words.get(i);\n\t\t\t\t\n\t\t\t\twords.set(i, words.get(i+1));\n\t\t\t\t\n\t\t\t\twords.set(i+1, temp);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\treturn words;\n\t}", "private void fillSet() {\r\n\t\tString regex = \"\\\\p{L}+\";\r\n\t\tMatcher matcher = Pattern.compile(regex).matcher(body);\r\n\t\twhile (matcher.find()) {\r\n\t\t\tif (!matcher.group().isEmpty()) {\r\n\t\t\t\twords.add(matcher.group());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void add(T word);", "private TreeMap<String, ArrayList<String>> fillLists (char guess) {\r\n \t//Tree Map to Return\r\n \tTreeMap <String, ArrayList<String>> lists = new TreeMap<String, ArrayList<String>>();\r\n \t\r\n \t//Loop through the Active Words\r\n \tfor (int word = 0; word < activeWords.size(); word ++) {\r\n \t\tStringBuilder currentPattern = new StringBuilder();\r\n \t\t//Use existing pattern as base\r\n \t\tcurrentPattern.append(pattern);\r\n \t\t\r\n \t\t//New pattern is created based on each Active Word's relation to guess\r\n \t\tfor (int letter = 0; letter < activeWords.get(word).length(); letter++) {\r\n \t\t\t//If match, update pattern\r\n \t\t\tif (activeWords.get(word).charAt(letter) == guess) {\r\n \t\t\t\tcurrentPattern.setCharAt(letter, guess);\r\n \t\t\t}\r\n \t\t}\t\r\n \t\t//Convert Builder to String here for simplicity\r\n \t\tString newPattern = currentPattern.toString();\r\n \t\t\r\n \t\t//Each temp is the ArrayList of words for each pattern\r\n \t\tArrayList <String> temp = new ArrayList <String>();\r\n \t\t//Below takes into account if this key's list already has other words in it.\r\n \t\tif (lists.containsKey(newPattern)) {\r\n \t\t\ttemp = lists.get(newPattern);\r\n \t\t}\t\r\n \t\t\r\n \t\t//Add current word\r\n\t\t\ttemp.add(activeWords.get(word));\r\n\t\t\t//Add updated list to key (pattern created)\r\n\t\t\tlists.put(newPattern, temp);\r\n \t} \t\r\n \treturn lists;\r\n }", "private Set<String> insertionHelper(String word) {\n\t\tSet<String> insertionWords = new HashSet<String>();\n\t\tfor (char letter : LETTERS) {\n\t\t\tfor (int i = 0; i <= word.length(); i++) {\n\t\t\t\tinsertionWords.add(word.substring(0, i) + letter + word.substring(i));\n\t\t\t}\n\t\t}\n\t\treturn insertionWords;\n\t}", "public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }", "public CaseInsensitiveDictionary() {\n words = new HashSet<>();\n }", "public static void findWords(String target) throws FileNotFoundException{\n //reads file through the scanner\n scan = new Scanner(newFile);\n \n //creates new arraylist \n ArrayList<String> list = new ArrayList<String>();\n int count;\n while(scan.hasNextLine()){\n word = scan.nextLine();\n if(contains(target, word)){\n list.add(word.toLowerCase());\n }\n }\n\n int length = target.length();\n\n for(int i = length; i >= 2; i--){\n count = 0;\n System.out.println(i + \" letter words made by unscrambling the letters in \" + target );\n \n //This loop goes through all the strings in the arraylist of words contained\n //in the target word\n for(String a : list){\n //If the length of word in the arraylist is equal to i it prints the \n //word, as long as the line does not go over 40 characters\n if(a.length() == i) {\n if(count > (40 -a.length())){ \n System.out.print(\"\\n\");\n System.out.print(a + \" \");\n count = 0;\n count += (a.length() + 1);\n }\n else{\n System.out.print(a + \" \");\n count += (a.length() + 1);\n }\n }\n\n }\n //decrements length, and continues going through the loop\n length--;\n System.out.println(\"\\n\");\n }\n }", "public List<String> match(List<String> someList)\n {\n char[] objectWord = this.aWord.toCharArray();\n Arrays.sort(objectWord);\n\n List<String> answer = new ArrayList<>();\n HashMap<String, Integer> mapForEachWord = new HashMap<>();\n\n for (int i = 0; i < someList.size(); i++)\n {\n String wordFromList = someList.get(i).toLowerCase();\n //mapForEachWord = processWord(wordFromList);\n\n char[] listWordArray = wordFromList.toCharArray();\n Arrays.sort(listWordArray);\n\n if (Arrays.equals(listWordArray, objectWord) && !this.aWord.equals(wordFromList))\n {\n answer.add(someList.get(i));\n }\n\n }\n\n return answer;\n }", "public void testIterator01() {\r\n\t\tBTree<String, Integer> bt = new BTree<String, Integer>(4);\r\n\t\tList<String> words = TestUtils.randomWords(256, 3);\r\n\r\n\t\tfor (int i = 0; i < words.size(); i++) {\r\n\t\t\tbt.set(words.get(i), i);\r\n\t\t}\r\n\r\n\t\tCollections.sort(words);\r\n\t\tStringBuilder expected = new StringBuilder();\r\n\t\tfor (int i = 0; i < words.size(); i++) {\r\n\t\t\texpected.append(words.get(i)).append(',');\r\n\t\t}\r\n\r\n\t\tStringBuilder actual = new StringBuilder();\r\n\t\tfor (Entry<String, Integer> e : bt) {\r\n\t\t\tactual.append(e.getKey()).append(',');\r\n\t\t}\r\n\r\n\t\tassertEquals(actual.toString(), expected.toString());\r\n\t}", "public static void main(String[] args) {\n\t\tList<String> arrayList = new ArrayList<String>();\n\t\tarrayList.add(\"zhangsan\");\n\t\tarrayList.add(\"lisi\");\n\t\tarrayList.add(\"wangwu\");\n\t\tarrayList.add(\"zhaoliu\");\n\t\tarrayList.add(\"tianqi\");\n\t\t//for (int i = 0; i < 5; i++) {\n\t\t\t//String str = scanner.next();\n\t\t\t//arrayList.add(str);\n\t\t//}\n\t\tfor (Iterator iterator = arrayList.iterator(); iterator.hasNext();) {\n\t\t\tString string = (String) iterator.next();\n\t\t\tSystem.out.println(string);\n\t\t}\n\t\tSystem.out.println(\"================================\");\n\t\tSystem.out.println(arrayList.indexOf(\"zhangsan\"));\n\t\tSystem.out.println(arrayList.remove(\"lisi\"));\n\t\tarrayList.add(3,\"akak\");\n\t\tfor (Iterator iterator = arrayList.iterator(); iterator.hasNext();) {\n\t\t\tString string = (String) iterator.next();\n\t\t\tSystem.out.println(string);\n\t\t}\n\t\tSystem.out.println(\"============================\");\n\t\tSystem.out.println(arrayList.contains(\"wanger\"));\n\t\t//有一个新集合 其中数据写死 wangwu zhaoliu erhuo,添加到第一个集合中 \n\t\tArrayList<String> arrayList2 = new ArrayList<String>();\n\t\tarrayList2.add(\"wangwu\");\n\t\tarrayList2.add(\"zhaoliu\");\n\t\tarrayList2.add(\"erhuo\");\n\t\tarrayList.addAll(arrayList2);\n\t\tfor (Iterator iterator = arrayList.iterator(); iterator.hasNext();) {\n\t\t\tString string = (String) iterator.next();\n\t\t\tSystem.out.println(string);\n\t\t}\n\t\tSystem.out.println(\"==================================\");\n\t\t//对集合进行排序,提示 使用Collections.sort方法(排序规则就是字典顺序) */\n\t\tCollections.sort(arrayList);\n\t\tfor (Iterator iterator = arrayList.iterator(); iterator.hasNext();) {\n\t\t\tString string = (String) iterator.next();\n\t\t\tSystem.out.println(string);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tHashSet<String> words = new HashSet<String>();\n\t\t\n\t\twords.add(\"Drink\");\n\t\twords.add(\"Java\");\n\t\twords.add(\"Coffee\");\n\t\twords.add(\"Bean\");\n\t\twords.add(\"Java\");\n\t\t\n\t\tSystem.out.println(words.size());\n\t\tSystem.out.println(words);\n\t\t\n\t\tSystem.out.println(words.contains(\"Java\"));\n\t\tSystem.out.println(words.contains(\"Tea\"));\n\t\t//words.remove(1);\n\t\t//System.out.println(words);\n\t\t\n\t\tboolean removed1 = words.remove(\"Java\");\n\t\tSystem.out.println(removed1);\n\t\tSystem.out.println(words.size());\n\t\tSystem.out.println(words);\n//\t\t\n\t\tboolean removed2 = words.remove(\"Dawg\");\n\t\tSystem.out.println(removed2);\n\t\tSystem.out.println(words.size());\n\t\tSystem.out.println(words);\n\t\t\n\t\t//sorting the words\n\t\tString[] sortedWords = new String[words.size()];\n\t\tint i = 0;\n\t\tfor(String w : words)\n\t\t\tsortedWords[i++] = w;\n\t\tArrays.sort(sortedWords);\n\t\tfor(String w : sortedWords)\n\t\t\tSystem.out.print(w + \" \");\n\n\t}", "private void setWords() {\r\n words = new ArrayList<>();\r\n\r\n String line = null;\r\n try {\r\n // FileReader reads text files in the default encoding.\r\n FileReader fileReader = new FileReader(\"words.txt\");\r\n\r\n // Always wrap FileReader in BufferedReader.\r\n BufferedReader bufferedReader = new BufferedReader(fileReader);\r\n\r\n while((line = bufferedReader.readLine()) != null)\r\n words.add(line);\r\n\r\n // Always close files.\r\n bufferedReader.close();\r\n }\r\n catch(Exception ex) {\r\n ex.printStackTrace();\r\n System.out.println(\"Unable to open file '\");\r\n }\r\n }", "public BoggleSolver(String[] dictionary) {\n wordsSoFar = new ArrayList<String>();\n // 1. build the trie tree of the dictionary\n dict = new NewTrieSet();\n for (String s : dictionary) {\n if (s.length() >= MIN_WORD_LENGTH)\n dict.add(s);\n }\n }", "HashSet<String> removeDuplicates(ArrayList<String> words) {\n\t\tHashSet<String> keywords = new HashSet<String>();\n\t\tkeywords.addAll(words);\n\t\treturn keywords;\n\t}", "public ArrayList <String> getWordList () {\r\n return words;\r\n }", "public void insert(String word) {\n if (word == null) {\n return;\n }\n if (value == null) {\n value = new ArrayList<>();\n }\n value.add(word);\n }", "public static List<List<String>> groupAnagrams2(String[] strs) {\n Map<String, List<String>> map = new HashMap<>();\n for(String s : strs){\n char[] ch = s.toCharArray();\n Arrays.sort(ch);\n String key = String.valueOf(ch);\n if(!map.containsKey(key)) map.put(key, new ArrayList<>());\n map.get(key).add(s);\n }\n return new ArrayList<>(map.values());\n }", "public Dictionary () {\n\t\tsuper();\n\t\t//words = new ArrayList < String > () ;\n\t}", "private LowercaseWordList() {\n\n }", "public void addWord(String word) {\n all.add(word);\n TrieNode head = root;\n \n for (char i :word.toCharArray()){\n\n int k = i-'a';\n if (head.child[k]==null)\n {\n head.child[k] = new TrieNode();\n }\n head = head.child[k];\n \n }\n head.end = true;\n }", "public void add(LLNodeHash word){\n if (!checkWord(word)){\n put(word);\n }\n }", "public void populateWord(String word) {\n\t\tthis.add(word);\n\t}", "public List<Map.Entry<String, Integer>> getWordList(){\n\t\treturn new ArrayList<>(GeneralWordCounter.entrySet());\n\t}", "private static ArrayList<sri.Pair<String,Integer>> mostFrequentWords(String path) throws IOException {\r\n PriorityQueue<Pair<String, Integer>> listOfWords = new PriorityQueue<>(10,(o1, o2) -> {\r\n return ((int) o2.getSecond() - (int) o1.getSecond());\r\n });\r\n\r\n HashMap<String,Integer> mapOfWords = new HashMap<>();\r\n\r\n BufferedReader br;\r\n String word;\r\n ArrayList outputList = new ArrayList();\r\n\r\n File file = new File(path);\r\n\r\n br = new BufferedReader(new FileReader(file));\r\n\r\n while ( (word = br.readLine()) != null) {\r\n if (mapOfWords.containsKey(word)) {\r\n mapOfWords.put(word, mapOfWords.get(word) + 1);\r\n } else {\r\n mapOfWords.put(word, 1);\r\n }\r\n }\r\n\r\n for (Map.Entry<String,Integer> entry: mapOfWords.entrySet()){\r\n sri.Pair<String,Integer> tuple = new sri.Pair<String,Integer>(entry.getKey(),entry.getValue());\r\n listOfWords.offer(tuple);\r\n }\r\n\r\n for (int i = 0; i < 5; i++){\r\n outputList.add(new sri.Pair<String,Integer>(listOfWords.peek().getFirst(),listOfWords.poll().getSecond()));\r\n }\r\n\r\n return outputList;\r\n\r\n\r\n }", "public static void sortStringsDictionary( ArrayList<String> lst )\n {\n PredicateStringPair p = (a, b) -> {\n String[] newA = a.split(\"\");\n String[] newB = b.split(\"\");\n int min;\n boolean mismatch = false;\n String adif = \"\";\n String bdif = \"\";\n if (a.length() < b.length()) {\n min = a.length();\n } else {\n min = b.length();\n }\n\n for (int i = 0; i < min; i++) {\n if (!newA[i].equals(newB[i])) {\n mismatch = true;\n adif = newA[i];\n bdif = newB[i];\n break;\n\n }\n }\n if (mismatch == false) {\n if(a.length() < b.length()) {\n return true;\n }\n else{\n return false;\n }\n }\n else{\n if(adif.matches(\"[a-zA-Z]\") && !bdif.matches(\"[a-zA-Z]\")) {\n return true;\n }\n else if (bdif.matches(\"[a-zA-Z]\") && !adif.matches(\"[a-zA-Z]\")) {\n return false;\n }\n else if (adif.matches(\"[a-zA-Z]\") && bdif.matches(\"[a-zA-Z]\")){\n //Automates the creation of the custom alphabetical ordering\n ArrayList<String> alph = new ArrayList<String>();\n for (int i = 0; i < 26; i++){\n alph.add(Character.toString(97 + i));\n alph.add(Character.toString(65 + i));\n }\n if (alph.indexOf(adif) < alph.indexOf(bdif)){\n return true;\n }\n else {\n return false;\n }\n }\n else {\n if (adif.compareTo(bdif) > 1) {\n return false;\n }\n else{\n return true;\n }\n\n\n }\n\n }\n\n };\n sortStrings(lst, p);\n }", "private static void alphabetize() {\r\n Collections.sort(kwicIndex, String.CASE_INSENSITIVE_ORDER);\r\n }", "public ArrayList<String> createWordBank() {\r\n ArrayList<String> wordBank = new ArrayList<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\"); // open input stream to read dictionary\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() == 9) wordBank.add(line); // take only the 9 letter words\r\n }\r\n } catch (IOException e) {\r\n }\r\n return wordBank;\r\n }", "public ArrayList<Word> getNewWords() {\n\t\tArrayList<Word> newWords = new ArrayList<>();\n\t\tint index = 0;\n\t\twhile (index < m__vocabs.size() && newWords.size() <= m__numberOfNewVocabularies) {\n\t\t\tWord word = (Word)m__vocabs.get(index);\n\t\t\tif (word.getNumberOfRepetitions() == 0) {\n\t\t\t\tnewWords.add(word);\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\t\treturn newWords;\n\t}", "public List<List<String>> groupAnagrams(String[] strs) {\n \n int len = strs.length;\n Hashtable<String, List<String>> anagrams = new Hashtable<>();\n \n for(int i=0; i<len; i++){\n char[] sorted = strs[i].toCharArray(); \n Arrays.sort(sorted);\n String key = String.valueOf(sorted);\n List<String> temp = new ArrayList<>();\n \n if(anagrams.containsKey(key)){\n temp = anagrams.get(key);\n \n }\n temp.add(strs[i]);\n anagrams.put(key, temp);\n }\n \n \n List<List<String>> answer = new ArrayList<>();\n \n for(List<String> item: anagrams.values() ){\n answer.add(item);\n }\n \n return answer;\n \n }", "public WordList() {\n\t\twordList = new ArrayList<>();\n\t\t// TODO Add your code here\n\t}", "public boolean add(String word) {\r\n\t\treturn dict.add(word);\r\n\t}", "public HangmanManager(Set<String> words, boolean debugOn) {\r\n \t//Check Preconditions\r\n \tif (words == null || words.size() <= 0) {\r\n \t\tthrow new IllegalArgumentException(\"pre: words != null, words.size() > 0\");\r\n \t}\r\n \t\r\n \t//Build Dictionary ArrayList using iterator\r\n \tdictionary = new ArrayList <String>();\r\n \tIterator<String> iterator = words.iterator();\r\n \twhile (iterator.hasNext()) {\r\n \t\tdictionary.add(iterator.next());\r\n \t} \r\n }", "public Words add(String cs){\n words.add(cs);\n return this;\n }", "public static List<String> sortWords(List<String> words) {\n\t\tfor (int i = 0; i < words.size(); i++) {\n\t\t\tint lowerOrder = i;\n\t\t\tfor (int j = i + 1; j < words.size(); j++) {\n\t\t\t\tif (words.get(j).compareTo(words.get(lowerOrder)) < 0) {\n\t\t\t\t\tlowerOrder = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tString switching = words.get(lowerOrder);\n\t\t\twords.set(lowerOrder, words.get(i));\n\t\t\twords.set(i, switching);\n\t\t}\n\t\treturn words;\n\t}", "public HangmanManager(Set<String> words) {\r\n \t//Check Preconditions\r\n \tif (words == null || words.size() <= 0) {\r\n \t\tthrow new IllegalArgumentException(\"pre: words != null, words.size() > 0\");\r\n \t}\r\n \t\r\n \t//Build Dictionary ArrayList using iterator\r\n \tdictionary = new ArrayList <String>();\r\n \tIterator<String> iterator = words.iterator();\r\n \twhile (iterator.hasNext()) {\r\n \t\tdictionary.add(iterator.next());\r\n \t}\r\n }", "public List<List<String>> anagrams(List<String> words) {\n HashMap<String, List<String>> wordsByAnagram = new HashMap<>();\n\n for (String word: words) {\n char[] sortedCharArray = word.toCharArray();\n Arrays.sort(sortedCharArray);\n\n String anagram = String.valueOf(sortedCharArray);\n\n if (wordsByAnagram.containsKey(anagram)) {\n List<String> anagrams = wordsByAnagram.get(anagram);\n anagrams.add(word);\n } else {\n ArrayList<String> anagrams = new ArrayList<>();\n anagrams.add(word);\n wordsByAnagram.put(anagram, anagrams);\n }\n }\n\n ArrayList<List<String>> result = new ArrayList<>();\n\n for (List<String> anagrams: wordsByAnagram.values()) {\n result.add(anagrams);\n }\n\n return result;\n }", "public static void main(String[] args) {\n String[] strings = new String[100];\n for (int i = 0; i < strings.length; i++) {\n strings[i] = randomStrings(2);\n }\n// for (String s : strings) {\n// System.out.println(s);\n// }\n ArrayList<String> appeared = new ArrayList<>();\n for (String s : strings) {\n if (!appeared.contains(s)) {\n appeared.add(s);\n }\n }\n System.out.println(appeared.size());\n\n }", "@Override\n public void add(String text) {\n wordsLinkedList.addAll(Arrays.asList(text.split(\"\\\\s\")));\n }", "public Map<String, Integer> findUnicalWord(ArrayList<Word> text)\n {\n String[] words=new String[text.size()];\n for(int i=0; i<text.size(); i++){\n words[i]=text.get(i).toString();\n }\n HashMap<String, Integer> myWordsCount = new HashMap<>();\n for (String s : words){\n if (myWordsCount.containsKey(s)) myWordsCount.replace(s, myWordsCount.get(s) + 1);\n else myWordsCount.put(s, 1);\n }\n\n Map<String, Integer> newWordsCount = myWordsCount\n .entrySet()\n .stream()\n .sorted(Collections.reverseOrder(Map.Entry.comparingByValue()))\n .collect(\n toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2,\n LinkedHashMap::new));\n\n return newWordsCount;\n\n }", "public ArrayList wordsInNumFiles(int number){\n System.out.println(\"\\nThese words appear \" + number + \" times: \");\n ArrayList<String> words = new ArrayList<String>();\n int countWordsSizeN =0;\n for (String word : hashWords.keySet()){\n int counts = hashWords.get(word).size();\n if(counts == number){//if count of this word is equal to the given number\n words.add(word);//add this word into the words Arrylist\n countWordsSizeN++;//increment the count of words of size n\n System.out.println( \"words are\"+ word ); \n }\n // System.out.println(\"total of words repeated \" + number + \" times: \" + countWordsSizeN + \"words are\"+ word );\n }\n System.out.println(\"total of words repeated \" + number + \" times: \" + countWordsSizeN + \"words are\"+ words );\n return words;\n }", "public ArrayList<String> anagrams(String[] strs) {\n HashMap<String, ArrayList<String>> rec=new HashMap<String,ArrayList<String>>();\n ArrayList<String> ans=new ArrayList<String>();\n if(strs.length==0)return ans;\n for(int i=0;i<strs.length;i++){\n char[] key=strs[i].toCharArray();\n Arrays.sort(key);\n String newkey=new String(key);\n if(rec.containsKey(newkey)){\n rec.get(newkey).add(strs[i]);\n }\n else{\n ArrayList<String> ad=new ArrayList<String>();\n ad.add(strs[i]);\n rec.put(newkey,ad);\n }\n }\n for(ArrayList<String> value:rec.values()){\n if(value.size()>1)ans.addAll(value);\n }\n return ans;\n }", "public StringList createSorted() {\n StringList list = this.duplicate();\n list.sort();\n return list;\n }", "public static Hashtable<String,Thought> buildWordSet(Vector<Thought> words) {\r\n\t\tHashtable<String,Thought> ret = new Hashtable<String,Thought>();\r\n\t\tfor(Thought word : words) {\r\n\t\t\tret.put(word.representation, word);\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public void addBike(String bike) {\n if (index == bikes.length) {\n String[] largerBikes = new String[bikes.length + 5];\n System.arraycopy(bikes, 0, largerBikes, 0, bikes.length);\n bikes = largerBikes;\n }\n\n bikes[index] = bike;\n index++;\n }", "public void populateDataStructure() {\n\t\tfp.initiateFileProcessing();\r\n\t\tint length=0,i=0;\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tstr=fp.readOneLine();\r\n\t\t\tif(str==null){\r\n\t\t\t\t//System.out.println(\"------\");\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t//System.out.println(str);\r\n\t\t\t\tString[] line=str.split(\"\\\\s+\");\r\n\t\t\t\t\r\n\t\t\t\tfor(i=0;i<line.length;i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t//System.out.println(line[i]);\r\n\t\t\t\t\tif(line[i].length()>0){\r\n\t\t\t\t\t\tsbbst.insert(line[i]);\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//length--;\r\n\t\t\t\t\t//i++;\r\n\t\t\t\t}\r\n\t\t\t\t//System.out.println(line.length);\r\n\t\t\t\t//while((length=line.length)>0 & i<=length-1)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t//System.out.println(line[i]);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//System.out.println(line[i]);\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*while(true)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(true){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(line[i]);\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\t}*/\r\n\t\t\t\t\tlength--;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\t//System.out.println(length+\"\\n\"+i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//sbbst.inorder();\r\n\t\t//System.out.println(\"Total Words: \"+ count);\r\n\t\t//sbbst.inorder();\r\n\t\t//System.out.println(\"Distinct Words: \"+ sbbst.distinctCount);\r\n\t\tfp.closeFiles();\r\n\t}" ]
[ "0.64101285", "0.63825506", "0.60816157", "0.60138494", "0.59011227", "0.5864329", "0.58232725", "0.58006334", "0.57991374", "0.57893", "0.5780682", "0.57667774", "0.57633615", "0.5720013", "0.57182837", "0.57141167", "0.5706912", "0.56834924", "0.5648457", "0.56310713", "0.561989", "0.5594209", "0.557485", "0.5555785", "0.5539981", "0.5536895", "0.5519413", "0.55140495", "0.54952526", "0.5492136", "0.5491547", "0.5471998", "0.5464161", "0.5462911", "0.5461983", "0.5461444", "0.54607815", "0.54599476", "0.54543054", "0.5451182", "0.54419994", "0.5423263", "0.54224914", "0.541225", "0.54071456", "0.5394428", "0.53914446", "0.538598", "0.53844875", "0.5352369", "0.53516525", "0.5337271", "0.53371733", "0.532435", "0.5317303", "0.53045803", "0.5297818", "0.529312", "0.528208", "0.52798736", "0.52683085", "0.5267804", "0.52674687", "0.5261998", "0.52567023", "0.5246553", "0.52403635", "0.5236804", "0.5236483", "0.5224638", "0.52132565", "0.52115434", "0.520722", "0.52070326", "0.5205161", "0.5204354", "0.5203077", "0.519867", "0.5195761", "0.5195222", "0.51934516", "0.51857746", "0.5184951", "0.5183399", "0.5179512", "0.516445", "0.516232", "0.516097", "0.5158071", "0.5151333", "0.5151151", "0.51495636", "0.51477873", "0.5145235", "0.51450634", "0.51397836", "0.51368517", "0.5131949", "0.513171", "0.5127561", "0.5127489" ]
0.0
-1
Combines everything! Takes input, creates puzzle, offers to change input
public static Puzzle inputToPuzzle() { Puzzle puzzle = new Puzzle(); printInitialPromptMessage(); final String choice = chooseCubeInputType(); if (choice.equals("r")) { // random set of cubes printRandomPromptMessage(); puzzle = RandomController.getRandomPuzzle(); } else { // user's choice of cubes printChoicePromptMessage(); final String[][] inputArray = takeStdInput(); puzzle = convertInputArrayToPuzzle(inputArray); } changeCubeInPuzzle(puzzle); // sc.close(); return puzzle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void solvePuzzle(){\n\t\t// check to make sure pieces was set\n\t\tif(possiblePieces == null){\n\t\t\tSystem.out.println(\"PuzzleThree::solvePuzzle(): possiblePieces is not initialized!\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// initialize population with random sequences\n\t\tinitializePopulation();\n\t\t\n\t\t// print header of results\n\t\tSystem.out.printf(\"%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\n\", \"Current Generation\"\n\t\t\t\t, \"Most Fit Fitness\"\n\t\t\t\t, \"Most Fit Score\"\n\t\t\t\t, \"Most Fit Generation\"\n\t\t\t\t, \"Median Fit Fitness\"\n\t\t\t\t, \"Median Fit Score\"\n\t\t\t\t, \"Median Fit Generation\"\n\t\t\t\t, \"Worst Fit Fitness\"\n\t\t\t\t, \"Worst Fit Score\"\n\t\t\t\t, \"Worst Fit Generation\");\n\t\t\n\t\t\t\t// keep culling and reproducing until time is up\n\t\twhile(!clock.overTargetTime()){\n\t\t\t// every few generations print out generation, most fit, median fit, worst fit\n\t\t\tif(generation % 5000 == 0){\n\t\t\t\tCollections.sort(population);\n\t\t\t\tBuilding mostFit = population.get(POPULATION_SIZE-1);\n\t\t\t\tBuilding medianFit = population.get((int)(POPULATION_SIZE / 2) - 1);\n\t\t\t\tBuilding worstFit = population.get(0);\n\t\t\t\tSystem.out.printf(\"%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\n\", generation, \n\t\t\t\t\t\t\t\t\tmostFit.getFitness(), mostFit.getScore(), mostFit.getGeneration(),\n\t\t\t\t\t\t\t\t\tmedianFit.getFitness(), medianFit.getScore(), medianFit.getGeneration(),\n\t\t\t\t\t\t\t\t\tworstFit.getFitness(), worstFit.getScore(), worstFit.getGeneration());\n\t\t\t}\n\t\t\t\n\t\t\t// remove a portion of the population\n\t\t\tcullPopulation();\n\t\t\t\n\t\t\t// reproduce with the fittest more likely being parents\n\t\t\treproduce();\n\t\t\t\n\t\t\tgeneration++;\n\t\t}\n\n\t\t\n\t\t// print out information about most fit\n\t\tCollections.sort(population);\n\t\tCollections.reverse(population);\n\t\tBuilding mostFit = population.get(0);\n\n\t\tSystem.out.printf(\"\\n\\nBest in population is\\n\");\n\t\tSystem.out.printf(\"Sequence: \\n\");\n\t\tfor(int i = 0; i < mostFit.getList().length; i++){\n\t\t\tSystem.out.printf(\"\\t%s\\n\", mostFit.getList()[i].toString());\n\n\t\t}\n\n\t\tSystem.out.printf(\"\\nFitness: %d\\n\", mostFit.getFitness());\n\t\tSystem.out.printf(\"Score: %d\\n\", mostFit.getScore());\n\t}", "private static void task3() {\n\n\n System.out.printf(\"\\nTASK 3:\\nSee the 8 puzzles generated by this \" +\n \"task.\\nEach size (5, 7, 9 & 11) has two puzzles each; one \" +\n \"with a positive k value and one with a negative k value.\\n\" +\n \"Each puzzle is provided with a corresponding visualization \" +\n \"of it's solution\\n\");\n int[] puzzleSizes = new int[]{5, 7, 9, 11};\n for (int puzzleSize : puzzleSizes){\n createT3Puzzles(puzzleSize, true);\n createT3Puzzles(puzzleSize, false);\n }\n return;\n }", "public void puzzle(){\n\t\tScanner scan;\n\t//\tint pLength = 0;\n\t// int puzzleNum = 0;\n\t\ttry {\n\t\t\tscan = new Scanner(new File(\"puzzles.txt\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"document not found\", \"error\", JOptionPane.ERROR_MESSAGE);\n\t\t\tSystem.exit(0);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\twhile(scan.hasNextLine()){\n\t\t\tString hint = scan.nextLine();\n\t\t\tString word = scan.nextLine();\n\t\t\tword = word.toUpperCase();\n\t\tsolvepuzzle store = new solvepuzzle(hint,word);\n\t\tpuzzle.add(store);\n\t\t}\n\t\t\n\t\t//Collections.shuffle(puzzle);\n\t\tpLength = puzzle.size();\n\t\tframe.sethint(puzzle.get(puzzleNum).gethint());\n\t\tframe.setSolved(puzzle.get(puzzleNum).getsolved());\n\t\t//puzzleNum++;\n\t\tSystem.out.println(puzzleNum);\n\t}", "public void buildPuzzle (String type) {\r\n try {\r\n puzzle = Puzzle.getConstructor (type);\r\n puzzle.setList (words);\r\n puzzle.generate ();\r\n int height = Components.getScrollPanel ().getHeight ();\r\n int width = Components.getScrollPanel ().getWidth ();\r\n Components.getScrollPanel ().setSize (width + 1, height);\r\n Components.getScrollPanel ().setSize (width, height);\r\n }\r\n catch (Exception e) {\r\n JOptionPane.showMessageDialog (null, \"A Critical Error Has Occurred\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "public Puzzle exPuzzle() {\n List<Tile> tiles = new ArrayList<>(9);\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.x), new Pic(Pattern.B, Half.y), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.y), new Pic(Pattern.D, Half.x), new Pic(Pattern.C, Half.y), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.y), new Pic(Pattern.D, Half.x), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.C, Half.x), new Pic(Pattern.C, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.y), new Pic(Pattern.B, Half.y), new Pic(Pattern.B, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.C, Half.y), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.A, Half.x), new Pic(Pattern.D, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.y), new Pic(Pattern.B, Half.x), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.y), new Pic(Pattern.A, Half.x), new Pic(Pattern.D, Half.y), new Pic(Pattern.C, Half.y)));\n return new Puzzle(tiles);\n }", "void generateNewPuzzle() {\n\t\t/* Clean up and initialize the layout for the new puzzle */\n\t\tinitLayout();\n\n\t\t/* Make appropriate changes to the UI */\n\t\tmsgText.setText(R.string.good_luck_string); //change text to 'Good Luck!'\n\t\tviewAgainButton.setText(R.string.see_again_string); //change text to \"View Original Image\"\n\t\t\n\t\t/* Generate the puzzle again */\n\t\tgeneratePuzzle(this.getResources(), R.drawable.pic);\n\t}", "void generateBoard(){\r\n rearrangeSolution();\r\n makeInitial();\r\n }", "private static <A,B> List<Map<A,B>> generateAllPossibilities(List<Pair<A,Set<B>>> input){\n\t\tif(input.size()==0){\n\t\t\tList<Map<A,B>> l = new ArrayList<Map<A,B>>();\n\t\t\tl.add(new HashMap<A,B>());\n\t\t\treturn l;\n\t\t} else {\n\t\t\tPair<A, Set<B>> entry = input.get(0);\n\t\t\t\n\t\t\tList<Pair<A,Set<B>>> newList = new ArrayList<Pair<A,Set<B>>>();\n\t\t\tfor(int i=1;i<input.size();i++){\n\t\t\t\tnewList.add(input.get(i));\n\t\t\t}\n\t\t\t\n\t\t\tList<Map<A,B>> results = generateAllPossibilities(newList);\n\t\t\tList<Map<A,B>> newResults = new ArrayList<Map<A,B>>();\n\t\t\t\n\t\t\tfor(B newEntry : entry.second()){\n\t\t\t\tfor(Map<A,B> previousMap : results){\n\t\t\t\t\tMap<A,B> newMap = new HashMap<A,B>();\n\t\t\t\t\tfor(Entry<A,B> e : previousMap.entrySet()){\n\t\t\t\t\t\tnewMap.put(e.getKey(), e.getValue());\n\t\t\t\t\t}\n\t\t\t\t\tnewMap.put(entry.first(), newEntry);\n\t\t\t\t\tnewResults.add(newMap);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn newResults;\n\t\t}\n\t}", "public void allCombinations(){\n // Sorts the AI's rack\n combinations = new ArrayList<ArrayList<Piece>>();\n ArrayList<Piece> pieces = playersPieces;\n this.removeNulls(numOfNulls());\n for (int index = 0; index < pieces.size();index++){\n Piece temp = pieces.get(index);\n char compareWord = pieces.get(index).theLetter();\n int lowerIndex = index-1;\n\n while (lowerIndex >=0 && compareWord < pieces.get(lowerIndex).theLetter()){\n pieces.set(lowerIndex+1, pieces.get(lowerIndex));\n lowerIndex--;\n }\n\n pieces.set(lowerIndex+1,temp);\n }\n \n // Makes a list of all combinations through the recursive combine method\n combine(pieces, 0, new ArrayList<Piece>());\n insertionSort(combinations);\n combinations.remove(0);\n \n return;\n }", "public static void main(String[] args) throws Exception {\n Puzzle puzzle = new Puzzle(10, 10);\n ArrayList<Integer>[] row_clues = new ArrayList[puzzle.getRows()];\n ArrayList<Integer>[] column_clues = new ArrayList[puzzle.getColumns()];\n Integer[][] r_clues = {\n {1, 1, 2}, {2, 1, 3}, {2, 3}, {2, 5}, {1, 1},\n {7}, {3, 1}, {5}, {4}, {6}\n };\n Integer[][] c_clues = {\n {3, 1}, {7}, {3, 1}, {5}, {1, 3},\n {2, 1, 5}, {3, 3}, {3, 1}, {4}, {4}\n };\n for(int i = 0; i < r_clues.length; ++i) {\n row_clues[i] = new ArrayList<>(Arrays.asList(r_clues[i]));\n }\n for(int i = 0; i < c_clues.length; ++i) {\n column_clues[i] = new ArrayList<>(Arrays.asList(c_clues[i]));\n }\n puzzle.setRowClues(row_clues);\n puzzle.setColumnClues(column_clues);\n PuzzleSolver solver = new PuzzleSolver(puzzle);\n solver.solve();\n for(Board b : solver.getSolutions()) {\n System.out.println(b);\n }\n }", "abstract String makeAClue(String puzzleWord);", "private void randomizePuzzle() {\n\t\t// Choose random puzzles, shuffle the options.\n\t\tthis.puzzle = BarrowsPuzzleData.PUZZLES[(int) (Math.random() * BarrowsPuzzleData.PUZZLES.length)];\n\t\tthis.shuffledOptions = shuffleIntArray(puzzle.getOptions());\n\t}", "private void generateCombination() {\r\n\r\n\t\tfor (byte x = 0; x < field.length; x++) {\r\n\t\t\tfor (byte y = 0; y < field[x].length; y++) {\r\n\t\t\t\tfield[x][y].setValue((byte) newFigure(Constants.getRandom()));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void generatePuzzle(Resources res, int drawable_id) {\n\t\t/* Call generatePuzzle() to break the picture into 9 pieces and randomize their\n\t\t * positions and orientations. Convert the drawable to bitmap and send it */ \n\t\tArrayList<Piece> pieces = Helper.createPieces\n\t\t\t\t(BitmapFactory.decodeResource(this.getResources(), R.drawable.pic));\n\t\tif (pieces == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t/* Initialize jigsawPieces */\n\t\tjigsawPieces = new ArrayList<Piece>();\n\t\tfor (int i=0; i<NUM[TOTAL]; i++) {\n\t\t\tjigsawPieces.add(i, pieces.get(i));\n\t\t}\n\t\t\n\t\t/* Copy the pieces from the 'pieces' array to jigsawPieces and sort it by currentPosition.\n\t\t * Note that the 'pieces' array is sorted by correctPosition*/\n\t\tfor (int i=0; i<NUM[TOTAL]; i++) {\n\t\t\t/* Manipulate the array such that jigsawPieces stores pieces sorted by currentPosition */\n\t\t\tjigsawPieces.set(pieces.get(i).getPosition(), pieces.get(i));\n\t\t}\n\t\t\n\t\t/* Assign the correct images to the ImageViews */\n\t\tfor (int i=0; i<NUM[TOTAL]; i++) {\n\t\t\tpieceViews.get(i).setImageBitmap(jigsawPieces.get(i).getImage());\n\t\t}\n\t\t\n\t\t/* Set the rows and columns for the GridLayout and add the individual ImageViews to it */\n\t\tdrawGridLayout();\n\t\t\n\t\t/* Set the complete flag to false to indicate that the puzzle is not solved */\n\t\tcomplete = false;\n\t\t\n\t\t/* Check if any of the pieces are already placed correctly by chance (or if the puzzle is already solved) */\n\t\tfor (int i=0; i<NUM[TOTAL]; i++) {\n\t\t\tHelper.checkCompleteness(jigsawPieces.get(i), this);\n\t\t}\n\t}", "@Test\n @Order(1)\n void algorithms() {\n \n Combination initialComb = new Combination();\n for (int i = 0; i < assignementProblem.getAssignmentData().getLength(); i++) {\n initialComb.add((long) i + 1);\n }\n assignementProblem.setInCombination(initialComb);\n executeAlgo(SearchTestUtil.ALGO.TABU);\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n }", "public static void main(String[] args){\n ArrayList<String> doorPatterns = new ArrayList<String>(8);\n //create individual patterns\n //Note: all patterns need to be the same length. Could add checking for this, but, nah.\n /*doorPatterns.add(\"1*11**0*02\"); //0\n doorPatterns.add(\"**1*111**1\"); //1\n doorPatterns.add(\"**11*211**\"); //2\n doorPatterns.add(\"*10*1*10**\"); //3\n doorPatterns.add(\"00****0***\"); //4\n doorPatterns.add(\"*01*******\"); //5\n doorPatterns.add(\"*00*1*111*\"); //6\n doorPatterns.add(\"0*11******\"); //7*/\n doorPatterns.add(\"1010**1***\"); //0\n doorPatterns.add(\"******1**1\"); //1\n doorPatterns.add(\"2*10*1****\"); //2 fix this to be a 2\n doorPatterns.add(\"**1***101*\"); //3\n doorPatterns.add(\"*00***111*\"); //4\n doorPatterns.add(\"**01**01**\"); //5\n doorPatterns.add(\"0*11******\"); //6\n doorPatterns.add(\"110*11***0\"); //7\n\n\n //Create new puzzle using the hard-coded patterns.\n //Puzzle creates doors and orbs based on the patterns provided.\n PuzzleUI theWindow = new PuzzleUI();\n Puzzle thePuzzle = new Puzzle(doorPatterns,theWindow);\n theWindow.puzzleInit(thePuzzle);\n theWindow.addButtons(thePuzzle.orbList);\n theWindow.frame.setVisible(true);\n }", "public List<Configuration> solve(){\n int group = 0;\n for(List<Configuration> set : input){\n minimize(set);\n\n for(Configuration root : set) {\n root.setGroup(group);\n }\n group++;\n\n }\n\n // Step 2: Preprocess\n sortBySize(input);\n\n // Step 5: Initialize set of partial solutions\n List<Configuration> partialSolutions;\n if(input.size()==0){\n return null;\n }\n else {\n partialSolutions = input.get(0);\n input.remove(partialSolutions);\n }\n\n // Step 6: The compositional computations\n for(List<Configuration> set : input) {\n filter(partialSolutions, setCutoff);\n filter(set, setCutoff);\n partialSolutions = combine(partialSolutions, set, constraints);\n }\n\n // Step 7: Postprocessing\n //greedyPostProcessing(partialSolutions);\n\n return partialSolutions;\n }", "public Solver(String inputFile){\r\n\tthis();\r\n\tString[][] puzzle = readPuzzle(inputFile);\r\n\t\r\n\tfor (int r = 0; r < puzzle.length; r++){\r\n\t for (int c = 0; c < puzzle[0].length; c++){\r\n\t\tboard[r][c] = new Box();\r\n\t }\r\n\t}\r\n\r\n\tfor (int r = 0; r < puzzle.length; r++){\r\n\t for (int c = 0; c < puzzle[0].length; c++){\r\n\t if (!(puzzle[c][r].equals(\"_\"))){\r\n\t\t int given = Integer.parseInt(puzzle[c][r]);\r\n\t\t assign(given, r, c);\r\n\t\t}\r\n\t }\r\n\t}\r\n }", "private static void createT3Puzzles(int puzzleSize, boolean hasSolution) {\n\n Solution solution;\n Graph graph;\n\n do {\n graph = new Graph(puzzleSize);\n graph.populateGraph(); // binds numbers of jumps to graph\n graph.populateNeighbors();\n solution = Algorithms.BFS(graph);\n } while ( hasSolution ? solution.getK() < 0 : solution.getK() > 0);\n\n GUI gui = new GUI();\n String sizeAsStr = Integer.toString(puzzleSize);\n String kStr = Integer.toString(solution.getK());\n String name = hasSolution ?\n \"Task 3a: \" + sizeAsStr + \"x\" + sizeAsStr :\n \"Task 3b: \" + sizeAsStr + \"x\" + sizeAsStr;\n gui.run(graph, name);\n\n int[] distancePerCell = graph.getDistances();\n GUI numberOfMovesGUI = new GUI();\n numberOfMovesGUI.createNumberOfMovesGUI(puzzleSize, distancePerCell,\n name + \" = \" + kStr);\n }", "private void combine(ArrayList<Piece> numbers, int index,ArrayList<Piece> combinePieces) {\n // Leaves when you get to end of players pieces\n if (index == numbers.size()) {\n combinations.add(combinePieces);\n } \n // Includes the current piece or doesn't include it in combination\n else {\n ArrayList<Piece> Include = new ArrayList<Piece>();\n\n for (int i = 0; i < combinePieces.size(); i++)\n Include.add(combinePieces.get(i));\n\n Include.add(numbers.get(index));\n\n // Recalls method for next run\n combine(numbers, ++index, Include);\n combine(numbers, index, combinePieces);\n }\n }", "public MagipicPuzzle solve() {\r\n while (!activeClues.isEmpty()) {\r\n Set<Clue> newClues = Sets.newHashSet();\r\n\r\n for (Clue clue : activeClues) {\r\n boolean solved = false;\r\n for (Class<? extends ClueSolutionRule> ruleClass : RULES) {\r\n // This would be easier with Java 8's ::new constructor references.\r\n ClueSolutionRule rule = Reflect.on(ruleClass).create(clue).get();\r\n\r\n if (rule.hasSolution()) {\r\n newClues.addAll(rule.getNewClues());\r\n solved = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!solved) {\r\n newClues.add(clue);\r\n }\r\n }\r\n\r\n Preconditions.checkState(!activeClues.equals(newClues), \"Puzzle appears unsolvable.\");\r\n activeClues = newClues;\r\n }\r\n\r\n return this;\r\n }", "PuzzleSolver(String inputContent) {\n parseContent(inputContent);\n }", "public void run(){\n\t\t//Create the Puzzle\n\t\tcreatePuzzle(0,0);\n\t\t\n\t\t//Print the Final Puzzle\n\t\tprintPuzzle();\n\t}", "void mergePiece(Piece piece);", "public void generate() {\n\t\tint randNum;\n\n\t\t// Generates variables.\n\t\tfor (int i = 0; i < variables.length; i++) {\n\t\t\trandNum = rand.nextInt(9) + 1;\n\t\t\twhile (!checkDuplicate(variables, i, randNum)) {\n\t\t\t\trandNum = rand.nextInt(9) + 1;\n\t\t\t}\n\t\t\tvariables[i] = randNum;\n\t\t}\n\n\t\t// Example sudoku.\n\t\trandNum = rand.nextInt(3) + 1;\n\t\tswitch (randNum) {\n\t\tcase 1:\n\t\t\tint[][] array1 = { { 4, 7, 1, 3, 2, 8, 5, 9, 6 },\n\t\t\t\t\t{ 6, 3, 9, 5, 1, 4, 7, 8, 2 },\n\t\t\t\t\t{ 5, 2, 8, 6, 7, 9, 1, 3, 4 },\n\t\t\t\t\t{ 1, 4, 2, 9, 6, 7, 3, 5, 8 },\n\t\t\t\t\t{ 8, 9, 7, 2, 5, 3, 4, 6, 1 },\n\t\t\t\t\t{ 3, 6, 5, 4, 8, 1, 2, 7, 9 },\n\t\t\t\t\t{ 9, 5, 6, 1, 3, 2, 8, 4, 7 },\n\t\t\t\t\t{ 2, 8, 4, 7, 9, 5, 6, 1, 3 },\n\t\t\t\t\t{ 7, 1, 3, 8, 4, 6, 9, 2, 5 } };\n\t\t\tcopy(array1, answer); // Copies example to answer.\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tint[][] array2 = { { 8, 3, 5, 4, 1, 6, 9, 2, 7 },\n\t\t\t\t\t{ 2, 9, 6, 8, 5, 7, 4, 3, 1 },\n\t\t\t\t\t{ 4, 1, 7, 2, 9, 3, 6, 5, 8 },\n\t\t\t\t\t{ 5, 6, 9, 1, 3, 4, 7, 8, 2 },\n\t\t\t\t\t{ 1, 2, 3, 6, 7, 8, 5, 4, 9 },\n\t\t\t\t\t{ 7, 4, 8, 5, 2, 9, 1, 6, 3 },\n\t\t\t\t\t{ 6, 5, 2, 7, 8, 1, 3, 9, 4 },\n\t\t\t\t\t{ 9, 8, 1, 3, 4, 5, 2, 7, 6 },\n\t\t\t\t\t{ 3, 7, 4, 9, 6, 2, 8, 1, 5 } };\n\t\t\tcopy(array2, answer);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tint[][] array3 = { { 5, 3, 4, 6, 7, 8, 9, 1, 2 },\n\t\t\t\t\t{ 6, 7, 2, 1, 9, 5, 3, 4, 8 },\n\t\t\t\t\t{ 1, 9, 8, 3, 4, 2, 5, 6, 7 },\n\t\t\t\t\t{ 8, 5, 9, 7, 6, 1, 4, 2, 3 },\n\t\t\t\t\t{ 4, 2, 6, 8, 5, 3, 7, 9, 1 },\n\t\t\t\t\t{ 7, 1, 3, 9, 2, 4, 8, 5, 6 },\n\t\t\t\t\t{ 9, 6, 1, 5, 3, 7, 2, 8, 4 },\n\t\t\t\t\t{ 2, 8, 7, 4, 1, 9, 6, 3, 5 },\n\t\t\t\t\t{ 3, 4, 5, 2, 8, 6, 1, 7, 9 } };\n\t\t\tcopy(array3, answer);\n\t\t\tbreak;\n\t\t}\n\n\t\treplace(answer); // Randomize once more.\n\t\tcopy(answer, problem); // Copies answer to problem.\n\t\tgenProb(); // Generates problem.\n\n\t\tshuffle();\n\t\tcopy(problem, player); // Copies problem to player.\n\n\t\t// Checking for shuffled problem\n\t\tcopy(problem, comp);\n\n\t\tif (!solve(0, 0, 0, comp)) {\n\t\t\tgenerate();\n\t\t}\n\t\tif (!unique()) {\n\t\t\tgenerate();\n\t\t}\n\t}", "private static String solvePuzzle(String puzzle) {\n\t\tString answer = \"\";\n\n\t\tfor (int i = 0; i < puzzle.length(); i++) {\n\t\t\tchar currentChar = puzzle.charAt(i);\n\t\t\tint currentCharPos = alphabetPos(currentChar);\n\t\t\tint shiftAmount = i + 1;\n\t\t\tboolean shiftingBackwards = i % 2 == 0;\n\t\t\tint resultingLetterPosition;\n\n\t\t\tif (shiftingBackwards) {\n\t\t\t\tresultingLetterPosition = (currentCharPos - shiftAmount) % ALPHABET.length;\n\t\t\t\tif (resultingLetterPosition > -1) {\n\t\t\t\t\tanswer += ALPHABET[resultingLetterPosition];\n\t\t\t\t} else {\n\t\t\t\t\tanswer += ALPHABET[ALPHABET.length + resultingLetterPosition];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tresultingLetterPosition = (currentCharPos + shiftAmount) % ALPHABET.length;\n\t\t\t\tanswer += ALPHABET[resultingLetterPosition];\n\t\t\t}\n\t\t}\n\t\tanswer = \"CS-230\" + answer;\n\t\tanswer += answer.length();\n\t\treturn answer;\n\t}", "public static void main(String[] args) {\n\n // create initial board from file\n In in = new In(args[0]);\n int N = in.readInt();\n int[][] tiles = new int[N][N];\n for (int i = 0; i < N; i++)\n for (int j = 0; j < N; j++)\n tiles[i][j] = in.readInt();\n Board initial = new Board(tiles);\n\n // check if puzzle is solvable; if so, solve it and output solution\n if (initial.isSolvable()) {\n Solver solver = new Solver(initial);\n StdOut.println(\"Minimum number of moves = \" + solver.moves());\n for (Board board : solver.solution())\n StdOut.println(board);\n }\n\n // if not, report unsolvable\n else {\n StdOut.println(\"Unsolvable puzzle\");\n }\n}", "public void generateSolutionList() {\n // Will probably solve it in a few years\n while (!isSolved()) {\n RubiksMove move = RubiksMove.random();\n solutionMoves.add(move);\n performMove(move);\n }\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int T = sc.nextInt();\n for (int Q = 0; Q < T; Q++) {\n \tint N = sc.nextInt();\n \tint M = sc.nextInt();\n \tint[][] m = new int[M][3];\n \tfor (int i = 0; i < M; i++) {\n \t\tm[i][0] = sc.nextInt();\n \t\tif (m[i][0] == 1) {\n \t\t\t//合并x和y所在的集合\n \t\t\tm[i][1] = sc.nextInt();\n\t\t\t\t\tm[i][2] = sc.nextInt();\n\t\t\t\t\t\n\t\t\t\t}else if(m[i][0] == 2){\n\t\t\t\t\t//将x提出来成立新的集合\n\t\t\t\t\tm[i][1] = sc.nextInt();\n\t\t\t\t\t\n\t\t\t\t}else if(m[i][0] == 3){\n\t\t\t\t\t//输出x所在集合的正整数个数\n\t\t\t\t\tm[i][1] = sc.nextInt();\n\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t}\n \t}\n }\n\t}", "public static void main(String[] args) \r\n\t{\n\t\tint [][]board = new int[][]{\r\n\t\t\t{5,8,0,1,7,0,3,0,0},\r\n\t\t\t{0,0,9,0,0,8,0,1,0},\r\n\t\t\t{0,0,3,0,0,0,0,0,8},\r\n\t\t\t{4,0,6,8,0,7,0,0,5},\r\n\t\t\t{8,3,0,0,0,0,0,7,4},\r\n\t\t\t{2,0,0,6,0,5,8,0,3},\r\n\t\t\t{3,0,0,0,0,0,5,0,0},\r\n\t\t\t{0,6,0,5,0,0,2,0,0},\r\n\t\t\t{0,0,7,0,8,3,0,6,9}};\r\n\t\t//create the board\r\n\t\tBaseBoard x = new BaseBoard(board);\t\r\n\t\t//print the unsolved board\r\n\t\tSystem.out.println(\"Unsolved Board X:\");\r\n\t\tx.print();\r\n\t\t//if the board is completely solved then print it\r\n\t\tif(solved(x)) {\r\n\t\t\tSystem.out.println(\"\\n\\nSolved Sudoku Board X:\");\r\n\t\t\tx.print();\r\n\t\t}\r\n\t\t//extra board for a second test - Hard\r\n\t\tint [][]board2 = new int[][]{\r\n\t\t\t{0,0,0,0,0,4,3,7,0},\r\n\t\t\t{6,3,0,0,7,0,2,0,0},\r\n\t\t\t{0,0,0,8,6,0,0,0,0},\r\n\t\t\t{1,0,9,0,0,6,0,0,0},\r\n\t\t\t{0,0,4,0,0,0,9,0,0},\r\n\t\t\t{0,0,0,1,0,0,4,0,8},\r\n\t\t\t{0,0,0,0,4,7,0,0,0},\r\n\t\t\t{0,0,7,0,2,0,0,4,1},\r\n\t\t\t{0,2,8,9,0,0,0,0,0}};\r\n\t\t//create board\r\n\t\tBaseBoard y = new BaseBoard(board2);\r\n\t\t//print unsolved board\r\n\t\tSystem.out.println(\"\\n\\nUnsolved Board Y:\");\r\n\t\ty.print();\r\n\t\t//if the board is completely solved then print it\r\n\t\tif(solved(y)) {\r\n\t\t\tSystem.out.println(\"\\n\\nSolved Sudoku Board Y:\");\r\n\t\t\ty.print();\r\n\t\t}\r\n\t}", "private static Optional<Board> calculateBoardForClues(Board inputBoard, List<ClueWithCellIndices> cluesWithCellIndices, int clueIndex) {\n\n if(clueIndex >= cluesWithCellIndices.size())\n return Optional.of(inputBoard);\n\n int blockPermutationCounter = 0;\n int thisClue = cluesWithCellIndices.get(clueIndex).getClue();\n final int[] clueCellIndices = cluesWithCellIndices.get(clueIndex).getCellIndices();\n\n boolean tryNextPermutation;\n do {\n tryNextPermutation = false;\n //start with clear thisBoard\n Board thisBoard = new Board(inputBoard);\n //get block Permutation for thisClue and index = blockPermutationCounter\n List<Integer> blockPermutation = permutations.getPermutationsForClueAtIndex(thisClue, blockPermutationCounter);\n \n if(blockPermutation == null)\n //if does not exist (all Permutations used) return failure\n return Optional.empty();\n\n //check if all thisClue cells are equal to blocks from Permutation or equal 0\n for(int i = 0; i < clueCellIndices.length; i++) {\n if(thisBoard.getCell(clueCellIndices[i]) != blockPermutation.get(i))\n if(thisBoard.getCell(clueCellIndices[i]) == 0)\n //if not but they are == 0 => replace them with blocks from Permutation\n thisBoard.setCell(clueCellIndices[i], blockPermutation.get(i));\n else {\n //if not => try another Permutation\n tryNextPermutation = true;\n break;\n }\n }\n \n if(!tryNextPermutation) {\n //thisBoard is correct for thisClue\n //now try and recalculate thisBoard for next clue\n Optional<Board> opt = calculateBoardForClues(thisBoard, cluesWithCellIndices, clueIndex+1);\n if(opt.isPresent())\n //SUCCESS, calculated board for thisClue and all succesors\n return opt;\n else\n //failed, we need to try next Permutation of blocks for thisCLue\n tryNextPermutation = true;\n }\n blockPermutationCounter ++;\n } while (tryNextPermutation); //until all Permutations where tried or solution is found\n\n //should never get here\n return Optional.empty();\n }", "private static void buildTunnels()\n {\n //Initialize necessary member variables\n totalCost = 0;\n connectedHills = 1;\n \n //Create a disjoint set for all of the hills on the current campus\n h = scan.nextInt();\n campus = new DisjointSet(h);\n \n //Read how many tunnels can be built\n t = scan.nextInt();\n \n //Create an array for all the possible tunnels\n edges = new edge[t];\n \n //Loop through all of the possible tunnels\n for (tunnel = 0; tunnel < t; tunnel++)\n {\n //Save all information for the current possible tunnel\n edges[tunnel] = new edge();\n }\n \n //Sort the array of tunnels by their costs\n Arrays.sort(edges);\n \n //Loop through all the possible tunnels again\n for (tunnel = 0; tunnel < t; tunnel++)\n {\n //Try to connect the hills with the current tunnel and check if it was successful\n if (campus.union(edges[tunnel].x - 1, edges[tunnel].y - 1))\n {\n //Add the cost to build that tunnel to the total cost\n totalCost += edges[tunnel].d;\n \n //Incrememnt the amount of total hills connected\n connectedHills++;\n }\n \n //Check if the tunnels have connected all of the hills\n if (connectedHills == h)\n {\n //Stop trying to build tunnels\n return;\n }\n }\n }", "public Set<List<String>> getCombination(int[] inHand) {\n Set<List<String>> result = new HashSet<>();\n for (int i = 0; i < inHand.length; i++) {\n if (inHand[i] < 1) continue;\n int[] copyHand = copyArray(inHand);\n //possibility of A AA AAA\n for (int j = 1; j <= inHand[i]; j++) {\n if (j == 1) {\n String cSet = \"\";\n\n for (int seq = i; seq <= i + 2; seq++) {\n if (seq >= inHand.length || copyHand[seq] < 1) continue;\n cSet += seq;\n copyHand[seq] -= 1;\n }\n// System.out.println(\"i: \" + i + \" j: \" + j+\"inhand: \" + arrayToString\n// (inHand));\n\n Set<List<String>> a = getCombination(copyHand);\n Set<List<String>> newA = new HashSet<>();\n for (List<String> s : a) {\n s.add(cSet);\n s.sort(Comparator.naturalOrder());\n if (s.equals(\"\")) continue;\n newA.add(s);\n }\n result.addAll(newA);\n continue;\n }\n\n String currentSet = \"\";\n int[] copyOfInHand = copyArray(inHand);\n for (int t = 0; t < j; t++) {\n currentSet += i;\n }\n\n copyOfInHand[i] -= j;\n Set<List<String>> after = getCombination(copyOfInHand);\n Set<List<String>> newAfter = new HashSet<>();\n for (List<String> s : after) {\n s.add(currentSet);\n s.sort(Comparator.naturalOrder());\n newAfter.add(s);\n }\n result.addAll(newAfter);\n }\n }\n if (result.isEmpty()) result.add(new ArrayList<>());\n int min = result.stream().map(set -> set.size()).min(Comparator\n .naturalOrder()).get();\n Set<List<String>> minSets = result.stream().filter(set -> set.size() == min)\n .collect(Collectors\n .toSet());\n// combinationCache.put(inHand, minSets);\n return minSets;\n }", "public static void main(String[] args) {\n StringBuilder result = new StringBuilder();\n Scanner sc = new Scanner(System.in);\n int testCaseCount = sc.nextInt();\n\n for(int t = 0; t < testCaseCount; t++) {\n int m = sc.nextInt();\n int n = sc.nextInt();\n int[][] grid = new int[m][n];\n gridData = new int[m][n];\n for (int i = 0; i < m; i++) {\n for(int j = 0; j < n; j++) { \n gridData[i][j] = Integer.MAX_VALUE;\n grid[i][j] = sc.nextInt();\n }\n }\n if (t != 0) {\n result.append(\"\\n\");\n }\n result.append(orangesRotting(grid));\n }\n// int[][] grid = {{2,1,1},{0,1,1},{1,0,1}};\n System.out.print(result);\n }", "public Game(InputStream in) throws Exception\n\t{\n\t\tif(in == null)\n\t\t\tthrow new Exception(\"Input cannot be null\");\n\n\t\t//initialize variables\n\t\toriginalPuzzle = new ArrayList<>();\n\t\tonePossibility = 0;\n\n\t\t//read in the game\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\t\tString str;\n\t\twhile((str = reader.readLine()) != null){\n\t\t\toriginalPuzzle.add(str);\n\t\t}\n\t\tin.close();\n\t\treader.close();\n\n\t\t//set the size and blocksize variables\n\t\tsize = Integer.parseInt(originalPuzzle.get(0));\n\n\t\tHashSet<String> characters = new HashSet<>(size * 2);\n\n\t\t//get the characters\n\t\tString[] stringCharacters = originalPuzzle.get(1).split(\"\\\\s\");\n\t\tfor(String character : stringCharacters){\n\t\t\tcharacters.add(character);\n\t\t}\n\n\t\t//validate the puzzle\n\t\tvalidatePuzzle(characters);\n\n\t\t//start creating the different houses\n\t\trows = new Row[size];\n\t\tcolumns = new Column[size];\n\t\tblocks = new Block[size/getBlockSize()][size/getBlockSize()];\n\n\t\t//construct a two dimensional cell array first\n\t\tCell[][] board = new Cell[size][size];\n\n\t\t// read all cells into the board array\n\t\tfor(int j = 0; j < size; j++){\n\t\t\tString[] boardLine = originalPuzzle.get(j+2).split(\"\\\\s\");\n\t\t\tfor(int i = 0; i < size; i++){\n\t\t\t\tboard[i][j] = new Cell(boardLine[i], stringCharacters, i, j);\n\t\t\t\tboard[i][j].Attach(this);\n\t\t\t}\n\t\t}\n\n\t\t//create the individual rows and columns\n\t\tfor(int i = 0; i < size; i++){\n\t\t\tCell[] row = new Cell[size];\n\t\t\tCell[] column = new Cell[size];\n\t\t\tfor(int j = 0; j < size; j++){\n\t\t\t\trow[j] = board[j][i];\n\t\t\t\tcolumn[j] = board[i][j];\n\t\t\t}\n\t\t\tRow r = new Row(row);\n\t\t\tColumn c = new Column(column);\n\n\t\t\trows[i] = r;\n\t\t\tcolumns[i] = c;\n\t\t}\n\n\t\t//create the blocks\n\t\tfor(int blockX = 0; blockX < size/getBlockSize(); blockX++){\n\t\t\tfor(int blockY = 0; blockY < size/getBlockSize(); blockY++){\n\t\t\t\tCell[][] block = new Cell[getBlockSize()][getBlockSize()];\n\t\t\t\tfor(int i = 0; i < getBlockSize(); i++){\n\t\t\t\t\tfor(int j = 0; j < getBlockSize(); j++){\n\t\t\t\t\t\tblock[i][j] = board[(blockX * getBlockSize()) + i][(blockY * getBlockSize()) + j];\n\t\t\t\t\t\tblock[i][j].Attach(this);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tblocks[blockX][blockY] = new Block(block);\n\t\t\t}\n\t\t}\n\t}", "private void rearrangeSolution() {\r\n List<Integer> trinity = new ArrayList<Integer>();\r\n trinity.add(0); trinity.add(1); trinity.add(2);\r\n permutateDigits();\r\n for (int i = 0; i<9; i+=3) {\r\n Collections.shuffle(trinity);\r\n swapRow(trinity.get(0)+i, trinity.get(1)+i);\r\n }\r\n for (int i = 0; i<9; i+=3) {\r\n Collections.shuffle(trinity);\r\n swapCol(trinity.get(0)+i, trinity.get(1)+i);\r\n }\r\n }", "public interface Puzzle {\n public String generatePuzzle();\n\n public String getAnswer();\n}", "protected abstract void recombineNext();", "public static void fillPossiblesWithResults()\n\t{\n\t\tfor(int i = 0; i < nextMatch; i++)\n\t\t{\n\t\t\tpossibleResults[i] = new String[1];\n\t\t\tpossibleResults[i][0] = results[i];\n\t\t}\n\t}", "public static Pizza orderPizza(){\n // Create a Scanner object\n Scanner input = new Scanner(System.in);\n\n String size = \"\";\n ArrayList<String> toppings =new ArrayList<>();\n\n int x = 0;\n int y =0;\n int z=0;\n int a=0;\n\n //Ask user if what size and toppings they would like to add to their pizza\n do {\n System.out.print(\"\\nWhat size of Pizza would you like?\\n\" +\n \"S-Small\\n\" +\n \"M-Medium\\n\" +\n \"L-Large\\n\");\n\n String answer = input.nextLine();\n switch (answer) {\n case \"S\":\n case \"s\":\n case \"Small\":\n case \"small\":\n size=\"Small\";\n x=0;\n break;\n case \"M\":\n case \"m\":\n case \"Medium\":\n case \"medium\":\n size = \"Medium\";\n x=0;\n break;\n case \"L\":\n case \"l\":\n case \"Large\":\n case \"large\":\n size = \"Large\";\n x=0;\n break;\n default:\n System.out.println(\"invalid choice\");\n x++;\n break;\n }\n } while (x>0);\n\n do {\n do {\n System.out.print(\"\\nWhat toppings would you like to add? Each pizza starts with cheese and red sauce.\\n\" +\n \"P- pepperoni\\n\" +\n \"S- sausage\\n\" +\n \"R- peppers\\n\" +\n \"C- chicken\\n\" +\n \"M- salami\\n\" +\n \"O- olives\\n\" +\n \"T- tomatoes\\n\" + \n \"A- anchovies \\n Please enter your toppings one at a time.\\n\");\n String answer = input.nextLine();\n\n switch (answer) {\n case \"P\":\n case \"p\":\n case \"Pepperoni\":\n case \"pepperoni\":\n toppings.add(\"Pepperoni\");\n y = 0;\n break;\n case \"S\":\n case \"s\":\n case \"Sausage\":\n case \"sausage\":\n toppings.add(\"Sausage\");\n y = 0;\n break;\n case \"R\":\n case \"r\":\n case \"Peppers\":\n case \"peppers\":\n toppings.add(\"Peppers\");\n y = 0;\n break; \n case \"A\":\n case \"a\":\n case \"Anchovies\":\n case \"anchovies\":\n toppings.add(\"Anchovies\");\n y = 0;\n break;\n case \"O\":\n case \"o\":\n case \"Olives\":\n case \"olives\":\n toppings.add(\"Olives\");\n y = 0;\n break;\n case \"T\":\n case \"t\":\n case \"Tomatoes\":\n case \"tomatoes\":\n toppings.add(\"Tomatoes\");\n y = 0;\n break;\n case \"M\":\n case \"m\":\n case \"Salami\":\n case \"salami\":\n toppings.add(\"Tomatoes\");\n y = 0;\n break;\n case \"C\":\n case \"c\":\n case \"Chicken\":\n case \"chicken\":\n toppings.add(\"Chicken\");\n y = 0;\n break;\n default:\n System.out.println(\"invalid choice\");\n y++;\n break;\n }\n } while (y > 0);\n\n do {\n System.out.print(\"\\nWould you like any more toppings (y or n): \");\n\n String answer = input.nextLine();\n switch (answer) {\n case \"Y\":\n case \"y\":\n case \"Yes\":\n case \"yes\":\n a=0;\n z++;\n break;\n case \"N\":\n case \"n\":\n case \"No\":\n case \"no\":\n a=0;\n z=0;\n break;\n default:\n System.out.println(\"invalid choice\");\n a++;\n break;\n }\n } while (a>0);\n }while (z>0);\n return new Pizza(\"Pizza\", size, toppings);\n }", "public static void makePieces() {\n\t\tPiece[] pieces = new Piece[35];\n\t\tfor (int i = 0; i < pieces.length; i++) {\n\t\t\tTile t = new Tile(false, true, 0, 0);\n\t\t\tTile f = new Tile(false, false, 0, 0);\n\t\t\tTile[][] tiles = new Tile[6][6];\n\t\t\tswitch (i) {\n\t\t\tcase 0:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, f, t, f, f }, { f, f, f, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, t, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, f, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, t, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, t, f, f, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, t, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 20:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 22:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 23:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 24:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, t, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 25:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 26:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 27:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 28:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 29:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 30:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 31:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, t, f, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 32:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 33:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 34:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tpieces[i] = new Piece(tiles);\n\t\t}\n\t\ttry {\n\t\t\tFileOutputStream saveFile = new FileOutputStream(\"pieces.data\");\n\t\t\tObjectOutputStream save = new ObjectOutputStream(saveFile);\n\t\t\tsave.reset();\n\t\t\tsave.writeObject(pieces);\n\t\t\tsave.close();\n\t\t} catch (Exception exc) {\n\t\t\texc.printStackTrace(); // If there was an error, print the info.\n\t\t}\n\t}", "public void solve() {\n\t\tArrayList<Piece> pieceListBySize = new ArrayList<Piece>(pieceList);\n\t\tCollections.sort(pieceListBySize);\t// This is done since the order\n\t\t\t\t\t\t\t\t\t\t\t// of piece placements does not matter.\n\t\t\t\t\t\t\t\t\t\t\t// Placing larger pieces down first lets\n\t\t\t\t\t\t\t\t\t\t\t// pruning occur sooner.\n\t\t\n\t\t/**\n\t\t * Calculates number of resets needed for a game board.\n\t\t * A \"reset\" refers to a tile that goes from the solved state to\n\t\t * an unsolved state and back to the solved state.\n\t\t * \n\t\t * This is the calculation used for pruning.\n\t\t */\n\t\t\n\t\tArrayList<Integer> areaLeft = new ArrayList<Integer>();\n\t\tareaLeft.add(0);\n\t\tint totalArea = 0;\n\t\tfor (int i = pieceListBySize.size() - 1; i >= 0; i--) {\n\t\t\ttotalArea += pieceListBySize.get(i).numberOfFlips;\n\t\t\tareaLeft.add(0, totalArea);\n\t\t}\n\t\tint totalResets = (totalArea - gameBoard.flipsNeeded) / (gameBoard.goal + 1);\n\t\tSystem.out.println(\"Total Resets: \" + totalResets);\n\t\t\n\t\t/* \n\t\tint highRow = 0;\n\t\tint highCol = 0;\n\t\tint[][] maxDim = new int[2][pieceListBySize.size()];\n\t\tfor (int i = pieceListBySize.size() - 1; i >= 0; i--) {\n\t\t\tif (highRow < pieceListBySize.get(i).rows)\n\t\t\t\thighRow = pieceListBySize.get(i).rows;\n\t\t\t\n\t\t\tif (highCol < pieceListBySize.get(i).cols)\n\t\t\t\thighCol = pieceListBySize.get(i).cols;\n\t\t\t\n\t\t\tmaxDim[0][i] = highRow;\n\t\t\tmaxDim[1][i] = highCol;\n\t\t}\n\t\t*/\n\t\t\n\t\tlong startTime = System.currentTimeMillis();\n\t\t\n\t\tNode<GameBoard> currentNode = new Node<GameBoard>(gameBoard);\n\t\tStack<Node<GameBoard>> stack = new Stack<Node<GameBoard>>();\n\t\tstack.push(currentNode);\n\t\t\n\t\twhile (!stack.isEmpty()) {\n\t\t\tnodeCount++;\n\t\t\t\n\t\t\tNode<GameBoard> node = stack.pop();\n\t\t\tGameBoard current = node.getElement();\n\t\t\tint depth = node.getDepth();\n\t\t\t\n\t\t\t// Checks to see if we reach a solved state.\n\t\t\t// If so, re-order the pieces then print out the solution.\n\t\t\tif (depth == pieceListBySize.size() && current.isSolved()) {\n\t\t\t\tArrayList<Point> moves = new ArrayList<Point>();\n\t\t\t\t\n\t\t\t\twhile (node.parent != null) {\n\t\t\t\t\tint index = node.level - 1;\n\t\t\t\t\tint sequence = pieceList.indexOf(pieceListBySize.get(index));\n\t\t\t\t\tPoint p = new Point(current.moveRow, current.moveCol, sequence);\n\t\t\t\t\tmoves.add(p);\n\t\t\t\t\t\n\t\t\t\t\tnode = node.parent;\n\t\t\t\t\tcurrent = node.getElement();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tCollections.sort(moves);\n\t\t\t\tfor (Point p : moves) {\n\t\t\t\t\tSystem.out.println(p);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Nodes opened: \" + nodeCount);\n\t\t\t\tlong endTime = System.currentTimeMillis();\n\t\t\t\tSystem.out.println(\"Elapsed Time: \" + ((endTime - startTime) / 1000) + \" secs.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tPiece currentPiece = pieceListBySize.get(depth);\n\t\t\tint pieceRows = currentPiece.rows;\n\t\t\tint pieceCols = currentPiece.cols;\n\t\t\t\n\t\t\tPriorityQueue<Node<GameBoard>> pQueue = new PriorityQueue<Node<GameBoard>>();\n\t\t\t\n\t\t\t// Place piece in every possible position in the board\n\t\t\tfor (int i = 0; i <= current.rows - pieceRows; i++) {\n\t\t\t\tfor (int j = 0; j <= current.cols - pieceCols; j++) {\n\t\t\t\t\tGameBoard g = current.place(currentPiece, i, j);\n\t\t\t\t\t\n\t\t\t\t\tif (totalResets - g.resets < 0)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\t// Put in the temporary priority queue\n\t\t\t\t\tpQueue.add(new Node<GameBoard>(g, node));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Remove from priority queue 1 at a time and put into stack.\n\t\t\t// The reason this is done is so that boards with the highest reset\n\t\t\t// count can be chosen over ones with fewer resets.\n\t\t\twhile (!pQueue.isEmpty()) {\n\t\t\t\tNode<GameBoard> n = pQueue.remove();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "public static void main(String[] args) throws Exception {\n\n String[] options=new String[2];\n options[0]=\"Smart\";\n options[1]=\"Dummy\";\n String choice=\"\";\n String availableChars[] = {\"5x5maze.txt\",\"7x7maze.txt\",\"8x8maze.txt\",\"9x9maze.txt\",\"10x10maze.txt\",\"12x12maze.txt\"};\n\n int choiceG = JOptionPane.showOptionDialog(JOptionPane.getRootFrame(),\n \"Would you like to use the smart or dummy solution?\",\n \"Flow Free solver\",0,\n JOptionPane.INFORMATION_MESSAGE,null,options,null\n );\n if(choiceG==0){\n choice = (String) JOptionPane.showInputDialog(JOptionPane.getRootFrame(),\n \"Which puzzle size would you like to solve?\",\n \"Choose puzzle\",\n JOptionPane.PLAIN_MESSAGE,\n null,\n availableChars,\n 2);\n try{\n int[][] numberedMap=loadMap(choice);\n Node[] map=linkNodes(numberedMap);\n height=numberedMap.length;\n width=numberedMap[0].length;\n\n FlowDrawer.getInstance();\n FlowDrawer.setBoard(numberedMap);\n FlowFinder f=new FlowFinder(numberedMap,map,false);\n }\n catch(Exception e){System.out.println(e+\" \"+e.getStackTrace()[0].getLineNumber());}\n }\n else{\n choice = (String) JOptionPane.showInputDialog(JOptionPane.getRootFrame(),\n \"Which puzzle size would you like to solve?\",\n \"Choose puzzle\",\n JOptionPane.PLAIN_MESSAGE,\n null,\n availableChars,\n 2);\n try{\n int[][] numberedMap=loadMap(choice);\n Node[] map=linkNodes(numberedMap);\n height=numberedMap.length;\n width=numberedMap[0].length;\n\n FlowDrawer.getInstance();\n FlowDrawer.setBoard(numberedMap);\n FlowFinder f=new FlowFinder(numberedMap,map,true);\n }\n catch(Exception e){System.out.println(e+\" \"+e.getStackTrace()[0].getLineNumber());}\n }\n\n\n\n }", "private void fillInputCombo(){\n//\t\tmyInput.actionPerformed(null);\n//\t\tmyInput.setAction(null);\n\t\tfillingCombo = true;\n\t\tmyInput.removeAllItems();\n\t\tfor(int i=0;i<distinctRules.length;i++){\n\t\t\tif(distinctRules[i][0].equals(currentRule)){\n\t\t\t\tString allValue[] = distinctRules[i][1].split(\",\");\n\t\t\t\tfor(int j=0;j<allValue.length;j++){\n//\t\t\t\t\tmyInput.actionPerformed(null);\n\t\t\t\t\tmyInput.addItem(allValue[j].toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfillingCombo = false;\n\t}", "public static void main(String[] args) {\n\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\t\r\n\t\tint numZonas;\r\n\t\tSystem.out.println(\"¿Cuantas zonas hay?\");\r\n\t\tnumZonas = sc.nextInt();\r\n\t\t\r\n\t\tString añadir;\r\n\t\tint añadirZona = 0;\r\n\t\tint [][] densidadArea = new int [2][numZonas];\r\n\t\tint [][] denAreaExtra = new int[2][numZonas + añadirZona];\r\n\t\tString [] lugares = new String [numZonas];\r\n\t\tString [] lugaresExtra = new String [numZonas + añadirZona];\r\n\t\t\r\n\t\tfor (int i = 0 ; i < numZonas ; i++) {\r\n\t\t\tSystem.out.println(\"Introduce el nombre de la zona: \");\r\n\t\t\tlugares [i]= sc.next();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Introduce la densidad de la zona:\");\r\n\t\t\tdensidadArea [0][i] = sc.nextInt();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Introduce el area de la zona: \");\r\n\t\t\tdensidadArea [1][i] = sc.nextInt();\t\r\n\t\t\t\r\n\t\t\tResultados(numZonas, lugares, densidadArea);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"¿Quieres añadir más zonas? (Si/No)\");\r\n\t\tañadir = sc.next();\r\n\t\t\r\n\t\tif (añadir.equals (\"Si\")) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"¿Cuantas zonas quieres añadir?\");\r\n\t\t\tañadirZona = sc.nextInt();\r\n\t\t\tlugaresExtra = new String [numZonas + añadirZona];\r\n\t\t\t\r\n\t\t\tfor (int j = numZonas ; j < (numZonas + añadirZona) ; j++) {\r\n\t\t\t\tSystem.out.println(\"Introduce el nombre de la zona: \");\r\n\t\t\t\tlugaresExtra [j]= sc.next();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Introduce la densidad de la zona:\");\r\n\t\t\t\tdenAreaExtra [0][j] = sc.nextInt();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Introduce el area de la zona: \");\r\n\t\t\t\tdenAreaExtra [1][j] = sc.nextInt();\r\n\t\t\t\t\r\n\t\t\tResultados2(añadirZona, lugaresExtra, denAreaExtra);\r\n\t\t\t}\r\n\t\t\tnumZonas = numZonas + añadirZona;\r\n\t\t}\r\n\t\telse {\t\r\n\t\t\tSystem.out.println(\"Ya hemos terminado la consulta, gracias.\");\r\n\t\t}\r\n\t\t\r\n\t\tsc.close();\r\n\t\r\n\t\r\n\t\r\n\t}", "private void resolveSudokuByRules() {\n for (int i = 0; i < 9; i++) {\n updateBoardForSingleCandidate();\n }\n updateCandidateMapForPairByCol();\n updateCandidateMapForPairByRow();\n\n for (int i = 0; i < 5; i++) {\n updateBoardForSingleCandidate();\n }\n\n updateBoardForSinglePossibilityByBlock();\n updateBoardForSinglePossibilityByRow();\n updateBoardForSinglePossibilityByCol();\n refreshCandidateMap();\n\n for (int i = 0; i < 5; i++) {\n updateBoardForSingleCandidate();\n }\n\n printBoardAndCandidatesHtmlFile();\n }", "static String solve(String puzzle, String delimiter) {\n char cc = 0; // Current character\n\n // Melakukan iterasi ke dalam string dan menyimpan alfabet ke dalam cc\n for (int i = 0; i < puzzle.length(); i++) {\n if (isAlphabetic(puzzle.charAt(i))) {\n cc = puzzle.charAt(i);\n break;\n }\n }\n\n if (cc == 0) {\n // Jika seluruh karakter dalam string sudah diganti dengan digit angka, maka akan dilakukan pengujian\n // terhadap kombinasi angka\n\n totalTest++; // Menghitung total tes yang dilakukan untuk menemukan kombinasi angka yang benar\n String[] operands = puzzle.split(delimiter);\n int op1 = check(operands[0]);\n int op2 = check(operands[1]);\n if (op1 == op2) {\n return puzzle;\n } else {\n return \"\";\n }\n } else {\n // Buat array of numbers [0..9] untuk menyimpan angka-angka yang sudah digunakan\n boolean[] numbers = new boolean[10];\n\n // Melakukan iterasi ke dalam string untuk menandai angka-angka yang sudah digunakan\n for (int i = 0; i < puzzle.length(); i++)\n if (isDigit(puzzle.charAt(i)))\n numbers[puzzle.charAt(i) - '0'] = true;\n\n for (int i = 0; i < 10; i++) {\n if (!numbers[i]) {\n\n // Melakukan substitusi alfabet dengan angka sampai ketemu kombinasi angka yang sesuai\n String solution = solve(puzzle.replaceAll(String.valueOf(cc),\n String.valueOf(i)), delimiter);\n\n // Jika kombinasi angka sudah teruji benar secara matematis,\n // kita akan cek apakah ada angka 0 di depan\n if (!solution.isEmpty()) {\n String[] split = solution.split(\"\\n\");\n boolean zeroAtLeft = false;\n\n for (int j = 0; j < split.length; j++){\n split[j] = split[j].trim();\n if (split[j].charAt(0) == '0'){\n zeroAtLeft = true;\n break;\n }\n }\n // Jika tidak ada angka 0 di depan, solusi ditemukan dan di-return ke main\n if (!zeroAtLeft) {\n return solution;\n }\n }\n }\n }\n }\n return \"\";\n }", "String getCombination(int numberOfSides);", "protected void updateShips(String input) {\n\t\t//System.out.println(\"updateShips \" + input);\n\t\tShip temp = smallShip;\n \tfor(int i = 0; i < 3; i++) {\n \t\t\n// \t\n \tfor(int j = 0; j < temp.getCoordinates().size(); j++) {\n \t\tif(temp.getCoordinates().get(j).equals(input))\n \t\t\ttemp.getCoordinates().set(j, \"X\");\n \t}\n \tif(i == 0)\n \t\ttemp = mediumShip;\n \telse if(i == 1)\n \t\ttemp = largeShip;\n \t}\n\t}", "private void SetUp() {\n numbers.add(0);\n numbers.add(1);\n numbers.add(2);\n numbers.add(3);\n numbers.add(4);\n numbers.add(5);\n numbers.add(6);\n numbers.add(7);\n numbers.add(8);\n numbers.add(9);\n\n PuzzleSolve(10, empty, numbers);\n }", "public static void main(String[] args) {\n\n int[][] blocks = new int[3][3];\n\n blocks[0][0] = 1;\n blocks[0][1] = 2;\n blocks[0][2] = 3;\n blocks[1][0] = 0;\n blocks[1][1] = 7;\n blocks[1][2] = 6;\n blocks[2][0] = 5;\n blocks[2][1] = 4;\n blocks[2][2] = 8;\n /*\n * blocks[0][0] = 1; blocks[0][1] = 2; blocks[0][2] = 3; blocks[1][0] =\n * 4; blocks[1][1] = 5; blocks[1][2] = 6; blocks[2][0] = 8; blocks[2][1]\n * = 7; blocks[2][2] = 0;\n */\n\n Board initial = new Board(blocks);\n\n // solve the puzzle\n Solver solver = new Solver(initial);\n\n // print solution to standard output\n if (!solver.isSolvable())\n StdOut.println(\"No solution possible\");\n else {\n StdOut.println(\"Minimum number of moves = \" + solver.moves());\n for (Board board : solver.solution())\n StdOut.println(board);\n }\n\n }", "private String solve(String inputData) {\n\t\tScanner in = new Scanner(inputData);\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tint testCases = in.nextInt();\n\t\tfor (int i = 1; i <= testCases; ++i) {\n\t\t\tsb.append(\"Case #\" + i + \": \");\n\t\t\t\n\t\t\tint googlers = in.nextInt();\n\t\t\tint surprisingCase = in.nextInt();\n\t\t\tint target = in.nextInt();\n\t\t\tArrayList<Integer> scores = new ArrayList<Integer>();\n\t\t\tfor (int j = 0; j < googlers; ++j) {\n\t\t\t\tscores.add(in.nextInt());\n\t\t\t}\n\t\t\t\n\t\t\tint accepted = 0;\n\t\t\tint acceptLine = Math.max(target, target * 3 - 2);\n\t\t\tint limited = 0;\n\t\t\tint limitLine = Math.max(target, target * 3 - 4);\n\t\t\tfor (Integer score : scores) {\n\t\t\t\tif (score >= acceptLine) {\n\t\t\t\t\t++accepted;\n\t\t\t\t}\n\t\t\t\telse if (score >= limitLine) {\n\t\t\t\t\t++limited;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tint result = accepted + Math.min(surprisingCase, limited);\n\t\t\tsb.append(result);\n\t\t\tsb.append(\"\\n\");\n\t\t}\n\t\treturn sb.toString();\n\t}", "@Override\n public void saveSolutions() {save solutions in unfolded format in a separate files for each solution (At this time, we have just one solution)\n // The result will print in 3 rows and each row have 4 columns:\n //\n // row1 --> col2\n // row2 --> col1 clo2 col3 col4\n // row2 --> clo2\n //\n //Example (of red cube):\n //\n // oo o\n // ooo\n // ooooo\n // ooo\n // oo\n // o o oo oo oo o\n //oooo ooooo ooo oooo\n // oooo ooo ooooo oooo\n //oooo ooooo ooo oooo\n // o o o oo o\n // o oo\n // oooo\n // oooo\n // oooo\n // oo oo\n //\n String directory = \"output\";\n File dir = new File(directory);\n if (!dir.exists()) dir.mkdirs();\n AtomicInteger counter = new AtomicInteger(1);\n solutions.forEach((number, solutionPuzzle) -> {\n StringBuilder rowStringValue1 = generateRowStringValue(null, solutionPuzzle.getTopPuzzlePiece(), null, null);\n StringBuilder rowStringValue2 = generateRowStringValue(solutionPuzzle.getLeftPuzzlePiece(), solutionPuzzle.getFrontPuzzlePiece(), solutionPuzzle.getRightPuzzlePiece(), solutionPuzzle.getBackPuzzlePiece());\n StringBuilder rowStringValue3 = generateRowStringValue(null, solutionPuzzle.getBottomPuzzlePiece(), null, null);\n Path path = Paths.get(directory + \"/solution\" + counter.getAndIncrement() + \".txt\");\n try (BufferedWriter writer = Files.newBufferedWriter(path)) {\n writer.write(rowStringValue1.append(rowStringValue2).append(rowStringValue3).toString());\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n\n }", "private void generateSolution() {\n\t\t// TODO\n\n\t}", "@Override\n public String[] draw() {\n Piece[][] pieces = solver.getSolution();\n int height = pieces.length;\n int width = pieces[0].length;\n char[][] board = new char[height * 4][width * 4 + 1];\n int totalPieces = pieces.length * pieces[0].length;\n int countPieces = 0;\n // run through each piece and add it to the temp board\n for (int i = 0; i < height; i++) {\n for (int j = 0; j < width; j++) {\n countPieces++;\n Piece curPiece = pieces[i][j];\n int tempHeight = i * 4 + 1;\n int tempWidth = j * 4 + 2;\n if (curPiece == null) {\n board[tempHeight][tempWidth] = EMPTY;\n board[tempHeight][tempWidth + 1] = EMPTY;\n board[tempHeight][tempWidth + 2] = EMPTY;\n board[tempHeight + 1][tempWidth] = EMPTY;\n board[tempHeight + 1][tempWidth + 1] = EMPTY;\n board[tempHeight + 1][tempWidth + 2] = EMPTY;\n board[tempHeight + 2][tempWidth] = EMPTY;\n board[tempHeight + 2][tempWidth + 1] = EMPTY;\n board[tempHeight + 2][tempWidth + 2] = EMPTY;\n Arrays.fill(board[tempHeight + 3], EMPTY);\n } else {\n char[][] displayPiece = pieceToDisplay(curPiece);\n\n board[tempHeight][tempWidth] = displayPiece[0][0];\n board[tempHeight][tempWidth + 1] = displayPiece[0][1];\n board[tempHeight][tempWidth + 2] = displayPiece[0][2];\n board[tempHeight + 1][tempWidth] = displayPiece[1][0];\n board[tempHeight + 1][tempWidth + 1] = displayPiece[1][1];\n board[tempHeight + 1][tempWidth + 2] = displayPiece[1][2];\n board[tempHeight + 2][tempWidth] = displayPiece[2][0];\n board[tempHeight + 2][tempWidth + 1] = displayPiece[2][1];\n board[tempHeight + 2][tempWidth + 2] = displayPiece[2][2];\n Arrays.fill(board[tempHeight + 3], EMPTY);\n }\n }\n }\n\n // convert the completed char[][] to the final string[]\n return finalBoard(board, totalPieces, totalPieces - countPieces);\n }", "int faireChoix(Puzzle pz);", "public static <A,B> List<Map<A,B>> generateAllPossibilities(Map<A,Set<B>> input){\n\t\tList<Pair<A,Set<B>>> in = new ArrayList<Pair<A,Set<B>>>();\n\t\t\n\t\tfor(Entry<A,Set<B>> entry : input.entrySet()){\n\t\t\tin.add(new Pair<A,Set<B>>(entry.getKey(),entry.getValue()));\n\t\t}\n\t\t\n\t\treturn generateAllPossibilities(in);\n\t}", "public static Puzzle convertInputArrayToPuzzle(final String[][] inputArray) {\n final Cube[] cubes = new Cube[Puzzle.NUM_OF_CUBES];\n\n for (int i = 0; i < Puzzle.NUM_OF_CUBES; i++) {\n cubes[i] = convertInputArrayToCube(inputArray[i]);\n }\n\n final Puzzle puzzle = new Puzzle(cubes[0], cubes[1], cubes[2], cubes[3], cubes[4], cubes[5], cubes[6],\n cubes[7]);\n return puzzle;\n }", "public int[] solver(int startPlayerId, int curplayer, int[][] oneP, int[][][] memory, int count) {\n\r\n int[][] one = oneP.clone(); // OnePlay Input\r\n int[] k; // onePlay points\r\n int j = curplayer;\r\n int[][][] m = memory.clone();\r\n int[] minCard = new int[3];\r\n int[] t;\r\n ArrayList<int[]> store = new ArrayList<>();\r\n minCard[2] = 100000;\r\n t = new int[3];\r\n for (int i = 0; i < 4; i++) { // 4 types of cards\r\n for (int l = 2; l < cardPerPlayer + 2; l++) {\r\n if (m[j][i][l] == 1 || m[j][i][l] == 2) {\r\n one[j][0] = i;\r\n one[j][1] = l;\r\n remove(new int[] { i, l }, m);\r\n if ((j + 1) % players != startPlayerId) {\r\n t = solver(startPlayerId, (j + 1) % players, one, m, count);\r\n one[(j + 1) % players][0] = t[0];\r\n one[(j + 1) % players][1] = t[1];\r\n }\r\n // } else if ((j + 2) % players != startPlayerId) {\r\n // t = solver(startPlayerId, (j + 2) % players, one, m, count);\r\n // one[(j + 1) % players][0] = t[0];\r\n // one[(j + 1) % players][1] = t[1];\r\n // } else if ((j + 3) % players != startPlayerId) {\r\n // t = solver(startPlayerId, (j + 3) % players, one, m, count);\r\n // one[(j + 1) % players][0] = t[0];\r\n // one[(j + 1) % players][1] = t[1];\r\n // }\r\n\r\n k = onePlay(one, startPlayerId);\r\n int curpoint = 0;\r\n if (count != cardPerPlayer - 1) { // cardPerPlayer - 1 = 12\r\n t = solver(k[0], k[0], new int[4][2], m, count++);\r\n curpoint = t[2];\r\n }\r\n\r\n if (k[0] == myID) {\r\n curpoint += k[1] + k[2] * 12;\r\n }\r\n store.add(new int[] { i, l, curpoint });\r\n if (curpoint < minCard[2]) {\r\n minCard[2] = curpoint;\r\n minCard[0] = i;\r\n minCard[1] = l;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return minCard;\r\n }", "public void generateSudoku(int difficulty){ \n\t\tfor(int i=0;i<9;i++){ // check row , i is row, j is column\n\t \tfor(int j=0;j<9;j++){\n\t \t\tsudokuDisplay[i][j]='.';\n\t \t}\n\t\t}\n\t\t// first use random r to generate the position of all 1\n\t\tRandom r=new Random();\n\t\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\t\tint row = 0, col = 0;\n\t\t\t\t\tchar temp=sudokuDisplay[i * 3 + row][j * 3 + col];\n\t\t\t\t\t//board[i * 3 + row][j * 3 + col] = '1'; // init for recur\n\t\t\t\t\tdo {\n\t\t\t\t\t\tsudokuDisplay[i * 3 + row][j * 3 + col] = temp; // recur back\n\t\t\t\t\t\trow = r.nextInt(3);\n\t\t\t\t\t\tcol = r.nextInt(3);\n\t\t\t\t\t\ttemp=sudokuDisplay[i * 3 + row][j * 3 + col];\n\t\t\t\t\t\tsudokuDisplay[i * 3 + row][j * 3 + col] = '1'; // set new\n\t\t\t\t\t} while (!checkBlockValidSudoku((i * 3 + row) * 9 + (j * 3 + col), '1'));\n\t\t\t\t}\n\t\t\t}\n\t\t//== the idea to generate a random pattern sudoku is to solve the sudoku with only random 1 on the board ==//\n\t\t//== the solve method also use random variable to do recur and backtrack, make sure the sudoku is randomed ==//\n\t\tsolveSudoku(sudokuDisplay); \n\t\tfor(int i=0;i<9;i++){ // check row , i is row, j is column\n\t \tfor(int j=0;j<9;j++){\n\t \t\tsudokuOrigin[i][j]=sudokuDisplay[i][j]; // store the original suduku to sudokuOrigin\n\t \t}\n\t\t}\t\t\n\t\tdigHoleSudoku(difficulty); // dig hole with difficulty\t\t\n\t\tfor(int i=0;i<9;i++){ // check row , i is row, j is column\n\t \tfor(int j=0;j<9;j++){\n\t \t\tsudokuPlay[i][j]=sudokuDisplay[i][j]; // store the original suduku to sudokuOrigin\n\t \t}\n\t\t}\n\t}", "public void checkers() throws IOException{\n String input = j.showInputDialog(\"How many squares would you like?\");\n int num=Integer.parseInt(input);\n input = j.showInputDialog(\"Choose a file to use:\");\n Scanner f= new Scanner(new File(input+\".ppm\"));\n input = j.showInputDialog(\"Choose a name for the new file:\");\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(input+\".ppm\")));\n out.println(f.next());\n int height=Integer.parseInt(f.next());\n int width=Integer.parseInt(f.next());\n out.println(height);out.println(width);out.println(f.next());\n int ab[][][]=new int[width][height][3];\n for(int x=0;x<width;x++){\n for(int y=0;y<height;y++){\n for(int c=0;c<3;c++){\n ab[x][y][c]=Integer.parseInt(f.next());\n }\n }\n }\n int smhei=height/(int)Math.sqrt(num);\n int smwid=width/(int)Math.sqrt(num);\n int temp[][][][] = new int[num][smwid][smhei][3];\n int x2=0;int y2=0; int d=0;\n\n for(int x=0;x<width;x++){\n if(x!=0){\n d=(height/smhei)*(x/smwid);\n if(x%smwid==0){\n x2=0;\n }\n }\n for(int y=0;y<height;y++){\n if(y!=0&&y%smhei==0){\n y2=0;d++; \n }\n for(int c=0;c<3;c++){\n temp[d][x2][y2][c]=ab[x][y][c];\n }\n y2++;\n }\n y2=0;\n x2++;\n }\n /*int raN[]=new int[num];\n for(int i=0;i<num;i++){\n raN[i]=i;\n }*/\n int r=num-1;\n for(int n=0;n<num;n++){\n /*\n r=gen.nextInt(num);\n while(raN[r]<0){\n r=gen.nextInt(num);\n }*/\n if(r>=0){\n \n }\n for(int x=0;x<smwid;x++){\n for(int y=0;y<smhei;y++){\n for(int c=0;c<3;c++){\n out.print(temp[r][x][y][c]+\" \");\n }\n }\n }\n //raN[r]=raN[r]*-1;\n r--;\n }\n f.close();\n out.close();\n System.exit(0);\n }", "public void restartPuzzle(){\t\t\n\t\tfor(int i = 0 ; i < puzzle.length; i++){\n\t\t\tfor(int j = 0; j < puzzle[i].length ; j++){\n\t\t\t\tif(!preset[i][j]){\n\t\t\t\t\tpuzzle[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void genPromote(Collection ret, int from, int to, int bits) {\n\tfor (char i = KNIGHT; i <= QUEEN; ++i) {\n\tBouger g = new Bouger(from, to, i, (bits | 32), 'P');\n\tg.setScore(1000000 + (i * 10));\n\tret.add(g);\n\t}\n\t}", "private ArrayList<int[][]> possiblePuzzleMoves(int[][] currentPuzzle) {\n ArrayList<int [][]> possibleMoves = new ArrayList<>();\n //find zero\n int zeroRow = 0;\n int zeroCol = 0;\n for(int i = 0; i < currentPuzzle.length; i++) {\n for (int j = 0; j < currentPuzzle[i].length; j++) {\n if(currentPuzzle[i][j] == 0) {\n zeroRow = i;\n zeroCol = j;\n break;\n }\n }\n }\n\n //check if zero isn't in top row\n if(zeroRow > 0) {\n int [][]newPuzzleConfig = copy(currentPuzzle);\n int tileAbove = newPuzzleConfig[zeroRow - 1][zeroCol];\n newPuzzleConfig[zeroRow - 1][zeroCol] = 0;\n newPuzzleConfig[zeroRow][zeroCol] = tileAbove;\n possibleMoves.add(newPuzzleConfig);\n }\n\n //check if zero isn't in bottom row\n if(zeroRow < 2) {\n int [][]newPuzzleConfig = copy(currentPuzzle);\n int tileBelow = newPuzzleConfig[zeroRow + 1][zeroCol];\n newPuzzleConfig[zeroRow + 1][zeroCol] = 0;\n newPuzzleConfig[zeroRow][zeroCol] = tileBelow;\n possibleMoves.add(newPuzzleConfig);\n\n }\n\n //check if zero isn't in left col\n if(zeroCol > 0) {\n int [][]newPuzzleConfig = copy(currentPuzzle);\n int tileToLeft = newPuzzleConfig[zeroRow][zeroCol-1];\n newPuzzleConfig[zeroRow][zeroCol-1] = 0;\n newPuzzleConfig[zeroRow][zeroCol] = tileToLeft;\n possibleMoves.add(newPuzzleConfig);\n }\n\n //check if zero isn't in right col\n if(zeroCol < 2) {\n int [][]newPuzzleConfig = copy(currentPuzzle);\n int tileToRight = newPuzzleConfig[zeroRow][zeroCol+1];\n newPuzzleConfig[zeroRow][zeroCol+1] = 0;\n newPuzzleConfig[zeroRow][zeroCol] = tileToRight;\n possibleMoves.add(newPuzzleConfig);\n }\n return possibleMoves;\n }", "Project1() {//constructor\r\n\r\n Scanner scanner = null;//creates instance of Scanner\r\n\r\n try {//attempts to open input file, if it fails, exit the program\r\n scanner = new Scanner(new File(\"input.txt\"));\r\n } catch (FileNotFoundException e) {\r\n System.exit(1);\r\n }\r\n\r\n int pairCount = scanner.nextInt();//reads in the amount of pairs\r\n preferenceA = new int[pairCount * 2][pairCount * 2 - 1];//resizes pref array based off of pairCount\r\n pairA = new int[pairCount][2];//resizes pairA based on pairCount\r\n\r\n for (int i = 0; i < preferenceA.length; i++)//uses scanner to add values preferenceA\r\n for (int j = 0; j < preferenceA[i].length; j++)\r\n if (scanner.hasNextInt())//exits if input file has run out of values\r\n preferenceA[i][j] = scanner.nextInt();\r\n else\r\n System.exit(1);\r\n\r\n for (int i = 0; i < pairA.length; i++)//uses scanner to add values pairA\r\n for (int j = 0; j < pairA[i].length; j++)\r\n if (scanner.hasNextInt())//exits if input file has run out of values\r\n pairA[i][j] = scanner.nextInt();\r\n else\r\n System.exit(1);\r\n }", "public static String makeAlgorithm(String input) {\r\n\t\ttry {\r\n\t\t\tBufferedReader reader = new BufferedReader(new StringReader(input));\r\n\t\t\tint testCases = Integer.parseInt(reader.readLine());\r\n\t\t\tStringBuffer outputBuffer = new StringBuffer();\r\n\t\t\tfor (int i = 0; i < testCases; i++) {\r\n\t\t\t\toutputBuffer.append(\"Case #\" + (i + 1) + \": \");\r\n\t\t\t\tString[] line = reader.readLine().split(\" \");\r\n\t\t\t\tint x = Integer.parseInt(line[0]);\r\n\t\t\t\tint y = Integer.parseInt(line[1]);\r\n\t\t\t\tint movedX = 0;\r\n\t\t\t\tint movedY= 0;\r\n\t\t\t\tint p=1;\r\n\t\t\t\tfor(int j=0; j<(2*Math.abs(y))-1; j++)\r\n\t\t\t\t{\t\r\n\t\t\t\t\tif(y>0)\r\n\t\t\t\t\t\toutputBuffer.append(j%2==0?\"N\":\"S\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\toutputBuffer.append(j%2==0?\"S\":\"N\");\r\n\t\t\t\t\tif(y>0)\r\n\t\t\t\t\t\tmovedY += j%2==0?p:-p;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tmovedY += j%2==0?-p:p;\r\n\t\t\t\t\tp++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor(int j=0; j<(2*Math.abs(x))-1; j++)\r\n\t\t\t\t{\t\r\n\t\t\t\t\tif(j==0)\r\n\t\t\t\t\t\tif(x>0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\toutputBuffer.append(\"W\");\r\n\t\t\t\t\t\t\tmovedX -= p;\r\n\t\t\t\t\t\t\tp++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\toutputBuffer.append(\"E\");\r\n\t\t\t\t\t\t\tmovedX += p;\r\n\t\t\t\t\t\t\tp++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(x>0)\r\n\t\t\t\t\t\toutputBuffer.append(j%2==0?\"E\":\"W\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\toutputBuffer.append(j%2==0?\"W\":\"E\");\r\n\t\t\t\t\tif(x>0)\r\n\t\t\t\t\t\tmovedX += j%2==0?p:-p;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tmovedX += j%2==0?-p:p;\r\n\t\t\t\t\tp++;\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(movedX + \" \" + movedY);\r\n\t\t\t\toutputBuffer.append(\"\\n\");\r\n\r\n\t\t\t}\r\n\t\t\treturn outputBuffer.toString();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "private void fillPuzzle(){\n JFrame App = new JFrame(\"Create Sudoku Puzzle\");\r\n App.setSize(500,500);\r\n App.setVisible(true);\r\n App.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n //We will make 3 panels one for instructions, one for the boxes, last one for submit button\r\n JPanel instructionsPanel = new JPanel(), fillPanel = new JPanel(), submitPanel = new JPanel();\r\n JTextField [][] textFields = new JTextField[sudokuSize][sudokuSize];\r\n JLabel[] labels = {\r\n new JLabel(\"Fill in a valid sudoku puzzle\"),\r\n new JLabel(\"Rules are :\"),\r\n new JLabel(\"1. Digits should be numbers only\"),\r\n new JLabel(\"2. Digits should be less than one\"),\r\n };\r\n for (JLabel lb : labels)instructionsPanel.add(lb);\r\n instructionsPanel.setLayout(new FlowLayout(FlowLayout.CENTER));\r\n JButton submitButton = new JButton(\"Submit\");//Submit the puzzle\r\n submitPanel.add(submitButton, BorderLayout.CENTER);\r\n //Add the textFields\r\n for(int i = 0; i < textFields.length; ++i)for(int j = 0; j < textFields[i].length; ++j)textFields[i][j] = new JTextField();//Add the fields to the array\r\n for(JTextField[] txt_row: textFields)for(JTextField txt_f: txt_row)fillPanel.add(txt_f); //Render the entries to the panel\r\n App.add(instructionsPanel);App.add(fillPanel);App.add(submitPanel);\r\n fillPanel.setLayout(new GridLayout(sudokuSize, sudokuSize));\r\n App.setLayout(new GridLayout(3, 1));\r\n\r\n submitButton.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n if(gridValid(textFields)){//If the arrangement is valid\r\n //Update the puzzle variable\r\n System.out.println(\"Inside fillPuzzle() method\");\r\n for( String[] nodeRow: puzzle)System.out.println(Arrays.toString(nodeRow));\r\n updatePuzzle(textFields);\r\n App.dispose();\r\n //For the code to work we had to solve the puzzle form this method\r\n Solver.Sys puzzleSystem = new Solver.Sys(puzzle);\r\n puzzleSystem.printData();\r\n //We save the created puzzle\r\n FileSys saver = new FileSys();\r\n try {\r\n saver.savePuzzle(puzzleSystem);\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n puzzleSystem.solvePuzzle();\r\n }\r\n else{\r\n JOptionPane.showMessageDialog(App, \"Invalid fill\");\r\n }\r\n }\r\n });\r\n }", "public void createNewCardPuzzle(){\n if (playerCardList != null) removePrevCardList();\n pairMatchedCount = 0;\n playerCardList = new PlayerCardList();\n int tempCardNo = 0;\n for (int row = 0; row < 4; row++) {\n for (int col = 0; col < 5; col++) {\n PlayerCard playerCard = playerCardList.getPlayerCardByNo(tempCardNo);\n setCardFlipEventHandler(playerCard);\n playerCardPuzzle.add(playerCard, col, row);\n tempCardNo++;\n }\n }\n }", "public List<MagicSquare> buildMagicSquares() {\n solutions = new ArrayList<>();\n sampler = new Sampler(Bound.getAllElements(1, totalNumbersCnt));\n\n for (int possibleNumber : sampler.getNumbers(new Bound(1, totalNumbersCnt))) {\n if (sampler.contains(possibleNumber)) {\n buildRow(sampler.getNumber(possibleNumber), 0, 0);\n }\n }\n\n return solutions;\n }", "private static void addCombos() {\n\t\tcombos.put(\"All pixels, three LSB\", 13);\n\t\tcombos.put(\"All pixels, two LSB\", 12);\n\t\tcombos.put(\"Every even pixel, three LSB\", 23);\n\t\tcombos.put(\"Every odd pixel, three LSB\", 33);\n\t\tcombos.put(\"Every pixel, one LSB\", 11);\n\t\tcombos.put(\"Every even pixel, two LSB\",22);\n\t\tcombos.put(\"Every odd pixel, two LSB\", 32);\n\t\tcombos.put(\"Every third pixel, three LSB\",43);\n\t\tcombos.put(\"Every third pixel, two LSB\",42);\n\t\tcombos.put(\"Every even pixel, one LSB\",21);\n\t\tcombos.put(\"Every odd pixel, one LSB\",31);\n\t\tcombos.put(\"Every third pixel, one LSB\",41);\n\t\tcombos.put(\"Every prime-numbered pixel, three LSB\", 53);\n\t\tcombos.put(\"Every prime-numbered pixel, two LSB\",52);\n\t\tcombos.put(\"Every prime-numbered pixel, one LSB\",51);\n\n\n\t}", "public void makeShips()\n\t{\n\t\t//The below is firstly to create the five ships \n\t\tint[] shipSizes= {2,3,3,4,5};\n\n\t\t//### Creating battleship to be put in the playerBattleShipsList\n\t\tfor (int x = 0; x < shipSizes.length; x ++) \n\t\t{\n\t\t\t//This creates a new battleship of size X from index's of shipSizes\n\t\t\tBattleShip newPlayerBattleShip = new BattleShip(shipSizes[x]);\n\n\t\t\t//This add the new battleship of size x (above) to a part in the array\n\t\t\tplayerBattleShipsList[x] = newPlayerBattleShip;\n\t\t}\n\n\t\t//### Creating battleship to be put in the aiBattleShipsList\n\n\t\tfor (int y = 0; y < shipSizes.length; y ++) \n\t\t{\n\t\t\t//This creates a new battleship of size X from index's of shipSizes\n\t\t\tBattleShip newAIBattleShip = new BattleShip(shipSizes[y]);\n\n\t\t\t//This add the new battleship of size x (above) to a part in the array\n\t\t\taiBattleShipsList[y] = newAIBattleShip;\n\t\t}\n\n\t}", "public RedPuzzle(String[] args) {\n super(args);\n }", "@Test public void testPlayBoardCluesRep() throws IOException {\n CrosswordBoard okBoard = new CrosswordBoard(\"puzzles/test.puzzle\");\n // check name and description of puzzle\n assertEquals(\"ANIMALS\", okBoard.getName());\n assertEquals(\"One particular animal\", okBoard.getDescription());\n // check that clues gets the right clues\n Map<String, String> getClues = Map.of(\"1DOWN\", \"winged mammal\", \"2ACROSS\", \"feline companion\");\n for (String key : getClues.keySet()) {\n assertEquals(getClues.get(key), okBoard.getClues().get(key));\n }\n // makes sure that a change in the copy doesn't change rep in clues\n getClues = okBoard.getClues();\n getClues.replace(\"1DOWN\", \"animal of the night\");\n assertEquals(getClues.keySet().size(), okBoard.getClues().size());\n assertEquals(\"winged mammal\", okBoard.getClues().get(\"1DOWN\"));\n\n // test play board initially\n List<List<CrosswordCharacter>> expectedPlayBoard = new ArrayList<>();\n expectedPlayBoard.add(List.of(new CrosswordCharacter(), new CrosswordCharacter('_', 1, Direction.DOWN, true),\n new CrosswordCharacter()));\n expectedPlayBoard.add(List.of(new CrosswordCharacter('_', 2, Direction.ACROSS, true),\n new CrosswordCharacter('_', 2, Direction.ACROSS, false),\n new CrosswordCharacter('_', 2, Direction.ACROSS, false)));\n expectedPlayBoard.add(List.of(new CrosswordCharacter(), new CrosswordCharacter('_', 1, Direction.DOWN, false),\n new CrosswordCharacter()));\n List<List<CrosswordCharacter>> getPlayBoard = okBoard.getPlayBoard();\n for (int i = 0; i < expectedPlayBoard.size(); i++) {\n for (int j = 0; j < expectedPlayBoard.get(0).size(); j++) {\n assertEquals(expectedPlayBoard.get(i).get(j).getChar(), getPlayBoard.get(i).get(j).getChar());\n }\n }\n // test play board after one turn\n assertEquals(Outcome.SUCCESS, okBoard.tryWord(\"1DOWN\", \"Cat\", \"p1\"));\n expectedPlayBoard.clear();\n expectedPlayBoard.add(List.of(new CrosswordCharacter(), new CrosswordCharacter('c', 1, Direction.DOWN, true),\n new CrosswordCharacter()));\n expectedPlayBoard.add(List.of(new CrosswordCharacter('_', 2, Direction.ACROSS, true),\n new CrosswordCharacter('a', 2, Direction.ACROSS, false),\n new CrosswordCharacter('_', 2, Direction.ACROSS, false)));\n expectedPlayBoard.add(List.of(new CrosswordCharacter(), new CrosswordCharacter('t', 1, Direction.DOWN, false),\n new CrosswordCharacter()));\n getPlayBoard = okBoard.getPlayBoard();\n for (int i = 0; i < expectedPlayBoard.size(); i++) {\n for (int j = 0; j < expectedPlayBoard.get(0).size(); j++) {\n assertEquals(expectedPlayBoard.get(i).get(j).getChar(), getPlayBoard.get(i).get(j).getChar());\n }\n }\n // test play board after two turns\n assertEquals(Outcome.SUCCESS, okBoard.tryChallenge(\"1DOWN\", \"bat\", \"p2\"));\n expectedPlayBoard.clear();\n expectedPlayBoard.add(List.of(new CrosswordCharacter(), new CrosswordCharacter('b', 1, Direction.DOWN, true),\n new CrosswordCharacter()));\n expectedPlayBoard.add(List.of(new CrosswordCharacter('_', 2, Direction.ACROSS, true),\n new CrosswordCharacter('a', 2, Direction.ACROSS, false),\n new CrosswordCharacter('_', 2, Direction.ACROSS, false)));\n expectedPlayBoard.add(List.of(new CrosswordCharacter(), new CrosswordCharacter('t', 1, Direction.DOWN, false),\n new CrosswordCharacter()));\n getPlayBoard = okBoard.getPlayBoard();\n for (int i = 0; i < expectedPlayBoard.size(); i++) {\n for (int j = 0; j < expectedPlayBoard.get(0).size(); j++) {\n assertEquals(expectedPlayBoard.get(i).get(j).getChar(), getPlayBoard.get(i).get(j).getChar());\n }\n }\n // makes sure that a change in the copy doesn't change rep in playBoard\n expectedPlayBoard = okBoard.getPlayBoard();\n expectedPlayBoard.get(0).set(1, new CrosswordCharacter('a', 1, Direction.DOWN, true));\n for (int i = 0; i < expectedPlayBoard.size(); i++) {\n for (int j = 0; j < expectedPlayBoard.get(0).size(); j++) {\n if (i == 0 && j == 1) {\n assertFalse(expectedPlayBoard.get(i).get(j).getChar() == getPlayBoard.get(i).get(j).getChar());\n continue;\n }\n assertEquals(expectedPlayBoard.get(i).get(j).getChar(), getPlayBoard.get(i).get(j).getChar());\n }\n }\n }", "public static void main(String[] args) throws IOException {\n /**\n * Some explanation: unclearedPlanes is a queue because the pool of uncleared planes clearly has a FIFO setup.\n * One may think a queue would also be optimal for the collection of runways, however I disagree. While it's useful for \n * clearing planes for takeoff in a round-robin fashion, it is not useful when checking which runway a plane in the pool\n * of uncleared planes belongs to while still keeping track of the current runway to clear a plane for takeoff from. As such,\n * logistically it seemed better to use a list for the runways and use an int to keep track of the current runway.\n */\n Queue<Plane> unclearedPlanes = new Queue<Plane>();\n List<Runway> runways = new List<Runway>();\n Random rand = new Random();\n int currentRunwayIndex, planesTakenOff;\n currentRunwayIndex = planesTakenOff = 0;\n \n System.out.println(\"Please enter the initial number of runways: \");\n int numRunways = Integer.parseInt(reader.readLine());\n for(int i = 1; i<=numRunways; i++){\n System.out.println(\"Please enter the UNIQUE name of runway #\" + i + \":\");\n runways.add(new Runway(reader.readLine()));\n }\n \n boolean escape = true;\n while(escape) {\n System.out.println(\"Select from the following menu: \\n1.\" +\n \"\\n2. \\n3. \\n4. \"\n + \"\\n5. \\n6. \");\n\n try {\n switch(Integer.parseInt(reader.readLine().trim())) {\n case 9:\n escape = false;\n System.out.println(\"gUESS YOU'RE WALKING THEN.\");\n break;\n\n case 1:\n option1(runways);\n break;\n\n case 2:\n if(rand.nextInt() == 0)\n unclearedPlanes.add(runways.get(currentRunwayIndex).dequeuePlane());\n else{\n runways.get(currentRunwayIndex).dequeuePlane();\n planesTakenOff++;\n }\n currentRunwayIndex = (currentRunwayIndex+1) % runways.size();\n\n case 3:\n option3(runways, unclearedPlanes);\n break;\n\n case 4:\n option4(runways);\n break;\n\n case 5:\n option5(runways);\n break;\n \n case 6:\n option6(runways);\n break;\n \n case 7:\n option7(unclearedPlanes);\n break;\n \n case 8:\n option8(planesTakenOff);\n break;\n\n default:\n System.out.println(\"Invalid selection!\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public static void solve(){\n HashMap<Integer,HashMap<Integer,Queue<String>>> wordsByVowels = new HashMap<>();\n \n\n int n = in.nextInt();\n //String[] words = new String[n];\n for(int i=0; i<n;i++){\n String s = in.next();\n //words[i] = s;\n int vowelCount = vowelCount(s);\n int lastV = lastVowel(s);//a=1,e=2,i=3,o=4,u=5\n //vowelFrequency[vowelCount][lastV]++;\n //store index of a word\n if(!wordsByVowels.containsKey(vowelCount)){\n HashMap<Integer,Queue<String>> hm =new HashMap<>(); \n wordsByVowels.put(vowelCount,hm);\n }\n if(!wordsByVowels.get(vowelCount).containsKey(lastV)){\n wordsByVowels.get(vowelCount).put(lastV,new LinkedList<String>());\n }\n //if(wordsByVowels.get(vowelCount))\n wordsByVowels.get(vowelCount).get(lastV).add(s);\n }\n\n //now separate as complete \n Queue<Pairs> complete = new LinkedList<>();\n Queue<Pairs> incomplete = new LinkedList<>();\n for(Map.Entry<Integer , HashMap<Integer,Queue<String>> > entry: wordsByVowels.entrySet()){\n HashMap<Integer,Queue<String>> lastMap = entry.getValue();\n //iterate over Strings with same number of vowels\n for(Map.Entry<Integer,Queue<String>> e: lastMap.entrySet()){\n //take stack which contains elements with similar endVowel\n Queue<String> st = e.getValue();\n while(st.size()>=2){\n Pairs p = new Pairs();\n p.s1 = st.poll(); \n p.s2 = st.poll(); \n complete.add(p); \n }\n }\n Queue<String> remainings = new LinkedList<>();\n\n for(Map.Entry<Integer,Queue<String>> e: lastMap.entrySet()){\n //take stack which contains elements with similar endVowel\n Queue<String> st = e.getValue();\n if(st.size()>0){\n remainings.add(st.poll());\n }\n }\n while(remainings.size()>=2){\n Pairs p = new Pairs();\n p.s1 = remainings.poll();\n p.s2 = remainings.poll();\n incomplete.add(p); \n }\n }\n \n //System.out.println(\"here\");\n//now we have both complete and incomplete and we can mix them well first mix completes with incompletes then mix completes if left any\n //System.out.printf(\"com %d inc %d\\n\",complete.size(),incomplete.size());\n //System.out.printf(\"com %d inc %d\\n\",complete.size(),incomplete.size());\n int lc = 0;\n if(complete.size()>incomplete.size()){\n lc=incomplete.size()+ (complete.size()-incomplete.size())/2;\n }else{\n lc = complete.size();\n }\n\n System.out.println(lc);\n \n\n while(complete.size()>0 && incomplete.size()>0){\n Pairs inc =incomplete.poll();\n Pairs com =complete.poll();\n System.out.printf(\"%s %s\\n%s %s\\n\",inc.s1,com.s1,inc.s2,com.s2);\n }\n\n while(complete.size()>=2){\n Pairs com =complete.poll();\n Pairs com2 =complete.poll();\n System.out.printf(\"%s %s\\n%s %s\\n\",com2.s1,com.s1,com2.s2,com.s2);\n }\n \n\n\n\n }", "public static void main(String[] args) {\n\t\tLightCombination combination = new LightCombination();\n\n\t\tSystem.out.println(combination.getDescription());\n\n\t\tScanner userInput = new Scanner(System.in);\n\t\tString input = userInput.nextLine();\n\t\twhile (!input.equalsIgnoreCase(\"blue, aqua, green, purple\")) {\n\n\t\t\tSystem.out.println(\"Incorrect entry. Please try again!\");\n\t\t\tinput = userInput.nextLine();\n\t\t}\n\t\tcombination.solvingPuzzle(input);\n\n\t}", "@Test public void testSimple() throws IOException {\n CrosswordBoard okBoard = new CrosswordBoard(\"puzzles/test_duplicate.puzzle\");\n assertEquals(okBoard.toString(), \" _ \\n_ _ _ \\n _ \\n\");\n // no one inputted anything at \"1down\" yet\n assertEquals(Outcome.CANT_CHALLENGE, okBoard.tryChallenge(\"1DOwn\", \"cat\", \"p2\"));\n assertEquals(Outcome.SUCCESS, okBoard.tryWord(\"1down\", \"cat\", \"p1\"));\n assertEquals(okBoard.toString(), \" c \\n_ a _ \\n t \\n\");\n // should get rid of \"cat\"\n assertEquals(Outcome.SUCCESS, okBoard.tryWord(\"2Across\", \"for\", \"p1\"));\n // should be fine\n assertEquals(Outcome.SUCCESS, okBoard.tryWord(\"1dowN\", \"lot\", \"p1\"));\n // p1 is challenging own word\n assertEquals(Outcome.CANT_CHALLENGE, okBoard.tryChallenge(\"1down\", \"cat\", \"p1\"));\n // wrong length\n assertEquals(Outcome.WRONG_LENGTH, okBoard.tryChallenge(\"1DOwn\", \"cater\", \"p2\"));\n // word id doesn't exist\n assertEquals(Outcome.NONEXISTENT, okBoard.tryChallenge(\"10DOwn\", \"cat\", \"p2\"));\n // should win challenge\n assertEquals(Outcome.SUCCESS, okBoard.tryChallenge(\"1DOwn\", \"cat\", \"p2\"));\n assertEquals(0, okBoard.showScore(\"p1\"));\n assertEquals(2, okBoard.showScore(\"p2\"));\n // should not do anything because already confirmed\n assertEquals(Outcome.CONFIRMED, okBoard.tryWord(\"1down\", \"cat\", \"p1\"));\n // should finish the game\n assertEquals(Outcome.SUCCESS, okBoard.tryWord(\"2across\", \"fat\", \"p2\"));\n assertEquals(Outcome.FINISHED, okBoard.tryChallenge(\"2ACroSS\", \"mat\", \"p1\"));\n // both players won one challenge and each have one word under their playerID\n assertEquals(3, okBoard.showScore(\"p1\"));\n assertEquals(3, okBoard.showScore(\"p2\"));\n }", "public static String[][][] holoport(String[][][] original, String[][][] placeholder){\n int i, j, k = 0;\n \n if(original.length >= placeholder.length){\n for(i = 0; i < placeholder.length; i++){\n if(original[i].length >= placeholder[i].length){\n for(j = 0; j < placeholder[i].length; j++){\n if(original[i][j].length >= placeholder[i][j].length){\n for(k = 0; k < placeholder[i][j].length; k++){\n placeholder[i][j][k] = original[i][j][k];\n } \n }\n else{\n for(k = 0; k < original[i][j].length; k++){\n placeholder[i][j][k] = original[i][j][k];\n } \n for(k = original[i][j].length; k < placeholder[i][j].length; k++){\n placeholder[i][j][k] = \"$$$$$$\";\n }\n }\n }\n }\n else{\n for(j = 0; j < original[i].length; j++){\n placeholder[i][j] = original[i][j];\n }\n for(j = original[i].length; j < placeholder[i].length; j++){\n placeholder[i][j] = new String[0];\n } \n \n }\n }\n }\n else{\n for(i = 0; i < original.length; i++){\n placeholder[i] = original[i];\n }\n for(i = original.length; i < placeholder.length; i++){\n placeholder[i]= new String[0][0];\n } \n \n }\n return placeholder;\n }", "public static void main(String[] args) {\n Scanner ob = new Scanner(System.in);\n Solution solution = null;\n int testcases = ob.nextInt();\n ob.nextLine();\n for (int i = 0; i < testcases; i++) {\n String numsLine = ob.nextLine();\n String[] numsLineParts = numsLine.trim().split(\" \");\n int dimensions = Integer.valueOf(numsLineParts[0]);\n int numOperations = Integer.valueOf(numsLineParts[1]);\n solution = new Solution(dimensions);\n for (int j = 0; j < numOperations; j++) {\n String line = ob.nextLine();\n String[] lineParts = line.split(\" \");\n if (lineParts[0].equals(\"UPDATE\")) {\n solution.update(Integer.valueOf(lineParts[1])-1, Integer.valueOf(lineParts[2])-1, Integer.valueOf(lineParts[3])-1, Integer.valueOf(lineParts[4]));\n }\n if (lineParts[0].equals(\"QUERY\")) {\n solution.query(Integer.valueOf(lineParts[1])-1, Integer.valueOf(lineParts[2])-1, Integer.valueOf(lineParts[3])-1, Integer.valueOf(lineParts[4])-1, Integer.valueOf(lineParts[5])-1, Integer.valueOf(lineParts[6])-1);\n }\n }\n }\n }", "@Override\n public String getSolutionCombination(int nbrDigits, int nbrRange, String sizure) {\n\n // randomRange\n int[][] randomRange = new int[2][nbrDigits];\n\n for (int i = 0; i < 2; i++) {\n\n for (int j = 0; j < nbrDigits; j++) {\n\n if (i == 0) {\n\n // Min value limit\n randomRange[i][j] = 0;\n\n } else {\n\n // Max value limit\n randomRange[i][j] = nbrRange;\n\n }\n\n }\n\n }\n\n // inputmachine\n List<Integer> inputMachine = new ArrayList<Integer>();\n\n for (int i = 0; i < nbrDigits; i++) {\n\n inputMachine.add((int) ((randomRange[1][i] - randomRange[0][i]) * Math.random()) + randomRange[0][i]);\n\n log.info(\"test A : \" + inputMachine.get(i) + \" \");\n\n }\n\n // convertListIntegerToString\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < inputMachine.size(); i++) {\n int num = inputMachine.get(i);\n sb.append(num);\n }\n\n return sb.toString();\n\n }", "protected void populate (int topSlots, long flipBits, long ballBits, long holeBits)\n {\n // switches each level + triangular number\n int flipCount = HEIGHT * topSlots/2 + (HEIGHT * (HEIGHT-1))/2;\n // create the flips and slots arrays\n _flips = new Flip[flipCount];\n slots = new Slot[topSlots];\n _holes.clear();\n\n // decode the bits and configure each flip/ball and holes\n for (int ii=0; ii < flipCount; ii++) {\n Flip flip = _flips[ii] = new Flip();\n long mask = (((long) 1) << ii);\n flip.leftPosition = (mask & flipBits) != 0;\n if ((mask & ballBits) != 0) {\n flip.ball = new Ball(topSlots, flip, ii);\n }\n }\n\n // populate the slots along the top\n for (int ii=0; ii < topSlots; ii++) {\n slots[ii] = new Slot();\n slots[ii].dest = _flips[ii / 2];\n }\n\n // connect the flips, slots, buckets all together\n int dex = 0;\n int bucketDex = 0;\n int slotDex = 0;\n for (int height = 0; height < HEIGHT; height++) {\n int flipsOnRow = topSlots/2 + height;\n for (int ii=0; ii < flipsOnRow; ii++) {\n Flip flip = _flips[dex];\n flip.left = new Slot(topSlots, slotDex++, holeBits, _holes);\n flip.right = new Slot(topSlots, slotDex++, holeBits, _holes);\n\n if (height < HEIGHT - 1) {\n flip.left.dest = _flips[dex + flipsOnRow];\n flip.right.dest = _flips[dex + flipsOnRow + 1];\n } else {\n // at the end, attach an extra slot, then the bucket\n Slot s = new Slot();\n s.dest = new Bucket(bucketDex++);\n flip.left.dest = s;\n s = new Slot();\n s.dest = new Bucket(bucketDex++);\n flip.right.dest = s;\n }\n dex++;\n }\n }\n }", "public void generateSolution() {\n if (this.stateOfTheMaze != 1)\n throw new IllegalArgumentException(\"To generate the maze the state of it must be \\\"generated maze\\\".\");\n Queue<Box> queue = new LinkedList<>();\n queue.add(this.startBox);\n boolean notFinished = true;\n while (notFinished) {\n Box aux = queue.peek();\n LinkedList<Box> movements = movementWithWalls(aux);\n movements.remove(aux.getPrevious());\n for (Box box : movements) {\n box.setPrevious(aux);\n queue.add(box);\n if (box.equals(this.endBox))\n notFinished = false;\n }\n queue.remove();\n }\n Box anotherAux = this.endBox;\n while (!anotherAux.equals(this.startBox)) {\n anotherAux.setAsSolution();\n anotherAux = anotherAux.getPrevious();\n }\n this.stateOfTheMaze++;\n }", "public void addAllJugglersToFirstCircuitChoice() {\n for (int currentJuggler = 0; currentJuggler < jugglers.size(); currentJuggler++) { // For each juggler who needs to be added to a circuit...\n int currentJugglerMostDesiredCircuitIndex = jugglers.get(currentJuggler).getDesiredCircuits().get(0);\n Circuit currentJugglerMostDesiredCircuit = circuits.get(currentJugglerMostDesiredCircuitIndex);\n currentJugglerMostDesiredCircuit // Get the current juggler's most desired circuit...\n .getJugglersInCircuit().add(currentJuggler); //... and add this juggler's number to the circuit\n\n // If we now have too many jugglers in the circuit:\n // 1) Identify the least-suitable juggler in this circuit (using dot-product)\n // 2) Remove him from this circuit\n // 3) Find his next-most-preferred circuit and put him in there\n // , remove the one least suited for this circuit and put him in his next-desired\n if (currentJugglerMostDesiredCircuit.getJugglersInCircuit().size() > MAX_JUGGLERS_PER_CIRCUIT) {\n int worstJugglerInCircuitNumber = currentJuggler; // This number corresponds to the juggler who is going to be kicked out of this circuit. Defaults to the juggler who just got in, because he has to prove himself first!\n // Check each juggler. If they are worse than the new juggler, they become the \"worst juggler in the circuit\", and will be kicked out.\n for (Integer jugglerNumber : currentJugglerMostDesiredCircuit.getJugglersInCircuit()) {\n if (jugglers.get(jugglerNumber).getDotProduct(currentJugglerMostDesiredCircuit) < jugglers.get(worstJugglerInCircuitNumber).getDotProduct(currentJugglerMostDesiredCircuit)) {\n worstJugglerInCircuitNumber = jugglerNumber;\n }\n }\n kickToLowerDesiredCircuit(worstJugglerInCircuitNumber, currentJugglerMostDesiredCircuitIndex); // Kicks this juggler from this circuit to his next one\n }\n }\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tT = sc.nextInt();\n\t\n\t\tfor (int tc = 1; tc <= T; tc++) {\t\t\t\n\t\t\tW = sc.nextInt();\n\t\t\tH = sc.nextInt();\n\t\t\tN = sc.nextInt();\n\t\t\tinit();\n\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\tqu.offer(new Point(sc.nextInt(),sc.nextInt()));\n\t\t\t}\n\t\t\tsolution();\n\t\t\tSystem.out.println(\"#\"+tc+\" \"+answer);\n\t\t\t\n\t\t}\n\t}", "public Iterable<Board> solution() {\n\t\treturn result;\n\t}", "private void compose() {\n for(Group group : inputGroupList){\n if(group.getGroups().size() > 0){\n LinkedList<Integer> upperGroups = group.getGroups();\n for(int i = 0; i < upperGroups.size(); i++){\n int id = upperGroups.get(i);\n Group upper = findById(id);\n upper.addChild(group);\n }\n } else{\n root.addChild(group);\n }\n }\n for(Address adr : inputAddressList){\n if(adr.getGroups().size() > 0){\n LinkedList<Integer> upperGroups = adr.getGroups();\n for(int i = 0; i < upperGroups.size(); i++){\n int id = upperGroups.get(i);\n Group upper = findById(id);\n upper.addChild(adr);\n adr.addParent(upper);\n }\n } else{\n root.addChild(adr);\n }\n }\n\n assert(root.getChildren().size() > 0);\n }", "public void cool()throws IOException{\n int q= 2;\n ArrayList<Scanner> f = new ArrayList();\n String input = j.showInputDialog(\"Choose a file to use:\");\n f.add(new Scanner(new File(input+\".ppm\")));\n //\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"jkndanwladlanfseuihrvniurhceimucauqrcal3iuirlheunrliuvznmlriunh.ppm\")));\n out.println(f.get(0).next());out.println(f.get(0).next()); out.println(f.get(0).next());int uh=Integer.parseInt(f.get(0).next()); out.println(uh);\n while(f.get(0).hasNext()){\n for(int rgb=0;rgb<3;rgb++){\n if(f.get(0).hasNext()){\n String ass=f.get(0).next();\n\n int azz= Integer.parseInt(ass);\n if(azz<(uh/2)){\n out.println(\"\"+0);\n }else{\n out.println(\"\"+uh);\n }\n }\n }\n }\n out.close(); //\n \n f.set(0,(new Scanner(new File(input+\".ppm\"))));f.add(new Scanner(new File(\"jkndanwladlanfseuihrvniurhceimucauqrcal3iuirlheunrliuvznmlriunh.ppm\")));\n input = j.showInputDialog(\"Choose a name for the new file:\");\n out = new PrintWriter(new BufferedWriter(new FileWriter(input+\".ppm\")));\n out.println(\"P3\");\n int height[]= new int[q]; int width[]= new int[q];\n int largest=0;\n for(int a=0;a<q;a++){\n f.get(a).next();\n height[a]=Integer.parseInt(f.get(a).next());\n width[a]=Integer.parseInt(f.get(a).next());\n //f.get(a).next();\n }\n for(int a=0;a<q;a++){\n if(height[largest]*width[largest]<height[a]*width[a]){\n largest=a;\n }\n }\n out.println(height[largest]);out.println(width[largest]);\n int ass=0;\n int azz=0;\n\n for(int x=0;x<width[largest];x++){\n for(int y=0;y<height[largest];y++){\n for(int c=0;c<3;c++){\n for(int a=0;a<q;a++){\n if(f.get(a).hasNext()){\n if(x<width[a]&&y<height[a]){\n ass=ass+Integer.parseInt(f.get(a).next());\n azz++;\n }\n }\n }\n ass=ass/azz;\n out.print(ass+\" \");\n ass=0;\n azz=0;\n }\n }\n }\n\n for(int a =0;a<q;a++){\n f.get(a).close();\n }\n out.close();\n System.exit(0);\n }", "public void makeHash(){\n\t\tString tmp = \"\";\n\t\t\n\t\tfor(int i=0;i<_rows;i++){\n\t\t\tfor(int j=0;j<_cols;j++){\n\t\t\t\ttmp+=String.valueOf(_puzzle[i][j])+\"#\";\n\t\t\t}\n\t\t}\n\t\t_hashCode = tmp;\n\t}", "static void addNewPieces() {\n ArrayList<Block> news = new ArrayList<>();\n news.add(new Block(new int[]{2, 3}, Tetrominos.I));\n news.add(new Block(new int[]{2, 3}, Tetrominos.J));\n news.add(new Block(new int[]{2, 3}, Tetrominos.L));\n news.add(new Block(new int[]{2, 3}, Tetrominos.O));\n news.add(new Block(new int[]{2, 3}, Tetrominos.S));\n news.add(new Block(new int[]{2, 3}, Tetrominos.T));\n news.add(new Block(new int[]{2, 3}, Tetrominos.Z));\n\n\n Collections.shuffle(news);\n newPiece.addAll(news);\n }", "public static void main(String[] args) throws IOException {\n\t\tbr = new BufferedReader(new FileReader(new File(\"input.txt\")));\r\n\t\tSystem.setOut(new PrintStream(new File(\"output.txt\")));\r\n\t\tint T = readInt();\r\n\t\t\r\n\t\tfor (int ind = 1; ind<=T; ind++) {\r\n\t\t\tSystem.out.print(\"Case #\" + ind + \": \");\r\n\t\t\t\r\n\t\t\tint N = readInt();\r\n\t\t\tint[] ar = readIntArr();\r\n\t\t\tfor (int i = 0; i < N; i++)ar[i]--;\r\n\t\t\tboolean used[] = new boolean[N];\r\n\t\t\tint ans = 0;\r\n\t\t\tint pairMax = 0;\r\n\t\t\tint cycleMax = 0;\r\n\t\t\tint cyclePair = 0;\r\n\t\t\tint pair = 0;\r\n\t\t\tfor (int i = 0; i < N; i++) {\r\n\t\t\t\tif (!used[i]) {\r\n\t\t\t\t\tList<Integer> list = new LinkedList<Integer>();\r\n\t\t\t\t\tlist.add(i);\r\n\t\t\t\t\tused[i] = true;\r\n\t\t\t\t\tint j = ar[i];\r\n\t\t\t\t\twhile(!list.contains(j) && !used[j]) {\r\n\t\t\t\t\t\tlist.add(j);\r\n\t\t\t\t\t\tused[j] = true;\r\n\t\t\t\t\t\tj = ar[j];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!list.contains(j))continue;\r\n\t\t\t\t\tif (list.size() == 2)pair++;\r\n\t\t\t\t\tboolean removed = false;\r\n\t\t\t\t\twhile(list.get(0) != j){list.remove(0);removed = true;}\r\n\t\t\t\t\tif (list.size() > 2 && list.size() > cycleMax) cycleMax = list.size();\r\n\t\t\t\t\tif (list.size() == 2) {\r\n\t\t\t\t\t\tint a = list.remove(0);\r\n\t\t\t\t\t\tint b = list.remove(0);\r\n\t\t\t\t\t\tint tmp = 2;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tboolean us[] = new boolean[N];\r\n\t\t\t\t\t\t\tus[a] = true;\r\n\t\t\t\t\t\t\tus[b] = true;\r\n\t\t\t\t\t\t\t//System.out.println(\" test \" + a + b);\r\n\t\t\t\t\t\t\tSet<Integer> set = new HashSet<Integer>();\r\n\t\t\t\t\t\t\tset.add(a);\r\n\t\t\t\t\t\t\twhile (true) {\r\n\t\t\t\t\t\t\t\tboolean found = false;\r\n\t\t\t\t\t\t\t\tSet<Integer> tSet = new HashSet<Integer>();\r\n\t\t\t\t\t\t\t\tfor (int ii = 0; ii < N; ii++) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif (!us[ii] && set.contains(ar[ii])) {\r\n\t\t\t\t\t\t\t\t\t\tus[ii] = true;\r\n\t\t\t\t\t\t\t\t\t\tfound = true;\r\n\t\t\t\t\t\t\t\t\t\ttSet.add(ii);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (found)tmp++;\r\n\t\t\t\t\t\t\t\tif (!found)break;\r\n\t\t\t\t\t\t\t\tset.addAll(tSet);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tset = new HashSet<Integer>();\r\n\t\t\t\t\t\t\tset.add(b);\r\n\t\t\t\t\t\t\twhile (true) {\r\n\t\t\t\t\t\t\t\tboolean found = false;\r\n\t\t\t\t\t\t\t\tSet<Integer> tSet = new HashSet<Integer>();\r\n\t\t\t\t\t\t\t\tfor (int ii = 0; ii < N; ii++) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif (!us[ii] && set.contains(ar[ii])) {\r\n\t\t\t\t\t\t\t\t\t\tus[ii] = true;\r\n\t\t\t\t\t\t\t\t\t\tfound = true;\r\n\t\t\t\t\t\t\t\t\t\ttSet.add(ii);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(found)tmp++;\r\n\t\t\t\t\t\t\t\tif (!found)break;\r\n\t\t\t\t\t\t\t\tset.addAll(tSet);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//if (removed) {\r\n\t\t\t\t\t\t//\tif (tmp > cyclePair)cyclePair = tmp;\r\n\t\t\t\t\t\t//} else {\r\n\t\t\t\t\t\t pairMax += tmp;\r\n\t\t\t\t\t\t//}\r\n\t\t\t\t\t} else {\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\t\r\n\t\t\t//cyclePair += 2 * pair;\r\n\t\t\t//if (pair > 1) pairMax += 2 * (pair - 1);\r\n\t\t\tans = Math.max(cyclePair, pairMax);\r\n\t\t\tans = Math.max(cycleMax, ans);\r\n\t\t\tSystem.out.println(ans);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "public void solve() {\n \tsquares[0][0].fillInRemainingOfBoard();\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int q = sc.nextInt();\n\n for(int k = 0; k < q; k++) {\n int m = sc.nextInt();\n int n = sc.nextInt();\n\n // indicate number of pieces\n long x = 1;\n long y = 1;\n \n ArrayList<Long> c_y = new ArrayList<Long>();\n for(int i = 0; i < m - 1; i++) {\n c_y.add(sc.nextLong());\n }\n \n ArrayList<Long> c_x = new ArrayList<Long>();\n for(int i = 0; i < n - 1; i++) {\n c_x.add(sc.nextLong());\n }\n\n Collections.sort(c_y, Collections.reverseOrder());\n Collections.sort(c_x, Collections.reverseOrder());\n\n // cut: most expensive = cut first\n int index_X = 0;\n int index_Y = 0;\n long totalCost = 0;\n\n while(!(x == n && y == m)) {\n if(x < n && y < m) {\n // compare cost to decide whether cut horizontally or vertically\n if(c_y.get(index_Y) >= c_x.get(index_X)) {\n totalCost += c_y.get(index_Y) * x;\n y++;\n index_Y++;\n } else if(c_y.get(index_Y) < c_x.get(index_X)) {\n totalCost += c_x.get(index_X) * y;\n x++;\n index_X++; \n }\n } else if(x == n && y < m) {\n totalCost += c_y.get(index_Y) * x;\n index_Y++;\n y++;\n } else if(x < n && y == m) {\n totalCost += c_x.get(index_X) * y;\n index_X++;\n x++;\n }\n }\n\n totalCost = totalCost % (long)(Math.pow(10, 9) + 7);\n System.out.println(totalCost );\n }\n }", "private static void craft2by2(ItemStack input, ItemStack output)\r\n\t{\r\n\t\tGameRegistry.addRecipe(output, new Object[] { \"##\", \"##\", '#', input });\r\n\t}", "public static void main(String[] args) {\n int validPhrases = 0;\n\n // get filepath for the puzzle input\n System.out.print(\"Please provide the filepath of the text document containing the puzzle input: \");\n String filePath = new Scanner(System.in).nextLine();\n\n try {\n // attempt to read each line in the file into a list\n List<String> lines = Files.readAllLines(Paths.get(filePath));\n\n /// PART 1\n for (String line : lines) {\n List<String> usedWords = new ArrayList<>();\n boolean validPassphrase = true;\n\n for (String word : line.split(\" \")) {\n if (usedWords.contains(word)) {\n validPassphrase = false;\n break;\n } else {\n usedWords.add(word);\n }\n }\n\n if (validPassphrase) {\n validPhrases++;\n }\n }\n\n System.out.println(\"The solution to part 1 is: \" + validPhrases);\n validPhrases = 0;\n\n /// PART 2\n for (String line : lines) {\n // this time around each word will be a dictionary mapping every character in the word, to how many\n // times that character is used in the word\n List<Map<Character, Integer>> usedWords = new ArrayList<>();\n boolean validPassphrase = true;\n\n for (String word : line.split(\" \")) {\n Map<Character, Integer> charMap = new HashMap<>();\n for (char c : word.toCharArray()) {\n // if the character has already been used, increment it's value, otherwise add it to the dict\n if (charMap.containsKey(c)) {\n charMap.put(c, charMap.get(c) + 1);\n } else {\n charMap.put(c, 1);\n }\n }\n\n // now we check if the word we're looking at is an anagram of any we've seen before on this line\n for (Map<Character, Integer> usedWord : usedWords) {\n // no need to check characters if the char maps are a different size\n if (usedWord.keySet().size() == charMap.keySet().size()) {\n boolean hasDifferingValues = false;\n for (char c : charMap.keySet()) {\n // we can short circuit checking every single character by breaking as soon as we see\n // any difference between the two words\n if (!usedWord.containsKey(c) || usedWord.get(c) != charMap.get(c)) {\n hasDifferingValues = true;\n break;\n }\n }\n\n if (!hasDifferingValues) {\n validPassphrase = false;\n break;\n }\n }\n }\n\n // we don't need to check the rest of the words if we already know the line is invalid\n if (!validPassphrase)\n break;\n usedWords.add(charMap);\n }\n\n if (validPassphrase) {\n validPhrases++;\n }\n }\n\n System.out.println(\"The solution to part 2 is: \" + validPhrases);\n } catch (Exception ex) {\n System.out.println(\"An error occurred attempting to read your input file.\");\n }\n }", "private static void fillArea()\n\t{\n\t\tconnections=new int[board.length][board[1].length];\n\n\t\twhile(!(isFilled()))\n\t\t{\n\t\t\tTemplates temp = Templates.intToTemplates(rn.nextInt(Templates.values().length));\n\t\t\ttemp.rotate(rn.nextInt(4));\n\n\t\t\taddTemplate(temp);\n\t\t}\t\n\t}", "public void solution() {\n\t\t\n\t}", "public static Goal[] createEverythingGoals() {\n\t\t// [ & ] <--- rootGoal1\n\t\t// / / \\ \\\n\t\t// P T E M\n\t\t//\n\t\tCompositeGoal rootGoal1 = new CompositeGoal(CompositeGoal.and);\n\t\trootGoal1.addChild(new PuzzleGoal());\n\t\trootGoal1.addChild(new TreasureGoal());\n\t\trootGoal1.addChild(new EnemiesGoal());\n\t\trootGoal1.addChild(new MazeGoal());\n\t\t\n\t\t\n\t\tCompositeGoal subGoal1 = new CompositeGoal(CompositeGoal.and);\n\t\tsubGoal1.addChild(new EnemiesGoal());\n\t\tsubGoal1.addChild(new TreasureGoal());\n\t\tsubGoal1.addChild(new MazeGoal());\n\t\t\n\t\tCompositeGoal subGoal2 = new CompositeGoal(CompositeGoal.and);\n\t\tsubGoal2.addChild(new PuzzleGoal());\n\t\tsubGoal2.addChild(new TreasureGoal());\n\t\tsubGoal2.addChild(subGoal1);\n\t\t\n\t\t// [ | ] <--- rootGoal2\n\t\t// / \\\n\t\t// I [ & ] <---- subGoal2\n\t\t// / | \\\n\t\t// P T [ & ] <---- subGoal1\n\t\t// /|\\\n\t\t// E T M\n\t\tCompositeGoal rootGoal2 = new CompositeGoal(CompositeGoal.or);\n\t\trootGoal2.addChild(new ImpossibleGoal());\n\t\trootGoal2.addChild(subGoal2);\n\n\t\t\n\t\tString goalString = \"\"\n\t\t\t+ \" { \\\"goal\\\": \\\"AND\\\", \\\"subgoals\\\":\\n\"\n\t\t\t+ \" [ { \\\"goal\\\": \\\"exit\\\" },\\n\"\n\t\t\t+ \" { \\\"goal\\\": \\\"AND\\\", \\\"subgoals\\\":\\n\"\n\t\t\t+ \" [ {\\\"goal\\\": \\\"treasure\\\" },\\n\"\n\t\t\t+ \" { \\\"goal\\\": \\\"AND\\\", \\\"subgoals\\\":\\n\"\n\t\t\t+ \" [ {\\\"goal\\\": \\\"enemies\\\" },\\n\"\n\t\t\t+ \" {\\\"goal\\\": \\\"boulders\\\" }\\n\"\n\t\t\t+ \" ]\\n\"\n\t\t\t+ \" }\\n\"\n\t\t\t+ \" ]\\n\"\n\t\t\t+ \" }\\n\"\n\t\t\t+ \" ]\\n\"\n\t\t\t+ \" }\\n\";\n\t\t\n\t\tJSONObject json = new JSONObject(new JSONTokener(goalString));\n\t\tGoal goal3 = Goal.createGoal(json);\n\t\t\n\t\treturn new Goal[]{ rootGoal1, rootGoal2, goal3 };\n\t}", "public static void main(String[] args) {\n TargetSumCombination obj = new TargetSumCombination();\n int nums[] = {1,1,1};\n int res[] = new int[nums.length];\n obj.giveCombinations(nums, res, 0);\n System.out.println(\"-----------------\");\n obj.giveCombinations1(nums, res, 0);\n }", "@Test\n\tpublic void multipleSolutionsTest(){\n\t\tDjikstrasMap m = new DjikstrasMap();\t//Creates new DjikstrasMap object\n\t\t\n\t\tm.addRoad(\"Guildford\", \"Portsmouth\", 20.5, \"M3\");\t//Adds a road from Guildford to portsmouth to the map\n m.addRoad(\"Portsmouth\", \"Guildford\", 20.5, \"M3\");\n \n m.addRoad(\"Guildford\", \"Winchester\", 20.5, \"A33\");\t//Adds a road from Guildford to winchester to the map\n m.addRoad(\"Winchester\", \"Guildford\", 20.5, \"A33\");\n \n m.addRoad(\"Winchester\", \"Fareham\", 20.5, \"M27\");\t//Adds a road from winchester to fareham to the map\n m.addRoad(\"Fareham\", \"Winchester\", 20.5, \"M27\");\n\t\t\n m.addRoad(\"Portsmouth\", \"Fareham\", 20.5, \"M25\");\t//Adds a road from fareham to portsmouth to the map\n m.addRoad(\"Fareham\", \"Portsmouth\", 20.5, \"M25\");\n \n m.findShortestPath(\"Fareham\");\t//Starts the algorithm to find the shortest path\n \n List<String> temp = new ArrayList<String>();\t//Holds the route plan\n temp = m.createRoutePlan(\"Guildford\");\t//Calls methods to assign the route plan to temp\n \n assertEquals(\"1. Take the M27 to Winchester\",temp.get(0));\t//tests that the different lines in the route plan are correct and that the algorithm did indeed take the shortest route\n assertEquals(\"2. Take the A33 to Guildford\", temp.get(1));\n assertEquals(\"\", temp.get(2));\n assertEquals(\"The Journey will take 41 hours and .00 minutes long.\", temp.get(3));\n assertEquals(\"\", temp.get(4));\n \n assertEquals(5, temp.size());\t//tests to see that the route plan is 5 line large as it should be\n\t}", "private void createNewItemsetsFromPreviousOnes() {\n // by construction, all existing itemsets have the same size\n int currentSizeOfItemsets = itemsets.get(0).length;\n Logger.getLogger(Apriori.class.getName()).log(Level.INFO, \"Creating itemsets of size {0} based on {1} itemsets of size {2}\", new Object[]{currentSizeOfItemsets + 1, itemsets.size(), currentSizeOfItemsets});\n\n HashMap<String, String[]> tempCandidates = new HashMap<>(); //temporary candidates\n\n // compare each pair of itemsets of size n-1\n for (int i = 0; i < itemsets.size(); i++) {\n for (int j = i + 1; j < itemsets.size(); j++) {\n String[] X = itemsets.get(i);\n String[] Y = itemsets.get(j);\n\n assert (X.length == Y.length);\n\n //make a string of the first n-2 tokens of the strings\n String[] newCand = new String[currentSizeOfItemsets + 1];\n for (int s = 0; s < newCand.length - 1; s++) {\n newCand[s] = X[s];\n }\n\n int ndifferent = 0;\n // then we find the missing value\n for (int s1 = 0; s1 < Y.length; s1++) {\n boolean found = false;\n // is Y[s1] in X?\n for (int s2 = 0; s2 < X.length; s2++) {\n if (X[s2].equals(Y[s1])) {\n found = true;\n break;\n }\n }\n if (!found) { // Y[s1] is not in X\n ndifferent++;\n // we put the missing value at the end of newCand\n newCand[newCand.length - 1] = Y[s1];\n }\n\n }\n\n // we have to find at least 1 different, otherwise it means that we have two times the same set in the existing candidates\n assert (ndifferent > 0);\n\n /*if (ndifferent==1) {\n \tArrays.sort(newCand);*/\n tempCandidates.put(Arrays.toString(newCand), newCand);\n //}\n }\n }\n\n //set the new itemsets\n itemsets = new ArrayList<>(tempCandidates.values());\n Logger.getLogger(Apriori.class.getName()).log(Level.INFO, \"Created {0} unique itemsets of size {1}\", new Object[]{itemsets.size(), currentSizeOfItemsets + 1});\n\n }" ]
[ "0.59938025", "0.58759165", "0.5847591", "0.57714695", "0.56474453", "0.56354797", "0.55743647", "0.5563599", "0.55104715", "0.548906", "0.5475237", "0.53420746", "0.5334746", "0.5314458", "0.5285648", "0.5285581", "0.5283299", "0.5276347", "0.5275511", "0.52598774", "0.5257856", "0.5250762", "0.5210442", "0.518515", "0.51726264", "0.51640284", "0.5147927", "0.51300865", "0.51280695", "0.5101555", "0.50805616", "0.50507444", "0.50416476", "0.5025455", "0.50146043", "0.500904", "0.5006372", "0.500414", "0.50011957", "0.49905604", "0.49895087", "0.49755186", "0.49687806", "0.49621144", "0.49507713", "0.49450716", "0.49367833", "0.49229547", "0.48971403", "0.48953268", "0.4878392", "0.4872781", "0.4872405", "0.4871465", "0.48541257", "0.48473677", "0.48468542", "0.48468322", "0.484528", "0.48449317", "0.48402876", "0.48384166", "0.4836169", "0.48310733", "0.48304182", "0.48239374", "0.48201796", "0.47901842", "0.47848037", "0.47847113", "0.47817364", "0.4773178", "0.47646126", "0.47641864", "0.4758963", "0.47536296", "0.47532392", "0.47502244", "0.47223955", "0.47160977", "0.47144154", "0.47114846", "0.47085625", "0.47033477", "0.46988353", "0.4697365", "0.46925327", "0.46892846", "0.46873578", "0.46860793", "0.46844703", "0.46794507", "0.46776655", "0.46776378", "0.46761575", "0.4672857", "0.46706945", "0.46706724", "0.46706215", "0.46705377" ]
0.58461565
3
Opens a scanner to accept user input for 8 cubes. Takes one face at a time.
public static String[][] takeStdInput() { // contains all of the faces in order of acceptance final String[] faces = new String[] { "front", "right", "back", "left", "top", "bottom" }; sc = new Scanner(System.in); // final array of colors for any given cube final String[][] inputArray = new String[Puzzle.NUM_OF_CUBES][Cube.NUM_OF_FACES]; // System.out.println(Arrays.toString(inputArray)); String[] cubeArray = new String[Cube.NUM_OF_FACES]; for (int i = 0; i < Puzzle.NUM_OF_CUBES; i++) { cubeArray = new String[Cube.NUM_OF_FACES]; System.out.println("Enter cube #" + (i + 1)); for (int j = 0; j < Cube.NUM_OF_FACES; j++) { System.out.print("Enter " + faces[j] + " face: "); cubeArray[j] = sc.nextLine(); // if input is not a proper color of misspelled, prompt again and overwrite // array entry while (!isValidString(cubeArray[j]) || containsElement(cubeArray[j], cubeArray, j)) { System.out.println("Invalid input, try again."); System.out.print("Enter " + faces[j] + " face: "); cubeArray[j] = sc.nextLine(); } inputArray[i] = cubeArray; } } return inputArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n \n Scanner myScanner;\n myScanner = new Scanner( System.in);\n System.out.print(\n \"Enter the number you would like cubed : \");\n \n //Accept user input\n \n double x = myScanner.nextDouble();\n \n //Random guess that the root is x/3\n \n double guess=x/3;\n \n //First guess\n double guess1=(2*guess*guess*guess+x)/(3*guess*guess);\n \n //Second guess\n guess=(2*guess1*guess1*guess1+x)/(3*guess1*guess1);\n \n //third guess\n guess1=(2*guess*guess*guess+x)/(3*guess*guess);\n \n //fourth guess\n guess=(2*guess1*guess1*guess1+x)/(3*guess1*guess1);\n \n //fifth guess\n guess1=(2*guess*guess*guess+x)/(3*guess*guess);\n \n \n System.out.print(\"The cube root is \"+(guess)+\" \");\n \n \n }", "public void setupGame() {\r\n // Create the Scanner object for reading input\r\n Scanner keyboard = new Scanner(System.in);\r\n \r\n boolean invalid = true;\r\n \r\n while (invalid) {\r\n System.out.println(\"Select a difficulty: \\n\");\r\n System.out.printf(\"1) Easy%n2) Medium%n3) Hard%n\");\r\n String difficulty = keyboard.nextLine();\r\n\r\n switch (difficulty) {\r\n case \"1\":\r\n invalid = false;\r\n this.grid = new Grid(8,8,8);\r\n this.runGame();\r\n break;\r\n case \"2\":\r\n invalid = false;\r\n this.grid = new Grid(10, 12, 10);\r\n this.runGame();\r\n break;\r\n case \"3\":\r\n invalid = false;\r\n this.grid = new Grid(16, 20, 50);\r\n this.runGame();\r\n break;\r\n default:\r\n System.out.println(\"Please enter a valid choice\");\r\n invalid = true;\r\n break;\r\n }\r\n }\r\n }", "private void generateCube() {\n\t\tverts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)};\n\t\tverts[0].setElement(0, -1);\n\t\tverts[0].setElement(1, -1);\n\t\tverts[0].setElement(2, -1);\n\t\t\n\t\tverts[1].setElement(0, 1);\n\t\tverts[1].setElement(1, -1);\n\t\tverts[1].setElement(2, -1);\n\t\t\n\t\tverts[2].setElement(0, -1);\n\t\tverts[2].setElement(1, -1);\n\t\tverts[2].setElement(2, 1);\n\t\t\n\t\tverts[3].setElement(0, 1);\n\t\tverts[3].setElement(1, -1);\n\t\tverts[3].setElement(2, 1);\n\t\t\n\t\tverts[4].setElement(0, -1);\n\t\tverts[4].setElement(1, 1);\n\t\tverts[4].setElement(2, -1);\n\t\t\n\t\tverts[5].setElement(0, 1);\n\t\tverts[5].setElement(1, 1);\n\t\tverts[5].setElement(2, -1);\n\t\t\n\t\tverts[6].setElement(0, -1);\n\t\tverts[6].setElement(1, 1);\n\t\tverts[6].setElement(2, 1);\n\t\t\n\t\tverts[7].setElement(0, 1);\n\t\tverts[7].setElement(1, 1);\n\t\tverts[7].setElement(2, 1);\n\t\t\n\t\tfaces = new int[][] {{0, 3, 2}, {0, 1, 3}, {0, 4, 5}, {0, 5, 1}, {0, 2, 6}, {0, 6, 4}, {2, 7, 6}, {2, 3, 7}, {3, 1, 5}, {3, 5, 7}, {4, 7, 5}, {4, 6, 7}}; // List the vertices of each face by index in verts. Vertices must be listed in clockwise order from outside of the shape so that the faces pointing away from the camera can be culled or shaded differently\n\t}", "public void runGame() {\r\n // Create the Scanner object for reading input\r\n Scanner keyboard = new Scanner(System.in);\r\n \r\n Grid.Status gridStatus = Grid.Status.OK;\r\n \r\n while (gridStatus.equals(Grid.Status.OK) && !userLost && !userQuit) {\r\n this.displayGrid();\r\n \r\n System.out.println(\"What next?\");\r\n System.out.println(\"Options: (U)ncover r c, (F)lag r c, (Q)uit\");\r\n String input = keyboard.nextLine();\r\n String[] inputChars = input.split(\"\\\\s+\");\r\n \r\n try { \r\n int row, col; \r\n switch (inputChars[0].toLowerCase()) {\r\n case \"u\":\r\n row = Integer.parseInt(inputChars[1]);\r\n col = Integer.parseInt(inputChars[2]);\r\n gridStatus = this.grid.uncoverSquare(row, col);\r\n break;\r\n case \"f\":\r\n row = Integer.parseInt(inputChars[1]);\r\n col = Integer.parseInt(inputChars[2]);\r\n this.grid.flagSquare(row, col);\r\n break;\r\n case \"q\":\r\n this.userQuit = true;\r\n break;\r\n default:\r\n System.out.println(\"You must select either u, f, or q as the first character.\");\r\n break;\r\n }\r\n } catch (NumberFormatException e) {\r\n System.out.println(\"You must enter a command in the format char digit digit (ie. u 3 3).\");\r\n } catch (ArrayIndexOutOfBoundsException err) {\r\n System.out.println(\"You must enter a command in the format char digit digit (ie. u 3 3).\");\r\n } catch (NullPointerException error) {\r\n System.out.println(\"You must enter a command in the format char digit digit (ie. u 3 3).\");\r\n }\r\n }\r\n \r\n if (userQuit) {\r\n this.quitGame();\r\n } else if (userLost || gridStatus.equals(Grid.Status.MINE)) {\r\n this.gameOver();\r\n this.playAgain();\r\n } else if (gridStatus.equals(Grid.Status.WIN)) {\r\n this.displayGrid();\r\n System.out.println(\"You won. Congrats!\");\r\n this.playAgain();\r\n }\r\n }", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n System.out.print(\"Welcome to Mafia\\n\" +\n \"Enter Number of players: \");\n if(scan.hasNextInt()) {\n int n = -1;\n while(n < 6){\n n = scan.nextInt();\n if(n<6) {\n System.out.println(\"Invalid Input.\");\n System.out.println(\"Enter Again:\");\n }\n }\n MafiaGame MG = new MafiaGame(n);\n MG.start();\n } else {\n System.out.println(\"Invalid Input\");\n }\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tcube();\r\n\t\t\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"enter a number: \");\r\n\t\tint x = scan.nextInt();\r\n\t\tcube(x);\r\n\r\n\t}", "public static void main(String[] args) {\n ModeReader modeReader = new ModeReader();\n LogoPrinter logoPrinter = new MagicCubeLogoPrinter();\n logoPrinter.printLogo();\n\n while (true) {\n int mode = modeReader.read();\n if (mode == -1) {\n continue;\n }else if(mode == 1) {\n System.exit(1);\n }\n CubeGame magicCube = new MagicCubeGame();\n magicCube.startGame();\n }\n }", "public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n\n final String gameType = scanner.nextLine();\n final int playerCount = scanner.nextInt();\n\n log.info(\"[{}] was selected.\", gameType);\n log.info(\"Player count is [{}].\", playerCount);\n\n final Game game = GameFactory.build(gameType, playerCount);\n\n game.populate();\n game.shuffle();\n game.deal();\n game.start();\n\n scanner.close();\n }", "public RubiksCube(int size) {\n this.size = size;\n faces = new Face[FACES_AMOUNT];\n for (int i = 0; i < FACES_AMOUNT; i++)\n faces[i] = new Face(size, i);\n }", "public void startFaceDetection() {\n /*\n r6 = this;\n r0 = r6.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x004a;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 == 0) goto L_0x004a;\n L_0x0008:\n r0 = r6.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x004a;\n L_0x000f:\n r0 = r6.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0049;\n L_0x0017:\n r0 = 1;\n r6.mFaceDetectionStarted = r0;\n r1 = r6.mCameraDevice;\n r2 = r6.mHandler;\n r3 = r6.mUI;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r6.mUI;\n r2 = r6.mDisplayOrientation;\n r3 = r6.isCameraFrontFacing();\n r4 = r6.mCameraId;\n r4 = r6.cropRegionForZoom(r4);\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r1.onStartFaceDetection(r2, r3, r4, r5);\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r6.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0049:\n return;\n L_0x004a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.PhotoModule.startFaceDetection():void\");\n }", "public static void main(String[] args) {\n \n Scanner myScanner; //declare scanner\n myScanner= new Scanner (System.in );\n System.out.print(\"Enter a double, and I print its cube root: \");//user inputs integer that they want to find cubed root of\n \n int x= myScanner.nextInt () ;\n \n double guess = x/3; //makes guess equal to the selected integer/3\n double guess1 = (guess*guess*guess+x)/(3*guess*guess);//reassigns value to guess\n double guess2 = (guess*guess*guess+x)/(3*guess*guess);//reassigns value to guess\n double guess3 = (guess*guess*guess+x)/(3*guess*guess);//reassigns value to guess\n double guess4 = (guess*guess*guess+x)/(3*guess*guess);//reassigns value to guess\n double guess5 = (guess*guess*guess+x)/(3*guess*guess);//reassigns value to guess\n \n \n //output\n System.out.println (\"The cube root is \"+guess5+\":\");\n System.out.println (guess5+\"*\"+guess5+\"*\"+guess5+\"= \"+(guess5*guess5*guess5));\n \n }", "public Game() {\n\t\tsc = new Scanner(System.in);\n\t}", "public WelcomeGame() {\r\n\t\tthis.input = new Scanner(System.in);\r\n\t}", "protected void scan(Scanner scanner) throws IllegalArgumentException {\n int verticesNumber = scanner.nextInt();\n\n if(validateVerticesNumber(verticesNumber)) {\n throw new IllegalArgumentException(INVALID_VERTEX_NUM);\n }\n this.verticesNumber = verticesNumber;\n\n int edgesNumber = scanner.nextInt();\n\n if(validateEdgesNumber(edgesNumber)) {\n throw new IllegalArgumentException(INVALID_EDGE_NUM);\n }\n initContainers(verticesNumber, edgesNumber);\n\n int from, to;\n for(int i = 0; i < edgesNumber; i++) {\n from = scanner.nextInt();\n to = scanner.nextInt();\n\n validateVertex(from);\n validateVertex(to);\n\n addEdge(from, to);\n }\n }", "@Test\r\n public void Test004TakeUserInputValid()\r\n {\r\n gol.input = new Scanner(new ByteArrayInputStream(\"1 1 2 2 2 3 2 4 -1\".getBytes()));\r\n gol.takeUserInput();\r\n assertTrue(gol.grid[1][1] == 1 && gol.grid[2][2] == 1 && gol.grid[2][3] == 1 && gol.grid[2][4] == 1);\r\n }", "static void trial4() {\n ModelBuilder modelBuilder = new ModelBuilder();\n Model cubeModel = modelBuilder.createBox(\n 5f,\n 5f,\n 5f,\n new Material( ColorAttribute.createDiffuse(Color.GREEN) ),\n Usage.Position);\n Mesh cubeMesh = cubeModel.meshes.get(0);\n\n // There are 36 vertex indices\n // I take it this is because there are 2 triangle per face\n // 3 x 2 x 6 = 36\n System.err.println(cubeMesh.getNumIndices());\n\n short[] cubeIndices = new short[36];\n cubeMesh.getIndices(cubeIndices);\n for (int i = 0; i < 36; i+=3) {\n for (int j = 0; j <= 2; j++) {\n System.err.printf(\"%3d \", cubeIndices[i+j]);\n }\n System.err.println();\n }\n\n }", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "void startGame() {\n System.out.println(\"What game do you want to play?\\n\" + \"1. Lotto\\n\" + \"2. Small Lotto\\n\" + \"3. Quit\");\n input = scanner.next();\n changeGame();\n }", "public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tString answer = \"y\";\n\t\tSystem.out.println(\"Learn your squares and cubes!\");\n\t\twhile (answer.equalsIgnoreCase(\"y\")) {\n\n\t\t\tSystem.out.println(\"Enter an Integer: \");\n\n\t\t\tint usernumber = sc.nextInt();\n\n\t\t\tfor (int i1 = 1; i1 <= usernumber; i1++) {\n\t\t\t\tSystem.out.println(i1 + \"Squared: \" + Math.pow(i1, 2) + \"Cubed \" + Math.pow(i1, 3));\n\t\t\t}\n\t\t\tSystem.out.println(\"Would you like to continue(enter y/n)\");\n\t\t\tanswer = sc.next();\n\t\t\tanswer = inputValidator(answer, sc);\n\t\t} // End of while loop\n\t\tSystem.out.println(\"System closing\");\n\t}", "public void startGame(){\n\t\tsc = new Scanner(System.in);\n\t\tgui.setScreenID(screenNumber);\n\t\tgui.start();\n\t}", "public static Puzzle inputToPuzzle() {\n Puzzle puzzle = new Puzzle();\n\n printInitialPromptMessage();\n final String choice = chooseCubeInputType();\n if (choice.equals(\"r\")) { // random set of cubes\n printRandomPromptMessage();\n puzzle = RandomController.getRandomPuzzle();\n\n } else { // user's choice of cubes\n printChoicePromptMessage();\n final String[][] inputArray = takeStdInput();\n puzzle = convertInputArrayToPuzzle(inputArray);\n }\n changeCubeInPuzzle(puzzle);\n // sc.close();\n\n return puzzle;\n }", "public static void main(String[] args) {\n FastReader sc = new FastReader(System.in);\n int r = sc.nextInt();\n int c = sc.nextInt();\n int i, j;\n int[][] a = new int[r][c];\n for (i = 0; i < r; i++) {\n for (j = 0; j < c; j++) {\n a[i][j] = sc.nextInt();\n }\n }\n int ans = 0;\n int[] dx = { 1, -1, 0, 0 };\n int[] dy = { 0, 0, 1, -1 };\n String[] dir = {\"D\",\"U\",\"R\",\"L\"};\n for (i = 0; i < r; i++) {\n for (j = 0; j < c; j++) {\n if (a[i][j] == 0) {\n // cell can be used to place light\n for (int k = 0; k < 4; k++) {\n int x = dx[k] + i;\n int y = dy[k] + j;\n if (isValid(x, y, r, c) && actorPresent(a,i,j,r,c,dir[k])) {\n ans++;\n }\n\n }\n }\n }\n }\n System.out.println(ans);\n }", "private static String getUserInput(Scanner scanner) {\n\t\tString stringGuess = \"\";\n\t\t//16\n while (true) {\n\t\t System.out.println(\"Enter a three-digit number guess:\");\n\t\t stringGuess = scanner.nextLine(); \n\t\t if (stringGuess.length() == 3){\n\t\t break;\n\t\t }\n\t\t}\n\t\treturn stringGuess;\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tN = sc.nextInt();\n\t\tK = sc.nextInt();\n\t\tcolors = new int[N + 1][N + 1];\n\t\tmarkers = new Marker[K + 1];\n\t\tmap = new ArrayList[N + 1][N + 1];\n\n\t\tfor (int c = 1; c <= N; c++) {\n\t\t\tfor (int r = 1; r <= N; r++) {\n\t\t\t\tcolors[c][r] = sc.nextInt();\n\t\t\t\tmap[c][r] = new ArrayList<Integer>();\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 1; i <= K; i++) {\n\t\t\tint y = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tint d = sc.nextInt();\n\t\t\tmarkers[i] = new Marker(i, x, y, d);\n\t\t\tmap[y][x].add(i);\n\t\t}\n\n\t\tplay();\n\t}", "public static void main(String args[] ) throws Exception {\n Scanner scanner = new Scanner(System.in);\n while (scanner.hasNext()) {\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int d = scanner.nextInt();\n countNumbersOfEachPolygons(a, b, c, d);\n }\n System.out.println(countRectangle + \" \" + countSquare + \" \" + countPolygon);\n }", "public static void userGuess() {\n\t\tSystem.out.println(\"It's time for you to guess. \");\n\t\tSystem.out.print(\"The computer will pick 4 numbers, each from 1 to 6: (\");\n\n\t\t// prints out all color options\n\t\tprintColor();\n\t\tSystem.out.println(\"You will try to guess what that exact sequence is in 12 tries, good luck!\");\n\t\tSystem.out.println(\"If you want to give up, enter 'quit' or 'exit'\");\n\t\tSystem.out.println(\"If you need a hint, enter 'hint'\");\n\t\tSystem.out.println(\"If you want some statistics, enter 'stats'\");\n\n\t\t// have computer pick random sequence\n\t\tRandom random = new Random();\n\t\tfor (int i = 0; i < NUM_COLOR_ROUND; i++) {\n\t\t\tcomputerCode[i] = random.nextInt(colors.length) + 1;\n\t\t}\n\n\t\t// scanner to input user data\n\t\ttry (Scanner scanner = new Scanner(System.in)) {\n\t\t\t// allows the user to input 12 guesses\n\t\t\twhile (totalGuess < MAX_GUESS) {\n\t\t\t\t// if you haven't entered 12 guesses allow more\n\t\t\t\tSystem.out.print(\"Please enter 4 numbers, each from 1 to 6: (\");\n\t\t\t\tprintColor();\n\n\t\t\t\t// reads the line into an array\n\t\t\t\tint[] user_guesses = new int[NUM_COLOR_ROUND];\n\t\t\t\tint index = 0;\n\t\t\t\twhile (index < NUM_COLOR_ROUND) {\n\t\t\t\t\t// reads the entire user input into a line\n\t\t\t\t\tString guess = scanner.nextLine();\n\n\t\t\t\t\t// check if user wants hint\n\t\t\t\t\tif (Objects.equals(\"hint\", guess)) {\n\t\t\t\t\t\thint();\n\t\t\t\t\t}\n\n\t\t\t\t\t// checks if user wants to quit\n\t\t\t\t\tif (Objects.equals(\"quit\", guess.toLowerCase()) || Objects.equals(\"exit\", guess.toLowerCase())) {\n\t\t\t\t\t\tSystem.out.println(\"You quit, better luck next time! \");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\n\t\t\t\t\t// checks if user wants stats\n\t\t\t\t\tif (Objects.equals(\"stats\", guess.toLowerCase())) {\n\t\t\t\t\t\tdisplayStats();\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (char ch : guess.toCharArray()) {\n\t\t\t\t\t\tif (index == NUM_COLOR_ROUND) {\n\t\t\t\t\t\t\t// if more than 4 digits are used, only the first 4 are entered into array\n\t\t\t\t\t\t\tSystem.out.println(\"Warning: only the first four digits are taken as your guess.\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ch > '0' && ch < '7') {\n\t\t\t\t\t\t\tuser_guesses[index++] = ch - '0';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tint digitLeft = NUM_COLOR_ROUND - index;\n\t\t\t\t\tif (digitLeft > 0) {\n\t\t\t\t\t\t// if <4 digits are entered, then the program asks the user to enter the\n\t\t\t\t\t\t// remaining to make 4\n\t\t\t\t\t\tSystem.out.println(String.format(\"Please enter %d more digits (1 to 6 only)\", digitLeft));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// total number of guesses so far\n\t\t\t\ttotalGuess++;\n\n\t\t\t\t// prints out total number of guesses so far\n\t\t\t\tSystem.out.println(\"Total number of guesses: \" + totalGuess);\n\t\t\t\t// prints out your guess\n\t\t\t\tSystem.out.println(\"Your guess is: \" + Arrays.toString(user_guesses));\n\n\t\t\t\t// checks if user wins, if not, gives feedback on their guess\n\t\t\t\tint[] result = compareGuess(computerCode, user_guesses);\n\t\t\t\tint numRightPos = result[0];\n\t\t\t\tint numWrongPos = result[1];\n\t\t\t\tif (numRightPos == NUM_COLOR_ROUND) {\n\t\t\t\t\tSystem.out.println(\"You win!\");\n\t\t\t\t\tstoreStats(totalGuess, fileName);\n\t\t\t\t\tdisplayStats();\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(String.format(\n\t\t\t\t\t\t\t\"Correct position and color (BLACK): %d; Wrong position but correct color (WHITE): %d\",\n\t\t\t\t\t\t\tnumRightPos, numWrongPos));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (totalGuess >= MAX_GUESS) {\n\t\t\t// if user has done 12 guesses, game is over\n\t\t\tSystem.out.println(\"You lose!\");\n\t\t\tSystem.out.println(\"Here is what computer generated: \" + Arrays.toString(computerCode));\n\t\t\tstoreStats(0, fileName);\n\t\t\tdisplayStats();\n\t\t}\n\t}", "public static boolean isFaceSolved(Cube cube, int face){\n\t\tif(countSquaresOnFace(cube, face) == 9) return true;\n\t\telse return false;\n\t}", "public void printCube(String title) {\n System.out.print(\"\\n\");\n System.out.println(\"[ \" + title + \" ]\");\n System.out.println(\" \" + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(1,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(2,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(3,1)));\n System.out.println(\" \" + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(1,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(2,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(3,2)));\n System.out.println(\" \" + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(1,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(2,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(3,3)));\n System.out.println(singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(1,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(2,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(3,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(1,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(2,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(3,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(1,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(2,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(3,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(1,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(2,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(3,1)));\n System.out.println(singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(1,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(2,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(3,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(1,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(2,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(3,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(1,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(2,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(3,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(1,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(2,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(3,2)));\n System.out.println(singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(1,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(2,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(3,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(1,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(2,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(3,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(1,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(2,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(3,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(1,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(2,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(3,3)));\n System.out.println(\" \" + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(1,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(2,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(3,1)));\n System.out.println(\" \" + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(1,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(2,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(3,2)));\n System.out.println(\" \" + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(1,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(2,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(3,3)));\n }", "public void startGame() {\n\t\tScanner input = new Scanner(System.in);\n\t\tString memorize = \"\";\n\t\tClearScreen Clr = new ClearScreen();\n\t\tboolean isNumberType = false;\n\t\tSystem.out.println(\"1. Decimal\" + \n\t\t\t\t\t\t \"\\n\" + \"2. Binary\" +\n\t\t\t\t\t\t \"\\n\" + \"3. Hexadecimal\");\n\t\twhile(numberType < 1 || numberType > 3) {\n\t\tSystem.out.println(\"Enter number type: \");\n\t\tnumberType = input.nextInt();\n\t\tif(numberType < 1 || numberType > 3)\n\t\t\tSystem.out.println(\"Incorrect number type\");\n\t\t}\n\t\twhile(numberAmt < 5) {\n\t\tSystem.out.println(\"Enter amount of numbers to memorize (5 or more): \");\n\t\tnumberAmt = input.nextInt();\n\t\tif(numberAmt < 5)\n\t\t\tSystem.out.println(\"Amount to memorize must be 5 or more\");\n\t\t}\n\t\tgetRandomNumber();\n\t\tprintRandomNumbers();\n\t\tSystem.out.print(\"Press anything to start memorizing\");\n\t\tinput.nextLine();\n\t\tinput.nextLine();\n\t\tClearScreen.Clear();\n\t\tenterAnswers();\n\t\tSystem.out.print(\"Press anything to see results\");\n\t\tinput.nextLine();\n\t\tClearScreen.Clear();\n\t\tgetCorrectAnswers();\n\t\tprintResults();\n\t\t\n\t\t\n\t}", "public void startFaceDetection() {\n /*\n r4 = this;\n r0 = r4.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x0036;\n L_0x0004:\n r0 = r4.mCameraDevice;\n if (r0 == 0) goto L_0x0036;\n L_0x0008:\n r0 = r4.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x0036;\n L_0x000f:\n r0 = r4.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0035;\n L_0x0017:\n r0 = 1;\n r4.mFaceDetectionStarted = r0;\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r4.mCameraDevice;\n r2 = r4.mHandler;\n r3 = 0;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r4.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0035:\n return;\n L_0x0036:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.startFaceDetection():void\");\n }", "public static int countSquaresOnFace(Cube cube, int face){\n\t\tint counter = 0;\n\t\tfor(int i = 0; i <3; i++){\n\t\t\tfor(int j = 0; j<3; j++){\n\t\t\t\tif(cube.getSquare(face, i, j) == cube.getSquare(face, 1, 1)){\n counter++;\n }\n\t\t\t}\n\t\t}\n\t\treturn counter;\n\t}", "public static void main(String[] args) {\n StdOut.println(\"Elven's Percolation Runner w/ Graphics\");\n StdOut.println(\"Due to graphics limitations, the max grid length is \" + maxN);\n StdOut.println(\"Please Enter Grid Length:\");\n if (N > maxN) {\n StdOut.println(\"max grid length exceeded, running at grid length = \" + maxN);\n }\n N = Math.min(StdIn.readInt(), maxN);\n StdOut.println(\"Which algorithm would you like to test?\");\n StdOut.println(\"1 : QuickFind\");\n StdOut.println(\"2 : QuickUnion\");\n StdOut.println(\"3 : WeightedQuickUnion\");\n StdOut.println(\"4 : WeightedQuickUnion w/ Path Compression\");\n StdOut.println(\"5 : Simulate all of the above\");\n StdOut.println(\"Please input the number corresponding to your chosen algorithm.\");\n int algSelection = StdIn.readInt();\n if (!(algSelection > 0 && algSelection < 6)) {\n StdOut.println(\"You have failed to enter a valid algorithm number, defaulting to simulating all algorithms\");\n algSelection = 1;\n }\n SQR_SIZE = 0.5 / N;\n StdOut.print(\"Input how many repetitions of algorithm #\"+algSelection+\" to simulate: \");\n reps = StdIn.readInt();\n\n //uses another array of algos for Confirmed Chosen Algorithm\n chosenAlg = new algos[1];\n switch (algSelection) {\n case 1:\n chosenAlg[0] = algos.QuickFind;\n break;\n case 2:\n chosenAlg[0] = algos.QuickUnion;\n break;\n case 3:\n chosenAlg[0] = algos.WeightedQuickUnion;\n break;\n case 4:\n chosenAlg[0] = algos.QuickUnionPathCompression;\n break;\n case 5:\n chosenAlg = new algos[4];\n chosenAlg[0] = algos.QuickFind;\n chosenAlg[1] = algos.QuickUnion;\n chosenAlg[2] = algos.WeightedQuickUnion;\n chosenAlg[3] = algos.QuickUnionPathCompression;\n break;\n }\n StdOut.println(\"GraphicsRunner currently running \" + reps+ \"reps of algorithm #\"+algSelection);\n\n //init's drawing field\n StdDraw.setCanvasSize(APPLICATION_SIZE, APPLICATION_SIZE);\n StdDraw.setPenColor(closedSite);\n StdDraw.filledSquare(APPLICATION_SIZE / 2, APPLICATION_SIZE / 2, APPLICATION_SIZE);\n\n long start, end;\n\n //runs through the chosenAlg[] runs\n for (algos currentAlg : chosenAlg) {\n start = System.currentTimeMillis();\n double total = 0;\n for (int j = 0; j < reps; j++) {\n total += calcPercolate(currentAlg);\n }\n end = System.currentTimeMillis();\n StdOut.println(currentAlg + \"\\nAverage Percolation Probability: \" + total / reps / (N * N));\n StdOut.println(\"Time Taken (with graphics): \" + (end - start) + \" ms\\n\");\n }\n }", "protected void processInputs()\n {\n while( InputInfo.size() > 0 )\n {\n InputInfo info = InputInfo.get();\n\n if( info.kind == 'k' && (info.action == GLFW_PRESS || \n info.action == GLFW_REPEAT) )\n {\n int code = info.code, mods = info.mods;\n // System.out.println(\"code: \" + code + \" mods: \" + mods );\n\n // keys to control the camera:\n\n\n // Uncomment below to restore some original controls\n\n // if( code == GLFW_KEY_LEFT && mods == 0 ) camera.shift( -amount, 0, 0 );\n // else if( code == GLFW_KEY_RIGHT && mods == 0 ) camera.shift( amount, 0, 0 );\n // else if( code == GLFW_KEY_DOWN && mods == 0 ) camera.shift( 0, -amount, 0 );\n // else if( code == GLFW_KEY_UP && mods == 0 ) camera.shift( 0, amount, 0 );\n // else if( (code == GLFW_KEY_PAGE_DOWN || code==GLFW_KEY_9) && mods == 0 ) camera.shift( 0, 0, -amount );\n // else if( (code == GLFW_KEY_PAGE_UP || code==GLFW_KEY_0) && mods == 0 ) camera.shift( 0, 0, amount );\n\n if( code == GLFW_KEY_DOWN && mods == 0 ) mySpeed--;\n else if( code == GLFW_KEY_UP && mods == 0 ) mySpeed++;\n else if( code == GLFW_KEY_LEFT && mods == 0) {\n camera.turn(camAziAmount);\n myCar.rotateBy(camAziAmount, 0, 0, 1);\n }\n else if( code == GLFW_KEY_RIGHT && mods == 0) {\n camera.turn(-camAziAmount);\n myCar.rotateBy(-camAziAmount, 0, 0, 1);\n }\n\n// else if( code == GLFW_KEY_MINUS && mods == 0 )\n// camera.turn( camAziAmount );\n// else if( code == GLFW_KEY_EQUAL && mods == 0 )\n// camera.turn( -camAziAmount );\n else if( code == GLFW_KEY_D && mods == 0 )\n camera.tilt( -camAltAmount );\n else if( code == GLFW_KEY_U && mods == 0 )\n camera.tilt( camAltAmount );\n\n // Launch a minicar (one at a time)\n else if ( code == GLFW_KEY_SPACE && mods == 0 ) launched++;\n // keys to control the fire pyramid\n \n else if( code == GLFW_KEY_A && mods == 0 )\n pyramid.translateBy( -1, 0, 0 );\n else if( code == GLFW_KEY_D && mods == 0 )\n pyramid.translateBy( 1, 0, 0 );\n else if( code == GLFW_KEY_X && mods == 0 )\n pyramid.translateBy( 0, -1, 0 );\n else if( code == GLFW_KEY_W && mods == 0 )\n pyramid.translateBy( 0, 1, 0 );\n else if( code == GLFW_KEY_Z && mods == 0 )\n pyramid.rotateBy( 3, 0, 0, 1 );\n else if( code == GLFW_KEY_C && mods == 0 )\n pyramid.rotateBy( -3, 0, 0, 1 );\n }// input event is a key\n\n else if ( info.kind == 'm' )\n {// mouse moved\n }\n\n else if( info.kind == 'b' )\n {// button action\n\n }// 'b' action\n\n }// loop to process all input events\n\n }", "public static void main(String[] args) throws IOException {\n\n int q = 2;//scanner.nextInt();\n //scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n //for (int qItr = 0; qItr < q; qItr++) {\n //String[] xyz = scanner.nextLine().split(\" \");\n\n /*int x = Integer.parseInt(xyz[0]);\n\n int y = Integer.parseInt(xyz[1]);\n\n int z = Integer.parseInt(xyz[2]);*/\n\n String result = catAndMouse(1, 3, 2);\n System.out.println(\"Winner is:\" + result);\n\n //bufferedWriter.write(result);\n //bufferedWriter.newLine();\n // }\n\n //bufferedWriter.close();\n\n //scanner.close();\n }", "public abstract void play(Game newFishGame, Scanner sc, int turnsCounter, int booksLimit);", "public static void runGame() {\n Scanner read = new Scanner(System.in);\n Random generator = new Random();\n \n //get username\n String userName = getUserName(read);\n\n //get number of rounds\n int rounds = getRounds(read, userName);\n \n //play the game!\n playGame(read, generator, userName, rounds);\n }", "public static void main(String[] args) {\n System.out.println(\"Welcome to the Paint Estimator!\");\n\n Estimator estimator = new Estimator();\n estimator.getSquareFeet();\n estimator.getPaintPrice();\n estimator.calculatePaintAndLabor();\n\n estimator.INPUT.close(); //close scanner\n\n }", "private void makeCubes(int number) {\n for (int i = 0; i < number; i++) {\n // randomize 3D coordinates\n Vector3f loc = new Vector3f(\n FastMath.nextRandomInt(-20, 20),\n FastMath.nextRandomInt(-20, 20),\n FastMath.nextRandomInt(-20, 20));\n rootNode.attachChild(\n myBox(\"Cube\" + i, loc, ColorRGBA.randomColor()));\n }\n }", "public static void main(String[] args) throws Exception {\n Scanner scanner = new Scanner(System.in);\n List<int[]> poly = new ArrayList<>();\n\n while (scanner.hasNext()) {\n String nums = scanner.nextLine();\n String[] checkEdge = nums.split(\" \");\n int[] num = new int[4];\n if (checkEdge.length != 4)\n throw new Exception(\"size must be 4\");\n for (int i = 0; i < 4; i++) {\n int result = Integer.parseInt(checkEdge[i]);\n num[i] = result;\n }\n poly.add(num);\n }\n\n countPolygons(poly);\n System.out.println(SQUARE + \" \" + RECTANGLE + \" \" + OTHER);\n }", "public QuestionsGame(Scanner input){\n //initialize questionTree by using content stored in input\n this.questionTree = this.readTree(input);\n }", "public static void main(String[] args) {\n char option;\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Welcome to MG's adventure world. Now your journey begins. Good luck!\");\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n String input = getInput(scan, \"Cc\");\n System.out.println(\"You are in a dead valley.\");\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n input = getInput(scan, \"Cc\");\n System.out.println(\"You walked and walked and walked and you saw a cave!\");\n cave();\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n input = getInput(scan, \"Cc\");\n System.out.println(\"You entered a cave!\");\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n input = getInput(scan, \"Cc\");\n System.out.println(\"Unfortunately, you ran into a GIANT!\");\n giant();\n System.out.println(\"Enter 'A' or 'a' to Attack, 'E' or 'E' to Escape, ANYTHING else is to YIELD\");\n input = getInput(scan, \"AaEe\", 10);\n System.out.println(\"Congratulations! You SURVIVED! Get your REWARD!\");\n System.out.println(\"There are three 3 tressure box in front of you! Enter the box number you want to open!\");\n box();\n input = getInput(scan);\n System.out.println(\"Hero! Have a good day!\");\n }", "private static Game load(Scanner in) {\r\n\t\tSystem.out.println(\"Enter the size of the table for the game:\");\r\n\t\tint size = Integer.parseInt(getCommand(in));\r\n\t\twhile(size < 3) {\r\n\t\t\tSystem.out.println(\"Insert a number > 3, please.\");\r\n\t\t\tsize = Integer.parseInt(getCommand(in));\r\n\t\t}\r\n\t\tGame game = new GameClass(size);\r\n\t\tSystem.out.println(\"Game instructions:\");\r\n\t\tSystem.out.println(\"W - Move up\");\r\n\t\tSystem.out.println(\"A - Move left\");\r\n\t\tSystem.out.println(\"S - Move down\");\r\n\t\tSystem.out.println(\"D - Move right\");\r\n\t\tSystem.out.println(\"XS - Exit game\");\r\n\t\tSystem.out.println();\r\n\t\treturn game;\r\n\t}", "private void screenWithUserInput(int input) {\n if(input == 1 || input == 2) {\n screenWithGivenValues(input, input + 3, 1 + 3, 2 + 3, 3 + 3, input, 0);\n }\n else if(input == 3) {\n screenWithGivenValues(input, input + 3, 100, 100, 100, input, 0);\n }\n }", "public static void main(String[] args) {\n\n /**\n * Creates scanner object.\n */\n Scanner scan = new Scanner(System.in);\n \n /**\n * Prompts for user input.\n */\n System.out.println(\"Enter the length of a side in integers: \");\n \n /**\n * Reads and stores user input.\n */\n int length = scan.nextInt();\n \n /**\n * Displays the surface area of the cube.\n */\n System.out.println(\"The surface area of the cube is: \" \n + (SA_COEFFICIENT + Math.pow(length, SA_POWER)));\n \n /**\n * Displays the volume of the cube.\n */\n System.out.println(\"The volume of the cube is: \"\n + Math.pow(length, CUBE_POWER));\n \n /**\n * Indicates that the program ran correctly.\n */\n System.out.println(\"Question four was called and ran sucessfully.\");\n \n /**\n * Closes Scanner.\n */\n scan.close();\n }", "public void getGamerInput() {\n\t\ttry {\n\t\t\tsCurrentCharInput = String.format(\"%s\", (consoleInput.readLine())).toUpperCase(Locale.getDefault());\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/* ************************************* */\n\t\tconsoleLog.println(\" \");\n\t\t// System.out.println(\" Quit readline \");\n\t\t/* ************************************* */\n\t\t// if (sCurrentCharInput.length() == 0)\n\t\t// continue;\n\n\t\t// if (sCurrentCharInput.contains(sAskedWord))\n\t\t// continue;\n\n\t}", "public static int countSquaresOnFace(Cube cube, int squareColor, int face){\n\t\tint counter = 0;\n\t\tfor(int i = 0; i <3; i++){\n\t\t\tfor(int j = 0; j<3; j++){\n\t\t\t\tif(cube.getSquare (face, i, j) == squareColor) counter++;\n\t\t\t}\n\t\t}\n\t\treturn counter;\n\t}", "void getVertices() {\r\n\t\tSystem.out.println(\"Enter your vertices:\");\r\n\t\tarrIndexToVertexMap = new HashMap<>();\r\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < numberOfVertices; i++) {\r\n\t\t\t\tarrIndexToVertexMap.put(i, sc.next());\r\n\t\t\t}\r\n\t\t\tsc.close();\r\n\t\t} catch (RuntimeException re) {\r\n\t\t\tSystem.out.println(\"Error at method:: getVertices || Description:\" + re);\r\n\t\t}\r\n\t}", "public interface FaceFinder {\n\n public CvFace[] detectFace(Bitmap bitmap);\n\n}", "public static Cube convertInputArrayToCube(final String[] inputArr) {\n final Color[] faces = new Color[Cube.NUM_OF_FACES];\n\n for (int i = 0; i < Cube.NUM_OF_FACES; i++) {\n switch (inputArr[i].toLowerCase()) {\n case \"red\":\n case \"r\":\n faces[i] = Color.RED;\n break;\n case \"orange\":\n case \"o\":\n faces[i] = Color.ORANGE;\n break;\n case \"green\":\n case \"g\":\n faces[i] = Color.GREEN;\n break;\n case \"blue\":\n case \"b\":\n faces[i] = Color.BLUE;\n break;\n case \"purple\":\n case \"p\":\n faces[i] = Color.PURPLE;\n break;\n case \"white\":\n case \"w\":\n faces[i] = Color.WHITE;\n break;\n }\n }\n return new Cube(faces[0], faces[1], faces[2], faces[3], faces[4], faces[5]);\n }", "public static void init() {\n\t\tscanner = new Scanner(System.in);\n\t\treturn;\n\t}", "public static void main(String[] args) throws IOException {\r\n\r\n // CREATE A NEW INSTANCE OF A SCANNER, WHICH\r\n // ALLOWS US TO ACCEPT INPUT FROM USERS\r\n input = new Scanner(System.in);\r\n\r\n // PRINT A WELCOME MESSAGE\r\n WelcomeMessage();\r\n\r\n // GET THE NUMBER OF PLAYERS\r\n player_count = GetNumberOfPlayers();\r\n\r\n // SET THE SIZE OF THE PLAYER ARRAY\r\n player = new Player[player_count];\r\n\r\n // SET PLAYER NAMES\r\n SetPlayerNames();\r\n\r\n // DEFAULT MAX # OF ROUNDS (CUSTOMIZABLE)\r\n max_rounds = 5;\r\n\r\n // CHOOSE GAME MODE\r\n ChooseMode();\r\n\r\n // CHOOSE A RANDOM PLAYER TO START\r\n System.out.println(\"Choosing who goes first...\\n\");\r\n next_player = (int)(Math.random() * (double)player_count);\r\n\r\n\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n // ~~~~~~~~~~~~~~MAIN LOOP~~~~~~~~~~~~~~\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\n\r\n // THIS LOOP RUNS THE WHOLE GAME\r\n while (rounds < max_rounds) {\r\n\r\n // \"PRESS ANY KEY TO CONTINUE\"\r\n System.out.println(\"Input to proceed...\");\r\n input.next();\r\n\r\n // SETUP A NEW ROUND\r\n StartNewRound();\r\n\r\n // THIS LOOP RUNS A SINGLE ROUND\r\n while (GetPlayersLeft() > 1) {\r\n\r\n\r\n // ~~~~~~~~~~~~~~~OBTAINING INPUT~~~~~~~~~~~~~~~\r\n\r\n\r\n // DID THEY SURVIVE?\r\n boolean survived = true;\r\n\r\n // DETECTS INPUT (LIGHTNING ROUND)\r\n boolean input_present = true;\r\n\r\n // PROMPT THE NEXT PLAYER\r\n System.out.println(player[next_player].GetName().toUpperCase() + \", IT IS YOUR TURN.\");\r\n System.out.print(\"Choose a number (0-9): \");\r\n\r\n // 3, 2, 1 SECS TO INPUT, VARIES INVERSELY WITH ROUND NUMBER (LIGHTNING ROUND)\r\n if (lightning_round) input_present = TimeInput(GetTimeFrame() );\r\n\r\n // STORE THE PLAYER'S CHOICE\r\n int choice = 0;\r\n\r\n // NO INPUT? NO MERCY (LIGHTNING ROUND)\r\n if (lightning_round && !input_present) {\r\n survived = false;\r\n System.out.println(\"NOT FAST ENOUGH!\");\r\n }\r\n // GET THEIR CHOICE\r\n else {\r\n choice = input.nextInt();\r\n input.nextLine();\r\n }\r\n\r\n // THIS HOLDS A MESSAGE IN CASE THEY CHOSE POORLY\r\n String message = \"\";\r\n\r\n\r\n // ~~~~~~~~~~~~~~~INTERPRETING CHOICE~~~~~~~~~~~~~~~\r\n\r\n\r\n if (choice == number) {\r\n // THEY PICKED THE MAGIC NUMBER\r\n survived = false;\r\n message = \"Tough luck!\";\r\n }\r\n else if (choice < 0) {\r\n // THEY PICKED A NUMBER TOO LOW (BELOW RANGE)\r\n survived = false;\r\n message = choice + \" was never an option...\";\r\n player[next_player].smart = true;\r\n System.out.println(\"Uh, OK...\");\r\n }\r\n else if (choice > 9) {\r\n // THEY PICKED A NUMBER TOO HIGH (ABOVE RANGE)\r\n survived = false;\r\n message = choice + \" was never an option...\";\r\n player[next_player].smart = true;\r\n System.out.println(\"Uh, OK...\");\r\n }\r\n else if (picked[choice]) {\r\n // THEY PICKED A NUMBER THAT HAD ALREADY BEEN PICKED\r\n survived = false;\r\n message = choice + \" has already been picked!\";\r\n player[next_player].smart = true;\r\n System.out.println(\"Uh, OK...\");\r\n }\r\n\r\n // GIVE SOME SPACE...\r\n System.out.println();\r\n\r\n\r\n // ~~~~~~~~~~~~~~~DETERMINING SURVIVAL~~~~~~~~~~~~~~~\r\n\r\n\r\n // THEY DIDN'T SURVIVE!\r\n if (!survived) {\r\n\r\n // LET THE USER KNOW THAT THEY FAILED\r\n System.out.println(\"( { K A B O O M } )\");\r\n System.out.println(player[next_player].GetName().toUpperCase() + \" HAS BEEN ELIMINATED.\");\r\n System.out.println(message);\r\n System.out.println();\r\n java.awt.Toolkit.getDefaultToolkit().beep(); // <-- BEEP!\r\n\r\n // REMEMBER THAT THEY LOST\r\n player[next_player].lost = true;\r\n\r\n // CHECK TO SEE IF THIS ENDED THE ROUND\r\n // AND PREP THE NEXT ROUND IF SO\r\n if (GetPlayersLeft() > 1) {\r\n SetNewNumber();\r\n ResetPickedNumbers();\r\n }\r\n }\r\n\r\n // THEY DID SURVIVE!\r\n else {\r\n // RECORD THAT THIS NUMBER IS NO LONGER AVAILABLE\r\n picked[choice] = true;\r\n\r\n // RANDOM CHANCE TO CLOWN ON THE PLAYER (2% CHANCE)\r\n if ((int) (Math.random() * 50) == 0) CheekyMessage();\r\n\r\n }\r\n\r\n // WHO'S NEXT?\r\n ChooseNextPlayer();\r\n }\r\n\r\n // INCREASE THE ROUND COUNT\r\n rounds++;\r\n System.out.println();\r\n\r\n // INCREASE SCORE AND RESET PLAYER STATES\r\n for (int i = 0; i < player_count; i++) {\r\n\r\n if (!player[i].lost) {\r\n // ADD A POINT TO THE WINNER\r\n player[i].score++;\r\n\r\n // LET EVERYONE KNOW WHO WON\r\n System.out.println(\"-----------------------------------------------\");\r\n System.out.println(player[i].GetName().toUpperCase() + \" WINS ROUND \" + rounds + \".\");\r\n System.out.println(\"-----------------------------------------------\");\r\n }\r\n\r\n // RESET THIS FOR THE NEXT ROUND\r\n player[i].lost = false;\r\n }\r\n\r\n // SHOW THE SCORES\r\n PrintScores();\r\n\r\n // MAKE SOME SPACE...\r\n System.out.println();\r\n\r\n // TAKE TOP TWO PLAYERS IN THE LAST ROUND AND START SUDDEN DEATH\r\n if ((player[player.length - 1].score == player[player.length - 2].score)\r\n && (rounds == max_rounds - 1) ) { SuddenDeath(); }\r\n }\r\n\r\n\r\n System.out.println(\"-----------------------------------------------\");\r\n System.out.println(player[player.length - 1].GetName().toUpperCase() + \" WINS THE GAME!!!\");\r\n System.out.println(\"-----------------------------------------------\");\r\n\r\n // THE GAME HAS ENDED\r\n System.out.println(\"!!! GAME OVER !!!\");\r\n }", "public InputReader() {\n reader = new Scanner(System.in);\n }", "private void start() {\n Scanner scanner = new Scanner(System.in);\n \n // While there is input, read line and parse it.\n String input = scanner.nextLine();\n TokenList parsedTokens = readTokens(input);\n }", "public UserInput()\n {\n try\n {\n scanner = new Scanner(System.in);\n input = new InputMethods();\n citiesTotal = new CityContainer();\n\n if(scanner != null)\n {\n askUser();\n }\n } catch(Exception ex)\n {\n }\n }", "public static void main(String[] args) {\n Scanner in = new Scanner(new BufferedReader(new StringReader(input)));\n\n long n = in.nextLong(); // Scanner has functions to read ints, longs, strings, chars, etc.\n for (int i = 0; i < n; i++) {\n int size = in.nextInt();\n int[][] matrix = new int[size][size];\n for (int j = 0; j < size; j++) {\n for (int k = 0; k < size; k++) {\n matrix[j][k] = in.nextInt();\n }\n }\n String result = vestigium(matrix, size);\n System.out.println(\"Case #\" + (i + 1) + \": \" + result);\n }\n }", "void insert_Cube() {\n\t\t\n\t\tif( end == n )\n\t\t\tSystem.out.println(\"Insertion not possible as Array is full.........\");\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(\"Enter side of Cube :-\");\n\t\t\tdouble side = sc.nextDouble();\n\t\t\t\t\n\t\t\ts[end]= new Cube(side);\n\t\t\t\t\n\t\t\tend++;\n\t\t}\n\t}", "public static void main(String[] args) throws QuickPickerException {\n int numberOfGames = DEFAULT_GAME_COUNT;\n\n if (args.length > 0) { // if user provided an arg, assume it to be a game count\n numberOfGames = Integer.parseInt(args[0]); // [0] is the 1st element!\n }\n\n // Supported game types\n for (SupportedGames game: SupportedGames.values()) {\n QuickPicker lotto = new QuickPicker(numberOfGames, game);\n lotto.displayTicket();\n }\n\n // unsupported game types\n QuickPicker lotto2 = new QuickPicker(numberOfGames, \"pick10\");\n lotto2.displayTicket();\n }", "public void readInput(Scanner inputScanner) throws RuntimeException {\n\n\t\tcolumns = inputScanner.nextInt();\n\t\trows = inputScanner.nextInt();\n\t\tinputScanner.nextLine(); // omit the newline\n\n\t\tcellMatrix = new Cell[rows][columns];\n\n\t\tfor (int row = 0; row < rows; row++) {\n\t\t\tfor (int col = 0; col < columns; col++) {\n\t\t\t\tString data = inputScanner.nextLine().trim().toUpperCase();\n\t\t\t\tint cellNumber = (row * columns) + col;\n\t\t\t\tcellMatrix[row][col] = new Cell(cellNumber, row, col, data);\n\t\t\t}\n\t\t}\n\t}", "private static void addInputs() {\n\t\tinput.put('A',\"All pixels, three LSB\");\n\t\tinput.put('B', \"All pixels, two LSB\");\n\t\tinput.put('C', \"Every even pixel, three LSB\");\n\t\tinput.put('D', \"Every odd pixel, three LSB\");\n\t\tinput.put('E', \"Every pixel, one LSB\");\n\t\tinput.put('F', \"Every even pixel, two LSB\");\n\t\tinput.put('G', \"Every odd pixel, two LSB\");\n\t\tinput.put('H', \"Every third pixel, three LSB\");\n\t\tinput.put('I', \"Every third pixel, two LSB\");\n\t\tinput.put('J', \"Every even pixel, one LSB\");\n\t\tinput.put('K', \"Every odd pixel, one LSB\");\n\t\tinput.put('L', \"Every third pixel, one LSB\");\n\t\tinput.put('M', \"Every prime-numbered pixel, three LSB\");\n\t\tinput.put('N', \"Every prime-numbered pixel, two LSB\");\n\t\tinput.put('O', \"Every prime-numbered pixel, one LSB\");\n\t}", "public static void main(String[] args) throws IOException {\n int boardSize = 0, startingPos = 0;\n\n // Prompt the user and store the results\n System.out.print(\"Enter board size (8 for 8x8 board): \");\n boardSize = getInt();\n System.out.format(\"Enter the beginning square (1 to %d): \", (boardSize * boardSize));\n startingPos = getInt();\n // Create a new board based on user specifications\n Board board = new Board(boardSize, startingPos);\n }", "public GameMainMenu(Scanner in) {\n this.in = in;\n }", "public TerminalGame()\n \t{\n \t\tsuper();\n \t\tbuilder = new StringBuilder();\n \t\tscanner = new Scanner(System.in);\n \t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"How many floors does your hotel have?\");\n\t\tint floors=scan.nextInt();\n\t\t\n\t\tSystem.out.println(\"How many rooms in each floor?\");\n\t\tint rooms=scan.nextInt();\n\t\n\t\tfor (int i = 1;i<=floors; i++) { // rows input from Scanner\n\n\t\t\tfor (int j =1;j<=rooms;j++) { // columns input from Scanner\n\t\t\t\n\t\t\tSystem.out.print(i+ \".\" + j + \" \");\n\t\t\t}\n System.out.println();\n\n\t}\n\t}", "public EvolutionWorld()\n {\n Scanner in = new Scanner(System.in);\n System.out.println(\"What Setting? (1,2,3)\");\n setting = in.nextInt();\n }", "void askForNumber(String spieler,String playerChoices) throws IOException;", "public void start(){ \r\n\t\tScanner in = new Scanner (System.in); \r\n\t\tSystem.out.println(\"Let's play Tic Tac Toe!\"); \r\n\t\tSystem.out.print(\"Who is the first player? Enter 1 for you, 0 for Computer\"); \r\n\t\tif (in.hasNextInt()){ \r\n\t\t\tcurrentTurn = in.nextInt(); \r\n\t\t\tif (currentTurn != 1 && currentTurn != 0){ \r\n\t\t\t\tSystem.out.println(\"Invalid Value entered. Default: Computer is first player.\"); \r\n\t\t\t\tcurrentTurn = 0; \r\n\t\t\t}\r\n\t\t}\r\n\t\telse { \r\n\t\t\tSystem.out.println(\"Invalid Value entered. Default: Computer is first player.\"); \r\n\t\t\tcurrentTurn = 0; \r\n\t\t}\r\n\t\tinitialize(); \r\n\t}", "public static void main(String[] args) {\n\t\tPoint pt = new Point(0,0);\n\t\tSquare sq = new Square(0.0);\n\t\tCube cb = new Cube(0.0);\n\t\t\n\t\t//get input for Point object\n\t\tpt.setX(Double.parseDouble(JOptionPane.showInputDialog(null, \"Enter value for X (Point Object): \")));\n\t\tpt.setY(Double.parseDouble(JOptionPane.showInputDialog(null, \"Enter value for Y (Point Object): \")));\n\t\t\n\t\t//get input for Square object\n\t\tsq.setX(Double.parseDouble(JOptionPane.showInputDialog(null, \"Enter value for X (Square Object): \")));\n\t\tsq.setY(Double.parseDouble(JOptionPane.showInputDialog(null, \"Enter value for Y (Square Object): \")));\n\t\tsq.setSideLength((Double.parseDouble(JOptionPane.showInputDialog(null, \"Enter value for side of square (Square Object): \"))));\n\t\t\n\t\t//get input for Cube object\n\t\tcb.setX(Double.parseDouble(JOptionPane.showInputDialog(null, \"Enter value for X (Cube Object): \")));\n\t\tcb.setY(Double.parseDouble(JOptionPane.showInputDialog(null, \"Enter value for Y (Cube Object): \")));\n\t\tcb.setDepth(Double.parseDouble(JOptionPane.showInputDialog(null, \"Enter depth of cube (Cube Object): \")));\n\t\t\n\t\t//show output for 3 objects\n\t\tSystem.out.println(\"\\nOutput from Point object\");\n\t\tSystem.out.println(pt.toString());\n\t\tSystem.out.println(\"\\nOutput from Square object\");\n\t\tSystem.out.println(sq.toString());\n\t\tSystem.out.println(\"\\nOutput from Cube object\");\n\t\tSystem.out.println(cb.toString());\n\t\t\n\t\tSystem.exit(0);\n\t}", "public static void getInput() {\n\t\tselectOption();\n\t\tsc = new Scanner(System.in);\n\t userInput2 = sc.nextInt();\n\t \n\t switch (userInput2) {\n\t \tcase 1: System.out.print(\"Enter the number for the factorial function: \");\n\t \t\t\tsc = new Scanner(System.in);\n\t\t\t\t userInput2 = sc.nextInt();\n\t\t\t\t System.out.println(\"The factorial of \" + userInput2 + \" is \" + factorial(userInput2));\n\t\t\t\t getInput();\n\t\t \t\tbreak;\n\t \tcase 2: System.out.print(\"Enter the Fibonacci position: \");\n\t\t\t\t\tsc = new Scanner(System.in);\n\t\t\t\t userInput2 = sc.nextInt();\n\t\t\t\t System.out.println(\"The fibonacci number at position \" + userInput2 + \" is \" + fib(userInput2));\n\t\t\t\t getInput();\n\t\t \t\tbreak;\n\t \tcase 3: System.out.print(\"Enter the first number: \");\n\t\t\t\t\tsc = new Scanner(System.in);\n\t\t\t\t userInput2 = sc.nextInt();\n\t\t\t\t System.out.print(\"Enter the second number: \");\n\t\t\t\t sc = new Scanner(System.in);\n\t\t\t\t userInput3 = sc.nextInt();\n\t\t\t\t System.out.println(\"The GCD of the numbers \" + userInput2 + \" and \" + userInput3 + \" is \" + GCD(userInput2, userInput3));\n\t\t\t\t getInput();\n\t\t \t\tbreak;\n\t \tcase 4: System.out.print(\"Enter n: \");\n\t\t\t\t\tsc = new Scanner(System.in);\n\t\t\t\t userInput2 = sc.nextInt();\n\t\t\t\t System.out.print(\"Enter r: \");\n\t\t\t\t sc = new Scanner(System.in);\n\t\t\t\t userInput3 = sc.nextInt();\n\t\t\t\t System.out.println(userInput2 + \" choose \" + userInput3 + \" is \" + choose(userInput2, userInput3));\n\t\t\t\t getInput();\n\t\t \t\tbreak;\n\t \tcase 5: System.out.print(\"Enter n: \");\n\t\t\t\t\tsc = new Scanner(System.in);\n\t\t\t\t userInput2 = sc.nextInt();\n\t\t\t\t System.out.print(\"Enter k: \");\n\t\t\t\t sc = new Scanner(System.in);\n\t\t\t\t userInput3 = sc.nextInt();\n\t\t\t\t System.out.println(\"The Josephus of \" + userInput2 + \" and \" + userInput3 + \" is \" + josephus(userInput2, userInput3));\n\t\t\t\t getInput();\n\t\t \t\tbreak;\n\t \tcase 6: System.out.println(\"Ending program...\");\n \t\t\t\tSystem.exit(0);\n \t\t\t\tbreak;\n \t\tdefault: System.out.println(\"\\nPlease enter number between 1 and 6\\n\");\n\t \t\t\tgetInput();\n\t \t\t\tbreak;\n\t }\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"Welcome to...\");\n\t\tSystem.out.println(\" .--. .-. .-. .---. ,-. .---. .-. .-. \\r\\n\"\n\t\t\t\t+ \"|\\\\ /| / /\\\\ \\\\ | \\\\| | ( .-._)|(|/ .-. ) | \\\\| | \\r\\n\"\n\t\t\t\t+ \"|(\\\\ / |/ /__\\\\ \\\\| | | (_) \\\\ (_)| | |(_)| | | \\r\\n\"\n\t\t\t\t+ \"(_)\\\\/ || __ || |\\\\ | _ \\\\ \\\\ | || | | | | |\\\\ | \\r\\n\"\n\t\t\t\t+ \"| \\\\ / || | |)|| | |)|( `-' ) | |\\\\ `-' / | | |)| \\r\\n\"\n\t\t\t\t+ \"| |\\\\/| ||_| (_)/( (_) `----' `-' )---' /( (_) \\r\\n\"\n\t\t\t\t+ \"'-' '-' (__) (_) (__) \");\n\t\tSystem.out.println(\" ,---. .---. ,--, .--. ,---. ,---. \\r\\n\"\n\t\t\t\t+ \" | .-' ( .-._).' .') / /\\\\ \\\\ | .-.\\\\ | .-' \\r\\n\"\n\t\t\t\t+ \" | `-. (_) \\\\ | |(_) / /__\\\\ \\\\| |-' )| `-. \\r\\n\"\n\t\t\t\t+ \" | .-' _ \\\\ \\\\ \\\\ \\\\ | __ || |--' | .-' \\r\\n\"\n\t\t\t\t+ \" | `--.( `-' ) \\\\ `-. | | |)|| | | `--. \\r\\n\"\n\t\t\t\t+ \" /( __.' `----' \\\\____\\\\|_| (_)/( /( __.' \\r\\n\"\n\t\t\t\t+ \"(__) (__) (__) \");\n\n\t\tScanner sc = new Scanner(System.in); //new instance of Scanner is created\n\t\tString input = \"\";\n\t\tdo {\n\t\t\tSystem.out.print(\"\\nType Y for a New Game or N to Exit: \");\n\t\t\tinput = sc.next();\n\t\t} while (!input.equalsIgnoreCase(\"y\") && !input.equalsIgnoreCase(\"n\")); //end of do while loop to check if valid input is entered\n\n\t\tif (input.equalsIgnoreCase(\"n\")) {\n\t\t\tSystem.out.println(\"Exiting...\");\n\t\t\tSystem.exit(0);\n\t\t} //end of if statement to check if the input was to exit the game.\n\t\tSystem.out.println(\"New Game Selected!\");\n\t\tStartAdventure game = new StartAdventure(); //new instance of StartAdventure called game\n\n\t\tPlayer player = new Player(); //creation of new Player instance called player\n\t\tSystem.out.print(\"Player name: \");\n\t\tString name = sc.next();\n\t\tplayer.setName(name); //name of player is set\n\t\t\n\n\t\t// 1 player game\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nNEW GAME STARTED\");\n\t\t\tString command = \"\";\n\t\t\tint roomNum = 1;\n\t\t\tgame.setRoomNumber(roomNum); //first room is set when new game starts\n\t\t\tboolean flashlight = false;\n\t\t\tboolean bottle = false;\n\t\t\tboolean pipe = false;\n\t\t\tboolean keyCar = false;\n\t\t\tboolean keyHall = false;\n\t\t\tboolean[] inventory = { flashlight, bottle, pipe, keyCar, keyHall }; //array of booleans is created for item inventory\n\t\t\tplayer.setInventory(inventory); //inventory is set in player\n\t\t\tEnemy enemy1 = new Enemy(); //creation of first Enemy instance\n\t\t\tEnemy enemy2 = new Enemy(); //creation of second Enemy instance\n\n\t\t\tdo {\n\t\t\t\tif (game.getRoomNumber() == 1) {\n\t\t\t\t\tSystem.out.println(game.getRoomDescription(player.getInventory(), null)); //getRoomDescription is called with current inventory and current enemy\n\t\t\t\t\tSystem.out.print(\"Type 'help' for a list of commands.\\n\");\n\t\t\t\t\tdo {\n\t\t\t\t\t\tcommand = sc.nextLine();\n\t\t\t\t\t\tinventory = game.lobbyRoom(command, player.getInventory(), player); //lobbyRoom is called to deal with command, output is put in inventory\n\t\t\t\t\t\tplayer.setInventory(inventory); //new inventory is set in player\n\t\t\t\t\t} while (game.getRoomNumber() == 1); //end of do while that determines if command prompt is looped while the player is still in room 1\n\t\t\t\t}//end of if statement that determines if player is in room 1\n\n\t\t\t\tif (game.getRoomNumber() == 2) {\n\t\t\t\t\tSystem.out.println(game.getRoomDescription(player.getInventory(), null)); //getRoomDescription is called with current inventory and current enemy\n\t\t\t\t\tSystem.out.print(\"Type 'help' for a list of commands.\\n\");\n\t\t\t\t\tdo {\n\t\t\t\t\t\tcommand = sc.nextLine();\n\t\t\t\t\t\tinventory = game.barRoom(command, player.getInventory(), player); //barRoom is called to deal with command, output is put in inventory\n\t\t\t\t\t\tplayer.setInventory(inventory); //new inventory is set in player\n\t\t\t\t\t} while (game.getRoomNumber() == 2);//end of do while that determines if command prompt is looped while the player is still in room 2\n\t\t\t\t}//end of if statement that determines if player is in room 2\n\n\t\t\t\tif (game.getRoomNumber() == 3) {\n\t\t\t\t\tSystem.out.println(game.getRoomDescription(player.getInventory(), enemy1)); //getRoomDescription is called with current inventory and current enemy\n\t\t\t\t\tSystem.out.print(\"Type 'help' for a list of commands.\\n\");\n\t\t\t\t\tdo {\n\t\t\t\t\t\tcommand = sc.nextLine();\n\t\t\t\t\t\tinventory = game.kitchenRoom(command, player.getInventory(), player, enemy1); //kitchenRoom is called to deal with command, output is put in inventory\n\t\t\t\t\t\tplayer.setInventory(inventory); //new inventory is set in player\n\t\t\t\t\t} while (game.getRoomNumber() == 3);//end of do while that determines if command prompt is looped while the player is still in room 3\n\t\t\t\t}//end of if statement that determines if player is in room 3\n\n\t\t\t\tif (game.getRoomNumber() == 4) {\n\t\t\t\t\tSystem.out.println(game.getRoomDescription(player.getInventory(), null)); //getRoomDescription is called with current inventory and current enemy\n\t\t\t\t\tSystem.out.print(\"Type 'help' for a list of commands.\\n\");\n\t\t\t\t\tdo {\n\t\t\t\t\t\tcommand = sc.nextLine();\n\t\t\t\t\t\tinventory = game.bedRoom(command, player.getInventory(), player); //bedRoom is called to deal with command, output is put in inventory\n\t\t\t\t\t\tplayer.setInventory(inventory); //new inventory is set in player\n\t\t\t\t\t} while (game.getRoomNumber() == 4);//end of do while that determines if command prompt is looped while the player is still in room 4\n\t\t\t\t}//end of if statement that determines if player is in room 4\n\n\t\t\t\tif (game.getRoomNumber() == 5) {\n\t\t\t\t\tSystem.out.println(game.getRoomDescription(player.getInventory(), null)); //getRoomDescription is called with current inventory and current enemy\n\t\t\t\t\tSystem.out.print(\"Type 'help' for a list of commands.\\n\");\n\t\t\t\t\tdo {\n\t\t\t\t\t\tcommand = sc.nextLine();\n\t\t\t\t\t\tinventory = game.bathRoom(command, player.getInventory(), player); //bathRoom is called to deal with command, output is put in inventory\n\t\t\t\t\t\tplayer.setInventory(inventory); //new inventory is set in player\n\t\t\t\t\t} while (game.getRoomNumber() == 5);//end of do while that determines if command prompt is looped while the player is still in room 5\n\t\t\t\t}//end of if statement that determines if player is in room 5\n\n\t\t\t\tif (game.getRoomNumber() == 6) {\n\t\t\t\t\tSystem.out.println(game.getRoomDescription(player.getInventory(), enemy2)); //getRoomDescription is called with current inventory and current enemy\n\t\t\t\t\tSystem.out.print(\"Type 'help' for a list of commands.\\n\");\n\t\t\t\t\tdo {\n\t\t\t\t\t\tcommand = sc.nextLine();\n\t\t\t\t\t\tinventory = game.outsideRoom(command, player.getInventory(), player, enemy2); //outsideRoom is called to deal with command, output is put in inventory\n\t\t\t\t\t\tplayer.setInventory(inventory); //new inventory is set in player\n\t\t\t\t\t} while (game.getRoomNumber() == 6);//end of do while that determines if command prompt is looped while the player is still in room 6\n\t\t\t\t}//end of if statement that determines if player is in room 6\n\n\t\t\t} while (game.getRoomNumber() != 0); //end of do while loop that determines if player is still in rooms/game\n\n\t\t\t\tdo {\n\t\t\t\t\tSystem.out.print(\"Game Over. Type Y to Play Again or N to Exit: \");\n\t\t\t\t\tinput = sc.next();\n\t\t\t\t} while (!input.equalsIgnoreCase(\"y\") && !input.equalsIgnoreCase(\"n\"));//end of do while that determines if input is valid\n\n\t\t\t\tif (input.equalsIgnoreCase(\"n\")) {\n\t\t\t\t\tSystem.out.println(\"Exiting...\");\n\t\t\t\t\tSystem.out.println(\"Game Exited!\");\n\t\t\t\t\tSystem.exit(0); //program exit\n\t\t\t\t}//end of if statement that exits the game if the input was n\n\t\t\t\n\t\t} while (input.equalsIgnoreCase(\"y\")); //end of do while loop that handles new game looping\n\t\t\n\t\tSystem.out.println(\"Exiting...\");\n\t\tSystem.out.println(\"Game Exited!\");\n\t\tSystem.exit(0); //program exit\n\n\t}", "public static void main(String[] args){\n Box[] boxes = {new Box1(),new Box2(), new Box3(),new Box4(),new Box5() };\n int length =15;\n int width =20;\n int height =25;\n for (Box box:boxes\n ) {if(box.validate(length,width,height)){\n System.out.println(box.name );\n break;\n }\n\n }\n\n\n\n\n /*Scanner scan = new Scanner(System.in);\n System.out.println(\"Please enter a number:\");\n int length = Integer.parseInt(scan.next());\n System.out.println(\"Please enter a number:\");\n int width = Integer.parseInt(scan.next());\n System.out.println(\"Please enter a number:\");\n int height = Integer.parseInt(scan.next());\n System.out.println(\"length: \" + length + \", width: \" + width + \", height: \" + height);\n if (box3.validate(length, width, height)) {\n System.out.println(box3.getName());\n }*/\n\n\n }", "void doScanner() {\r\n\t\tsetTurnRadarLeftRadians(2 * PI);\r\n\t}", "public final static void play()\n\t{\n\t\tDatabase.resetForNewGame();\n\n\n\t\tclearConsole();\n\t\tint playerOnePoints = 0, playerTwoPoints = 0, matrixSize=0, userChoise=0;\n\t\tString playerOneName, playerTwoName;\n\t\tchar controller;\n\n\n\t\tSystem.out.println(\"LET THE GAME BEGIN!\");\n\t\tSystem.out.println(\"Please type players' names: \");\n\n\t\t/**\n\t\t * Asks for player's names and Galaxy size.\n\t\t * */\n\t\tdo\n\t\t{\n\t\t\tSystem.out.println(\"Player One: \");\n\t\t\tplayerOneName=Global.sc.next(\"\\\\w+\");\n\t\t\tSystem.out.println(\"Player Two: \");\n\t\t\tplayerTwoName=Global.sc.next(\"\\\\w+\");\n\t\t\tif ((!checkNames(playerOneName, playerTwoName)))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Error. Please enter names with no marks and spaces, different first letter or less length.: \");\n\t\t\t}\n\t\t} while(!checkNames(playerOneName, playerTwoName));\n\t\tclearConsole();\n\t\tSystem.out.println(\"Please choose galaxy size: \");\n\t\tSystem.out.println(\"[1] Small\");\n\t\tSystem.out.println(\"[2] Large\");\n\t\tuserChoise=Global.sc.nextInt();\n\t\twhile(userChoise!=1&&userChoise!=2)\n\t\t{\n\t\t\tSystem.out.println(\"Wrong number. Please enter again: \");\n\t\t\tuserChoise=Global.sc.nextInt();\n\t\t}\n\t\tif (userChoise==1) {\n\t\t\tmatrixSize=GameConstants.smallMatrixSize;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tmatrixSize=GameConstants.largeMatrixSize;\n\t\t}\n\n\t\t/**\n\t\t * Creates the Galaxy and player's coordinates.\n\t\t * */\n\t\tGalaxy galaxy = new Galaxy(matrixSize);\n\t\tPlayerOne playerOneCol=new PlayerOne();\n\t\tPlayerOne playerOneRow=new PlayerOne();\n\t\tPlayerTwo playerTwoRow=new PlayerTwo(matrixSize);\n\t\tPlayerTwo playerTwoCol=new PlayerTwo(matrixSize);\n\t\t/**\n\t\t * Creates TemporaryChar which will hold a potential symbol ('8'/'+'/'*') of a question.\n\t\t * */\n\t\tTemporaryChar temp = new TemporaryChar();\n\t\tgalaxy.putStars(matrixSize);\n\t\tgalaxy.putPlayers(playerOneName, playerTwoName, matrixSize);\n\n\n\t\t//GAME BEGINS\n\n\n\n\t\tdo\n\t\t{\n\t\t\t//First player\n\n\n\t\t\tclearConsole();\n\t\t\tdisplayPlayerInfo(playerOneName, playerOnePoints, playerTwoName, playerTwoPoints);\n\t\t\tgalaxy.printMatrix(matrixSize);\n\t\t\tSystem.out.print(playerOneName);\n\t\t\tSystem.out.print(\", please make a move: \");\n\n\t\t\tcontroller=Global.sc.next(\".\").charAt(0);\n\n\t\t\tmovePlayer(galaxy,temp, controller, playerOneRow, playerOneCol);\n\n\t\t\t//Throws exception if player has tried to move on the other player's position.\n\t\t\tif (playerOneRow.coordinate == playerTwoRow.coordinate&&playerOneCol.coordinate ==playerTwoCol.coordinate)\n\t\t\t{\n\t\t\t\tthrow new ArrayIndexOutOfBoundsException();\t\n\t\t\t}\n\t\t\tplayerOnePoints+=pointsToAdd(temp);\n\t\t\tclearConsole();\n\t\t\tdisplayPlayerInfo(playerOneName, playerOnePoints, playerTwoName, playerTwoPoints);\n\t\t\tgalaxy.printMatrix(matrixSize);\n\n\t\t\t//Checks if there are any stars.\n\t\t\tif(!galaxy.checkForRemainingStars(matrixSize)) break;\n\n\n\n\n\n\t\t\t//Second player\n\n\n\t\t\tclearConsole();\n\t\t\tdisplayPlayerInfo(playerOneName, playerOnePoints, playerTwoName, playerTwoPoints);\n\t\t\tgalaxy.printMatrix(matrixSize);\n\t\t\tSystem.out.print(playerTwoName);\n\t\t\tSystem.out.print(\", please make a move: \");\n\n\t\t\tcontroller=Global.sc.next(\".\").charAt(0);\n\n\t\t\tmovePlayer(galaxy,temp, controller, playerTwoRow, playerTwoCol);\n\n\t\t\tif (playerOneRow.coordinate == playerTwoRow.coordinate&&playerOneCol.coordinate ==playerTwoCol.coordinate)\n\t\t\t{\n\t\t\t\tthrow new ArrayIndexOutOfBoundsException();\t\n\t\t\t}\n\t\t\tplayerTwoPoints+=pointsToAdd(temp);\n\t\t\tclearConsole();\n\t\t\tdisplayPlayerInfo(playerOneName, playerOnePoints, playerTwoName, playerTwoPoints);\n\t\t\tgalaxy.printMatrix(matrixSize);\n\t\t} while (galaxy.checkForRemainingStars(matrixSize));\n\n\n\n\n\t\tif (playerOnePoints > playerTwoPoints)\n\t\t{\n\t\t\tSystem.out.print(playerOneName);\n\t\t\tSystem.out.println(\" wins!\");\n\t\t}\n\t\telse if (playerOnePoints < playerTwoPoints)\n\t\t{\n\t\t\tSystem.out.print(playerTwoName);\n\t\t\tSystem.out.println(\" wins!\");\n\t\t}\n\t\telse System.out.println(\"It's a draw!\");\n\n\t\tpressAnyKeyToContinue();\n\t\tshowMenu();\n\n\n\t}", "void showFaithCube(FamilyColor familyColor, int cardOrdinal);", "public static void runGame() {\n //Create instance of Datacontroller for sample data\n DataController dataController = DataController.getInstance();\n Encounter encounter;\n Scanner scan = new Scanner( System.in);\n\n int commandNum; //Variable that determines state of game\n\n while(true) {\n //TODO: Enter list of options for movement at every iteration\n System.out.println(\"Please enter your command\");\n System.out.println(\"1. Exit Game\\n2. Enter Combat\\n3. Items\");\n commandNum = scan.nextInt();\n\n switch (commandNum) {\n case 1: //Exit Game\n return;\n case 2: // Join Controller.Encounter\n encounter = new Encounter(dataController.getPlayer(),dataController.getEnemy());\n try {\n encounter.startFight();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n break;\n case 3: // View Menu TODO: create menu class\n\n }\n }\n }", "public RubiksCube(){\n\t\tString[] c = {\n\t\t\t\t\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\n\t\t\t\t\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\n\t\t\t\t\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\n\t\t\t\t\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\n\t\t\t\t\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\n\t\t\t\t\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\n\t\t};\n\t\tthis.cube = c;\n\t}", "public void initialGame()\t{\n\t\tinput = new Scanner(System.in);\n\t\ttop = deck1.deal();\n\t\tfor(int j=0;j<numPlayers;j++)\t{\n\t\t\tSystem.out.println(\"Enter player\" + (j+1) + \"'s name:\");\n\t\t\thand[j] = new Hand(input.nextLine());\n\t\t\tfor(int i=0;i<INITIAL_DEAL;i++)\t{\n\t\t\t\thand[j].addCard(deck1.deal());\n\t\t\t}\n\t\t\trecord[j] = \"\";\n\t\t}\n\t\tSystem.out.println(\"\\n------------------\\n\");\t\n\t}", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint next = scanner.nextInt();\n\t\tprintCircle(next);\n\t}", "public void takeInput() {\n\t\tboolean flag = true;\n\t\tMain test = new Main();\n\t\twhile(flag) {\n\t\t\tLOGGER.info(\"Enter an option 1.Calculate Simple Interest 2.Calculate Compound Interest 3.exit\");\n\t\t\tint val = sc.nextInt();\n\t\t\tswitch(val) {\n\t\t\tcase 1:\n\t\t\t\ttest.takeInputForSimpleInterest();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ttest.takeInputForCompoundInterest();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tflag = false;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tLOGGER.info(\"Enter valid input\");\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "@Test\r\n public void Test005TakeUserInputInValidRow()\r\n {\r\n gol.input = new Scanner(new ByteArrayInputStream(\"20 1 2 2 2 3 2 4 -1\".getBytes()));\r\n gol.takeUserInput();\r\n assertTrue(gol.grid[2][3] == 1 && gol.grid[2][2] == 1 && gol.grid[2][3] == 1 && gol.grid[2][4] == 1);\r\n }", "public MyInput() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t}", "public Ch12Ex1to9()\n {\n scan = new Scanner( System.in );\n }", "public FractalParser(java_cup.runtime.Scanner s) {super(s);}", "protected void runGame() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tthis.getRndWord(filePosition);\n\t\twhile((! this.word.isFinished()) && (this.numOfWrongGuess <= this.allowance)) {\n\t\t\tthis.showInfo();\n\t\t\tthis.tryGuess(this.getGuessLetter(sc));\n\t\t}\n\t\tif (this.word.isFinished()) {\n\t\t\tthis.showStat();\n\t\t}else {\n\t\t\tthis.showFacts();\n\t\t}\n\t\tsc.close();\n\n\n\t}", "static void gatherInfo() {\n Scanner keyboard = new Scanner(System.in);\n System.out.print(\"Enter the type of measurement (inches, feet, etc.). >> \");\n measurementType = keyboard.nextLine();\n System.out.print(\"Enter the rectangle width. >> \");\n height = keyboard.nextDouble();\n System.out.print(\"Enter the rectangle height. >> \");\n width = keyboard.nextDouble();\n }", "public void getInput(){\n\t\tScanner scan= new Scanner(System.in);\n\t\t//Get the range\n\t\tif(scan.hasNext()){\n\t\t\tcount=Integer.parseInt(scan.nextLine()); \n\t\t}\n\t\t//Initialize the array\n\t\tpeople = new People[count];\n\t\t//Get the array elements\n\t\tint i=0;\n\t\twhile(i<count){\n\t\t\tString lin[] = scan.nextLine().split(\" \");\n\t\t\tpeople[i] = new People(Integer.parseInt(lin[0]), Double.parseDouble(lin[1]));\n\t\t\ti++;\n\t\t}\n\t\t\n\t\t\n\t}", "private static void ownerLoop() \n {\n boolean exit = false;\n Scanner input = new Scanner(System.in);\n\n while (!exit) {\n displayOwner();\n\n String[] tokens = input.nextLine().toLowerCase().split(\"\\\\s\");\n char option = tokens[0].charAt(0);\n char dataOpt = 0;\n\n if (tokens.length == 2)\n dataOpt = tokens[1].charAt(0);\n\n switch(option) {\n case 'o': occupancyMenu();\n break;\n case 'd': revenueData();\n break;\n case 's': browseRes();\n break;\n case 'r': viewRooms();\n break;\n case 'b': exit = true;\n break;\n }\n }\n }", "private void continueGame() {\n System.out.println(\"\\n\" + \"Do you want to play more games or quit?\\n\" + \"1. Lotto\\n\" + \"2. Small Lotto\\n\" + \"3. Quit\");\n input = scanner.next();\n changeGame();\n }", "public static void main(String[] args) {\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tCharm charm = new Charm();\n\t\tSystem.out.print(\"Point of face : \");\n\t\tint face = in.nextInt();\n\t\tboolean bool = charm.isCondition(face);\n\t\twhile (!bool) {\n\t\t\tSystem.out.println(\"Input between 0 - 10 \");\n\t\t\tface = in.nextInt();\n\t\t\tbool = charm.isCondition(face);\n\t\t}\n\t\t\n\t\t//2\n\t\tSystem.out.print(\"Point of rich : \");\n\t\tint rich = in.nextInt();\n\t\tbool = charm.isCondition(rich);\n\t\twhile (!bool) {\n\t\t\tSystem.out.println(\"Input between 0 - 10 \");\n\t\t\trich = in.nextInt();\n\t\t\tbool = charm.isCondition(rich);\n\t\t}\n\t\t\n\t\t//3\n\t\tSystem.out.print(\"Point of nature : \");\n\t\tint nature = in.nextInt();\n\t\tbool = charm.isCondition(nature);\n\t\twhile (!bool) {\n\t\t\tSystem.out.println(\"Input between 0 - 10 \");\n\t\t\tnature = in.nextInt();\n\t\t\tbool = charm.isCondition(nature);\n\t\t}\n\t\t\n\t\t//4\n\t\tSystem.out.print(\"Point of smile : \");\n\t\tint smile = in.nextInt();\n\t\tbool = charm.isCondition(smile);\n\t\twhile (!bool) {\n\t\t\tSystem.out.println(\"Input between 0 - 10 \");\n\t\t\tsmile = in.nextInt();\n\t\t\tbool = charm.isCondition(smile);\n\t\t}\n\t\t\n\t\t//5\n\t\tSystem.out.print(\"Point of speech : \");\n\t\tint speech = in.nextInt();\n\t\tbool = charm.isCondition(speech);\n\t\twhile (!bool) {\n\t\t\tSystem.out.println(\"Input between 0 - 10 \");\n\t\t\tspeech = in.nextInt();\n\t\t\tbool = charm.isCondition(speech);\n\t\t}\n\t\t\n\t\tcharm.setFace(face);\n\t\tcharm.setNature(nature);\n\t\tcharm.setRich(rich);\n\t\tcharm.setSmile(smile);\n\t\tcharm.setSpeech(speech);\n\t\t\n\t\tdouble result = charm.process();\n\t\tSystem.out.println(\"Point of your charm is : \"+result);\n\t}", "public void setFace(int face) {\n\t\tthis.face = face;\n\t}", "public NimTUI () {\n this.player1 = null;\n this.player2 = null;\n this.game = null;\n this.in = new Scanner(System.in);\n }", "public static void main(String[] args) {\n\n\t\tSystem.out.println(\"図形を描画[ 0:円 2:線 3:三角形 4:長方形 44:正方形 ]\");\n\t\tSystem.out.println(\"描画したい図形を数値で選択してください。\");\n\t\tjava.util.Scanner scanner = new java.util.Scanner(System.in);\n\t\tint incnt = scanner.nextInt();\n\t\t\n\t\tFigure figure;\t\t\n\t\tif (incnt == 0) {\n\t\t\tfigure = new Circle(100, 100, 20);\n\t\t} else if (incnt == 2) {\n\t\t\tfigure = new Line(0, 0, 100, 100);\n\t\t} else if (incnt == 3) {\n\t\t\tfigure = new Triangle(0, 0, 100, 100, 0, 200);\n\t\t} else if (incnt == 4) {\n\t\t\tfigure = new Rectangle(0,0,100,100);\n\t\t} else if (incnt == 44) {\n\t\t\tfigure = new Square(0,0,200);\n\t\t} else {\n\t\t\tSystem.out.println(\"指定の数値を入力してください。\");\n\t\t\treturn;\n\t\t}\n\n\n\t\tfigure.draw();\n\t\tdouble length = figure.perimeter();\n\t\tSystem.out.println(\"周囲の長さは\" + length);\n\t\tif(figure instanceof Polygon) {\n\t\t\tPolygon figure_re = (Polygon)figure;\n\t\t\tSystem.out.println(\"内角の和は\"+ figure_re.getInternalAngel() +\"です。\");\n\t\t\t\n\t\t}\n\t\t\n\n\t\t\n\t\t\n\n\t}", "@Override\n @SneakyThrows\n public void nextRound() {\n Interpreter interpreter = Zuul.getInstance().getInterpreter();\n /*\n Getting player's input\n */\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n interpreter.handleCommand(this, reader.readLine());\n }", "public static String input(int mode,int i,int player){\n\tScanner input = new Scanner(System.in);\r\n\tString inp = null;\r\n\tint a = 0,b=0;\r\n\tif(mode==1)\r\n\t inp = input.nextLine();\r\n\telse if(mode==2)\r\n\t{\r\n\t\tif(i%2==0){\r\n\t\t\tinp=input.nextLine();\r\n\t\t\t}\r\n\t\telse{\r\n\t\tinp = searchSmart(player,mode,i);\r\n\t\tSystem.out.println(inp);\r\n\t}\r\n\t\t}\r\n\telse if(mode==3)\r\n\t{\r\n\t\tif(i%2==0){\r\n\t\t\tinp = searchSmart(player,mode,i);\r\n\t\t\tSystem.out.println(inp);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tinp=input.nextLine();\t\r\n\t\t}\r\n\t\t\t\r\n\t}\r\n\treturn inp;\r\n}", "public void input(){\n\t\tboolean[] inputKeyArray = inputHandler.processKeys();\n\t\tint[] inputMouseArray = inputHandler.processMouse();\n\t\tcurrentLevel.userInput(inputKeyArray, inputMouseArray);\n\t}", "@SuppressWarnings(\"resource\")\n public Scanner openFile() {\n boolean flag = false;\n Scanner input;\n\n while(!flag) {\n\t\t\tScanner scanned = new Scanner(System.in); \n\t if((scanned.next()).equals(\"game\")) {\n\t \tthis.fileName = scanned.next();\n\t try\n\t {\n\t File file = new File(\"./examples/\"+this.fileName);\n\t input = new Scanner(file);\n\t flag = true;\n\t return input;\n\t }\n\t catch (FileNotFoundException e)\n\t {\n\t \tSystem.err.println(\"File was not found, try again\");\n\t } \t\n\t }\n\t else {\n\t \tSystem.err.println(\"First command must be game, try again\");\n\t }\n }\n return null;\n }", "public void launchGame() throws FileNotFoundException, LevelException, VacuumException, SpriteException {\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\t\r\n\t\twhile(game.nextLevel()) {\t\t\t\r\n\t\t\tSystem.out.println(\"LEVEL \"+game.getNumLevel());\t\t\t\r\n\t\t\tSystem.out.println();\r\n\t\t\t// print board and keep accepting moves until game is over\r\n\t\t\twhile (!game.isLevelBeaten()) {\r\n\t\t\t\tSystem.out.println(game.getBoardText());\r\n\t\t\t\tSystem.out.print(\"Total Score: \"+game.getTotalScore());\r\n\t\t\t\tSystem.out.print(\" | Level Score: \"+game.getLevelScore());\r\n\t\t\t\tSystem.out.print(\" | Capacity: \"+(game.getVacuumRatioCapacity()*100)+\"%\");\r\n\t\t\t\tSystem.out.print(\" | Turns: \"+(game.getTurns()));\r\n\t\t\t\tSystem.out.print(\" | Enter move: \");\r\n\t\t\t\tmove(sc.next().charAt(0));\t\t\t\t\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\tSystem.out.println(game.getBoardText());\r\n\t\t\t\t\r\n\t\t\t\tif(game.timesUp()) {\r\n\t\t\t\t\tSystem.out.println(\"Time's up!! You lose!!\");\r\n\t\t\t\t\tSystem.out.println(\"Press enter to continue...\");\r\n\t\t\t\t\tgame.reload();\r\n\t\t\t\t\tsc.nextLine(); //To catch the previous \"enter\"\r\n\t\t\t\t\tsc.nextLine();\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Congrats!! You have finished Level \"+game.getNumLevel()+\"!!\");\r\n\t\t\tSystem.out.println(\"Press enter to continue...\");\t\t\t\t\r\n\t\t\tsc.nextLine();\r\n\t\t\tsc.nextLine();\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tsc.close();\r\n\t\t\r\n\t\tSystem.out.println(\"Total Score: \"+game.getTotalScore());\r\n\t}", "public void drawFace(int face) {\n\t\tif (faceNearClipped[face]) {\n\t\t\tdrawNearClippedFace(face);\n\t\t\treturn;\n\t\t}\n\n\t\tint a = faceVertexA[face];\n\t\tint b = faceVertexB[face];\n\t\tint c = faceVertexC[face];\n\t\tDraw3D.clipX = faceClippedX[face];\n\n\t\tif (faceAlpha == null) {\n\t\t\tDraw3D.alpha = 0;\n\t\t} else {\n\t\t\tDraw3D.alpha = faceAlpha[face];\n\t\t}\n\n\t\tint type;\n\n\t\tif (faceInfo == null) {\n\t\t\ttype = 0;\n\t\t} else {\n\t\t\ttype = faceInfo[face] & 0b11;\n\t\t}\n\n\t\tif (type == 0) {\n\t\t\tDraw3D.fillGouraudTriangle(vertexScreenY[a], vertexScreenY[b], vertexScreenY[c], vertexScreenX[a], vertexScreenX[b], vertexScreenX[c], faceColorA[face], faceColorB[face], faceColorC[face]);\n\t\t} else if (type == 1) {\n\t\t\tDraw3D.fillTriangle(vertexScreenY[a], vertexScreenY[b], vertexScreenY[c], vertexScreenX[a], vertexScreenX[b], vertexScreenX[c], palette[faceColorA[face]]);\n\t\t} else if (type == 2) {\n\t\t\tint texturedFace = faceInfo[face] >> 2;\n\t\t\tint ta = texturedVertexA[texturedFace];\n\t\t\tint tb = texturedVertexB[texturedFace];\n\t\t\tint tc = texturedVertexC[texturedFace];\n\t\t\tDraw3D.fillTexturedTriangle(vertexScreenY[a], vertexScreenY[b], vertexScreenY[c], vertexScreenX[a], vertexScreenX[b], vertexScreenX[c], faceColorA[face], faceColorB[face], faceColorC[face], vertexViewSpaceX[ta], vertexViewSpaceX[tb], vertexViewSpaceX[tc], vertexViewSpaceY[ta], vertexViewSpaceY[tb], vertexViewSpaceY[tc], vertexViewSpaceZ[ta], vertexViewSpaceZ[tb], vertexViewSpaceZ[tc], faceColor[face]);\n\t\t} else if (type == 3) {\n\t\t\tint texturedFace = faceInfo[face] >> 2;\n\t\t\tint ta = texturedVertexA[texturedFace];\n\t\t\tint tb = texturedVertexB[texturedFace];\n\t\t\tint tc = texturedVertexC[texturedFace];\n\t\t\tDraw3D.fillTexturedTriangle(vertexScreenY[a], vertexScreenY[b], vertexScreenY[c], vertexScreenX[a], vertexScreenX[b], vertexScreenX[c], faceColorA[face], faceColorA[face], faceColorA[face], vertexViewSpaceX[ta], vertexViewSpaceX[tb], vertexViewSpaceX[tc], vertexViewSpaceY[ta], vertexViewSpaceY[tb], vertexViewSpaceY[tc], vertexViewSpaceZ[ta], vertexViewSpaceZ[tb], vertexViewSpaceZ[tc], faceColor[face]);\n\t\t}\n\t}", "private void startDetectFaceInfo() {\n mProgressDialog.show();\n mFaceExecutor.submit(() -> {\n // first begin the face morphing\n FaceImage faceImage = FaceUtils.getFaceFromPath(\n mSelectPath, mImageSize.x, mImageSize.y);\n // each time detect the image, we should send it to the global value\n mFaceImages.set(mCurrentIndex, faceImage);\n // modify the progressDialog\n runOnUiThread(() -> {\n mProgressDialog.dismiss();\n if (faceImage == null) {\n mImageViews.get(mCurrentIndex).setImageResource(R.drawable.ic_head);\n // snakeBarShow can replace Toast\n snakeBarShow(getString(R.string.no_face_detected));\n }\n });\n });\n }", "public CubeEscape() {\n currentRoom = MapGenerator.generateRandomMap(MapGenerator.CUBE_LENGTH_HARD);\n parser = new Parser();\n finished = false; \n }" ]
[ "0.55051327", "0.5443188", "0.5383737", "0.5382062", "0.53778094", "0.52991694", "0.52833587", "0.52564585", "0.52198833", "0.5127532", "0.51260984", "0.5114973", "0.5110407", "0.5096203", "0.50833213", "0.5029808", "0.5029483", "0.5029483", "0.50232244", "0.50128704", "0.5011876", "0.4984558", "0.49743754", "0.49534294", "0.4910847", "0.49001843", "0.48886886", "0.4885179", "0.48738343", "0.486769", "0.48423216", "0.48391032", "0.48281226", "0.47919402", "0.47906822", "0.47870344", "0.47750935", "0.47666916", "0.47601718", "0.47594863", "0.4751505", "0.4748149", "0.47452042", "0.47338206", "0.47331253", "0.47279102", "0.4725392", "0.47220892", "0.4721744", "0.4717867", "0.47130376", "0.47126868", "0.46843752", "0.46819362", "0.46786946", "0.46778116", "0.46743715", "0.46691072", "0.46637362", "0.4662954", "0.46571043", "0.46554363", "0.46428537", "0.46399388", "0.4634883", "0.46314076", "0.46262193", "0.46245235", "0.46212223", "0.46192485", "0.46156883", "0.459767", "0.45910236", "0.45892143", "0.45855883", "0.45854098", "0.4580854", "0.4579757", "0.4579013", "0.45782268", "0.45733726", "0.45718345", "0.45694482", "0.4566198", "0.45648333", "0.4548357", "0.45482585", "0.45477855", "0.4544535", "0.4543434", "0.45406973", "0.45402095", "0.453988", "0.45364174", "0.45333973", "0.45288235", "0.45261213", "0.45210904", "0.4518879", "0.451485" ]
0.5688804
0
Takes an input string and converts it to a Cube object
public static Cube convertInputArrayToCube(final String[] inputArr) { final Color[] faces = new Color[Cube.NUM_OF_FACES]; for (int i = 0; i < Cube.NUM_OF_FACES; i++) { switch (inputArr[i].toLowerCase()) { case "red": case "r": faces[i] = Color.RED; break; case "orange": case "o": faces[i] = Color.ORANGE; break; case "green": case "g": faces[i] = Color.GREEN; break; case "blue": case "b": faces[i] = Color.BLUE; break; case "purple": case "p": faces[i] = Color.PURPLE; break; case "white": case "w": faces[i] = Color.WHITE; break; } } return new Cube(faces[0], faces[1], faces[2], faces[3], faces[4], faces[5]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createNewCube() {\n CUBE = new Cube();\n }", "public RubiksCube(String[] c){\n\t\tif(c.length == 54){\n\t\t\tString[] tab = new String[c.length];\n\t\t\tfor(int i=0; i<c.length;i++){\n\t\t\t\ttab[i] = c[i];\n\t\t\t}\n\t\t\tthis.cube = tab;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Wrong input table size : \" + c.length);\n\t\t}\n\t}", "public RubiksCube(){\n\t\tString[] c = {\n\t\t\t\t\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\n\t\t\t\t\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\n\t\t\t\t\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\n\t\t\t\t\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\n\t\t\t\t\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\n\t\t\t\t\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\n\t\t};\n\t\tthis.cube = c;\n\t}", "public final AstValidator.cube_clause_return cube_clause() throws RecognitionException {\n AstValidator.cube_clause_return retval = new AstValidator.cube_clause_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree CUBE119=null;\n AstValidator.cube_item_return cube_item120 =null;\n\n\n CommonTree CUBE119_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:296:2: ( ^( CUBE cube_item ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:296:4: ^( CUBE cube_item )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n CUBE119=(CommonTree)match(input,CUBE,FOLLOW_CUBE_in_cube_clause1282); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n CUBE119_tree = (CommonTree)adaptor.dupNode(CUBE119);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(CUBE119_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_cube_item_in_cube_clause1284);\n cube_item120=cube_item();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, cube_item120.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "private Geometry buildCube(ColorRGBA color) {\n Geometry cube = new Geometry(\"Box\", new Box(0.5f, 0.5f, 0.5f));\n Material mat = new Material(assetManager, \"TestMRT/MatDefs/ExtractRGB.j3md\");\n mat.setColor(\"Albedo\", color);\n cube.setMaterial(mat);\n return cube;\n }", "CubeModel(CubeModel cube) {\n initialize(cube);\n\n }", "private void generateCube() {\n\t\tverts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)};\n\t\tverts[0].setElement(0, -1);\n\t\tverts[0].setElement(1, -1);\n\t\tverts[0].setElement(2, -1);\n\t\t\n\t\tverts[1].setElement(0, 1);\n\t\tverts[1].setElement(1, -1);\n\t\tverts[1].setElement(2, -1);\n\t\t\n\t\tverts[2].setElement(0, -1);\n\t\tverts[2].setElement(1, -1);\n\t\tverts[2].setElement(2, 1);\n\t\t\n\t\tverts[3].setElement(0, 1);\n\t\tverts[3].setElement(1, -1);\n\t\tverts[3].setElement(2, 1);\n\t\t\n\t\tverts[4].setElement(0, -1);\n\t\tverts[4].setElement(1, 1);\n\t\tverts[4].setElement(2, -1);\n\t\t\n\t\tverts[5].setElement(0, 1);\n\t\tverts[5].setElement(1, 1);\n\t\tverts[5].setElement(2, -1);\n\t\t\n\t\tverts[6].setElement(0, -1);\n\t\tverts[6].setElement(1, 1);\n\t\tverts[6].setElement(2, 1);\n\t\t\n\t\tverts[7].setElement(0, 1);\n\t\tverts[7].setElement(1, 1);\n\t\tverts[7].setElement(2, 1);\n\t\t\n\t\tfaces = new int[][] {{0, 3, 2}, {0, 1, 3}, {0, 4, 5}, {0, 5, 1}, {0, 2, 6}, {0, 6, 4}, {2, 7, 6}, {2, 3, 7}, {3, 1, 5}, {3, 5, 7}, {4, 7, 5}, {4, 6, 7}}; // List the vertices of each face by index in verts. Vertices must be listed in clockwise order from outside of the shape so that the faces pointing away from the camera can be culled or shaded differently\n\t}", "public Vector3D(String src) throws IllegalArgumentException\r\n\t{\r\n String[] s = src.split(\"[, ]+\");\r\n\r\n if (s.length != 3) {\r\n throw new IllegalArgumentException(\"String param does not contain 3 tokens\");\r\n }\r\n else {\r\n this.x = Float.parseFloat(s[0]);\r\n this.y = Float.parseFloat(s[1]);\r\n this.z = Float.parseFloat(s[2]); \r\n }\r\n\t}", "public static Vect3 parse(String str) {\n\t\tString[] fields = str.split(Constants.wsPatternParens);\n\t\tif (fields[0].equals(\"\")) {\n\t\t\tfields = Arrays.copyOfRange(fields,1,fields.length);\n\t\t}\n\t\ttry {\n\t\t\tif (fields.length == 3) {\n\t\t\t\treturn new Vect3(Double.parseDouble(fields[0]),Double.parseDouble(fields[1]),Double.parseDouble(fields[2]));\n\t\t\t} else if (fields.length == 6) {\n\t\t\t\treturn new Vect3(Units.from(Units.clean(fields[1]),Double.parseDouble(fields[0])),\n\t\t\t\t\t\tUnits.from(Units.clean(fields[3]),Double.parseDouble(fields[2])),\n\t\t\t\t\t\tUnits.from(Units.clean(fields[5]),Double.parseDouble(fields[4])));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// ignore exception\n\t\t}\n\t\treturn INVALID;\n\t}", "public Cube(Square square)\n {\n this.edge = square.getSide();\n this.volume = Math.pow(this.edge,3);\n }", "public static float[] createCube (float x, float y, float z) {\r\n int offset = CUBE_LENGTH/2;\r\n return new float[] {\r\n x + offset, y + offset, z,\r\n x - offset, y + offset, z,\r\n x - offset, y + offset, z - CUBE_LENGTH,\r\n x + offset, y + offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z - CUBE_LENGTH,\r\n x - offset, y - offset, z - CUBE_LENGTH,\r\n x - offset, y - offset, z,\r\n x + offset, y - offset, z,\r\n x + offset, y + offset, z - CUBE_LENGTH,\r\n x - offset, y + offset, z - CUBE_LENGTH,\r\n x - offset, y - offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z,\r\n x - offset, y - offset, z,\r\n x - offset, y + offset, z,\r\n x + offset, y + offset, z,\r\n x - offset, y + offset, z - CUBE_LENGTH,\r\n x - offset, y + offset, z,\r\n x - offset, y - offset, z,\r\n x - offset, y - offset, z - CUBE_LENGTH,\r\n x + offset, y + offset, z,\r\n x + offset, y + offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z\r\n };\r\n }", "public static Puzzle inputToPuzzle() {\n Puzzle puzzle = new Puzzle();\n\n printInitialPromptMessage();\n final String choice = chooseCubeInputType();\n if (choice.equals(\"r\")) { // random set of cubes\n printRandomPromptMessage();\n puzzle = RandomController.getRandomPuzzle();\n\n } else { // user's choice of cubes\n printChoicePromptMessage();\n final String[][] inputArray = takeStdInput();\n puzzle = convertInputArrayToPuzzle(inputArray);\n }\n changeCubeInPuzzle(puzzle);\n // sc.close();\n\n return puzzle;\n }", "public CubeState(){\n ep = new PermutationGroup(12);\n cp = new PermutationGroup(8);\n eo = new EdgeOrientation();\n co = new CubieOrientation();\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Cube(\" + this.nom + \")@(\" + this.centre.getX() + \", \" + this.centre.getY() + \", \" + this.centre.getZ() + \") ar�te : \"+this.arete;\n\t}", "public static Complex converter(String arg) {\r\n int real = 0;\r\n int imaginar = 0;\r\n for(int i = 1; i < arg.length(); i++)\r\n if (arg.charAt(i) == '+' || arg.charAt(i) == '-') {\r\n real = Integer.parseInt(arg.substring(0, i));\r\n imaginar = Integer.parseInt(arg.substring(i, arg.length()-1));\r\n }\r\n return new Complex(real, imaginar);\r\n }", "public CubeGL2() {\n // Define points for a cube.\n // X, Y, Z\n mCubeVertexData = new float[]\n {\n // Front face\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n // Right face\n 1.0f, 1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, -1.0f,\n 1.0f, 1.0f, -1.0f,\n // Back face\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n // Left face\n -1.0f, 1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, 1.0f, 1.0f,\n // Top face\n -1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n // Bottom face\n 1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n };\n // R, G, B, A\n mCubeColourData = new float[]\n {\n // Front face\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n // Right face\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n // Back face\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n // Left face\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n // Top face\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n // Bottom face\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f\n };\n // X, Y, Z\n mCubeNormalData = new float[]\n {\n // Front face\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n // Right face\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n // Back face\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n // Left face\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n // Top face\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n // Bottom face\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f\n };\n // X, Y\n // Texture coordinate data.\n mCubeTextureCoordinateData = new float[]\n {\n // Front face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Right face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Back face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Left face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Top face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Bottom face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f\n };\n // Initialize the buffers.\n mCubeVertices = ByteBuffer.allocateDirect(mCubeVertexData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeVertices.put(mCubeVertexData).position(0);\n mCubeColours = ByteBuffer.allocateDirect(mCubeColourData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeColours.put(mCubeColourData).position(0);\n mCubeNormals = ByteBuffer.allocateDirect(mCubeNormalData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeNormals.put(mCubeNormalData).position(0);\n mCubeTextureCoordinates = ByteBuffer.allocateDirect(mCubeTextureCoordinateData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeTextureCoordinates.put(mCubeTextureCoordinateData).position(0);\n Matrix.setIdentityM(mModelMatrix, 0);\n }", "public Face(String faceAsString) {\n if (faceAsString == null || faceAsString.length() != SIZE * SIZE) {\n throw new IllegalArgumentException(\"Wrong format. Cube face have to contain exactly \" + SIZE * SIZE + \" cells\");\n }\n\n for (int i = 0; i < faceAsString.length(); i++) {\n if (faceAsString.charAt(i) != EMPTY_CELL) {\n int xPos = i % SIZE;\n int yPos = i / SIZE;\n\n // fill top edge\n if (yPos == 0) {\n if (xPos == 0) {\n ltCorner = 1;\n } else if (xPos == SIZE - 1) {\n rtCorner = 1;\n } else {\n topEdge = fillCellOnEdge(topEdge, xPos - 1);\n reversedTopEdge = fillCellOnEdge(reversedTopEdge, SIZE - xPos - 2);\n }\n }\n // fill bottom edge\n if (yPos == SIZE - 1) {\n if (xPos == 0) {\n lbCorner = 1;\n } else if (xPos == SIZE - 1) {\n rbCorner = 1;\n } else {\n botEdge = fillCellOnEdge(botEdge, SIZE - xPos - 2);\n reversedBotEdge = fillCellOnEdge(reversedBotEdge, xPos - 1);\n }\n }\n // fill left edge\n if (xPos == 0) {\n if (yPos == 0) {\n ltCorner = 1;\n } else if (yPos == SIZE - 1) {\n lbCorner = 1;\n } else {\n leftEdge = fillCellOnEdge(leftEdge, SIZE - yPos - 2);\n reversedLeftEdge = fillCellOnEdge(reversedLeftEdge, yPos - 1);\n }\n }\n // fill right edge\n if (xPos == SIZE - 1) {\n if (yPos == 0) {\n rtCorner = 1;\n } else if (yPos == SIZE - 1) {\n rbCorner = 1;\n } else {\n rightEdge = fillCellOnEdge(rightEdge, yPos - 1);\n reversedRightEdge = fillCellOnEdge(reversedRightEdge, SIZE - yPos - 2);\n }\n }\n }\n }\n }", "public static boolean isCube(int i) {\n\t\treturn false;\n\t}", "public Cube(double edge)\n {\n this.edge = edge;\n this.volume = Math.pow(edge,3);\n }", "Cube(int l, int b, int h)\r\n\t{\r\n\t\t//System.out.println(\"We are in constructor\");\r\n\t\tlength=l;\r\n\t\tbredth=b;\r\n\t\theight=h;\r\n\t}", "public CubeGL2(double width, double height, double depth) {\n // Define points for a cube.\n // X, Y, Z\n mCubeVertexData = new float[]\n {\n // Front face\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n // Right face\n 1.0f, 1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, -1.0f,\n 1.0f, 1.0f, -1.0f,\n // Back face\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n // Left face\n -1.0f, 1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, 1.0f, 1.0f,\n // Top face\n -1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n // Bottom face\n 1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n };\n\n for (int i = 0; i < mCubeVertexData.length; i += 3) {\n mCubeVertexData[i] = mCubeVertexData[i] * (float) width;\n }\n for (int i = 1; i < mCubeVertexData.length; i += 3) {\n mCubeVertexData[i] = mCubeVertexData[i] * (float) height;\n }\n for (int i = 2; i < mCubeVertexData.length; i += 3) {\n mCubeVertexData[i] = mCubeVertexData[i] * (float) depth;\n }\n\n // R, G, B, A\n mCubeColourData = new float[]\n {\n // Front face\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n // Right face\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n // Back face\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n // Left face\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n // Top face\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n // Bottom face\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f\n };\n // X, Y, Z\n mCubeNormalData = new float[]\n {\n // Front face\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n // Right face\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n // Back face\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n // Left face\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n // Top face\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n // Bottom face\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f\n };\n // X, Y\n // Texture coordinate data.\n mCubeTextureCoordinateData = new float[]\n {\n // Front face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Right face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Back face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Left face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Top face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Bottom face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f\n };\n // Initialize the buffers.\n mCubeVertices = ByteBuffer.allocateDirect(mCubeVertexData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeVertices.put(mCubeVertexData).position(0);\n mCubeColours = ByteBuffer.allocateDirect(mCubeColourData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeColours.put(mCubeColourData).position(0);\n mCubeNormals = ByteBuffer.allocateDirect(mCubeNormalData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeNormals.put(mCubeNormalData).position(0);\n mCubeTextureCoordinates = ByteBuffer.allocateDirect(mCubeTextureCoordinateData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeTextureCoordinates.put(mCubeTextureCoordinateData).position(0);\n Matrix.setIdentityM(mModelMatrix, 0);\n }", "private void createCube(float x, float y, float z){\r\n\t\tboolean[] sides = checkCubeSides((int)x,(int)y,(int)z);\r\n\t\tfloat[] color = BlockType.color(blocks[(int)x][(int)y][(int)z]);\r\n\t\t\r\n//\t\t gl.glNormal3f(0.0f, 1.0f, 0.0f);\r\n\t\tif(sides[0]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n//\t // Bottom-face\r\n//\t gl.glNormal3f(0.0f, -1.0f, 0.0f);\r\n\t\t\r\n\t\tif(sides[1]){\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n//\t // Back-face\r\n//\t gl.glNormal3f(0.0f, 0.0f, -1.0f);\r\n\t\tif(sides[2]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n//\t // Front-face\r\n//\t gl.glNormal3f(0.0f, 0.0f, 1.0f);\r\n\t\tif(sides[3]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t \r\n//\t // Left-face\r\n//\t gl.glNormal3f(-1.0f, 0.0f, 0.0f);\r\n\t\tif(sides[4]){\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t // Right-face\r\n//\t gl.glNormal3f(1.0f, 0.0f, 0.0f);\r\n\t\tif(sides[5]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setCube(ViewerCube cube) {\n ViewerCube oldCube = this.cube;\n if (this.cube != null)\n {\n cube.removePropertyChangeListener(this);\n }\n this.cube = cube;\n if (this.cube != null)\n {\n cube.addPropertyChangeListener(this);\n }\n updateFromCube();\n firePropertyChange(PROP_CUBE, oldCube, cube);\n }", "Cube()\r\n\t{\r\n\t\t//System.out.println(\"We are in constructor\");\r\n\t\tlength=10;\r\n\t\tbredth=20;\r\n\t\theight=30;\r\n\t}", "@Override\n\tpublic Cube getCube(int cubeX, int cubeY, int cubeZ) {\n\t\tlong columnAddress = AddressTools.getAddress(cubeX, cubeZ);\n\t\tColumn column = this.loadedColumns.get(columnAddress);\n\t\tif (column == null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn column.getCube(cubeY);\n\t}", "public static Puzzle convertInputArrayToPuzzle(final String[][] inputArray) {\n final Cube[] cubes = new Cube[Puzzle.NUM_OF_CUBES];\n\n for (int i = 0; i < Puzzle.NUM_OF_CUBES; i++) {\n cubes[i] = convertInputArrayToCube(inputArray[i]);\n }\n\n final Puzzle puzzle = new Puzzle(cubes[0], cubes[1], cubes[2], cubes[3], cubes[4], cubes[5], cubes[6],\n cubes[7]);\n return puzzle;\n }", "public Cube() {\n\t\t// a float is 4 bytes, therefore we multiply the number if\n\t\t// vertices with 4.\n\t\tByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length * 4);\n\t\tvbb.order(ByteOrder.nativeOrder());\n\t\tvertexBuffer = vbb.asFloatBuffer();\n\t\tvertexBuffer.put(vertices);\n\t\tvertexBuffer.position(0);\n\t\t\n\t\t// Setup texture-coords-array buffer, in float. An float has 4 bytes (NEW)\n\t ByteBuffer tbb = ByteBuffer.allocateDirect(texCoords.length * 4);\n\t tbb.order(ByteOrder.nativeOrder());\n\t texBuffer = tbb.asFloatBuffer();\n\t texBuffer.put(texCoords);\n\t texBuffer.position(0);\n\t\t\n\t\t// short is 2 bytes, therefore we multiply the number if\n\t\t// vertices with 2.\n//\t\tByteBuffer ibb = ByteBuffer.allocateDirect(indices.length * 2);\n//\t\tibb.order(ByteOrder.nativeOrder());\n//\t\tindexBuffer = ibb.asShortBuffer();\n//\t\tindexBuffer.put(indices);\n//\t\tindexBuffer.position(0);\n\t}", "public RubiksCube(int size) {\n this.size = size;\n faces = new Face[FACES_AMOUNT];\n for (int i = 0; i < FACES_AMOUNT; i++)\n faces[i] = new Face(size, i);\n }", "public static boolean createBasicAggregation(Cube cube)\r\n {\r\n String sqlBase;\r\n String name; \r\n Dimension dimension;\r\n int dimensionQuantity;\r\n Map dimensionMap;\r\n int order;\r\n String orderName = \"\"; // apenas para fazer a concatenação de \"9\" para a \r\n \t\t\t\t // ordenação (que será depois convertida para número)\r\n dimensionMap = cube.getDimensions();\r\n dimensionQuantity = dimensionMap.size() - 1; // menos um, a tabela fato\r\n \r\n // cria agora um nome para a agregação base atrbuindo tantos \"9\" \r\n // quantas forem as dimensões\r\n int i;\r\n name = cube.getName() + \"Base\";\r\n // cria o numero para agregação base dentre as demais agregações\r\n for (i = 1; i <= dimensionQuantity; i++)\r\n orderName += \"9\";\r\n order = Integer.parseInt(orderName);\r\n // monta a SQL \"FROM...\" para a agregação base\r\n sqlBase = \"FROM \";\r\n\r\n Iterator iterator = dimensionMap.keySet().iterator();\r\n String key;\r\n while (iterator.hasNext())\r\n {\r\n key = (String) iterator.next();\r\n dimension = (Dimension) dimensionMap.get(key);\r\n if (!sqlBase.equals(\"FROM \"))\r\n sqlBase += \", \";\r\n sqlBase += \"\\\"\" + dimension.getName() + \"\\\"\";\r\n }\r\n \r\n // completa a parte WHERE da SQL para a agregação base\r\n sqlBase += \" WHERE \";\r\n iterator = dimensionMap.keySet().iterator();\r\n while (iterator.hasNext())\r\n {\r\n key = (String) iterator.next();\r\n dimension = (Dimension) dimensionMap.get(key);\r\n if (!dimension.getType().equals(\"Fact\"))\r\n {\r\n if (!sqlBase.endsWith(\"WHERE \"))\r\n sqlBase += \" AND \";\r\n sqlBase += dimension.getClause();\r\n }\r\n }\r\n \r\n // insere os dados e cria a agregação\r\n return save(name, true, sqlBase, cube.getCode(), order);\r\n }", "@Test\n void construct_from_string() {\n ComplexMatrix m = complexMatrix(\"1 + i| (2, 0) | i| 3 -6i|| 123 + 34i| i| 2.3E-10i| 0|| 1.234e+100| 1| i| -2i\");\n\n assertEquals(COMPLEX_MATRIX, m);\n\n System.out.println(m.toPrettyString());\n }", "public ViewerCube getCube() {\n return cube;\n }", "static Texture loadCubeMap(String name) {\n\n GL4 gl = (GL4) GLContext.getCurrentGL(); // this gl context not appropriate?\n GLProfile glp = gl.getGLProfile();\n Texture cubeMap = TextureIO.newTexture(GL4.GL_TEXTURE_CUBE_MAP);\n\n // System.out.println(\"estimated memory \" + cubeMap.getEstimatedMemorySize());\n\n try {\n TextureData top = TextureIO.newTextureData(glp, new File(name + \"/top.png\"), false, \"png\");\n TextureData bot = TextureIO.newTextureData(glp, new File(name + \"/bot.png\"), false, \"png\");\n TextureData left = TextureIO.newTextureData(glp, new File(name + \"/left.png\"), false, \"png\");\n TextureData right = TextureIO.newTextureData(glp, new File(name + \"/right.png\"), false, \"png\");\n TextureData front = TextureIO.newTextureData(glp, new File(name + \"/front.png\"), false, \"png\");\n TextureData back = TextureIO.newTextureData(glp, new File(name + \"/back.png\"), false, \"png\");\n\n // System.out.println(\"front is null \" + (top == null));\n\n cubeMap.updateImage(gl, right, GL4.GL_TEXTURE_CUBE_MAP_POSITIVE_X);\n cubeMap.updateImage(gl, left, GL4.GL_TEXTURE_CUBE_MAP_NEGATIVE_X);\n cubeMap.updateImage(gl, top, GL4.GL_TEXTURE_CUBE_MAP_POSITIVE_Z);\n cubeMap.updateImage(gl, bot, GL4.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z);\n cubeMap.updateImage(gl, front, GL4.GL_TEXTURE_CUBE_MAP_POSITIVE_Y);\n cubeMap.updateImage(gl, back, GL4.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y);\n\n } catch (Exception e) {\n System.out.println(\"failed load \" + name + \" cubemap\");\n }\n\n // System.out.println(\"estimated memory \" + cubeMap.getEstimatedMemorySize());\n\n // gl.glTexParameteri(GL4.GL_TEXTURE_CUBE_MAP, GL4.GL_TEXTURE_WRAP_S, GL4.GL_CLAMP_TO_EDGE);\n // gl.glTexParameteri(GL4.GL_TEXTURE_CUBE_MAP, GL4.GL_TEXTURE_WRAP_T, GL4.GL_CLAMP_TO_EDGE);\n // gl.glTexParameteri(GL4.GL_TEXTURE_CUBE_MAP, GL4.GL_TEXTURE_WRAP_R, GL4.GL_CLAMP_TO_EDGE);\n\n return cubeMap;\n }", "public Cube(String shapeName, double sideLength){\n super(shapeName, sideLength, sideLength, sideLength);\n }", "public void makeCube (int subdivisions)\r\n {\r\n \tfloat horz[] = new float[subdivisions + 1];\r\n \tfloat vert[] = new float[subdivisions + 1];\r\n \t\r\n \t\r\n \t// Front face\r\n \tPoint p1 = new Point(-0.5f, -0.5f, 0.5f);\r\n \tPoint p2 = new Point(0.5f, -0.5f, 0.5f);\r\n \tPoint p3 = new Point(0.5f, 0.5f, 0.5f);\r\n \tPoint p4 = new Point(-0.5f, 0.5f, 0.5f);\r\n \t\r\n \tfloat h = p1.x;\r\n \tfloat v = p1.y;\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], 0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], 0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], 0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], 0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Back face\r\n \tp1.y = p1.z = -0.5f;\r\n \tp1.x = 0.5f;\r\n \tp2.x = p2.y = p2.z = -0.5f;\r\n \tp3.x = p3.z = -0.5f;\r\n \tp3.y = 0.5f;\r\n \tp4.x = p4.y = 0.5f;\r\n \tp4.z = -0.5f;\r\n \t\r\n \th = p1.x;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], -0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], -0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], -0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], -0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Left face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.x = p2.y = -0.5f;\r\n \tp2.z = 0.5f;\r\n \tp3.x = -0.5f;\r\n \tp3.y = p3.z = 0.5f;\r\n \tp4.y = 0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(-0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(-0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(-0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(-0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Right face\r\n \tp1.x = p1.z = 0.5f;\r\n \tp1.y = -0.5f;\r\n \tp2.y = p2.z = -0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.y = p4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Top face\r\n \tp1.x = -0.5f;\r\n \tp1.y = p1.z = 0.5f;\r\n \tp2.x = p2.y = p2.z = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \tp4.y = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], 0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], 0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], 0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], 0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Bottom face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.y = p2.z = 0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.z = 0.5f;\r\n \tp3.y = -0.5f;\r\n \tp4.x = p4.y = -0.5f;\r\n \tp4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], -0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], -0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], -0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], -0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n }", "public BranchGroup cubo3(){\n\t\t\tBranchGroup objRoot = new BranchGroup();\n\n\n\t TransformGroup objScale = new TransformGroup();\n\t Transform3D t3d = new Transform3D();\n\n\t Transform3D rotate = new Transform3D();\n Transform3D tempRotate = new Transform3D();\n\t \t rotate.rotX(Math.PI/1.0d);\n tempRotate.rotY(Math.PI/1.80d);\n Matrix3d n = new Matrix3d();\n Vector3d op = new Vector3d(.01,1,1);\n tempRotate.setScale(op);\n Vector3d op2 = new Vector3d(-.01,-.5,2);\n tempRotate.setTranslation(op2);\n rotate.mul(tempRotate);\n // rotate.mul(objScale);\n TransformGroup objRotate = new TransformGroup(rotate);\n \n //objRotate.addChild(new ColorCube(0.4));\n objRoot.addChild(objRotate);\n\t \n t3d.mul(rotate);\n\t objScale.setTransform(t3d);\n\t \n\t objRoot.addChild(objScale);\n\n\tTransformGroup objTrans = new TransformGroup();\n\t\tobjTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);\n\t\tobjTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);\n\t\t\t\t\t\n\t\t\n\t\tobjScale.addChild(objTrans);\n\n\t\tint flags = ObjectFile.RESIZE;\n\t\tif (!noTriangulate) flags |= ObjectFile.TRIANGULATE;\n\t\tif (!noStripify) flags |= ObjectFile.STRIPIFY;\n\t\tObjectFile f = new ObjectFile(flags, \n\t\t (float)(creaseAngle * Math.PI / 180.0));\n\t\tScene s = null;\n\t\ttry {\n\t\t s = f.load(filename);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\tcatch (ParsingErrorException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\tcatch (IncorrectFormatException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\t \n\t\tobjTrans.addChild(s.getSceneGroup());\n\t\t\n \n\n\t\tBoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);\n\n\n\t \n\t // Set up the background\n\t Color3f bgColor = new Color3f(0.05f, 0.05f, 0.5f);\n\t Background bgNode = new Background(bgColor);\n\t bgNode.setApplicationBounds(bounds);\n\t objRoot.addChild(bgNode);\n\n\t\treturn objRoot;\n\t\t \n\t }", "CubeModel() {\n r = 0;\n c = 0;\n s = 4;\n grid = new boolean [4][4];\n the_cube = new boolean[6];\n moves = 0;\n\n }", "public void unloadCube(Cube cube) {\n\t\tunloadCube(cube.getX(), cube.getY(), cube.getZ());\n\t}", "public static Vector3i positionFromString(String string) throws Exception {\n // split the input string on the space\n String[] elements = string.split(locationStringDelimiter);\n\n // expect three elements - X, Y, and Z, respectively\n if (elements.length < 3) {\n throw new Exception(\"Expected four distinct parts to the location string: \\\"\" + string + \"\\\"\");\n }\n\n String xString = elements[0];\n String yString = elements[1];\n String zString = elements[2];\n\n // convert those numerical strings to integer values\n int x = Integer.parseInt(xString);\n int y = Integer.parseInt(yString);\n int z = Integer.parseInt(zString);\n\n return new Vector3i(x, y, z);\n }", "public final AstValidator.cube_by_clause_return cube_by_clause() throws RecognitionException {\n AstValidator.cube_by_clause_return retval = new AstValidator.cube_by_clause_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree BY133=null;\n AstValidator.cube_or_rollup_return cube_or_rollup134 =null;\n\n\n CommonTree BY133_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:324:2: ( ^( BY cube_or_rollup ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:324:4: ^( BY cube_or_rollup )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n BY133=(CommonTree)match(input,BY,FOLLOW_BY_in_cube_by_clause1404); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n BY133_tree = (CommonTree)adaptor.dupNode(BY133);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(BY133_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_cube_or_rollup_in_cube_by_clause1406);\n cube_or_rollup134=cube_or_rollup();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, cube_or_rollup134.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public static GamePiece parseGamePiece(String val){\n\n GamePiece gp = new GamePiece();\n\n //The format of the string should matching the one given by the GamePiece.ToString method.\n //Format: \"name:STRING,position:VECTOR,size:FLOAT,color:STRING,label:STRING,opacity:FLOAT[0:1],shape:STRING,\"\n\n boolean readingProperty = true;\n boolean readingValue = false;\n boolean readingVector = false;\n\n String collectorProperty = \"\";\n String collectorValue = \"\";\n\n for(char c : val.toCharArray()){\n\n //This is done to avoid the commas in a vector messing up the reading of the string\n if(c == '(')\n readingVector = true;\n else if(c == ')')\n readingVector = false;\n\n\n if(c == ':'){\n readingProperty = false;\n readingValue = true;\n }else if(c == ',' && !readingVector){\n readingProperty = true;\n readingValue = false;\n\n //Save/collect value for the property\n GamePiece.GamePiecePropertyType currentType = parseGamePiecePropertyType(collectorProperty);\n gp.changeProperty(currentType, collectorValue);\n\n //Reset collectors\n collectorProperty = \"\";\n collectorValue = \"\";\n }else if(readingProperty){\n collectorProperty += c;\n }else if(readingValue){\n collectorValue += c;\n }\n }\n\n return gp;\n }", "static void trial4() {\n ModelBuilder modelBuilder = new ModelBuilder();\n Model cubeModel = modelBuilder.createBox(\n 5f,\n 5f,\n 5f,\n new Material( ColorAttribute.createDiffuse(Color.GREEN) ),\n Usage.Position);\n Mesh cubeMesh = cubeModel.meshes.get(0);\n\n // There are 36 vertex indices\n // I take it this is because there are 2 triangle per face\n // 3 x 2 x 6 = 36\n System.err.println(cubeMesh.getNumIndices());\n\n short[] cubeIndices = new short[36];\n cubeMesh.getIndices(cubeIndices);\n for (int i = 0; i < 36; i+=3) {\n for (int j = 0; j <= 2; j++) {\n System.err.printf(\"%3d \", cubeIndices[i+j]);\n }\n System.err.println();\n }\n\n }", "public CubieCube inverseCube() {\n\n CubieCube clone = this.clone();\n for (int i = 0; i < edgesValues.length; i++) {\n clone.eo[i] = this.eo[clone.ep[i]];\n }\n for (int i = 0; i < cornerValues.length; i++) {\n char ori = this.co[clone.cp[i]];\n if (ori >= 3)\n clone.co[i] = ori;\n else {\n clone.co[i] = (char) -ori;\n if (clone.co[i] < 0)\n clone.co[i] += 3;\n }\n }\n return clone;\n }", "@Override\n public void visit(ASTCube node, Object data) throws Exception {\n getOutput(data).delete(getOutput(data).length() - 2, getOutput(data).length());\n\n getOutput(data).append(\" from \");\n\n Set<String> tables = new HashSet<String>();\n\n tables.add(TranslationUtils.tableExpression(getQueryMetadata(data).getCube().getSchemaName(),\n getQueryMetadata(data).getCube().getTableName()));\n\n for (Level level : levelsPresent((TranslationContext) data))\n for (Level lowerLevel : level.getLowerLevels())\n tables.add(TranslationUtils.tableExpression(lowerLevel.getSchemaName(), lowerLevel.getTableName()));\n\n for (String table : tables)\n getOutput(data).append(table).append(\", \");\n\n if (!tables.isEmpty())\n getOutput(data).delete(getOutput(data).length() - 2, getOutput(data).length());\n\n getOutput(data).append(\" where \");\n\n whereExpression((TranslationContext) data);\n }", "public static void main(String[] args) {\n Cube cube1 = new Cube(5);\n // call one of methods for class instance\n // cube1.toConsole();\n\n // Create cube instance via AbstractFactory\n IGeometry cube2 = AbstractFactory.create(10, Figure.CUBE);\n System.out.println(cube2.getPerimeter());\n }", "public static Vect3 make(double x, double y, double z) {\n\t\treturn new Vect3(Units.from(\"NM\",x),Units.from(\"NM\",y),Units.from(\"ft\",z));\n\t}", "@LargeTest\n public void testColorCube() {\n TestAction ta = new TestAction(TestName.COLOR_CUBE);\n runTest(ta, TestName.COLOR_CUBE.name());\n }", "public CubeMaterial asMaterial() {\n if(mat != null) return mat;\n \n mat = new CubeMaterial();\n mat.setTexture(this);\n return mat;\n }", "public final AstValidator.cube_by_expr_list_return cube_by_expr_list() throws RecognitionException {\n AstValidator.cube_by_expr_list_return retval = new AstValidator.cube_by_expr_list_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n AstValidator.cube_by_expr_return cube_by_expr143 =null;\n\n\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:336:2: ( ( cube_by_expr )+ )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:336:4: ( cube_by_expr )+\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:336:4: ( cube_by_expr )+\n int cnt38=0;\n loop38:\n do {\n int alt38=2;\n int LA38_0 = input.LA(1);\n\n if ( (LA38_0==BIGDECIMALNUMBER||LA38_0==BIGINTEGERNUMBER||LA38_0==CUBE||LA38_0==DIV||LA38_0==DOLLARVAR||LA38_0==DOUBLENUMBER||LA38_0==FALSE||LA38_0==FLOATNUMBER||LA38_0==GROUP||LA38_0==IDENTIFIER||LA38_0==INTEGER||LA38_0==LONGINTEGER||LA38_0==MINUS||LA38_0==NULL||LA38_0==PERCENT||LA38_0==PLUS||LA38_0==QUOTEDSTRING||LA38_0==STAR||LA38_0==TRUE||(LA38_0 >= BAG_VAL && LA38_0 <= BIN_EXPR)||(LA38_0 >= CASE_COND && LA38_0 <= CASE_EXPR)||(LA38_0 >= CAST_EXPR && LA38_0 <= EXPR_IN_PAREN)||LA38_0==FUNC_EVAL||LA38_0==INVOKER_FUNC_EVAL||(LA38_0 >= MAP_VAL && LA38_0 <= NEG)||LA38_0==TUPLE_VAL) ) {\n alt38=1;\n }\n\n\n switch (alt38) {\n \tcase 1 :\n \t // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:336:4: cube_by_expr\n \t {\n \t _last = (CommonTree)input.LT(1);\n \t pushFollow(FOLLOW_cube_by_expr_in_cube_by_expr_list1472);\n \t cube_by_expr143=cube_by_expr();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) \n \t adaptor.addChild(root_0, cube_by_expr143.getTree());\n\n\n \t if ( state.backtracking==0 ) {\n \t }\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt38 >= 1 ) break loop38;\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n EarlyExitException eee =\n new EarlyExitException(38, input);\n throw eee;\n }\n cnt38++;\n } while (true);\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public BranchGroup cubo2(){\n\t\t\tBranchGroup objRoot = new BranchGroup();\n\n\t TransformGroup objScale = new TransformGroup();\n\t Transform3D t3d = new Transform3D();\n\t Transform3D rotate = new Transform3D();\n Transform3D tempRotate = new Transform3D();\n\t \t rotate.rotX(Math.PI/1.0d);\n tempRotate.rotY(Math.PI/1.80d);\n Matrix3d n = new Matrix3d();\n Vector3d op = new Vector3d(.2,.05,.2);\n tempRotate.setScale(op);\n Vector3d op2 = new Vector3d(.5,.6,.5);\n tempRotate.setTranslation(op2);\n rotate.mul(tempRotate);\n // rotate.mul(objScale);\n TransformGroup objRotate = new TransformGroup(rotate);\n \n //objRotate.addChild(new ColorCube(0.4));\n objRoot.addChild(objRotate);\n\t \n t3d.mul(rotate);\n\t objScale.setTransform(t3d);\n\t \n\t objRoot.addChild(objScale);\n\n\tTransformGroup objTrans = new TransformGroup();\n\t\tobjTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);\n\t\tobjTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);\n\t\t\t\t\t\n\t\t\n\t\tobjScale.addChild(objTrans);\n\n\t\tint flags = ObjectFile.RESIZE;\n\t\tif (!noTriangulate) flags |= ObjectFile.TRIANGULATE;\n\t\tif (!noStripify) flags |= ObjectFile.STRIPIFY;\n\t\tObjectFile f = new ObjectFile(flags, \n\t\t (float)(creaseAngle * Math.PI / 180.0));\n\t\tScene s = null;\n\t\ttry {\n\t\t s = f.load(filename);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\tcatch (ParsingErrorException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\tcatch (IncorrectFormatException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\t \n\t\tobjTrans.addChild(s.getSceneGroup());\n\t\t\n \n \n\t\tBoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);\n\n\n\t \n\t // Set up the background\n\t Color3f bgColor = new Color3f(0.05f, 0.05f, 0.5f);\n\t Background bgNode = new Background(bgColor);\n\t bgNode.setApplicationBounds(bounds);\n\t objRoot.addChild(bgNode);\n\n\t\treturn objRoot;\n\t\t \n\t }", "RubiksCubeModel(\n List<Colour> frontColours,\n List<Colour> leftColours,\n List<Colour> backColours,\n List<Colour> rightColours,\n List<Colour> topColours,\n List<Colour> bottomColours) {\n }", "public static DataCube generateDataCubeFromImageSpecifier(String imageSpecifier) throws IOException {\n\t\treturn imageSpecifier.contains(\"%\") ? \n\t\t\t\t\tgenerateDataCubeFromMonochromeImages(imageSpecifier) :\n\t\t\t\t\tgenerateDataCubeFromColourImage(imageSpecifier);\n\t}", "private static DataCube generateDataCubeFromColourImage(String filename) throws IOException {\n\t\t// Get an image from the filename\n\t\tBufferedImage image = ImageIO.read(new File(filename));\n\t\t\n\t\t// Read meta data from image and create a data cube\n\t\tint width = image.getWidth();\n\t\tint height = image.getHeight();\n\t\tDataCube dc = new DataCube();\n\t\tdc.width = width;\n\t\tdc.height = height;\n\t\tdc.depth = 3;\n\t\tdc.dataCube = new short[width][height][3];\n\t\t\n\t\t// Read all of the data from the image into the datacube data\n\t\tfor (int i = 0; i < width; i++) {\n\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\t\tint colour = image.getRGB(i, j);\n\t\t\t\tdc.dataCube[i][j][0] = (short) ((colour >> 16) & 0xFF);\n\t\t\t\tdc.dataCube[i][j][1] = (short) ((colour >> 8) & 0xFF);\n\t\t\t\tdc.dataCube[i][j][2] = (short) ((colour >> 0) & 0xFF);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// We've loaded all the data, so return the data cube\n\t\treturn dc;\n\t}", "public final AstValidator.cube_item_return cube_item() throws RecognitionException {\n AstValidator.cube_item_return retval = new AstValidator.cube_item_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n AstValidator.rel_return rel131 =null;\n\n AstValidator.cube_by_clause_return cube_by_clause132 =null;\n\n\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:320:2: ( rel ( cube_by_clause ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:320:4: rel ( cube_by_clause )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_rel_in_cube_item1386);\n rel131=rel();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, rel131.getTree());\n\n\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:320:8: ( cube_by_clause )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:320:10: cube_by_clause\n {\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_cube_by_clause_in_cube_item1390);\n cube_by_clause132=cube_by_clause();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, cube_by_clause132.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public static ValidationError validateFinanceCubeDetails(FinanceCubeDetailsDTO financeCubeDetailsDTO, FinanceCubeImpl financeCubeImpl) {\n ValidationError error = new ValidationError();\n validateChangeManagement(error, financeCubeDetailsDTO.isInsideChangeManagement(), financeCubeDetailsDTO.isChangeManagementOutstanding());\n validateVisId(error, financeCubeDetailsDTO.getFinanceCubeVisId().length());\n validateDescription(error, financeCubeDetailsDTO.getFinanceCubeDescription().length());\n validateDataTypesSize(error, financeCubeDetailsDTO.getDataTypes());\n validateBudgetTransferDataTypes(error, financeCubeDetailsDTO.getDataTypes(), financeCubeImpl);\n validateMappedDataTypes(error, financeCubeDetailsDTO.getDataTypes(), financeCubeImpl);\n return error;\n }", "public VOCSesame (String obj) {\n String result = this.sesameClient (obj);\n this.parseResultXML (result);\n }", "private void construct(){\n TriangleMesh mesh;\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/bunny.obj\");\n mesh.setMaterial(new MaterialNode(0.1f, 0.1f, .5f, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/cube.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 1, 0, 0));\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/teddy.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 0, 1, 0));\n mesh.setMaterial(new MaterialNode(0.1f, .5f, 0.1f, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/sphere.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 1, 1, 0));\n mesh.setMaterial(new MaterialNode(1, 0, 0, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n scene.calculateNormals();\n scene.setupRendering();\n }", "public ParseTreeNode visit(CubeNode cubeNode) {\n return null;\n }", "public CubeEscape() {\n currentRoom = MapGenerator.generateRandomMap(MapGenerator.CUBE_LENGTH_HARD);\n parser = new Parser();\n finished = false; \n }", "public static void assertCubeFace(Cube cube, CubeColor face, String colors) {\r\n CubeFace cubeFace = cube.getFace(face);\r\n assertFace(cubeFace, colors);\r\n }", "public static StreamContainer convert(String S) throws ContainerFormatException {\n\t\tif (S.isEmpty()) throw new ContainerFormatException(-1, \"String vacio.\");\n\t\tInteger i = 0;\n\t\tVector<Integer> V = new Vector<Integer>();\n\t\tString aux = \"\";\n\t\twhile (S.charAt(i) != ':') {\n\t\t\taux += S.charAt(i);\n\t\t\t++i;\n\t\t\tif (i >= S.length()) throw new ContainerFormatException(\"Formato de contenedor invalido.\");\n\t\t}\n\t\tInteger n;\n\t\ttry {\n\t\t\tn = Integer.parseInt(aux);\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new ContainerFormatException(e.getMessage());\n\t\t}\n\t\t++i;\n\t\tfor (Integer j = 0; j < n; ++j) {\n\t\t\taux = \"\";\n\t\t\twhile (S.charAt(i) != ';') {\n\t\t\t\taux += S.charAt(i);\n\t\t\t\t++i;\n\t\t\t\tif (i >= S.length()) throw new ContainerFormatException(\"Formato de contenedor invalido.\");\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tV.add(Integer.parseInt(aux));\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tthrow new ContainerFormatException(e.getMessage());\n\t\t\t}\n\t\t\t++i;\n\t\t\tif (i >= S.length()) throw new ContainerFormatException(\"Formato de contenedor invalido.\");\n\t\t}\n\n\t\tS = S.substring(i, S.length());\n\t\tif (S.length() < V.lastElement()) throw new ContainerFormatException(-1, \"Longitud del contenedor incorrecta.\");\n\t\tStreamContainer SC = new StreamContainer(S, V);\n\t\tfor (Integer k = 1; k < V.size(); ++k) {\n\t\t\ttry {\n\t\t\t\tSC.elementAt(k);\n\t\t\t} catch (ObjectFormatException e) {\n\t\t\t\tthrow new ContainerFormatException(k, e.getMessage());\n\t\t\t}\n\t\t}\n\t\treturn new StreamContainer(S, V);\n\t}", "public SpriteConstructor getSpriteConstructor(String type) {\n\t\tSpriteConstructor constructor = spriteFactoryMap.get(type);\n\t\tif(constructor == null) throw ParserException.SYNTAX_ERROR;\n\t\treturn constructor;\n\t}", "public void loadCubeAndNeighbors(int cubeX, int cubeY, int cubeZ) {\n\t\tloadCube(cubeX, cubeY, cubeZ);\n\t\t\n\t\t// load the neighbors\n\t\tloadCube(cubeX - 1, cubeY - 1, cubeZ - 1);\n\t\tloadCube(cubeX - 1, cubeY - 1, cubeZ + 0);\n\t\tloadCube(cubeX - 1, cubeY - 1, cubeZ + 1);\n\t\tloadCube(cubeX + 0, cubeY - 1, cubeZ - 1);\n\t\tloadCube(cubeX + 0, cubeY - 1, cubeZ + 0);\n\t\tloadCube(cubeX + 0, cubeY - 1, cubeZ + 1);\n\t\tloadCube(cubeX + 1, cubeY - 1, cubeZ - 1);\n\t\tloadCube(cubeX + 1, cubeY - 1, cubeZ + 0);\n\t\tloadCube(cubeX + 1, cubeY - 1, cubeZ + 1);\n\t\t\n\t\tloadCube(cubeX - 1, cubeY + 0, cubeZ - 1);\n\t\tloadCube(cubeX - 1, cubeY + 0, cubeZ + 0);\n\t\tloadCube(cubeX - 1, cubeY + 0, cubeZ + 1);\n\t\tloadCube(cubeX + 0, cubeY + 0, cubeZ - 1);\n\t\tloadCube(cubeX + 0, cubeY + 0, cubeZ + 1);\n\t\tloadCube(cubeX + 1, cubeY + 0, cubeZ - 1);\n\t\tloadCube(cubeX + 1, cubeY + 0, cubeZ + 0);\n\t\tloadCube(cubeX + 1, cubeY + 0, cubeZ + 1);\n\t\t\n\t\tloadCube(cubeX - 1, cubeY + 1, cubeZ - 1);\n\t\tloadCube(cubeX - 1, cubeY + 1, cubeZ + 0);\n\t\tloadCube(cubeX - 1, cubeY + 1, cubeZ + 1);\n\t\tloadCube(cubeX + 0, cubeY + 1, cubeZ - 1);\n\t\tloadCube(cubeX + 0, cubeY + 1, cubeZ + 0);\n\t\tloadCube(cubeX + 0, cubeY + 1, cubeZ + 1);\n\t\tloadCube(cubeX + 1, cubeY + 1, cubeZ - 1);\n\t\tloadCube(cubeX + 1, cubeY + 1, cubeZ + 0);\n\t\tloadCube(cubeX + 1, cubeY + 1, cubeZ + 1);\n\t}", "public Mesh load(String filename)\r\n\t{\r\n\t\tMesh mesh = new Mesh(); mesh.addFileMetaData(filename);\r\n \r\n\t\t//Open file and read in vertices/faces\r\n\t\tScanner sc;\r\n\t\tString line;\r\n\t\t\r\n\t\ttry{\r\n\t\t\tBufferedReader ins = new BufferedReader(new FileReader(filename));\r\n\t\t\tins.readLine(); //ID; always \"nff\"\r\n\t\t\tins.readLine(); //Version\r\n\t\t\t\r\n\t\t\t//We need to move through the header to find the start of the first object\r\n\t\t\t//This will be the first line that contains text that does not start with\r\n\t\t\t//\"viewpos\" or \"viewdir\" (optional features) or \"//\" (comment)\r\n\t\t\twhile(true){\r\n\t\t\t\tline = ins.readLine();\r\n\t\t\t\tsc = new Scanner(line);\r\n\t\t\t\t\r\n\t\t\t\tif(sc.hasNext() == true){\r\n\t\t\t\t\tString token = sc.next();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif((\"viewpos\".equalsIgnoreCase(token) == false) && \r\n\t\t\t\t\t\t\t(\"viewdir\".equalsIgnoreCase(token) == false) &&\r\n\t\t\t\t\t\t\t(\"//\".equals(token.substring(0, 2)) == 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\tsc.close();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tsc.close();\r\n\t\t\t\r\n\t\t\t//The rest of the file is filled up with objects\r\n\t\t\twhile(true){\r\n\t\t\t\tsc = new Scanner(line);\r\n\t\t\t\tString name = sc.next();\r\n\t\t\t\tsc.close();\r\n\t\t\t\t\r\n\t\t\t\tsc = new Scanner(ins.readLine());\r\n\r\n\t\t\t\tVector<Point> vertices = new Vector<Point>();\r\n\t\t\t\tVector<Face> faces = new Vector<Face>();\r\n\t\t\t\t\r\n\t\t\t\tint vertexCount = sc.nextInt();\r\n\t\t\t\t\r\n\t\t\t\t//We have vertexCount lines next with 3 floats per line\r\n\t\t\t\twhile(vertexCount > 0){\r\n\t\t\t\t\tsc.close();\r\n\t\t\t\t\tsc = new Scanner(ins.readLine());\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(sc.hasNextFloat() == false){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tfloat x = sc.nextFloat();\r\n\t\t\t\t\t\tfloat y = sc.nextFloat();\r\n\t\t\t\t\t\tfloat z = sc.nextFloat();\r\n\t\t\t\t\t\tvertices.add(new Point(x, y, z));\r\n\t\t\t\t\t\tvertexCount--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsc.close();\r\n\t\t\t\tsc = new Scanner(ins.readLine());\r\n\t\t\t\tint polygonCount = sc.nextInt();\r\n\t\t\t\t\r\n\t\t\t\t//We have polygonCount lines defining the faces\r\n\t\t\t\t//The first int on each line gives the number of\r\n\t\t\t\t//vertices making up that particular face\r\n\t\t\t\t//Then the indexes of those vertices are listed\r\n\t\t\t\twhile(polygonCount > 0){\r\n\t\t\t\t\tsc.close();\r\n\t\t\t\t\tsc = new Scanner(ins.readLine());\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(sc.hasNextInt() == false){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvertexCount = sc.nextInt();\r\n\t\t\t\t\t\tArrayList<Integer> al = new ArrayList<Integer>();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\twhile(vertexCount > 0){\r\n\t\t\t\t\t\t\tal.add(sc.nextInt());\r\n\t\t\t\t\t\t\tvertexCount--;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfaces.add(new Face(al));\r\n\t\t\t\t\t\tpolygonCount--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tmesh.addData(vertices, faces, -1, name);\r\n\t\t\t\t\r\n\t\t\t\t//The last thing we need to do is read up to and including\r\n\t\t\t\t//the next object's name or until we reach the end of the file\r\n\t\t\t\t\r\n\t\t\t\twhile((line = ins.readLine()) != null){\r\n\t\t\t\t\tsc.close();\r\n\t\t\t\t\tsc = new Scanner(line);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//The next non-blank line that doesn't start with \"//\" is the start of the next object\r\n\t\t\t\t\tif((sc.hasNext() == true) && (sc.next().substring(0, 2).equals(\"//\") == 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\tsc.close();\r\n\t\t\t\tif(line == null){ //EOF\r\n\t\t\t\t\tbreak;\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\treturn null; \r\n\t\t}\r\n\t\t\r\n\t\tmesh.initialize();\r\n \r\n\t\treturn mesh;\r\n\t}", "public Cube(double sideLength) {\n super.setName(\"Cube\");\n if (sideLength > 0) {\n this.sideLength = sideLength;\n } else {\n throw new IllegalArgumentException(\n \"The side length should be greater than 0.\");\n }\n }", "public static void main(String[] args) {\n\t\tPoint pt = new Point(0,0);\n\t\tSquare sq = new Square(0.0);\n\t\tCube cb = new Cube(0.0);\n\t\t\n\t\t//get input for Point object\n\t\tpt.setX(Double.parseDouble(JOptionPane.showInputDialog(null, \"Enter value for X (Point Object): \")));\n\t\tpt.setY(Double.parseDouble(JOptionPane.showInputDialog(null, \"Enter value for Y (Point Object): \")));\n\t\t\n\t\t//get input for Square object\n\t\tsq.setX(Double.parseDouble(JOptionPane.showInputDialog(null, \"Enter value for X (Square Object): \")));\n\t\tsq.setY(Double.parseDouble(JOptionPane.showInputDialog(null, \"Enter value for Y (Square Object): \")));\n\t\tsq.setSideLength((Double.parseDouble(JOptionPane.showInputDialog(null, \"Enter value for side of square (Square Object): \"))));\n\t\t\n\t\t//get input for Cube object\n\t\tcb.setX(Double.parseDouble(JOptionPane.showInputDialog(null, \"Enter value for X (Cube Object): \")));\n\t\tcb.setY(Double.parseDouble(JOptionPane.showInputDialog(null, \"Enter value for Y (Cube Object): \")));\n\t\tcb.setDepth(Double.parseDouble(JOptionPane.showInputDialog(null, \"Enter depth of cube (Cube Object): \")));\n\t\t\n\t\t//show output for 3 objects\n\t\tSystem.out.println(\"\\nOutput from Point object\");\n\t\tSystem.out.println(pt.toString());\n\t\tSystem.out.println(\"\\nOutput from Square object\");\n\t\tSystem.out.println(sq.toString());\n\t\tSystem.out.println(\"\\nOutput from Cube object\");\n\t\tSystem.out.println(cb.toString());\n\t\t\n\t\tSystem.exit(0);\n\t}", "public SoCubeWithoutTop()\n//\n////////////////////////////////////////////////////////////////////////\n{\n nodeHeader.SO_NODE_CONSTRUCTOR();\n\n nodeHeader.SO_NODE_ADD_SFIELD(width,\"width\", (2.0f));\n nodeHeader.SO_NODE_ADD_SFIELD(height,\"height\", (2.0f));\n nodeHeader.SO_NODE_ADD_SFIELD(depth,\"depth\", (2.0f));\n\n isBuiltIn = true;\n\n if (nodeHeader.SO_NODE_IS_FIRST_INSTANCE()) {\n // Initialize corner coordinate values\n coords[0].setValue(-1.0f, 1.0f, -1.0f); // Left Top Back\n coords[1].setValue( 1.0f, 1.0f, -1.0f); // Right Top Back\n coords[2].setValue(-1.0f, -1.0f, -1.0f); // Left Bottom Back\n coords[3].setValue( 1.0f, -1.0f, -1.0f); // Right Bottom Back\n coords[4].setValue(-1.0f, 1.0f, 1.0f); // Left Top Front\n coords[5].setValue( 1.0f, 1.0f, 1.0f); // Right Top Front\n coords[6].setValue(-1.0f, -1.0f, 1.0f); // Left Bottom Front\n coords[7].setValue( 1.0f, -1.0f, 1.0f); // Right Bottom Front\n\n // Initialize face vertices to point into coords. The order of\n // vertices around the faces is chosen so that the texture\n // coordinates match up: texture coord (0,0) is at the first\n // vertex and (1,1) is at the third. The vertices obey the\n // right-hand rule for each face.\n verts[1][2] = verts[2][3] = verts[4][3] = coords[0];\n verts[1][3] = verts[3][2] = verts[4][2] = coords[1];\n verts[1][1] = verts[2][0] = verts[5][0] = coords[2];\n verts[1][0] = verts[3][1] = verts[5][1] = coords[3];\n verts[0][3] = verts[2][2] = verts[4][0] = coords[4];\n verts[0][2] = verts[3][3] = verts[4][1] = coords[5];\n verts[0][0] = verts[2][1] = verts[5][3] = coords[6];\n verts[0][1] = verts[3][0] = verts[5][2] = coords[7];\n\n // Initialize texture coordinates. These are for the 4 corners of\n // each face, starting at the lower left corner\n texCoords[0].setValue(0.0f, 0.0f);\n texCoords[1].setValue(1.0f, 0.0f);\n texCoords[2].setValue(1.0f, 1.0f);\n texCoords[3].setValue(0.0f, 1.0f);\n\n // Initialize face normals\n normals[0].setValue( 0.0f, 0.0f, 1.0f); // Front\n normals[1].setValue( 0.0f, 0.0f, -1.0f); // Back\n normals[2].setValue(-1.0f, 0.0f, 0.0f); // Left\n normals[3].setValue( 1.0f, 0.0f, 0.0f); // Right\n normals[4].setValue( 0.0f, 1.0f, 0.0f); // Top\n normals[5].setValue( 0.0f, -1.0f, 0.0f); // Bottom\n\n }\n}", "public static int cube(int number) {\n\t\treturn number * number * number;\r\n\t\t\r\n\t}", "private void makeCubes(int number) {\n for (int i = 0; i < number; i++) {\n // randomize 3D coordinates\n Vector3f loc = new Vector3f(\n FastMath.nextRandomInt(-20, 20),\n FastMath.nextRandomInt(-20, 20),\n FastMath.nextRandomInt(-20, 20));\n rootNode.attachChild(\n myBox(\"Cube\" + i, loc, ColorRGBA.randomColor()));\n }\n }", "public ParametrisedCuboid(String description, double width, double height, double depth, Vector3D centre, SurfaceProperty surfaceProperty, SceneObject parent, Studio studio)\n\t{\n\t\tsuper(description, parent, studio);\n\n\t\tthis.width = width;\n\t\tthis.height = height; \n\t\tthis.depth = depth;\n\n\t\tthis.centre = centre;\n\n\t\tthis.surfaceProperty = surfaceProperty;\n\n\t\t// create all the scene objects that make up this cuboid\n\t\tsetup();\n\t}", "private void moveIntoCubicle(String cubeId) {\n if(metWithHr && metDeptStaff && reviewedDeptPolicies) {\n this.cubeId = cubeId;\n this.movedIn = true;\n } else {\n System.out.println(\"Sorry, you cannot move in to a \"\n + \"cubicle until you have first met with HR \"\n + \"and then with department staff, and then reviewed\"\n + \"department policies.\");\n }\n\n }", "protected void updateCube(String player, String color, int cube){\n playBoard.setCube(player, color, cube);\n refreshCube();\n }", "public CubeEarth() {\n this(1, null);\n }", "public Cube222 () {\n\t\tstate_ = new Cubie[8];\n\t\tstate_[0] = new Cubie('O','W','G',0); // front, clockwise\n\t\tstate_[1] = new Cubie('O','W','B',1);\n\t\tstate_[2] = new Cubie('R','W','B',2);\n\t\tstate_[3] = new Cubie('R','W','G',3);\n\t\tstate_[4] = new Cubie('O','Y','G',4); // back, behind front\n\t\tstate_[5] = new Cubie('O','Y','B',5);\n\t\tstate_[6] = new Cubie('R','Y','B',6);\n\t\tstate_[7] = new Cubie('R','Y','G',7);\n\t}", "private GraphSprite parseGraph(String str) {\n ParseResult<GraphAST> result = GraphAST.parse(new StringSlice(str));\n if(result.success()) {\n GraphAST grAST = result.getAST();\n Debug.debugln(\"Parse success. Stringified version of result: \\n\" + grAST.stringify());\n return grAST.toGraph();\n }\n else {\n throw new CazgraphException(\"Could not parse graph: \" + result.getMessage());\n }\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 static Kaizen fromJson(String jsonString) {\n return new Gson().fromJson(jsonString, Kaizen.class);\n }", "public static void renderCube(double x, double y, double z, int xDim, int yDim, int zDim, int offsetU, int offsetV, IIcon icon, int flag)\n\t{\n\t\trenderCube(x, y, z, xDim, yDim, zDim, offsetU, offsetV, icon, flag, 16, 16);\n\t}", "public BranchGroup cubo1(){\n\t\t\tBranchGroup objRoot = new BranchGroup();\n\n\t TransformGroup objScale = new TransformGroup();\n\t Transform3D t3d = new Transform3D();\n\t Transform3D rotate = new Transform3D();\n Transform3D tempRotate = new Transform3D();\n\t \t rotate.rotX(Math.PI/1.0d);\n tempRotate.rotY(Math.PI/1.80d);\n Matrix3d n = new Matrix3d();\n Vector3d op = new Vector3d(.5,.05,.5);\n tempRotate.setScale(op);\n Vector3d op2 = new Vector3d(-.5,.6,1);\n tempRotate.setTranslation(op2);\n rotate.mul(tempRotate);\n TransformGroup objRotate = new TransformGroup(rotate);\n\n objRoot.addChild(objRotate);\n\t \n t3d.mul(rotate);\n\t objScale.setTransform(t3d);\n\t \n\t objRoot.addChild(objScale);\n\n\tTransformGroup objTrans = new TransformGroup();\n\t\tobjTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);\n\t\tobjTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);\n\t\t\t\t\t\n\t\t\n\t\tobjScale.addChild(objTrans);\n\n\t\tint flags = ObjectFile.RESIZE;\n\t\tif (!noTriangulate) flags |= ObjectFile.TRIANGULATE;\n\t\tif (!noStripify) flags |= ObjectFile.STRIPIFY;\n\t\tObjectFile f = new ObjectFile(flags, \n\t\t (float)(creaseAngle * Math.PI / 180.0));\n\t\tScene s = null;\n\t\ttry {\n\t\t s = f.load(filename);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\tcatch (ParsingErrorException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\tcatch (IncorrectFormatException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\t \n\t\tobjTrans.addChild(s.getSceneGroup());\n\t\t\n \n \n\t\tBoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);\n\n\t Color3f bgColor = new Color3f(0.05f, 0.05f, 0.5f);\n\t Background bgNode = new Background(bgColor);\n\t bgNode.setApplicationBounds(bounds);\n\t objRoot.addChild(bgNode);\n\n\t\treturn objRoot;\n\t\t \n\t }", "public static RCPosition parse (String text) {\n text = text.trim();\n char[] argument = text.toCharArray();\n String row = \"\", column = \"\";\n int i = 0;\n if (argument[i] == '-')\n row += argument[i++];\n while (i < argument.length && Character.isDigit(argument[i]))\n row += argument[i++];\n while (i < argument.length && !Character.isDigit(argument[i]) ) {\n if (argument[i] == '-') {\n column += argument[i++];\n break;\n }\n i++;\n }\n while (i < argument.length && Character.isDigit(argument[i]))\n column += argument[i++];\n\n if (row.equals(\"\") || column.equals(\"\"))\n throw new IllegalArgumentException(\"Can not parse argument: \" + text);\n try {\n return new RCPosition(Integer.parseInt(row), Integer.parseInt(column));\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"Can not parse argument: \" + text);\n }\n }", "@Override\n public float getCube() {\n\n int wart = 0;\n if (!roomList.isEmpty()){\n for (Room room : roomList){\n if (room instanceof Localization){\n wart += room.getCube();\n }\n }\n }\n return wart;\n }", "public static boolean isValidCube(Cube cube){\n\t\tint[] bins = new int[6];\n\t\tfor(int f = 0; f<6; f++){\n\t\t\tfor(int i = 0; i<3; i++){\n\t\t\t\tfor(int j = 0 ; j<3; j++){\n\t\t\t\t\tbins[cube.getSquare(f, i, j)]++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < bins.length; i++){\n\t\t\tif(bins[i] != 9) return false;\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "public Cubo carregaMetaDadosDeCuboDinamicamente() throws SQLException{\n\t\t\n\t\tCubo cube = new Cubo(\"Vendas_ii_Automatico\", \"localhost\", null, \"jdbc:postgresql://localhost:5432/vendas\", \"kim\", \n\t\t\t\t\"kim\", \"org.postgresql.Driver\", new Long(30000).longValue());\n\t\t\n\t\tcube.setURIService(\"http://localhost:8443/wsrf/services/cube/Cube\");\n\t\t\n\t\tCubeServiceControl.setCubeMetaData(cube);\n\t\t\n\t\tSystem.out.println(\"Cubo Criado dinamicamente:\\n\" + cube.imprimir(System.out));\n\t\t\n\t\treturn cube;\n\t}", "private static Square readSquare(String s) {\n\t\tScanner line = new Scanner(s);\n\n\t\tint x = line.nextInt();\n\t\tint y = line.nextInt();\n\t\tint vx = line.nextInt();\n\t\tint vy = line.nextInt();\n\t\tboolean isFilled = line.nextBoolean();\n\t\tint side = line.nextInt();\n\t\tColor colour = Color.rgb(line.nextInt(), line.nextInt(), line.nextInt());\n\t\tint insertionTime = line.nextInt();\n\t\tboolean willPulse = line.nextBoolean();\n\t\tline.close();\n\n\t\treturn new Square(insertionTime, x, y, vx, vy, side, colour, isFilled, willPulse);\n\t}", "Single<String> parse(String planeArticle);", "public abstract Object parseRecord(String input);", "public Mesh(String Path) {\r\n \tthis.surfaceAreaMethods.add(Object3D.MESH_SA);\r\n \tthis.volumeMethods.add(Object3D.MESH_VOL);\r\n \t\r\n vertices = new ArrayList<Vertex>();\r\n tris = new ArrayList<Triangle>();\r\n \r\n ReadFile reader = new ReadFile(Path);\r\n String[] text = new String[0];\r\n try {\r\n text = reader.OpenFile();\r\n } catch (IOException ex) {\r\n Logger.getLogger(Mesh.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n for (String text1 : text) {\r\n if (text1.length() > 0) {\r\n if (text1.charAt(0) == 'v') {\r\n text1 = text1.replaceAll(\"v\", \"\");\r\n text1 = text1.trim();\r\n String[] tmp = text1.split(\" \");\r\n if (tmp.length != 3) {\r\n System.out.println(\"Error\");\r\n } else {\r\n vertices.add(new Vertex(Double.valueOf(tmp[0]), Double.valueOf(tmp[1]), Double.valueOf(tmp[2])));\r\n }\r\n } else if (text1.charAt(0) == 'f') {\r\n text1 = text1.replaceAll(\"f\", \"\");\r\n text1 = text1.trim();\r\n String[] tmp = text1.split(\" \");\r\n if (tmp.length != 3) {\r\n System.out.println(\"Error\");\r\n } else {\r\n tris.add(new Triangle(vertices.get(Integer.valueOf(tmp[0]) - 1), vertices.get(Integer.valueOf(tmp[1]) - 1), vertices.get(Integer.valueOf(tmp[2]) - 1)));\r\n }\r\n }\r\n } else {\r\n //do nothing\r\n }\r\n }\r\n }", "public static Complex parse(String s) {\n\n Pattern pattern = Pattern.compile(\"[+-]?\\\\d*\\\\.?\\\\d+\");\n Matcher matcher = pattern.matcher(s);\n\n List<Double> values = new ArrayList<>();\n\n while (matcher.find()) {\n values.add(Double.parseDouble(matcher.group()));\n }\n\n if (values.size() == 2) {\n return new Complex(values.get(0), values.get(1));\n\n } else if (values.size() == 1) {\n if (s.charAt(s.length() - 1) == 'i') {\n if (s.charAt(s.length() - 2) == '+' || s.charAt(s.length() - 2) == '-') {\n return new Complex(values.get(0), s.charAt(s.length() - 2) == '-' ? -1 : 1);\n } else {\n return new Complex(0, values.get(0));\n }\n\n } else {\n return new Complex(values.get(0), 0);\n\n }\n } else if (s.charAt(s.length() - 1) == 'i') {\n return new Complex(0, s.charAt(0) == '-' ? -1 : 1);\n } else {\n throw new IllegalArgumentException();\n }\n }", "@Test\n public void testCreateFromProperties_String() throws Exception {\n System.out.println(\"createFromProperties\");\n \n EngineConfiguration result = EngineConfiguration.createFromProperties(propertiesName);\n assertProperties(result);\n }", "public Object stringToObject(String s, Class c){\n Gson gson = new Gson();\n Object o = gson.fromJson(s, c);\n return o;\n }", "private void parseVertex(String line) {\n\n String first_float = line.substring(2);\n first_float = first_float.trim();\n int second_space_index = first_float.indexOf(' ') + 1;\n String second_float = first_float.substring(second_space_index);\n second_float = second_float.trim();\n int third_space_index = second_float.indexOf(' ') + 1;\n String third_float = second_float.substring(third_space_index);\n third_float = third_float.trim();\n\n float vx = parseFloat(first_float.substring(0, second_space_index - 1));\n float vy = parseFloat(second_float.substring(0, third_space_index - 1));\n float vz = parseFloat(third_float);\n\n mMaxX = Math.max(mMaxX, vx);\n mMaxY = Math.max(mMaxY, vy);\n mMaxZ = Math.max(mMaxZ, vz);\n\n mMinX = Math.min(mMinX, vx);\n mMinY = Math.min(mMinY, vy);\n mMinZ = Math.min(mMinZ, vz);\n\n mVertices.add(vx);\n mVertices.add(vy);\n mVertices.add(vz);\n mLastVertexNumber++;\n\n if (mHaveMaterialColor) {\n mColors.add(mMaterialColor[0]);\n mColors.add(mMaterialColor[1]);\n mColors.add(mMaterialColor[2]);\n }\n }", "public boolean isCube(){\n\t\treturn !cubeDetectorL.get() && !cubeDetectorR.get();\n\t}", "public static Vect3 makeXYZ(double x, String ux, double y, String uy, double z, String uz) {\n\t\treturn new Vect3(Units.from(ux,x),Units.from(uy,y),Units.from(uz,z));\n\t}", "public double cube(double num) {\n\t\treturn Math.pow(num, 3);\n\t}", "public final AstValidator.cube_by_expr_return cube_by_expr() throws RecognitionException {\n AstValidator.cube_by_expr_return retval = new AstValidator.cube_by_expr_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree STAR146=null;\n AstValidator.col_range_return col_range144 =null;\n\n AstValidator.expr_return expr145 =null;\n\n\n CommonTree STAR146_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:340:2: ( col_range | expr | STAR )\n int alt39=3;\n switch ( input.LA(1) ) {\n case COL_RANGE:\n {\n alt39=1;\n }\n break;\n case BIGDECIMALNUMBER:\n case BIGINTEGERNUMBER:\n case CUBE:\n case DIV:\n case DOLLARVAR:\n case DOUBLENUMBER:\n case FALSE:\n case FLOATNUMBER:\n case GROUP:\n case IDENTIFIER:\n case INTEGER:\n case LONGINTEGER:\n case MINUS:\n case NULL:\n case PERCENT:\n case PLUS:\n case QUOTEDSTRING:\n case TRUE:\n case BAG_VAL:\n case BIN_EXPR:\n case CASE_COND:\n case CASE_EXPR:\n case CAST_EXPR:\n case EXPR_IN_PAREN:\n case FUNC_EVAL:\n case INVOKER_FUNC_EVAL:\n case MAP_VAL:\n case NEG:\n case TUPLE_VAL:\n {\n alt39=2;\n }\n break;\n case STAR:\n {\n int LA39_3 = input.LA(2);\n\n if ( (LA39_3==DOWN) ) {\n alt39=2;\n }\n else if ( (LA39_3==EOF||LA39_3==UP||LA39_3==BIGDECIMALNUMBER||LA39_3==BIGINTEGERNUMBER||LA39_3==CHUNKSIZE||LA39_3==CUBE||LA39_3==DIV||LA39_3==DOLLARVAR||LA39_3==DOUBLENUMBER||LA39_3==FALSE||LA39_3==FLOATNUMBER||LA39_3==GROUP||LA39_3==IDENTIFIER||LA39_3==INTEGER||LA39_3==LONGINTEGER||LA39_3==MINUS||LA39_3==NULL||LA39_3==PERCENT||(LA39_3 >= PIVOT && LA39_3 <= PLUS)||LA39_3==QUOTEDSTRING||LA39_3==STAR||LA39_3==TRUE||(LA39_3 >= BAG_VAL && LA39_3 <= BIN_EXPR)||(LA39_3 >= CASE_COND && LA39_3 <= CASE_EXPR)||(LA39_3 >= CAST_EXPR && LA39_3 <= EXPR_IN_PAREN)||LA39_3==FUNC_EVAL||LA39_3==INVOKER_FUNC_EVAL||(LA39_3 >= MAP_VAL && LA39_3 <= NEG)||LA39_3==TUPLE_VAL) ) {\n alt39=3;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 39, 3, input);\n\n throw nvae;\n\n }\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 39, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt39) {\n case 1 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:340:4: col_range\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_col_range_in_cube_by_expr1483);\n col_range144=col_range();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, col_range144.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 2 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:340:16: expr\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_cube_by_expr1487);\n expr145=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, expr145.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 3 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:340:23: STAR\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n STAR146=(CommonTree)match(input,STAR,FOLLOW_STAR_in_cube_by_expr1491); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n STAR146_tree = (CommonTree)adaptor.dupNode(STAR146);\n\n\n adaptor.addChild(root_0, STAR146_tree);\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n\n }\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public Measure getMeasureInstanceByName(String name) {\n\t\tBasicStoredCube last_cube = BasicCubes.get(BasicCubes.size() - 1);\n\t\tfor (int i = 0; i < last_cube.Msr.size(); i++) {\n\t\t\tMeasure msr = last_cube.Msr.get(i);\n\t\t\tif (msr.getName().equals(name))\n\t\t\t\treturn msr;\n\t\t}\n\t\treturn null;\n\t}", "protected void updateCubeOnCard(String player, String card, int cube){\n playBoard.setCubeOnCard(player, card, cube);\n if (player.equalsIgnoreCase(\"human\")){ \n switch(card){\n case\"tla\":\n redCubeOnTLA.setText(Integer.toString(playBoard.getVectCube(player, \"tla\")));\n break;\n case\"mb\":\n redCubeOnTMB.setText(Integer.toString(playBoard.getVectCube(player, \"mb\")));\n break;\n case\"tw\":\n redCubeOnTW.setText(Integer.toString(playBoard.getVectCube(player, \"tw\")));\n break;\n case\"tlb\":\n redCubeOnTLB.setText(Integer.toString(playBoard.getVectCube(player, \"tlb\")));\n break;\n default:\n break;\n }\n }\n }", "public Segment createSegmentFromString(String segmentstring) {\n\n SegmentImpl segment = new SegmentImpl();\n\n String[] chars = segmentstring.split(\"\");\n\n List<String> worldChars = Arrays.asList(chars);\n\n for (String tocken : worldChars) {\n StepImpl step = new StepImpl();\n Overlay over = null;\n\n if (tocken.equals(\"W\")) {\n over = new Sword();\n } else if (tocken.equals(\"M\")) {\n over = new MonsterImpl();\n } else if (tocken.equals(\"P\")){\n over = new Princess();\n }\n\n if (over != null) {\n step.addOverlay(over);\n }\n segment.addStep(step);\n }\n\n return segment;\n }", "public Surface(String frame,String origin,String units,float a,float b,float c,float axisAX,float axisAY,float axisAZ,float axisBX,float axisBY,float axisBZ,float axisCX,float axisCY,float axisCZ){\r\n\t\tthis(frame,origin,units,a,units,b,units,c,frame,axisAX,axisAY,axisAZ,frame,axisBX,axisBY,axisBZ,frame,axisCX,axisCY,axisCZ);\r\n\t}", "void initialize(CubeModel cube) {\n boolean [] newcopy = new boolean [6];\n boolean [][] newcopy2 = new boolean [cube.s][cube.s];\n System.arraycopy(cube.the_cube, 0,newcopy, 0, 6);\n for (int i = 0; i < cube.s; i ++) {\n System.arraycopy(cube.grid[i], 0, newcopy[i], 0, cube.s);\n }\n initialize(cube.s, cube.r, cube.c, newcopy2, newcopy);\n setChanged();\n notifyObservers();\n }", "@LargeTest\n public void testColorCube3DIntrinsic() {\n TestAction ta = new TestAction(TestName.COLOR_CUBE_3D_INTRINSIC);\n runTest(ta, TestName.COLOR_CUBE_3D_INTRINSIC.name());\n }" ]
[ "0.616775", "0.607199", "0.6008258", "0.58726525", "0.57133037", "0.56613916", "0.55549145", "0.5485664", "0.5445735", "0.53350806", "0.5309114", "0.52599645", "0.5186611", "0.5156458", "0.515106", "0.5134062", "0.5126863", "0.5103792", "0.50756055", "0.5043242", "0.50102264", "0.5003164", "0.5001733", "0.49881613", "0.4976169", "0.49138603", "0.49103433", "0.49073723", "0.48987347", "0.48962772", "0.4893096", "0.4886573", "0.48802212", "0.4876942", "0.48744085", "0.4869108", "0.48336688", "0.48138678", "0.4795261", "0.47928673", "0.47849807", "0.47749406", "0.47668654", "0.47599852", "0.47380435", "0.47335157", "0.47020167", "0.4698241", "0.46876132", "0.4684879", "0.4663482", "0.46612078", "0.46612075", "0.4660914", "0.4630751", "0.46304932", "0.46174234", "0.46171013", "0.4616954", "0.46115422", "0.45941174", "0.45908618", "0.45864537", "0.45852584", "0.45767733", "0.45701993", "0.455686", "0.45422867", "0.45356297", "0.45348808", "0.45295128", "0.4527184", "0.4524774", "0.45031267", "0.44872653", "0.4480297", "0.44782794", "0.44713143", "0.4469419", "0.44687417", "0.44659784", "0.44555768", "0.44548735", "0.44427904", "0.44390258", "0.44336945", "0.44275367", "0.4417889", "0.44099364", "0.44077396", "0.4403488", "0.4394294", "0.4385999", "0.43829224", "0.43730173", "0.43702462", "0.4369252", "0.43689728", "0.43536845", "0.43459418" ]
0.6736341
0
Takes an array of string inputs, converts to cubes, converts to puzzle
public static Puzzle convertInputArrayToPuzzle(final String[][] inputArray) { final Cube[] cubes = new Cube[Puzzle.NUM_OF_CUBES]; for (int i = 0; i < Puzzle.NUM_OF_CUBES; i++) { cubes[i] = convertInputArrayToCube(inputArray[i]); } final Puzzle puzzle = new Puzzle(cubes[0], cubes[1], cubes[2], cubes[3], cubes[4], cubes[5], cubes[6], cubes[7]); return puzzle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Puzzle inputToPuzzle() {\n Puzzle puzzle = new Puzzle();\n\n printInitialPromptMessage();\n final String choice = chooseCubeInputType();\n if (choice.equals(\"r\")) { // random set of cubes\n printRandomPromptMessage();\n puzzle = RandomController.getRandomPuzzle();\n\n } else { // user's choice of cubes\n printChoicePromptMessage();\n final String[][] inputArray = takeStdInput();\n puzzle = convertInputArrayToPuzzle(inputArray);\n }\n changeCubeInPuzzle(puzzle);\n // sc.close();\n\n return puzzle;\n }", "public RubiksCube(String[] c){\n\t\tif(c.length == 54){\n\t\t\tString[] tab = new String[c.length];\n\t\t\tfor(int i=0; i<c.length;i++){\n\t\t\t\ttab[i] = c[i];\n\t\t\t}\n\t\t\tthis.cube = tab;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Wrong input table size : \" + c.length);\n\t\t}\n\t}", "public static String[][] takeStdInput() {\n // contains all of the faces in order of acceptance\n final String[] faces = new String[] { \"front\", \"right\", \"back\", \"left\", \"top\", \"bottom\" };\n\n sc = new Scanner(System.in);\n\n // final array of colors for any given cube\n final String[][] inputArray = new String[Puzzle.NUM_OF_CUBES][Cube.NUM_OF_FACES];\n // System.out.println(Arrays.toString(inputArray));\n String[] cubeArray = new String[Cube.NUM_OF_FACES];\n for (int i = 0; i < Puzzle.NUM_OF_CUBES; i++) {\n cubeArray = new String[Cube.NUM_OF_FACES];\n System.out.println(\"Enter cube #\" + (i + 1));\n\n for (int j = 0; j < Cube.NUM_OF_FACES; j++) {\n System.out.print(\"Enter \" + faces[j] + \" face: \");\n cubeArray[j] = sc.nextLine();\n // if input is not a proper color of misspelled, prompt again and overwrite\n // array entry\n while (!isValidString(cubeArray[j]) || containsElement(cubeArray[j], cubeArray, j)) {\n System.out.println(\"Invalid input, try again.\");\n System.out.print(\"Enter \" + faces[j] + \" face: \");\n cubeArray[j] = sc.nextLine();\n }\n inputArray[i] = cubeArray;\n }\n }\n return inputArray;\n }", "public static Cube convertInputArrayToCube(final String[] inputArr) {\n final Color[] faces = new Color[Cube.NUM_OF_FACES];\n\n for (int i = 0; i < Cube.NUM_OF_FACES; i++) {\n switch (inputArr[i].toLowerCase()) {\n case \"red\":\n case \"r\":\n faces[i] = Color.RED;\n break;\n case \"orange\":\n case \"o\":\n faces[i] = Color.ORANGE;\n break;\n case \"green\":\n case \"g\":\n faces[i] = Color.GREEN;\n break;\n case \"blue\":\n case \"b\":\n faces[i] = Color.BLUE;\n break;\n case \"purple\":\n case \"p\":\n faces[i] = Color.PURPLE;\n break;\n case \"white\":\n case \"w\":\n faces[i] = Color.WHITE;\n break;\n }\n }\n return new Cube(faces[0], faces[1], faces[2], faces[3], faces[4], faces[5]);\n }", "public static void main(String[] args) throws Exception {\n Puzzle puzzle = new Puzzle(10, 10);\n ArrayList<Integer>[] row_clues = new ArrayList[puzzle.getRows()];\n ArrayList<Integer>[] column_clues = new ArrayList[puzzle.getColumns()];\n Integer[][] r_clues = {\n {1, 1, 2}, {2, 1, 3}, {2, 3}, {2, 5}, {1, 1},\n {7}, {3, 1}, {5}, {4}, {6}\n };\n Integer[][] c_clues = {\n {3, 1}, {7}, {3, 1}, {5}, {1, 3},\n {2, 1, 5}, {3, 3}, {3, 1}, {4}, {4}\n };\n for(int i = 0; i < r_clues.length; ++i) {\n row_clues[i] = new ArrayList<>(Arrays.asList(r_clues[i]));\n }\n for(int i = 0; i < c_clues.length; ++i) {\n column_clues[i] = new ArrayList<>(Arrays.asList(c_clues[i]));\n }\n puzzle.setRowClues(row_clues);\n puzzle.setColumnClues(column_clues);\n PuzzleSolver solver = new PuzzleSolver(puzzle);\n solver.solve();\n for(Board b : solver.getSolutions()) {\n System.out.println(b);\n }\n }", "public Solver(String inputFile){\r\n\tthis();\r\n\tString[][] puzzle = readPuzzle(inputFile);\r\n\t\r\n\tfor (int r = 0; r < puzzle.length; r++){\r\n\t for (int c = 0; c < puzzle[0].length; c++){\r\n\t\tboard[r][c] = new Box();\r\n\t }\r\n\t}\r\n\r\n\tfor (int r = 0; r < puzzle.length; r++){\r\n\t for (int c = 0; c < puzzle[0].length; c++){\r\n\t if (!(puzzle[c][r].equals(\"_\"))){\r\n\t\t int given = Integer.parseInt(puzzle[c][r]);\r\n\t\t assign(given, r, c);\r\n\t\t}\r\n\t }\r\n\t}\r\n }", "public static String [][] inMixColumnss(String s[][]) {\n String [][] ss=new String[4][4];\n for (int c = 0; c < 4; c++) {\n \n ss[0][c] =Integer.toHexString( (byte) (GMul(0x0E,Integer.parseInt(s[0][c], 16)) ^ GMul(0x0B, Integer.parseInt(s[1][c], 16)) ^ GMul(0x0D, Integer.parseInt(s[2][c], 16)) ^ GMul(0x09, Integer.parseInt(s[3][c], 16))) & 0xFF);\n ss[1][c] =Integer.toHexString( (byte) (GMul(0x09,Integer.parseInt(s[0][c], 16)) ^ GMul(0x0E, Integer.parseInt(s[1][c], 16)) ^ GMul(0x0B, Integer.parseInt(s[2][c], 16)) ^ GMul(0x0D, Integer.parseInt(s[3][c], 16))) & 0xFF);\n ss[2][c] =Integer.toHexString( (byte) (GMul(0x0D,Integer.parseInt(s[0][c], 16)) ^ GMul(0x09, Integer.parseInt(s[1][c], 16)) ^ GMul(0x0E, Integer.parseInt(s[2][c], 16)) ^ GMul(0x0B, Integer.parseInt(s[3][c], 16))) & 0xFF);\n ss[3][c] =Integer.toHexString( (byte) (GMul(0x0B,Integer.parseInt(s[0][c], 16)) ^ GMul(0x0D, Integer.parseInt(s[1][c], 16)) ^ GMul(0x09, Integer.parseInt(s[2][c], 16)) ^ GMul(0x0E, Integer.parseInt(s[3][c], 16))) & 0xFF);\n }\nreturn ss;\n}", "public static void main(String[] args) {\n StringBuilder result = new StringBuilder();\n Scanner sc = new Scanner(System.in);\n int testCaseCount = sc.nextInt();\n\n for(int t = 0; t < testCaseCount; t++) {\n int m = sc.nextInt();\n int n = sc.nextInt();\n int[][] grid = new int[m][n];\n gridData = new int[m][n];\n for (int i = 0; i < m; i++) {\n for(int j = 0; j < n; j++) { \n gridData[i][j] = Integer.MAX_VALUE;\n grid[i][j] = sc.nextInt();\n }\n }\n if (t != 0) {\n result.append(\"\\n\");\n }\n result.append(orangesRotting(grid));\n }\n// int[][] grid = {{2,1,1},{0,1,1},{1,0,1}};\n System.out.print(result);\n }", "public static String [][] MixColumnss(String s[][]) {\n String [][] ss=new String[4][4];\n for (int c = 0; c < 4; c++) {\n \n ss[0][c] =Integer.toHexString( (byte) (GMul(0x02,Integer.parseInt(s[0][c], 16)) ^ GMul(0x03, Integer.parseInt(s[1][c], 16)) ^ Integer.parseInt(s[2][c], 16) ^ Integer.parseInt(s[3][c], 16)) & 0xFF);\n ss[1][c] =Integer.toHexString( (byte) (Integer.parseInt(s[0][c], 16) ^ GMul(0x02, Integer.parseInt(s[1][c], 16)) ^ GMul(0x03, Integer.parseInt(s[2][c], 16)) ^ Integer.parseInt(s[3][c], 16)) & 0xFF);\n ss[2][c] =Integer.toHexString( (byte) (Integer.parseInt(s[0][c], 16) ^ Integer.parseInt(s[1][c], 16) ^ GMul(0x02, Integer.parseInt(s[2][c], 16)) ^ GMul(0x03, Integer.parseInt(s[3][c], 16))) & 0xFF);\n ss[3][c] =Integer.toHexString( (byte) (GMul(0x03, Integer.parseInt(s[0][c], 16)) ^ Integer.parseInt(s[1][c], 16) ^ Integer.parseInt(s[2][c], 16) ^ GMul(0x02, Integer.parseInt(s[3][c], 16))) & 0xFF);\n }\nreturn ss;\n}", "public static int partA(String[] input)\n {\n return runGame(input, Mode.ANALYZE3D);\n }", "private static void task3() {\n\n\n System.out.printf(\"\\nTASK 3:\\nSee the 8 puzzles generated by this \" +\n \"task.\\nEach size (5, 7, 9 & 11) has two puzzles each; one \" +\n \"with a positive k value and one with a negative k value.\\n\" +\n \"Each puzzle is provided with a corresponding visualization \" +\n \"of it's solution\\n\");\n int[] puzzleSizes = new int[]{5, 7, 9, 11};\n for (int puzzleSize : puzzleSizes){\n createT3Puzzles(puzzleSize, true);\n createT3Puzzles(puzzleSize, false);\n }\n return;\n }", "public static void main(final String[] args) throws IOException {\r\n\t\tString str;\r\n\t\tfinal FileInputStream in = new FileInputStream(\"C:\\\\git\\\\AoC2018\\\\Dag17\\\\src\\\\dag17\\\\input1.txt\");\r\n\t\tfinal BufferedReader br = new BufferedReader(new InputStreamReader(in));\r\n\t\twhile ((str = br.readLine()) != null) {\r\n\t\t\tinput.add(str);\r\n\t\t}\r\n\t\tbr.close();\r\n\t\t// precalculated dimensions\r\n\t\tint tempX;\r\n\t\tint tempY;\r\n\t\tint tempX2;\r\n\t\tint tempY2;\r\n\t\tdimensionX = maxX - minX + 5;\r\n\t\tdimensionY = maxY + 1;\r\n\t\tg = new char[dimensionX][dimensionY];// maxx-minx+3,maxy+1\r\n\t\tint sourceX = 500 - minX + 1;// 500-minx+1\r\n\t\tfor (int j = 0; j < dimensionY; j++) {\r\n\t\t\tfor (int i = 0; i < dimensionX; i++) {\r\n\t\t\t\tg[i][j] = '.';\r\n\t\t\t}\r\n\t\t}\r\n\t\tg[sourceX][0] = '+';\r\n\t\tString inp[];\r\n\t\tfor (String s : input) {\r\n\t\t\tinp = s.split(\" \");\r\n\t\t\tif (s.substring(0, 2).equals(\"x=\")) {\r\n\t\t\t\ttempX = Integer.valueOf(inp[0].substring(2, inp[0].length() - 1));\r\n\t\t\t\tif (tempX > maxX) {\r\n\t\t\t\t\tmaxX = tempX;\r\n\t\t\t\t}\r\n\t\t\t\tif (tempX < minX) {\r\n\t\t\t\t\tminX = tempX;\r\n\t\t\t\t}\r\n\t\t\t\tinp = inp[1].substring(2, inp[1].length()).split(\"[.]\");\r\n\t\t\t\ttempY = Integer.valueOf(inp[0]);\r\n\t\t\t\ttempY2 = Integer.valueOf(inp[2]);\r\n\t\t\t\tif (tempY2 > maxY) {\r\n\t\t\t\t\tmaxY = tempY2;\r\n\t\t\t\t}\r\n\t\t\t\tif (tempY < minY) {\r\n\t\t\t\t\tminY = tempY;\r\n\t\t\t\t}\r\n\t\t\t\tfor (int i = tempY; i <= tempY2; i++) {\r\n\t\t\t\t\tg[tempX - minX + 2][i] = '#';\r\n\t\t\t\t}\r\n\t\t\t} else { // y\r\n\t\t\t\ttempY = Integer.valueOf(inp[0].substring(2, inp[0].length() - 1));\r\n\t\t\t\tif (tempY > maxY) {\r\n\t\t\t\t\tmaxY = tempY;\r\n\t\t\t\t}\r\n\t\t\t\tif (tempY < minY) {\r\n\t\t\t\t\tminY = tempY;\r\n\t\t\t\t}\r\n\t\t\t\tinp = inp[1].substring(2, inp[1].length()).split(\"[.]\");\r\n\t\t\t\ttempX = Integer.valueOf(inp[0]);\r\n\t\t\t\ttempX2 = Integer.valueOf(inp[2]);\r\n\t\t\t\tif (tempX2 > maxX) {\r\n\t\t\t\t\tmaxX = tempX2;\r\n\t\t\t\t}\r\n\t\t\t\tif (tempX < minX) {\r\n\t\t\t\t\tminX = tempX;\r\n\t\t\t\t}\r\n\t\t\t\tfor (int i = tempX; i <= tempX2; i++) {\r\n\t\t\t\t\tg[i - minX + 2][tempY] = '#';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"maxX \" + maxX + \" maxY \" + maxY);\r\n\t\tSystem.out.println(\"minX \" + minX + \" minY \" + minY);\r\n\r\n\t\t// start: travel down from pointOfOrigin, mark with | until reach # or ~\r\n\t\t// first to reach maxY it ends\r\n\t\t// mark | both sides until hit # or get to freefall if beneath is (. or | ) then\r\n\t\t// call start\r\n\t\t// if enclosed by # mark all with ~\r\n\t\t// repeat until reach maxY\r\n\r\n\t\tint yolo = 0;\r\n\t\twhile (!fill(sourceX, 1)) {\r\n//\t\t\tif(yolo++ % 100 == 0) {\r\n//\t\t\t\tprint();\r\n//\t\t\t}\r\n\t\t}\r\n//\t\tprint();\r\n\t\tyolo = totalWaterTiles() - minY;\r\n//\t\tSystem.out.println(\"Wet tiles >31649 : \" + yolo);\r\n\t\tint oldYolo = 0;\r\n\t\twhile (oldYolo < yolo) {\r\n\t\t\toldYolo = yolo;\r\n\t\t\tSystem.out.println(\"YOLO!\");\r\n\t\t\tfill(sourceX, 1);\r\n\t\t\tyolo = totalWaterTiles() - minY;\r\n\t\t}\r\n\t\tprint();\r\n\t\tSystem.out.println(\"Wet tiles >31649 <32214: \" + yolo);\r\n\t\tSystem.out.println(\"Wet Still water tiles : \" + totalStillWaterTiles());\r\n\t}", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\t\n\t\tint cases = s.nextInt();\n\t\t\n\t\tfor(int a=0;a<cases;a++){\n\t\t\trow = s.nextInt();\n\t\t\tcol = s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tt = new Tile[row][col];\n\t\t\t//read data of tiles\n\t\t\tfor (int r=0;r<row;r++){\n\t\t\t\tStringBuffer sb = new StringBuffer(s.nextLine());\n\t\t\t\tfor(int c=0;c<col;c++){\n\t\t\t\t\tchar tem = sb.charAt(c);\n\t\t\t\t\t\n\t\t\t\t\tif(tem=='S'){\n\t\t\t\t\t\trowS = r;\n\t\t\t\t\t\tcolS = c;\n\t\t\t\t\t\tt[rowS][colS] = new Tile(false);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(tem=='W'){\n\t\t\t\t\t\trowW = r;\n\t\t\t\t\t\tcolW = c;\n\t\t\t\t\t\tt[rowW][colW] = new Tile(false);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(tem=='*'||tem=='#'){\n\t\t\t\t\t\tt[r][c]=new Tile(true);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tt[r][c]=new Tile(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//after reading\n\t\t\tif(dfs(rowS,colS))\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\n\t}", "public static void makePieces() {\n\t\tPiece[] pieces = new Piece[35];\n\t\tfor (int i = 0; i < pieces.length; i++) {\n\t\t\tTile t = new Tile(false, true, 0, 0);\n\t\t\tTile f = new Tile(false, false, 0, 0);\n\t\t\tTile[][] tiles = new Tile[6][6];\n\t\t\tswitch (i) {\n\t\t\tcase 0:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, f, t, f, f }, { f, f, f, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, t, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, f, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, t, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, t, f, f, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, t, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 20:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 22:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 23:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 24:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, t, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 25:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 26:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 27:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 28:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 29:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 30:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 31:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, t, f, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 32:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 33:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 34:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tpieces[i] = new Piece(tiles);\n\t\t}\n\t\ttry {\n\t\t\tFileOutputStream saveFile = new FileOutputStream(\"pieces.data\");\n\t\t\tObjectOutputStream save = new ObjectOutputStream(saveFile);\n\t\t\tsave.reset();\n\t\t\tsave.writeObject(pieces);\n\t\t\tsave.close();\n\t\t} catch (Exception exc) {\n\t\t\texc.printStackTrace(); // If there was an error, print the info.\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tString[] arrayCiutats = {\"Barcelona\", \"Madrid\", \"Valencia\", \"Malaga\", \"Cadis\", \"Santander\"};\n\t\t\n\t\t// Crear Array bidimensional amb tants Arrays com ciutats hi ha\n\t\tchar[][] ciutats = new char[arrayCiutats.length][];\n\t\t\n\t\t\n\t\t// For loop iterant per la primera dimensió de l'Array ciutats\n\t\tfor(int i=0; i<ciutats.length; i++) {\n\t\t\t\n\t\t\tciutats[i] = new char[arrayCiutats[i].length()];\t// La mida de cada Array és la llargada de cada String\n\t\t\t\n\t\t\tint z=arrayCiutats[i].length() - 1;\t\t\t\t\t// Iterador per retrocedir en els char de cada String de arrayCiutats\n\t\t\t\n\t\t\t\n\t\t\t// For loop iterant per la segona dimensió de l'Array ciutats\n\t\t\tfor(int j=0; j<ciutats[i].length; j++) {\n\t\t\t\t\n\t\t\t\tchar[] city = arrayCiutats[i].toCharArray();\t// Crear Array amb els char de cada String de arrayCiutats\n\t\t\t\t\n\t\t\t\tciutats[i][j] = city[z];\t\t\t\t\t\t// Guardar el valor en decrement de city en la posició en increment de ciutats\n\t\t\t\t\n\t\t\t\tz--;\t\t\t\t\t\t\t\t\t\t\t// Retrocedir una posició en els char de city\n\t\t\t}\n\t\t\t\n\t\t\t// Imprimir en consola els nous Arrays amb els noms invertis\n\t\t\tSystem.out.println(\"El nom invertit de \" + arrayCiutats[i] + \" és: \" + new String(ciutats[i]));\n\t\t}\n\t\t\n\t}", "public static void loopProblemSolver(String[] userInput){\n\t\t//Repeat for all entries in the array.\n\t\tfor( int i = 0; i < userInput.length; i++){\n\t\t\tuserInput[i] = userInput[i];\n\t\t\t//Since the array goes \"WORD SUFFIX\", only every other entry is a word (even numbered entries).\n\t\t\tif(i % 2 == 0){\n\t\t\t\t//Display to the user all of the information. Functions are called which return the expected values.\n\t\t\t\t// i is the word, i+1 is the suffix of that word.\n\t\t\t\tSystem.out.println(\"----------------------\");\n\t\t\t\tSystem.out.println(\"Org. String: \" + userInput[i] + \" \" + userInput[i+1]);\n\t\t\t\tSystem.out.println(\"Plural Form: \" + createPluralWord(userInput[i]));\n\t\t\t\tSystem.out.println(\"With Suffix: \" + appendSuffix(userInput[i], userInput[i+1]));\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(Messages.getString(\"dddcube.stringkey.8\")); //$NON-NLS-1$\n\t\tdddcube dr = new dddcube();\n\t\tfor (int count = 0; depth >= 0 && depth < 32; ++count) {\n\t\t\tdr.rec_fill();\n\t\t\t// showSolution();\n\t\t\t// dr.toString();\n\t\t\tif (count == 100000) {\n\t\t\t\tSystem.out.println(Messages.getString(\"dddcube.stringkey.2\")); //$NON-NLS-1$\n\t\t\t\tshowSolution();\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\t\tshowSolution();\n\t\tSystem.out.println(Messages.getString(\"dddcube.stringkey.9\")); //$NON-NLS-1$\n\t}", "public static void main(String[] args) {\n\t\tint[][] maps = \n\t\t\t{\n\t\t\t\t\t{1,0,1,1,1},\n\t\t\t\t\t{1,0,1,0,1},\n\t\t\t\t\t{1,0,1,1,1},\n\t\t\t\t\t{1,1,1,0,1},\n\t\t\t\t\t{0,0,0,0,1}\n\t\t\t};\n\t\tSystem.out.println(solution(maps));\n\t}", "protected String toTest(String[] input, EditorDataType[] types)\r\n\t{\r\n\t\tString ret = translateObject(types[0], input[0]);\r\n\t\tfor (int i=1; i<input.length; i++)\r\n\t\t\tret += \", \" + translateObject(types[i], input[i]);\r\n\t\tret = ret.replaceAll(\"\\\\n\", \"\");\r\n\t\treturn ret;\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\t\r\n\t\tint numZonas;\r\n\t\tSystem.out.println(\"¿Cuantas zonas hay?\");\r\n\t\tnumZonas = sc.nextInt();\r\n\t\t\r\n\t\tString añadir;\r\n\t\tint añadirZona = 0;\r\n\t\tint [][] densidadArea = new int [2][numZonas];\r\n\t\tint [][] denAreaExtra = new int[2][numZonas + añadirZona];\r\n\t\tString [] lugares = new String [numZonas];\r\n\t\tString [] lugaresExtra = new String [numZonas + añadirZona];\r\n\t\t\r\n\t\tfor (int i = 0 ; i < numZonas ; i++) {\r\n\t\t\tSystem.out.println(\"Introduce el nombre de la zona: \");\r\n\t\t\tlugares [i]= sc.next();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Introduce la densidad de la zona:\");\r\n\t\t\tdensidadArea [0][i] = sc.nextInt();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Introduce el area de la zona: \");\r\n\t\t\tdensidadArea [1][i] = sc.nextInt();\t\r\n\t\t\t\r\n\t\t\tResultados(numZonas, lugares, densidadArea);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"¿Quieres añadir más zonas? (Si/No)\");\r\n\t\tañadir = sc.next();\r\n\t\t\r\n\t\tif (añadir.equals (\"Si\")) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"¿Cuantas zonas quieres añadir?\");\r\n\t\t\tañadirZona = sc.nextInt();\r\n\t\t\tlugaresExtra = new String [numZonas + añadirZona];\r\n\t\t\t\r\n\t\t\tfor (int j = numZonas ; j < (numZonas + añadirZona) ; j++) {\r\n\t\t\t\tSystem.out.println(\"Introduce el nombre de la zona: \");\r\n\t\t\t\tlugaresExtra [j]= sc.next();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Introduce la densidad de la zona:\");\r\n\t\t\t\tdenAreaExtra [0][j] = sc.nextInt();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Introduce el area de la zona: \");\r\n\t\t\t\tdenAreaExtra [1][j] = sc.nextInt();\r\n\t\t\t\t\r\n\t\t\tResultados2(añadirZona, lugaresExtra, denAreaExtra);\r\n\t\t\t}\r\n\t\t\tnumZonas = numZonas + añadirZona;\r\n\t\t}\r\n\t\telse {\t\r\n\t\t\tSystem.out.println(\"Ya hemos terminado la consulta, gracias.\");\r\n\t\t}\r\n\t\t\r\n\t\tsc.close();\r\n\t\r\n\t\r\n\t\r\n\t}", "public void testOutputIsVaild()\n {\n Collection<Puzzle> puzzles = new ArrayList<Puzzle>();\n\n puzzles = (Collection<Puzzle>) Config.get(\"Puzzles\", puzzles);\n\n for (Puzzle puzzle : puzzles)\n {\n byte[] grid = puzzle.getData();\n GridSolver cs = new GridSolver(grid);\n cs.solveGrid();\n assertTrue(new GridChecker(cs.getDataSolution()).checkGrid());\n }\n }", "public static void main(String[] args) {\n\n int[][] blocks = new int[3][3];\n\n blocks[0][0] = 1;\n blocks[0][1] = 2;\n blocks[0][2] = 3;\n blocks[1][0] = 0;\n blocks[1][1] = 7;\n blocks[1][2] = 6;\n blocks[2][0] = 5;\n blocks[2][1] = 4;\n blocks[2][2] = 8;\n /*\n * blocks[0][0] = 1; blocks[0][1] = 2; blocks[0][2] = 3; blocks[1][0] =\n * 4; blocks[1][1] = 5; blocks[1][2] = 6; blocks[2][0] = 8; blocks[2][1]\n * = 7; blocks[2][2] = 0;\n */\n\n Board initial = new Board(blocks);\n\n // solve the puzzle\n Solver solver = new Solver(initial);\n\n // print solution to standard output\n if (!solver.isSolvable())\n StdOut.println(\"No solution possible\");\n else {\n StdOut.println(\"Minimum number of moves = \" + solver.moves());\n for (Board board : solver.solution())\n StdOut.println(board);\n }\n\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\twhile(input.hasNext()) {\n\t\t\tString player1 = input.nextLine();\n\t\t\tString player2 = input.nextLine();\n\t\t\tString com = input.nextLine();\n\t\t\tint check = input.nextInt();\n\t\t\tint[][] one = new int[3][3];\n\t\t\tint[][] two = new int[3][3];\n\t\t\tString[] split1 = player1.split(\" \");\n\t\t\tString[] split2 = player2.split(\" \");\n\t\t\tString[] split3 = com.split(\" \");\n\t\t\tint total = 0;\n\t\t\tint countA = 0;\n\t\t\tint countB = 0;\n\t\t\tfor(int i = 0; i < split3.length; i++) {\n\t\t\t\ttotal += Integer.parseInt(split3[i]);\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < 3; i++) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < 3; j++) {\n\t\t\t\t\tone[i][j] = Integer.parseInt(split1[3*i+j]);\n\t\t\t\t\tcount += one[i][j];\n\t\t\t\t}\n\t\t\t\tif(count == total) {\n\t\t\t\t\tcountA++;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\tfor(int i = 0; i < 3; i++) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < 3; j++) {\n\t\t\t\t\ttwo[i][j] = Integer.parseInt(split2[3*i+j]);\n\t\t\t\t\tcount += two[i][j];\n\t\t\t\t}\n\t\t\t\tif(count == total) {\n\t\t\t\t\tcountB++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < 3; i++) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < 3; j++) {\n\t\t\t\t\tone[j][i] = Integer.parseInt(split1[3*i+j]);\n\t\t\t\t\tcount += one[j][i];\n\t\t\t\t}\n\t\t\t\tif(count == total) {\n\t\t\t\t\tcountA++;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\tfor(int i = 0; i < 3; i++) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < 3; j++) {\n\t\t\t\t\ttwo[j][i] = Integer.parseInt(split2[3*i+j]);\n\t\t\t\t\tcount += two[j][i];\n\t\t\t\t}\n\t\t\t\tif(count == total) {\n\t\t\t\t\tcountB++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < 3; i++) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < 3; j++) {\n\t\t\t\t\tone[i][j] = Integer.parseInt(split1[3*i+j]);\n\t\t\t\t\tif(j == 2) {\n\t\t\t\t\t\tcount += one[i][i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(count == total) {\n\t\t\t\t\tcountA++;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\tfor(int i = 0; i < 3; i++) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < 3; j++) {\n\t\t\t\t\ttwo[i][j] = Integer.parseInt(split2[3*i+j]);\n\t\t\t\t\tif(j == 2) {\n\t\t\t\t\t\tcount += two[i][i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(count == total) {\n\t\t\t\t\tcountB++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(countA == countB) {\n\t\t\t\tSystem.out.println(\"Draw\");\n\t\t\t}\n\t\t\tif(countA > countB) {\n\t\t\t\tSystem.out.println(\"Player1 wins\");\n\t\t\t}\n\t\t\tif(countA < countB) {\n\t\t\t\tSystem.out.println(\"Player2 wins\");\n\t\t\t}\n\t\t\tinput.nextLine();\n\t\t\tif(check == -1) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t}", "public static void main(String[] args) {\n Scanner ob = new Scanner(System.in);\n Solution solution = null;\n int testcases = ob.nextInt();\n ob.nextLine();\n for (int i = 0; i < testcases; i++) {\n String numsLine = ob.nextLine();\n String[] numsLineParts = numsLine.trim().split(\" \");\n int dimensions = Integer.valueOf(numsLineParts[0]);\n int numOperations = Integer.valueOf(numsLineParts[1]);\n solution = new Solution(dimensions);\n for (int j = 0; j < numOperations; j++) {\n String line = ob.nextLine();\n String[] lineParts = line.split(\" \");\n if (lineParts[0].equals(\"UPDATE\")) {\n solution.update(Integer.valueOf(lineParts[1])-1, Integer.valueOf(lineParts[2])-1, Integer.valueOf(lineParts[3])-1, Integer.valueOf(lineParts[4]));\n }\n if (lineParts[0].equals(\"QUERY\")) {\n solution.query(Integer.valueOf(lineParts[1])-1, Integer.valueOf(lineParts[2])-1, Integer.valueOf(lineParts[3])-1, Integer.valueOf(lineParts[4])-1, Integer.valueOf(lineParts[5])-1, Integer.valueOf(lineParts[6])-1);\n }\n }\n }\n }", "public static void main(String[] args) {\n\t\tString[] map = { \"0\",\"1\",\"abc\",\"def\",\"jkl\",\"mno\",\"qprs\",\"tuv\",\"wxyz\"};\n\t\tString digit = \"235\";\n\t\tArrayList<String> res = new ArrayList<String>();\n\t\tres = solve(\"\",map,0,res,digit.length(),digit);\n\t\tSystem.out.println(res);\n\n\t}", "private static ArrayList<Box> generateBoxes(ArrayList<String[]> arr){\r\n ArrayList<Box> result = new ArrayList<>();\r\n for (String[] box : arr) {\r\n result.add(new Box(box));\r\n }\r\n\r\n Collections.sort(result);\r\n\r\n return result;\r\n }", "public static void main(String[] args) {\n\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter number n: \");\n\t\tint num = input.nextInt();\n\t\tchar maxChar = (char)((int)'A' + num - 1);\n\t\t\n\t\tchar[][] list1 = new char[num][num];\n\t\t\n\t\tint i, j;\n\t\tint wrongInput = 0;\n\t\tfor (i = 0;i < list1.length;i++) {\n\t\t\tfor (j = 0;j < list1[i].length;j++) {\n\t\t\t\tlist1[i][j] = input.next().charAt(0);\n\t\t\t\t\n\t\t\t\tif (list1[i][j] > maxChar)\n\t\t\t\t\twrongInput = 1;\n\t\t\t}\n\t\t\t\n\t\t\tif (wrongInput == 1) {\n\t\t\t\tSystem.out.print(\"Wrong input: the letters must be from A to \" + maxChar);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\twrongInput = 0;\n\t\t}\n\t\t\n\t\t//calculate result\n\t\tif (isLatinsquare(list1)) {\n\t\t\tSystem.out.print(\"The input array is a Latin square\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.print(\"The input array is not a Latin square\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\tScanner sc=new Scanner(System.in);\n\t\t\n\t\tint tc=sc.nextInt();\n\t\t\n\t\tfor (int t = 1; t <= tc; t++) {\n\t\t\tN=sc.nextInt();\n\t\t\tK=sc.nextInt();\n\t\t\tP=N/4;\n\t\t\tString input=sc.next();\n\t\t\t\n\t\t\tarray=input.toCharArray();\n\t\t\t\n\t\t\tTreeSet<Long> set=new TreeSet<>();\n\t\t\t\n\t\t\t\n\t\t\tfor (int i = 0; i < P; i++) {\n\t\t\t\tString str=new String(array);\n\t\t\t\t\n\t\t\t\tfor (int j =0; j < 4; j++) {\n//\t\t\t\t\tSystem.out.println(str.substring(j*P,j*P+P));\n//\t\t\t\t\tSystem.out.println(to10(str.substring(j*P,j*P+P)));\n\t\t\t\t\tset.add(to10(str.substring(j*P,j*P+P)));\n\t\t\t\t}\n//\t\t\t\tSystem.out.println();\n\t\t\t\tmoveArray();\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i <K-1; i++) {\n\t\t\t\t\n\t\t\t\tset.pollLast();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"#\"+t+\" \"+set.pollLast());\n\t\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t}\n\t}", "public void solvePuzzle(){\n\t\t// check to make sure pieces was set\n\t\tif(possiblePieces == null){\n\t\t\tSystem.out.println(\"PuzzleThree::solvePuzzle(): possiblePieces is not initialized!\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// initialize population with random sequences\n\t\tinitializePopulation();\n\t\t\n\t\t// print header of results\n\t\tSystem.out.printf(\"%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\n\", \"Current Generation\"\n\t\t\t\t, \"Most Fit Fitness\"\n\t\t\t\t, \"Most Fit Score\"\n\t\t\t\t, \"Most Fit Generation\"\n\t\t\t\t, \"Median Fit Fitness\"\n\t\t\t\t, \"Median Fit Score\"\n\t\t\t\t, \"Median Fit Generation\"\n\t\t\t\t, \"Worst Fit Fitness\"\n\t\t\t\t, \"Worst Fit Score\"\n\t\t\t\t, \"Worst Fit Generation\");\n\t\t\n\t\t\t\t// keep culling and reproducing until time is up\n\t\twhile(!clock.overTargetTime()){\n\t\t\t// every few generations print out generation, most fit, median fit, worst fit\n\t\t\tif(generation % 5000 == 0){\n\t\t\t\tCollections.sort(population);\n\t\t\t\tBuilding mostFit = population.get(POPULATION_SIZE-1);\n\t\t\t\tBuilding medianFit = population.get((int)(POPULATION_SIZE / 2) - 1);\n\t\t\t\tBuilding worstFit = population.get(0);\n\t\t\t\tSystem.out.printf(\"%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\n\", generation, \n\t\t\t\t\t\t\t\t\tmostFit.getFitness(), mostFit.getScore(), mostFit.getGeneration(),\n\t\t\t\t\t\t\t\t\tmedianFit.getFitness(), medianFit.getScore(), medianFit.getGeneration(),\n\t\t\t\t\t\t\t\t\tworstFit.getFitness(), worstFit.getScore(), worstFit.getGeneration());\n\t\t\t}\n\t\t\t\n\t\t\t// remove a portion of the population\n\t\t\tcullPopulation();\n\t\t\t\n\t\t\t// reproduce with the fittest more likely being parents\n\t\t\treproduce();\n\t\t\t\n\t\t\tgeneration++;\n\t\t}\n\n\t\t\n\t\t// print out information about most fit\n\t\tCollections.sort(population);\n\t\tCollections.reverse(population);\n\t\tBuilding mostFit = population.get(0);\n\n\t\tSystem.out.printf(\"\\n\\nBest in population is\\n\");\n\t\tSystem.out.printf(\"Sequence: \\n\");\n\t\tfor(int i = 0; i < mostFit.getList().length; i++){\n\t\t\tSystem.out.printf(\"\\t%s\\n\", mostFit.getList()[i].toString());\n\n\t\t}\n\n\t\tSystem.out.printf(\"\\nFitness: %d\\n\", mostFit.getFitness());\n\t\tSystem.out.printf(\"Score: %d\\n\", mostFit.getScore());\n\t}", "public void cbuild(String in) {\n\r\n\t\tPattern p = Pattern.compile(\"(\\\\w+)\\\\s*\\\\[([a-zA-Z-0-9,]+)\\\\]\");\r\n\t\tMatcher mm = p.matcher(in);\r\n\t\tint i = 0;\r\n\r\n\t\twhile (mm.find()) {\r\n\t\t\ti++;\r\n\r\n\t\t\tString[] temp = mm.group(2).split(\",\");\r\n\t\t\tcliques.put(mm.group(1), new ArrayList<String>());\r\n\t\t\tfor (int j = 0; j < temp.length; j++) {\r\n\t\t\t\tcliques.get(\"c\" + i).add(temp[j]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public TETile[][] interactWithInputString(String input) {\n // passed in as an argument, and return a 2D tile representation of the\n // world that would have been drawn if the same inputs had been given\n // to interactWithKeyboard().\n //\n // See proj3.byow.InputDemo for a demo of how you can make a nice clean interface\n // that works for many different input types.\n// TERenderer ter = new TERenderer();\n// ter.initialize(WIDTH, HEIGHT);\n//\n// Long result = Long.parseLong(input);\n// long seed = result;\n// GameWorld world = new GameWorld(seed);\n// for (int x = 0; x < WIDTH; x += 1) {\n// for (int y = 0; y < HEIGHT; y += 1) {\n// world.world[x][y] = Tileset.NOTHING;\n// }\n// }\n// world.buildManyRandomSq();\n//// ter.renderFrame(world.world);\n// return world.world;\n return takeActionIS(input);\n // passed in as an argument, and return a 2D tile representation of the\n // world that would have been drawn if the same inputs had been given\n // to interactWithKeyboard().\n //\n // See proj3.byow.InputDemo for a demo of how you can make a nice clean interface\n // that works for many different input types.\n// TERenderer ter = new TERenderer();\n// ter.initialize(WIDTH, HEIGHT);\n// String str = input;\n// String[] arrofString = str.split(\"\", input.length());\n// String num = \"\";\n// for (int i = 0; i < arrofString.length; i++) {\n// if ((i == 0 && arrofString[i].equals(\"N\") || arrofString[i].equals(\"n\"))) {\n// continue;\n// } else if (i == arrofString.length - 1) {\n// if (arrofString[i].equals(\"S\") || arrofString[i].equals(\"s\")) {\n// continue;\n// }\n// } else {\n// num += arrofString[i];\n// }\n// }\n//\n// Long result = Long.parseLong(num);\n// long seed = result;\n// GameWorld world = new GameWorld(seed);\n// for (int x = 0; x < WIDTH; x += 1) {\n// for (int y = 0; y < HEIGHT; y += 1) {\n// world.world[x][y] = Tileset.NOTHING;\n// }\n// }\n// world.buildManyRandomSq();\n//// ter.renderFrame(world.world);\n// return world.world;\n\n }", "public static void main(String[] args) {\n\t\tString[] inputStrings = {\"HEART\",\"EMBER\",\"ABUSE\",\"RESIN\",\"TREND\"};\n\t\tString[][] arr = build2D(inputStrings);\n\t\tint lengthofword= inputStrings[0].length();\t//ASSUMES all words of same length. Does not verify.\n\t\tSystem.out.println(\"Input is a Word Sqaure ? \"+isSquare(arr,lengthofword));\n\t}", "@Test\n public void testBuildInverse() {\n System.out.println(\"buildInverse\");\n int xIndex = 2;\n int yIndex = 5;\n String input1 = \"6 3 1 6 5 -2 4\";\n String input2 = \"6 3 1 6 5 -2 4\";\n CCGeneticDrift instance = new CCGeneticDrift();\n List<Integer> permutation = instance.inputStringToIntegerList(input1);\n String expResult = \"[6, 3, 1, 2, -5, -6, 4]\";\n List result = instance.buildInverse(permutation, xIndex, yIndex);\n assertEquals(result.toString(), expResult);\n }", "public static void main(String[] args) \n\t{\n\t Scanner sc = new Scanner(System.in);\n\t \n\t // Input the number of test cases\n\t int t = sc.nextInt();\n\t \n\t sc.nextLine();\n\t \n\t while (t > 0)\n\t {\n\t \tint N = sc.nextInt();\n\t \t\n\t \tint[] arr = new int[N];\n\t \t\n\t \tsc.nextLine();\n\t \t\n\t \tString line = sc.nextLine();\n\t String[] lineArr = line.split(\" \");\n\n\t for (int i = 0; i < lineArr.length; i++)\n\t {\n\t \tarr[i] = Integer.parseInt(lineArr[i]);\n\t }\n\t \n\t printZigZagArray(arr);\n\n\t t--;\t \n\t }\n\t \n\t sc.close();\t\n\t}", "@Test\n public void testFindOrientedPairs() {\n System.out.println(\"findOrientedPairs\");\n \n CCGeneticDrift instance = new CCGeneticDrift();\n String input = \"6 3 1 6 5 -2 4\";\n List<Integer> numbers = instance.inputStringToIntegerList(input);\n String expResult = \"[1 -2, 3 -2]\";\n List result = instance.findOrientedPairs(numbers);\n assertEquals(result.toString(), expResult);\n assertEquals(result.size(), 2);\n }", "public static void main(String[] args) {\n Scanner in = new Scanner(new BufferedReader(new StringReader(input)));\n\n long n = in.nextLong(); // Scanner has functions to read ints, longs, strings, chars, etc.\n for (int i = 0; i < n; i++) {\n int size = in.nextInt();\n int[][] matrix = new int[size][size];\n for (int j = 0; j < size; j++) {\n for (int k = 0; k < size; k++) {\n matrix[j][k] = in.nextInt();\n }\n }\n String result = vestigium(matrix, size);\n System.out.println(\"Case #\" + (i + 1) + \": \" + result);\n }\n }", "public static String makeAlgorithm(String input) {\r\n\t\ttry {\r\n\t\t\tBufferedReader reader = new BufferedReader(new StringReader(input));\r\n\t\t\tint testCases = Integer.parseInt(reader.readLine());\r\n\t\t\tStringBuffer outputBuffer = new StringBuffer();\r\n\t\t\tfor (int i = 0; i < testCases; i++) {\r\n\t\t\t\toutputBuffer.append(\"Case #\" + (i + 1) + \": \");\r\n\t\t\t\tString[] line = reader.readLine().split(\" \");\r\n\t\t\t\tint x = Integer.parseInt(line[0]);\r\n\t\t\t\tint y = Integer.parseInt(line[1]);\r\n\t\t\t\tint movedX = 0;\r\n\t\t\t\tint movedY= 0;\r\n\t\t\t\tint p=1;\r\n\t\t\t\tfor(int j=0; j<(2*Math.abs(y))-1; j++)\r\n\t\t\t\t{\t\r\n\t\t\t\t\tif(y>0)\r\n\t\t\t\t\t\toutputBuffer.append(j%2==0?\"N\":\"S\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\toutputBuffer.append(j%2==0?\"S\":\"N\");\r\n\t\t\t\t\tif(y>0)\r\n\t\t\t\t\t\tmovedY += j%2==0?p:-p;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tmovedY += j%2==0?-p:p;\r\n\t\t\t\t\tp++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor(int j=0; j<(2*Math.abs(x))-1; j++)\r\n\t\t\t\t{\t\r\n\t\t\t\t\tif(j==0)\r\n\t\t\t\t\t\tif(x>0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\toutputBuffer.append(\"W\");\r\n\t\t\t\t\t\t\tmovedX -= p;\r\n\t\t\t\t\t\t\tp++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\toutputBuffer.append(\"E\");\r\n\t\t\t\t\t\t\tmovedX += p;\r\n\t\t\t\t\t\t\tp++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(x>0)\r\n\t\t\t\t\t\toutputBuffer.append(j%2==0?\"E\":\"W\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\toutputBuffer.append(j%2==0?\"W\":\"E\");\r\n\t\t\t\t\tif(x>0)\r\n\t\t\t\t\t\tmovedX += j%2==0?p:-p;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tmovedX += j%2==0?-p:p;\r\n\t\t\t\t\tp++;\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(movedX + \" \" + movedY);\r\n\t\t\t\toutputBuffer.append(\"\\n\");\r\n\r\n\t\t\t}\r\n\t\t\treturn outputBuffer.toString();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws Exception {\n Scanner scanner = new Scanner(System.in);\n List<int[]> poly = new ArrayList<>();\n\n while (scanner.hasNext()) {\n String nums = scanner.nextLine();\n String[] checkEdge = nums.split(\" \");\n int[] num = new int[4];\n if (checkEdge.length != 4)\n throw new Exception(\"size must be 4\");\n for (int i = 0; i < 4; i++) {\n int result = Integer.parseInt(checkEdge[i]);\n num[i] = result;\n }\n poly.add(num);\n }\n\n countPolygons(poly);\n System.out.println(SQUARE + \" \" + RECTANGLE + \" \" + OTHER);\n }", "public TETile[][] interactWithInputString(String input) {\n makeWorld();\n if (checkForLoad(input)) {\n String i = loadWorld();\n if (i.substring(0, 1).equals(\"k\")) {\n floorTile = Tileset.GRASS;\n i = i.substring(1);\n\n }\n interactWithInputString(i + input.substring(1));\n } else {\n //inputSeed = input;\n\n String seed = input.substring(1, input.indexOf('s'));\n Long seedVal = Long.parseLong(seed);\n String commands = input.substring(input.indexOf('s') + 1);\n Random r = new Random(seedVal);\n int numOfRooms = r.nextInt(7 * HEIGHT / 8) + 1;\n create(numOfRooms, r);\n createWalls();\n world[listOfRooms.get(0).p.x + ((listOfRooms.get(0).width) / 2)][listOfRooms.get(0).p.y\n + ((listOfRooms.get(0).height) / 2)] = Tileset.AVATAR;\n //world[listOfRooms.get(listOfRooms.size() - 1).p.x]\n // [listOfRooms.get(listOfRooms.size() - 1).p.y] = Tileset.FLOWER;\n avatarLocation = new Point((listOfRooms.get(0).p.x + ((listOfRooms.get(0).width) / 2)),\n listOfRooms.get(0).p.y + ((listOfRooms.get(0).height) / 2));\n //flowerLocation = new Point(listOfRooms.get(listOfRooms.size() - 1).p.x,\n // listOfRooms.get(listOfRooms.size() - 1).p.y);\n moveCharacters(commands);\n if (floorTile == Tileset.GRASS) {\n input = 'k' + input;\n }\n saveWorld(input);\n }\n return world;\n }", "public static String[][] generateBoard(String puzzle) {\n //1 2 3 8 B 4 7 6 5\n String puzzleString = puzzle.replaceAll(\"\\\\s+\", \"\");\n String[][] puzzleBoard = new String[3][3];\n for (int i = 0; i < puzzleString.length(); i++) {\n char c = puzzleString.charAt(i);\n\n if (i < 3) {\n puzzleBoard[0][i] = String.valueOf(c);\n } else if (i > 2 && i < 6) {\n puzzleBoard[1][i - 3] = String.valueOf(c);\n } else {\n puzzleBoard[2][i - 6] = String.valueOf(c);\n }\n }\n\n return puzzleBoard;\n\n\n }", "public static String sBoxes(String input) {\n\n assert input.length() == 48;\n\n StringBuilder result = new StringBuilder();\n\n int tempIndex = 0;\n String[] blocks = new String[8];\n\n for (int i = 0; i < 48; i+=6) {\n String tempBlock = input.substring(i, i+6);\n blocks[tempIndex] = tempBlock;\n tempIndex++;\n }\n\n for (int i = 0; i < 8; i++) {\n String outside = blocks[i].charAt(0) + \"\" + blocks[i].charAt(blocks[i].length() - 1);\n String inside = blocks[i].substring(1, blocks[i].length() - 1);\n\n int row = Integer.parseInt(outside, 2);\n int col = Integer.parseInt(inside, 2);\n\n int fromMap = SBoxes[i][row][col];\n String fromMapBinary = Integer.toBinaryString(fromMap);\n\n result.append(String.format(\"%4s\", fromMapBinary).replace(\" \", \"0\"));\n }\n\n return result.toString();\n }", "public void makeCube (int subdivisions)\r\n {\r\n \tfloat horz[] = new float[subdivisions + 1];\r\n \tfloat vert[] = new float[subdivisions + 1];\r\n \t\r\n \t\r\n \t// Front face\r\n \tPoint p1 = new Point(-0.5f, -0.5f, 0.5f);\r\n \tPoint p2 = new Point(0.5f, -0.5f, 0.5f);\r\n \tPoint p3 = new Point(0.5f, 0.5f, 0.5f);\r\n \tPoint p4 = new Point(-0.5f, 0.5f, 0.5f);\r\n \t\r\n \tfloat h = p1.x;\r\n \tfloat v = p1.y;\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], 0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], 0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], 0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], 0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Back face\r\n \tp1.y = p1.z = -0.5f;\r\n \tp1.x = 0.5f;\r\n \tp2.x = p2.y = p2.z = -0.5f;\r\n \tp3.x = p3.z = -0.5f;\r\n \tp3.y = 0.5f;\r\n \tp4.x = p4.y = 0.5f;\r\n \tp4.z = -0.5f;\r\n \t\r\n \th = p1.x;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], -0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], -0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], -0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], -0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Left face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.x = p2.y = -0.5f;\r\n \tp2.z = 0.5f;\r\n \tp3.x = -0.5f;\r\n \tp3.y = p3.z = 0.5f;\r\n \tp4.y = 0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(-0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(-0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(-0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(-0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Right face\r\n \tp1.x = p1.z = 0.5f;\r\n \tp1.y = -0.5f;\r\n \tp2.y = p2.z = -0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.y = p4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Top face\r\n \tp1.x = -0.5f;\r\n \tp1.y = p1.z = 0.5f;\r\n \tp2.x = p2.y = p2.z = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \tp4.y = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], 0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], 0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], 0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], 0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Bottom face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.y = p2.z = 0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.z = 0.5f;\r\n \tp3.y = -0.5f;\r\n \tp4.x = p4.y = -0.5f;\r\n \tp4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], -0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], -0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], -0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], -0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n }", "public static void stringConstructionMain(String[] args) {\n Scanner in = new Scanner(System.in);\n int q = in.nextInt();\n for(int a0 = 0; a0 < q; a0++){\n String s = in.next();\n int result = stringConstruction(s);\n System.out.println(result);\n }\n in.close();\n }", "private String theFunctionThatSolvesAllProblems(String input) throws IOException {\n\n first = new MyInt[9];\n second = new MyInt[9];\n third = new MyInt[9];\n myPointers = new MyIntPointer[7];\n\n M = new MyInt();\n D = new MyInt();\n C = new MyInt();\n L = new MyInt();\n X = new MyInt();\n V = new MyInt();\n I = new MyInt();\n\n hasI = false;\n hasX = false;\n hasC = false;\n hasM = false;\n hasV = false;\n hasL = false;\n hasD = false;\n\n firstLength = 0;\n secondLength = 0;\n thirdLength = 0;\n\n initializeEquation(input);\n\n return arabic();\n\n }", "public RubiksCube(){\n\t\tString[] c = {\n\t\t\t\t\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\n\t\t\t\t\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\n\t\t\t\t\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\n\t\t\t\t\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\n\t\t\t\t\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\n\t\t\t\t\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\n\t\t};\n\t\tthis.cube = c;\n\t}", "abstract String makeAClue(String puzzleWord);", "@Test\n public void testSolution() {\n assertArrayEquals(new int[]{3,2,1} , new Task().reverse3( new int[]{1, 2, 3}));\n assertArrayEquals(new int[]{5, 11, 9} , new Task().reverse3( new int[]{9, 11, 5}));\n assertArrayEquals(new int[]{7, 0, 0} , new Task().reverse3( new int[]{0, 0, 7}));\n assertArrayEquals(new int[]{2, 1, 2} , new Task().reverse3( new int[]{2, 1, 2}));\n assertArrayEquals(new int[]{1, 2, 1} , new Task().reverse3( new int[]{1, 2, 1}));\n assertArrayEquals(new int[]{2, 11, 3} , new Task().reverse3( new int[]{3, 11, 2}));\n assertArrayEquals(new int[]{7, 2, 3} , new Task().reverse3( new int[]{3, 2, 7}));\n\n }", "private void generateCube() {\n\t\tverts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)};\n\t\tverts[0].setElement(0, -1);\n\t\tverts[0].setElement(1, -1);\n\t\tverts[0].setElement(2, -1);\n\t\t\n\t\tverts[1].setElement(0, 1);\n\t\tverts[1].setElement(1, -1);\n\t\tverts[1].setElement(2, -1);\n\t\t\n\t\tverts[2].setElement(0, -1);\n\t\tverts[2].setElement(1, -1);\n\t\tverts[2].setElement(2, 1);\n\t\t\n\t\tverts[3].setElement(0, 1);\n\t\tverts[3].setElement(1, -1);\n\t\tverts[3].setElement(2, 1);\n\t\t\n\t\tverts[4].setElement(0, -1);\n\t\tverts[4].setElement(1, 1);\n\t\tverts[4].setElement(2, -1);\n\t\t\n\t\tverts[5].setElement(0, 1);\n\t\tverts[5].setElement(1, 1);\n\t\tverts[5].setElement(2, -1);\n\t\t\n\t\tverts[6].setElement(0, -1);\n\t\tverts[6].setElement(1, 1);\n\t\tverts[6].setElement(2, 1);\n\t\t\n\t\tverts[7].setElement(0, 1);\n\t\tverts[7].setElement(1, 1);\n\t\tverts[7].setElement(2, 1);\n\t\t\n\t\tfaces = new int[][] {{0, 3, 2}, {0, 1, 3}, {0, 4, 5}, {0, 5, 1}, {0, 2, 6}, {0, 6, 4}, {2, 7, 6}, {2, 3, 7}, {3, 1, 5}, {3, 5, 7}, {4, 7, 5}, {4, 6, 7}}; // List the vertices of each face by index in verts. Vertices must be listed in clockwise order from outside of the shape so that the faces pointing away from the camera can be culled or shaded differently\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int[] array = Arrays.stream(scanner.nextLine().split(\" \"))\n .mapToInt(Integer::parseInt).toArray();\n int pivotIndex = scanner.nextInt();\n moveThePivot(array, pivotIndex);\n Arrays.stream(array).forEach(e -> System.out.print(e + \" \"));\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int T = sc.nextInt();\n for (int Q = 0; Q < T; Q++) {\n \tint N = sc.nextInt();\n \tint M = sc.nextInt();\n \tint[][] m = new int[M][3];\n \tfor (int i = 0; i < M; i++) {\n \t\tm[i][0] = sc.nextInt();\n \t\tif (m[i][0] == 1) {\n \t\t\t//合并x和y所在的集合\n \t\t\tm[i][1] = sc.nextInt();\n\t\t\t\t\tm[i][2] = sc.nextInt();\n\t\t\t\t\t\n\t\t\t\t}else if(m[i][0] == 2){\n\t\t\t\t\t//将x提出来成立新的集合\n\t\t\t\t\tm[i][1] = sc.nextInt();\n\t\t\t\t\t\n\t\t\t\t}else if(m[i][0] == 3){\n\t\t\t\t\t//输出x所在集合的正整数个数\n\t\t\t\t\tm[i][1] = sc.nextInt();\n\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t}\n \t}\n }\n\t}", "@Override\n public void runAlgoritm(String[] input) {\n\n int n = Integer.parseInt(input[1]);\n int tablicaPunktow[][] = new int[n][3];\n\n int iterator = 2;\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < 3; j++) {\n tablicaPunktow[i][j]= Integer.parseInt(input[iterator]);\n iterator++;\n }\n }\n int tablicaWynikow[][] = new int[n][2];\n for (int i = 0; i < n; i++) {\n tablicaWynikow[i][0] = tablicaPunktow[i][0];\n double x = Math.pow((double)tablicaPunktow[i][1], 2);\n double y = Math.pow((double)tablicaPunktow[i][2], 2);\n double sqrt = Math.sqrt(x + y);\n int round = (int)Math.round(sqrt);\n tablicaWynikow[i][1] = round;\n }\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n-1; j++) {\n if(tablicaWynikow[j][1]>tablicaWynikow[j+1][1]) {\n int temp[] = new int[2];\n temp[0]=tablicaWynikow[j][0];\n temp[1]=tablicaWynikow[j][1];\n tablicaWynikow[j][0]=tablicaWynikow[j+1][0];\n tablicaWynikow[j][1]=tablicaWynikow[j+1][0];\n tablicaWynikow[j+1][0]= temp[0];\n tablicaWynikow[j+1][1]= temp[1];\n }\n }\n }\n for (int i = 0; i < n; i++) {\n int punkt = tablicaWynikow[i][0];\n for (int j = 0; j < n; j++) {\n System.out.printf(\"Punkt: %d, X: %d, Y: %d\\n\", punkt, tablicaPunktow[j][1], tablicaPunktow[j][2]);\n }\n\n }\n }", "public static void main (String args[]){\n if (args.length == 0) {\n //If there are not enough arguments\n //we alert the user and exit.\n System.err.println(\"Usage: java Chess input-file\");\n System.exit(0);\n }\n\n ArrayList<Integer> myBoard = new ArrayList<Integer>();\n myBoard.add(new Integer('N'));\n myBoard.add(new Integer('.'));\n myBoard.add(new Integer('.'));\n myBoard.add(new Integer('.'));\n myBoard.add(new Integer('.'));\n\n myBoard.add(new Integer('.'));\n myBoard.add(new Integer('B'));\n myBoard.add(new Integer('.'));\n myBoard.add(new Integer('R'));\n myBoard.add(new Integer('.'));\n\n myBoard.add(new Integer('P'));\n myBoard.add(new Integer('.'));\n myBoard.add(new Integer('.'));\n myBoard.add(new Integer('.'));\n myBoard.add(new Integer('.'));\n\n myBoard.add(new Integer('.'));\n myBoard.add(new Integer('.'));\n myBoard.add(new Integer('.'));\n myBoard.add(new Integer('.'));\n myBoard.add(new Integer('.'));\n\n //After we've gotten through the error checks\n //We create the Water object\n ChessModel myChess = new ChessModel(4, 5, myBoard);\n\n //Calculate the solution from the solver\n Solver<ArrayList<Integer>> mySolver =\n new Solver<ArrayList<Integer>>();\n ArrayList<ArrayList<Integer>> Solution =\n mySolver.SolveBFS(myChess);\n\n //Print out the results\n if (Solution.size() == 0) {\n System.out.println(\"No solution.\");\n } else {\n //Print all the steps\n for (int i = 0; i < Solution.size(); i++) {\n //Print Step\n System.out.print(\"Step \" + i + \":\");\n //Print all the states in that step\n for (int b = 0; b < Solution.get(i).size(); b++) {\n if(b % 5 == 0) { System.out.println(); }\n System.out.print(\" \" + (char)(int)Solution.get(i).get(b));\n }\n System.out.println();\n }\n }\n }", "public static void main(String[] args) {\n\t\tArrayListTask flowThrough = new ArrayListTask();\n\t\t//Part 1\n\t\tint [] arr = {1, 2, 3, 4};\n\t\tSystem.out.println(flowThrough.inputArray(arr));\n\t\tint [] arr1 = {8, 16, 10};\n\t\tSystem.out.println(flowThrough.inputArray(arr1));\n\t\tint [] arr2 = {5, 0, -10};\n\t\tSystem.out.println(flowThrough.inputArray(arr2));\n\n\t\t//Part 2\n\t\tSystem.out.println(flowThrough.evenCount(arr));\n\t\tSystem.out.println(flowThrough.evenCount(arr1));\n\t\tint [] arr3 = {5, 0, 22};\n\t\tSystem.out.println(flowThrough.evenCount(arr3));\n\t\t\n\t\t//Part 3\n\t\tSystem.out.println(Arrays.toString(flowThrough.backwardChars(\"football\")));\n\t\tSystem.out.println(Arrays.toString(flowThrough.backwardChars(\"Career center\")));\n\t\tSystem.out.println(Arrays.toString(flowThrough.backwardChars(\"?\")));\n\t\t\n\t\t//Part 4\n\t\tString [] test1 = {\"buffalo\", \"dog\"};\n\t\tString[] test2 = {\"bobcat\", \"siamese cat\", \"catbird\"};\n\t\tString[] test3 = {\"Cat\", \"frog\", \"mouse\"};\n\t\tSystem.out.println(Arrays.toString(flowThrough.catty(test1)));\n\t\tSystem.out.println(Arrays.toString(flowThrough.catty(test2)));\n\t\tSystem.out.println(Arrays.toString(flowThrough.catty(test3)));\n\t\t\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String str = null;\n System.out.println(\"请输入您想输入的字符串:\");\n str = sc.nextLine();\n int nStr = str.length();\n char[] elevenTwo = new char[nStr];\n elevenTwo = str.toCharArray();\n char[][] array = new char[4][nStr];\n\n array[0][0] = '3';\n for (int i = 1; i < 4; i++){\n for (int j = 0, k = i - 1; j <nStr && k < nStr ; j++, k+=3){\n array[i][j] = elevenTwo[k];\n }\n }\n for (int i = 0; i < 4; i++){\n for (int j = 0; j < nStr; j++){\n System.out.print(array[i][j]);\n }\n System.out.println();\n }\n\n for (int i = 0; i < 4; i++){\n for (int j = 0; j < nStr; j++){\n System.out.print(array[i][j]);\n }\n }\n char[] bStr = new char[nStr];\n int k = 0;\n for (int m = 0; m < nStr; m++){\n for (int n = 1; n < 4 && k < nStr; n++){\n bStr[k++] = array[n][m];\n }\n }\n System.out.println();\n for (int i = 0; i < nStr; i++){\n System.out.print(bStr[i]);\n }\n }", "String[] translate(String[] input);", "public static void main(String[] args) {\n\t\tSolution s = new Solution();\n\t\t//char[][] test = {{'O','O','O'},{'O','X','O'},{'O','O','O'}};\n\t\tchar[][] test = {{'X','O','X','X'},{'O','X','O','X'},{'X','O','X','O'},{'O','X','O','X'},{'X','O','X','O'}};\n\t\tfor(int i = 0;i < test.length;i++){\n\t\t\tfor(int j = 0;j < test[0].length;j++){\n\t\t\t\tSystem.out.print(test[i][j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t\ts.solve(test);\n\t\tfor(int i = 0;i < test.length;i++){\n\t\t\tfor(int j = 0;j < test[0].length;j++){\n\t\t\t\tSystem.out.print(test[i][j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public TETile[][] interactWithInputString(String input) {\n\n // passed in as an argument, and return a 2D tile representation of the\n // world that would have been drawn if the same inputs had been given\n // to interactWithKeyboard().\n //\n // See proj3.byow.InputDemo for a demo of how you can make a nice clean interface\n // that works for many different input types.\n //String seedstring = input.substring(1, input.length() - 1);\n if (input.substring(0,1).equals(\"n\")) {\n String seed = \"\";\n String movements = \"\";\n for (int i = 0; i < input.length(); i++) {\n\n try { // I might be missing a step.\n int num = Integer.parseInt(input.substring(i, i + 1));\n seed += input.substring(i, i + 1);\n\n } catch (Exception e) {\n\n if ((input.substring(i, i+1).equals(\":\")) && input.substring(i, i+2).equals(\":q\")) {\n System.out.println(\"saved\");\n saveEditor(\"seed\", seed);\n saveEditor(\"movements\", movements);\n break;\n } else if (input.substring(i, i + 1).equals(\"w\") || input.substring(i, i + 1).equals(\"s\") || input.substring(i, i + 1).equals(\"a\")\n || input.substring(i, i + 1).equals(\"d\")) {\n movements += input.substring(i, i + 1);\n }\n }\n }\n\n\n load_and_move(seed,movements);\n ter.renderFrame(this.tiles);\n return this.tiles;\n }\n\n else if(input.substring(0, 1).equals(\"l\")) {\n File seed_file = new File(\"seed.txt\");\n File movements_file = new File(\"movements.txt\");\n String seed = loadEditor(seed_file);\n String movements = loadEditor(movements_file);\n this.rand = new Random(Long.parseLong(seed));\n for (int i = 0; i < input.length(); i++) {\n if ((input.substring(i, i+1).equals(\":\")) && input.substring(i, i+2).equals(\":q\")) {\n System.out.println(\"saved\");\n saveEditor( \"seed\", seed);\n saveEditor(\"movements\", movements);\n break;\n } else if (input.substring(i, i + 1).equals(\"w\") || input.substring(i, i + 1).equals(\"s\") || input.substring(i, i + 1).equals(\"a\")\n || input.substring(i, i + 1).equals(\"d\")) {\n movements += input.substring(i, i + 1);\n }\n }\n\n load_and_move(seed,movements);\n ter.renderFrame(this.tiles);\n return this.tiles;\n }\n else{\n return null;\n }\n\n }", "public static void main(String[] args) {\n\n String[][] test_money =\n {\n {\"mark\",\"5\"},\n {\"shekel\",\"30.5\"},\n };\n\n String[][] test_convert=\n {\n {\"mark\",\"1\"},\n {\"shekel\",\"0.5\"},\n };\n\n // double res = Main.convertC(test_money,test_convert);\n// System.out.print(res);\n\n }", "public static void main(String[] args) {\n\n // create initial board from file\n In in = new In(args[0]);\n int N = in.readInt();\n int[][] tiles = new int[N][N];\n for (int i = 0; i < N; i++)\n for (int j = 0; j < N; j++)\n tiles[i][j] = in.readInt();\n Board initial = new Board(tiles);\n\n // check if puzzle is solvable; if so, solve it and output solution\n if (initial.isSolvable()) {\n Solver solver = new Solver(initial);\n StdOut.println(\"Minimum number of moves = \" + solver.moves());\n for (Board board : solver.solution())\n StdOut.println(board);\n }\n\n // if not, report unsolvable\n else {\n StdOut.println(\"Unsolvable puzzle\");\n }\n}", "private static short[][] translateResult(String[] exactCoverPartition) {\r\n\t\t\r\n\t\tshort[][] retVal = new short[9][9];\r\n\t\t\r\n\t\tfor(int i =0; i < exactCoverPartition.length;i++){\r\n\r\n\t\t\tString[] result = exactCoverPartition[i].split(\",\");\r\n\t\t\tint xCoord = Integer.parseInt(result[0]);\r\n\t\t\tint yCoord = Integer.parseInt(result[1]);\r\n\t\t\tshort value = Short.parseShort(result[2]);\r\n\t\t\t\r\n\t\t\tretVal[yCoord][xCoord] = (short)(value+1);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn retVal;\r\n\t}", "public void puzzle(){\n\t\tScanner scan;\n\t//\tint pLength = 0;\n\t// int puzzleNum = 0;\n\t\ttry {\n\t\t\tscan = new Scanner(new File(\"puzzles.txt\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"document not found\", \"error\", JOptionPane.ERROR_MESSAGE);\n\t\t\tSystem.exit(0);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\twhile(scan.hasNextLine()){\n\t\t\tString hint = scan.nextLine();\n\t\t\tString word = scan.nextLine();\n\t\t\tword = word.toUpperCase();\n\t\tsolvepuzzle store = new solvepuzzle(hint,word);\n\t\tpuzzle.add(store);\n\t\t}\n\t\t\n\t\t//Collections.shuffle(puzzle);\n\t\tpLength = puzzle.size();\n\t\tframe.sethint(puzzle.get(puzzleNum).gethint());\n\t\tframe.setSolved(puzzle.get(puzzleNum).getsolved());\n\t\t//puzzleNum++;\n\t\tSystem.out.println(puzzleNum);\n\t}", "public static char[] runPlugboard(char[] inputArray, char[] plugboard){\n\n int inputSize = Array.getLength(inputArray);\n int plugSize = Array.getLength(plugboard);\n\n System.out.println(\"Running message through plugboard...\");\n\n for(int i = 0; i < inputSize; i++){\n\n for(int j = 0; j < plugSize; j++){\n\n if((inputArray[i] == plugboard[j]) && (j % 2 == 0)){\n\n System.out.println(\"Plug \" + plugboard[j] + \" triggered, switch to \" + plugboard[j + 1]);\n inputArray[i] = plugboard[j + 1];\n break;\n\n }\n\n if((inputArray[i] == plugboard[j]) && (j % 2 == 1)){\n\n System.out.println(\"Plug \" + plugboard[j] + \" triggered, switch to \" + plugboard[j - 1]);\n inputArray[i] = plugboard[j - 1];\n break;\n\n }\n\n }\n\n }\n\n //feedback\n\n System.out.println(\"\");\n System.out.println(\"Message output from plugboard is \" + java.util.Arrays.toString(inputArray));\n System.out.println(\"\");\n return inputArray;\n\n }", "private static String ZigZagConversionTest(String test, int rows) {\n\t\tString[] Temp = new String[rows];\r\n\t\tString result = \"\";\r\n\t\t\r\n\t\tif(rows == 1){\r\n\t\t\treturn test;\r\n\t\t}\r\n\t\t\r\n\t\tfor(int a = 0; a<rows;a++){\r\n\t\t\tTemp[a] = \"\";\r\n\t\t}\r\n\r\n\t\tfor(int i = 0; i<test.length(); i++){\r\n\t\t\tint pos = (i)%(2*rows-2);\r\n\t\t\tif(pos < rows){\r\n\t\t\t\tSystem.out.println(\"position is type1: \" + pos + test.charAt(i));\r\n\t\t\t\tTemp[pos] = Temp[pos] + String.valueOf(test.charAt(i));\r\n\t\t\t\tSystem.out.println(\"Current string for row \" + pos + \": \" + Temp[pos]);\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"position is type2: \" + pos + test.charAt(i));\r\n\t\t\t\tTemp[2*rows-2-pos] = Temp[2*rows-2-pos] + String.valueOf(test.charAt(i));\r\n\t\t\t\tSystem.out.println(\"Current string for row \" + pos + \": \" + Temp[2*rows-2-pos]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int j = 0; j<rows;j++){\r\n\t\t\tresult = result + Temp[j];\r\n\t\t\tSystem.out.println(\"Current Row: \" + j + \" \" + result);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public static void main(String[] args){\n java.util.Scanner read = new java.util.Scanner(System.in);\n\n char[][] one = {\n {' ',' ',' '},\n {' ','|',' '},\n {' ','|',' '},\n };\n char[][] two = {\n {' ','_',' '},\n {' ','_','|'},\n {'|','_',' '},\n };\n char[][] three = {\n {' ','_',' '},\n {' ','_','|'},\n {' ','_','|'},\n };\n char[][] four = {\n {' ',' ',' '},\n {'|','_','|'},\n {' ',' ','|'},\n };\n char[][] five = {\n {' ','_',' '},\n {'|','_',' '},\n {' ','_','|'},\n };\n char[][] six = {\n {' ','_',' '},\n {'|','_',' '},\n {'|','_','|'},\n };\n char[][] seven = {\n {' ','_',' '},\n {'|',' ','|'},\n {' ',' ','|'},\n };\n char[][] eighth = {\n {' ','_',' '},\n {'|','_','|'},\n {'|','_','|'},\n };\n char[][] nine = {\n {' ','_',' '},\n {'|','_','|'},\n {' ',' ','|'},\n };\n char[][] zero = {\n {' ','_',' '},\n {'|',' ','|'},\n {'|','_','|'},\n };\n\n double num = read.nextDouble();\n\n int k = 0;\n while(num>1 ) {\n num = num/10;\n k++;\n }\n char[][] canvas = new char[3][k*3];\n int[] dig = new int[k];\n for(int l= 0;l<k;l++){\n num = (num*10)-(((int)num)*10);\n dig[l] = (int)num;\n }\n\n\n //asignar para imprimir\n int w = 0;\n int o =0;\n //filas\n for(int n = 0;n<3;n++){\n w=0;\n o=0;\n //columnas\n while(w<k){\n //asignacion\n for(int j = 0;j<3;j++){\n if(dig[w] == 1) {\n canvas[n][o+j] = one[n][j];\n }\n else if(dig[w] == 2) {\n canvas[n][o+j] = two[n][j];\n }\n else if(dig[w] == 3) {\n canvas[n][o+j] = three[n][j];\n }\n else if(dig[w] == 4) {\n canvas[n][o+j] = four[n][j];\n }\n else if(dig[w] == 5) {\n canvas[n][o+j] = five[n][j];\n }\n else if(dig[w] == 6) {\n canvas[n][o+j] = six[n][j];\n }\n else if(dig[w] == 7) {\n canvas[n][o+j] = seven[n][j];\n }\n else if(dig[w] == 8) {\n canvas[n][o+j] = eighth[n][j];\n }\n else if(dig[w] == 9) {\n canvas[n][o+j] = nine[n][j];\n }\n else if(dig[w] == 0) {\n canvas[n][o+j] = zero[n][j];\n }\n }\n o+=3;\n w++;\n }\n }\n //print\n for(int u =0;u<3;u++)\n {\n for (int i = 0; i < k*3; i++) {\n System.out.print(canvas[u][i]);\n }\n System.out.println();\n }\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint not = sc.nextInt();\n\t\tfor (int i = 0; i < not; i++) {\n\t\t\tint size = sc.nextInt();\n\n\t\t\tsolve(size);\n\n\t\t}\n\n\t}", "private void makeCubes(int number) {\n for (int i = 0; i < number; i++) {\n // randomize 3D coordinates\n Vector3f loc = new Vector3f(\n FastMath.nextRandomInt(-20, 20),\n FastMath.nextRandomInt(-20, 20),\n FastMath.nextRandomInt(-20, 20));\n rootNode.attachChild(\n myBox(\"Cube\" + i, loc, ColorRGBA.randomColor()));\n }\n }", "public static void main(String args[]) {\n\n // aacd(1,1,3,4) amd(1,13,4) kcd(11,3,4)\n // Note : 1,1,34 is not valid as we don't have values corresponding\n // to 34 in alphabet\n int[] arr = {1, 1, 3, 4};\n printAllInterpretations(arr);\n\n // aaa(1,1,1) ak(1,11) ka(11,1)\n int[] arr2 = {1, 1, 1};\n printAllInterpretations(arr2);\n\n // bf(2,6) z(26)\n int[] arr3 = {2, 6};\n printAllInterpretations(arr3);\n\n // ab(1,2), l(12)\n int[] arr4 = {1, 2};\n printAllInterpretations(arr4);\n\n // a(1,0} j(10)\n int[] arr5 = {1, 0};\n printAllInterpretations(arr5);\n\n // \"\" empty string output as array is empty\n int[] arr6 = {};\n printAllInterpretations(arr6);\n\n // abba abu ava lba lu\n int[] arr7 = {1, 2, 2, 1};\n printAllInterpretations(arr7);\n }", "public static void main(String[] args) {\n \r\n Scanner sc = new Scanner(System.in);\r\n ArrayList<Integer> digits = new ArrayList<Integer>();\r\n System.out.println(\"Enter the input\");\r\n int n = sc.nextInt();\r\n for (int i=1;i<=n;i++) {\r\n int digit = sc.nextInt();\r\n digits.add(digit);\r\n }\r\n int b = sc.nextInt();\r\n int c = sc.nextInt();\r\n int res = solve(digits, b, c);\r\n\r\n\r\n }", "static String solve(String puzzle, String delimiter) {\n char cc = 0; // Current character\n\n // Melakukan iterasi ke dalam string dan menyimpan alfabet ke dalam cc\n for (int i = 0; i < puzzle.length(); i++) {\n if (isAlphabetic(puzzle.charAt(i))) {\n cc = puzzle.charAt(i);\n break;\n }\n }\n\n if (cc == 0) {\n // Jika seluruh karakter dalam string sudah diganti dengan digit angka, maka akan dilakukan pengujian\n // terhadap kombinasi angka\n\n totalTest++; // Menghitung total tes yang dilakukan untuk menemukan kombinasi angka yang benar\n String[] operands = puzzle.split(delimiter);\n int op1 = check(operands[0]);\n int op2 = check(operands[1]);\n if (op1 == op2) {\n return puzzle;\n } else {\n return \"\";\n }\n } else {\n // Buat array of numbers [0..9] untuk menyimpan angka-angka yang sudah digunakan\n boolean[] numbers = new boolean[10];\n\n // Melakukan iterasi ke dalam string untuk menandai angka-angka yang sudah digunakan\n for (int i = 0; i < puzzle.length(); i++)\n if (isDigit(puzzle.charAt(i)))\n numbers[puzzle.charAt(i) - '0'] = true;\n\n for (int i = 0; i < 10; i++) {\n if (!numbers[i]) {\n\n // Melakukan substitusi alfabet dengan angka sampai ketemu kombinasi angka yang sesuai\n String solution = solve(puzzle.replaceAll(String.valueOf(cc),\n String.valueOf(i)), delimiter);\n\n // Jika kombinasi angka sudah teruji benar secara matematis,\n // kita akan cek apakah ada angka 0 di depan\n if (!solution.isEmpty()) {\n String[] split = solution.split(\"\\n\");\n boolean zeroAtLeft = false;\n\n for (int j = 0; j < split.length; j++){\n split[j] = split[j].trim();\n if (split[j].charAt(0) == '0'){\n zeroAtLeft = true;\n break;\n }\n }\n // Jika tidak ada angka 0 di depan, solusi ditemukan dan di-return ke main\n if (!zeroAtLeft) {\n return solution;\n }\n }\n }\n }\n }\n return \"\";\n }", "public static void main(String[] args) {\n\tArrayList<Integer[]> chunks = new ArrayList<Integer[]>();\n\t\t\n\t\tfor(int x = -128; x<=128; x++){\n\t\t\t\n\t\t\tfor (int z = -128; z<=128; z++){\n\t\t\t\t\n\t\t\t\tif(x*x + z*z < 128*128){\n\t\t\t\t\t/*\n\t\t\t\t\t * Makes sure that there is no duplicate.\n\t\t\t\t\t */\n\t\t\t\t\tif(!HasChunks(new Integer[] {(int) x/ 16, (int) z/16}, chunks)){\n\t\t\t\t\t\t\n\t\t\t\t\t\tchunks.add(new Integer[] {(int) x/ 16, (int) z/16});\n\t\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/*\n\t\t * The programm testd many chunks with many seeds in order to try to find the good location.\n\t\t */\n\t\tfor(long seed = 32000; seed<1000000L; seed++){\n\t\t \n\t\t\t//from chunk(-100;-100) to chunk(100;100) which is 4.10^4 chunks^2.seed^-1\n\t\t\tfor(int cx = -100; cx<=100; cx++){\n\t\t\t\tfor (int cz = -100; cz<=100; cz++){\n\t\t\t\n\t\t\t\t\tboolean flag = true;\n\t\t\t\t\t\t//browse the chunks which are in the 8chunk circle radius.\n\t\t\t\t\t\tfor(Integer[] ch: chunks){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(isSlimeChunk(seed, cx+ch[0], cz+ch[1])){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tflag = false;\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\t//no chunks contains slimechunks --> good location, we need to output the result.\n\t\t\t\t\t\tif(flag){\n\t\t\t\t\t\tSystem.out.println(\"Seed=\"+String.valueOf(seed)+\" ,ChunkX=\"+cx+\" ,ChunkZ\"+cz);\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static void queenSet() {\n\n boolean[][] boxes = new boolean[4][4];\n // System.out.println(queenPermutation2D(boxes, 4, 0, \"\"));\n System.out.println(queenCombination2D(boxes, 4, 0, \"\"));\n }", "long part2(long[] input) {\n\t\tString[] inarr = { //\n\t\t\t\t\"A,B,A,B,C,C,B,C,B,A\", //\n\t\t\t\t\"R,12,L,8,R,12\", //\n\t\t\t\t\"R,8,R,6,R,6,R,8\", //\n\t\t\t\t\"R,8,L,8,R,8,R,4,R,4\"//\n\t\t};\n\t\tinput[0] = 2;\n\t\tIntCode ic = new IntCode();\n\t\tic.setStack(input);\n\t\tint state = ic.execIO();\n\t\tint inArrI = 0;\n\t\tint inArrJ = 0;\n\t\tboolean observing = false;\n\t\twhile (state != IntCode._STATE_HALT) {\n\t\t\tif (observing) {\n\t\t\t\tic.setInput(10);\n\t\t\t\tList<Long> out = ic.getAndResetOutput();\n\t\t\t\tprintGrid(longListToGrid(out));\n\t\t\t} else if (inArrI >= inarr.length) {\n\t\t\t\tic.setInput((int) 'n');\n\t\t\t\tstate = ic.execIO();\n\t\t\t\tic.setInput(10);\n\t\t\t\tstate = ic.execIO();\n\t\t\t\tbreak;\n//\t\t\t\tobserving = true;\n\t\t\t} else if (inArrJ >= inarr[inArrI].length()) {\n\t\t\t\tic.setInput(10);\n\t\t\t\tinArrI++;\n\t\t\t\tinArrJ = 0;\n\t\t\t} else {\n\t\t\t\tic.setInput((int) inarr[inArrI].charAt(inArrJ++));\n\t\t\t}\n\t\t\tstate = ic.execIO();\n\t\t}\n\t\tList<Long> out = ic.getOutputList();\n\t\treturn out.get(out.size() - 1);\n\t}", "public static void main(String[] args) {\n\t\tScanner reader = new Scanner(System.in);\n\t\tint n = 5;\n\t\tint[] arr1 = new int[n];\n\t\tint[] arr2 = new int[n];\n\t\tint[] arr3 = new int[n];\n\n\t\tSystem.out.println(\"įveskite arr1 masyvo skaičius\");\n\t\tfor (int i = 0; i < arr1.length; i++) {\n\t\t\tSystem.out.print(i + \" elementui suteikiama reikšmė -\");\n\t\t\tarr1[i] = reader.nextInt();\n\t\t}\n\n\t\tSystem.out.println(\"įveskite arr1 masyvo skaičius\");\n\t\tfor (int i = 0; i < arr2.length; i++) {\n\t\t\tSystem.out.print(i + \" elementui suteikiama reikšmė -\");\n\t\t\tarr2[i] = reader.nextInt();\n\t\t}\n\n\t\tfor (int i = 0; i < arr3.length; i++) {\n\t\t\tarr3[i] = arr1[i] * arr2[i];\n\t\t}\n\n\t\tmasyvoSpausdinimas(arr1);\n\t\tmasyvoSpausdinimas(arr2);\n\t\tmasyvoSpausdinimas(arr3);\n\n\t}", "public void buildPuzzle (String type) {\r\n try {\r\n puzzle = Puzzle.getConstructor (type);\r\n puzzle.setList (words);\r\n puzzle.generate ();\r\n int height = Components.getScrollPanel ().getHeight ();\r\n int width = Components.getScrollPanel ().getWidth ();\r\n Components.getScrollPanel ().setSize (width + 1, height);\r\n Components.getScrollPanel ().setSize (width, height);\r\n }\r\n catch (Exception e) {\r\n JOptionPane.showMessageDialog (null, \"A Critical Error Has Occurred\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "public static void main(String[] args) {\r\n Scanner input = new Scanner(System.in);\r\n int row = input.nextInt();\r\n int col = input.nextInt();\r\n int n = input.nextInt();\r\n input.nextLine(); \r\n \r\n \r\n \r\n \r\n char[][] grid = new char[row][col];\r\n \r\n for(int i = 0; i < row; i++)\r\n {\r\n String readRow = input.nextLine();\r\n for(int j = 0; j < col; j++)\r\n {\r\n if(readRow.charAt(j) == 'O')\r\n {\r\n if(threeSecondBombs.get(i) == null)\r\n {\r\n Map<Integer,Integer> map = new HashMap<Integer, Integer>();\r\n threeSecondBombs.put(i, map); \r\n threeSecondBombs.get(i).put(j,0);\r\n }\r\n else\r\n {\r\n threeSecondBombs.get(i).put(j,0);\r\n }\r\n }\r\n \r\n \r\n \r\n grid[i][j] = readRow.charAt(j);\r\n }\r\n }\r\n \r\n \r\n int cycle = 2;\r\n \r\n if(cycle <= n)//2 second cycle\r\n {\r\n //Plant all the 2 second bombs\r\n plantBombs(twoSecondBombs, grid);\r\n cycle++;\r\n }\r\n \r\n if(cycle <= n)//3 second cycle\r\n {\r\n detonateBombs(threeSecondBombs, grid);\r\n cycle++;\r\n }\r\n \r\n //All future cycles\r\n \r\n //These will function as switches where 0 is place and 1 is detonate\r\n int one = 0;\r\n int two = 1;\r\n int three = 0;\r\n while(cycle <= n)\r\n {\r\n if(n % 3 == 1)//One cycle\r\n {\r\n if(one == 0)\r\n {\r\n plantBombs(oneSecondBombs, grid);\r\n one = 1;\r\n }\r\n else\r\n {\r\n detonateBombs(oneSecondBombs, grid);\r\n one = 0;\r\n }\r\n }\r\n else if(n % 3 == 2)//Two cycle\r\n {\r\n if(two == 0)\r\n {\r\n plantBombs(twoSecondBombs, grid);\r\n two = 1;\r\n }\r\n else\r\n {\r\n detonateBombs(twoSecondBombs, grid);\r\n two = 0;\r\n }\r\n }\r\n else if(n % 3 == 0)//Three cycle\r\n {\r\n if(three == 0)\r\n {\r\n plantBombs(threeSecondBombs, grid);\r\n three = 1;\r\n }\r\n else\r\n {\r\n detonateBombs(threeSecondBombs, grid);\r\n three = 0;\r\n }\r\n }\r\n cycle++;\r\n } \r\n \r\n \r\n //Print the output grid\r\n for(char[] l : grid)\r\n {\r\n for(char m : l)\r\n {\r\n System.out.print(m);\r\n }\r\n System.out.println(\"\");\r\n }\r\n \r\n }", "public void generateSudoku2(){ // generate sudoku, here is just a test\n\t\tString[] s={\"..9748...\",\"7........\",\".2.1.9...\",\"..7...24.\",\".64.1.59.\",\".98...3..\",\"...8.3.2.\",\"........6\",\"...2759..\"};\n\t\tfor(int i=0;i<9;i++){\n\t\t\tfor(int j=0;j<9;j++){\n\t\t\t\tsudokuPlay[i][j]=s[i].charAt(j);\n\t\t\t\tsudokuDisplay[i][j]=s[i].charAt(j);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int q = sc.nextInt();\n\n for(int k = 0; k < q; k++) {\n int m = sc.nextInt();\n int n = sc.nextInt();\n\n // indicate number of pieces\n long x = 1;\n long y = 1;\n \n ArrayList<Long> c_y = new ArrayList<Long>();\n for(int i = 0; i < m - 1; i++) {\n c_y.add(sc.nextLong());\n }\n \n ArrayList<Long> c_x = new ArrayList<Long>();\n for(int i = 0; i < n - 1; i++) {\n c_x.add(sc.nextLong());\n }\n\n Collections.sort(c_y, Collections.reverseOrder());\n Collections.sort(c_x, Collections.reverseOrder());\n\n // cut: most expensive = cut first\n int index_X = 0;\n int index_Y = 0;\n long totalCost = 0;\n\n while(!(x == n && y == m)) {\n if(x < n && y < m) {\n // compare cost to decide whether cut horizontally or vertically\n if(c_y.get(index_Y) >= c_x.get(index_X)) {\n totalCost += c_y.get(index_Y) * x;\n y++;\n index_Y++;\n } else if(c_y.get(index_Y) < c_x.get(index_X)) {\n totalCost += c_x.get(index_X) * y;\n x++;\n index_X++; \n }\n } else if(x == n && y < m) {\n totalCost += c_y.get(index_Y) * x;\n index_Y++;\n y++;\n } else if(x < n && y == m) {\n totalCost += c_x.get(index_X) * y;\n index_X++;\n x++;\n }\n }\n\n totalCost = totalCost % (long)(Math.pow(10, 9) + 7);\n System.out.println(totalCost );\n }\n }", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n System.out.println(\"Entre com a sequência\");\n String string = input.next();\n int x[] = toArray(string);\n printArray(x);\n v(x);\n }", "public Puzzle exPuzzle() {\n List<Tile> tiles = new ArrayList<>(9);\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.x), new Pic(Pattern.B, Half.y), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.y), new Pic(Pattern.D, Half.x), new Pic(Pattern.C, Half.y), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.y), new Pic(Pattern.D, Half.x), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.C, Half.x), new Pic(Pattern.C, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.y), new Pic(Pattern.B, Half.y), new Pic(Pattern.B, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.C, Half.y), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.A, Half.x), new Pic(Pattern.D, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.y), new Pic(Pattern.B, Half.x), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.y), new Pic(Pattern.A, Half.x), new Pic(Pattern.D, Half.y), new Pic(Pattern.C, Half.y)));\n return new Puzzle(tiles);\n }", "public static void main(String[] args) {\n /*camelCase(\"Bill is,\\n\" +\n \"in my opinion,\\n\" +\n \"an easier name to spell than William.\\n\" +\n \"Bill is shorter,\\n\" +\n \"and Bill is\\n\" +\n \"first alphabetically.\");*/\n\n String str = \"Bill is,\\n\" +\n \"in my opinion,\\n\" +\n \"an easier name to spell than William.\\n\" +\n \"Bill is shorter,\\n\" +\n \"and Bill is\\n\" +\n \"first alphabetically.\";\n convertToCamelCase(str,str.toCharArray());\n\n String value = \"BillIs,\\n\" +\n \"InMyOpinion,\\n\" +\n \"AnEasierNameToSpellThanWilliam.\\n\" +\n \"BillIsShorter,\\n\" +\n \"AndBillIsFirstAlphabetically.\";\n\n //reverseCamelCase(value,value.toCharArray());\n\n /* Set<Integer> set = new LinkedHashSet<Integer>(\n Arrays.asList(1,2,3,4,5,6));\n\n ArrayList<List<List<Integer>>> results =\n new ArrayList<List<List<Integer>>>();\n compute(set, new ArrayList<List<Integer>>(), results);\n for (List<List<Integer>> result : results)\n {\n System.out.println(result);\n }*/\n\n /*reverseCamelCase(\"BillIsOk\\n\" +\n \"ThisIsGood.\");*/\n\n //System.out.println(\"abc \\r\\n test\");\n\n //permutation(\"abc\");\n\n /*String[] database = {\"a\",\"b\",\"c\"};\n for(int i=1; i<=database.length; i++){\n String[] result = getAllLists(database, i);\n for(int j=0; j<result.length; j++){\n System.out.println(result[j]);\n }\n }*/\n\n /*char[] database = {'a', 'b', 'c'};\n char[] buff = new char[database.length];\n int k = database.length;\n for(int i=1;i<=k;i++) {\n permGen(database,0,i,buff);\n }*/\n\n\n\n }", "@Override\n protected String parseAndSolve(int t, CodeJamReader reader) throws IOException\n {\n int[] ints = reader.readInts();\n// if (t != 3)\n// {\n// return \"Ignore\";\n// }\n return new CropTriangles().solve(ints[0], ints[1], ints[2], ints[3], ints[4], ints[5], ints[6], ints[7]);\n }", "PuzzleSolver(String inputContent) {\n parseContent(inputContent);\n }", "public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st;\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint T = Integer.parseInt(br.readLine());\n\t\tString str;\n\t\tint res;\n\t\tfor (int t = 1; t <= T; t++) {\n\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\tW = Integer.parseInt(st.nextToken());\n\t\t\tH = Integer.parseInt(st.nextToken());\n\t\t\tfq = new LinkedList<>();\n\t\t\tmap = new int[H][W];\n\t\t\tint sy = 0, sx = 0;\n\t\t\tint curN;\n\t\t\tfor (int i = 0; i < H; i++) {\n\t\t\t\tstr = br.readLine();\n\t\t\t\tfor (int j = 0; j < W; j++) {\n\t\t\t\t\tcurN = str.charAt(j) - 0;\n\t\t\t\t\tmap[i][j] = curN;\n\t\t\t\t\tif (curN == 42) {\n\t\t\t\t\t\tfq.offer(new pos(i, j));\n\t\t\t\t\t}\n\t\t\t\t\tif (curN == 64) {\n\t\t\t\t\t\tsy = i;\n\t\t\t\t\t\tsx = j;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tres = bfs(sy, sx);\n\t\t\tif (res < 0) {\n\t\t\t\tsb.append(\"IMPOSSIBLE\");\n\t\t\t} else {\n\t\t\t\tsb.append(res);\n\t\t\t}\n\t\t\tsb.append(\"\\n\");\n\t\t}\n\t\tSystem.out.print(sb.toString());\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint a [] = {1,0,0,1,1,0,0,1,0,1,0,0,0,1};\r\n\t\t\r\n\t\tboolean start = false;\r\n\t\t//boolean end = false;\r\n\t\tString s = \"\";\r\n\t\tString k = Arrays.toString(a);\r\n\t\tString[] strings = (k.replace(\"[\", \"\").replace(\"]\", \"\").split(\", \"));\r\n\t\tString s1 = (k.replace(\"[\", \"\").replace(\"]\", \"\"));\r\n\t\tString s2 = (s1.replace(\",\", \"\"));\r\n\t\tString s3 = s2.replaceAll(\"\\\\s\", \"\");\r\n\t\t//String stringss = strings.toString();\r\n\t\t//String[] stringss = strings.replaceAll(\"\\\\s\", \"\").split(\"\");\r\n\t\t\r\n\t\tint Startindex = 0;\r\n\t\tint Endindex = 0;\r\n\t\tArrayList<String> ai = new ArrayList<String>();\r\n\t\tfor (int i =0;i<=strings.length-1;i++) {\r\n\t\t\tint result = Integer.parseInt(strings[i]);\r\n\t\t\t\r\n\t\t\tif (result==1 && !start) {\r\n\t\t\t\t\r\n\t\t\t\tstart = true;\r\n\t\t\t\tStartindex = i;\r\n\t\t\t\t\r\n\t\t\t}else if (result==1 && start) {\r\n\t\t\t\tstart = false;\r\n\t\t\t\tEndindex = i;\r\n\t\t\t\ts = s3.substring(Startindex, Endindex+1);\r\n\t\t\t\tai.add(s);\r\n\t\t\t\ti =i-1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\nSystem.out.println(ai);\r\n\t}", "public static void isFour(String clue, int local, int clueNum)\r\n {\r\n //If top (1) or bottom (3) input\r\n if(local == 1 || local == 3)\r\n {\r\n //Repeat for size of grid\r\n for(int k=0; k<GRID; k++)\r\n {\r\n //If spot in grid is equal to four\r\n if(clue.charAt(k) == '4')\r\n {\r\n //If clue is for top\r\n if(local == 1)\r\n {\r\n int num = 1;\r\n //Fills in all of the boxes bellow in assending order\r\n for(int d=0; d<GRID; d++)\r\n { \r\n puzzle[d][k] = num;\r\n num++;\r\n } \r\n }\r\n //If clue is for bottom\r\n if (local == 3)\r\n {\r\n int num = 4;\r\n //Fills in all of the boxes bellow in assending order\r\n for(int d=0; d<GRID; d++)\r\n { \r\n puzzle[d][k] = num;\r\n num--;\r\n } \r\n }\r\n }\r\n }\r\n }\r\n else if (local == 2)\r\n {\r\n \r\n if(clue.charAt(0) == '4')\r\n {\r\n int num = 1;\r\n //Fills in all of the boxes bellow in assending order\r\n for(int d=0; d<GRID; d++)\r\n { \r\n puzzle[clueNum][d] = num;\r\n num++;\r\n } \r\n }\r\n if(clue.charAt(1) == '4')\r\n {\r\n int num = 4;\r\n for(int d=0; d<GRID; d++)\r\n {\r\n puzzle[clueNum][d] = num;\r\n num--;\r\n }\r\n } \r\n }\r\n }", "public static void main(String[] args) throws Exception {\n File file = new File(\"src/main/resources/2017/oversizedpancakeflipper/A-large.in\");\n try (BufferedReader br = new BufferedReader(new FileReader(file))) {\n Scanner scanner = new Scanner(br);\n int testCases = scanner.nextInt();\n for (int t = 1; t <= testCases; t++) {\n char[] pancakes = scanner.next().toCharArray();\n int k = scanner.nextInt();\n System.out.println(String.format(\"Case #%d: %s\", t, pancakeFlipper(pancakes, k)));\n }\n }\n }", "@Test\n public void encodeSquaresXYTest() {\n Square square1 = new BasicSquare(0, 1);\n Square square2 = new BasicSquare(2, 2);\n Square square3 = new SpawnSquare(1, 1);\n ArrayList<Square> squaresList = new ArrayList<>();\n squaresList.add(square1);\n squaresList.add(square2);\n squaresList.add(square3);\n int[] squareX = Encoder.encodeSquareTargetsX(squaresList);\n int[] squareY = Encoder.encodeSquareTargetsY(squaresList);\n int[] expectedSquareX = new int[]{0, 2, 1};\n int[] expectedSquareY = new int[]{1, 2, 1};\n for (int i = 0; i < squareX.length; i++) {\n Assert.assertEquals(expectedSquareX[i], squareX[i]);\n Assert.assertEquals(expectedSquareY[i], squareY[i]);\n }\n }", "public static void main(String[] args) {/\n\t\t// Exercise 1 //\n\t\t////////////////////////////////////////////////////////////////////////////////\n\t\t\n\t\tSystem.out.println(\"Exercise 1\");\n\t\tSystem.out.println(\"-----------\");\n\t\t\n\t\tint[] inputs = {1,0,1,1};\n\t\tint[] outputs = {0,0,1,1};\n\t\tNetwork n = new Network(inputs.length);\n\t\ttrainNet(n, inputs, outputs);\n\t\tint[] result = n.test(inputs, true);\n\t\tSystem.out.println(\"Output neurons after testing: \" + Arrays.toString(result));\n\t\t\n\t\t/////////////////////////////////////////////////////////////////////////////////\n\t\t// Exercise 2 //\n\t\t////////////////////////////////////////////////////////////////////////////////\n\t\t\n\t\tSystem.out.println(\"\\nExercise 2\");\n\t\tSystem.out.println(\"-----------\");\n\t\tint[] modifiedI = {1,0,0,1};\n\t\tSystem.out.println(\"Testing with incomplete input: \" + Arrays.toString(modifiedI));\n\t\tresult = n.test(modifiedI, true);\n\t\tSystem.out.println(\"Output neurons after testing: \" + Arrays.toString(result));\n\t\t\n\t\t/////////////////////////////////////////////////////////////////////////////////\n\t\t// Exercise 3 //\n\t\t////////////////////////////////////////////////////////////////////////////////\n\t\t\n\t\tSystem.out.println(\"\\nExercise 3\");\n\t\tSystem.out.println(\"-----------\");\n\t\tint[] noizyI = {1,1,1,1};\n\t\tSystem.out.println(\"Testing with noizy input: \" + Arrays.toString(noizyI));\n\t\tresult = n.test(noizyI, true);\n\t\tSystem.out.println(\"Output neurons after testing: \" + Arrays.toString(result));\n\t\tSystem.out.println(n);\n\t\t\n\t\t/////////////////////////////////////////////////////////////////////////////////\n\t\t// Exercise 4 //\n\t\t////////////////////////////////////////////////////////////////////////////////\n\t\t\n\t\tSystem.out.println(\"\\nExercise 4\");\n\t\tSystem.out.println(\"-----------\");\n\t\tinputs = new int[] {1,0,1,0,0,1};\n\t\toutputs = new int[] {1,1,0,0,1,1};\n\t\tint[] newIns = {0,1,1,0,0,0};\n\t\tint[] newOuts = {1,1,0,1,0,1};\n\t\tn = new Network(inputs.length);\n\t\ttrainNet(n, inputs, outputs);\n\t\ttrainNet(n, newIns, newOuts);\n\t\tresult = n.test(inputs, true);\n\t\tSystem.out.println(\"load param: \" + n.getLoadParameter());\n\t\tSystem.out.println(\"Output neurons after testing: \" + Arrays.toString(result));\n\t\tint[] newResult = n.test(newIns, true);\n\t\tSystem.out.println(\"Output neurons after testing: \" + Arrays.toString(newResult));\n\t\t\n\t\t/////////////////////////////////////////////////////////////////////////////////\n\t\t// Exercise 5 //\n\t\t////////////////////////////////////////////////////////////////////////////////\n\t\t\n\t\tSystem.out.println(\"\\nExercise 5\");\n\t\tSystem.out.println(\"-----------\");\n\t\tmodifiedI = new int[] {1,0,0,0,0,1};\n\t\tSystem.out.println(\"Testing with incomplete input:\");\n\t\tresult = n.test(modifiedI, true);\n\t\tSystem.out.println(\"Output neurons after testing: \" + Arrays.toString(result));\n\t\tmodifiedI = new int[] {0,1,0,0,0,0};\n\t\tSystem.out.println(\"Testing with noisy input:\");\n\t\tresult = n.test(modifiedI, true);\n\t\tSystem.out.println(\"Output neurons after testing: \" + Arrays.toString(result));\n\t\t\n\t\t/////////////////////////////////////////////////////////////////////////////////\n\t\t// Exercise 6 //\n\t\t////////////////////////////////////////////////////////////////////////////////\n\t\tSystem.out.println(\"\\nExercise 6\");\n\t\tSystem.out.println(\"-----------\");\n\t\tint size = 10, iterations = 500, total = 0, maxCount = 0;\n\t\tdouble loadParameter = 0, maxLoad = 0, synapsesLoad = 0, maxSyn = 0;\n\t\tfor(int j = 0 ; j < iterations ; j++) {\n\t\t\tNetwork net = new Network(size);\n\t\t\tint[][] inPatterns = generateRandomPatterns(size);\n\t\t\tint[][] outPatterns = generateRandomPatterns(size);\n\t\t\tint count = 0;\n\t\t\tfor(int i = 0 ; i < inPatterns.length ; i++) {\n\t\t\t\tnet.train(inPatterns[i], outPatterns[i]);\n\t\t\t\tint[] res = net.test(inPatterns[i], false);\n\t\t\t\tif(Arrays.equals(res, outPatterns[i])) {\n\t\t\t\t\tcount++;\n\t\t\t\t} else {\n\t\t\t\t\t// network has made an error\n\t\t\t\t\tnet.pop();\n\t\t\t\t\tdouble lp = net.getLoadParameter();\n\t\t\t\t\tdouble sl = net.synapsesLoad();\n\t\t\t\t\tloadParameter += lp;\n\t\t\t\t\tsynapsesLoad += sl;\n\t\t\t\t\tif(lp > maxLoad)\n\t\t\t\t\t\tmaxLoad = lp;\n\t\t\t\t\tif(sl > maxSyn)\n\t\t\t\t\t\tmaxSyn = sl;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttotal += count;\n\t\t\tif(count > maxCount)\n\t\t\t\tmaxCount = count;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Network of size: \" + size);\n\t\tSystem.out.println(\"Network on average trained: \" + total/iterations + \" patterns\");\n\t\tSystem.out.println(\"Network average load param: \" + loadParameter/iterations);\n\t\tSystem.out.println(\"Network average synapses load: \" + synapsesLoad/iterations);\n\t\tSystem.out.println(\"Network max load parameter: \" + maxLoad);\n\t\tSystem.out.println(\"Network max synapses load: \" + maxSyn);\n\t\tSystem.out.println(\"Network max number of trained patterns: \" + maxCount);\n\t}", "public void checkers() throws IOException{\n String input = j.showInputDialog(\"How many squares would you like?\");\n int num=Integer.parseInt(input);\n input = j.showInputDialog(\"Choose a file to use:\");\n Scanner f= new Scanner(new File(input+\".ppm\"));\n input = j.showInputDialog(\"Choose a name for the new file:\");\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(input+\".ppm\")));\n out.println(f.next());\n int height=Integer.parseInt(f.next());\n int width=Integer.parseInt(f.next());\n out.println(height);out.println(width);out.println(f.next());\n int ab[][][]=new int[width][height][3];\n for(int x=0;x<width;x++){\n for(int y=0;y<height;y++){\n for(int c=0;c<3;c++){\n ab[x][y][c]=Integer.parseInt(f.next());\n }\n }\n }\n int smhei=height/(int)Math.sqrt(num);\n int smwid=width/(int)Math.sqrt(num);\n int temp[][][][] = new int[num][smwid][smhei][3];\n int x2=0;int y2=0; int d=0;\n\n for(int x=0;x<width;x++){\n if(x!=0){\n d=(height/smhei)*(x/smwid);\n if(x%smwid==0){\n x2=0;\n }\n }\n for(int y=0;y<height;y++){\n if(y!=0&&y%smhei==0){\n y2=0;d++; \n }\n for(int c=0;c<3;c++){\n temp[d][x2][y2][c]=ab[x][y][c];\n }\n y2++;\n }\n y2=0;\n x2++;\n }\n /*int raN[]=new int[num];\n for(int i=0;i<num;i++){\n raN[i]=i;\n }*/\n int r=num-1;\n for(int n=0;n<num;n++){\n /*\n r=gen.nextInt(num);\n while(raN[r]<0){\n r=gen.nextInt(num);\n }*/\n if(r>=0){\n \n }\n for(int x=0;x<smwid;x++){\n for(int y=0;y<smhei;y++){\n for(int c=0;c<3;c++){\n out.print(temp[r][x][y][c]+\" \");\n }\n }\n }\n //raN[r]=raN[r]*-1;\n r--;\n }\n f.close();\n out.close();\n System.exit(0);\n }", "public static void main(String[] args) {\n\t\tResizingArrayQueueOfStrings queue = new ResizingArrayQueueOfStrings();\n\n\t\tString[][] sampleSet = {\n\t\t\t\t{ \"1\", \"2\", \"3\", \"4\", \"5\", \"-\", \"-\", \"-\", \"-\", \"-\" },\n\t\t\t\t{ \"1\", \"2\", \"5\", \"-\", \"3\", \"4\", \"-\", \"-\", \"-\", \"-\" },\n\t\t\t\t{ \"5\", \"-\", \"4\", \"-\", \"3\", \"-\", \"2\", \"-\", \"1\", \"-\" } };\n\n\t\tfor (String[] sample : sampleSet) {\n\t\t\tfor (String s : sample) {\n\t\t\t\tif (s.equals(\"-\")) {\n\t\t\t\t\tSystem.out.print(queue.dequeue() + \", \");\n\t\t\t\t} else {\n\t\t\t\t\tqueue.enqueue(s);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\n\t}", "public static void main(String[] args) {\n\t\tString[] src = null;\n\t\ttry {\n\t\t\tsrc = Files.lines(Paths.get(\"inputs/day20.txt\"))\n\t\t\t\t\t.map(s -> s.replace(\".\", \"0\").replace(\"#\", \"1\"))\n\t\t\t\t\t.collect(Collectors.joining(\"\\n\"))\n\t\t\t\t\t.split(\"\\n\\n\");\n\t\t}catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tList<Tile> tiles = new ArrayList<Tile>();\n\t\tfor(String s : src) {\n\t\t\tString[] tile = s.split(\":\\n\");\n\t\t\tlong id = Long.parseLong(tile[0].substring(5));\n\t\t\tString[] data = tile[1].split(\"\\n\");\n\t\t\ttiles.add(new Tile(id, data));\n\t\t}\n\t\t\n\t\t/* PART 1 */\n\t\t// Compile all hashes and their mirror images, each paired with its frequency\n\t\tHashMap<Integer,Integer> hashes = new HashMap<Integer,Integer>();\n\t\tfor(Tile t : tiles) {\n\t\t\tList<Integer> h = t.getHashes(); List<Integer> hr = t.getReverseHashes();\n\t\t\tfor(int i = 0; i < h.size(); i++) {\n\t\t\t\tputTileHash(hashes, h.get(i));\n\t\t\t\tputTileHash(hashes, hr.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// The corner tiles are the 4 tiles such that 2 of their edge hashes match no other hashes\n\t\t// Find these tiles and then the product of their IDs\n\t\tList<Integer> uniqueHashes = hashes.keySet().stream()\n\t\t\t\t\t\t\t\t\t\t\t\t\t.filter(i -> hashes.get(i) == 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\t\tlong ans = tiles.stream()\n\t\t\t\t\t\t.filter(t -> isCornerTile(t, uniqueHashes))\n\t\t\t\t\t\t.mapToLong(Tile::getID)\n\t\t\t\t\t\t.reduce(1, (x,y) -> x*y);\n\t\tSystem.out.println(ans);\n\t\t\n\t\t// Assemble the image.\n\t\t// Start by placing any of the 4 corner pieces in the top left corner.\n\t\t// Build the first row by matching another tile's edge hash with the rightmost tile's right edge hash.\n\t\t// For subsequent rows, match a tile's edge hash with the bottom hash of the tile above it.\n\t\tIMG_DIM = (int)Math.sqrt(tiles.size());\n\t\tTile[][] img = new Tile[IMG_DIM][IMG_DIM];\n\t\timg[0][0] = tiles.stream()\n\t\t\t\t\t\t .filter(t -> isCornerTile(t, uniqueHashes))\n\t\t\t\t\t\t .findAny()\n\t\t\t\t\t\t .get();\n\t\twhile(!(uniqueHashes.contains(img[0][0].getLHash()) && uniqueHashes.contains(img[0][0].getTHash()))) {\n\t\t\timg[0][0].rotate(1);\n\t\t}\n\t\ttiles.remove(img[0][0]);\n\t\t\n\t\t// First row\n\t\tfor(int col = 1; col < IMG_DIM; col++) {\n\t\t\tIterator<Tile> it = tiles.iterator();\n\t\t\tTile target = null;\n\t\t\tint rHash = img[0][col-1].getRHash();\n\t\t\twhile(target == null) {\n\t\t\t\t// If the tile has a matching hash, flip it such that the existing tile's right hash\n\t\t\t\t// equals the new tile's reverse left hash\n\t\t\t\tTile t = it.next();\n\t\t\t\tif(rHash == t.getTHash()) {\n\t\t\t\t\tt.flipVertical();\n\t\t\t\t\tt.rotate(1);\n\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t}else if(rHash == reverse(t.getTHash())) {\n\t\t\t\t\tt.rotate(3);\n\t\t\t\t\ttarget = t;\n\t\t\t\t\n\t\t\t\t}else if(rHash == t.getRHash()) {\n\t\t\t\t\tt.flipHorizontal();\n\t\t\t\t\ttarget = t;\n\t\t\t\t\n\t\t\t\t}else if(rHash == reverse(t.getRHash())) {\n\t\t\t\t\tt.rotate(2);\n\t\t\t\t\ttarget = t;\n\t\t\t\t\n\t\t\t\t}else if(rHash == t.getBHash()) {\n\t\t\t\t\tt.flipHorizontal();\n\t\t\t\t\tt.rotate(1);\n\t\t\t\t\ttarget = t;\n\t\t\t\t\n\t\t\t\t}else if(rHash == reverse(t.getBHash())) {\n\t\t\t\t\tt.rotate(1);\n\t\t\t\t\ttarget = t;\n\t\t\t\t\n\t\t\t\t}else if(rHash == t.getLHash()) {\n\t\t\t\t\tt.flipVertical();\n\t\t\t\t\ttarget = t;\n\t\t\t\t\n\t\t\t\t}else if(rHash == reverse(t.getLHash())) {\n\t\t\t\t\t// do nothing\n\t\t\t\t\ttarget = t;\n\t\t\t\t}\t\n\t\t\t}\n\t\t\timg[0][col] = target;\n\t\t\ttiles.remove(target);\n\t\t}\n\t\t\n\t\t// Rest of the picture\n\t\tfor(int row = 1; row < IMG_DIM; row++) {\n\t\t\tfor(int col = 0; col < IMG_DIM; col++) {\n\t\t\t\tIterator<Tile> it = tiles.iterator();\n\t\t\t\tTile target = null;\n\t\t\t\tint bHash = img[row-1][col].getBHash();\n\t\t\t\twhile(target == null) {\n\t\t\t\t\t// If the tile has a matching hash, flip it such that the existing tile's bottom hash\n\t\t\t\t\t// equals the new tile's reverse top hash\n\t\t\t\t\tTile t = it.next();\n\t\t\t\t\tif(bHash == t.getTHash()) {\n\t\t\t\t\t\tt.flipHorizontal();\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == reverse(t.getTHash())) {\n\t\t\t\t\t\t// do nothing\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == t.getRHash()) {\n\t\t\t\t\t\tt.flipHorizontal();\n\t\t\t\t\t\tt.rotate(1);\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == reverse(t.getRHash())) {\n\t\t\t\t\t\tt.rotate(3);\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == t.getBHash()) {\n\t\t\t\t\t\tt.flipVertical();\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == reverse(t.getBHash())) {\n\t\t\t\t\t\tt.rotate(2);\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == t.getLHash()) {\n\t\t\t\t\t\tt.flipVertical();\n\t\t\t\t\t\tt.rotate(1);\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == reverse(t.getLHash())) {\n\t\t\t\t\t\tt.rotate(1);\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\timg[row][col] = target;\n\t\t\t\ttiles.remove(target);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Build image\n\t\tString[] sea = new String[IMG_DIM * (TILE_DIM-2)];\n\t\tfor(int irow = 0; irow < IMG_DIM; irow++) {\n\t\t\tfor(int trow = 1; trow < TILE_DIM-1; trow++) {\n\t\t\t\tfinal int TROW = trow;\n\t\t\t\tsea[irow*(TILE_DIM-2) + (trow-1)] = Arrays.stream(img[irow])\n\t\t\t\t\t\t\t\t\t\t\t\t\t.map(tile -> tile.getData()[TROW].substring(1, TILE_DIM-1))\n\t\t\t\t\t\t\t\t\t\t\t\t\t.collect(Collectors.joining());\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* PART 2 */\n\t\t// Rotate and flip the sea image until at least one monster is found\n\t\tint[][] monsters = new int[sea.length][sea.length];\n\t\tint iter = 1; boolean done = false;\n\t\twhile(iter <= 8 && !done) {\n\t\t\tfor(int row = 1; row < sea.length-1; row++) {\n\t\t\t\tfor(int col = 0; col < sea.length-20; col++) {\n\t\t\t\t\tif(findMonster(sea, row, col)) {\n\t\t\t\t\t\tdone = true;\n\t\t\t\t\t\tmarkMonster(monsters, row, col);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(done) {break;}\n\t\t\t// Iterate\n\t\t\tif(iter == 4) {\n\t\t\t\tsea = flipGridVertical(sea);\n\t\t\t}else {\n\t\t\t\tsea = rotateGrid(sea);\n\t\t\t}\n\t\t\titer++;\n\t\t}\n\n\t\t// Count unused 1's in the original image\n\t\tfinal String[] SEA = sea;\n\t\tlong roughness = IntStream.rangeClosed(0, SEA.length-1)\n\t\t\t\t\t\t\t.flatMap(i -> IntStream.rangeClosed(0, SEA.length-1)\n\t\t\t\t\t\t\t\t\t\t\t\t.filter(j -> SEA[i].charAt(j) == '1' && monsters[i][j] == 0))\n\t\t\t\t\t\t\t.count();\n\t\tSystem.out.println(roughness);\n\t\t\n\t}", "public static void main(String[] args) {\n\r\n\t\tString str = \"sachine dhoni sachine dhoni sachine sachine dhoni kholi\";\r\n\t\tString charString = \"NNNNNNAAAAAVBBBVF\";\r\n\t\tint[] n = { 3, 2, 3, 4, 5, 2, 1, 2, 3, 4 };\r\n\t\tfindduplicateString(str);\r\n\t\tfindduplicateCharacter(charString);\r\n\t\tfindduplicateNumber(n);\r\n\t}", "public static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tSystem.out.print(\"Enter No. disks :\");\n\t\tint number=scan.nextInt();\n\t\tif(number<=0){\n\t\t\tSystem.out.println(\"Please Enter a Valid Number\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tint strSize=((int)Math.pow(2,number))-1;\n\t\tString str[]=new String[strSize];\n\t\tString result[]=new TowerOfHanoiSolution().getTOHSolution(number,\"A\",\"B\",\"C\",str);\n\t\tfor(int i=0;i<strSize;i++){\n\t\tSystem.out.println(result[i]);\n\t\t}\n\t\tscan.close();\n\t}", "public static void main(String[] args) {\n\n final List<String> input = Arrays.asList(\n \"mask = 000000000000000000000000000000X1001X\",\n \"mem[42] = 100\"\n );\n\n final Part2 part2 = new Part2();\n System.out.println(part2.solve(input));\n }", "public static void main(final String[] args) {\n Scanner scan = new Scanner(System.in);\n Quick3string q3s = new Quick3string();\n int n = Integer.parseInt(scan.nextLine());\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < n; i++) {\n sb.append(scan.nextLine() + \"::\");\n }\n String[] lines = sb.toString().split(\"::\");\n q3s.sort(lines);\n String str = \"[\";\n for (int i = 0; i < n; i++) {\n str += lines[i] + \", \";\n }\n System.out.println(str.substring(0, str.length() - 2) + \"]\");\n }", "public static void main(String[] args){\n ArrayList<String> doorPatterns = new ArrayList<String>(8);\n //create individual patterns\n //Note: all patterns need to be the same length. Could add checking for this, but, nah.\n /*doorPatterns.add(\"1*11**0*02\"); //0\n doorPatterns.add(\"**1*111**1\"); //1\n doorPatterns.add(\"**11*211**\"); //2\n doorPatterns.add(\"*10*1*10**\"); //3\n doorPatterns.add(\"00****0***\"); //4\n doorPatterns.add(\"*01*******\"); //5\n doorPatterns.add(\"*00*1*111*\"); //6\n doorPatterns.add(\"0*11******\"); //7*/\n doorPatterns.add(\"1010**1***\"); //0\n doorPatterns.add(\"******1**1\"); //1\n doorPatterns.add(\"2*10*1****\"); //2 fix this to be a 2\n doorPatterns.add(\"**1***101*\"); //3\n doorPatterns.add(\"*00***111*\"); //4\n doorPatterns.add(\"**01**01**\"); //5\n doorPatterns.add(\"0*11******\"); //6\n doorPatterns.add(\"110*11***0\"); //7\n\n\n //Create new puzzle using the hard-coded patterns.\n //Puzzle creates doors and orbs based on the patterns provided.\n PuzzleUI theWindow = new PuzzleUI();\n Puzzle thePuzzle = new Puzzle(doorPatterns,theWindow);\n theWindow.puzzleInit(thePuzzle);\n theWindow.addButtons(thePuzzle.orbList);\n theWindow.frame.setVisible(true);\n }", "@Test\n public void testCheckTriType() {\n System.out.println(\"checkTriType\");\n double[] a = {1 , 5 , 4 , 100};\n double[] b = {1 , 5 , 3 , 5 };\n double[] c = {1 , 8 , 2 , 6 };\n SVV01 instance = new SVV01();\n String[] expResult = {\"Equilateral Triangle\",\"Isosceles Triangle\",\"Scalene\",\"Invalid\"};\n \n for ( int i = 0 ; i < 4 ; i++ ){\n String result = instance.checkTriType(a[i], b[i], c[i]);\n assertEquals(expResult[i], result);\n }\n }", "public static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\t\tStringTokenizer tok = new StringTokenizer(br.readLine());\r\n\t\tN= Integer.parseInt(tok.nextToken());\r\n\t\tfor(int i=0;i<N;i++) {\r\n\t\t\t tok = new StringTokenizer(br.readLine());\r\n\t\t\t for(int j=0;j<N;j++) {\r\n\t\t\t\t map[i][j]=Integer.parseInt(tok.nextToken());\r\n\t\t\t }\r\n\t\t}\r\n\t\tsolve(N,0,0);\r\n\t\tSystem.out.println(ansWhite+\"\\n\"+ansBlue);\r\n\t}", "public static void main(String[] args) { \r\n int[][] a = new int[3][5]; // прямоугольный массив\r\n int size1 = a.length;\r\n int size2 = a[0].length;\r\n int[][] b = new int[3][]; // массив переменной длины (тут - треугольный)\r\n b[0] = new int[1];\r\n b[1] = new int[2];\r\n b[2] = new int[3];\r\n int c[] = new int[] {1,2,3,};\r\n c = new int[]{0,1,2,3}; // а вот так не сработает: c = {0,1,2,3};\r\n \r\n int[] array1D= {0,1,2,3}; \r\n int[][] array2D= {{0,1,5,10},{2,3,1,0,5,55,16},{0,1}};\r\n int[][][] array3D= {\r\n { {2,3,1,0},\r\n {2,3,1,0},\r\n {2,3,1,0}},\r\n \r\n { {2,3,1,0},\r\n {2,3,1,0},\r\n {2,3,1,0}},\r\n \r\n { {2,3,1,0},\r\n {2,3,1,0},\r\n {2,3,1,0}}};\r\n System.out.println(\"============array1D==========\");\r\n System.out.println(array1D);\r\n System.out.println(Arrays.toString(array1D)); //Работает на глубину одного измерения (для одномерных масивов)\r\n System.out.println(\"============array2D==========\");\r\n System.out.println(array2D);\r\n System.out.println(Arrays.toString(array2D)); \r\n System.out.println(Arrays.deepToString(array2D));\r\n System.out.println(\"============array3D==========\");\r\n System.out.println(array3D);\r\n System.out.println(Arrays.toString(array3D));\r\n System.out.println(Arrays.deepToString(array3D));\r\n }", "@Test\n public void encodePowerUpsTest() {\n PowerUp powerUp1 = new TagbackGrenade(CubeColour.Blue);\n PowerUp powerUp2 = new TargetingScope(CubeColour.Red);\n PowerUp powerUp3 = new Newton(CubeColour.Blue);\n ArrayList<PowerUp> powerUpsList = new ArrayList<>();\n powerUpsList.add(powerUp1);\n powerUpsList.add(powerUp2);\n powerUpsList.add(powerUp3);\n String[] powerUpType = Encoder.encodePowerUpsType(powerUpsList);\n CubeColour[] powerUpColour = Encoder.encodePowerUpColour(powerUpsList);\n String[] expectedType = new String[]{\"TagbackGrenade\", \"TargetingScope\", \"Newton\"};\n CubeColour[] expectedColour = new CubeColour[]{CubeColour.Blue, CubeColour.Red, CubeColour.Blue,};\n for (int i = 0; i < powerUpType.length; i++) {\n Assert.assertEquals(expectedType[i], powerUpType[i]);\n Assert.assertEquals(expectedColour[i], powerUpColour[i]);\n }\n }" ]
[ "0.6437203", "0.5950661", "0.5807018", "0.5744243", "0.5558848", "0.54612005", "0.5420272", "0.53953975", "0.53482074", "0.5287026", "0.52760583", "0.51873827", "0.5146559", "0.51299167", "0.51206475", "0.5087676", "0.5087235", "0.5086827", "0.50793135", "0.50732887", "0.50529164", "0.50495034", "0.5041673", "0.50306106", "0.5020252", "0.5015939", "0.50084823", "0.4998578", "0.49872866", "0.49849445", "0.4984011", "0.4980118", "0.49709916", "0.4963402", "0.49617246", "0.495808", "0.4957699", "0.49287212", "0.4915097", "0.49119616", "0.48943007", "0.48923284", "0.48864502", "0.48712078", "0.48710546", "0.48636132", "0.4862992", "0.48590046", "0.4853276", "0.48500326", "0.4847726", "0.48378003", "0.4836471", "0.48340043", "0.48258823", "0.48225874", "0.481564", "0.48135588", "0.4809335", "0.48079625", "0.48032752", "0.48032603", "0.47949234", "0.47870234", "0.4785102", "0.47787267", "0.47784755", "0.4774444", "0.47582284", "0.47580373", "0.47554272", "0.47499576", "0.474499", "0.47391537", "0.473422", "0.47342184", "0.47296554", "0.4724964", "0.4724439", "0.47182497", "0.47180027", "0.4705191", "0.47051495", "0.46989244", "0.4697877", "0.46926612", "0.46920782", "0.46890137", "0.46798465", "0.4678144", "0.4675569", "0.46690154", "0.46686614", "0.46584836", "0.46539962", "0.4652426", "0.46493128", "0.46461096", "0.46395728", "0.4636231" ]
0.6898878
0
NOt the right solution some test cases failing
public static int longestCommonSubsequence(String text1, String text2) { Map<Character, List<Integer>> characterListMap = new HashMap<>(); char[] cA = text1.toCharArray(); for (int i = 0; i < cA.length; i++) { if (characterListMap.get(cA[i]) == null) { List<Integer> list = new ArrayList<>(); list.add(i); characterListMap.put(cA[i], list); } else { characterListMap.get(cA[i]).add(i); } } char[] cA2 = text2.toCharArray(); int i = 0; int prevBiggest = 0; int previndex = 0; int currBiggest = 0; while (i < cA2.length && characterListMap.get(cA2[i]) == null) { i++; } if (i < cA2.length && characterListMap.get(cA2[i]) != null) { previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1); i++; currBiggest++; } for (; i < cA2.length; i++) { if (characterListMap.containsKey(cA2[i])) { if (characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1) > previndex) { previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1); currBiggest++; } else { previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1); if (currBiggest > prevBiggest) { prevBiggest = currBiggest; } currBiggest = 1; } } } return prevBiggest > currBiggest ? prevBiggest : currBiggest; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tvoid test() {\n\t\tassertEquals(0, solution1.solution(2147483647));\n\t\tassertEquals(1, solution1.solution(5));\n\t}", "private void checkIsBetterSolution() {\n if (solution == null) {\n solution = generateSolution();\n //Si la solucion que propone esta iteracion es mejor que las anteriores la guardamos como mejor solucion\n } else if (getHealthFromAvailableWorkers(availableWorkersHours, errorPoints.size()) < solution.getHealth()) {\n solution = generateSolution();\n }\n }", "@Test\n public void testSolution() throws Exception {\n assertEquals(4, new Task5().solution(4, new int[]{1, 2, 3}));\n // 1. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n // 2. 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n // 3. 2, 2, 1, 1, 1, 1, 1, 1, 1, 1\n // 4. 2, 2, 2, 1, 1, 1, 1, 1, 1\n // 5. 2, 2, 2, 2, 1, 1, 1, 1\n // 6. 2, 2, 2, 2, 2, 1, 1\n // 7. 2, 2, 2, 2, 2, 2\n // 8. 5, 1, 1, 1, 1, 1, 1, 1\n // 9. 5, 2, 1, 1, 1, 1, 1\n // 10. 5, 2, 2, 1, 1, 1\n // 11. 5, 2, 2, 2, 1\n // 12. 5, 5, 1, 1\n // 13. 5, 5, 2\n assertEquals(13, new Task5().solution(12, new int[]{1, 2, 5}));\n // 1. 2, 2, 2, 2, 2, 2\n // 2. 5, 5, 2\n assertEquals(2, new Task5().solution(12, new int[]{2, 5}));\n }", "public void solution() {\n\t\t\n\t}", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void test() {\n Assert.assertEquals(3L, Problem162.solve(/* change signature to provide required inputs */));\n }", "@Test\n public void shouldSolveProblem2() {\n assertThat(sumOfEvenFibonacciValuesNotExceeding(90)).isEqualTo(2 + 8 + 34);\n assertThat(sumOfEvenFibonacciValuesNotExceeding(4_000_000)).isEqualTo(4_613_732);\n }", "public void TestCaseCheck() {\n\t\t//int[] A = {200,400,499,550,600}; //Test Case 1 No rearrangement\n\t\t//int[] A = {200,300,100,500,400}; //Test Case 2 Arrangement needed\n\t\t//int[] A = {100,200,300,300,400}; //Test Case 3 Duplicates\n\t\t//int[] A = {100}; //Test Case 4 One number only\n\t\t//int[] A = {100,200,300,400,500,600}; //Test Case 5 No rearrangement Even\n\t\t//int[] A = {600,500,400,300,200,100}; //Test Case 6 Rearrangement Even\n\t\t//int[] A = {550,500,450,400,350,300,250,200,150,100}; //Test Case 7 10 numbers\n\t\tint[] A = {-300,-200,0,100,200}; //Test Case 8 Negative Numbers\n\t\t\n\t\t\n\t\tSystem.out.println(\"Brute Foce Median result: \" + BruteForceMedian(A));\n\t\tSystem.out.println(\"Partition Median result: \" + Median(A));\n\t}", "private boolean solutionChecker() {\n\t\t// TODO\n\t\treturn false;\n\n\t}", "@Test\n public void testSolution() {\n assertSolution(\"425\", \"input-day01-2018.txt\");\n }", "@Test\n public void test() {\n Assert.assertEquals(0.83648556F, Problem232.solve(/* change signature to provide required inputs */));\n }", "public void testDecisionDeDarLaVueltaSiNoHaySalida(){\r\n\t\tdireccionActual = Direccion.ARRIBA;\r\n\t\tDireccion futura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, uno, direccionActual);\r\n\t\tassertEquals(Direccion.ABAJO, futura);\r\n\r\n\t\tdireccionActual = Direccion.DERECHA;\r\n\t\tfutura= cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, siete, direccionActual);\r\n\t\tassertEquals(Direccion.IZQUIERDA, futura);\r\n\t}", "@Test\n \tpublic void testCheckingAccusation() {\n \t\t//Set answer\n \t\tSolution answer = new Solution(\"Colonel Mustard\", \"Knife\", \"Library\");\n \t\tSolution guess = new Solution(\"Colonel Mustard\", \"Knife\", \"Library\");\n \t\tgame.setAnswer(answer);\n \t\t//Check correct accusation\n \t\t//correct if it contains the correct person, weapon and room\n \t\tAssert.assertTrue(game.checkAccusation(guess));\n \t\t//Check false accusation\n \t\t//not correct if the room is wrong, or if the person is wrong, if the weapon is wrong, or if all three are wrong\n \t\t//wrong room\n \t\tguess = new Solution(\"Colonel Mustard\", \"Knife\", \"Billiards Room\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t\t//wrong weapon\n \t\tguess = new Solution(\"Colonel Mustard\", \"Lead Pipe\", \"Library\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t\t//wrong person\n \t\tguess = new Solution(\"Ms. Peacock\", \"Knife\", \"Library\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t}", "@Test\r\n public void testForCNAEIsNotFull() {\r\n createCNAEIsNotFull();\r\n this.sol = new Solution(this.studentList, this.schoolList, this.studentPreferences, this.schoolPreferences);\r\n assertEquals(solutionForCNAEIsNotFull(), sol.getSolution(),\r\n \"Should work\");\r\n }", "@Test\n public void TestLegalCorrectInputCheck(){\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,1,1)\n ,true , \" check horisontal \"\n );\n\n //legal : check vertical spelling\n Assert.assertEquals(player.CorrectInputCheck(\"vertical\",5,1,1)\n ,true , \" check vertical \"\n );\n\n //legal : place a 5 ship horisontal at 1,1\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,1,1)\n ,true , \" legal : place a 5 ship horisontal at 1,1 \"\n );\n\n // legal : place a 5 ship horisontal at 1,10\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,1,10)\n ,true ,\" legal : place a 5 ship horisontal at 1,10 \"\n );\n\n // legal : place a 5 ship vertical at 1,10\n Assert.assertEquals(player.CorrectInputCheck(\"vertical\",5,1,1)\n ,true , \" legal : place a 5 ship vertical at 1,10 \"\n );\n\n // legal : place a 5 ship vertical at 1,10\n Assert.assertEquals(player.CorrectInputCheck(\"vertical\",5,10,1)\n ,true ,\"000 legal : place a 5 ship vertical at 1,10 \"\n );\n\n // legal : place a 5 ship horisontal at 6,1\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,6,1)\n ,true , \" legal : place a 5 ship horisontal at 6,1 \"\n );\n\n // legal : place a 5 ship vertical at 1,6\n Assert.assertEquals(player.CorrectInputCheck(\"vertical\",5,1,6)\n ,true ,\"000 legal : place a 5 ship vertical at 10,6 \"\n );\n\n }", "@Test\n public void pruebasTDD() {\n assertEquals(\"\", TransformadorRomano.calcular(0));\n assertEquals(\"I\", TransformadorRomano.calcular(1));\n assertEquals(\"II\", TransformadorRomano.calcular(2));\n assertEquals(\"III\", TransformadorRomano.calcular(3));\n assertEquals(\"IV\", TransformadorRomano.calcular(4));\n assertEquals(\"V\", TransformadorRomano.calcular(5));\n assertEquals(\"VI\", TransformadorRomano.calcular(6));\n assertEquals(\"VII\", TransformadorRomano.calcular(7));\n assertEquals(\"VIII\", TransformadorRomano.calcular(8));\n assertEquals(\"IX\", TransformadorRomano.calcular(9));\n assertEquals(\"X\", TransformadorRomano.calcular(10));\n assertEquals(\"XI\", TransformadorRomano.calcular(11));\n assertEquals(\"XII\", TransformadorRomano.calcular(12));\n assertEquals(\"XIII\", TransformadorRomano.calcular(13));\n assertEquals(\"XIV\", TransformadorRomano.calcular(14));\n assertEquals(\"XV\", TransformadorRomano.calcular(15));\n assertEquals(\"XVI\", TransformadorRomano.calcular(16));\n assertEquals(\"XVII\", TransformadorRomano.calcular(17));\n assertEquals(\"XVIII\", TransformadorRomano.calcular(18));\n assertEquals(\"XIX\", TransformadorRomano.calcular(19));\n assertEquals(\"XX\", TransformadorRomano.calcular(20));// --> XX\n assertEquals(\"XXI\", TransformadorRomano.calcular(21));// --> XXI\n assertEquals(\"XXII\", TransformadorRomano.calcular(22));\n assertEquals(\"XXIII\", TransformadorRomano.calcular(23));// --> XXIII\n assertEquals(\"XXIV\", TransformadorRomano.calcular(24));// --> XXIV\n assertEquals(\"XXV\", TransformadorRomano.calcular(25));// --> XXV\n assertEquals(\"XXVI\", TransformadorRomano.calcular(26));// --> XXVI\n assertEquals(\"XXXIV\", TransformadorRomano.calcular(34));// --> XXXIV\n assertEquals(\"XXXIX\", TransformadorRomano.calcular(39));// --> XXXIX\n assertEquals(\"XL\", TransformadorRomano.calcular(40));// --> XL\n assertEquals(\"XLVIII\", TransformadorRomano.calcular(48));// --> XLVIII\n assertEquals(\"XLIX\", TransformadorRomano.calcular(49));// --> XLIX\n assertEquals(\"L\", TransformadorRomano.calcular(50));// --> L\n assertEquals(\"LI\", TransformadorRomano.calcular(51));// --> LI\n assertEquals(\"LVIII\", TransformadorRomano.calcular(58));// --> LVIII\n assertEquals(\"LIX\", TransformadorRomano.calcular(59));// --> LIX\n assertEquals(\"LX\", TransformadorRomano.calcular(60));// --> LX\n assertEquals(\"LXIII\", TransformadorRomano.calcular(63));// --> LXIII\n assertEquals(\"LXVIII\", TransformadorRomano.calcular(68));// --> LXVIII\n assertEquals(\"LXXXIX\", TransformadorRomano.calcular(89));// --> LXXXIX\n assertEquals(\"XC\", TransformadorRomano.calcular(90));// --> XC\n assertEquals(\"XCI\", TransformadorRomano.calcular(91));// --> XCI\n assertEquals(\"XCV\", TransformadorRomano.calcular(95));// --> XCV \n assertEquals(\"XCIX\", TransformadorRomano.calcular(99)); \n assertEquals(\"C\", TransformadorRomano.calcular(100));// --> C\n assertEquals(\"CIII\", TransformadorRomano.calcular(103));// --> CIII\n assertEquals(\"CXVII\", TransformadorRomano.calcular(117));// --> CXVII\n assertEquals(\"CLI\", TransformadorRomano.calcular(151)); \n assertEquals(\"CLXX\", TransformadorRomano.calcular(170));// --> CLXX\n assertEquals(\"CC\", TransformadorRomano.calcular(200));\n assertEquals(\"CCL\", TransformadorRomano.calcular(250));// --> CCL\n assertEquals(\"CCCXCIX\", TransformadorRomano.calcular(399));// --> CCCXCIX\n assertEquals(\"CD\", TransformadorRomano.calcular(400));// --> CD \n assertEquals(\"CDX\", TransformadorRomano.calcular(410));// --> CDX\n assertEquals(\"CDL\", TransformadorRomano.calcular(450));// --> CDL\n assertEquals(\"CDLXXX\", TransformadorRomano.calcular(480));// --> CDLXXX\n assertEquals(\"CDXCIX\", TransformadorRomano.calcular(499));// --> CDXCIX\n assertEquals(\"D\", TransformadorRomano.calcular(500));// --> D\n assertEquals(\"DX\", TransformadorRomano.calcular(510));// --> DX\n assertEquals(\"DLXXX\", TransformadorRomano.calcular(580));// --> DLXXX\n assertEquals(\"DXCIX\", TransformadorRomano.calcular(599));// --> DXCIX\n assertEquals(\"DC\", TransformadorRomano.calcular(600));// --> DC\n assertEquals(\"DCX\", TransformadorRomano.calcular(610));// --> DCX\n assertEquals(\"DCL\", TransformadorRomano.calcular(650));// --> DCL\n assertEquals(\"DCXCV\", TransformadorRomano.calcular(695));// --> DCXCV\n assertEquals(\"DCC\", TransformadorRomano.calcular(700));// --> DCC\n assertEquals(\"DCCC\", TransformadorRomano.calcular(800));// --> DCCC\n assertEquals(\"DCCCXL\", TransformadorRomano.calcular(840));// --> DCCCXL\n assertEquals(\"CM\", TransformadorRomano.calcular(900));// --> CM\n assertEquals(\"CML\", TransformadorRomano.calcular(950));// --> CML\n assertEquals(\"CMXCIX\", TransformadorRomano.calcular(999));// --> CMXCIX\n assertEquals(\"M\", TransformadorRomano.calcular(1000));// --> M\n\n }", "@Test\n public void test02() throws Throwable {\n RegulaFalsiSolver regulaFalsiSolver0 = new RegulaFalsiSolver(4956.642689288169, 1711.029259737);\n Log1p log1p0 = new Log1p();\n AllowedSolution allowedSolution0 = AllowedSolution.LEFT_SIDE;\n double double0 = regulaFalsiSolver0.solve(2044, (UnivariateRealFunction) log1p0, (-517.825700479), (double) 0, 1711.029259737, allowedSolution0);\n double double1 = regulaFalsiSolver0.doSolve();\n }", "@Override\n public String solve() {\n int LIMIT = 50 * NumericHelper.ONE_MILLION_INT;\n int[] nCount = new int[LIMIT+1];\n for(long y = 1; y<= LIMIT; y++) {\n for(long d= (y+3)/4; d<y; d++) { // +3 is to make d atleast 1\n long xSq = (y+d) * (y+d);\n long ySq = y * y;\n long zSq = (y-d) * (y-d);\n\n long n = xSq - ySq - zSq;\n\n if(n<0) {\n continue;\n }\n\n if(n>=LIMIT) {\n break;\n }\n\n\n nCount[(int)n]++;\n\n }\n }\n\n int ans = 0;\n for(int i = 1; i<LIMIT; i++) {\n if(nCount[i] == 1) {\n //System.out.print(i +\",\");\n ans++;\n }\n }\n\n return Integer.toString(ans);\n }", "public void testDecisionEnPasillosDoblar(){\r\n\t\tdireccionActual = Direccion.ARRIBA;\r\n\t\tDireccion futura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, cinco, direccionActual);\r\n\t\tassertEquals(Direccion.DERECHA,futura);\r\n\r\n\t\tdireccionActual = Direccion.IZQUIERDA;\r\n\t\tfutura=cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, cinco, direccionActual);\r\n\t\tassertEquals(Direccion.ABAJO,futura);\r\n\t\t\r\n\t\tdireccionActual = Direccion.IZQUIERDA;\r\n\t\tfutura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, tres, direccionActual);\r\n\t\tassertEquals(Direccion.ARRIBA, futura);\r\n\t\t\r\n\t\tdireccionActual = Direccion.DERECHA;\r\n\t\tfutura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, seis, direccionActual);\r\n\t\tassertEquals(Direccion.ARRIBA, futura);\r\n\t}", "@Test\n public void TestIlegalCorrectInputCheck(){\n Assert.assertEquals(player.CorrectInputCheck(\"horisonaz\",5,1,1)\n ,false , \" check horisontal spelling\"\n );\n\n //illegal : check vertical\n Assert.assertEquals(player.CorrectInputCheck(\"verticles\",5,1,1)\n ,false , \" check vertical spelling\"\n );\n\n //illegal : place a 5 ship horisontal at 0,1 outside of the grid\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,0,1)\n ,false,\" illegal : place a 5 ship horisontal at 0,1 outside of the grid \"\n );\n\n // illegal : place a 5 ship horisontal at 1,0 outside of the grid\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,1,0)\n ,false, \" illegal : place a 5 ship horisontal at 1,0 outside of the grid \"\n );\n\n // illegal : place a 5 ship horisontal at 7,1 ship is to big it goes outside the grid\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,7,1)\n ,false , \" illegal : place a 5 ship horisontal at 7,1 outside of the grid \"\n );\n\n // illegal : place a 5 ship horisontal at 1,10\n Assert.assertEquals(player.CorrectInputCheck(\"vertical\",5,1,7)\n ,false , \" illegal : place a 5 ship horisontal at 1,7 outside of the grid \"\n );\n\n\n }", "static void executeTest() {\n int[] param1 = { // Checkpoint 1\n 12, 11, 10, -1, -15,};\n boolean[] expect = { // Checkpoint 2\n true, false,true, false, true,}; \n System.out.printf(\"課題番号:%s, 学籍番号:%s, 氏名:%s\\n\",\n question, gakuban, yourname);\n int passed = 0;\n for (int i = 0; i < param1.length; i++) {\n String info1 = \"\", info2 = \"\";\n Exception ex = null;\n boolean returned = false; //3\n try {\n returned = isDivable(param1[i]); //4\n if (expect[i] == (returned)) { //5\n info1 = \"OK\";\n passed++;\n } else {\n info1 = \"NG\";\n info2 = String.format(\" <= SHOULD BE %s\", expect[i]);\n }\n } catch (Exception e) {\n info1 = \"NG\";\n info2 = \"EXCEPTION!!\";\n ex = e;\n } finally {\n String line = String.format(\"*** Test#%d %s %s(%s) => \",\n i + 1, info1, method, param1[i]);\n if (ex == null) {\n System.out.println(line + returned + info2);\n } else {\n System.out.println(line + info2);\n ex.printStackTrace();\n return;\n }\n }\n }\n System.out.printf(\"Summary: %s,%s,%s,%d/%d\\n\",\n question, gakuban, yourname, passed, param1.length);\n }", "public void testDeletedProblem() throws Exception {\n \n InternalContest contest = new InternalContest();\n\n int numTeams = 2;\n initData(contest, numTeams , 5);\n String [] runsData = {\n\n \"1,1,A,1,No\", //20\n \"2,1,A,3,Yes\", //3 (first yes counts Minutes only)\n \"3,1,A,5,No\", //20\n \"4,1,A,7,Yes\", //20 \n \"5,1,A,9,No\", //20\n \n \"6,1,B,11,No\", //20 (all runs count)\n \"7,1,B,13,No\", //20 (all runs count)\n \n \"8,2,A,30,Yes\", //30\n \n \"9,2,B,35,No\", //20 (all runs count)\n \"10,2,B,40,No\", //20 (all runs count)\n \"11,2,B,45,No\", //20 (all runs count)\n \"12,2,B,50,No\", //20 (all runs count)\n \"13,2,B,55,No\", //20 (all runs count)\n\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team1,0,0\",\n \"1,team2,0,0\"\n };\n\n for (String runInfoLine : runsData) {\n SampleContest.addRunFromInfo(contest, runInfoLine);\n }\n\n Problem probA = contest.getProblems()[0];\n probA.setActive(false);\n contest.updateProblem(probA);\n Problem probA1 = contest.getProblem(probA.getElementId());\n assertEquals(\"probA1 setup\", false, probA1.isActive());\n Problem probA2 = contest.getProblems()[0];\n assertEquals(\"probA2 setup\", false, probA2.isActive());\n confirmRanks(contest, rankData);\n Document document = null;\n\n try {\n DefaultScoringAlgorithm defaultScoringAlgorithm = new DefaultScoringAlgorithm();\n String xmlString = defaultScoringAlgorithm.getStandings(contest, null, log);\n if (debugMode) {\n System.out.println(xmlString);\n }\n // getStandings should always return a well-formed xml\n assertFalse(\"getStandings returned null \", xmlString == null);\n assertFalse(\"getStandings returned empty string \", xmlString.trim().length() == 0);\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n document = documentBuilder.parse(new InputSource(new StringReader(xmlString)));\n\n } catch (Exception e) {\n assertTrue(\"Error in XML output \" + e.getMessage(), true);\n e.printStackTrace();\n }\n \n // skip past nodes to find teamStanding node\n NodeList list = document.getDocumentElement().getChildNodes();\n \n int rankIndex = 0;\n \n for(int i=0; i<list.getLength(); i++) {\n Node node = (Node)list.item(i);\n String name = node.getNodeName();\n if (name.equals(\"teamStanding\")){\n String [] standingsRow = fetchStanding (node);\n// Object[] cols = { \"Rank\", \"Name\", \"Solved\", \"Points\" };\n String [] cols = rankData[rankIndex].split(\",\");\n\n if (debugMode) {\n System.out.println(\"SA rank=\"+standingsRow[0]+\" solved=\"+standingsRow[2]+\" points=\"+standingsRow[3]+\" name=\"+standingsRow[1]);\n System.out.println(\" rank=\"+cols[0]+\" solved=\"+cols[2]+\" points=\"+cols[3]+\" name=\"+cols[1]);\n System.out.println();\n System.out.flush();\n }\n \n compareRanking (rankIndex+1, standingsRow, cols);\n rankIndex++;\n } else if(name.equals(\"standingsHeader\")) {\n String problemCount = node.getAttributes().getNamedItem(\"problemCount\").getNodeValue();\n int problemCountInt = Integer.valueOf(problemCount);\n NodeList list2 = node.getChildNodes();\n int foundProblemCount = -1;\n for(int j=0; j<list2.getLength(); j++) {\n Node node2 = (Node)list2.item(j);\n String name2 = node2.getNodeName();\n if (name2.equals(\"problem\")){\n int id = Integer.valueOf(node2.getAttributes().getNamedItem(\"id\").getNodeValue());\n if (id > foundProblemCount) {\n foundProblemCount = id;\n }\n }\n }\n assertEquals(\"problem list max id\",problemCountInt, foundProblemCount);\n assertEquals(\"problemCount\",\"4\", problemCount);\n }\n }\n\n }", "@Test\n\tpublic void multipleSolutionsTest(){\n\t\tDjikstrasMap m = new DjikstrasMap();\t//Creates new DjikstrasMap object\n\t\t\n\t\tm.addRoad(\"Guildford\", \"Portsmouth\", 20.5, \"M3\");\t//Adds a road from Guildford to portsmouth to the map\n m.addRoad(\"Portsmouth\", \"Guildford\", 20.5, \"M3\");\n \n m.addRoad(\"Guildford\", \"Winchester\", 20.5, \"A33\");\t//Adds a road from Guildford to winchester to the map\n m.addRoad(\"Winchester\", \"Guildford\", 20.5, \"A33\");\n \n m.addRoad(\"Winchester\", \"Fareham\", 20.5, \"M27\");\t//Adds a road from winchester to fareham to the map\n m.addRoad(\"Fareham\", \"Winchester\", 20.5, \"M27\");\n\t\t\n m.addRoad(\"Portsmouth\", \"Fareham\", 20.5, \"M25\");\t//Adds a road from fareham to portsmouth to the map\n m.addRoad(\"Fareham\", \"Portsmouth\", 20.5, \"M25\");\n \n m.findShortestPath(\"Fareham\");\t//Starts the algorithm to find the shortest path\n \n List<String> temp = new ArrayList<String>();\t//Holds the route plan\n temp = m.createRoutePlan(\"Guildford\");\t//Calls methods to assign the route plan to temp\n \n assertEquals(\"1. Take the M27 to Winchester\",temp.get(0));\t//tests that the different lines in the route plan are correct and that the algorithm did indeed take the shortest route\n assertEquals(\"2. Take the A33 to Guildford\", temp.get(1));\n assertEquals(\"\", temp.get(2));\n assertEquals(\"The Journey will take 41 hours and .00 minutes long.\", temp.get(3));\n assertEquals(\"\", temp.get(4));\n \n assertEquals(5, temp.size());\t//tests to see that the route plan is 5 line large as it should be\n\t}", "@Test(timeout = 4000)\n public void test33() throws Throwable {\n JSTerm jSTerm0 = new JSTerm();\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSTerm0.add((Object) \"\");\n JSPredicateForm jSPredicateForm0 = jSTerm0.applySubstitutionPF(jSSubstitution0);\n JSSubstitution jSSubstitution1 = new JSSubstitution();\n JSTerm jSTerm1 = new JSTerm();\n jSTerm1.add((Object) jSPredicateForm0);\n JSJshopVars.exclamation = (-3277);\n jSTerm0.add((Object) jSTerm1);\n JSPredicateForm jSPredicateForm1 = jSTerm0.clonePF();\n JSPredicateForm jSPredicateForm2 = jSPredicateForm0.applySubstitutionPF(jSSubstitution0);\n Object object0 = new Object();\n SystemInUtil.addInputLine(\"\");\n Predicate<Integer> predicate0 = Predicate.isEqual((Object) \"\");\n Predicate<Object> predicate1 = (Predicate<Object>) mock(Predicate.class, new ViolatedAssumptionAnswer());\n doReturn(false).when(predicate1).test(any());\n Predicate<Integer> predicate2 = predicate0.and(predicate1);\n Predicate<Integer> predicate3 = predicate2.or(predicate0);\n Predicate<Integer> predicate4 = predicate3.negate();\n jSPredicateForm0.removeIf(predicate4);\n Predicate<String> predicate5 = Predicate.isEqual((Object) \"\");\n Predicate<String> predicate6 = predicate5.negate();\n jSPredicateForm1.removeIf(predicate5);\n Predicate<String> predicate7 = predicate6.negate();\n Predicate<String> predicate8 = predicate6.and(predicate5);\n predicate7.or(predicate8);\n predicate5.negate();\n JSSubstitution jSSubstitution2 = new JSSubstitution();\n predicate6.or(predicate7);\n Predicate<Integer> predicate9 = Predicate.isEqual((Object) predicate6);\n jSSubstitution2.removeIf(predicate9);\n jSPredicateForm2.toStr();\n jSPredicateForm2.standarizerPredicateForm();\n jSPredicateForm0.trimToSize();\n // Undeclared exception!\n try { \n jSPredicateForm1.applySubstitutionPF(jSSubstitution1);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // umd.cs.shop.JSTerm cannot be cast to java.lang.String\n //\n verifyException(\"umd.cs.shop.JSPredicateForm\", e);\n }\n }", "private boolean checkSolutions() {\n\t\tfor (int i = 0; i < population; ++i) {\n\t\t\tif (populationArray.get(i).getFitness() == 0) {\n\t\t\t\tsolution = populationArray.get(i);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Test\n\tvoid testCalculateMarkInSemesterFail2() {\n\t\tString semesterName = null;\n\t\t\n\t\tList<StudentResult> studentResults = new ArrayList<>();\n\t\n\t\t// result after calculated marks\n\t\tList<Object> listResults = MarkUtility.calculateMarkInSemester(semesterName, studentResults);\n\t\t\n\t\t// semesterFullName, numbersOfSubjects, gpaInSemester, passedCredits\n\t\tString semesterFN = (String) listResults.get(0);\n\t\tint numberOfSubjects = ((Map<Subject, StudentResult>) listResults.get(1)).size();\n\t\tfloat gpaInSemester = (float) listResults.get(2);\n\t\tint passedCredits = (int) listResults.get(3);\t\t\n\t\t\n\t\tassertTrue(\n\t\t\t\tsemesterFN.equals(\"\") &&\n\t\t\t\tnumberOfSubjects == 0 &&\n\t\t\t\tgpaInSemester == 0 &&\n\t\t\t\tpassedCredits == 0\n\t\t\t\t);\t\t\t\t\n\t}", "@Test\n\tvoid testCalculateMarkInSemesterFail1() {\n\t\tString semesterName = \"\";\n\t\t\n\t\tList<StudentResult> studentResults = new ArrayList<>();\n\t\n\t\t// result after calculated marks\n\t\tList<Object> listResults = MarkUtility.calculateMarkInSemester(semesterName, studentResults);\n\t\t\n\t\t// semesterFullName, numbersOfSubjects, gpaInSemester, passedCredits\n\t\tString semesterFN = (String) listResults.get(0);\n\t\tint numberOfSubjects = ((Map<Subject, StudentResult>) listResults.get(1)).size();\n\t\tfloat gpaInSemester = (float) listResults.get(2);\n\t\tint passedCredits = (int) listResults.get(3);\t\t\n\t\t\n\t\tassertTrue(\n\t\t\t\tsemesterFN.equals(\"\") &&\n\t\t\t\tnumberOfSubjects == 0 &&\n\t\t\t\tgpaInSemester == 0 &&\n\t\t\t\tpassedCredits == 0\n\t\t\t\t);\t\t\t\t\n\t}", "@Test\n public void test01() {\n EjercicioR755 ejercici1 = new EjercicioR755();\n\n\n ArrayList<Integer> origen = new ArrayList<>(Arrays.asList(5, 8, 2, 1, 9, 7, 4));\n String resultadoEsperado = \"9, 8, 7, 5, 4, 2, 1\";\n assertEquals(resultadoEsperado, ejercici1.devolverEnOrden(origen));\n\n\n origen = new ArrayList<>(Arrays.asList(10, 4, 5, 4, 3, 9, 1));\n resultadoEsperado = \"10, 9, 5, 4, 4, 3, 1\";\n assertEquals(resultadoEsperado, ejercici1.devolverEnOrden(origen));\n\n\n origen = new ArrayList<>(Arrays.asList(6, 4, 5, 4, 3, 9, 10));\n resultadoEsperado = \"10, 9, 6, 5, 4, 4, 3\";\n assertEquals(resultadoEsperado, ejercici1.devolverEnOrden(origen));\n\n\n origen = new ArrayList<>();\n resultadoEsperado = \"\";\n assertEquals(resultadoEsperado, ejercici1.devolverEnOrden(origen));\n }", "@Test\n public void badChoicePunisher() {\n Edge[] edgelist = {new Edge(new int[] {1, 7}), new Edge(new int[] {1, 8}),\n new Edge(new int[] {7, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5})};\n timeMethod(edgelist, 8, 2);\n\n\n Edge[] edgelist1 = {new Edge(new int[] {1, 6}), new Edge(new int[] {1, 7}),\n new Edge(new int[] {6, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5})};\n timeMethod(edgelist1, 7, 1);\n\n Edge[] edgelist2 = {new Edge(new int[] {1, 6}), new Edge(new int[] {1, 7}),\n new Edge(new int[] {6, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5}), new Edge(new int[] {2, 8})};\n timeMethod(edgelist2, 8, 2);\n\n Edge[] edgelist3 = {new Edge(new int[] {1, 6}), new Edge(new int[] {1, 7}),\n new Edge(new int[] {6, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5})};\n timeMethod(edgelist3, 7, 1);\n }", "@Test\n public void test23() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver(1.0);\n Floor floor0 = new Floor();\n AllowedSolution allowedSolution0 = AllowedSolution.RIGHT_SIDE;\n double double0 = illinoisSolver0.solve(2297949, (UnivariateRealFunction) floor0, 0.5, 1.0, allowedSolution0);\n double double1 = illinoisSolver0.doSolve();\n }", "@Test\n @Order(1)\n void algorithms() {\n \n Combination initialComb = new Combination();\n for (int i = 0; i < assignementProblem.getAssignmentData().getLength(); i++) {\n initialComb.add((long) i + 1);\n }\n assignementProblem.setInCombination(initialComb);\n executeAlgo(SearchTestUtil.ALGO.TABU);\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n }", "@Test\n public void testSolution() {\n assertArrayEquals(new int[]{3,2,1} , new Task().reverse3( new int[]{1, 2, 3}));\n assertArrayEquals(new int[]{5, 11, 9} , new Task().reverse3( new int[]{9, 11, 5}));\n assertArrayEquals(new int[]{7, 0, 0} , new Task().reverse3( new int[]{0, 0, 7}));\n assertArrayEquals(new int[]{2, 1, 2} , new Task().reverse3( new int[]{2, 1, 2}));\n assertArrayEquals(new int[]{1, 2, 1} , new Task().reverse3( new int[]{1, 2, 1}));\n assertArrayEquals(new int[]{2, 11, 3} , new Task().reverse3( new int[]{3, 11, 2}));\n assertArrayEquals(new int[]{7, 2, 3} , new Task().reverse3( new int[]{3, 2, 7}));\n\n }", "@Test\n public void z_topDown_TC02() {\n try {\n Intrebare intrebare = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"M\");\n Intrebare intrebare1 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"A\");\n Intrebare intrebare2 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"B\");\n Intrebare intrebare3 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"C\");\n assertTrue(true);\n assertTrue(appService.exists(intrebare));\n assertTrue(appService.exists(intrebare1));\n assertTrue(appService.exists(intrebare2));\n assertTrue(appService.exists(intrebare3));\n\n try {\n ccir2082MV.evaluator.model.Test test = appService.createNewTest();\n assertTrue(test.getIntrebari().contains(intrebare));\n assertTrue(test.getIntrebari().contains(intrebare1));\n assertTrue(test.getIntrebari().contains(intrebare2));\n assertTrue(test.getIntrebari().contains(intrebare3));\n assertTrue(test.getIntrebari().size() == 5);\n } catch (NotAbleToCreateTestException e) {\n assertTrue(false);\n }\n } catch (DuplicateIntrebareException | IntrebareValidatorFailedException e) {\n e.printStackTrace();\n assertTrue(false);\n }\n }", "@Test\n public void shouldSolveProblem67() {\n assertThat(Euler67Test.solve(\"small_triangle.txt\")).isEqualTo(23);\n assertThat(Euler67Test.solve(\"p067_triangle.txt\")).isEqualTo(7273);\n }", "@Test\n public void z_topDown_TC03() {\n try {\n Intrebare intrebare = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"M\");\n Intrebare intrebare1 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"A\");\n Intrebare intrebare2 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"B\");\n Intrebare intrebare3 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"C\");\n assertTrue(true);\n assertTrue(appService.exists(intrebare));\n assertTrue(appService.exists(intrebare1));\n assertTrue(appService.exists(intrebare2));\n assertTrue(appService.exists(intrebare3));\n\n try {\n ccir2082MV.evaluator.model.Test test = appService.createNewTest();\n assertTrue(test.getIntrebari().contains(intrebare));\n assertTrue(test.getIntrebari().contains(intrebare1));\n assertTrue(test.getIntrebari().contains(intrebare2));\n assertTrue(test.getIntrebari().contains(intrebare3));\n assertTrue(test.getIntrebari().size() == 5);\n } catch (NotAbleToCreateTestException e) {\n assertTrue(false);\n }\n\n Statistica statistica = appService.getStatistica();\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"Literatura\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"Literatura\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"M\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"M\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"A\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"A\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"B\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"B\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"C\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"C\")==1);\n\n } catch (DuplicateIntrebareException | IntrebareValidatorFailedException e) {\n e.printStackTrace();\n assertTrue(false);\n } catch (NotAbleToCreateStatisticsException e) {\n assertTrue(false);\n }\n }", "public static boolean testDessertSolvers() {\n // Check first dessert variable skips with 8 guests and 1 skips\n Guest last = DessertSolvers.firstDessertVariableSkips(8, 1);\n // The last guest should be #8\n if (!last.toString().equals(\"#8\")) {\n System.out.println(last.toString());\n return false;\n }\n // Check first dessert variable skips with 8 guests and 3 skips\n last = DessertSolvers.firstDessertVariableSkips(8, 3);\n // The last guest should be #8\n if (!last.toString().equals(\"#3\")) {\n System.out.println(last.toString());\n return false;\n }\n // Check first dessert variable course with 8 guests and 1 course\n last = DessertSolvers.firstDessertVariableCourses(8, 1);\n // The first guest to be reserved with dessert should be #1\n if (!last.toString().equals(\"#1\")) {\n System.out.println(last.toString());\n return false;\n }\n // Check first dessert variable course with 8 guests and 2 courses\n last = DessertSolvers.firstDessertVariableCourses(8, 2);\n // The first guest to be reserved with dessert should be #8\n if (!last.toString().equals(\"#8\")) {\n System.out.println(last.toString());\n return false;\n }\n // Check first dessert variable course with 8 guests and 4 courses\n last = DessertSolvers.firstDessertVariableCourses(8, 4);\n // The first guest to be reserved with dessert should be #5\n if (!last.toString().equals(\"#5\")) {\n System.out.println(last.toString());\n return false;\n }\n // No bug, return true\n return true;\n }", "@Test\r\n\tpublic void testEndMatchToMatchLeaguePlayMatch1() {\n\t\tassertTrue(\"Error storing end stock data\", false);\r\n\t\t//Check that portfolio values have been calculated correctly\r\n\t\tassertTrue(\"Error calcuating final portfolio values\", false);\r\n\t}", "@Test\n public void testValiderLaCouvertureDuSoin() {\n \n assertTrue(soin1.validerLaCouvertureDuSoin());\n soin3.setPourcentage(2.0);\n assertFalse(soin3.validerLaCouvertureDuSoin());\n soin3.setPourcentage(-1.1);\n assertFalse(soin3.validerLaCouvertureDuSoin());\n assertTrue(soin2.validerLaCouvertureDuSoin());\n }", "@Test\n\tprivate void checkPossibilityTest() {\n\t\tint[] input = new int[] {1,1,1};\n Assertions.assertThat(checkPossibility(input)).isTrue();\n\n input = new int[] {0,0,3};\n Assertions.assertThat(checkPossibility(input)).isTrue();\n\n input = new int[] {4,2,3};\n Assertions.assertThat(checkPossibility(input)).isTrue();\n\n input = new int[] {2,3,4,2,3};\n Assertions.assertThat(checkPossibility(input)).isFalse();\n\t}", "@Test\n public void test04() throws Throwable {\n RegulaFalsiSolver regulaFalsiSolver0 = new RegulaFalsiSolver(4956.642689288169, 1711.029259737);\n Log1p log1p0 = new Log1p();\n AllowedSolution allowedSolution0 = AllowedSolution.LEFT_SIDE;\n // Undeclared exception!\n try { \n regulaFalsiSolver0.solve(0, (UnivariateRealFunction) log1p0, 4956.642689288169, 636.6, allowedSolution0);\n } catch(IllegalStateException e) {\n //\n // illegal state: maximal count (0) exceeded: evaluations\n //\n assertThrownBy(\"org.apache.commons.math.analysis.solvers.BaseAbstractUnivariateRealSolver\", e);\n }\n }", "private static void badApproach() {\n\t\t\n\t\tList<Double> result = new ArrayList<>();\n\t\t\n\t\tThreadLocalRandom.current()\n\t\t\t.doubles(10_000).boxed()\n\t\t\t.forEach(\n\t\t\t\t\td -> NewMath.inv(d)\n\t\t\t\t\t\t.ifPresent(\n\t\t\t\t\t\t\tinv -> NewMath.sqrt(inv)\n\t\t\t\t\t\t\t\t.ifPresent(\n\t\t\t\t\t\t\t\t\t\tsqrt -> result.add(sqrt)\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\n\t\tSystem.out.println(\"# result = \"+result.size());\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}", "public static double sanityCheck(Match match)\n {\n Lane lane;\n Role role;\n \n int bot = 0;\n int bottom = 0;\n int jungle = 0;\n int mid = 0;\n int middle = 0;\n int top = 0;\n \n int solo = 0;\n int duo = 0;\n int duo_carry = 0;\n int duo_support = 0;\n int none = 0;\n \n\n \n for(int i = 0; i<10; i++)\n {\n lane = match.getParticipants().get(i).getTimeline().getLane();\n role = match.getParticipants().get(i).getTimeline().getRole();\n \n switch(lane)\n {\n case BOT:\n bot++;\n break;\n \n case BOTTOM:\n bottom++;\n break;\n \n case JUNGLE:\n jungle++;\n break;\n \n case MID:\n mid++;\n break;\n \n case MIDDLE:\n middle++;\n break;\n \n case TOP:\n top++;\n break;\n }\n \n switch(role)\n {\n case SOLO:\n solo++;\n break;\n \n case DUO:\n duo++;\n break;\n \n case DUO_CARRY:\n duo_carry++;\n break;\n \n case DUO_SUPPORT:\n duo_support++;\n break;\n \n case NONE:\n none++;\n break;\n }\n }\n \n double total = 0;\n \n if(top == 2)\n total++;\n if(mid+middle == 2)\n total++;\n if(jungle == 2)\n total++;\n if(bot + bottom == 4)\n total++;\n \n if(solo == 4)\n total++;\n if(duo + duo_carry + duo_support == 4);\n total++;\n if( duo_carry == 2);\n total++;\n if(duo_support == 2)\n total++;\n if(none == 2)\n total++;\n \n //it would be total =/ 9 but I figured every time one is wrong it makes another wrong, but there's really only 1 error \n total = ((total/18.0)+.5);\n \n \n //TestPrints\n //System.out.println(\"Sanity Check:\\nTop: \"+ top + \"\\nJungle: \"+ jungle + \"\\nMid: \" + (mid+middle) + \"\\nBot: \" + (bot+bottom)+ \"\\n\\nSolo: \"+solo + \"\\nDuo: \" + (duo+duo_carry+duo_support)\n //+ \"\\n\\\"Bot\\\": \"+ duo+\"\\nADC: \"+ duo_carry+ \"\\nSupport: \"+duo_support+ \"\\nNone: \" + none + \"\\nTotal Score: \" +total);\n \n \n \n return total;\n \n }", "@Test\r\n\tpublic void testPelikulaBaloratuDutenErabiltzaileenZerrenda() {\n\t\tArrayList<Integer> zer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p1.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p2.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 4);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e2.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertTrue(zer.contains(e4.getId()));\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p3.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e2.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p4.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e4.getId()));\r\n\t\t\r\n\t}", "private static boolean KawigiEdit_RunTest(\n int testNum, String[] p0, int p1, boolean hasAnswer, String[] p2) {\n System.out.print(\"Test \" + testNum + \": [\" + \"{\");\n for (int i = 0; p0.length > i; ++i) {\n if (i > 0) {\n System.out.print(\",\");\n }\n System.out.print(\"\\\"\" + p0[i] + \"\\\"\");\n }\n System.out.print(\"}\" + \",\" + p1);\n System.out.println(\"]\");\n Centipede obj;\n String[] answer;\n obj = new Centipede();\n long startTime = System.currentTimeMillis();\n answer = obj.simulate(p0, p1);\n long endTime = System.currentTimeMillis();\n boolean res;\n res = true;\n System.out.println(\"Time: \" + (endTime - startTime) / 1000.0 + \" seconds\");\n if (hasAnswer) {\n System.out.println(\"Desired answer:\");\n System.out.print(\"\\t\" + \"{\");\n for (int i = 0; p2.length > i; ++i) {\n if (i > 0) {\n System.out.print(\",\");\n }\n System.out.print(\"\\\"\" + p2[i] + \"\\\"\");\n }\n System.out.println(\"}\");\n }\n System.out.println(\"Your answer:\");\n System.out.print(\"\\t\" + \"{\");\n for (int i = 0; answer.length > i; ++i) {\n if (i > 0) {\n System.out.print(\",\");\n }\n System.out.print(\"\\\"\" + answer[i] + \"\\\"\");\n }\n System.out.println(\"}\");\n if (hasAnswer) {\n if (answer.length != p2.length) {\n res = false;\n } else {\n for (int i = 0; answer.length > i; ++i) {\n if (!answer[i].equals(p2[i])) {\n res = false;\n }\n }\n }\n }\n if (!res) {\n System.out.println(\"DOESN'T MATCH!!!!\");\n } else if ((endTime - startTime) / 1000.0 >= 2) {\n System.out.println(\"FAIL the timeout\");\n res = false;\n } else if (hasAnswer) {\n System.out.println(\"Match :-)\");\n } else {\n System.out.println(\"OK, but is it right?\");\n }\n System.out.println(\"\");\n return res;\n }", "private void testSolution(String input, String output) {\n runs++;\n\n // Load the problem & solution\n ProblemSpec problemSpec = Solution.loadProblem(input);\n Solution solution = new Solution(problemSpec);\n\n // Solve and time the solution\n long startTime = System.currentTimeMillis();\n List<State> states = solution.solve();\n long endTime = System.currentTimeMillis();\n durations.put(input, endTime - startTime);\n\n // Output the solution\n Solution.writeSolution(Formatter.format(states), output);\n\n problemSpec = Solution.loadProblem(input, output);\n if (solutionPasses(problemSpec)) {\n passes++;\n }\n\n successes++;\n }", "@Test\n @Order(8)\n void taillardTestMoreIterations() {\n try {\n\n for (int i = 0; i < SearchTestUtil.taillardFilenames.length; i++) {\n int output;\n float sumTabu = 0;\n int minTabu = Integer.MAX_VALUE;\n float sumRecuit = 0;\n int minRecuit = Integer.MAX_VALUE;\n System.out.println(\"Run#\" + SearchTestUtil.taillardFilenames[i]);\n assignementProblem.taillardInitializer(SearchTestUtil.taillardFilenames[i]);\n assignementProblem.setNeighborsFunction(NEIGHBORHOOD_TYPE, assignementProblem.getAssignmentData().getLength());\n for (int j = 0; j < 10; j++) {\n assignementProblem.setInCombination(Combination.generateRandom(assignementProblem.getAssignmentData().getLength()));\n\n System.out.println(\"\\n \\t Test#\"+j);\n executeAlgo(SearchTestUtil.ALGO.TABU);\n output = assignementProblem.getF().apply(assignementProblem.getOutCombination());\n sumTabu += output;\n if (output < minTabu) minTabu = output;\n\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n output = assignementProblem.getF().apply(assignementProblem.getOutCombination());\n sumRecuit += output;\n if (output < minRecuit) minRecuit = output;\n }\n\n\n System.out.println(\"\\tAverage tabu \" + sumTabu / 10);\n System.out.println(\"\\tMinimum found \" + minTabu);\n\n System.out.println(\"\\tAverage recuit \" + sumRecuit / 10);\n System.out.println(\"\\tMinimum found \" + minRecuit);\n\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Test\n public void test15() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver();\n Tanh tanh0 = new Tanh();\n AllowedSolution allowedSolution0 = AllowedSolution.LEFT_SIDE;\n double double0 = illinoisSolver0.solve(22, (UnivariateRealFunction) tanh0, (-0.5), (double) 22, (-0.5), allowedSolution0);\n }", "@Test\n\tpublic void testPrimeActionnaireSecondaire(){\n\t\tassertEquals(1000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 2));\n\t\tassertEquals(1500, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 3));\n\t\tassertEquals(2000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 4));\n\t\tassertEquals(2500, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 5));\n\t\tassertEquals(3000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 6));\n\t\tassertEquals(3000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 8));\n\t\tassertEquals(3000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 10));\n\t\tassertEquals(3500, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 11));\n\t\tassertEquals(3500, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 15));\n\t\tassertEquals(3500, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 20));\n\t\tassertEquals(4000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 21));\n\t\tassertEquals(4000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 22));\n\t\tassertEquals(4000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 30));\n\t\tassertEquals(4500, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 31));\n\t\tassertEquals(4500, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 33));\n\t\tassertEquals(4500, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 40));\n\t\tassertEquals(5000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 41));\n\t\tassertEquals(5000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 42));\n\n\t\t// cas categorie hotel = 2\n\t\tassertEquals(1500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 2));\n\t\tassertEquals(2000, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 3));\n\t\tassertEquals(2500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 4));\n\t\tassertEquals(3000, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 5));\n\t\tassertEquals(3500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 6));\n\t\tassertEquals(3500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 8));\n\t\tassertEquals(3500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 10));\n\t\tassertEquals(4000, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 11));\n\t\tassertEquals(4000, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 15));\n\t\tassertEquals(4000, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 20));\n\t\tassertEquals(4500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 21));\n\t\tassertEquals(4500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 22));\n\t\tassertEquals(4500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 30));\n\t\tassertEquals(5000, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 31));\n\t\tassertEquals(5000, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 33));\n\t\tassertEquals(5000, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 40));\n\t\tassertEquals(5500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 41));\n\t\tassertEquals(5500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 42));\n\n\t\t// cas categorie hotel = 3\n\t\tassertEquals(2000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 2));\n\t\tassertEquals(2500, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 3));\n\t\tassertEquals(3000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 4));\n\t\tassertEquals(3500, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 5));\n\t\tassertEquals(4000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 6));\n\t\tassertEquals(4000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 8));\n\t\tassertEquals(4000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 10));\n\t\tassertEquals(4500, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 11));\n\t\tassertEquals(4500, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 15));\n\t\tassertEquals(4500, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 20));\n\t\tassertEquals(5000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 21));\n\t\tassertEquals(5000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 22));\n\t\tassertEquals(5000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 30));\n\t\tassertEquals(5500, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 31));\n\t\tassertEquals(5500, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 33));\n\t\tassertEquals(5500, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 40));\n\t\tassertEquals(6000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 41));\n\t\tassertEquals(6000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 42));\n\t}", "@Test\n public void testCalcProbTheta() throws Exception {\n\n double guessProb1 = ItemResponseTheory.calcProbTheta(c, lambda, theta1, alpha1);\n double guessProb2 = ItemResponseTheory.calcProbTheta(c, lambda, theta2, alpha1);\n double guessProb3 = ItemResponseTheory.calcProbTheta(c, lambda, theta3, alpha1);\n double guessProb4 = ItemResponseTheory.calcProbTheta(c, lambda, theta4, alpha1);\n double guessProb5 = ItemResponseTheory.calcProbTheta(c, lambda, theta5, alpha1);\n double guessProb6 = ItemResponseTheory.calcProbTheta(c, lambda, theta6, alpha1);\n double guessProb7 = ItemResponseTheory.calcProbTheta(c, lambda, theta7, alpha1);\n\n double ans1 = 0.2;\n double ans2 = 0.21;\n double ans3 = 0.23;\n double ans4 = 0.3;\n double ans5 = 0.47;\n double ans6 = 0.73;\n double ans7 = 0.9;\n\n double tolerance = 0.005;\n\n assertTrue(\"Prob(theta1)\", Math.abs(guessProb1 - ans1)< tolerance);\n assertTrue(\"Prob(theta2)\", Math.abs(guessProb2 - ans2) < tolerance);\n assertTrue(\"Prob(theta3)\", Math.abs(guessProb3 - ans3) < tolerance);\n assertTrue(\"Prob(theta4)\", Math.abs(guessProb4 - ans4) < tolerance);\n assertTrue(\"Prob(theta5)\", Math.abs(guessProb5 - ans5) < tolerance);\n assertTrue(\"Prob(theta6)\", Math.abs(guessProb6 - ans6) < tolerance);\n assertTrue(\"Prob(theta7)\", Math.abs(guessProb7 - ans7) < tolerance);\n\n }", "public static void main(String[] args) {\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 3, 4, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 3, 5, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 3, 4, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 3, 5, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, false, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, false, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, true, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, true, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, true, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, true, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 5, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 5, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(6, 6, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(6, 6, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 3, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 3, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(7, 7, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(7, 7, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 4, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 4, true, null)));\n measureTime(()->checkInterruptSequential(4, 4, 3, false));\n measureTime(()->checkInterruptSequential(4, 4, 3, true));\n }", "@Test\n\tpublic void testResultadosEsperados() {\n\t\t\n\t\t\n\t\t\n\t\tbicicleta.darPedalada(utilidadesCiclista.getCadencia(), 75);\n\t\t\n\t\t\n\t\t//se comprueba que la velocidad sea la esperada\n\t\t\n\t\tdouble velocidadesperada = utilidadesBicicleta.velocidadDeBici(0, utilidadesCiclista.getCadencia(), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t65, bicicleta.getRadiorueda(), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPlatos()[bicicleta.getPlatoactual()], \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]);\n\t\t\n\t\t\n\t\tassertEquals(\"Error: La velocidad de la bicicleta no es la correcta\", velocidadesperada, bicicleta.getVelocidad(), 2);\n\t\t\n\t\t\n\t\t//se comprueba que el espacio de la pedalada sea el esperado\n\t\t\n\t\tdouble espaciodelapedaladaesperado = utilidadesBicicleta.espacioDePedalada(bicicleta.getRadiorueda(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPlatos()[bicicleta.getPlatoactual()], \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]);\n\t\t\n\t\tassertEquals(\"Error: El espacio recorrido de la bicicleta no es el correcta\", espaciodelapedaladaesperado, utilidadesBicicleta.espacioDePedalada(bicicleta.getRadiorueda(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPlatos()[bicicleta.getPlatoactual()],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t), 0);\n\t\t\n\t\t\n\t\t//se comprueba que la relacion de transmision sea la esperada\n\t\t\n\t\tdouble relaciondeetransmisionesperado = utilidadesBicicleta.relacionDeTransmision(bicicleta.getPlatos()[bicicleta.getPlatoactual()], \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]);\n\t\t\n\t\tassertEquals(\"Error: El espacio recorrido de la bicicleta no es el correcta\", relaciondeetransmisionesperado, utilidadesBicicleta.relacionDeTransmision(bicicleta.getPlatos()[bicicleta.getPlatoactual()],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t), 0);\n\t\t\n\t\t\n\t\t//se comprueba que el recorrido lineal sea el esperado\n\t\t\n\t\tdouble recorridoLinealDeLaRuedaesperado = utilidadesBicicleta.recorridoLinealDeLaRueda(bicicleta.getRadiorueda());\n\t\t\n\t\tassertEquals(\"Error: El espacio recorrido de la bicicleta no es el correcta\", recorridoLinealDeLaRuedaesperado, utilidadesBicicleta.recorridoLinealDeLaRueda(bicicleta.getRadiorueda()), 0);\n\t\t\n\t\t\n\t\t\n\t\t//Se comprueban las variables despues de frenar\n\t\t\n\t\tbicicleta.frenar();\n\t\t\n\t\t//se comprueba que la velocidad halla decrementado como esperamos despues de frenar\n\t\t\n\t\tdouble velocidadfrenado = utilidadesBicicleta.velocidadDeBici(0, 1, 65, bicicleta.getRadiorueda(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPlatos()[bicicleta.getPlatoactual()], \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]);\n\t\t\n\t\tvelocidadfrenado = -(velocidadfrenado *0.2);\n\t\t\n\t\tdouble velocidadesperadafrenando = UtilidadesNumericas.redondear(velocidadesperada + velocidadfrenado,1);\n\n\t\tassertEquals(\"Error: La velocidad de frenado de la bicicleta no es la correcta\", velocidadesperadafrenando, UtilidadesNumericas.redondear(bicicleta.getVelocidad(),1),2);\n\t\t\n\t\t\n\t\t\n\t\t//Se comprueban que los piñones se incremente y decrementen correctamente\n\t\t\n\t\tint incrementarpinhonesperado = bicicleta.getPinhonactual() +1;\n\t\t\n\t\tbicicleta.incrementarPinhon();\n\t\t\n\t\tassertEquals(\"Error: El incremento de piñon de la bicicleta no es la correcta\", incrementarpinhonesperado, bicicleta.getPinhonactual(), 0);\n\t\t\n\t\tint decrementarpinhonesperado = bicicleta.getPinhonactual() -1;\n\t\t\t\n\t\tbicicleta.decrementarPinhon();\n\t\t\n\t\tassertEquals(\"Error: El decremento de piñon de la bicicleta no es la correcta\", decrementarpinhonesperado, bicicleta.getPinhonactual(), 0);\n\t\t\n\t\t\n\t\t\n\t\t//Se comprueban que los platos se incremente y decrementen correctamente\n\t\t\n\t\tint incrementarplatoesperado = bicicleta.getPlatoactual() +1;\n\t\t\n\t\tbicicleta.incrementarPlato();\n\t\t\n\t\tassertEquals(\"Error: El incremento del plato de la bicicleta no es la correcta\", incrementarplatoesperado, bicicleta.getPlatoactual(), 2);\n\t\t\n\t\tint decrementarplatoesperado = bicicleta.getPlatoactual() -1;\n\t\t\n\t\tbicicleta.decrementarPlato();\n\t\t\n\t\tassertEquals(\"Error: El decremento de piñon de la bicicleta no es la correcta\", decrementarplatoesperado, bicicleta.getPlatoactual(), 0);\n\t}", "public void testOutputIsVaild()\n {\n Collection<Puzzle> puzzles = new ArrayList<Puzzle>();\n\n puzzles = (Collection<Puzzle>) Config.get(\"Puzzles\", puzzles);\n\n for (Puzzle puzzle : puzzles)\n {\n byte[] grid = puzzle.getData();\n GridSolver cs = new GridSolver(grid);\n cs.solveGrid();\n assertTrue(new GridChecker(cs.getDataSolution()).checkGrid());\n }\n }", "@Test\r\n public void testForCNSHIsFull() {\r\n createCNSHIsFull();\r\n this.sol = new Solution(this.studentList, this.schoolList, this.studentPreferences, this.schoolPreferences);\r\n assertEquals(solutionForCNSHIsFull(), sol.getSolution());\r\n }", "@Override\r\n\tpublic boolean solutionCase() {\n\t\tint v=0, e1=0, e2=0, w=0, a=0;\r\n\t\twhile(sc.hasNextInt()){\r\n\t\t\tv=sc.nextInt();\r\n\t\t\ta=sc.nextInt();\r\n\t\t\tEdgeWeightedGraph g= new EdgeWeightedGraph(v);\r\n\t\t\tfor(int i=0;i<a;++i){\r\n\t\t\t\te1=sc.nextInt();\r\n\t\t\t\te2=sc.nextInt();\r\n\t\t\t\tw=sc.nextInt();\r\n\t\t\t\tEdge e= new Edge(e1-1, e2-1, w);\r\n\t\t\t\tg.addEdge(e);\r\n\t\t\t}\r\n\t\t\tDijkstraS m = new DijkstraS(g, 0);\r\n\t\t\t\r\n\t\t\tfor(int i=0;i<v;i++)\r\n\t\t\t\tSystem.out.println(\"V[\"+i+\"] \"+m.nWays[i]);\r\n\t\t\t\t//System.out.println(m.nWays[v-1]);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Test\n\tpublic void testMultiplica2Reales0() {\n\t\tdouble resultado= Producto.multiplica2reales(7.2, 0);\n\t\tdouble esperado= 0;\n\t\t\n\t\tassertEquals(esperado, resultado);\n\t}", "public void testDecisionEnPasillosSeguirDerecho(){\r\n\t\tdireccionActual = Direccion.ABAJO;\r\n\t\tDireccion futura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, uno, direccionActual);\r\n\t\tassertEquals(futura,Direccion.ABAJO);\r\n\r\n\t\tdireccionActual = Direccion.ARRIBA;\r\n\t\tfutura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, cuatro, direccionActual);\r\n\t\tassertEquals(futura,Direccion.ARRIBA);\r\n\r\n\t\tdireccionActual = Direccion.IZQUIERDA;\r\n\t\tfutura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, nueve, direccionActual);\r\n\t\tassertEquals(Direccion.IZQUIERDA,futura);\t\t\r\n\t}", "@Test\r\n public void testForCNSHIsFullCNCHHasOnlyOnePlace() {\r\n createCNSHIsFullCNCHHasOnlyOnePlace();\r\n this.sol = new Solution(this.studentList, this.schoolList, this.studentPreferences, this.schoolPreferences);\r\n assertEquals(solutionForCNSHIsFullCNCHHasOnlyOnePlace(), sol.getSolution(), \"Should work\");\r\n }", "@Test\n\tpublic void testMultiplica2Enteros0() {\n\t\tdouble resultado= Producto.multiplica2enteros(100, 0);\n\t\tdouble esperado= 0;\n\t\t\n\t\tassertEquals(esperado, resultado);\n\t}", "@Test\n\tpublic void testHappyPath() {\n\t\texpected.add(new int[]{94133,94133});\n\t\texpected.add(new int[]{94200,94299});\n\t\texpected.add(new int[]{94600,94699});\n\t\t\n\t\t//interger arrays for happy path\n\t\tint[] a1 = new int[] {94133,94133}, a2 = {94200,94299}, a3 = {94600,94699};\n\n\t\tint canShip1 = 94199, canShip2 = 94300, canShip3 = 65532;\n\t\t\n\t\t//\n\t\tint cantShip1 = 94133, cantShip2 = 94650, cantShip3 = 94230, cantShip4 = 94600, cantShip5 = 94299;\n\t\t\n\t\tSystem.out.println(\"********************************** Start testHappyPath() **********************************\");\n\t\t\n\t\tSystem.out.print(\"Input ZipCode Ranges:---------------> \");\n\t\tZipCodeUtil.printZipRange(a1, a2, a3);\n\t\t\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(a1, a2, a3);\n\t\t\t\n\t\t\tSystem.out.println(\"<----------------------- :Output \");\n\t\t\t\n\t\t\tfor(int[] range : mergedZips){\n\t\t\t\tZipCodeUtil.printZipRange(range);\t\n\t\t\t}\n\t\t\t\n\t\t\tAssert.assertArrayEquals(expected.toArray(), mergedZips.toArray());\n\n\t\t\tSystem.out.println(\"<----------------------- :ZipCode Range\");\n\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\tSystem.out.println(\"----------------- Test ZipCodes -------------------\");\n\n\t\t\tAssert.assertTrue(\"Can ship to: \"+ canShip1, ZipCodeUtil.getInstance().canShipTo(canShip1));\n\t\t\tSystem.out.println(\"Can ship to: \"+ canShip1 +\" \"+ ZipCodeUtil.getInstance().canShipTo(canShip1));\n\t\t\t\n\t\t\tAssert.assertTrue(\"Can ship to: \"+ canShip2, ZipCodeUtil.getInstance().canShipTo(canShip2));\n\t\t\tSystem.out.println(\"Can ship to: \"+ canShip2 +\" \"+ ZipCodeUtil.getInstance().canShipTo(canShip2));\n\t\t\t\n\t\t\tAssert.assertTrue(\"Can ship to: \"+ canShip3, ZipCodeUtil.getInstance().canShipTo(canShip3));\n\t\t\tSystem.out.println(\"Can ship to: \"+ canShip3 +\" \"+ ZipCodeUtil.getInstance().canShipTo(canShip3));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip1, ZipCodeUtil.getInstance().canShipTo(cantShip1));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip1 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip1));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip2, ZipCodeUtil.getInstance().canShipTo(cantShip2));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip2 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip2));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip3, ZipCodeUtil.getInstance().canShipTo(cantShip3));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip3 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip3));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip4, ZipCodeUtil.getInstance().canShipTo(cantShip4));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip4 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip4));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip5 , ZipCodeUtil.getInstance().canShipTo(cantShip5));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip5 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip5));\n\t\t\t\n\t\t\tSystem.out.println(\"----------------- End Test ZipCodes -------------------\");\n\n\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\tSystem.err.println(e.getErrorCode() + \" - \" + e.getMessage());\n\t\t\tAssert.fail(e.getErrorCode() + \" - \" + e.getMessage());\n\t\t}finally{\n\n\t\t\tSystem.out.println(\"********************************** End testHappyPath() **********************************\");\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "@Test\n public void test19() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver();\n Tanh tanh0 = new Tanh();\n AllowedSolution allowedSolution0 = AllowedSolution.LEFT_SIDE;\n double double0 = illinoisSolver0.solve(16, (UnivariateRealFunction) tanh0, (-0.5), (double) 16, (-0.5), allowedSolution0);\n }", "@Test\n public void test21() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver();\n Minus minus0 = new Minus();\n double double0 = illinoisSolver0.solve(4037, (UnivariateRealFunction) minus0, (double) 4037, 0.0, (double) 4037);\n }", "@Test\n public void testDecisionRule2() throws IOException {\n \n Data data = getDataObject(\"./data/adult.csv\");\n DataHandle handle = data.getHandle();\n \n RiskModelPopulationUniqueness model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getPopulationBasedUniquenessRisk();\n double sampleUniqueness = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getSampleBasedUniquenessRisk().getFractionOfUniqueRecords();\n double populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n \n if (model.getPopulationUniquenessModel() == PopulationUniquenessModel.PITMAN) {\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.27684993883653597) == 0);\n } else if (model.getPopulationUniquenessModel() == PopulationUniquenessModel.ZAYATZ) {\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.3207402393466189) == 0);\n } else {\n fail(\"Unexpected convergence of SNB\");\n }\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.2d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.3577099234829125d) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.01d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.1446083531167384) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 1d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.5142895033485844) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) == 0);\n }", "@Test\n void cadastraEspecialidadeProfessorInvalido(){\n assertEquals(\"Campo email nao pode ser nulo ou vazio.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"\", \"Doutorado\", \"DSC\", \"01/01/2011\")));\n assertEquals(\"Campo formacao nao pode ser nulo ou vazio.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email@email\", null, \"DSC\", \"01/01/2011\")));\n assertEquals(\"Campo unidade nao pode ser nulo ou vazio.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email@email\", \"Doutorado\", \"\", \"01/01/2011\")));\n assertEquals(\"Campo data nao pode ser nulo ou vazio.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email@email\", \"Doutorado\", \"DSC\", null)));\n assertEquals(\"Formato de email invalido.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email@\", \"Doutorado\", \"DSC\", \"01/05/2015\")));\n assertEquals(\"Pesquisadora nao encontrada.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email1@email\", \"Doutorado\", \"DSC\", \"01/05/2015\")));\n cadastraPesquisador();\n assertEquals(\"Pesquisador nao compativel com a especialidade.\",\n verificaExcecao(() -> controllerPesquisador.cadastraEspecialidadeProfessor(\"hunterxhunter@1998\",\"Doutorado\", \"DSC\", \"01/05/2015\")));\n assertEquals(\"Atributo data com formato invalido.\",\n verificaExcecao(() -> controllerPesquisador.cadastraEspecialidadeProfessor(\"breakingbad@2008\",\"Doutorado\", \"DSC\", \"01052015\")));\n assertEquals(\"Atributo data com formato invalido.\",\n verificaExcecao(() -> controllerPesquisador.cadastraEspecialidadeProfessor(\"breakingbad@2008\",\"Doutorado\", \"DSC\", \"2015/05/15\")));\n assertEquals(\"Atributo data com formato invalido.\",\n verificaExcecao(() -> controllerPesquisador.cadastraEspecialidadeProfessor(\"breakingbad@2008\",\"Doutorado\", \"DSC\", \"1/5/2015\")));\n }", "public static void main(String[] args) {\n\t\t\n\t\t// 10 Tests: \n\t\tList<Integer> a1 = new List<>();\n\t\tList<Integer> b1 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\t\n\t\tList<Integer> a2 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\tList<Integer> b2 = new List<>();\n\t\t\n\t\tList<Integer> a3 = new List<>();\n\t\tList<Integer> b3 = new List<>();\n\t\t\n\t\tList<Integer> a4 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\tList<Integer> b4 = new List<>(4, new List<>(5, new List<>(6, new List<>())));\n\t\t\n\t\tList<Integer> a5 = new List<>(4, new List<>(5, new List<>(6, new List<>())));\n\t\tList<Integer> b5 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\t\n\t\tList<Integer> a6 = new List<>(1, new List<>(4, new List<>(6, new List<>()))); \n\t\tList<Integer> b6 = new List<>(5, new List<>(6, new List<>(9, new List<>())));\n\t\t\n\t\tList<Integer> a7 = new List<>(-6, new List<>(-5, new List<>(-4, new List<>())));\n\t\tList<Integer> b7 = new List<>(-3, new List<>(-2, new List<>(-1, new List<>())));\n\t\t\n\t\tList<Integer> a8 = new List<>(-2, new List<>(-1, new List<>(0, new List<>())));\n\t\tList<Integer> b8 = new List<>(-1, new List<>(0, new List<>(1, new List<>(2, new List<>()))));\n\t\t\n\t\tList<Integer> a9 = new List<>(-1, new List<>(0, new List<>(1, new List<>())));\n\t\tList<Integer> b9 = new List<>(3, new List<>(4, new List<>(5, new List<>())));\n\t\t\n\t\tList<Integer> a10 = new List<>(-1, new List<>(0, new List<>(1, new List<>())));\n\t\tList<Integer> b10 = new List<>(-1, new List<>(0, new List<>(1, new List<>())));\n\t\t\n\t\tSystem.out.println(unique(a1, b1));\n\t\tSystem.out.println(unique(a2, b2));\n\t\tSystem.out.println(unique(a3, b3));\n\t\tSystem.out.println(unique(a4, b4));\n\t\tSystem.out.println(unique(a5, b5));\n\t\tSystem.out.println(unique(a6, b6));\n\t\tSystem.out.println(unique(a7, b7));\n\t\tSystem.out.println(unique(a8, b8));\n\t\tSystem.out.println(unique(a9, b9));\n\t\tSystem.out.println(unique(a10, b10));\n\t\t\n\t}", "public static String solution() {\r\n\t\treturn \"73162890\";\r\n\t}", "@Test\r\n\tpublic void testErabiltzaileakBaloratuDituenPelikulenZerrenda() {\n\t\tArrayList<Integer> zer = BalorazioenMatrizea.getBalorazioenMatrizea().erabiltzaileakBaloratuDituenPelikulenZerrenda(e1.getId());\r\n\t\tassertTrue(zer.size() == 3);\r\n\t\tassertTrue(zer.contains(p1.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p2.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p4.getPelikulaId()));\r\n\t\tassertFalse(zer.contains(p3.getPelikulaId()));\r\n\t\t\r\n\t\t// e2 erabiltzaileak baloratu dituen pelikulen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().erabiltzaileakBaloratuDituenPelikulenZerrenda(e2.getId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(p2.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p3.getPelikulaId()));\r\n\t\tassertFalse(zer.contains(p1.getPelikulaId()));\r\n\t\t\r\n\t\t// e3 erabiltzaileak baloratu dituen pelikulen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().erabiltzaileakBaloratuDituenPelikulenZerrenda(e3.getId());\r\n\t\tassertTrue(zer.size() == 4);\r\n\t\tassertTrue(zer.contains(p1.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p2.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p3.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p4.getPelikulaId()));\r\n\t\t\r\n\t\t// e2 erabiltzaileak baloratu dituen pelikulen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().erabiltzaileakBaloratuDituenPelikulenZerrenda(e4.getId());\r\n\t\tassertTrue(zer.size() == 1);\r\n\t\tassertTrue(zer.contains(p2.getPelikulaId()));\r\n\t\tassertFalse(zer.contains(p1.getPelikulaId()));\r\n\t\t\r\n\t}", "@Test\r\n public void test4() \r\n {\r\n \tint loan = -1;\r\n \ttry{\r\n \t\tloan = p.getMonthlyAmount(TestHelper.getSSN(47,0,0,5555), 0 , 100, 100);\r\n assertTrue(loan == Consts.FULL_SUBSIDY); \t\t\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 4, correct : 2816, got : \"+ loan);\r\n \t}\r\n }", "@Test\n\tpublic void testPrimeActionnairePrincipal(){\n\t\tassertEquals(2000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 2));\n\t\tassertEquals(3000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 3));\n\t\tassertEquals(4000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 4));\n\t\tassertEquals(5000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 5));\n\t\tassertEquals(6000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 6));\n\t\tassertEquals(6000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 8));\n\t\tassertEquals(6000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 10));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 11));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 15));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 20));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 21));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 22));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 30));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 31));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 33));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 40));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 41));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 42));\n\n\t\t// cas categorie hotel = 2\n\t\tassertEquals(3000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 2));\n\t\tassertEquals(4000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 3));\n\t\tassertEquals(5000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 4));\n\t\tassertEquals(6000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 5));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 6));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 8));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 10));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 11));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 15));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 20));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 21));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 22));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 30));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 31));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 33));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 40));\n\t\tassertEquals(11000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 41));\n\t\tassertEquals(11000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 42));\n\n\t\t// cas categorie hotel = 3\n\t\tassertEquals(4000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 2));\n\t\tassertEquals(5000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 3));\n\t\tassertEquals(6000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 4));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 5));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 6));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 8));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 10));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 11));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 15));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 20));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 21));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 22));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 30));\n\t\tassertEquals(11000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 31));\n\t\tassertEquals(11000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 33));\n\t\tassertEquals(11000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 40));\n\t\tassertEquals(12000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 41));\n\t\tassertEquals(12000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 42));\n\t}", "private static boolean KawigiEdit_RunTest(int testNum, int[] p0, boolean hasAnswer, int p1) {\n System.out.print(\"Test \" + testNum + \": [\" + \"{\");\n for (int i = 0; p0.length > i; ++i) {\n if (i > 0) {\n System.out.print(\",\");\n }\n System.out.print(p0[i]);\n }\n System.out.print(\"}\");\n System.out.println(\"]\");\n EllysAndXor obj;\n int answer;\n obj = new EllysAndXor();\n long startTime = System.currentTimeMillis();\n answer = obj.getMax(p0);\n long endTime = System.currentTimeMillis();\n boolean res;\n res = true;\n System.out.println(\"Time: \" + (endTime - startTime) / 1000.0 + \" seconds\");\n if (hasAnswer) {\n System.out.println(\"Desired answer:\");\n System.out.println(\"\\t\" + p1);\n }\n System.out.println(\"Your answer:\");\n System.out.println(\"\\t\" + answer);\n if (hasAnswer) {\n res = answer == p1;\n }\n if (!res) {\n System.out.println(\"DOESN'T MATCH!!!!\");\n } else if ((endTime - startTime) / 1000.0 >= 2) {\n System.out.println(\"FAIL the timeout\");\n res = false;\n } else if (hasAnswer) {\n System.out.println(\"Match :-)\");\n } else {\n System.out.println(\"OK, but is it right?\");\n }\n System.out.println(\"\");\n return res;\n }", "@Test\n public void test22() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver();\n Tanh tanh0 = new Tanh();\n AllowedSolution allowedSolution0 = AllowedSolution.BELOW_SIDE;\n double double0 = illinoisSolver0.solve(16, (UnivariateRealFunction) tanh0, (-0.5), (double) 16, (-0.5), allowedSolution0);\n }", "@Test\n public void solve1() {\n }", "private static boolean KawigiEdit_RunTest(\n int testNum, int p0, int p1, boolean hasAnswer, int[] p2) {\n System.out.print(\"Test \" + testNum + \": [\" + p0 + \",\" + p1);\n System.out.println(\"]\");\n RearrangeAndIncrement obj;\n int[] answer;\n obj = new RearrangeAndIncrement();\n long startTime = System.currentTimeMillis();\n answer = obj.change(p0, p1);\n long endTime = System.currentTimeMillis();\n boolean res;\n res = true;\n System.out.println(\"Time: \" + (endTime - startTime) / 1000.0 + \" seconds\");\n if (hasAnswer) {\n System.out.println(\"Desired answer:\");\n System.out.print(\"\\t\" + \"{\");\n for (int i = 0; p2.length > i; ++i) {\n if (i > 0) {\n System.out.print(\",\");\n }\n System.out.print(p2[i]);\n }\n System.out.println(\"}\");\n }\n System.out.println(\"Your answer:\");\n System.out.print(\"\\t\" + \"{\");\n for (int i = 0; answer.length > i; ++i) {\n if (i > 0) {\n System.out.print(\",\");\n }\n System.out.print(answer[i]);\n }\n System.out.println(\"}\");\n if (hasAnswer) {\n if (answer.length != p2.length) {\n res = false;\n } else {\n for (int i = 0; answer.length > i; ++i) {\n if (answer[i] != p2[i]) {\n res = false;\n }\n }\n }\n }\n if (!res) {\n System.out.println(\"DOESN'T MATCH!!!!\");\n } else if ((endTime - startTime) / 1000.0 >= 2) {\n System.out.println(\"FAIL the timeout\");\n res = false;\n } else if (hasAnswer) {\n System.out.println(\"Match :-)\");\n } else {\n System.out.println(\"OK, but is it right?\");\n }\n System.out.println(\"\");\n return res;\n }", "@Test(timeout = 4000)\n public void test50() throws Throwable {\n String string0 = \"0(u\";\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n JSTerm jSTerm0 = new JSTerm();\n jSTerm0.add((Object) \"not\");\n Comparator<Integer> comparator0 = (Comparator<Integer>) mock(Comparator.class, new ViolatedAssumptionAnswer());\n jSSubstitution0.add((Object) \"0(u\");\n SystemInUtil.addInputLine(\"not\");\n // Undeclared exception!\n try { \n jSTerm0.applySubstitutionPF(jSSubstitution0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1 >= 1\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "@Test\n public void testExample3() {\n assertSolution(\"-6\", \"example-day01-2018-3.txt\");\n }", "public static void main(String[] args) {\n Homework1 hw1 = new Homework1();\n\n System.out.println(\"===Problem 1===\");\n hw1.problem1();\n\n System.out.println(\"===Problem 2===\");\n System.out.println(hw1.topInt(1.5));\n System.out.println(hw1.topInt(5.1));\n System.out.println(hw1.topInt(1.0));\n System.out.println(hw1.topInt(-4.2));\n\n\n System.out.println(\"===Problem 3===\");\n hw1.draw4x4('-');\n hw1.draw4x4('4');\n\n System.out.println(\"===Problem 4===\");\n System.out.println(hw1.citationName(\"Alastair\", \"Reynolds\"));\n System.out.println(hw1.citationName(\"Grace\", \"Hopper\"));\n\n System.out.println(\"===Problem 5===\");\n System.out.println(String.valueOf(hw1.min3(1.0, 2.0, 3.0)));\n System.out.println(String.valueOf(hw1.min3(4.0, 3.0, 2.0)));\n System.out.println(String.valueOf(hw1.min3(0.5, 0.1, 0.5)));\n \n System.out.println(\"===Problem 6===\");\n System.out.println(hw1.fibonacci(0));\n System.out.println(hw1.fibonacci(1));\n System.out.println(hw1.fibonacci(2));\n System.out.println(hw1.fibonacci(3));\n System.out.println(hw1.fibonacci(10));\n System.out.println(hw1.fibonacci(25));\n \n \n System.out.println(\"===Problem 7===\");\n //System.out.println(hw1.isPalindrome(\"racecar\"));\n //System.out.println(hw1.isPalindrome(\"cat\"));\n //System.out.println(hw1.isPalindrome(\"hannah\"));\n //System.out.println(hw1.isPalindrome(\"saippuakivikauppias\"));\n }", "@Test\n\t\tpublic void noApplyGoal() {\n\t\t\tassertFailure(\" ;H; ;S; x∈{1,2} ;; {1}⊆S |- 3=3\");\n\t\t}", "@Test\r\n public void test() {\r\n String[][] equations = { { \"a\", \"b\" }, { \"b\", \"c\" } },\r\n queries = { { \"a\", \"c\" }, { \"b\", \"a\" }, { \"a\", \"e\" }, { \"a\", \"a\" }, { \"x\", \"x\" } };\r\n double[] values = { 2.0, 3.0 };\r\n assertArrayEquals(new double[] { 6.0, 0.5, -1.0, 1.0, -1.0 }, calcEquation(equations, values, queries),\r\n Double.MIN_NORMAL);\r\n }", "@Override\n\t\tpublic boolean isValidSolution() {\n\t\t\treturn super.isValidSolution();\n\t\t}", "public void testGame1EmulateIncorrectAnswers() {\n int[] indicators;\n MainPage mainPage = getMainPage();\n GameObjectImpl game1 = mainPage.gameOpen(1);\n game1.waitIndicatorsLoad();\n indicators = game1.getIndicators();\n int qtyTasksBeforeCycle = indicators[3];\n int tasksFailedBeforeCycle = indicators[1];\n for(int iter = 0; iter < qtyTasksBeforeCycle - 1; iter++) {\n game1.waitTaskBegin();\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n indicators = game1.getIndicators();\n int varTasksPassedBegin = indicators[0];\n int varTasksFailedBegin = indicators[1];\n int varTasksRemainBegin = indicators[2];\n int qtyTasksInLoopBegin = indicators[3];\n\n String[] partsOfTask = game1.getPartsOfTask();\n String firstNumberVar = partsOfTask[0];\n String secondNumberVar = partsOfTask[1];\n String operationVar = partsOfTask[2];\n int actualResult = game1.getResultWithKeys(firstNumberVar, secondNumberVar, operationVar);\n // press wrong button\n String strActualResult = Integer.toString(actualResult + 1);\n for (int i = 0; i < strActualResult.length(); i++) {\n String subStr = strActualResult.substring(i, i + 1);\n game1.pressButton((subStr));\n }\n //press correct button\n strActualResult = Integer.toString(actualResult);\n for (int i = 0; i < strActualResult.length(); i++) {\n String subStr = strActualResult.substring(i, i + 1);\n game1.pressButton((subStr));\n }\n indicators = game1.getIndicators();\n int varTasksPassedEnd = indicators[0];\n int varTasksFailedEnd = indicators[1];\n int varTasksRemainEnd = indicators[2];\n int qtyTasksInLoopEnd = indicators[3];\n\n assert varTasksRemainEnd == varTasksRemainBegin : \"positiveTestCorrectAnswers: tasks remain\";//\n assert varTasksFailedEnd == (varTasksFailedBegin + 1) : \"positiveTestCorrectAnswers: tasks failed\";\n assert varTasksPassedEnd == varTasksPassedBegin : \"positiveTestCorrectAnswers: tasks passed\";\n assert qtyTasksInLoopEnd == qtyTasksInLoopBegin + 1 : \"negativeTestWrongAnswers: tasks all\";\n }\n indicators = game1.getIndicators();\n int varTasksFailedAfterCycle = indicators[1];\n int qtyTasksAfterCycle = indicators[3];\n assert varTasksFailedAfterCycle - tasksFailedBeforeCycle == qtyTasksAfterCycle - qtyTasksBeforeCycle\n : \"positiveTestCorrectAnswers: tasks summ\" ;//\n game1.clickCloseGame();\n\n }", "@Test\n\tpublic void test() {\n\t\tTestUtil.testEquals(new Object[][]{\n\t\t\t\t{4, 2, 7, 1, 3},\n\t\t\t\t{3, 3, 5, 2, 1},\n\t\t\t\t{15, 2, 4, 8, 2}\n\t\t});\n\t}", "@Test\r\n public void test9() \r\n {\r\n \tint loan = -1;\r\n \ttry{\r\n \t\tloan = p.getMonthlyAmount(TestHelper.getSSN(21,0,0,5555), Consts.FULLTIME_MAX_INCOME , 100, 100);\r\n assertTrue(loan == Consts.FULL_LOAN + Consts.FULL_SUBSIDY);\r\n \t}catch(AssertionError err){\r\n System.out.println(\"Test 9, correct : 9904, got : \"+ loan);\r\n \t}\r\n \r\n }", "private static boolean KawigiEdit_RunTest(int testNum, int[] p0, String[] p1, boolean hasAnswer, int p2) {\n\t\tSystem.out.print(\"Test \" + testNum + \": [\" + \"{\");\n\t\tfor (int i = 0; p0.length > i; ++i) {\n\t\t\tif (i > 0) {\n\t\t\t\tSystem.out.print(\",\");\n\t\t\t}\n\t\t\tSystem.out.print(p0[i]);\n\t\t}\n\t\tSystem.out.print(\"}\" + \",\" + \"{\");\n\t\tfor (int i = 0; p1.length > i; ++i) {\n\t\t\tif (i > 0) {\n\t\t\t\tSystem.out.print(\",\");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\\"\" + p1[i] + \"\\\"\");\n\t\t}\n\t\tSystem.out.print(\"}\");\n\t\tSystem.out.println(\"]\");\n\t\tXorTravelingSalesman obj;\n\t\tint answer;\n\t\tobj = new XorTravelingSalesman();\n\t\tlong startTime = System.currentTimeMillis();\n\t\tanswer = obj.maxProfit(p0, p1);\n\t\tlong endTime = System.currentTimeMillis();\n\t\tboolean res;\n\t\tres = true;\n\t\tSystem.out.println(\"Time: \" + (endTime - startTime) / 1000.0 + \" seconds\");\n\t\tif (hasAnswer) {\n\t\t\tSystem.out.println(\"Desired answer:\");\n\t\t\tSystem.out.println(\"\\t\" + p2);\n\t\t}\n\t\tSystem.out.println(\"Your answer:\");\n\t\tSystem.out.println(\"\\t\" + answer);\n\t\tif (hasAnswer) {\n\t\t\tres = answer == p2;\n\t\t}\n\t\tif (!res) {\n\t\t\tSystem.out.println(\"DOESN'T MATCH!!!!\");\n\t\t} else if ((endTime - startTime) / 1000.0 >= 2) {\n\t\t\tSystem.out.println(\"FAIL the timeout\");\n\t\t\tres = false;\n\t\t} else if (hasAnswer) {\n\t\t\tSystem.out.println(\"Match :-)\");\n\t\t} else {\n\t\t\tSystem.out.println(\"OK, but is it right?\");\n\t\t}\n\t\tSystem.out.println(\"\");\n\t\treturn res;\n\t}", "@Test\n public void test17() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver();\n Tanh tanh0 = new Tanh();\n AllowedSolution allowedSolution0 = AllowedSolution.LEFT_SIDE;\n double double0 = illinoisSolver0.solve(16, (UnivariateRealFunction) tanh0, (-8.575998569792264E-17), 2.384185791015625E-7, allowedSolution0);\n }", "@Test\r\n\tpublic void testEndMatchToMatchLeaguePlayMatch2() {\n\t\tassertTrue(\"Error storing end stock data\", false);\r\n\t\t//Check that portfolio values have been calculated correctly\r\n\t\tassertTrue(\"Error calcuating final portfolio values\", false);\r\n\t}", "@Test\n public void test26() throws Throwable {\n PegasusSolver pegasusSolver0 = new PegasusSolver();\n Log log0 = new Log();\n pegasusSolver0.setup(44, log0, 44, 894.245407657248, 44);\n // Undeclared exception!\n try { \n pegasusSolver0.doSolve();\n } catch(IllegalArgumentException e) {\n //\n // function values at endpoints do not have different signs, endpoints: [44, 894.245], values: [3.784, 6.796]\n //\n assertThrownBy(\"org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils\", e);\n }\n }", "@Test\n public void countDistinctUpToAlgebraicTest() throws IOException\n {\n\t countDistinctUpToAlgebraic(\"50\", 20); \n\t \n\t // check flow in which Intermediate passes the max count as a null in its result\n\t countDistinctUpToAlgebraic(\"5\", 5);\n }", "@Test\n\tpublic void testCase2()\n\t{\n\t\tint numberOfCases=-1;\n\t\t\n\t\t//checking number of case is positive or not\n\t\tboolean valid=BillEstimation.numberOfCaseValidation(numberOfCases);\n\t\tassertFalse(valid);\n\t\t\n\t}", "@Test\n\tpublic void testMultiplica3Reales0() {\n\t\tdouble resultado= Producto.multiplica3reales(7.2, 0, 5.2);\n\t\tdouble esperado= 0;\n\t\t\n\t\tassertEquals(esperado, resultado);\n\t}", "@Test\r\n public void test6() \r\n {\r\n \tint loan = -1;\r\n \ttry{\r\n \t\tloan = p.getMonthlyAmount(TestHelper.getSSN(57,0,0,5555), 0 , 100, 100);\r\n assertTrue(loan == Consts.ZERO);\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 6, correct : 0, got : \"+ loan);\r\n \t}\r\n \r\n }", "@Test\r\n public void test3()\r\n {\r\n \tint loan = -1;\r\n \ttry{\r\n \t\tloan = p.getMonthlyAmount(TestHelper.getSSN(46,0,0,5555), 0 , 100, 100);\r\n assertTrue(loan == Consts.FULL_LOAN + Consts.FULL_SUBSIDY);\r\n \t\t\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 3, correct : 9904, got : \"+ loan);\r\n \t}\r\n \r\n }", "@Test\n public void test18() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver();\n Tanh tanh0 = new Tanh();\n AllowedSolution allowedSolution0 = AllowedSolution.RIGHT_SIDE;\n double double0 = illinoisSolver0.solve(16, (UnivariateRealFunction) tanh0, (-0.9631727196538443), (double) 16, (-0.9631727196538443), allowedSolution0);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n SystemInUtil.addInputLine(\"UN..Ex0IyC7\");\n JSTerm jSTerm0 = new JSTerm();\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSTerm0.add((Object) \"[aT&d;~c\\\"\");\n JSPredicateForm jSPredicateForm0 = jSTerm0.applySubstitutionPF(jSSubstitution0);\n JSTerm jSTerm1 = new JSTerm();\n jSTerm1.add((Object) jSPredicateForm0);\n jSTerm0.add((Object) jSTerm1);\n JSPredicateForm jSPredicateForm1 = jSTerm0.clonePF();\n JSPredicateForm jSPredicateForm2 = jSPredicateForm1.standarizerPredicateForm();\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n jSPredicateForm2.forEach(consumer0);\n SystemInUtil.addInputLine(\"[aT&d;~c\\\"\");\n SystemInUtil.addInputLine(\"7'GUR\");\n SystemInUtil.addInputLine(\"PL^\\\"T$L:8.ammp}+R{\");\n JSPredicateForm jSPredicateForm3 = new JSPredicateForm();\n Integer integer0 = new Integer((-1529));\n jSPredicateForm0.add((Object) integer0);\n jSPredicateForm1.print();\n System.setCurrentTimeMillis((-1018L));\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n JSTerm jSTerm0 = new JSTerm();\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n String string0 = \"\";\n jSTerm0.add((Object) \"\");\n JSSubstitution jSSubstitution1 = new JSSubstitution();\n JSTerm jSTerm1 = new JSTerm();\n jSTerm1.add((Object) jSTerm0);\n int int0 = (-3277);\n JSJshopVars.exclamation = (-3277);\n jSTerm0.add((Object) jSTerm1);\n JSPredicateForm jSPredicateForm0 = jSTerm0.applySubstitutionPF(jSSubstitution0);\n Object object0 = new Object();\n SystemInUtil.addInputLine(\"\");\n Predicate<String> predicate0 = Predicate.isEqual((Object) \"\");\n Predicate<String> predicate1 = predicate0.negate();\n jSTerm0.removeIf(predicate0);\n Predicate<String> predicate2 = predicate1.negate();\n Predicate<String> predicate3 = predicate1.and(predicate0);\n predicate2.or(predicate3);\n predicate0.negate();\n JSSubstitution jSSubstitution2 = new JSSubstitution();\n predicate1.or(predicate2);\n Predicate<Integer> predicate4 = Predicate.isEqual((Object) predicate1);\n jSSubstitution2.removeIf(predicate4);\n // Undeclared exception!\n try { \n jSPredicateForm0.toStr();\n fail(\"Expecting exception: StackOverflowError\");\n \n } catch(StackOverflowError e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test49() throws Throwable {\n SystemInUtil.addInputLine(\"(e0\");\n String string0 = \"dk<BH 1I\\\"\";\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n JSTerm jSTerm0 = new JSTerm();\n jSTerm0.add((Object) \"not\");\n Comparator<Integer> comparator0 = (Comparator<Integer>) mock(Comparator.class, new ViolatedAssumptionAnswer());\n SystemInUtil.addInputLine(\"not\");\n // Undeclared exception!\n try { \n jSTerm0.applySubstitutionPF(jSSubstitution0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1 >= 1\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "@Test\n public void test22() throws Throwable {\n double[] doubleArray0 = new double[5];\n PolynomialFunctionLagrangeForm polynomialFunctionLagrangeForm0 = new PolynomialFunctionLagrangeForm(doubleArray0, doubleArray0);\n try { \n UnivariateRealSolverUtils.solve((UnivariateRealFunction) polynomialFunctionLagrangeForm0, (-79.6956205713495), 0.5, 1.0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // Abscissa 0 is duplicated at both indices 1 and 1\n //\n assertThrownBy(\"org.apache.commons.math.analysis.polynomials.PolynomialFunctionLagrangeForm\", e);\n }\n }", "@Test\n public void solveTest5() throws ContradictionException {\n\n Set<ConstraintInfo> constraints = new HashSet<>();\n Set<Position> vars = new HashSet<>();\n Position[] varArr = new Position[]{\n this.grid.getVariable(0, 6),\n this.grid.getVariable(1, 6),\n this.grid.getVariable(2, 6),\n this.grid.getVariable(3, 6),\n this.grid.getVariable(4, 6),\n this.grid.getVariable(5, 6),\n this.grid.getVariable(6, 6),\n this.grid.getVariable(7, 6),\n this.grid.getVariable(7, 5),\n this.grid.getVariable(7, 4),\n this.grid.getVariable(7, 3),\n this.grid.getVariable(7, 2),\n this.grid.getVariable(6, 2),\n this.grid.getVariable(5, 2),\n this.grid.getVariable(5, 1),\n this.grid.getVariable(5, 0)\n };\n vars.addAll(Arrays.asList(varArr));\n ArrayList<Set<Position>> cArr = new ArrayList<>();\n for (int i = 0; i < 14; i++) cArr.add(new HashSet<>());\n add(cArr.get(0), varArr[0], varArr[1]);\n add(cArr.get(1), varArr[0], varArr[1], varArr[2]);\n add(cArr.get(2), varArr[3], varArr[1], varArr[2]);\n add(cArr.get(3), varArr[3], varArr[4], varArr[2]);\n add(cArr.get(4), varArr[3], varArr[4], varArr[5]);\n add(cArr.get(5), varArr[6], varArr[4], varArr[5]);\n add(cArr.get(6), varArr[6], varArr[7], varArr[5], varArr[8], varArr[9]);\n add(cArr.get(7), varArr[8], varArr[9], varArr[10]);\n add(cArr.get(8), varArr[9], varArr[10], varArr[11], varArr[12], varArr[13]);\n add(cArr.get(9), varArr[12], varArr[13]);\n add(cArr.get(10), varArr[13]);\n add(cArr.get(11), varArr[13], varArr[14]);\n add(cArr.get(12), varArr[13], varArr[14], varArr[15]);\n add(cArr.get(13), varArr[14], varArr[15]);\n\n int[] cVal = new int[] { 1,2,2,1,1,1,2,1,2,1,1,2,3,2 };\n for (int i = 0; i < 14; i++) {\n constraints.add(new ConstraintInfo(cArr.get(i), cVal[i]));\n }\n\n MSModel model = new MSModel(constraints, vars);\n\n Set<Position> expectedBombs = new HashSet<>();\n expectedBombs.addAll(Arrays.asList(\n this.grid.getVariable(1, 6),\n this.grid.getVariable(2, 6),\n this.grid.getVariable(5, 6),\n this.grid.getVariable(5, 0),\n this.grid.getVariable(5, 1),\n this.grid.getVariable(5, 2)\n ));\n Set<Position> expectedNoBombs = new HashSet<>();\n expectedNoBombs.addAll(Arrays.asList(\n this.grid.getVariable(6,2),\n this.grid.getVariable(0,6),\n this.grid.getVariable(3,6),\n this.grid.getVariable(4,6),\n this.grid.getVariable(6,6)\n ));\n\n for (Position pos : vars) {\n if (expectedBombs.contains(pos)) {\n assertTrue(model.hasBomb(pos));\n } else {\n assertFalse(model.hasBomb(pos));\n }\n\n if (expectedNoBombs.contains(pos)) {\n assertTrue(model.hasNoBombs(pos));\n } else {\n assertFalse(model.hasNoBombs(pos));\n }\n }\n\n /*\n 00002x???\n 00003x???\n 00002xxx?\n 0000112x?\n 0000001x?\n 1221112x?\n xxxxxxxx?\n ?????????\n */\n }", "private int finalCheck(int n, int max1, int max2){\r\n\r\n //this represents all the numbers that are guaranteed not to be the answer.\r\n //the distance to the end of the array for each array from max is all the right hand numbers the answer cannot be\r\n\r\n n = n - (array1.length + array2.length - max1 - max2 - 2);\r\n\r\n int x0, x1, x2, x3;\r\n x0 = x1 = x2 = x3 = 0;\r\n\r\n //assigning all the values into 4 variables\r\n x0 = array1[max1];\r\n x1 = array2[max2];\r\n //sometimes the pairs are both assigned to the end of the list, so the lower hand value is checked for vailidity\r\n if(max1 > 0){\r\n x2 = array1[max1-1];\r\n }\r\n if(max2 > 0){\r\n x3 = array2[max2-1];\r\n }\r\n\r\n //put into an array, sorted and returned based on previous n calculation\r\n int[] array = new int[]{x0, x1, x2,x3};\r\n\r\n sorter(array);\r\n\r\n if(n==3){\r\n return array[1];\r\n } else if(n==2){\r\n return array[2];\r\n } else return array[3];\r\n }", "@Test\r\n public void testSubtractionAsReversion() {\r\n Application.loadQuestions();\r\n assertTrue(Application.allQuestions.contains(\"21 - 7 = ?\") || Application.allQuestions.contains(\"21 - 14 = ?\"));\r\n }", "public static void main(String[] args) {\n\n\t\tint n1, n2, n3;\n\t\tn1 = 41;\n\t\tn2 = 4;\n\t\tn3 = 421;\n\n\t\tif (n1 == n2 && n1 != n3) {\n\t\t\tSystem.out.println(\"n1 and n2 are equal.\");\n\t\t}\n\n\t\telse if (n2 == n3 && n2 != n1) {\n\t\t\tSystem.out.println(\"n2 and n3 are equal.\");\n\t\t}\n\n\t\telse if (n1 == n3 && n1 != n2) {\n\t\t\tSystem.out.println(\"n1 and n3 are equal.\");\n\t\t}\n\n\t\telse if (n1 == n2 && n1 == n3 && n2 == n3) {\n\t\t\tSystem.out.println(\"They are all equal.\");\n\t\t}\n\n\t\telse {\n\t\t\tSystem.out.println(\"None of them are equal.\");\n\t\t}\n\n\t\tSystem.out.println(\"=======================\");\n\t\t// 2nd solution. wrong solution.\n\n\t\tint n11 = 15;\n\t\tint n22 = 15;\n\t\tint n33 = 15;\n\n\t\tif (n11 == n22 && n11 == n33 && n22 == n33) {\n\t\t\tSystem.out.println(\"all equal.\");\n\t\t}\n\n\t\tif ((n11 == n22) & (n11 != n33)) {\n\t\t\tSystem.out.println(\"n11 and n22 are equal.\");\n\t\t}\n\n\t\tif (n22 == n33 & n22 != n11) {\n\t\t\tSystem.out.println(\"n22 and n33 are equal.\");\n\t\t}\n\n\t\tif (n11 == n33 & n11 != n22) {\n\t\t\tSystem.out.println(\"n11 and n33 are equal.\");\n\t\t}\n\n\t\telse {\n\t\t\tSystem.out.println(\"none of them are equal.\");\n\t\t}\n\t\tSystem.out.println(\"=======================\");\n\n\t\t// 3rd solution. nested if\n\n\t\tint A = 15;\n\t\tint B = 151;\n\t\tint C = 11;\n\n\t\tif (A == B && A == C && B == C) {\n\t\t\tSystem.out.println(\"all are equal.\");\n\t\t}\n\n\t\telse // if they are not all equal\n\t\t\tif (A == B) {\n\t\t\t\tSystem.out.println(\"A and B are equal.\");\n\t\t\t}\n\t\n\t\t\telse if (A == C) {\n\t\t\t\tSystem.out.println(\"A and C are equal.\");\n\t\t\t}\n\t\n\t\t\telse if (B == C) {\n\t\t\t\tSystem.out.println(\"B and C are equal.\");\n\t\t\t}\n\t\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"none of them are equal.\");\n\t\t\t}\n\n\t\tSystem.out.println(\"=======================\");\n\n\t\tint grade = 101;\n\n\t\tif (grade >= 60 && grade <= 100) {\n\n\t\t\tif (grade >= 90 && grade <= 100) {\n\t\t\t\tSystem.out.println(\"grade is A\");\n\t\t\t}\n\n\t\t\telse if (grade >= 80 && grade < 90) {\n\t\t\t\tSystem.out.println(\"grade is B\");\n\t\t\t}\n\n\t\t\telse if (grade >= 70 && grade < 80) {\n\t\t\t\tSystem.out.println(\"grade is C\");\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"grade is D\");\n\t\t\t}\n\t\t} // closing curly brace of the first if statement. very important.\n\n\t\telse if (grade >= 0 && grade < 60) {\n\t\t\tSystem.out.println(\"Failed.\");\n\t\t}\n\n\t\telse {\n\t\t\tSystem.out.println(\"invalid entry\");\n\t\t}\n\n\t}", "@Test\n public void test24() throws Throwable {\n double[] doubleArray0 = new double[5];\n PolynomialFunctionLagrangeForm polynomialFunctionLagrangeForm0 = new PolynomialFunctionLagrangeForm(doubleArray0, doubleArray0);\n try { \n UnivariateRealSolverUtils.solve((UnivariateRealFunction) polynomialFunctionLagrangeForm0, (-628.8590785579964), 31.140624862635367);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // Abscissa 0 is duplicated at both indices 1 and 1\n //\n assertThrownBy(\"org.apache.commons.math.analysis.polynomials.PolynomialFunctionLagrangeForm\", e);\n }\n }" ]
[ "0.67945635", "0.6673548", "0.6526053", "0.64741653", "0.63364255", "0.62869585", "0.6269661", "0.62342775", "0.6175088", "0.6169179", "0.6168685", "0.612659", "0.6101755", "0.6091324", "0.6085694", "0.6051291", "0.6034423", "0.60330963", "0.6028233", "0.60071576", "0.5990511", "0.59797096", "0.59679294", "0.5958851", "0.59333265", "0.5923159", "0.5914167", "0.59081095", "0.5908101", "0.5902044", "0.5895634", "0.5890649", "0.58842206", "0.5868171", "0.58589506", "0.5856268", "0.58520424", "0.5851296", "0.5851291", "0.5849912", "0.5843885", "0.5839095", "0.58377624", "0.5834472", "0.5831642", "0.5831515", "0.58293915", "0.5821511", "0.5817824", "0.58160084", "0.5810629", "0.58100504", "0.5808294", "0.58034265", "0.58032876", "0.5798484", "0.5796464", "0.5792115", "0.5788306", "0.57832247", "0.57821894", "0.5774644", "0.57709867", "0.5770029", "0.5764377", "0.57594526", "0.57519245", "0.5751898", "0.5749094", "0.5745113", "0.5744403", "0.57428706", "0.5738518", "0.5737287", "0.57294995", "0.5728489", "0.5727467", "0.5719656", "0.5719208", "0.5719045", "0.5718492", "0.57174295", "0.5712674", "0.57119006", "0.57105845", "0.5708619", "0.5704654", "0.5699821", "0.56972766", "0.5692982", "0.5692687", "0.5689094", "0.56888413", "0.5688025", "0.56866586", "0.56840247", "0.5683098", "0.5678513", "0.5676689", "0.5674768", "0.5674133" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_student_fee, container, false); ((AppCompatActivity)getActivity()).getSupportActionBar().setTitle("Student Fee"); rollSearchField = view.findViewById(R.id.rollSearchField); rollSearchBtn = view.findViewById(R.id.rollSearchBtn); Retrofit retrofit = new Retrofit.Builder() .baseUrl(getString(R.string.base_url_api)) .addConverterFactory(GsonConverterFactory.create()) .build(); service = retrofit.create(ApiRequest.class); rollSearchBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { String roll = rollSearchField.getText().toString(); Call<StudentRollSearchResult> rollSearchResultCall = service.GetSearchRollResults(roll); rollSearchResultCall.enqueue(new Callback<StudentRollSearchResult>() { @Override public void onResponse(Call<StudentRollSearchResult> call, Response<StudentRollSearchResult> response) { if (response.isSuccessful()) { StudentRollSearchResult result = response.body(); StudentFeesAddFragment fragment = new StudentFeesAddFragment(); Bundle bundle = new Bundle(); bundle.putString("S_FNAME",result.getFname()); bundle.putString("S_LNAME",result.getLname()); bundle.putString("S_UID",result.getU_id()); bundle.putString("S_CLASS",result.getClassName()); fragment.setArguments(bundle); getFragmentManager() .beginTransaction() .replace(R.id.studentFeeMainFrame,fragment) .addToBackStack("Student_fee") .commit(); }else { Snackbar snackbar = Snackbar .make(getView(), "No student found !!", Snackbar.LENGTH_INDEFINITE); snackbar.setAction("Retry", new View.OnClickListener() { @Override public void onClick(View view) { rollSearchField.setText(""); } }); snackbar.setActionTextColor(Color.RED); snackbar.show(); } } @Override public void onFailure(Call<StudentRollSearchResult> call, Throwable t) { } }); } }); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
Creates a new Table8.
Table8 create(Table8 table8);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TABLE createTABLE();", "Table createTable();", "FromTable createFromTable();", "public TableCreation(Table table) {\n this.table = table;\n }", "TableFull createTableFull();", "BTable createBTable();", "private void createTable() {\n table = new Table();\n table.bottom();\n table.setFillParent(true);\n }", "tbls createtbls();", "TableInstance createTableInstance();", "private void createStressTestControlTable() {\n Column runId = new Column(\"RUN_ID\");\n runId.setMappedType(\"INTEGER\");\n runId.setPrimaryKey(true);\n runId.setRequired(true);\n Column clientCommitSleepMs = new Column(\"CLIENT_COMMIT_SLEEP_MS\");\n clientCommitSleepMs.setMappedType(\"BIGINT\");\n Column clientCommitRows = new Column(\"CLIENT_COMMIT_ROWS\");\n clientCommitRows.setMappedType(\"BIGINT\");\n Column serverCommitSleepMs = new Column(\"SERVER_COMMIT_SLEEP_MS\");\n serverCommitSleepMs.setMappedType(\"BIGINT\");\n Column serverCommitRows = new Column(\"SERVER_COMMIT_ROWS\");\n serverCommitRows.setMappedType(\"BIGINT\");\n Column payloadColumns = new Column(\"PAYLOAD_COLUMNS\");\n payloadColumns.setMappedType(\"INTEGER\");\n Column initialSeedSize = new Column(\"INITIAL_SEED_SIZE\");\n initialSeedSize.setMappedType(\"BIGINT\");\n Column duration = new Column(\"DURATION_MINUTES\");\n duration.setMappedType(\"BIGINT\");\n\n Table table = new Table(STRESS_TEST_CONTROL, runId, clientCommitSleepMs, clientCommitRows, serverCommitSleepMs, serverCommitRows,\n payloadColumns, initialSeedSize, duration);\n engine.getDatabasePlatform().createTables(true, true, table);\n }", "public void createTapTable(TableConfig tableConfig) throws ConfigurationException;", "protected void createTable() {\n table = (MapEntry<K, V>[]) new MapEntry[capacity]; // safe cast\n }", "public static LearningTable createLearningTable() {\n\t\tLearningTable table = new LearningTable(null, null, null);\n\t\t\n\t\ttable.getAttributes().addAll(createAttributes());\n\t\ttable.getExamples().addAll(createExamples(table.getAttributes()));\n\t\t\n\t\treturn table;\n\t}", "public void createNewTable() {\n String dropOld = \"DROP TABLE IF EXISTS card;\";\n\n // SQL statement for creating a new table\n String sql = \"CREATE TABLE IF NOT EXISTS card (\\n\"\n + \"id INTEGER PRIMARY KEY AUTOINCREMENT, \\n\"\n + \"number TEXT, \\n\"\n + \"pin TEXT,\\n\"\n + \"balance INTEGER DEFAULT 0\"\n + \");\";\n\n try (Connection connection = connect();\n Statement stmt = connection.createStatement()) {\n\n //drop old table\n stmt.execute(dropOld);\n\n //create a new table\n stmt.execute(sql);\n } catch (SQLException e) {\n System.out.println(\"Exception3: \" + e.getMessage());\n }\n }", "public Table(int size) {\n\t\tsuper(size);\n\t}", "static LearningTable createFilledLearningTable() {\n\t\tLearningTable table = new LearningTable(null, null, null);\n\t\t\n\t\ttable.getAttributes().addAll(createAttributes());\n\t\ttable.getExamples().addAll(createFilledExamples());\n\t\t\n\t\treturn table;\n\t}", "public void createTable() throws LRException\n\t{\n\t\tgetBackground();\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\t// Create a new (empty) record\n\t\tcreate(new Hashtable(),myData);\n\t\tif (myData.record==null) throw new LRException(DataRMessages.nullRecord(getName()));\n\t\ttry\n\t\t{\n\t\t\tbackground.newTransaction();\n\t\t\tmyData.record.createNewTable(background.getClient(),true);\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "public void createNewTable() {\n // SQL statement for creating a new table\n String sql = \"CREATE TABLE IF NOT EXISTS card (\\n\"\n + \" id INTEGER PRIMARY KEY AUTOINCREMENT,\\n\"\n + \" number TEXT,\\n\"\n + \" pin TEXT,\\n\"\n + \" balance INTEGER DEFAULT 0\\n\"\n + \");\";\n\n try (Connection conn = DriverManager.getConnection(url);\n Statement stmt = conn.createStatement()) {\n // create a new table\n stmt.execute(sql);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public void createTables(){\n Map<String, String> name_type_map = new HashMap<>();\n List<String> primaryKey = new ArrayList<>();\n try {\n name_type_map.put(KEY_SINK_NAME, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_SINK_ADDRESS, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_SINK_DETAIL, MyDatabase.TYPE_VARCHAR);\n primaryKey.add(KEY_SINK_ADDRESS);\n myDatabase.createTable(TABLE_SINK, name_type_map, primaryKey, null);\n }catch (MySQLException e){ //数据表已存在\n e.print();\n }\n try {\n name_type_map.clear();\n name_type_map.put(KEY_NODE_NAME, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_PARENT, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_DETAIL, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_ADDRESS,MyDatabase.TYPE_VARCHAR);\n primaryKey.clear();\n primaryKey.add(KEY_NODE_PARENT);\n primaryKey.add(KEY_NODE_ADDRESS);\n myDatabase.createTable(TABLE_NODE, name_type_map, primaryKey, null);\n }catch (MySQLException e){\n e.print();\n }\n\n try {\n name_type_map.clear();\n name_type_map.put(KEY_NODE_ADDRESS, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_PARENT, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_DATA_TIME, MyDatabase.TYPE_TIMESTAMP);\n name_type_map.put(KEY_DATA_VAL, MyDatabase.TYPE_FLOAT);\n primaryKey.clear();\n primaryKey.add(KEY_DATA_TIME);\n primaryKey.add(KEY_NODE_ADDRESS);\n primaryKey.add(KEY_NODE_PARENT);\n myDatabase.createTable(TABLE_DATA, name_type_map, primaryKey, null);\n }catch (MySQLException e) {\n e.print();\n }\n }", "private void createTable() {\n\t\t// Tao dataModel & table \n\t\tdataModel = new DefaultTableModel(headers, 0);\n\t\ttable.setModel(dataModel);\n\t\t\n\t\tnapDuLieuChoBang();\n\t}", "private static void manageTableCreation(int upperBound) {\r\n\t\tcreateTables(100, upperBound);\r\n\t\tcreateTables(200, upperBound);\r\n\t\tcreateTables(400, upperBound);\r\n\t\tcreateTables(600, upperBound);\r\n\t\tcreateTables(800, upperBound);\t\t\r\n\t}", "public void createNewTable() throws WoodsException{\n\t\t\tuserTable = new Table(tableName);\n\t\t\tDatabase.get().storeTable(tableName, userTable);\n\t\t}", "protected abstract void initialiseTable();", "@SuppressWarnings(\"unchecked\")\n private void createTable() {\n table = (LinkedList<Item<V>>[])new LinkedList[capacity];\n for(int i = 0; i < table.length; i++) {\n table[i] = new LinkedList<>();\n }\n }", "private TimeTable createTimeTableStary(){\n\n final String dateString = \"03.07.2017\";\n SimpleDateFormat formater = new SimpleDateFormat(\"dd.MM.yyyy\");\n\n Date timetableDate = null;\n try {\n timetableDate = formater.parse(dateString);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n ArrayList<Subject> testSubs = new ArrayList<>();\n testSubs.add(new Subject(\"Př\",\"Teoretická informatika\",732,\"UAI\",\"08:00\",\"09:30\", Calendar.MONDAY, \"BB\", \"1\",\"3.10.2016\",\"2.1.2017\",true));\n testSubs.add(new Subject(\"Př\",\"Bakalářská angličtina NS 3\",230,\"OJZ\",\"10:00\",\"11:30\", Calendar.TUESDAY, \"BB\", \"4\",\"3.10.2016\",\"2.1.2017\",true));\n testSubs.add(new Subject(\"Cv\",\"Teoretická informatika\",732,\"UAI\",\"14:30\",\"16:00\", Calendar.TUESDAY, \"AV\", \"Pč4\",\"3.10.2016\",\"2.1.2017\",true));\n\n\n return new TimeTable (timetableDate, testSubs);\n\n }", "private static Instruction createGoToTableInstruction(final Short tableId) {\n\n\t\tLOG.info(\"createGoToTable table ID \" + tableId);\n\n\t\treturn new InstructionBuilder()\n\t\t\t\t.setInstruction(new GoToTableCaseBuilder()\n\t\t\t\t\t\t.setGoToTable(new GoToTableBuilder().setTableId(tableId).build()).build())\n\t\t\t\t.setKey(new InstructionKey(getInstructionKey())).setOrder(0).build();\n\n\t}", "public static void createTable() {\n\n // Create statement\n Statement statement = null;\n try {\n statement = Database.getDatabase().getConnection().createStatement();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n // Attempt to create table\n try {\n statement.execute(\n \"CREATE TABLE \" + Constants.SANITATION_TABLE + \"(\" +\n \"requestID INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),\" +\n \"nodeID VARCHAR(100) References \" + Constants.LOCATION_TABLE + \" (nodeID), \" +\n \"priority VARCHAR(10), \" +\n \"status VARCHAR(100), \" +\n \"description VARCHAR(100), \" +\n \"requesterID INT REFERENCES \" + Constants.USERS_TABLE + \"(userID), \" +\n \"requestTime TIMESTAMP, \" +\n \"servicerID INT REFERENCES \" + Constants.USERS_TABLE + \"(userID), \" +\n \"claimedTime TIMESTAMP, \" +\n \"completedTime TIMESTAMP, \" +\n \"CONSTRAINT priority_enum CHECK (priority in ('LOW', 'MEDIUM', 'HIGH')), \" +\n \"CONSTRAINT status_enum CHECK (status in ('INCOMPLETE', 'COMPLETE')))\"\n );\n } catch (SQLException | NullPointerException e) {\n e.printStackTrace();\n }\n }", "void initTable();", "ByteDataTable()\n\t{\n\t\tsuper();\n\n\t\tdouble cellWidth = WIDEST_BYTE_STRING.getBoundsInLocal().getWidth();\n\t\tArrayList<TableColumn<Row, String>> columns = new ArrayList<TableColumn<Row, String>>();\n\t\tfor (int i = 0; i < NUM_COLUMNS; ++i) {\n\t\t\tTableColumn<Row, String> col = new TableColumn<Row, String>(COLUMN_HEADINGS[i]);\n\t\t \tcol.setCellValueFactory(new HexTableCell(\"columns\", i));\n\t\t\tcol.setPrefWidth(cellWidth);\n\t\t\tcolumns.add(col);\n \t\t}\n\n\t\tsetColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);\n\t\tgetColumns().setAll(columns);\n\t}", "public Builder setBaseTableBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n baseTable_ = value;\n onChanged();\n return this;\n }", "public void testCreateTable() {\n LOG.info(\"Entering testCreateTable.\");\n\n // Specify the table descriptor.\n HTableDescriptor htd = new HTableDescriptor(tableName);\n\n // Set the column family name to info.\n HColumnDescriptor hcd = new HColumnDescriptor(\"info\");\n\n // Set data encoding methods,HBase provides DIFF,FAST_DIFF,PREFIX\n // and PREFIX_TREE\n hcd.setDataBlockEncoding(DataBlockEncoding.FAST_DIFF);\n\n // Set compression methods, HBase provides two default compression\n // methods:GZ and SNAPPY\n // GZ has the highest compression rate,but low compression and\n // decompression effeciency,fit for cold data\n // SNAPPY has low compression rate, but high compression and\n // decompression effeciency,fit for hot data.\n // it is advised to use SANPPY\n hcd.setCompressionType(Compression.Algorithm.SNAPPY);\n\n htd.addFamily(hcd);\n\n Admin admin = null;\n try {\n // Instantiate an Admin object.\n admin = conn.getAdmin();\n if (!admin.tableExists(tableName)) {\n LOG.info(\"Creating table...\");\n admin.createTable(htd);\n LOG.info(admin.getClusterStatus());\n LOG.info(admin.listNamespaceDescriptors());\n LOG.info(\"Table created successfully.\");\n } else {\n LOG.warn(\"table already exists\");\n }\n } catch (IOException e) {\n LOG.error(\"Create table failed.\");\n } finally {\n if (admin != null) {\n try {\n // Close the Admin object.\n admin.close();\n } catch (IOException e) {\n LOG.error(\"Failed to close admin \", e);\n }\n }\n }\n LOG.info(\"Exiting testCreateTable.\");\n }", "public void crearTabla() {\n\t\tthis.tabla= new String[palabras.length+1][4];\t\n\t}", "public void createTable() {\r\n\t\tclient.createTable();\r\n\t}", "public void initTable();", "@Override\r\n public Db_db createTable (Db_table table)\r\n {\r\n Db_db db = null;\r\n String query = \"CREATE TABLE IF NOT EXISTS \"+ table.getName() + \" (\"; \r\n String primaryKeyName = null;\r\n Set<Map.Entry<String, Db_tableColumn>> tableEntries;\r\n List<String> listOfUniqueKey = Lists.newArrayList();\r\n \r\n if(curConnection_ != null)\r\n {\r\n try\r\n {\r\n tableEntries = table.getEntrySet();\r\n for(Map.Entry<String, Db_tableColumn> entry: tableEntries)\r\n {\r\n Db_tableColumn entryContent = entry.getValue();\r\n \r\n if(entryContent.isPrimary() && primaryKeyName == null)\r\n {\r\n primaryKeyName = entryContent.getName();\r\n }\r\n else if(entryContent.isPrimary() && primaryKeyName != null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(itsAttributeMapper_ == null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(entryContent.isUnique())\r\n {\r\n listOfUniqueKey.add(entryContent.getName());\r\n }\r\n \r\n String mappedAttribute = this.itsAttributeMapper_.MapAttribute(entryContent.getAttributeName());\r\n if(entryContent.getAttribute().isEnum())\r\n {\r\n mappedAttribute += entryContent.getAttribute().buildEnumValueListString();\r\n }\r\n query += entryContent.getName() + \" \" + mappedAttribute \r\n + (entryContent.isAutoIncreasmnet()?\" AUTO_INCREMENT \":\" \")\r\n + (entryContent.isUnique()?\" UNIQUE, \": \", \");\r\n }\r\n \r\n query += \"PRIMARY KEY (\" + primaryKeyName + \"));\";\r\n try (Statement sm = curConnection_.createStatement()) {\r\n sm.executeUpdate(query);\r\n db = this.curDb_;\r\n }\r\n \r\n }catch(NumberFormatException e){System.out.print(e);}\r\n catch(SQLException e){System.out.print(query);this.CurConnectionFailed();}\r\n }\r\n return db;\r\n }", "private void createStressTestStatusTable() {\n Column runId = new Column(\"RUN_ID\");\n runId.setMappedType(\"INTEGER\");\n runId.setPrimaryKey(true);\n runId.setRequired(true);\n Column nodeId = new Column(\"NODE_ID\");\n nodeId.setMappedType(\"VARCHAR\");\n nodeId.setPrimaryKey(true);\n nodeId.setRequired(true);\n nodeId.setSize(\"50\");\n Column status = new Column(\"STATUS\");\n status.setMappedType(\"VARCHAR\");\n status.setSize(\"10\");\n status.setRequired(true);\n status.setDefaultValue(\"NEW\");\n Column startTime = new Column(\"START_TIME\");\n startTime.setMappedType(\"TIMESTAMP\");\n Column endTime = new Column(\"END_TIME\");\n endTime.setMappedType(\"TIMESTAMP\");\n\n Table table = new Table(STRESS_TEST_STATUS, runId, nodeId, status, startTime, endTime);\n\n engine.getDatabasePlatform().createTables(true, true, table);\n }", "public void instantiateTable(){\n hashTable = new LLNodeHash[16];\n }", "private void createTable(Table table) {\n\t\t// Set up the table\n\t\ttable.setLayoutData(new GridData(GridData.FILL_BOTH));\n\n\t\t// Add the column (Task)\n\t\tTableColumn lTaskColumn = new TableColumn(table, SWT.NONE);\n\t\tlTaskColumn.setText(\"Task\");\n\n\t\t// Add the column (Operation)\n\t\tTableColumn lOperationColumn = new TableColumn(table, SWT.NONE);\n\t\tlOperationColumn.setText(\"Operation\");\n\n\t\t// Add the column (Duration)\n\t\tTableColumn lDurationColumn = new TableColumn(table, SWT.NONE);\n\t\tlDurationColumn.setText(\"Duration\");\n\n\t\t// Add the column (Timeout)\n\t\tTableColumn lTimeoutColumn = new TableColumn(table, SWT.NONE);\n\t\tlTimeoutColumn.setText(\"Timed Out\");\n\n\t\t// Add the column (TEF Result)\n\t\tTableColumn lResultColumn = new TableColumn(table, SWT.NONE);\n\t\tlResultColumn.setText(\"Build/TEF Result\");\n\n\t\t// Add the column (TEF RunWsProgram)\n\t\tTableColumn lTEFRunWsProgColumn = new TableColumn(table, SWT.NONE);\n\t\tlTEFRunWsProgColumn.setText(\"TEF RunWsProgram Result\");\n\n\t\t// Pack the columns\n\t\tfor (int i = 0, n = table.getColumnCount(); i < n; i++) {\n\t\t\tTableColumn lCol = table.getColumn(i);\n\t\t\tlCol.setResizable(true);\n\t\t\tlCol.setWidth(lCol.getText().length());\n\t\t\tlCol.pack();\n\t\t}\n\n\t\t// Turn on the header and the lines\n\t\ttable.setHeaderVisible(true);\n\t\ttable.setLinesVisible(true);\n\n\t}", "public void createTable() {\n try {\n tableLayout = findViewById(R.id.tabla);\n tb = new TableDinamic(tableLayout, getApplicationContext(), \"cargarDetalle\", clc, cap_1, cap_2, cap_ct, txtidReg, txtId, txtBloque, txtVariedad);\n tableLayout.removeAllViews();\n tb.addHeader(header);\n tb.addData(cargarTabla());\n tb.backgroundHeader(\n Color.parseColor(\"#20C0FF\")\n );\n tb.backgroundData(\n Color.parseColor(\"#FFFFFF\"),\n Color.parseColor(\"#81F0EDED\")\n );\n } catch (Exception e) {\n Toast.makeText(this, \"Error de la table: \" + e.toString(), Toast.LENGTH_LONG).show();\n }\n }", "Table getTable();", "public void doCreateTable();", "public void createNewTable(){\n Connection conn = null;\n Statement stmt = null;\n try{\n //STEP 2: Register JDBC driver\n System.out.println(\"Registered JDBC driver...\");\n Class.forName(\"com.mysql.jdbc.Driver\");\n\n //STEP 3: Open a connection\n System.out.println(\"Connecting to database...\");\n conn = DriverManager.getConnection(DB_URL);//acceses the database specified by the url through entering in the username and password\n System.out.println(\"Creating statement...\");\n stmt = conn.createStatement(); //access the database server and manipulate data in database\n String sql = \"CREATE TABLE EXPERIENCE_\"+gameNumber+\n \" (Id INT PRIMARY KEY AUTO_INCREMENT,\"+\n \"player VARCHAR(255), \" +\n \" bigsquare INTEGER, \" + \n \" smallsquare INTEGER)\";\n System.out.println(\"SUCCCESSS!\"+gameNumber+ \" yayyyY!\");\n stmt.executeUpdate(sql);\n System.out.println(\"sweeeeeeeeeet....\");\n stmt.close();\n conn.close(); \n }catch(SQLException se){\n //Handle errors for JDBC\n se.printStackTrace();\n }catch(Exception e){\n //Handle errors for Class.forName\n e.printStackTrace();\n }finally{\n //finally block used to close resources\n try{\n if(stmt!=null)\n stmt.close();\n }catch(SQLException se2){\n }// nothing we can do\n try{\n if(conn!=null)\n conn.close();\n }catch(SQLException se){\n se.printStackTrace();\n }//end finally try\n }//end try\n \n \n }", "@Override\n public void createTable() {\n String[] TABLE_COLUMNS_ATLAS = {\n TableColumn.ChecklistTable.CID + \" INTEGER PRIMARY KEY AUTOINCREMENT\",\n TableColumn.ChecklistTable.PID + \" INTEGER NOT NULL\",\n TableColumn.ChecklistTable.REAL + \" INTEGER DEFAULT 0\",\n TableColumn.ChecklistTable.UNIT_ID + \" INTEGER\",\n TableColumn.ChecklistTable.WAREHOUSE_ID + \" INTEGER\",\n TableColumn.ChecklistTable.QUEUE_ID + \" INTEGER\",\n TableColumn.ChecklistTable.CATEGORIES_ID + \" INTEGER\",\n TableColumn.ChecklistTable.DATE + \" DATE\",\n TableColumn.ChecklistTable.RECORDTIME + \" DATE\",\n TableColumn.ChecklistTable.CONFIRM + \" INTEGER DEFAULT 0\"\n };\n\n //TODO: create table\n database.execSQL(makeSQLCreateTable(TABLE_NAME, TABLE_COLUMNS_ATLAS));\n\n addColumn(TableColumn.ChecklistTable.CONFIRM, \" INTEGER DEFAULT 0\");\n\n //TODO: show table\n XCursor cursor = selectTable();\n printData(TABLE_NAME, cursor);\n cursor.close();\n }", "private MyTable generateTable()\n\t{\n\t\t//this creates the column headers for the table\n\t\tString[] titles = new String[] {\"Name\"};\n\t\t//fields will store all of the entries in the database for the GUI\n\t\tArrayList<String[]> fields = new ArrayList<String[]>();\n\t\tfor (food foodStuff: items) //for each element in items do the following\n\t\t{\n\t\t\t//creates a single row of the table\n\t\t\tString[] currentRow = new String[1]; //creates an array for this row\n\t\t\tcurrentRow[1] = foodStuff.getName(); //sets this row's name\n\t\t\tfields.add(currentRow); //adds this row to the fields ArrayList\n\t\t}\n\t\t//builds a table with titles and a downgraded fields array\n\t\tMyTable builtTable = new MyTable(fields.toArray(new String[0][1]), titles);\n\t\treturn builtTable; // return\n\t}", "private static InstructionsBuilder createGoToNextTableInstruction(short thistable) {\n\t\t// Create an instruction allowing the interaction.\n\t\tList<Instruction> instructions = new ArrayList<Instruction>();\n\t\tinstructions.add(createGoToTableInstruction((thistable)));\n\t\tInstructionsBuilder isb = new InstructionsBuilder();\n\t\tisb.setInstruction(instructions);\n\t\treturn isb;\n\t}", "public static void createNewTable(int i) {\n // SQLite connection string\n// String url = \"jdbc:sqlite:C://sqlite/db/file\" + i +\".db\";\n String url = \"jdbc:sqlite:F:\\\\splitespace\\\\fileinfo\" + i + \".db\";\n // SQL statement for creating a new table\n String sql = \"CREATE TABLE IF NOT EXISTS FileInfo (\\n\"\n + \"\tid integer PRIMARY KEY,\\n\"\n + \"\tpath VARCHAR(255) NOT NULL,\\n\"\n + \"\tscantime BIGINT\\n\"\n + \");\";\n\n String sql2 = \"CREATE TABLE IF NOT EXISTS FileInfo (\\n\"\n + \"\tid integer PRIMARY KEY,\\n\"\n + \"\tpid integer,\\n\"\n + \"\tpath VARCHAR(255) NOT NULL,\\n\"\n + \" isParent VARCHAR(11),\\n\"\n + \" abpath VARCHAR(255),\\n\"\n + \" abppath VARCHAR(255)\\n\"\n + \");\";\n\n try (Connection conn = DriverManager.getConnection(url);\n Statement stmt = conn.createStatement()) {\n // create a new table\n stmt.execute(sql2);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "@Override\r\n public void createTable() {\n String sql = \"create table \" + TABLE_NAME + \"(\";\r\n sql += ID + \" INTEGER primary key,\";\r\n sql += NAME + \" VARCHAR(50),\";\r\n sql += LON + \" FLOAT(10,6),\";\r\n sql += LAT + \" FLOAT(10,6)\";\r\n sql += \")\";\r\n database.execSQL(sql);\r\n }", "private void CreatTable() {\n String sql = \"CREATE TABLE IF NOT EXISTS \" + TABLE_NAME\n + \" (name varchar(30) primary key,password varchar(30));\";\n try{\n db.execSQL(sql);\n }catch(SQLException ex){}\n }", "TD createTD();", "@Override\n\tpublic TileEntity createNewTileEntity(World worldIn, int meta) {\n\t\treturn new TileTable();\n\t}", "public CreateTable(String table, String[] attributes) {\n\t\ttry {\n\t\t\tthis.table = table;\n\t\t\tfor(int i = 0; i < attributes.length; i++) {\n\t\t\t\tthis.attributes.add(attributes[i]);\n\t\t\t}\n\t\t\tthis.createTable();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Table() {\n this.tableName = \"\";\n this.rows = new HashSet<>();\n this.columnsDefinedOrder = new ArrayList<>();\n }", "public void testCreateTable1() throws Exception {\n Properties props = new Properties();\n props.setProperty(LockssRepositoryImpl.PARAM_CACHE_LOCATION, tempDirPath);\n props\n\t.setProperty(ConfigManager.PARAM_PLATFORM_DISK_SPACE_LIST, tempDirPath);\n ConfigurationUtil.setCurrentConfigFromProps(props);\n\n createTable();\n }", "private void createTable() {\n\t\tfreqTable = new TableView<>();\n\n\t\tTableColumn<WordFrequency, Integer> column1 = new TableColumn<WordFrequency, Integer>(\"No.\");\n\t\tcolumn1.setCellValueFactory(new PropertyValueFactory<WordFrequency, Integer>(\"serialNumber\"));\n\n\t\tTableColumn<WordFrequency, String> column2 = new TableColumn<WordFrequency, String>(\"Word\");\n\t\tcolumn2.setCellValueFactory(new PropertyValueFactory<WordFrequency, String>(\"word\"));\n\n\t\tTableColumn<WordFrequency, Integer> column3 = new TableColumn<WordFrequency, Integer>(\"Count\");\n\t\tcolumn3.setCellValueFactory(new PropertyValueFactory<WordFrequency, Integer>(\"count\"));\n\n\t\tList<TableColumn<WordFrequency, ?>> list = new ArrayList<TableColumn<WordFrequency, ?>>();\n\t\tlist.add(column1);\n\t\tlist.add(column2);\n\t\tlist.add(column3);\n\n\t\tfreqTable.getColumns().addAll(list);\n\t}", "public DatabaseTable() { }", "public void creatTable(String tableName,LinkedList<String> columnsName,LinkedList<String> columnsType );", "public TableDefinition(Class<T> model){\n this.singleton = this;\n this.model = model;\n try {\n OBJECT = Class.forName(model.getName());\n createTableDefinition();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Test\n public void testTableFactoryCreate() {\n TableController tableController = tableFactory.getTableController();\n tableController.addTable(2);\n assertEquals(1, tableController.getTableMap().get(2).size());\n }", "private void createStocksTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE stocks \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY, \" + \"owner INT, \"\n\t\t\t\t\t+ \"shareAmount INT, \" + \"purchasePrice DOUBLE, \" + \"symb VARCHAR(10), \"\n\t\t\t\t\t+ \"timePurchased BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table stocks\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of stocks table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "public void prepareTable() {\n \tthis.table = new Tape(this.height,this.width,2,this.map);\n }", "private void setNewTable() {\n\n for (List<Entity> list:\n masterList) {\n for (Entity entity :\n list) {\n entity.removeFromWorld();\n }\n list.clear();\n }\n\n gameFacade.setGameTable(gameFacade.newFullPlayableTable(\"asd\",\n 6, 0.5, 2, 2));\n for (Bumper bumper :\n gameFacade.getBumpers()) {\n Entity bumperEntity = factory.newBumperEntity(bumper);\n targets.add(bumperEntity);\n getGameWorld().addEntity(bumperEntity);\n }\n\n for (Target target :\n gameFacade.getTargets()) {\n Entity targetEntity = factory.newTargetEntity(target);\n targets.add(targetEntity);\n getGameWorld().addEntity(targetEntity);\n }\n }", "public void createVirtualTable(){\n\n\t\t\n\t\tif(DBHandler.getConnection()==null){\n\t\t\treturn;\n\t\t}\n\n\t\tif(DBHandler.tableExists(name())){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tStatement s = DBHandler.getConnection().createStatement();\n\t\t\ts.execute(\"create virtual table \"+name()+\" using fts4(\"+struct()+\")\");\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tMainFrame.print(e.getMessage());\n\t\t}\n\t}", "public BstTable() {\n\t\tbst = new Empty<Key, Value>();\n\t}", "static LearningTable createLearningTable(List<Attribute> attributes) {\n\t\tLearningTable table = new LearningTable(null, null, null);\n\t\t\n\t\ttable.getAttributes().addAll(attributes);\n\t\ttable.getExamples().addAll(createExamples(attributes));\n\t\t\n\t\treturn table;\n\t}", "protected void constructTable(Logger l, Statement s, int run)\n throws SQLException{\n createTable(s, run);\n insertResults(l,s,run);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"O\\\"6T\");\n File file0 = MockFile.createTempFile(\"<*kYz\", \"BLOB\");\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(file0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n SQLUtil.renderCreateTable(defaultDBTable0, true, nameSpec0, mockPrintWriter0);\n assertNull(defaultDBTable0.getDoc());\n }", "protected void constructTable(Logger l, Statement s, int run)\n throws SQLException{\n createTable(s, run);\n insertResults(l,s,run);\n }", "@Override\n\tpublic String createTable() {\n\t\t\t\treturn \"CREATE TABLE history_table_view(id number(8) primary key not null ,sqltext text, pointid varchar2(1024), type varchar2(100))\";\n\t}", "@Test\n public void testTableFactoryCreateNoOtherTables() {\n TableController tableController = tableFactory.getTableController();\n tableController.addTable(2);\n assertNull(tableController.getTableMap().get(1));\n assertNotNull(tableController.getTableMap().get(2));\n assertNull(tableController.getTableMap().get(3));\n }", "public synchronized void criarTabela(){\n \n String sql = \"CREATE TABLE IF NOT EXISTS CPF(\\n\"\n + \"id integer PRIMARY KEY AUTOINCREMENT,\\n\"//Autoincrement\n// + \"codDocumento integer,\\n\"\n + \"numCPF integer\\n\"\n + \");\";\n \n try (Connection c = ConexaoJDBC.getInstance();\n Statement stmt = c.createStatement()) {\n // create a new table\n stmt.execute(sql);\n stmt.close();\n c.close();\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage()); \n// System.out.println(e.getMessage());\n }\n System.out.println(\"Table created successfully\");\n }", "public final void mT__89() throws RecognitionException {\n try {\n int _type = T__89;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:59:7: ( 'create-tables' )\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:59:9: 'create-tables'\n {\n match(\"create-tables\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public TableDeclaration() {\n }", "public HashTable(int tableSize){\n this.tableSize = tableSize;\n }", "private Connection createTable() {\n\t\tSystem.out.println(\"We are creating a table\");\n\t\ttry (\n\t\t\t\t// Step 1: Allocate a database \"Connection\" object\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:\" + PORT_NUMBER + \"/experiences?user=root&password=root\"); // MySQL\n\t\t\t\t// Step 2: Allocate a \"Statement\" object in the Connection\n\t\t\t\tStatement stmt = conn.createStatement();\n\t\t\t\t) {\n\t\t\t// Step 3 - create our database\n\t\t\tString sql2 = \"CREATE TABLE IF NOT EXISTS t1 ( \" +\n\t\t\t\t\t\"question1 varchar(500), \" +\n\t\t\t\t\t\"question2 varchar(500), \" +\n\t\t\t\t\t\"question3 varchar(500), \" +\n\t\t\t\t\t\"question4 varchar(500), \" +\n\t\t\t\t\t\"question5 varchar(500), \" +\n\t\t\t\t\t\"question6 varchar(500), \" +\n\t\t\t\t\t\"question7 varchar(500), \" +\n\t\t\t\t\t\"question8 varchar(500), \" +\n\t\t\t\t\t\"question9 varchar(500));\";\n\t\t\tstmt.execute(sql2);\n\t\t\treturn conn;\n\t\t\t\n\t\t\t\n\n\t\t} catch(SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null;}\n\t\t}", "public void createPairTable() {\r\n //create total Table\r\n pairTable = new HashMap<>();\r\n\r\n //fill with values \r\n Play[] cAce = {Play.NONE, P, P, P, P, P, P, P, P, P, P, P};\r\n Play[] cTen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] cNine = {Play.NONE, S, P, P, P, P, P, S, P, P, S, S};\r\n Play[] cEight = {Play.NONE, P, P, P, P, P, P, P, P, P, P, P};\r\n Play[] cSeven = {Play.NONE, H, P, P, P, P, P, P, H, H, H, H};\r\n Play[] cSix = {Play.NONE, H, P, P, P, P, P, H, H, H, H, H};\r\n Play[] cFive = {Play.NONE, H, D, D, D, D, D, D, D, D, H, H};\r\n Play[] cFour = {Play.NONE, H, H, H, H, P, P, H, H, H, H, H};\r\n Play[] cThree = {Play.NONE, H, P, P, P, P, P, P, H, H, H, H};\r\n Play[] cTwo = {Play.NONE, H, P, P, P, P, P, P, H, H, H, H};\r\n\r\n pairTable.put(1, cAce);\r\n pairTable.put(2, cTwo);\r\n pairTable.put(3, cThree);\r\n pairTable.put(4, cFour);\r\n pairTable.put(5, cFive);\r\n pairTable.put(6, cSix);\r\n pairTable.put(7, cSeven);\r\n pairTable.put(8, cEight);\r\n pairTable.put(9, cNine);\r\n pairTable.put(10, cTen);\r\n pairTable.put(11, cAce);\r\n }", "public MyHashTable( )\r\n\t{\r\n\t\tthis(DEFAULTTABLESIZE);\r\n\t\t\r\n\t\t\t\r\n\t}", "Row createRow();", "private void createTransactionsTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE transactions \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY, \"\n\t\t\t\t\t+ \"owner INT, amount DOUBLE, source BIGINT, sourceType VARCHAR(20), target BIGINT, targetType VARCHAR(20), comment VARCHAR(255), time BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table transactions\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of transactions table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "private static void assembleRosterTable(){\n for (int i = 0; i < 10; i++) {\n rosterTable.insertRow(i);\n }\n }", "public HashTable(int tableSize) {\n\t\ttable = new ArrayList<>(tableSize);\n\t\tcapacity = tableSize;\n\t\tfor (int i = 0; i < tableSize; i++) {\n\t\t\ttable.add(new SequentialSearchSymbolTable<K, V>());\n\t\t}\n\t}", "private TimeTable createTimeTableNovy(){\n\n final String dateString = \"4.7.2017\";\n SimpleDateFormat formater = new SimpleDateFormat(\"dd.MM.yyyy\");\n\n Date timetableDate = null;\n try {\n timetableDate = formater.parse(dateString);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n ArrayList<Subject> testSubs = new ArrayList<Subject>();\n testSubs.add(new Subject(\"Př\",\"Teoretická informatika\",732,\"UAI\",\"08:00\",\"09:30\", Calendar.MONDAY, \"BB\", \"1\",\"3.10.2016\",\"2.1.2017\",true));\n testSubs.add(new Subject(\"Př\",\"Bakalářská angličtina NS 3\",230,\"OJZ\",\"12:00\",\"13:30\", Calendar.TUESDAY, \"BB\", \"4\",\"3.10.2016\",\"2.1.2017\",true));\n testSubs.add(new Subject(\"Cv\",\"Teoretická informatika\",732,\"UAI\",\"14:30\",\"16:00\", Calendar.TUESDAY, \"AV\", \"Pč4\",\"3.10.2016\",\"2.1.2017\",true));\n testSubs.add(new Subject(\"Cv\",\"Teoretická informatika\",733,\"UAI\",\"14:30\",\"16:00\", Calendar.TUESDAY, \"AV\", \"Pč4\",\"3.10.2016\",\"2.1.2017\",true));\n\n\n return new TimeTable(timetableDate, testSubs);\n }", "public MyHashTable( int tableSize )\r\n\t{\r\n\t\tthis.size = 0;\r\n\t\tthis.tableSize = nextPrime(tableSize);\r\n\t\ttable = new Object[this.tableSize];\r\n\t\tfor ( int i =0; i< this.tableSize; i++)\r\n\t\t{ this.table[i] = new LinkedArrays<T>(); }\r\n\t\r\n\t}", "Table getBaseTable();", "public String createTable() {\n\n String statement = \"CREATE TABLE \" + tableName + \"( \";\n\n //go through INTEGER, FLOAT, TEXT columns\n Iterator iterator = Iterables.filter(columns.entrySet(), entry -> entry.getValue().getType() instanceof String).iterator();\n\n while (iterator.hasNext()) {\n Map.Entry<Element, FieldData> fieldDataEntry = (Map.Entry<Element, FieldData>) iterator.next();\n statement += fieldDataEntry.getValue().createColumn() + \",\";\n }\n\n return (new StringBuilder(statement).replace(statement.length() - 1, statement.length(), \"\").toString() + \")\").toUpperCase();\n }", "public HashTable()\n\t{\n\t\tthis(START_TABELLENGROESSE);\n\t}", "private void createTables() {\n\n\t\tAutoDao.createTable(db, true);\n\t\tAutoKepDao.createTable(db, true);\n\t\tMunkaDao.createTable(db, true);\n\t\tMunkaEszkozDao.createTable(db, true);\n\t\tMunkaKepDao.createTable(db, true);\n\t\tMunkaTipusDao.createTable(db, true);\n\t\tPartnerDao.createTable(db, true);\n\t\tPartnerKepDao.createTable(db, true);\n\t\tProfilKepDao.createTable(db, true);\n\t\tSoforDao.createTable(db, true);\n\t\tTelephelyDao.createTable(db, true);\n\t\tPushMessageDao.createTable(db, true);\n\n\t}", "@SuppressWarnings(\"unused\")\n private AddTable() {\n }", "public ExampleTable toExampleTable() { return new ExampleTableImpl(this); }", "PivotTable createPivotTable();", "HashTable() {\n int trueTableSize = nextPrime(tableSize);\n HT = new FlightDetails[nextPrime(trueTableSize)];\n }", "@Override\r\n\tpublic void createTable(Connection con) throws SQLException {\r\n\t\tString sql = \"CREATE TABLE \" + tableName\r\n\t\t\t\t+ \"(pc_id integer, class_id varchar(20), level integer,\"\r\n\t\t\t\t+ \" PRIMARY KEY (pc_id,class_id,level) )\";\r\n\r\n\t\tif (DbUtils.doesTableExist(con, tableName)) {\r\n\r\n\t\t} else {\r\n\t\t\ttry (PreparedStatement ps = con.prepareStatement(sql);) {\r\n\t\t\t\tps.execute();\r\n\t\t\t}\r\n \r\n\t\t}\r\n\r\n\r\n\r\n\t\tString[] newInts = new String[] { \r\n\t\t\t\t\"hp_Increment\",};\r\n\t\tDAOUtils.createInts(con, tableName, newInts);\r\n\r\n\t}", "@SuppressWarnings(\"deprecation\")\n\tprivate TableLayout buildTable() {\n\t\t// Initialize table\n\t\tTableLayout table = new TableLayout(this);\n\t\tLayoutParams tableParams = new LayoutParams(LayoutParams.FILL_PARENT,\n\t\t\t\tLayoutParams.WRAP_CONTENT);\n\t\ttable.setLayoutParams(tableParams);\n\t\ttable.setPadding(10, 10, 10, 10);\n\n\t\t// Initialize generic row params\n\t\tLayoutParams genericRowParams = new TableRow.LayoutParams(\n\t\t\t\tLayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);\n\n\t\tfillTable(table, genericRowParams);\n\t\treturn table;\n\t}", "public void createTable(String tableName) {\n db.execSQL(\"create table if not exists '\" + tableName.replaceAll(\"\\\\s\", \"_\") + \"' (\"\n + KEY_ROWID + \" integer primary key autoincrement, \"\n + KEY_QUESTION + \" string not null, \"\n + KEY_ANSWER + \" string not null);\");\n }", "public TableObject()\r\n {\r\n\tsuper(ObjectType.Table);\r\n\tglobal = false;\r\n }", "public void createTable() throws DatabaseException\n\t{\n\t\tConnection connection = DatabaseManager.getSingleton().getConnection();\n\t\ttry\n\t\t{\n\t\t\tClosingPreparedStatement stmt = new ClosingPreparedStatement(connection,\n\t\t\t\t\t\"DROP TABLE IF EXISTS QuestStates\");\n\t\t\tstmt.executeUpdate();\n\t\t\tstmt.close();\n\n\t\t\tstmt = new ClosingPreparedStatement(connection,\n\t\t\t\t\t\"Create TABLE QuestStates (playerID INT NOT NULL, questID INT NOT NULL , questState INT NOT NULL, needingNotification BOOLEAN NOT NULL)\");\n\t\t\tstmt.executeUpdate();\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tthrow new DatabaseException(\"Unable to create the Quest table\", e);\n\t\t}\n\t}", "DataTable createDataTable();", "@Test\n public void createHighScoreTableTest() {\n assertTrue(database.createHighScoreTable(testTable));\n database.clearTable(testTable);\n }", "public Database createTableFromArray(int [][] dataDbn){\r\n \tDatabase db = new Database();\r\n \tTable table = null;\r\n \tToken t = null, t2 = null;\r\n \tAttribute attr = null;\r\n \tList ll;\r\n \tLinkedList attributeValues = new LinkedList();\r\n \tLinkedList sampleValueList;\r\n \tint numGenesTotal;\r\n \tint samples;\r\n \tString atrNode = \"node\";\r\n \t\r\n \ttry {\r\n \t\ttable = new Table(); \r\n \t\ttable.setName(\"name\");\r\n \t}catch(Exception e){\r\n \t\t\r\n\t\t\te.printStackTrace();\r\n \t}\r\n \t\r\n \t\r\n \tnumGenesTotal = dataDbn[0].length;\r\n \tsamples = dataDbn.length;\r\n \t\r\n \t// each gene has 3 levels (3 attributes). they are represent by 0,1,2\r\n \tattributeValues.add(new Integer(0));\r\n \tattributeValues.add(new Integer(1));\r\n \tattributeValues.add(new Integer(2));\r\n \t\r\n \t// set attributes for each gene\r\n \tfor(int k=0;k<numGenesTotal;k++){\r\n \t\tString name = atrNode + k;\r\n \t\tattr = new Attribute(name);\r\n \t\tattr.setValues(attributeValues);\r\n \t\ttable.addAttribute(attr);\r\n \t}\r\n \t\r\n \t// read dbnData and load gene's value of each sample in to List and then add this List in to the table\r\n \tfor(int i =0;i<samples;i++){\r\n \t\tsampleValueList = new LinkedList();\r\n \t\tfor(int j=0; j<numGenesTotal;j++){\r\n \t\t\tInteger val = new Integer(dataDbn[i][j]);\r\n \t\t\tsampleValueList.add(val);\r\n \t\t}\r\n \t\ttable.addTuple(new Tuple(sampleValueList));\r\n \t}\r\n \t\r\n \tdb.addTable(table);\r\n \t/*\r\n \tString filePath = \"C:\\\\Users\\\\devamuni\\\\Documents\\\\D_Result\\\\Input.out\";\r\n File f1 = new File(filePath);\r\n try {\r\n\t\t\tOutputStream os = new FileOutputStream(f1);\r\n\t\t\tsave(os, db);\r\n } catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\t\r\n\t\t\te.printStackTrace();\r\n } */\r\n \treturn db;\r\n }", "private void createStressTestRowIncomingTable(int payloadColumns) {\n Column[] defaultColumns = getDefaultStressTestRowColumns();\n Table table = new Table(STRESS_TEST_ROW_INCOMING, defaultColumns);\n List<Column> payloads = getPayloadColumns(payloadColumns);\n\n table.addColumns(payloads);\n engine.getDatabasePlatform().createTables(true, true, table);\n }", "public MonthlyValuesTable(Database database) \n {\n //Constructor calls DbTable's constructor\n super(database);\n setTableName(\"monthlyvalues\");\n }" ]
[ "0.683682", "0.66395456", "0.6475652", "0.64386827", "0.6387729", "0.63645387", "0.63582826", "0.6336693", "0.62032616", "0.6184819", "0.6079842", "0.60691", "0.60675025", "0.6047346", "0.6030971", "0.6028016", "0.59581476", "0.5932889", "0.5900512", "0.58935755", "0.58670545", "0.5859593", "0.5812588", "0.5756855", "0.57498866", "0.57464373", "0.5721303", "0.5712421", "0.5710874", "0.5709153", "0.5705148", "0.5680648", "0.5678358", "0.5671604", "0.56676084", "0.5653131", "0.5645092", "0.56313217", "0.5624932", "0.5621244", "0.56020993", "0.5598563", "0.5588773", "0.5568402", "0.55640674", "0.55615425", "0.5553203", "0.55493426", "0.5534289", "0.5532025", "0.5524473", "0.55225086", "0.5520922", "0.5518569", "0.55127585", "0.5512035", "0.5509429", "0.55087245", "0.55016124", "0.54682636", "0.54648846", "0.545915", "0.5456439", "0.5456046", "0.54410374", "0.5437396", "0.54340255", "0.5418544", "0.5418109", "0.5410204", "0.5409371", "0.5407377", "0.5397996", "0.53932893", "0.5390379", "0.539011", "0.5388407", "0.53833544", "0.5382898", "0.538264", "0.5367467", "0.53628415", "0.53622544", "0.5353151", "0.53520167", "0.5351663", "0.5348042", "0.5332867", "0.5324544", "0.53195", "0.5312037", "0.5299656", "0.529576", "0.5292043", "0.52865857", "0.52860206", "0.52729726", "0.52667356", "0.52651787", "0.526488" ]
0.8774972
0
Finds Table8 by id.
Table8 getById(Integer table8Id) throws EntityNotFoundException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object queryByID(Class<?> tableClass, Serializable id) throws Exception;", "public TapTable findOneTable(String tableName);", "public T findById(int id) {\n\t\tConnection connection = null;\n\t\tPreparedStatement st = null;\n\t\tResultSet rs = null;\n\t\tString query = createSelectQuery(\"id\");\n\t\ttry {\n\t\t\tconnection = ConnectionFactory.createCon();\n\t\t\tst = connection.prepareStatement(query);\n\t\t\tst.setInt(1, id);\n\t\t\trs = st.executeQuery();\n\t\t\t\n\t\t\treturn createObjects(rs).get(0);\n\t\t}catch(SQLException e) {\n\t\t\tLOGGER.fine(type.getName() + \"DAO:findBy\" + e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "public T findById(int id)\n {\n Connection connection = null;\n PreparedStatement statement = null;\n ResultSet resultSet = null;\n String query = createSelectQuery(\"id\");\n try\n {\n connection = ConnectionFactory.getConnection();\n statement = connection.prepareStatement(query);\n statement.setInt(1,id);\n resultSet = statement.executeQuery();\n\n return createObjects(resultSet).get(0);\n }catch (SQLException e)\n {\n LOGGER.log(Level.WARNING,type.getName() + \"DAO:findById\"+ e.getMessage());\n }finally {\n ConnectionFactory.close(resultSet);\n ConnectionFactory.close(statement);\n ConnectionFactory.close(connection);\n }\n return null;\n }", "@Override\n public T findById(ID id) throws SQLException {\n\n return this.dao.queryForId(id);\n\n }", "private Table getTable(int id) throws Exception {\n // Requete MetaData pour connaitre la table\n FakeDriver.getDriver().pushResultSet(FakeDriver.EMPTY,\n \"FakeDatabaseMetaData.getPrimaryKeys(null, null, TABLE_\" + id + \")\");\n Object[][] tableDef =\n {\n {},\n {null, null, null, \"COL_A\", new Integer(Types.NUMERIC)},\n {null, null, null, \"COL_B\", new Integer(Types.VARCHAR)},\n {null, null, null, \"COL_C\", new Integer(Types.DATE)},\n {null, null, null, \"COL_D\", new Integer(Types.BIT)},\n {null, null, null, \"COL_E\", new Integer(Types.DISTINCT)}\n };\n FakeDriver.getDriver().pushResultSet(tableDef,\n \"FakeDatabaseMetaData.getColumns(null, null, TABLE_\" + id + \", null)\");\n FakeDriver.getDriver().pushResultSet(FakeDriver.EMPTY,\n \"select * from PM_TABLE where DB_TABLE_NAME='TABLE_\" + id + \"'\");\n return testEnv.getTableHome().getTable(\"TABLE_\" + id);\n }", "T queryForId(ID id) throws SQLException, DaoException;", "@Override\n public T findById(Long id) {\n return manager.find(elementClass, id);\n }", "@Override\r\n\tpublic void find(Integer id) {\n\r\n\t}", "Table2 selectByPrimaryKey(Integer id);", "T findById(ID id) ;", "public T find(int id) {\n\t \treturn getEntityManager().find(getEntityClass(), id);\n\t }", "public HexModel searchByID(String id) {\n\t\tfor (int y = 0; y < grid[0].length; y++) {\r\n\t\t\tfor (int x = 0; x < grid[y].length; x++) {\r\n\t\t\t\tif (grid[y][x] != null && grid[y][x].getId().equals(id))\r\n\t\t\t\t\treturn grid[y][x];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Borne find(long id) {\r\n\t\tBorne borne = new Borne();\r\n\t\t\r\n\t\r\n\t\tStatement st =null;\r\n\t\tResultSet rs =null;\r\n\t\t\r\n\t\t\r\n\t\ttry {\r\n\t\t\tst = this.connect.createStatement();\r\n\t\t\tString sql = \"SELECT * FROM Borne WHERE id=\"+id;\r\n\t\t\trs = st.executeQuery(sql);\r\n\t\t\t\r\n\t\t\tif(rs.first()) {\r\n\t\t\t\tborne = new Borne(rs.getInt(\"id\"),\r\n\t\t\t\t\t\t\t\t DAOzone.find(rs.getInt(\"idZone\")));\r\n\t\t\t}\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn borne;\r\n\t}", "@Override\r\n\tpublic T findById(Long id) {\n\t\tif(id==null)\r\n\t\t\treturn null;\r\n\t\treturn (T) getSession().get(clazz, id);\r\n\t}", "@Override\n public CodeTableDTO findCodeById(Class<?> clazz, Long codeId) throws BusinessException {\n\n if (clazz == null) {\n throw new BusinessException(\n getMessage(\"error.0003.invalid.code.table\",\n new String[]{\"\"}));\n }\n\n CodeTableEntityAnnotation codeTableAnnotation =\n AnnotationUtils.findAnnotation(clazz, CodeTableEntityAnnotation.class);\n\n if (codeTableAnnotation == null) {\n throw new BusinessException(\n getMessage(\"error.0003.invalid.code.table\",\n new String[]{clazz.getName()}));\n }\n\n try {\n\n Object obj = codeTableRepository.findById(clazz, codeId);\n\n return this.convertEntityToCodeTableDTO(obj, codeTableAnnotation);\n }\n catch (Exception e) {\n _logger.error(e.getMessage(), e);\n throw new BusinessException(e.getMessage());\n }\n }", "public SymbolTableEntry getEntry(String id){\n return table.get(id);\n }", "public void findbyid() throws Exception {\n try {\n Con_contadorDAO con_contadorDAO = getCon_contadorDAO();\n List<Con_contadorT> listTemp = con_contadorDAO.getByPK( con_contadorT);\n\n con_contadorT= listTemp.size()>0?listTemp.get(0):new Con_contadorT();\n \n } catch (Exception e) {\n e.printStackTrace();\n setMsg(\"Falha ao realizar consulta!\");\t\n } finally {\n\tclose();\n }\n }", "@Override\n @SuppressWarnings(\"unchecked\")\n public T findById(ID id) {\n return (T) this.getSession().load(this.getPersistentClass(), id);\n }", "public static ResultSet searchByID(int id) {\r\n\t\ttry{\r\n\t\t\tconnection = DriverManager.getConnection(connectionString);\r\n\t\t\tstmt = connection.prepareStatement(\"SELECT * FROM Patient WHERE ID =?;\");\r\n\t\t\tstmt.setString(1, String.valueOf(id));\r\n\t\t\tdata = stmt.executeQuery();\r\n\t\t}\r\n\t\tcatch (SQLException ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn data;\r\n\t}", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public List<Category> getCategoryFindById(Byte id) {\n return em.createNamedQuery(\"Category.findById\", Category.class)\n .setParameter(\"id\", id)\n .getResultList();\n }", "@Override\n\tpublic Langues find(int id) {\n\t\tLangues langue = new Langues();\n\t\tString query = \"SELECT * FROM langues WHERE ID = ? \";\n\t\ttry {\n\t\t\tjava.sql.PreparedStatement statement = this.connect.prepareStatement(query);\n\t\t\tstatement.setInt(1, id);\n\t\t\tResultSet result = statement.executeQuery();\n\n\t\t\tif (result.first()) {\n\t\t\t\t\n\t\t\t\tlangue = new Langues(id, result.getString(\"Langue\"),result.getString(\"Iso6391\"));\n\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn langue;\n\t}", "@Override\r\n\tpublic Vtype findById(int id) {\n\t\tVtype v=null;\r\n\t\tHibernateUtil.getCurrentSession().beginTransaction();\r\n\t\ttry{\r\n\t\t\tv=this.vdao.findById(id);\r\n\t\t\tHibernateUtil.getCurrentSession().getTransaction().commit();\r\n\t\t}catch(Exception e){\r\n\t\t\ttry{\r\n\t\t\t\tHibernateUtil.getCurrentSession().getTransaction().rollback();\r\n\t\t\t}catch(Exception e1){\r\n\t\t\t\tthrow e1;\r\n\t\t\t}\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\treturn v;\r\n\t}", "public Data findById(Object id);", "TDwBzzxBzflb selectByPrimaryKey(String objId);", "public ResultSet getAllByIdFromTable(String table, int id) throws SQLException {\n\t\tquery = \"SELECT * FROM '\" + table +\"' WHERE id=\" + id;\n\t\treturn stmt.executeQuery(query);\n\t}", "RecordLike selectByPrimaryKey(String id);", "AdminTab selectByPrimaryKey(String id);", "TempletLink selectByPrimaryKey(String id);", "public static PacketType lookup(int id){\n\t\tfor(PacketType type : packetLookup)\n\t\t\tif(type.getId() == id) return type;\n\t\tthrow new IllegalArgumentException(\"Couldn't find packet with ID='\"+id+\"'.\");\n\t}", "TableId table();", "public T findById(final String id)\n\t{\n\t\treturn em.find(entityClass, id);\n\t}", "Table8 create(Table8 table8);", "Caiwu selectByPrimaryKey(Integer id);", "public abstract T findByID(ID id) ;", "@Override\r\n\tpublic FyTestRecord findById(Long id) {\n\t\treturn testRecordDao.findOne(id);\r\n\t}", "@Override\n\tpublic T findById(Class<T> entidade, Long id) throws Exception {\n\t\treturn null;\n\t}", "public static DataCaseWorker find(int id) {\n return where(\"id\", \"\" + id);\n }", "@Override\n public Model findByID(PK id) throws ServiceException {\n \t\n \tModel model = getModel();\n \t\n \tMethod method = null;\n\t\ttry {\n\t\t\tmethod = model.getClass().getMethod(\"setId\", new Class[]{ Integer.class });\n\t\t\tmethod.setAccessible(true);\n\t\t\tmethod.invoke(model, new Object[]{ id });\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \t\n \tModel result = null;\n \t\n \ttry {\n \t\tMap<String, Object> map = getDao().findByID(model);\n \tresult = buildModel(map);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tlogger.error(e.getMessage());\n\t\t\tthrow new ServiceException(ResultCode.DB_ERROR);\n\t\t}\n \t\n return result;\n }", "SysCode selectByPrimaryKey(String id);", "@Override\n\t\t\tpublic TestEntity findById(BigInteger testId)\n\t\t\t{\n\t\t\t\t Optional<TestEntity>optional=testDao.findById(testId);\n\t\t\t if(optional.isPresent())\n\t\t\t {\n\t\t\t TestEntity test=optional.get();\n\t\t\t return test;\n\t\t\t }\n\t\t\t throw new TestNotFoundException(\"Test not found for id=\"+testId);\n\t\t\t }", "Tourst selectByPrimaryKey(String id);", "@Override\n\tpublic TBasUnitClass findOne(String id) {\n\t\treturn tBasUnitClassRepository.findOne(id);\n\t}", "public abstract T byId(ID id);", "TableImpl(int id) {\n this.id = id;\n }", "@Override\n\tpublic Note findById(Serializable id) {\n\t\tString sql = \"select * from cn_note where cn_note_id=?\";\n\t\ttry {\n\t\t\tPreparedStatement pst = conn.prepareStatement(sql);\n\t\t\tpst.setString(1, (String)id);\n\t\t\tResultSet rs = pst.executeQuery();\n\t\t\tif(rs.next()){\n\t\t\t\tNote n = new Note();\n\t\t\t\tString cn_note_id = rs.getString(\"cn_note_id\");\n\t\t\t\tString cn_notebook_id = rs.getString(\"cn_notebook_id\");\n\t\t\t\tString cn_user_id = rs.getString(\"cn_user_id\");\n\t\t\t\tString cn_note_status_id = rs.getString(\"cn_note_status_id\");\n\t\t\t\tString cn_note_type_id = rs.getString(\"cn_note_type_id\");\n\t\t\t\tString cn_note_title = rs.getString(\"cn_note_title\");\n\t\t\t\tString cn_note_body = rs.getString(\"cn_note_body\");\n\t\t\t\tlong cn_note_create_time = rs.getLong(\"cn_note_create_time\");\n\t\t\t\tlong cn_note_last_modify_time = rs.getLong(\"cn_note_last_modify_time\");\n\t\t\t\tn.setCn_note_body(cn_note_body);\n\t\t\t\tn.setCn_note_create_time(cn_note_create_time);\n\t\t\t\tn.setCn_note_id(cn_note_id);\n\t\t\t\tn.setCn_note_last_modify_time(cn_note_last_modify_time);\n\t\t\t\tn.setCn_note_status_id(cn_note_status_id);\n\t\t\t\tn.setCn_note_title(cn_note_title);\n\t\t\t\tn.setCn_note_type_id(cn_note_type_id);\n\t\t\t\tn.setCn_notebook_id(cn_notebook_id);\n\t\t\t\tn.setCn_user_id(cn_user_id);\n\t\t\t\treturn n;\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 null;\n\t}", "T findById(Integer id);", "@Override\n\tpublic Turkey findById(Integer i) {\n\t\treturn null;\n\t}", "public static Sighting find(int id) {\n\t\t try(Connection con = DB.sql2o.open()) {\n\t\t\t String sql = \"SELECT * FROM sightings where id=:id\";\n\t\t\t Sighting sighting = con.createQuery(sql)\n\t\t\t\t .addParameter(\"id\", id)\n\t\t\t\t .executeAndFetchFirst(Sighting.class);\n\t\t\t return sighting;\n\n\t\t }\n\t }", "public TipologiaStruttura[] findWhereIdEquals(long id) throws TipologiaStrutturaDaoException;", "HuoDong selectByPrimaryKey(Integer id);", "public Voto find(int id ) { \n\t\treturn em.find(Voto.class, id);\n\t}", "@Override\n\tpublic PI findById(Long id) throws NotFoundException {\n\t\treturn null;\n\t}", "TABLE41 selectByPrimaryKey(Long id);", "public Node find(int id) {\n return tree.find(id);\n }", "@Override\n public User findById(Integer id) {\n try {\n return runner.query(con.getThreadConnection(),\"select *from user where id=?\",new BeanHandler<User>(User.class),id);\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n throw new RuntimeException(e);\n }\n }", "TCpySpouse selectByPrimaryKey(Integer id);", "private static void search_by_id() {\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\t\tSystem.out.println(\"Project id: \");\r\n\t\t\tString project_id_str = input.nextLine();\r\n\t\t\r\n\t\t\tString strSelectProject = String.format(\"SELECT * FROM projects INNER JOIN project_statuses ON \"\r\n\t\t\t\t\t+ \"projects.project_id = project_statuses.project_id;\");\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t\r\n\t\t\tfetch_all_project_info(stmt, project_id_str, project_rset);\r\n\t\t/**\r\n\t\t * @exception If entered project id cannot be found in the projects table then an SQLException is thrown\r\n\t\t */\t\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n public TruckDALDTO loadByInt(int id) {\n return null;\n }", "@Override\r\n\tpublic Customer findByKey(int id) throws SQLException {\r\n\t\tString selectSql = \"SELECT * FROM \" + tableName + \" WHERE (id = ?)\";\r\n\t\tCustomer customer = null;\r\n\t\ttry {\r\n\t\t\t//connection = ds.getConnection();\r\n\t\t\tpreparedStatement = connection.prepareStatement(selectSql);\r\n\t\t\tpreparedStatement.setInt(1, id);\r\n\t\t\tResultSet rs = preparedStatement.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomer = new Customer();\r\n\t\t\t\tcustomer.setId(rs.getInt(\"id\"));\r\n\t\t\t\tcustomer.setName(rs.getString(\"name\"));\r\n\t\t\t\tcustomer.setSurname(rs.getString(\"surname\"));\r\n\t\t\t\tcustomer.setBirthdate(rs.getDate(\"birth_date\"));\r\n\t\t\t\tcustomer.setBirthplace(rs.getString(\"birth_place\"));\r\n\t\t\t\tcustomer.setAddress(rs.getString(\"address\"));\r\n\t\t\t\tcustomer.setCity(rs.getString(\"city\"));\r\n\t\t\t\tcustomer.setProvince(rs.getString(\"province\"));\r\n\t\t\t\tcustomer.setCap(rs.getInt(\"cap\"));\r\n\t\t\t\tcustomer.setPhoneNumber(rs.getString(\"phone_number\"));\r\n\t\t\t\tcustomer.setNewsletter(rs.getInt(\"newsletter\"));\r\n\t\t\t\tcustomer.setEmail(rs.getString(\"email\"));\r\n\t\t\t}\r\n\t\t\tconnection.commit();\r\n\t\t} catch (SQLException e) {\r\n\t\t}\r\n\t\treturn customer;\r\n\t}", "public Node<T> search(int id) {\n Node<T> res = root;\n res = search(res, id);\n if (res.getId() == id) return res;\n else return null;\n }", "public Driver findDriverById(long id);", "SvcStoreBeacon selectByPrimaryKey(Long id);", "public void findbyid() throws Exception {\n try {\n Ume_unidade_medidaDAO ume_unidade_medidaDAO = getUme_unidade_medidaDAO();\n List<Ume_unidade_medidaT> listTemp = ume_unidade_medidaDAO.getByPK( ume_unidade_medidaT);\t \n\n ume_unidade_medidaT= listTemp.size()>0?listTemp.get(0):new Ume_unidade_medidaT();\n \n } catch (Exception e) {\n e.printStackTrace();\n setMsg(\"Falha ao realizar consulta!\");\t\n } finally {\n\tclose();\n }\n }", "public TWorkTrustDetail selectByPrimaryKey(String id) {\n\t\tTWorkTrustDetail key = new TWorkTrustDetail();\n\t\tkey.setId(id);\n\t\tTWorkTrustDetail record = (TWorkTrustDetail) getSqlMapClientTemplate()\n\t\t\t\t.queryForObject(\n\t\t\t\t\t\t\"t_work_trust_detail.ibatorgenerated_selectByPrimaryKey\",\n\t\t\t\t\t\tkey);\n\t\treturn record;\n\t}", "public void fromDatabase(int id)\r\n\t{\t\t\r\n\t\tRationaleDB db = RationaleDB.getHandle();\r\n\t\tConnection conn = db.getConnection();\r\n\t\t\r\n\t\tStatement stmt = null; \r\n\t\tResultSet rs = null; \r\n\t\t\r\n\t\ttry {\r\n\t\t\tString findQuery; \r\n\t\t\t\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\tfindQuery = \"SELECT name FROM \" +\r\n\t\t\t\"tradeoffs where id = \" + id;\r\n\t\t\t\r\n\t\t\trs = stmt.executeQuery(findQuery);\r\n\t\t\t\r\n\t\t\tif (rs.next())\r\n\t\t\t{\r\n\t\t\t\tString name = RationaleDBUtil.decode(rs.getString(\"name\"));\r\n\t\t\t\trs.close();\r\n\t\t\t\t\r\n\t\t\t\tfromDatabase(name);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (SQLException ex) {\r\n\t\t\tRationaleDB.reportError(ex, \"Tradeoff.fromDatabase(int)\", \"SQL error\");\r\n\t\t}\r\n\t\tfinally { \r\n\t\t\tRationaleDB.releaseResources(stmt, rs);\r\n\t\t}\r\n\t}", "Yqbd selectByPrimaryKey(Integer id);", "public HRouter selectByPrimaryKey(Integer id) {\r\n HRouter key = new HRouter();\r\n key.setId(id);\r\n HRouter record = (HRouter) getSqlMapClientTemplate().queryForObject(\"H_ROUTER.ibatorgenerated_selectByPrimaryKey\", key);\r\n return record;\r\n }", "TbFreightTemplate selectByPrimaryKey(Long id);", "Abum selectByPrimaryKey(String id);", "private Node searchNode(int id) {\n\t\tNode node = searchRec(root,id);\n\t\treturn node;\n\t}", "@Override\n\tpublic T findById(ID id) {\n\t\treturn parserEntity(this.getConcreteDAO().findById(id));\n\t}", "PrhFree selectByPrimaryKey(Integer id);", "@Override\r\n\tpublic Account findById(int id) {\n\t\treturn daoref.findById(id);\r\n\t}", "public Playlist findById(String id) {\n\n if (id == null || id.equalsIgnoreCase(\"\")) {\n return null;\n }\n\n String sql = \"SELECT * FROM Playlists WHERE ID=?\";\n Playlist playlist = null;\n Connection connection = DatabaseConnection.getDatabaseConnection();\n\n try {\n ///Use PreparedStatement to insert \"id\" for \"?\" in sql string.\n PreparedStatement pStatement = connection.prepareStatement(sql);\n pStatement.setString(1, id);\n\n ResultSet resultSet = pStatement.executeQuery();\n if (resultSet.next()) {\n playlist = processRow(resultSet);\n }\n } catch (SQLException ex) {\n System.out.println(\"PlaylistDAO - findById Exception: \" + ex);\n }\n DatabaseConnection.closeConnection(connection);\n return playlist;\n }", "FileRecordAdmin selectByPrimaryKey(String id);", "@Override\n\tpublic Tmenu findByKey(String id) throws Exception {\n\t\treturn menuMapper.findForObject(id);\n\t}", "public abstract T findOne(int id);", "EtpBase selectByPrimaryKey(String id);", "@GetMapping(\"/{id}\")\n @ApiOperation(value = \"Search a StudyClass by id\")\n public StudyClassDTO findById(\n @ApiParam(value = \"The StudyClass id\") @PathVariable Long id) throws ResourceNotFoundException {\n Optional<StudyClassDTO> studyClassDto = studyClassService.findById(id);\n if (!studyClassDto.isPresent()) {\n throw new ResourceNotFoundException(String.format(\"StudyClass %s don't exists\", id));\n }\n\n return studyClassDto.get();\n }", "@Override\n\tpublic Web_trainee findTraineeById(int id) {\n\t\treturn getByKey(id);\n\t}", "HomeWork selectByPrimaryKey(Long id);", "public TEntity getById(int id){\n String whereClause = String.format(\"Id = %1$s\", id);\n Cursor cursor = db.query(tableName, columns, whereClause, null, null, null, null);\n\n if (cursor.getCount() == 1) {\n cursor.moveToFirst();\n return fromCursor(cursor);\n }\n return null;\n }", "public static Team find(String id) throws SQLException\n {\n String query = \"SELECT * FROM team WHERE teamID = ?\";\n PreparedStatement stmt = db.getPreparedStatement(query);\n stmt.setString(1, id);\n Team team = null;\n ResultSet r = db.executeQuery(stmt);\n if (r.next())\n {\n team = new Team(r.getString(\"teamID\"), r.getString(\"motto\"), r.getInt(\"totalKittiesKlicked\"));\n }\n\n return team;\n }", "@Test\n public void retriveByIdTest() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(1);\n assertNotNull(servizio,\"Should return true if return Servizio 1\");\n }", "public abstract byte getTableId();", "public ArrayList<Table> find(DataEntry entry) {\n\t\tArrayList<Table> foundTables = new ArrayList<>();\n\t\tfor (Table table : tables.values()) {\n\t\t\tif (table.contains(entry)) {\n\t\t\t\tfoundTables.add(table);\n\t\t\t}\n\t\t}\n\t\treturn foundTables;\n\t}", "public Trasllat getById(Long id) throws InfrastructureException {\r\n\t\tTrasllat trasllat;\r\n\t\ttry {\r\n\t\t\tlogger.debug(\"getById ini\");\r\n\t\t\ttrasllat = (Trasllat)getHibernateTemplate().load(Trasllat.class, id);\t\t\t\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tlogger.error(\"getById failed\", ex);\r\n\t\t\tthrow new InfrastructureException(ex);\r\n\t\t}\r\n\t\tlogger.debug(\"getById fin\");\r\n\t\treturn trasllat;\r\n\t}", "@Override\r\n\tpublic Object findById(long id) {\n\t\treturn null;\r\n\t}", "public void findbyid() throws Exception {\n try {\n IPi_per_intDAO pi_per_intDAO = getPi_per_intDAO();\n List<Pi_per_intT> listTemp = pi_per_intDAO.getByPK(pi_per_intT);\n\n pi_per_intT = listTemp.size() > 0 ? listTemp.get(0) : new Pi_per_intT();\n\n } catch (Exception e) {\n easyLogger.error(e.getMessage(), e);\n setMsg(ERROR, \"Falha ao realizar consulta!\");\n } finally {\n close();\n }\n }", "public static final <T extends Model> T find(Class<T> cls, Long id) {\n\t\treturn Select.from(cls).where(_ID + \"=?\", id).fetchSingle();\n\t}", "@Override\r\n\tpublic Element findById(int id) {\n\t\t\r\n\t\treturn em.find(Element.class, id);\r\n\t}", "@Override\n\tpublic TeamInfo findById(String id) {\n\t\treturn repository.findOne(id);\n\t}", "public MotorCycle findId(String id){\r\n\t\treturn motorCycleDao.findId(id);\r\n\t}", "public <T> T find(Class<T> entityClass, String id);", "SysId selectByPrimaryKey(String id);", "IceApp selectByPrimaryKey(Long id);", "ProSchoolWare selectByPrimaryKey(String id);", "NjOrderWork2 selectByPrimaryKey(String id);", "@SuppressWarnings(\"unchecked\")\r\n\tpublic T findOne(final int id) {\r\n\t\tEntityManager manager = factory.createEntityManager();\r\n\t\tEntityTransaction transaction = manager.getTransaction();\r\n\t Object obj = null;\r\n\t \r\n\t try {\r\n\t \t transaction.begin();\r\n\t obj = (T) manager.find(genericClass, id);\r\n\t transaction.commit();\r\n\t } catch (HibernateException e) {\r\n\t \t if(transaction != null)\r\n\t \t\t transaction.rollback();\r\n\t e.printStackTrace(); \r\n\t } finally {\r\n\t manager.close(); \r\n\t }\r\n\t\treturn (T) obj;\r\n\t}" ]
[ "0.61294144", "0.60605705", "0.6005523", "0.5966283", "0.5905796", "0.58877265", "0.5845535", "0.58236706", "0.57858914", "0.57741463", "0.5763779", "0.57619715", "0.57332104", "0.5701489", "0.5681761", "0.56358284", "0.5618078", "0.56174463", "0.5604429", "0.55789036", "0.55756164", "0.5558924", "0.5558661", "0.55539733", "0.5541492", "0.55406916", "0.5519995", "0.5516884", "0.55112404", "0.5509221", "0.55048615", "0.55032474", "0.5490136", "0.5481912", "0.54783833", "0.54778105", "0.5475232", "0.5456272", "0.54552853", "0.5446056", "0.5440247", "0.5438006", "0.5436809", "0.54246676", "0.54244137", "0.54147834", "0.54086", "0.54068846", "0.53947794", "0.5371787", "0.53682435", "0.5365898", "0.53602743", "0.53601176", "0.53564113", "0.5345268", "0.5344218", "0.5344214", "0.5337078", "0.5326637", "0.53265226", "0.532321", "0.5317544", "0.53152215", "0.5314508", "0.5309148", "0.53071195", "0.53005755", "0.5300173", "0.52917707", "0.52904207", "0.5285359", "0.52839196", "0.52737266", "0.5272559", "0.5272003", "0.5270575", "0.5270484", "0.52661467", "0.5264137", "0.52576804", "0.52484894", "0.5246062", "0.5240222", "0.52297944", "0.5225541", "0.5223586", "0.5222643", "0.5222357", "0.52221817", "0.52214503", "0.52167946", "0.5216299", "0.52152145", "0.521447", "0.5214419", "0.5209619", "0.5208905", "0.5205185", "0.52037215" ]
0.74842954
0
Updates the information of a Table8.
Table8 update(Table8 table8) throws EntityNotFoundException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "private void Update_table() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public static void updateTable()\r\n\t{\r\n\t\tfor (int i = 0; i < DataHandler.getClassesSize(); i++)\r\n\t\t{\r\n\t\t\ttable.getModel().setValueAt(\r\n\t\t\t\t\tString.valueOf(LogicHandler.getRelativeOccurences(DataHandler.getList(), DataHandler.getSampleSize())[i]),\r\n\t\t\t\t\ti, 3);\r\n\t\t}\r\n\t}", "public void updateTable()\r\n {\r\n ((JarModel) table.getModel()).fireTableDataChanged();\r\n }", "Table8 create(Table8 table8);", "public void updateDataCell();", "private void btnUpdateActionPerformed(java.awt.event.ActionEvent evt) {\n Tables tables = new Tables();\n try{\n int id = Integer.parseInt(lblID.getText().trim());\n String tableNumber = txtUpdateTable.getText().trim();\n \n int asAvailable = 1 ;\n \n tables.setTableId(id);\n tables.setTableNumber(tableNumber);\n tables.setAsAvailable(asAvailable);\n \n tableService.updateTableNumber(tables);\n }catch(Exception e){\n JOptionPane.showMessageDialog(null, \"Please Fill TextField\");\n }\n \n vectorTablesNumber = commonService.getVectorTables();\n\n TablesTableModel tableTableModel = new TablesTableModel(vectorTablesNumber);\n tblTablesNumber.setModel(tableTableModel);\n \n \n txtUpdateTable.setText(\"\");\n \n }", "public void updateTable() {\n tabelModel.setRowCount(0);\n Link current = result.first;\n for (int i = 0; current != null; i++) {\n Object[] row = {current.getMasjid(), current.getAlamat()};\n tabelModel.addRow(row);\n current = current.next;\n }\n }", "private void refreshTable() {\n data = getTableData();\n updateTable();\n }", "public boolean updateTableFromTap(String fullTableName, TableConfig config);", "public void updatedTable() {\r\n\t\tfireTableDataChanged();\r\n\t}", "public void update() {\n tableChanged(new TableModelEvent(this));\n }", "public void updateDisplayBoardTable(){\n try{\n // Connect to db\n Class.forName(\"com.mysql.jdbc.Driver\");\n Connection con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/nfqdb\", \"root\", \"\");\n \n Statement st = con.createStatement();\n // MySQL Query\n String sql = \"select * from visit\";\n ResultSet rs = st.executeQuery(sql);\n \n // Delete old data from the table\n DefaultTableModel dm = (DefaultTableModel) DisplayBoard.screenTable.getModel();\n int rowCount = dm.getRowCount();\n //Remove rows one by one from the end of the table\n for (int i = rowCount - 1; i >= 0; i--) {\n dm.removeRow(i);\n }\n \n // Add new data in table\n while(rs.next()){\n // data will be added until finish\n String id = \"000\" + String.valueOf(rs.getInt(\"id_visit\")); //conversion due to int value\n String specid = String.valueOf(rs.getInt(\"spec_id\")); //conversion due to int value\n String date = String.valueOf(rs.getTimestamp(\"datetime\"));\n String spcnam = rs.getString(\"spec_name\");\n String cusnam = rs.getString(\"customer_name\");\n String status = rs.getString(\"status\");\n \n // String array for store data into jtable\n \n String tbData[] = {id, specid, date, spcnam, cusnam, status};\n DefaultTableModel tblModel = (DefaultTableModel)DisplayBoard.screenTable.getModel();\n tblModel.addRow(tbData);\n }\n con.close();\n }\n catch(Exception e){\n JOptionPane.showMessageDialog(null, e);\n }\n }", "public void updateTapTable(TableConfig newTable, boolean createOnly) throws ConfigurationException;", "private void updateTable(){\n try{\n String query = \" select id,name as Name,address as Address,description as Description, capacity as Capacity from public_spaces where category = 'accomodation' \";\n PreparedStatement pst = connect.prepareStatement(query);\n ResultSet rs = pst.executeQuery();\n users_table.setModel(DbUtils.resultSetToTableModel(rs));\n }\n catch(Exception e){\n System.out.println(e);\n }\n }", "public void updateTable() {\n ((AbstractTableModel) table.getModel()).fireTableDataChanged();\n }", "private void updateTable()\n\t{\n\t\ttable = new StringBuilder(String.format(\"%-7s %-30s %-30s %-5s\\n\", \"Song#\", \"Title\", \"Artist\", \"Time\"));\n\t\tdouble time = 0.0;\n\t\tfor(int i = 0; i < numOfSongs; i++)\n\t\t{\n\t\t\ttime = (double)song[i].getMinLength() + (song[i].getSecLength()/100.0); \n\t\t\ttable.append(String.format(\"%-7d %-30s %-30s %-5s\", (i+1), song[i].getTitle(), song[i].getArtist(), time));\n\t\t\tif(i < (numOfSongs-1))\n\t\t\t\ttable.append(\"\\n\");\n\t\t}\n\t}", "private void updateTable() {\n updateTableData();\n TableModelEvent e = new TableModelEvent(articleTableModel);\n\n articleTable.tableChanged(e);\n }", "public void refreshTable() {\n\t\tmyTable.refreshTable();\n\t}", "private void updateRegisterTableTomasulo() {\n\t\tint temp_it_index = 0; // tempory index tracker\n\n\t\t// Get the Integer Registers\n\t\tMap<String, String> temp_int_reg = registersTomasulo.getIntegerRegisters();\n\t\t// Get the FP Registers\n\t\tMap<String, String> temp_fp_reg = registersTomasulo.getFPRegisters();\n\n\t\t// add rows if needed\n\t\twhile ((temp_int_reg.size() > RegisterModelTomasulo.getRowCount())\n\t\t\t\t|| (temp_fp_reg.size() > RegisterModelTomasulo.getRowCount())) {\n\t\t\tRegisterModelTomasulo.addRow(new Object[] { \" \", \" \", \" \", \" \" });\n\t\t}\n\n\t\t// Update Integer Table Values\n\t\tfor (Map.Entry<String, String> int_entry : temp_int_reg.entrySet()) {\n\t\t\tRegisterModelTomasulo.setValueAt(int_entry.getKey(), temp_it_index, 2);\n\t\t\tRegisterModelTomasulo.setValueAt(int_entry.getValue(), temp_it_index, 3);\n\n\t\t\ttemp_it_index++;\n\t\t}\n\n\t\ttemp_it_index = 0;\n\t\t// Update Integer Table Values\n\t\tfor (Map.Entry<String, String> fp_entry : temp_fp_reg.entrySet()) {\n\t\t\tRegisterModelTomasulo.setValueAt(fp_entry.getKey(), temp_it_index, 0);\n\t\t\tRegisterModelTomasulo.setValueAt(fp_entry.getValue(), temp_it_index, 1);\n\n\t\t\ttemp_it_index++;\n\t\t}\n\t}", "@Override\r\n\tpublic void updateDetailsTable(Kit kitToUpdate) {\n\t\tTableItem tblItems[]= tblCinCoutDetails.getItems();\r\n\t\tfor(TableItem tblItem:tblItems){\r\n\t\t\tif(tblItem.getText(0).equalsIgnoreCase(kitToUpdate.getKitSerialNum())){\r\n\t\t\t\t//tblItem.setText(0, kitToUpdate.getKitSerialNum());\r\n\t\t\t\ttblItem.setText(1, kitToUpdate.getKitCheckInDate().toString());\r\n\t\t\t\t//tblItem.setText(2, kitToUpdate.getKitCheckOutDate().toString());\r\n\t\t\t\t//tblItem.setText(3, kitToUpdate.getKitCourse().getCourseName());\r\n\t\t\t\t//tblItem.setText(4, kitToUpdate.getKitPenalty()+\"\");\r\n\t\t\t\t//tblItem.setText(5, kitToUpdate.getKitType());\r\n\t\t\t\t//tblItem.setText(6, kitToUpdate.getStudentEmailKit());\r\n\t\t\t\t//tblItem.setText(7, kitToUpdate.getStudentNameForKit());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"unchecked\")\n public void table_update(){\n int c;\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n con=DriverManager.getConnection(\"jdbc:mysql://localhost/footballdb\",\"root\",\"\");\n pst=con.prepareStatement(\"Select * from manager\");\n ResultSet Rs=pst.executeQuery();\n ResultSetMetaData rd=Rs.getMetaData();\n c=rd.getColumnCount();\n DefaultTableModel df=(DefaultTableModel)jTable1.getModel();\n df.setRowCount(0);\n while(Rs.next()){\n Vector v2=new Vector();\n for(int i=1;i<=c;i++){\n \n v2.add(Rs.getString(\"managerid\"));\n v2.add(Rs.getString(\"mname\"));\n v2.add(Rs.getString(\"teamid\"));\n \n }\n df.addRow(v2);\n \n }\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(manager.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(manager.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public static void Ln8() {\r\n EBAS.L8_Timestamp.setText(GtDates.ldate);\r\n \r\n EBAS.L8_First_Sku.setEnabled(false);\r\n EBAS.L8_Qty_Out.setEnabled(false);\r\n EBAS.L8_First_Desc.setEnabled(false);\r\n EBAS.L8_Orig_Sku.setEnabled(false);\r\n EBAS.L8_Orig_Desc.setEnabled(false);\r\n EBAS.L8_Orig_Attr.setEnabled(false);\r\n EBAS.L8_Orig_Size.setEnabled(false);\r\n EBAS.L8_Orig_Retail.setEnabled(false);\r\n EBAS.L8_Manuf_Inspec.setEnabled(false);\r\n EBAS.L8_New_Used.setEnabled(false);\r\n EBAS.L8_Reason_DropDown.setEnabled(false);\r\n EBAS.L8_Desc_Damage.setEnabled(false);\r\n EBAS.L8_Cust_Satisf_ChkBox.setEnabled(false);\r\n EBAS.L8_Warranty_ChkBox.setEnabled(false);\r\n \r\n try {\r\n upDB();\r\n } catch (ClassNotFoundException | SQLException ex) {\r\n Logger.getLogger(EBAS.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public void update_teacherIssuedDetailTable(){ \r\n teacher_columnID.setCellValueFactory(new PropertyValueFactory<>(\"teacherID\"));\r\n teacher_columnName.setCellValueFactory(new PropertyValueFactory<>(\"teacherName\"));\r\n teacher_columnDepart.setCellValueFactory(new PropertyValueFactory<>(\"teacherDepart\"));\r\n teacher_columnQuantity.setCellValueFactory(new PropertyValueFactory<>(\"bookQuantity\"));\r\n teacher_columnBookTitle.setCellValueFactory(new PropertyValueFactory<>(\"bookTitle\"));\r\n teacher_columnBookClass.setCellValueFactory(new PropertyValueFactory<>(\"bookClass\"));\r\n teacher_columnDateIssued.setCellValueFactory(new PropertyValueFactory<>(\"dateIssued\"));\r\n try { \r\n String sql = \"SELECT * FROM teacherissued\";\r\n pstmt = con.prepareStatement(sql);\r\n rs = pstmt.executeQuery();\r\n while(rs.next()){\r\n teacherBooksData.add( new TeacherBookIssue(\r\n rs.getString(\"teacher_ID\"),\r\n rs.getString(\"teacher_name\"),\r\n rs.getString(\"teacher_depart\"),\r\n rs.getString(\"quantity_issued\"), \r\n rs.getString(\"book_title\"),\r\n rs.getString(\"book_class\"),\r\n rs.getString(\"date_issued\") \r\n )); \r\n }\r\n //load items to the table\r\n teachserIssuedTable.setItems(teacherBooksData);\r\n pstmt.close();\r\n rs.close();\r\n } catch (SQLException e) {\r\n } finally {\r\n try {\r\n rs.close();\r\n pstmt.close();\r\n } catch (Exception e) {\r\n } \r\n }\r\n }", "Table8 getById(Integer table8Id) throws EntityNotFoundException;", "public void updateTable()\n {\n tableModelPain = new DefaultTableModel(new String [] {\"Date\", \"Pain Average\", \"Accepted by\"},0);\n tableModelVisit = new DefaultTableModel(new String [] {\"Date\", \"Hospital Name\", \"Doctor\"},0);\n ArrayList<PainEntry> painList = patient.getPainHistory();\n ArrayList<Visit> visitList = patient.getVisitHistory();\n painData = new String[3];\n visitData = new String[3];\n for (PainEntry p : painList) {\n painData[0] = new SimpleDateFormat(\"MM/dd/yyyy\").format(p.getDate());\n painData[1] = p.getAvePain()+\"\";\n if(!\"\".equals(p.getDocName())) painData[2] = p.getDocName();\n else painData[2] = \"not treated yet\";\n \n tableModelPain.addRow(painData);\n }\n for (Visit v : visitList) {\n visitData[0] = new SimpleDateFormat(\"MM/dd/yyyy\").format(v.getDate());\n visitData[1] = v.getHospital();\n visitData[2] = v.getDocName();\n tableModelVisit.addRow(visitData);\n }\n jTablePain.setModel(tableModelPain);\n jTableVisit.setModel(tableModelVisit);\n }", "void updateTableToken(TableToken tableToken);", "@Override\r\n public void updateTable() {\n FileManager fileManager = new FileManager();\r\n InputStream input = fileManager.readFileFromRAM(fileManager.XML_DIR, FILE_NAME);\r\n if(input != null){\r\n dropTable();\r\n createTable();\r\n parserXml(input); \r\n }else{\r\n Log.i(FILE_NAME,\"file is null\");\r\n }\r\n \r\n }", "public synchronized void updateGUITable() {\n\t\tmyIntegerTableModel.setRowCount(0);\n\t\tmyFloatTableModel.setRowCount(0);\n\t\tmyBooleanTableModel.setRowCount(0);\n\t\t//for(int i = 0; i < myIntegerTableModel.getRowCount(); i++) myIntegerTableModel.removeRow(0);\n\t\t//for(int i = 0; i < myFloatTableModel.getRowCount(); i++) myFloatTableModel.removeRow(0);\n\t\t//for(int i = 0; i < myBooleanTableModel.getRowCount(); i++) myBooleanTableModel.removeRow(0);\n\t\t\n\t\t// for all integer values, add their fields\n\t\tIterator it = configIntegerValues.entrySet().iterator();\n\t while (it.hasNext()) {\n\t Map.Entry<String, String> pairs = (Entry<String, String>) it.next();\t \n\t myIntegerTableModel.addRow(new String[] {pairs.getKey(), pairs.getValue()});\n\t }\n\t \n\t\tit = configFloatValues.entrySet().iterator();\n\t while (it.hasNext()) {\n\t Map.Entry<String, String> pairs = (Entry<String, String>) it.next();\t \n\t myFloatTableModel.addRow(new String[] {pairs.getKey(), pairs.getValue()});\n\t }\n\t \n\t\tit = configBooleanValues.entrySet().iterator();\n\t while (it.hasNext()) {\n\t Map.Entry<String, String> pairs = (Entry<String, String>) it.next();\t \n\t myBooleanTableModel.addRow(new String[] {pairs.getKey(), pairs.getValue()});\n\t }\n\t}", "void updateData();", "public void updateData() {}", "private void updateTable() throws ClassNotFoundException, SQLException {\n ResultSet set=new SetBillController().getSells();\n DefaultTableModel model=(DefaultTableModel)jTable1.getModel();\n jTable1.removeAll();\n while(set.next()){\n Object [] row={set.getString(1),set.getString(5),set.getString(2),\n set.getString(4),set.getString(3)};\n model.addRow(row);\n }\n }", "private void updateMemTableTomasulo() {\n\t\t// Get a copy of the memory stations\n\t\tMemStation[] temp_ms = MemReservationTomasulo;\n\n\t\t// Update the table with current values for the stations\n\t\tfor (int i = 0; i < temp_ms.length; i++) {\n\t\t\t// generate a meaningfull representation of busy\n\t\t\tString busy_desc = (temp_ms[i].isBusy() ? \"Yes\" : \"No\");\n\n\t\t\tMemoryModelTomasulo.setValueAt(temp_ms[i].getName(), i, 0);\n\t\t\tMemoryModelTomasulo.setValueAt(busy_desc, i, 1);\n\t\t\tMemoryModelTomasulo.setValueAt(temp_ms[i].getAddress(), i, 2);\n\t\t}\n\t}", "public QbUpdate inTable(String table);", "public abstract void update(PaginationParameters parameters,\r\n\t\t\tAsyncCallback updateTableCallback);", "public void updateTable() throws SQLException {\n //query for retrieving all records\n String query1=\"Select * from savingstable\";\n\n //fetching results\n PreparedStatement query=connObj.prepareStatement(query1, ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);\n\n ResultSet rs=query.executeQuery();\n\n DefaultTableModel df=(DefaultTableModel) recordTable.getModel();\n\n rs.last();\n\n int q=rs.getRow();\n\n rs.beforeFirst();\n\n String[][] array=new String[0][];\n if(q>0){\n array=new String[q][5];\n }\n\n int i=0;\n\n //getting the values from database\n while(rs.next()){\n array[i][0]=rs.getString(\"custno\");\n array[i][1]=rs.getString(\"custname\");\n array[i][2]=rs.getString(\"cdep\");\n array[i][3]=rs.getString(\"nyears\");\n array[i][4]=rs.getString(\"savtype\");\n ++i;\n\n }\n\n //updating the jtable\n String[] cols={\"Number\",\"Name\",\"Deposit\",\"Years\",\"Type of Savings\"};\n DefaultTableModel model = new DefaultTableModel(array,cols);\n recordTable.setModel(model);\n\n recordTable.setDefaultEditor(Object.class, null);\n\n\n }", "private void updateALUTableTomasulo() {\n\t\t// Get a copy of the memory stations\n\t\tALUStation[] temp_alu = alu_rsTomasulo;\n\n\t\t// Update the table with current values for the stations\n\t\tfor (int i = 0; i < temp_alu.length; i++) {\n\t\t\t// generate a meaningfull representation of busy\n\t\t\tString busy_desc = (temp_alu[i].isBusy() ? \"Yes\" : \"No\");\n\n\t\t\tReservationStationModelTomasulo\n\t\t\t\t\t.setValueAt(((temp_alu[i].isReady() && temp_alu[i].isBusy()) ? temp_alu[i].getCycle() : \"0\"), i, 0);\n\n\t\t\tReservationStationModelTomasulo.setValueAt(temp_alu[i].getName(), i, 1);\n\t\t\tReservationStationModelTomasulo.setValueAt(busy_desc, i, 2);\n\t\t\tReservationStationModelTomasulo.setValueAt(((temp_alu[i].isBusy()) ? temp_alu[i].getOperation() : \" \"), i,\n\t\t\t\t\t3);\n\t\t\tReservationStationModelTomasulo.setValueAt(temp_alu[i].getVj(), i, 4);\n\t\t\tReservationStationModelTomasulo.setValueAt(temp_alu[i].getVk(), i, 5);\n\t\t\tReservationStationModelTomasulo.setValueAt(temp_alu[i].getQj(), i, 6);\n\t\t\tReservationStationModelTomasulo.setValueAt(temp_alu[i].getQk(), i, 7);\n\t\t}\n\t}", "private void setjTableupdate() {\n\n try {\n\n int rows = 0;\n int rowIndex = 0;\n\n Statement s = con.createStatement();\n ResultSet rs = s.executeQuery(\"select * from supplier order by Suplpier_ID desc\");\n\n if (rs.next()) {\n\n rs.last();\n rows = rs.getRow();\n rs.beforeFirst();\n }\n\n String[][] data = new String[rows][7];\n\n while (rs.next()) {\n\n data[rowIndex][0] = rs.getInt(1) + \"\";\n data[rowIndex][1] = rs.getString(2);\n data[rowIndex][2] = rs.getString(3);\n data[rowIndex][3] = rs.getString(4);\n data[rowIndex][4] = rs.getString(5);\n data[rowIndex][5] = rs.getString(6);\n data[rowIndex][6] = rs.getString(7);\n \n \n\n rowIndex++;\n\n }\n\n String[] cols = {\"SuplpiID\",\"first_name\",\"last_name\",\"NIC\",\"contact_no\",\"mail\",\"company_name\"};\n DefaultTableModel model = new DefaultTableModel(data, cols);\n jTableupdate.setModel(model);\n\n\n rs.close();\n s.close();\n\n } catch (Exception ex) {\n\n JOptionPane.showMessageDialog(this, \"Can't Retrieve Data!\");\n\n }\n\n }", "@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}", "public void doUpdateTable() {\r\n\t\tlogger.info(\"Actualizando tabla books\");\r\n\t\tlazyModel = new LazyBookDataModel();\r\n\t}", "@Override\n\tpublic void updateSeatTable(seatTable st) {\n\t\t userdao.updateSeatTable(st);\n\t}", "protected abstract void updateTableDescriptor(HTableDescriptor desc)\n throws IOException;", "protected static void update() {\n\t\tstepsTable.update();\n\t\tactive.update();\n\t\tmeals.update();\n\t\t\n\t}", "public void setCol8value(String col8value) {\n this.col8value = col8value == null ? null : col8value.trim();\n }", "private void changeToScanTable() {\n\t\tswitch (fileType) {\n\t\tcase INVENTORY:\n\t\t\ttableView.setItems(presentationInventoryData);\n\t\t\tbreak;\n\t\tcase INITIAL:\n\t\t\ttableView.setItems(presentationInitialData);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\ttableView.getColumns().clear();\n\t\t\tbreak;\n\t\t} // End switch statement\n\t}", "void updateInformation();", "private void repopulateTableForAdd()\n {\n clearTable();\n populateTable(null);\n }", "public void Update()\n {\n try\n {\n pw.println(7);\n ArrayList<Ressource> list = (ArrayList<Ressource>) ois.readObject();\n ObservableList<Ressource> res = FXCollections.observableArrayList(list);\n tableF.setItems(res);\n }\n catch (ClassNotFoundException | IOException e)\n {\n System.out.println(e.getMessage());\n }\n }", "public void updateTable(List<OccorrenzeDisco> elements);", "public void updateTable(int keycode) {\r\n\t\tlong size=objectCollection.size();\r\n\t\tlong objectsToLoad=getObjectsToLoad(keycode);\r\n\t\tif (objectsToLoad!=0) objectCollection.addAll(retrieveObjects(size, size+objectsToLoad));\r\n\t\trefreshViewer(keycode==SWT.DEFAULT);\r\n\t}", "@Override\n\tpublic void checkTableVersion() {\n\n\t}", "abstract void updateStructure();", "void update(byte[] data)\n\t{\n\t\tObservableList<Row> a = FXCollections.observableArrayList();\n\n\t\tint srcIndex = 0;\n\t\twhile (srcIndex < data.length){\n\t\t\tbyte[] rowBytes = Arrays.copyOfRange(data, srcIndex, srcIndex + NUM_COLUMNS);\n\t\t\ta.add(new Row(rowBytes));\n\t\t\tsrcIndex += NUM_COLUMNS;\n\t\t}\n\t\tsetItems(a);\n\t}", "public void UpdateCarsTable(){\n String statusWord;\n for(int i=0;i<Main.carList.size();i++){\n if(Main.carList.get(i).status == 0)\n statusWord = \"Waiting\";\n else if(Main.carList.get(i).status == 1)\n statusWord = \"Crossing\";\n else if(Main.carList.get(i).status == 2)\n statusWord = \"Passed\";\n else\n statusWord = \"Unknown\";\n carModel.setValueAt(statusWord, i, 3);\n carModel.setValueAt(Main.carList.get(i).timeLeft, i, 4);\n }\n }", "public void setAttr8(String attr8) {\n this.attr8 = attr8;\n }", "public void updateTable() throws DBActionsException {\n updateGPA(calculations.calculate_GPA());\n tableHomeFrame.updateGradesTable(dbActions.getGradeTable());\n }", "private void loadTable() {\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n try {\n String sql = \"select * from tb_mahasiswa\";\n Statement n = a.createStatement();\n ResultSet rs = n.executeQuery(sql);\n while (rs.next()) {\n Object[] o = new Object[6];\n o[0] = rs.getString(\"id_mahasiswa\");\n o[1] = rs.getString(\"nama\");\n o[2] = rs.getString(\"tempat\");\n o[3] = rs.getString(\"waktu\");\n o[4] = rs.getString(\"status\");\n model.addRow(o);\n }\n } catch (Exception e) {\n }\n }", "private void refreshTableForUpdate()\n {\n //Was updating the values but don't believe this is necessary, as like budget items\n //a loss amount will stay the same unless changed by the user (later on it might be the\n //case that it can increase/decrease by a percentage but not now...)\n /*\n BadBudgetData bbd = ((BadBudgetApplication) this.getApplication()).getBadBudgetUserData();\n for (MoneyLoss loss : bbd.getLosses())\n {\n TextView valueView = valueViews.get(loss.expenseDescription());\n valueView.setText(BadBudgetApplication.roundedDoubleBB(loss.lossAmount()));\n }\n */\n }", "@Override\r\n\tprotected void setValue(Object element, Object value) {\r\n\t\t// update the whole table\r\n\t\tgetViewer().refresh();\r\n\t}", "public void setTable(Table table)\n {\n this.table = table;\n }", "public synchronized void updateData(final Function<Table<?>, Result<? extends Record>> fetcher) {\n updateDataFields(fetcher);\n }", "private void refreshTable(){\n DefaultTableModel dm = (DefaultTableModel)table.getModel();\r\n dm.getDataVector().removeAllElements();\r\n System.out.println(\"Refresh Table\");\r\n\r\n //calling method addRows\r\n addRows();\r\n }", "private void updateTabela() {\n\n if (txBuscar.getText().isEmpty()) {\n ListaEmprestimosBEANs = new ControlerEmprestimos().listaEmprestimoss();\n } else {\n try {\n Integer buscar = Integer.parseInt(txBuscar.getText());\n ListaEmprestimosBEANs = new ArrayList<>();\n ListaEmprestimosBEANs.add(new ControlerEmprestimos().findEmprestimos(buscar));\n } catch (Exception e) {\n\n }\n }\n DefaultTableModel model = new DefaultTableModel(null, new String[]{\"ID\", \"Data de Saida\", \"Data Estimada do Retorno\", \"Data do Retorno\"});\n try {\n jTable1.setModel(model);\n String[] dados = new String[9];\n for (EmprestimosBEAN a : ListaEmprestimosBEANs) {\n dados[0] = String.valueOf(a.getId_emprestimo());\n dados[1] = a.getDtSaida().toString();\n dados[2] = a.getDtVolta().toString();\n dados[3] = a.getDtRetorno() == null ? \"\" : a.getDtRetorno().toString();\n model.addRow(dados);\n }\n } catch (Exception ex) {\n\n }\n\n }", "CustomUpdateQuery update(String table);", "public void updateTable(String tableName, String[][] tableData, String[][] selectedCells, Cell [][]cells) \n {\n this.cells = cells;\n int tableDataRows = tableData.length;\n int selectedCellsRows = selectedCells.length;\n \n// System.out.println(\"tableDataRows = \" + tableDataRows);\n// System.out.println(\"selectedCellsRows = \" + selectedCellsRows);\n\n /*\n * if selected cells have more rows than table data then we need to at\n * least insert new data into the database\n */\n if (selectedCellsRows > tableDataRows) \n {\n /* creating a new array with only the \"extra\" rows in the spreadsheet */\n int startIndex = tableDataRows;\n// System.out.println(\"startIndex = \" + startIndex);\n String [][]newRows = new String[selectedCells.length - startIndex][tableData[0].length];\n for(int i = 0; i < newRows.length; i++)\n {\n for(int j = 0; j < newRows[0].length; j++)\n {\n newRows[i][j] = selectedCells[i + startIndex][j];\n// System.out.println(newRows[i][j]);\n }\n// System.out.println(\"-----------\");\n \n }\n /* inserts the \"extra\" selected cells in the database */\n adapter.insertNewData(tableName, newRows);\n /* at this point we need to make sure the rows are equal in both\n * tables so we call the following methods before update takes place */\n selectedCells = cellsTo2dArray(cells);\n tableData = loadTable(tableName);\n updateEqualRows(tableName, tableData, selectedCells);\n }\n\n// /*\n//\t\t * if selected cells have less rows than table data then we need to at\n//\t\t * least remove a record from the database\n//\t\t */\n// else if (selectedCellsRows < tableDataRows) \n// {\n// \n// }\n\n /* if row count is the same then we only need to update the table */\n else \n {\n updateEqualRows(tableName, tableData, selectedCells);\n }\n\n\t}", "public Builder setBaseTableBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n baseTable_ = value;\n onChanged();\n return this;\n }", "public void updateTableView() {\n\n\t\t// label as \"July 2016\"\n\t\tlabel.setText(month + \"/\" + year);\n\n\t\t// reset the model\n\t\tmodel.setRowCount(0);\n\t\tmodel.setRowCount(numberOfWeeks);\n\n\t\t// set value in the DefaultTableModel\n\t\tint i = firstDayOfWeek - 1;\n\t\tfor (int d = 1; d <= numberOfDays; d++) {\n\t\t\tint row = i / 7;\n\t\t\tint col = i % 7;\n\t\t\tmodel.setValueAt(d, row, col);\n\t\t\tif (d == day) {\n\t\t\t\ttable.changeSelection(row, col, false, false);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t}", "public void updateText() throws JUIGLELangException {\n SwingUtilities.invokeLater(new Runnable() {\n\n\n public void run() {\n fireTableStructureChanged();\n }\n });\n\n }", "private void loadData() {\n\n // connect the table column with the attributes of the patient from the Queries class\n id_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"pstiantID\"));\n name_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n date_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveDate\"));\n time_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveTime\"));\n\n try {\n\n // database related code \"MySql\"\n ps = con.prepareStatement(\"select * from visitInfo \");\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n\n // load data to the observable list\n editOL.add(new Queries(new SimpleStringProperty(rs.getString(\"id\")),\n new SimpleStringProperty(rs.getString(\"patiantID\")),\n new SimpleStringProperty(rs.getString(\"patiant_name\")),\n new SimpleStringProperty(rs.getString(\"visit_type\")),\n new SimpleStringProperty(rs.getString(\"payment_value\")),\n new SimpleStringProperty(rs.getString(\"reserve_date\")),\n new SimpleStringProperty(rs.getString(\"reserve_time\")),\n new SimpleStringProperty(rs.getString(\"attend_date\")),\n new SimpleStringProperty(rs.getString(\"attend_time\")),\n new SimpleStringProperty(rs.getString(\"payment_date\")),\n new SimpleStringProperty(rs.getString(\"attend\")),\n new SimpleStringProperty(rs.getString(\"attend_type\"))\n\n ));\n }\n\n // assigning the observable list to the table\n table_view_in_edit.setItems(editOL);\n\n ps.close();\n rs.close();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "private void reloadPlanTable() {\n\t\t\r\n\t}", "@Override\n\tpublic void updateSelective(TblMulitData t) throws SQLException {\n\n\t}", "@Override\n\tpublic void update(finalDataBean t, String[] fields) throws Exception {\n\t\t\n\t}", "private void update() {\n\n\t\tfloat shopping = Float.parseFloat(label_2.getText());\n\t\tfloat giveing = Float.parseFloat(label_5.getText());\n\t\tfloat companyDemand = Float.parseFloat(label_7.getText());\n\n\t\ttry {\n\t\t\tPreparedStatement statement = DBConnection.connection\n\t\t\t\t\t.prepareStatement(\"update customer_list set Shopping_Account = \"\n\t\t\t\t\t\t\t+ shopping\n\t\t\t\t\t\t\t+ \" , Giving_Money_Account = \"\n\t\t\t\t\t\t\t+ giveing\n\t\t\t\t\t\t\t+ \", Company_demand = \"\n\t\t\t\t\t\t\t+ companyDemand\n\t\t\t\t\t\t\t+ \" where Name = '\"\n\t\t\t\t\t\t\t+ name\n\t\t\t\t\t\t\t+ \"' And Last_Name = '\"\n\t\t\t\t\t\t\t+ lastName + \"' \");\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t}", "public static void UpdateTable(String s) throws IOException {\n String result=\"\";\n String s_analysis=\"(?<=set ).+(?=;)\";\n String s_property=\"(.+)( where )(.+)\";\n String s_update_values=\"(.+)=(.+),(.+)=(.+)\";\n String table_name=\"\";//表名\n String find = \"\" ;\n String values=\"\";//where前面的属性\n String values1=\"\";//where后面的属性\n String []x=s.split(\" \");\n table_name=x[1];//表名\n// System.out.println(table_name); //student\n\n //此版块实现判断是否有此表\n File file = new File(\"E:\\\\\"+table_name+\".txt\");\n if(file.exists()){\n //此版块实现将set后语句识别出来\n Pattern p = Pattern.compile(s_analysis);\n Matcher m = p.matcher(s);\n m.find();\n find= m.group().toString();\n// System.out.println(find); //set id=6666,grade=3 where name=houwei\n //实现将where语句前后属性分解出来\n Pattern p1 = Pattern.compile(s_property);\n Matcher m1 = p1.matcher(find);\n while(m1.find()){\n\n values=m1.group(1); //存要设置的新值\n values1=m1.group(3); //存定位到修改行的依据值\n }\n// System.out.println(values); //id=6666,grade=3 (下标为1的那部分)\n// System.out.println(values1); //where name=houwei (下标为3的那部分)\n //此版块实现将需要修改的属性及其值得到\n int weizhi=-1;//\n String line=\"\",attr = \"\";\n\n String[] y=values1.split(\"=\");\n String y_alter_property=y[0];//需要修改的属性\n String y_alter_values=y[1];//需要修改的属性的值\n// System.out.println(y_alter_values+\"需要修改\"); // houwei\n //此版块实现获取更改的属性和值\n BufferedReader br = new BufferedReader(new FileReader(file));\n line=br.readLine();//读取第一行\n result+=line+\"\\r\\n\";\n // list.add(line+\"\\r\\n\");//添加第一行\n attr = line = br.readLine();//读取第二行 属性\n\n //===================================================\n String[] sAttr=attr.split(\" \"); //保存每个属性的值\n String tmp [];\n for(int i = 0;i<sAttr.length;i++){\n\n tmp = sAttr[i].split(\"\\\\(\");\n sAttr[i] = tmp[0];\n\n// System.out.println(\"sAttr[i]\"+sAttr[i]);\n\n }\n\n //用来保存每一行的值\n ArrayList<String> list=new ArrayList<String>();\n\n\n result+=line+\"\";\n // list.add(line+\"\\r\\n\");//添加第二行\n //将第二行数据用空格分开\n String[] h=line.split(\" \");\n\n\n for(int j=0;j<h.length;j++){\n //得到定位属性的位置\n if(y_alter_property.equals(h[j].replaceAll(\"\\\\(.*?\\\\)\",\"\"))){\n weizhi=j;\n// System.out.println(y_alter_property); //name\n }\n }\n// System.out.println(\"要修改的位置是:\"+weizhi); //0 根据哪个属性要修改值得下标\n\n //筛选出修改的值的内容\n String z =\"\";\n Pattern p2 = Pattern.compile(s_update_values);\n Matcher m2 = p2.matcher(values);\n m2.find();\n// System.out.println(m2.group().toString()+\"==================\");\n\n\n //===========================================================\n\n// for(int b=2;b<5;){\n// System.out.println(m2.group(b));\n// z+=m2.group(b)+\" \";\n// b+=2;\n// }\n// z+=y_alter_values;\n// System.out.println(z+\"lalal\");\n\n //存第一个要修改属性的值 houwei\n String a = m2.group(2);\n //存第二个要修改属性的值 6666\n String b = m2.group(4);\n\n //存第一个要修改的属性(含类型)\n String c = m2.group(1);\n //存第二个要修改的属性(含类型)\n String d = m2.group(3);\n\n// System.out.println(\"111111111111111111111\");\n// System.out.println(\"a \"+a);\n// System.out.println(\"b \"+b);\n// System.out.println(\"c \"+c);\n// System.out.println(\"d \"+d);\n\n //从第三行开始读\n while((line=br.readLine())!=null){\n\n// System.out.println(\"读取的行是:\"+line);\n String[] k=line.split(\" \");\n\n if(k==null){\n\n// System.out.println(\"此表中没有值\");\n\n }\n\n //读到的那一行的属性值为 where的属性\n else if(k[weizhi].equals( y_alter_values )){\n\n result+=\"\\r\\n\";\n\n //建立一个动态数组\n // 1. 将修改的值变成新的值 填入动态数组对应的位置\n // 2. 将未修改的值也存入对应位置\n // 3. 将该动态数组拼接成一个字符串(最后加\\r\\n)\n // 4. 接着读取下面的行,重复以上操作\n\n //先将原一行原数据放入数组中\n for(int i = 0;i<k.length;i++) {\n list.add(k[i]);\n }\n\n for(int i = 0;i<k.length;i++){\n\n // if(c == sAttr[i]){\n if(sAttr[i].equals(c)){\n list.set(i,a);\n }\n\n\n //if(d == sAttr[i]){\n if(d.equals(sAttr[i])){\n list.set(i,b);\n\n }\n\n }\n\n // result+=\"\\r\\n\";\n\n for(int i = 0;i<k.length;i++){\n\n result+=list.get(i)+\" \";\n\n }\n\n\n }else{\n //没有则按照原来情况正常写入\n// System.out.println(\"正常\");\n result+=\"\\r\\n\"+line;\n\n }\n }\n //将字符串写入文件中\n System.out.println(result);\n FileWriter fileWriter=new FileWriter(\"E:\\\\\"+table_name+\".txt\", false);\n fileWriter.write(result+\"\");\n fileWriter.close();\n System.out.println(\"成功执行\");\n\n }else{\n System.out.println(\"此表不存在\");\n }\n\n\n\n\n }", "public void updateDisplay(){\r\n //Update the display\r\n DefaultTableModel regs = (DefaultTableModel)tblRegisters.getModel();\r\n regs.setValueAt(Integer.toHexString(board.getA()),0,0);\r\n regs.setValueAt(Integer.toHexString(board.getB()),0,1);\r\n regs.setValueAt(Integer.toHexString(board.getX()),0,2);\r\n regs.setValueAt(Integer.toHexString(board.getY()),0,3);\r\n regs.setValueAt(Integer.toBinaryString(board.getIntCCR()),0,4);\r\n lblPC.setText(Integer.toHexString(board.getPC()));\r\n lblSP.setText(Integer.toHexString(board.getSP()));\r\n }", "private void updateALUTableScorboard() {\n\t\t// Get a copy of the memory stations\n\t\t// ALUStation[] temp_alu = alu_rs;\n\n\t\t// Update the table with current values for the stations\n\t\tfor (int i = 0; i < _lstFuStatusScorboard2.size(); i++) {\n\t\t\t// generate a meaningfull representation of busy\n\t\t\t// String busy_desc = (temp_alu[i].isBusy() ? \"Yes\" : \"No\" );\n\t\t\t// _FunctionUnitsModel.setColumnIdentifiers( new Object[]{\"Cycle\",\n\t\t\t// \"Name\",\"Busy\", \"Op\", \"Fi\", \"Fj\", \"Fk\", \"Qj\",\"Qk\",\"Rj\",\"Rk\"} );\n\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getTime(), i, 0);\n\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getFu_name(), i, 1);\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getBusy(), i, 2);\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getOp(), i, 3);\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getFi(), i, 4);\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getFj(), i, 5);\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getFk(), i, 6);\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getQj(), i, 7);\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getQk(), i, 8);\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getRj(), i, 9);\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getRk(), i, 10);\n\t\t}\n\t}", "public void updateFingerTable(int key, String address) {\n for (int i = 0; i < fingerTable.size(); i++) {\n if (key == fingerTable.get(i).getId()) {\n fingerTable.set(i, new Finger(key, address));\n }\n }\n }", "public void update() {\r\n\t\ttable.putNumber(TARGET_X_KEY, targetX);\r\n\t\ttable.putNumber(TARGET_Y_KEY, targetY);\r\n\t\ttable.putNumber(DISTANCE, distance);\r\n\t\ttable.putBoolean(IS_FOUND, targetFound);\r\n\r\n\t}", "public void updateColumnsFromTap(String fullTableName, Map<String, ColumnConfig> configs);", "public void refresh() {\n calcDataInTable();\n fireTableDataChanged();\n\n}", "@Override\r\n\tpublic void update(String[] getdata) {\n\r\n\t}", "public void updateanime(){\r\n animetable = new JTable();\r\n // set colume\r\n DefaultTableModel tableModel = (DefaultTableModel) animetable.getModel();\r\n tableModel.setColumnCount(0);\r\n //set row\r\n tableModel.setRowCount(animeimg.length);\r\n String[] animeno = new String[100];\r\n for(int i=0; i<animeimg.length; i++){\r\n if(animeimg[i]==null)\r\n break;\r\n animeno[i] = Integer.toString(i+1);\r\n }\r\n tableModel.addColumn(\"Available Images\", animeno);\r\n animetable.invalidate();\r\n pane_fileList.setViewportView(animetable);\r\n animetable.setVisible(true);\r\n }", "private void fillTable(){\n tblModel.setRowCount(0);// xoa cac hang trong bang\n \n for(Student st: list){\n tblModel.addRow(new String[]{st.getStudentId(), st.getName(), st.getMajor(),\"\"\n + st.getMark(), st.getCapacity(), \"\" + st.isBonnus()});\n // them (\"\" + )de chuyen doi kieu float va boolean sang string\n \n }\n tblModel.fireTableDataChanged();\n }", "public void updateTable(){\n this.tableModel = (DefaultTableModel) sitesTable.getModel();\n while( this.tableModel.getRowCount() != 0 ){\n this.tableModel.removeRow(0);\n }\n \n if( Console.isAdmin ){\n for( int i = 0 ; i < this.websites.size() ; i++ ){\n Website website = this.websites.get(i);\n this.tableModel.addRow(new Object[]{ website.name , website.IP , website.isRouted() , website.Description });\n }\n }else{\n for( int i = 0 ; i < this.websites.size() ; i++ ){\n Website website = this.websites.get(i);\n this.tableModel.addRow(new Object[]{ website.name , website.IP , website.wasRerouted , website.Description });\n }\n }\n\n sitesTable.setModel(this.tableModel);\n }", "public void UpdateTransaction() {\n\t\tgetUsername();\n\t\tcol_transactionID.setCellValueFactory(new PropertyValueFactory<Account, Integer>(\"transactionID\"));\n\t\tcol_date.setCellValueFactory(new PropertyValueFactory<Account, Date>(\"date\"));\n\t\tcol_description.setCellValueFactory(new PropertyValueFactory<Account, String>(\"description\"));\n\t\tcol_category.setCellValueFactory(new PropertyValueFactory<Account, String>(\"category\"));\n\t\tcol_amount.setCellValueFactory(new PropertyValueFactory<Account, Double>(\"amount\"));\n\t\tmySqlCon.setUsername(username);\n\t\tlists = mySqlCon.getAccountData();\n\t\ttableTransactions.setItems(lists);\n\t}", "public void updateTable() {\n\t\ttable.getSelectionModel().removeListSelectionListener(lsl);\n\t\tdtm = new DefaultTableModel();\n\t\td = new Diet();\n\t\tdtm.addColumn(\"Id\");\n\t\tdtm.addColumn(\"Meal Id\");\n\t\tdtm.addColumn(\"Meal Type\");\n\t\tdtm.addColumn(\"Food Name\");\n\t\tdtm.addColumn(\"Food Type\");\n\t\tdtm.addColumn(\"Food Category\");\n\t\tdtm.addColumn(\"Ready Time\");\n\t\tdtm.addColumn(\"Calories (g)\");\t\t\n\t\tdtm.addColumn(\"Protein (g)\");\n\t\tdtm.addColumn(\"Fat (g)\");\n\t\tdtm.addColumn(\"Carbohydrates\");\n\t\tdtm.addColumn(\"VitaminA\");\n\t\tdtm.addColumn(\"VitaminC\");\n\t\tdtm.addColumn(\"Calcium\");\n\t\tdtm.addColumn(\"Iron\");\n\t\tdtm.addColumn(\"Author\");\n\t\tArrayList<Diet> dietList = dI.getDietList();\n\t\tif(isOrder && orderby!=\"\")\n\t\t{\t\t\t\n\t\t\tSystem.out.println(\"entering ----------------\"+orderby);\n\t\t\tdietList=dI.getDietOrderedList(type,orderby);\n\t\t\tfor (Diet d : dietList) {\t\n\t\t\t\tSystem.out.println(d.getId()+\" ------ \"+d.getCalories());\n\t\t\t}\n\t\t}\n\t\tif(isFiltered)\n\t\t{\n\t\t\tif(mealtypeSel!=\"\")\n\t\t\tdietList=dI.getFilteredMealTypeList(mealtypeSel);\n\t\t\tif(foodtypeSel!=\"\")\n\t\t\t\tdietList=dI.getFilteredFoodTypeList(foodtypeSel);\n\t\t\tif(authorSel!=\"\")\n\t\t\t\tdietList=dI.getFilteredauthorList(authorSel);\n\t\t\tif(foodCategorySel!=\"\")\n\t\t\t\tdietList=dI.getFilterFoodCategoryList(foodCategorySel);\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (Diet d : dietList) {\t\n\t\t\tdtm.addRow(d.getVector());\n\t\t}\n\t\ttable.setModel(dtm);\n\n\t\ttable.getSelectionModel().addListSelectionListener(lsl);\n\n\t}", "public void reloadTable() {\n\n this.removeAllData();// borramos toda la data \n for (int i = 0; i < (list.size()); i++) { // este for va de la primera casilla hast ael largo del arreglo \n Balanza object = list.get(i);\n this.AddtoTable(object);\n }\n\n }", "@Override\n\tpublic void update(StockDataRecord bo) throws SQLException {\n\t\t\n\t}", "boolean update(DataTableDef def) throws IOException;", "@Override\r\n\tpublic boolean updateTable() {\r\n\t\t/*\r\n\t\t * VERSION 1\r\n\t\t *\r\n\t\tobjectCollection.clear();\r\n\t\tobjectCollection.addAll(retrieveObjects());\r\n\t\trefreshTable();*/\r\n\t\tlong size=objectCollection.size();\r\n\t\tobjectCollection.clear();\r\n\t\tint index=getSelectionIndex();\r\n\t\tupdateTable(SWT.DEFAULT);\r\n\t\tselectElement(index);\r\n\t\treturn objectCollection.size()!=size;\r\n\t}", "public static void updateSurgeriesTable() {\n while (surgeriesTableModelEN.getRowCount() > 0) {\n surgeriesTableModelEN.removeRow(0);\n }\n\n //get all surgeries details\n Vector<Vector<String>> surgeriesDetails = new DatabaseQueries().getAllSurgeriesDetails();\n\n for (Vector<String> surgeriesDetail : surgeriesDetails) {\n surgeriesTableModelEN.addRow(new Object[]{surgeriesDetail.get(0), surgeriesDetail.get(1), surgeriesDetail.get(2), surgeriesDetail.get(3)});\n }\n }", "public void update(Tiaoxiushenqing t) throws SQLException {\n\t\tTiaoxiushenqingDao dao = new TiaoxiushenqingDao();\n\t\tdao.update(t);\n\t}", "@Override\n\tpublic void UpdateTableSchedule(Schedule current) {\n\t\tif (current == null)\n\t\t\treturn;\n\t\tCurrFitness = current.fitness;\n\t\tmyLabelSchedule.setText(\"Current Schedule Fitness: \" + CurrFitness);\n\t\tfor (int station = 1; station <= current.stations.size(); station++) {\n\t\t\tfor (int i = 0; i < dtm.getRowCount(); i++) {\n\t\t\t\tdtm.setValueAt(\"\", i, station);\n\t\t\t}\n\t\t\t// @Debug System.out.println(\"TableLength: \"+tableLength);\n\t\t\tStationSlot currentStation = current.stations.get(station - 1);\n\t\t\tif (currentStation.registeredCars.size() == 0) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tLinkedList<CarSlot> cars = currentStation.registeredCars;\n\t\t\t\tfor (int i = 0; i < cars.size(); i++) {\n\t\t\t\t\tCarSlot car = cars.get(i);\n\t\t\t\t\tfloat start = car.startTime;\n\t\t\t\t\tfloat duration = car.duration;\n\t\t\t\t\tint rowNum = (int) (start * (60 / interval));\n\t\t\t\t\t// System.out.println(\"ColumNum: \"+rowNum);\n\t\t\t\t\twhile (duration > 0) {\n\t\t\t\t\t\tdtm.setValueAt(\"Car \" + car.name + \" [\" + car.priority + \"]\" + \" - \" + car.type, rowNum, station);\n\t\t\t\t\t\trowNum++;\n\t\t\t\t\t\tduration = (float) (duration - interval / 60f);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void initializeTable(){\n tableData = new Object[cards.size()][8];\n\n for(int i = 0; i < cards.size(); i++){\n Object[] player = tableData[i];\n BsbCard card = cards.get(i);\n\n player[0] = card.getName();\n player[1] = card.getAge();\n player[2] = card.getTeam().getName();\n player[3] = card.getPos().getName();\n\n player[4] = card.getYrsPlayed();\n player[5] = card.getCondition();\n\n StringBuilder sb = new StringBuilder();\n for(int j = 0; j < card.getRarity(); j++){\n sb.append(\"\\u2605\");\n }\n player[6] = sb.toString();\n if(card.isTrade()){\n player[7] = \"\\u2714\";\n } else {\n player[7] = \"\\u0078\";\n }\n }\n }", "private void setTable(int row)\n {\n table.setValueAt(idText.getText(), row, 0);\n table.setValueAt(nameText.getText(), row, 1);\n }", "@Override\n\tpublic Turkey update(Turkey t) {\n\t\treturn null;\n\t}", "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 updateComponents() {\n try {\n java.sql.Date cDate = new java.sql.Date(System.currentTimeMillis());\n java.sql.Date sDate = Date.valueOf(\"1971-01-01\");\n DefaultTableModel tData = or.getOrderData(sDate,cDate);\n oTable.setModel(tData);\n setSales(tData);\n } catch (Exception ex) {\n System.out.println(ex);\n }\n }", "private void updateStoryTable() {\n List<Story> stories = getModel().getAllStories();\n observableStories.setAll(stories);\n\n if (selectedStory.get() != null) {\n storyTable.getSelectionModel().select(selectedStory.get());\n }\n\n }", "@Override\n\tpublic void update(RaceZipTbVo vo) throws SQLException {\n\t\t\n\t}" ]
[ "0.7094524", "0.6517606", "0.6305054", "0.6152439", "0.60869193", "0.5961152", "0.5913072", "0.5910996", "0.5910083", "0.58156437", "0.58147943", "0.5749335", "0.571802", "0.57154965", "0.56980705", "0.5682249", "0.56025875", "0.55886513", "0.55508333", "0.5548806", "0.5529076", "0.5522102", "0.54580224", "0.5449075", "0.543953", "0.5430477", "0.5413073", "0.5397857", "0.53931206", "0.5386629", "0.537977", "0.53793275", "0.5376361", "0.53704715", "0.53111756", "0.5310779", "0.52866435", "0.5285854", "0.52823514", "0.52734786", "0.525287", "0.52404004", "0.52354294", "0.52148026", "0.5209444", "0.51927", "0.51662236", "0.5155821", "0.5147596", "0.51378375", "0.5134081", "0.5126928", "0.51244664", "0.51189315", "0.5103734", "0.5100117", "0.5089239", "0.50520366", "0.50500256", "0.50353545", "0.50322884", "0.5025424", "0.5018401", "0.50100553", "0.50082195", "0.5004299", "0.5001778", "0.49976838", "0.49946088", "0.49936658", "0.49859697", "0.4977507", "0.497345", "0.49698508", "0.49669817", "0.4965347", "0.49516606", "0.49499327", "0.49479342", "0.49438083", "0.49419516", "0.49319217", "0.49300373", "0.49298614", "0.4927262", "0.49217016", "0.4919207", "0.49146575", "0.49120015", "0.4911001", "0.49054292", "0.49021628", "0.4896511", "0.4893691", "0.48848385", "0.48822656", "0.4873056", "0.48724854", "0.48629978", "0.4858816" ]
0.68956494
1
Retrieve the count of the Table8s in the repository with matching query.
long count(String query);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int findAllCount() ;", "int getCountAllRowsForTable(String tableName) throws DaoException;", "@Override\n public final long countAll(final DataTablePredicate predicate) {\n\treturn (long) getEntityManager()\n\t\t.createQuery(\"select count(*) from \"\n\t\t\t+ searchQuery)\n\t\t.setParameter(\"search\", predicate.getSearch() + \"%\")\n\t\t.getSingleResult();\n }", "Long getAllCount();", "private int getRowCount(String table) {\n return getIntFromQuery(\"SELECT COUNT(*) from \" + table, null);\n }", "@Override\n\tpublic int queryCount() {\n\t\treturn (int) tBasUnitClassRepository.count();\n\t}", "public int searchRowsCount(SearchCriteria cri);", "public Long getCountAllResults() {\n\n //create a querybuilder for count\n QueryBuilder queryBuilderCount = dao.getQueryBuilder()\n .from(dao.getEntityClass(), (joinBuilder != null ? joinBuilder.getRootAlias() : null))\n .join(joinBuilder)\n .add(getCurrentQueryRestrictions())\n .debug(debug);\n\n Long rowCount;\n //added distinct verification\n if (joinBuilder != null && joinBuilder.isDistinct()) {\n rowCount = queryBuilderCount.countDistinct(joinBuilder.getRootAlias());\n } else {\n rowCount = queryBuilderCount.count();\n }\n\n return rowCount;\n }", "int getTablesCount();", "public int findAllCount() {\n\t\treturn mapper.selectCount(null);\n\t}", "public int countAll() throws DAOException;", "private static int getTableCount(ISession session, String tableName) {\n int result = -1;\n ResultSet rs = null;\n try {\n String sql = \"select count(*) from \"+tableName; \n rs = executeQuery(session, sql);\n if (rs.next()) {\n result = rs.getInt(1);\n }\n } catch (Exception e) {\n /* Do Nothing - this can happen when the table doesn't exist */\n } finally {\n SQLUtilities.closeResultSet(rs, true);\n }\n return result; \n }", "long countByExample(Table2Example example);", "@Override\n\tpublic int selectCount(Object ob) {\n\n\t\tint res = session.selectOne(\"play.all_count\", ob);\n\n\t\treturn res;\n\t}", "public long countAll();", "List<Integer> getCounts(SearchQuery... conditions);", "public int getListCount() {\n String countQuery = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n cursor.close();\n return cursor.getCount();\n }", "int get_row_count(String table) {\n //table does not exist\n if (!get_table_names().contains(table) && !table.equals(\"relationship\")) {\n throw new RuntimeException(\"Table does not exist.\");\n }\n\n //maybe use select count(id) from table instead\n String sql = \"select * from \" + table;\n int count = 0;\n\n ResultSet resultSet = execute_statement(sql, true);\n try {\n while (resultSet.next()) {\n count++; //count number of entities\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n\n try {\n this.disconnect(resultSet, null, null); //disconnect from database\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return count;\n }", "@Test\n public void testGetTables() throws Exception {\n Map<String, Long> tableCounts = managementService.getTableCount();\n\n CloseableHttpResponse response = executeRequest(new HttpGet(SERVER_URL_PREFIX + RestUrls.createRelativeResourceUrl(RestUrls.URL_TABLES_COLLECTION)),\n HttpStatus.SC_OK);\n\n // Check table array\n JsonNode responseNode = objectMapper.readTree(response.getEntity().getContent());\n closeResponse(response);\n assertThat(responseNode).isNotNull();\n assertThat(responseNode.isArray()).isTrue();\n assertThat(responseNode).hasSize(tableCounts.size());\n\n for (int i = 0; i < responseNode.size(); i++) {\n ObjectNode table = (ObjectNode) responseNode.get(i);\n assertThat(table.get(\"name\").textValue()).isNotNull();\n assertThat(table.get(\"count\").longValue()).isNotNull();\n assertThat(table.get(\"url\").textValue()).endsWith(RestUrls.createRelativeResourceUrl(RestUrls.URL_TABLE, table.get(\"name\").textValue()));\n assertThat(table.get(\"count\").longValue()).isEqualTo(tableCounts.get(table.get(\"name\").textValue()).longValue());\n }\n }", "public long countRecords();", "@Override\n\tpublic int selectCount(Map<String, Object> params) {\n\t\treturn this.tableConfigDao.selectCount(params);\n\t}", "@Override\n\tpublic Long count() {\n\t\treturn SApplicationcategorydao.count(\"select count(*) from \"+tablename+\" t\");\n\t}", "long countAll();", "long countAll();", "default long count() {\n\t\treturn select(Wildcard.count).fetchCount();\n\t}", "public int getAllRowCount(String hql) {\n\t\treturn getHibernateTemplate().find(hql).size();\n\t}", "@Query(value = \"SELECT COUNT(*) FROM coupons\", nativeQuery = true)\n int countAllCoupons();", "@Override\n\tpublic Long count(Map<String, Object> params) {\n\t\tString hql=\"select count(*) from \"+tablename+\" t\";\n\t\treturn SApplicationcategorydao.count(hql, params);\n\t}", "public Integer countAll();", "@Transactional(propagation=Propagation.SUPPORTS,readOnly=true)\r\n\tpublic Integer queryCount() {\n\t\tInteger count = musicdao.selectCount();\r\n\t\treturn count;\r\n\t}", "@GetMapping(\"/operational-heads/count/{status}\")\n @Timed\n public Long getOperationHeadCount(@PathVariable Integer status) {\n log.debug(\"REST request to get a list of particular status of operationalHeadService\");\n return operationalHeadService.findActiveCount(status);\n }", "public int count() {\n return Query.count(iterable);\n }", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "int countRows() throws IOException {\n Scan s = new Scan();\n ResultScanner rs = tbl.getScanner(s);\n int i = 0;\n while(rs.next() !=null) {\n i++;\n }\n return i;\n }", "@Override\r\n\t@Transactional\r\n\tpublic int getCount(List<Filter> filters){\r\n\t\ttry{\r\n\t\t\tString sql = \"select count(*) \"\r\n\t\t\t\t\t + \"from FmtEstado \";\r\n\t\t\t\r\n\t\t\tsql = sqlFunctions.completeSQL(null, filters, sql, FmtEstado.getColumnNames());\r\n\t\t\t\r\n\t\t\tQuery query = getSession().createQuery(sql);\r\n\t \r\n\t\t\t query=sqlFunctions.setParameters(filters, query);\r\n\t\t\t \r\n\t\t\tIterator it = query.list().iterator();\r\n\t Long ret = new Long(0);\r\n\t \r\n\t if (it != null)\r\n\t\t if (it.hasNext()){\r\n\t\t \tret = (Long) it.next();\r\n\t\t }\r\n\t \r\n\t\t\treturn ret.intValue();\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "@Transactional(readOnly = true)\n public long countByCriteria(TabelaCriteria criteria) {\n log.debug(\"count by criteria : {}\", criteria);\n final Specification<Tabela> specification = createSpecification(criteria);\n return tabelaRepository.count(specification);\n }", "abstract public TypedQuery<?> getCountQuery() ;", "@Transactional(readOnly = true)\n public long countByQueryWrapper(QueryWrapper queryWrapper) {\n log.debug(\"count by queryWrapper : {}\", queryWrapper);\n return ossConfigRepository.selectCount(queryWrapper);\n }", "@Override\n public long count() {\n String countQuery = \"SELECT COUNT(*) FROM \" + getTableName();\n return getJdbcTemplate().query(countQuery, SingleColumnRowMapper.newInstance(Long.class))\n .get(0);\n }", "public long countAllLots() throws MiddlewareQueryException;", "public int getAllCount(){\r\n\t\tString sql=\"select count(*) from board_notice\";\r\n\t\tint result=0;\r\n\t\tConnection conn=null;\r\n\t\tStatement stmt=null;\r\n\t\tResultSet rs=null;\r\n\t\ttry{\r\n\t\t\tconn=DBManager.getConnection();\r\n\t\t\tstmt=conn.createStatement();\r\n\t\t\trs=stmt.executeQuery(sql);\r\n\t\t\trs.next();\r\n\t\t\tresult=rs.getInt(1);\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tDBManager.close(conn, stmt, rs);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "int getResultsCount();", "int getResultsCount();", "private void executeCountQuery(JsonObject json, HttpServerResponse response) {\n database.countQuery(json, handler -> {\n if (handler.succeeded()) {\n LOGGER.info(\"Success: Count Success\");\n handleSuccessResponse(response, ResponseType.Ok.getCode(),\n handler.result().toString());\n } else if (handler.failed()) {\n LOGGER.error(\"Fail: Count Fail\");\n processBackendResponse(response, handler.cause().getMessage());\n }\n });\n }", "@Override\r\n\tpublic int getAllRowCount(String hql) {\n\t\tTransaction tx = null;\r\n int allRows = 0;\r\n try{\r\n \tSession session = MyHibernateSessionFactory.getSessionFactory().getCurrentSession();\r\n tx = session.beginTransaction();\r\n Query query = session.createQuery(hql);\r\n allRows = query.list().size();\r\n tx.commit();\r\n return allRows;\r\n }catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\treturn -1;\r\n\t\t}finally{\r\n\t\t\tif(tx!=null){\r\n\t\t\t\ttx=null;\r\n\t\t\t}\r\n\t\t\t//HibernateUtil.closeSession(session);\r\n\t\t}\r\n \r\n \r\n\t}", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_TESTUNIT);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "int countByExample(Assist_tableExample example);", "@Transactional(readOnly = true)\n public long countByQueryWrapper(QueryWrapper queryWrapper) {\n log.debug(\"count by queryWrapper : {}\", queryWrapper);\n return apiPermissionRepository.selectCount(queryWrapper);\n }", "int countByExample(UploadStateRegDTOExample example);", "public int countAll() throws SQLException\n {\n return countWhere(\"\");\n }", "public int countAll() throws SQLException\n {\n return countWhere(\"\");\n }", "public int countAll() throws SQLException\n {\n return countWhere(\"\");\n }", "static int getCachedRegionCount(Configuration conf,\n final byte[] tableName)\n throws IOException {\n return execute(new HConnectable<Integer>(conf) {\n @Override\n public Integer connect(HConnection connection) {\n return ((HConnectionImplementation) connection)\n .getNumberOfCachedRegionLocations(tableName);\n }\n });\n }", "@Override\n public int countByQuery(Ares2ClusterQuery query) {\n return ares2ClusterExtMapper.countByQuery(query);\n }", "@GetMapping(value=\"/Count/v1\")\n\tpublic String getCountOfCars() {\n\t\tlong carsCount = carElasticRepository.count();\n\t\treturn \"Number Of Cars In Elastic Search are \" + carsCount;\n\t}", "long countByExample(TestEntityExample example);", "public int getSoupKitchenCount() {\n\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT COUNT(*) FROM cs6400_sp17_team073.Soup_kitchen\";\n\n Integer skcount = jdbc.queryForObject(sql,params,Integer.class);\n\n return skcount;\n }", "public int getUangCount(){\n String countQuery = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n cursor.close();\n return cursor.getCount();\n }", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "@Override\n\tpublic Long count(String hql) {\n\t\treturn null;\n\t}", "public int numberOfRows(){\n int numRows = (int) DatabaseUtils.queryNumEntries(db, TRACKINGS_TABLE_NAME);\n return numRows;\n }", "int countByExample(TABLE41Example example);", "@Override\n\tpublic Long count(String searchinfo) {\n\t\tString hql=\"select count(*) from \"+tablename +\" where 1=1 \";\n\t\tif(searchinfo!=null&& !searchinfo.equals(\"\")){\n\t\t\thql+=\" and t.name like '%\"+ searchinfo+\"%' \";\n\t\t}\n\t\treturn SApplicationcategorydao.count(hql);\n\t}", "@GetMapping(path = \"/count\")\r\n\tpublic ResponseEntity<Long> getCount() {\r\n\t\tLong count = this.bl.getCount();\r\n\t\treturn ResponseEntity.status(HttpStatus.OK).body(count);\r\n\t}", "public int getTableCount(int tableID){\n int count = -1;\n\n try {\n PreparedStatement getCount = db.getConnection()\n .prepareStatement(\"SELECT * FROM \" + DBConst.TABLE_RESERVATIONS + \" WHERE \"\n + DBConst.RESERVATIONS_COLUMN_TABLE + \" = '\" + tableID + \"'\", ResultSet.TYPE_SCROLL_SENSITIVE,\n ResultSet.CONCUR_UPDATABLE);\n ResultSet data = getCount.executeQuery();\n data.last();\n count = data.getRow();\n }\n catch(SQLException e) {\n e.printStackTrace();\n }\n return count;\n\n }", "int count(IDynamoDBMapper mapper);", "int countByExample(ParseTableLogExample example);", "public int count(String hql) throws Exception {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int list_count(SearchCriteria scri) throws Exception {\n\t\treturn sql.selectOne(\"cms_board.list_count\", scri);\r\n\t}", "@Override\n\tpublic int countPaging(SearchCriteria cri) {\n\t\treturn session.selectOne(namespace+\".listSearchCount\", cri);\n\t}", "@Override\n public int countAll() {\n\n Query qry = this.em.createQuery(\n \"select count(assoc) \" +\n \"from WorkToSubjectEntity assoc\");\n\n return ((Long) qry.getSingleResult()).intValue();\n }", "public Long count(DatasetItem dataset) {\n\n logTrace(\"Getting Number of Transactions in Dataset with query :: \" + COUNT_QUERY);\n\n Long numResults = (Long)getHibernateTemplate().find(\n COUNT_QUERY, dataset.getId()).get(0);\n return numResults;\n }", "@SuppressWarnings(\"unchecked\")\n public Object countByQuery(String queryString, QueryParameter... parameters)\n {\n return countByQuery(queryString, Arrays.asList(parameters));\n }", "public String countByExample(CarExample example) {\n SQL sql = new SQL();\n sql.SELECT(\"count(*)\").FROM(\"`basedata_car`\");\n applyWhere(sql, example, false);\n return sql.toString();\n }", "public int getcount() {\n\t\tString countQuery = \"SELECT * FROM \" + DATABASE_TABLE1;\n\t \n\t Cursor cursor = ourDatabase.rawQuery(countQuery, null);\n\t int cnt = cursor.getCount();\n\t cursor.close();\n\t return cnt;\n\t\n\t}", "public int countByUuid(String uuid);", "public int countByUuid(String uuid);", "public int countByUuid(String uuid);", "@Override\r\n\tpublic int getCountByAll() throws Exception {\n\t\treturn 0;\r\n\t}", "public String getNumContentResources1Sql()\r\n \t{\r\n \t\treturn \"select count(IN_COLLECTION) from CONTENT_RESOURCE where IN_COLLECTION like ?\";\r\n \t}" ]
[ "0.649454", "0.63484895", "0.63076437", "0.63055336", "0.6141365", "0.6045986", "0.5992725", "0.5953593", "0.59446704", "0.59323347", "0.58890396", "0.5882733", "0.58699197", "0.5847484", "0.58276355", "0.5801231", "0.57998556", "0.5779768", "0.5777862", "0.5777792", "0.5757311", "0.5698602", "0.5695135", "0.5695135", "0.56896746", "0.5681895", "0.567641", "0.56654906", "0.5646896", "0.5638769", "0.56249094", "0.5609451", "0.56094056", "0.56094056", "0.56094056", "0.56094056", "0.56094056", "0.56094056", "0.56094056", "0.56094056", "0.56094056", "0.56094056", "0.56094056", "0.56012034", "0.55903137", "0.5588077", "0.5585089", "0.5579396", "0.55745643", "0.5574032", "0.5568377", "0.55670375", "0.55670375", "0.55571485", "0.55556124", "0.55418056", "0.5540574", "0.553778", "0.55302", "0.5527538", "0.5527538", "0.5527538", "0.55247736", "0.55104166", "0.5504237", "0.5495281", "0.5494885", "0.5488281", "0.54791105", "0.54791105", "0.54791105", "0.54791105", "0.54791105", "0.54791105", "0.54791105", "0.54791105", "0.54791105", "0.54791105", "0.5477578", "0.5477323", "0.5476388", "0.54726493", "0.5467559", "0.5451575", "0.54490376", "0.5443939", "0.54421556", "0.5434767", "0.5434235", "0.54287845", "0.54216874", "0.54131687", "0.5410083", "0.54086614", "0.5406162", "0.5406162", "0.5406162", "0.53979325", "0.5387251" ]
0.60190403
7
Creates an instance of DistributionPolicyInternal class.
public DistributionPolicyInternal() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected PolicyModelGenerator() {\n // nothing to initialize\n }", "public PolicyIDImpl() {\n super();\n }", "public SubscriptionPolicies() {\n }", "public ApplicationDeltaHealthPolicy() {\n }", "public CustomerPolicyProperties() {\n }", "Policy _get_policy(int policy_type);", "Policy_Repository createPolicy_Repository();", "public WSFederationClaimsReleasePolicy() {\n this(new HashMap<>());\n }", "public static SubscriptionPolicy createDefaultSubscriptionPolicy() {\n SubscriptionPolicy subscriptionPolicy = new SubscriptionPolicy(SAMPLE_SUBSCRIPTION_POLICY);\n subscriptionPolicy.setUuid(UUID.randomUUID().toString());\n subscriptionPolicy.setDisplayName(SAMPLE_SUBSCRIPTION_POLICY);\n subscriptionPolicy.setDescription(SAMPLE_SUBSCRIPTION_POLICY_DESCRIPTION);\n QuotaPolicy defaultQuotaPolicy = new QuotaPolicy();\n defaultQuotaPolicy.setType(REQUEST_COUNT_TYPE);\n RequestCountLimit requestCountLimit = new RequestCountLimit(TIME_UNIT_SECONDS, 10000, 1000);\n defaultQuotaPolicy.setLimit(requestCountLimit);\n subscriptionPolicy.setDefaultQuotaPolicy(defaultQuotaPolicy);\n return subscriptionPolicy;\n }", "public static APIPolicy createDefaultAPIPolicy() {\n APIPolicy apiPolicy = new APIPolicy(SAMPLE_API_POLICY);\n apiPolicy.setUuid(UUID.randomUUID().toString());\n apiPolicy.setDisplayName(SAMPLE_API_POLICY);\n apiPolicy.setDescription(SAMPLE_API_POLICY_DESCRIPTION);\n apiPolicy.setUserLevel(APIMgtConstants.ThrottlePolicyConstants.API_LEVEL);\n QuotaPolicy defaultQuotaPolicy = new QuotaPolicy();\n defaultQuotaPolicy.setType(REQUEST_COUNT_TYPE);\n RequestCountLimit requestCountLimit = new RequestCountLimit(TIME_UNIT_SECONDS, 1000, 10000);\n defaultQuotaPolicy.setLimit(requestCountLimit);\n apiPolicy.setDefaultQuotaPolicy(defaultQuotaPolicy);\n apiPolicy.setPipelines(createDefaultPipelines());\n return apiPolicy;\n }", "public ProbabilityDistribution() {\n\t\trandom_ = new Random();\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}", "AgentPolicy build();", "public MicrosoftGraphStsPolicy() {\n }", "private PerksFactory() {\n\n\t}", "public SampledPolicy() {\r\n super(ExecutablePolicyType.SAMPLED);\r\n }", "public static ApplicationPolicy createDefaultApplicationPolicy() {\n ApplicationPolicy applicationPolicy = new ApplicationPolicy(SAMPLE_APP_POLICY);\n applicationPolicy.setUuid(UUID.randomUUID().toString());\n applicationPolicy.setDisplayName(SAMPLE_APP_POLICY);\n applicationPolicy.setDescription(SAMPLE_APP_POLICY_DESCRIPTION);\n QuotaPolicy defaultQuotaPolicy = new QuotaPolicy();\n defaultQuotaPolicy.setType(REQUEST_COUNT_TYPE);\n RequestCountLimit requestCountLimit = new RequestCountLimit(TIME_UNIT_SECONDS, 10000, 1000);\n defaultQuotaPolicy.setLimit(requestCountLimit);\n applicationPolicy.setDefaultQuotaPolicy(defaultQuotaPolicy);\n return applicationPolicy;\n }", "public NatPolicy createNatPolicy();", "public DistributionPolicyInternal setName(String name) {\n this.name = name;\n return this;\n }", "PolicyController createPolicyController(String name, Properties properties);", "void clearPolicy() {\n policy = new Policy();\n }", "public static CustomPolicy createDefaultCustomPolicy() {\n CustomPolicy customPolicy = new CustomPolicy(SAMPLE_CUSTOM_RULE);\n customPolicy.setKeyTemplate(\"$userId\");\n String siddhiQuery = \"FROM RequestStream SELECT userId, ( userId == '[email protected]' ) AS isEligible , \"\n + \"str:concat('[email protected]','') as throttleKey INSERT INTO EligibilityStream;\"\n + \"FROM EligibilityStream[isEligible==true]#throttler:timeBatch(1 min) SELECT throttleKey, \"\n + \"(count(userId) >= 5 as isThrottled, expiryTimeStamp group by throttleKey INSERT ALL EVENTS into \"\n + \"ResultStream;\";\n\n customPolicy.setSiddhiQuery(siddhiQuery);\n customPolicy.setDescription(\"Sample custom policy\");\n return customPolicy;\n }", "public Policy _get_policy(int policy_type) {\n throw new NO_IMPLEMENT(reason);\n }", "public SplitPolicyGeneralizedHyperplane() {\n }", "public SharedActivationPolicyPermission(String policy) {\n\tthis(policy, init(policy));\n }", "private NaturePackage() {}", "public DefaultSimplePolicyValueTestAbstract() {\n }", "public EditPolicy() {\r\n super();\r\n }", "private PrizePro(Builder builder) {\n super(builder);\n }", "public VersionLockingPolicy() {\r\n super();\r\n storeInCache();\r\n }", "public BinaryAcceptancePolicy() {\n }", "public XmlAdaptedDistributor() {}", "public ClassLoaderDomain createScopedClassLoaderDomain(String name, ParentPolicy parentPolicy)\n {\n return createScopedClassLoaderDomain(name, parentPolicy, getDomain());\n }", "public WhitePagesProtectionServiceImpl(ServiceBroker sb) {\n serviceBroker = sb;\n log = (LoggingService) serviceBroker.getService(this, LoggingService.class, null);\n encryptService = (EncryptionService) serviceBroker.getService(this, EncryptionService.class, null);\n csrv = (CertificateCacheService) serviceBroker.getService(this, CertificateCacheService.class, null);\n keyRingService = (KeyRingService) serviceBroker.getService(this, KeyRingService.class, null);\n policy = new SecureMethodParam();\n if (log.isDebugEnabled()) {\n log.debug(WhitePagesProtectionServiceImpl.NAME + \" instantiated\");\n }\n }", "public static APIPolicy createDefaultAPIPolicyWithBandwidthLimit() {\n BandwidthLimit bandwidthLimit = new BandwidthLimit(TIME_UNIT_MONTH, 1, 1000, PolicyConstants.MB);\n QuotaPolicy defaultQuotaPolicy = new QuotaPolicy();\n defaultQuotaPolicy.setType(PolicyConstants.BANDWIDTH_TYPE);\n defaultQuotaPolicy.setLimit(bandwidthLimit);\n //set default API Policy\n APIPolicy apiPolicy = new APIPolicy(SAMPLE_API_POLICY);\n apiPolicy.setUuid(UUID.randomUUID().toString());\n apiPolicy.setDisplayName(SAMPLE_API_POLICY);\n apiPolicy.setDescription(SAMPLE_API_POLICY_DESCRIPTION);\n apiPolicy.setUserLevel(APIMgtConstants.ThrottlePolicyConstants.API_LEVEL);\n apiPolicy.setDefaultQuotaPolicy(defaultQuotaPolicy);\n return apiPolicy;\n }", "private SharedSecret(String domainName, Certificate creatorCert) {\n super(LENGTH);\n this.init();\n this.setDomainName(domainName);\n this.setCreator(creatorCert);\n }", "private static PDP getPDPNewInstance(){\n\n PDPConfig pdpConfig = balana.getPdpConfig();\n return new PDP(pdpConfig);\n }", "protected PSGroupProviderInstance()\n {\n }", "public Pub build() {\n return new Pub(keyId, algo, keyLen, creationDate, expirationDate, flags);\n }", "protected GrpcScalingPoliciesServiceStub(\n ScalingPoliciesServiceStubSettings settings, ClientContext clientContext) throws IOException {\n this(settings, clientContext, new GrpcScalingPoliciesServiceCallableFactory());\n }", "private ServiceDomains() {\n }", "AgentPolicyBuilder buildUpon(AgentPolicy agentPolicy);", "protected AsymmetricProcessor() {\n\t}", "public ProbabilityDistribution(Random random) {\n\t\trandom_ = random;\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}", "private Instantiation(){}", "Reproducible newInstance();", "public PointDistributer() {\n }", "public TimeBasedRollingPolicy() {\r\n super();\r\n }", "public PolicyDetailsRecord() {\n\t\tsuper(PolicyDetails.POLICY_DETAILS);\n\t}", "public void createASPolicy(){\n\t\t\n\t\t// First create for replicated objects\n\t\t//System.out.println(\"Inside ObjectBasedAnalyzer: createASPolicy\");\n\t\t\n\t\tcreateReplicatedObjectsPolicy();\n\t\t\t\t\n\t\t// Now for rest of objects\n\t\t\n//\t\tcreateOnlyDistributedObjectsPolicy();\n\t\t\n\t\tIterator<String> iap = ASPolicyMap.keySet().iterator();\n\t\t\n\t\tSystem.out.println(\"---------------ASPolicy Start------------------\");\n//\t\t\n\t\twhile(iap.hasNext()){\n//\t\t\t\n//\t\t\t\n\t\t\tString serId = iap.next();\n\t\t\tSystem.out.println(\"AS Policy for:\" + serId);\n\t\t\tmanager.getASServer(serId).currentPolicy = ASPolicyMap.get(serId);\n\t\t\tSystem.out.println(\"No of policy entries for this server are:\" + manager.getASServer(serId).currentPolicy.policyMap.size());\n\t\t}\n//\t\t\n\t\tSystem.out.println(\"---------------ASPolicy End------------------\");\n\t\t\t\t\t\t\n\t}", "public final void rule__Distribution__Group_0__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:6872:1: ( ( ( rule__Distribution__ProbAssignment_0_1 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:6873:1: ( ( rule__Distribution__ProbAssignment_0_1 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:6873:1: ( ( rule__Distribution__ProbAssignment_0_1 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:6874:1: ( rule__Distribution__ProbAssignment_0_1 )\n {\n before(grammarAccess.getDistributionAccess().getProbAssignment_0_1()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:6875:1: ( rule__Distribution__ProbAssignment_0_1 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:6875:2: rule__Distribution__ProbAssignment_0_1\n {\n pushFollow(FOLLOW_rule__Distribution__ProbAssignment_0_1_in_rule__Distribution__Group_0__1__Impl13486);\n rule__Distribution__ProbAssignment_0_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getDistributionAccess().getProbAssignment_0_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-08-13 13:14:15.602 -0400\", hash_original_method = \"4B5496A79468DEC2FA84449A5CCBD295\", hash_generated_method = \"06016682917508DEF780A2C1DA1531D4\")\n \npublic PolicyNode getPolicyTree() {\n return policyTree;\n }", "public Publisher() {\n // This constructor is intentionally empty. Nothing special is needed here.\n }", "private VerifierFactory() {\n }", "public PublishingClientImpl() {\n this.httpClientSupplier = () -> HttpClients.createDefault();\n this.requestBuilder = new PublishingRequestBuilderImpl();\n }", "@Override\n\tpublic ProbabilityDistribution<T> clone() {\n\t\tProbabilityDistribution<T> clone = new ProbabilityDistribution<T>(\n\t\t\t\trandom_);\n\t\tclone.itemProbs_ = new MutableKeyMap<T, Double>(itemProbs_);\n\t\treturn clone;\n\t}", "public DomainKnowledge() {\r\n\t\tthis.construct(3);\r\n\t}", "public ClassLoaderDomain createScopedClassLoaderDomain(String name, ParentPolicy parentPolicy, Loader parent)\n {\n ClassLoaderSystem system = getSystem();\n return system.createAndRegisterDomain(name, parentPolicy, parent);\n }", "public DepreciatingPolicy(float amount, float rate){\r\n super(amount);\r\n this.rate = rate*100;\r\n }", "public static NewPublisherPG newPublisherPG(PublisherPG prototype) {\n return new PublisherPGImpl(prototype);\n }", "public CanaryDistributionProvider.Distribution getDistribution()\n {\n return _distribution;\n }", "public DistributionPolicyInternal setMode(DistributionModeInternal mode) {\n this.mode = mode;\n return this;\n }", "public CertificationFactoryImpl() {\n\t\tsuper();\n\t}", "public LogNormalDistribution(){\n\t\tthis(0, 1);\n\t}", "public PeriodFactoryImpl() {\n\t\tsuper();\n\t}", "protected PolicySourceModel create(final Policy policy) {\n return PolicySourceModel.createPolicySourceModel(policy.getNamespaceVersion(),\n policy.getId(), policy.getName());\n }", "public void addPolicy(Policy policy) throws APIManagementException {\n\n if (policy instanceof APIPolicy) {\n APIPolicy apiPolicy = (APIPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getAPIPolicy(userNameWithoutChange, apiPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Advanced Policy with name \" + apiPolicy.getPolicyName() + \" already exists\");\n }\n apiPolicy.setUserLevel(PolicyConstants.ACROSS_ALL);\n apiPolicy = apiMgtDAO.addAPIPolicy(apiPolicy);\n List<Integer> addedConditionGroupIds = new ArrayList<>();\n for (Pipeline pipeline : apiPolicy.getPipelines()) {\n addedConditionGroupIds.add(pipeline.getId());\n }\n APIPolicyEvent apiPolicyEvent = new APIPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n apiPolicy.getTenantDomain(), apiPolicy.getPolicyId(), apiPolicy.getPolicyName(),\n apiPolicy.getDefaultQuotaPolicy().getType(), addedConditionGroupIds, null);\n APIUtil.sendNotification(apiPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof ApplicationPolicy) {\n ApplicationPolicy appPolicy = (ApplicationPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getApplicationPolicy(userNameWithoutChange, appPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Application Policy with name \" + appPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addApplicationPolicy(appPolicy);\n //policy id is not set. retrieving policy to get the id.\n ApplicationPolicy retrievedPolicy = apiMgtDAO.getApplicationPolicy(appPolicy.getPolicyName(), tenantId);\n ApplicationPolicyEvent applicationPolicyEvent = new ApplicationPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n appPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(), appPolicy.getPolicyName(),\n appPolicy.getDefaultQuotaPolicy().getType());\n APIUtil.sendNotification(applicationPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof SubscriptionPolicy) {\n SubscriptionPolicy subPolicy = (SubscriptionPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getSubscriptionPolicy(userNameWithoutChange, subPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Subscription Policy with name \" + subPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addSubscriptionPolicy(subPolicy);\n String monetizationPlan = subPolicy.getMonetizationPlan();\n Map<String, String> monetizationPlanProperties = subPolicy.getMonetizationPlanProperties();\n if (StringUtils.isNotBlank(monetizationPlan) && MapUtils.isNotEmpty(monetizationPlanProperties)) {\n createMonetizationPlan(subPolicy);\n }\n //policy id is not set. retrieving policy to get the id.\n SubscriptionPolicy retrievedPolicy = apiMgtDAO.getSubscriptionPolicy(subPolicy.getPolicyName(), tenantId);\n SubscriptionPolicyEvent subscriptionPolicyEvent = new SubscriptionPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId, subPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n subPolicy.getPolicyName(), subPolicy.getDefaultQuotaPolicy().getType(),\n subPolicy.getRateLimitCount(),subPolicy.getRateLimitTimeUnit(), subPolicy.isStopOnQuotaReach(),\n subPolicy.getGraphQLMaxDepth(),subPolicy.getGraphQLMaxComplexity(),subPolicy.getSubscriberCount());\n APIUtil.sendNotification(subscriptionPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof GlobalPolicy) {\n GlobalPolicy globalPolicy = (GlobalPolicy) policy;\n\n // checking if policy already exist\n Policy existingPolicy = getGlobalPolicy(globalPolicy.getPolicyName());\n if (existingPolicy != null) {\n throw new APIManagementException(\"Policy name already exists\");\n }\n\n apiMgtDAO.addGlobalPolicy(globalPolicy);\n\n KeyTemplateEvent keyTemplateEvent = new KeyTemplateEvent(UUID.randomUUID().toString(), System.currentTimeMillis(),\n APIConstants.EventType.CUSTOM_POLICY_ADD.name(), tenantId, tenantDomain,\n \"add\", globalPolicy.getKeyTemplate());\n APIUtil.sendNotification(keyTemplateEvent, APIConstants.NotifierType.KEY_TEMPLATE.name());\n\n GlobalPolicy retrievedPolicy = apiMgtDAO.getGlobalPolicy(globalPolicy.getPolicyName());\n GlobalPolicyEvent globalPolicyEvent = new GlobalPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n globalPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n globalPolicy.getPolicyName());\n APIUtil.sendNotification(globalPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else {\n String msg = \"Policy type \" + policy.getClass().getName() + \" is not supported\";\n log.error(msg);\n throw new UnsupportedPolicyTypeException(msg);\n }\n }", "public PolicyServiceDelegate()\n {\n log.debug(\"\") ;\n log.debug(\"----\\\"----\") ;\n log.debug(\"PolicyServiceDelegate()\") ;\n try\n {\n service = getService(CommunityConfig.getServiceUrl());\n }\n catch(Exception e) {\n e.printStackTrace();\n service = null;\n }\n log.debug(\"----\\\"----\") ;\n log.debug(\"\") ;\n }", "protected ProbabilityDistribution getDistribution()\r\n\t{\r\n\t\treturn this.distribution;\r\n\t}", "public PrivacySettingsWeb() {\n\t}", "ClaimSoftgoal createClaimSoftgoal();", "protected Product() {\n\t\t\n\t}", "public Principal() {\r\n\t\tinitialize();\r\n\t}", "@SuppressWarnings({\"UnusedDeclaration\"})\n private ThrottleManager() {\n }", "public void setPolicy(com.vmware.converter.DVSPolicy policy) {\r\n this.policy = policy;\r\n }", "private ReportPluginConstant() {\n\t\t// NO_PMD DUMMY CONSTRUCTOR\n\t}", "private ReportGenerationUtil() {\n\t\t\n\t}", "protected GuiTestObject html_policy_number_holder() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"html_policy_number_holder\"));\n\t}", "private ClassifierUtils() {\n throw new AssertionError();\n }", "public void setScalePolicy(ScalePolicy policy) {\n\n\t}", "protected void setDistribution(ProbabilityDistribution distribution)\r\n\t{\r\n\t\tthis.distribution = distribution;\r\n\t}", "@Override\n\t\tTruerandomness newInstance() {\n\t\t\treturn null;\n\t\t}", "public ProducerPlan()\r\n\t{\r\n\t\tgetLogger().info(\"Created: \"+this);\r\n\t}", "private PowerSubsystem() {\n mPdp = new PowerDistributionPanel(0);\n addChild(\"PowerDistributionPanel\",mPdp);\n }", "public void setDistribution(int distribution) {\n this.distribution = distribution;\n }", "public HypergeometricDistribution(){\n\t\tthis(100, 50, 10);\n\t}", "abstract Truerandomness newInstance();", "P createP();", "private CloudEndpointBuilderHelper() {\n }", "SUP createSUP();", "private SolutionsPackage() {}", "public PolicyIDImpl(String idString) {\n super(idString);\n }", "AlgDistribution getDistribution();", "private MetallicityUtils() {\n\t\t\n\t}", "public Purp() {\n }", "public DozentPublikation(){}", "private DiscretePotentialOperations() {\r\n\t}", "public DefaultPolicyFilter()\n\t{\n\t\tthis.compiler = new StackMachineCompiler();\n\t\tthis.executionEngine = new StackMachine();\n\t}", "private PackageValidator() {}", "public void setPolicy(short policy) {\n\t\t_policy = policy;\n\t}" ]
[ "0.63691205", "0.61218", "0.6042891", "0.5994744", "0.5946503", "0.59229535", "0.58870167", "0.5802249", "0.57846934", "0.57824117", "0.5724974", "0.56969976", "0.56920767", "0.56137955", "0.5594282", "0.5494593", "0.5483833", "0.54561406", "0.54234874", "0.5395504", "0.53269935", "0.5288904", "0.5287889", "0.5281084", "0.5258164", "0.52407664", "0.5232105", "0.5228846", "0.52269113", "0.5202376", "0.5191276", "0.51687545", "0.5135034", "0.5131897", "0.51255137", "0.5115804", "0.50715864", "0.50389564", "0.50298804", "0.50150365", "0.5010208", "0.5009795", "0.49990726", "0.49863717", "0.4979886", "0.49770418", "0.4970127", "0.496395", "0.4956927", "0.4954048", "0.49449724", "0.4937832", "0.49360564", "0.4932168", "0.49293235", "0.49156454", "0.4901031", "0.48967013", "0.48963726", "0.489058", "0.48833713", "0.4875066", "0.4872534", "0.4857096", "0.4850849", "0.48404422", "0.48385796", "0.48382166", "0.48372984", "0.48363784", "0.4833215", "0.48255965", "0.48211005", "0.48190993", "0.4817365", "0.48138303", "0.48128635", "0.48111764", "0.4792918", "0.4783334", "0.47748333", "0.4774165", "0.47730234", "0.47694132", "0.47678563", "0.4767422", "0.47650808", "0.47581944", "0.47536573", "0.47519445", "0.4748941", "0.4746823", "0.47460505", "0.47416732", "0.47354302", "0.47238743", "0.4721587", "0.47207788", "0.47177652", "0.4716169" ]
0.8815513
0
Get the id property: The unique identifier of the policy.
public String getId() { return this.id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getPolicyID(int policy_id) {\n int id = 0;\n try {\n checkPolicyID.setInt(1, policy_id);\n ResultSet resultset = checkPolicyID.executeQuery();\n while (resultset.next()) {\n id = resultset.getInt(\"policy_id\");\n System.out.println(\"Policy ID: \" + id);\n }\n resultset.close();\n }\n catch (SQLException exception) {\n System.out.println(\"Invalid Input!\");\n }\n return id;\n }", "public String id() {\n return getString(FhirPropertyNames.PROPERTY_ID);\n }", "public String id() {\n return getString(FhirPropertyNames.PROPERTY_ID);\n }", "public String id() {\n return getString(FhirPropertyNames.PROPERTY_ID);\n }", "public String id() {\n return getString(FhirPropertyNames.PROPERTY_ID);\n }", "public String id() {\n return getString(FhirPropertyNames.PROPERTY_ID);\n }", "public String id() {\n return getString(FhirPropertyNames.PROPERTY_ID);\n }", "public String id() {\n return getString(FhirPropertyNames.PROPERTY_ID);\n }", "public Integer getId() {\n return id.get();\n }", "public Long getId() {\n return this.id.get();\n }", "public UUID getID() {\r\n if(!getPayload().has(\"id\")) return null;\r\n return UUID.fromString(getPayload().getString(\"id\"));\r\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public final String getId() {\r\n\t\treturn id;\r\n\t}", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public final String getId() {\n return id;\n }", "public final int getId() {\n\t\treturn JsUtils.getNativePropertyInt(this, \"id\");\n\t}", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public final long getId() {\r\n return id;\r\n }", "public Long getId()\n\t{\n\t\treturn (Long) this.getKeyValue(\"id\");\n\n\t}", "public Object getId() {\n return id;\n }", "public Object getId() {\n return id;\n }", "public Long getId () {\r\n\t\treturn id;\r\n\t}", "public final String getIdAttribute() {\n return getAttributeValue(\"id\");\n }", "public Long getId () {\n\t\treturn id;\n\t}", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public Long getId( )\n\t{\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn _id;\n\t}", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "public java.lang.Integer getId() {\n return id;\n }", "public java.lang.Integer getId () {\r\n return id;\r\n }", "public long getId()\n\t{\n\t\treturn id;\n\t}", "public java.lang.Integer getId()\n {\n return id;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }" ]
[ "0.7271499", "0.72667944", "0.72667944", "0.72667944", "0.72667944", "0.72667944", "0.72667944", "0.72667944", "0.6983832", "0.69068503", "0.68691343", "0.6853351", "0.6853351", "0.6853351", "0.6853351", "0.6853351", "0.6853351", "0.6853351", "0.6853351", "0.68461084", "0.6804123", "0.6804123", "0.6804123", "0.6804123", "0.6804123", "0.6804123", "0.6804123", "0.67926955", "0.67816514", "0.67713124", "0.67713124", "0.67713124", "0.67713124", "0.6757649", "0.67507327", "0.6748332", "0.6748222", "0.6748222", "0.6736464", "0.67342764", "0.67328376", "0.673153", "0.673153", "0.673153", "0.673153", "0.673153", "0.673153", "0.673153", "0.673153", "0.673153", "0.673153", "0.673153", "0.673153", "0.673153", "0.673153", "0.673153", "0.673153", "0.673153", "0.673153", "0.673153", "0.6731216", "0.6728725", "0.6726418", "0.6726418", "0.6726418", "0.6726418", "0.6726418", "0.6726418", "0.6726418", "0.6726418", "0.6726418", "0.6726418", "0.6726418", "0.6726418", "0.6726418", "0.6726418", "0.6726418", "0.6726418", "0.6726418", "0.6726418", "0.6726418", "0.6719601", "0.67194486", "0.6714722", "0.67094177", "0.670646", "0.670646", "0.67060745", "0.67060745", "0.67060745", "0.67060745", "0.67060745", "0.67060745", "0.67060745", "0.67060745", "0.67060745", "0.67060745", "0.67060745", "0.67060745", "0.67060745", "0.67060745" ]
0.0
-1
Get the name property: The human readable name of the policy.
public String getName() { return this.name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Attribute(order = 100, validators = { RequiredValueValidator.class })\n\t\tString policyName();", "public String getPolicyName() {\n \t\treturn policyName;\n \t}", "public String getName() {\n return getProperty(Property.NAME);\n }", "public String name() {\n return getString(FhirPropertyNames.PROPERTY_NAME);\n }", "public String getName() {\n return name.get();\n }", "public String getName() {\r\n\t\treturn name.get();\r\n\t}", "public String getName() {\r\n assert name != null;\r\n return name;\r\n }", "public String getName() {\n if(name == null)\n return \"\"; \n return name;\n }", "public static String getName()\n {\n read_if_needed_();\n \n return _get_name;\n }", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "public java.lang.String getNameAsString()\n {\n return getName().toString();\n }", "public String getName() {\n\t\treturn name.toLowerCase();\n\t}", "public String getName() {\n return (String) getValue(NAME);\n }", "public com.commercetools.api.models.common.LocalizedString getName() {\n return this.name;\n }", "public java.lang.String getName() {\n return name;\n }", "@Nonnull\n String getName();", "public java.lang.String getName();", "public java.lang.String getName() {\n return name;\n }", "public final String getName() {\n\treturn name.getName();\n }", "@ApiModelProperty(value = \"The name assigned to the PayID by the owner of the PayID\")\n\n\n public String getName() {\n return name;\n }", "public java.lang.String getName() {\n return name;\n }", "public java.lang.String getName() {\n return name;\n }", "public java.lang.String getName() {\n return name;\n }", "public java.lang.String getName() {\n return name;\n }", "public java.lang.String getName() {\n return name;\n }", "public java.lang.String getName() {\n return name;\n }", "public java.lang.String getName() {\n return name;\n }", "public java.lang.String getName() {\n return name;\n }", "public java.lang.String getName() {\n return name;\n }", "public java.lang.String getName() {\n return name;\n }", "public java.lang.String getName() {\r\n return name;\r\n }", "public java.lang.String getName() {\r\n return name;\r\n }", "public java.lang.String getName() {\r\n return name;\r\n }", "public java.lang.String getName() {\r\n return name;\r\n }", "public java.lang.String getName() {\r\n return name;\r\n }", "public java.lang.String getName() {\r\n return name;\r\n }", "public String getName() {\n\t\treturn (String) get_Value(\"Name\");\n\t}", "public String getName() {\n\t\treturn (String) get_Value(\"Name\");\n\t}", "public String getName() {\n\t\treturn (String) get_Value(\"Name\");\n\t}", "public java.lang.String getName() {\r\n return this._name;\r\n }", "public String getName() {\n return Util.uncapitalize(getCapName());\n }", "public String getName() {\n return (String) mProperties.get(FIELD_NAME);\n }", "public java.lang.String getName() {\n return name;\n }", "public String getName() {\n return name + \"\";\n }", "@Nonnull String getName();", "public java.lang.String getName()\n {\n return name;\n }", "public java.lang.String getName()\n {\n return name;\n }", "public String getName() {\n return this.name().toLowerCase(Locale.US);\n }", "public String getName() {\n return name_;\n }", "public String getName() {\n return name_;\n }" ]
[ "0.7881676", "0.748233", "0.7303265", "0.7152835", "0.714455", "0.71350145", "0.7126133", "0.7114432", "0.7099132", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.70598197", "0.70420927", "0.7009604", "0.70088166", "0.7003816", "0.70031494", "0.70012254", "0.69991755", "0.6994972", "0.6983942", "0.6980166", "0.6980166", "0.6980166", "0.6980166", "0.6980166", "0.6980166", "0.6980166", "0.6980166", "0.6980166", "0.6980166", "0.69575626", "0.69575626", "0.69575626", "0.69575626", "0.69575626", "0.69575626", "0.6956479", "0.6956479", "0.6956479", "0.69490546", "0.694495", "0.69416803", "0.6934573", "0.69333553", "0.6920769", "0.6918988", "0.6918988", "0.6903451", "0.69010967", "0.6900357" ]
0.0
-1
Set the name property: The human readable name of the policy.
public DistributionPolicyInternal setName(String name) { this.name = name; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setName(final java.lang.String name) {\r\n this._name = name;\r\n }", "public void setName(final java.lang.String name) {\n this.name = name;\n }", "public void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(final String name) {\n this.name = name;\n }", "public void setName(final String name) {\n this.name = name;\n }", "public void setName(final String name) {\n this.name = name;\n }", "public void setName(final String name) {\n this.name = name;\n }", "public void setName( final String name )\r\n {\r\n this.name = name;\r\n }", "public void setName(java.lang.String name) {\n this.name = name;\n }", "public void setName(final String name) {\n this.name = name;\n }", "public void setName(final String name) {\n this.name = name;\n }", "public void setName(String name) {\r\n this._name = name;\r\n }", "public void setName (java.lang.String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(java.lang.String name) {\n this.name = name;\n }", "public void setName(java.lang.String name) {\n this.name = name;\n }", "public void setName(java.lang.String name) {\n this.name = name;\n }", "public void setName(java.lang.String name) {\n this.name = name;\n }", "public void setName(java.lang.String name) {\n this.name = name;\n }", "public void setName(java.lang.String name) {\n this.name = name;\n }", "public void setName(java.lang.String name) {\n this.name = name;\n }", "public void setName(java.lang.String name) {\n this.name = name;\n }", "public void setName(java.lang.String name) {\n this.name = name;\n }", "public void setName(java.lang.String name) {\n this.name = name;\n }", "public void setName(java.lang.String _name)\n {\n name = _name;\n }", "public void setName(java.lang.String _name)\n {\n name = _name;\n }", "public void setName(java.lang.String name) {\r\n this.name = name;\r\n }", "public void setName(java.lang.String name) {\r\n this.name = name;\r\n }", "public void setName(java.lang.String name) {\r\n this.name = name;\r\n }", "public void setName(java.lang.String name) {\r\n this.name = name;\r\n }", "public void setName(java.lang.String name) {\r\n this.name = name;\r\n }", "public void setName(final String name) {\n\t\tthis.name = name;\n\t}", "public void setName(final String name) {\n\t\tthis.name = name;\n\t}", "public void setName(final String name) {\n\t\tthis.name = name;\n\t}", "public void setName(final String name) {\n\t\tthis.name = name;\n\t}", "public void setName( final String name )\n\t{\n\t\tthis.name = name;\n\t}", "public void setName (String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\n if (!name.isEmpty()) {\n this.name = name;\n }\n }", "public void setName (java.lang.String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\r\r\n\t\tthis.name = name;\r\r\n\t}", "public void setName(String _name) {\n this._name = _name;\n }", "public void setName (java.lang.String _name) {\n\t\tthis._name = _name;\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\t_name = name;\r\n\t}", "public void setName (String name) {\n this.name = name;\n }", "public void setName (String name) {\n this.name = name;\n }", "public void setName (String name) {\n this.name = name;\n }", "@Override\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\n\t}", "public void setName(String name)\r\n\t{\t\t\r\n\t\tthis.name = name;\r\n\t}", "public final void setName(String name) {\n\t\tthis.name = name;\n\t}", "@Override\r\n\tpublic void setName(String name) {\n\t\tthis.name = name;\r\n\t}", "@Override\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name)\n {\n this.name = name;\n }", "public void setName (String name) {\n this.name = name;\n }", "public void setName( String name )\n {\n this.name = name;\n }", "public void setName( String name )\n {\n this.name = name;\n }", "public void setName( String name ) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String _name)\r\n\t{\r\n\t\tthis._name=_name;\r\n\t}", "public void setName(String name) {\t\t\r\n\t\tthis.name = name;\t\t\r\n\t}", "public void setName(String name) {\n\t this.name = name;\n\t }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "@Override\n public void setName(String name)\n {\n checkState();\n this.name = name;\n }", "public void setName(String name) {\n \tif (name==null)\n \t\tthis.name = \"\";\n \telse\n \t\tthis.name = name;\n\t}", "public void setName(String name) {\r\n \t\tthis.name = name;\r\n \t}" ]
[ "0.74157476", "0.73988545", "0.7342969", "0.7342969", "0.7339894", "0.7339894", "0.7339894", "0.7339894", "0.7329436", "0.7312873", "0.7307293", "0.7307293", "0.7305418", "0.7303779", "0.72958434", "0.72958434", "0.72958434", "0.72958434", "0.72958434", "0.72958434", "0.72958434", "0.72958434", "0.72958434", "0.72958434", "0.7286349", "0.7286349", "0.7276935", "0.7276935", "0.7276935", "0.7276935", "0.7276935", "0.7271584", "0.7271584", "0.7271584", "0.7271584", "0.7269289", "0.72677153", "0.72469205", "0.72327906", "0.7219538", "0.7215217", "0.72132033", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7209134", "0.7207217", "0.720488", "0.720488", "0.720488", "0.7189841", "0.7185187", "0.71848786", "0.7184576", "0.71826786", "0.71811444", "0.7176331", "0.7173677", "0.7173677", "0.71728516", "0.7170543", "0.7170543", "0.7170543", "0.7170543", "0.7165362", "0.7163726", "0.71617556", "0.71586496", "0.71586496", "0.71586496", "0.71581244", "0.71566725", "0.7156465" ]
0.7508567
0
Get the offerExpiresAfterSeconds property: The number of seconds after which any offers created under this policy will be expired.
public Double getOfferExpiresAfterSeconds() { return this.offerExpiresAfterSeconds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DistributionPolicyInternal setOfferExpiresAfterSeconds(Double offerExpiresAfterSeconds) {\n this.offerExpiresAfterSeconds = offerExpiresAfterSeconds;\n return this;\n }", "public final int getExpiresAfter() {\n return 0;\n }", "public int getExpiryTimeSecs() {\n return expiryTimeSecs_;\n }", "public int getExpiryTimeSecs() {\n return expiryTimeSecs_;\n }", "int getExpiryTimeSecs();", "public long getExpiresIn() {\n return expiresIn;\n }", "@Nullable\n public Long getExpiresIn() {\n return expiresIn;\n }", "public long getExpires() {\n return expires;\n }", "@ApiModelProperty(value = \"The number of seconds until this request can no longer be answered.\")\n public BigDecimal getExpiresIn() {\n return expiresIn;\n }", "public Long getExpires_in() {\r\n\t\treturn expires_in;\r\n\t}", "@java.lang.Override\n public long getExpires() {\n return expires_;\n }", "@java.lang.Override\n public long getExpires() {\n return instance.getExpires();\n }", "@ApiModelProperty(required = false, value = \"epoch timestamp in milliseconds\")\n public Long getExpires() {\n return expires;\n }", "public int getExpiryTime() {\n return expiryTime;\n }", "public long getExpiry() {\n return this.expiry;\n }", "public int getExpiryDelay()\n {\n return m_cExpiryDelay;\n }", "public Date getExpires() {\r\n return expiresDate;\r\n }", "public String getExpiresString() {\n return expiresString;\n }", "long getExpiration();", "@Nullable\n public Date getExpiresAt() {\n return expiresAt;\n }", "long getExpiryTime() {\n return expiryTime;\n }", "public int getExpiry()\n {\n return expiry;\n }", "public int getExpiry();", "long getExpires();", "public Integer getExpiry() {\n return expiry;\n }", "public long getExpiry() {\n return this.contextSet.getExpiration();\n }", "public long getExpiration() {\n return expiration;\n }", "public long getCacheExpirationSeconds() {\n return cache.getCacheExpirationSeconds();\n }", "public DateTime expiryTime() {\n return this.expiryTime;\n }", "@ApiModelProperty(value = \"The lifetime in seconds of the access token\")\n public String getExpiresIn() {\n return expiresIn;\n }", "private int getCookieMaxAge(Date now, Date exp) {\n if (!browserSessionOnly) {\n return new Long((exp.getTime() - now.getTime()) / 1000L).intValue();\n } else {\n return -1;\n }\n }", "long getExpirationDate();", "public SIPDateOrDeltaSeconds getExpiryDate() {\n return expiryDate ;\n }", "public int getTimeoutInSeconds() {\n return timeoutInSeconds;\n }", "int getExpireTimeout();", "String getExpiry();", "public long getExpires()\r\n/* 229: */ {\r\n/* 230:347 */ return getFirstDate(\"Expires\");\r\n/* 231: */ }", "public OffsetDateTime expiration() {\n return this.innerProperties() == null ? null : this.innerProperties().expiration();\n }", "public String getExpiration() {\n return this.expiration;\n }", "public long getExpiryMillis()\n {\n return m_dtExpiry;\n }", "@Override\n public final double getExpiration() {\n return safetyHelper.getExpiration();\n }", "String getSpecifiedExpiry();", "public long getExpirationTime()\n {\n return this.m_eventExpirationTime;\n }", "public long getExpirationDate() {\n return expirationDate_;\n }", "public long getExpirationDate() {\n return expirationDate_;\n }", "@java.lang.Override\n public boolean hasExpires() {\n return instance.hasExpires();\n }", "public Date getExpiryDate() {\n return expiryDate;\n }", "public long getExpiryTime()\n {\n return m_metaInf.getExpiryTime();\n }", "public static void setExpiresSeconds(@NotNull HttpServletResponse response, int seconds) {\n Date expiresDate = DateUtils.addSeconds(new Date(), seconds);\n setExpires(response, expiresDate);\n }", "public int getCookieKeepExpire() {\n return cookieKeepExpire;\n }", "public javax.sip.header.ExpiresHeader getExpires() {\n return (ExpiresHeader)\n getHeader(ExpiresHeader.NAME);\n \n }", "public String getExpired() {\n return (String) getAttributeInternal(EXPIRED);\n }", "public Date getExpiryDate()\n {\n return expiryDate;\n }", "public Integer timeoutSeconds() {\n return this.timeoutSeconds;\n }", "public long getScheduleToCloseTimeoutSeconds() {\n return scheduleToCloseTimeoutSeconds;\n }", "public int getSignedUrlDuration();", "public Builder setExpires(long value) {\n copyOnWrite();\n instance.setExpires(value);\n return this;\n }", "public Date getExpirationTime() {\n return expirationTime;\n }", "public Integer getAccessTokenValiditySeconds() {\n return accessTokenValiditySeconds;\n }", "public long getTokenValidityInSecondsForRememberMe() {\n return tokenValidityInSecondsForRememberMe;\n }", "public long getResponseTimeSec() {\n return responseTimeSec_;\n }", "public String getExpiryDate() {\n return this.expiryDate;\n }", "public long getResponseTimeSec() {\n return responseTimeSec_;\n }", "public Optional<Integer> maxLeaseTtlSeconds() {\n return Codegen.integerProp(\"maxLeaseTtlSeconds\").config(config).env(\"TERRAFORM_VAULT_MAX_TTL\").def(1200).get();\n }", "OffsetDateTime expirationTimeIfNotActivatedUtc();", "public int getSessionExpireRate();", "public java.util.Calendar getExpiryDate() {\r\n return expiryDate;\r\n }", "public Long getExpireTime() {\n\t\treturn expireTime;\n\t}", "boolean hasExpiryTimeSecs();", "public void setExpires(long expires)\r\n/* 224: */ {\r\n/* 225:338 */ setDate(\"Expires\", expires);\r\n/* 226: */ }", "public Date getAudioVideoEndTime() {\n return (Date)getAttributeInternal(AUDIOVIDEOENDTIME);\n }", "public Date getExpirationDate() {\r\n return expirationDate;\r\n }", "public long cacheStopTimeout() {\n return cacheStopTimeout;\n }", "boolean hasExpires();", "public String getPoaAgreementExpiry() {\n\t\treturn poaAgreementExpiry;\n\t}", "private void setExpires(long value) {\n bitField0_ |= 0x00000004;\n expires_ = value;\n }", "public int getContainerTokenExpiryInterval() {\n return containerTokenExpiryInterval;\n }", "public Builder setExpiryTimeSecs(int value) {\n bitField0_ |= 0x00000008;\n expiryTimeSecs_ = value;\n onChanged();\n return this;\n }", "long getVoteFinalizeDelaySeconds();", "public Date getExpirationDate() {\n return expirationDate;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getExpirationDate();", "public int getAlertMessageTimeRemaining()\n {\n return this.alert_message_time_remaining;\n }", "public Long getMaxAgeSeconds(Auth arg0) {\n\t\treturn null;\n\t}", "@Range(min = 0)\n\t@NotNull\n\tpublic Integer getExpiration() {\n\t\treturn this.expiration;\n\t}", "public long getRemainingTime() {\n if (isPaused()) {\n return pausedPoint;\n }\n long res = (long) ((spedEndTime - SystemClock.elapsedRealtime()) * speed);\n return res > 0 ? res : 0;\n }", "public double getSecondsEnd() {\n return secondsEnd;\n }", "public Timestamp getExpirationDate() {\n return expirationDate;\n }", "public Calendar getExpires() {\n Calendar calendar = null;\n if (this.expires != null) {\n calendar = (Calendar)this.expires.clone();\n }\n return calendar;\n }", "@NonNull\n public String getPayoutTime() {\n return payoutTime;\n }", "public Integer getRefreshTokenValiditySeconds() {\n return refreshTokenValiditySeconds;\n }", "public String getExpirationDate() { return date; }", "public long getRemainingDuration() {\n\t\treturn 0;\n\t}", "public String getExpirationDate() {\r\n\t\treturn expirationDate;\r\n\t}", "public java.util.Date getExpireTime() {\r\n return expireTime;\r\n }", "public Calendar getMessageExpiry() {\n\n // Check if the message expiry has been defined\n if (this.messageHeader.isSetMsgExpiry()) {\n return this.messageHeader.getMsgExpiry();\n }\n\n return null;\n }", "public int getPortalCooldown ( ) {\n\t\treturn extract ( handle -> handle.getPortalCooldown ( ) );\n\t}", "public Integer delayExistingRevokeInHours() {\n return this.delayExistingRevokeInHours;\n }", "public String getTimeToLiveSeconds() {\n return timeToLiveSeconds+\"\";\n }", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }" ]
[ "0.80030423", "0.6980059", "0.66788596", "0.6672696", "0.64136356", "0.6271946", "0.62047327", "0.6120801", "0.60864776", "0.6057501", "0.59772843", "0.59178764", "0.59139824", "0.5810313", "0.57698494", "0.5765354", "0.57623786", "0.56798685", "0.5677895", "0.5664167", "0.5661488", "0.5646561", "0.56058353", "0.55832314", "0.558282", "0.5541594", "0.5537106", "0.5453628", "0.54531634", "0.53460544", "0.5325372", "0.5291311", "0.5281335", "0.52576834", "0.5225832", "0.5184146", "0.5178852", "0.51692826", "0.5151643", "0.5119548", "0.5106574", "0.50900435", "0.5059833", "0.50556684", "0.5050572", "0.5037596", "0.50358856", "0.5025505", "0.498243", "0.4982246", "0.49590668", "0.4956396", "0.49458018", "0.49409312", "0.4940624", "0.49272272", "0.49244702", "0.492149", "0.49047244", "0.4903683", "0.48986042", "0.48951182", "0.4887629", "0.48848292", "0.48824608", "0.4876756", "0.48762274", "0.4867938", "0.4863326", "0.48531678", "0.48453015", "0.48427808", "0.4841195", "0.48393232", "0.4838892", "0.48296213", "0.48219472", "0.48203924", "0.48128757", "0.48043624", "0.48043624", "0.4804324", "0.47959825", "0.4791627", "0.47793853", "0.47747162", "0.47745344", "0.47679102", "0.4762513", "0.4741595", "0.47310236", "0.47261736", "0.47258842", "0.47225592", "0.4720586", "0.47203368", "0.47201332", "0.47174573", "0.4710472", "0.47012243" ]
0.86167234
0
Set the offerExpiresAfterSeconds property: The number of seconds after which any offers created under this policy will be expired.
public DistributionPolicyInternal setOfferExpiresAfterSeconds(Double offerExpiresAfterSeconds) { this.offerExpiresAfterSeconds = offerExpiresAfterSeconds; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Double getOfferExpiresAfterSeconds() {\n return this.offerExpiresAfterSeconds;\n }", "public static void setExpiresSeconds(@NotNull HttpServletResponse response, int seconds) {\n Date expiresDate = DateUtils.addSeconds(new Date(), seconds);\n setExpires(response, expiresDate);\n }", "public void setExpires(long expires)\r\n/* 224: */ {\r\n/* 225:338 */ setDate(\"Expires\", expires);\r\n/* 226: */ }", "public final int getExpiresAfter() {\n return 0;\n }", "private void setExpires(long value) {\n bitField0_ |= 0x00000004;\n expires_ = value;\n }", "public Builder setExpires(long value) {\n copyOnWrite();\n instance.setExpires(value);\n return this;\n }", "public Builder setExpiryTimeSecs(int value) {\n bitField0_ |= 0x00000008;\n expiryTimeSecs_ = value;\n onChanged();\n return this;\n }", "public void setExpiry(int expiry)\n {\n this.expiry = expiry;\n }", "@Override\n public void setExpiration( Date arg0)\n {\n \n }", "public int getExpiryTimeSecs() {\n return expiryTimeSecs_;\n }", "public int getExpiryTimeSecs() {\n return expiryTimeSecs_;\n }", "public void setExpiryDate(SIPDateOrDeltaSeconds e) {\n expiryDate = e ;\n }", "public void setExpirationDate(java.util.Date value);", "private void clearExpires() {\n bitField0_ = (bitField0_ & ~0x00000004);\n expires_ = 0L;\n }", "public void setExpiryTime(long expiryTime) {\n this.expiryTime = expiryTime;\n }", "void setVoteFinalizeDelaySeconds(long voteFinalizeDelaySeconds);", "@ApiModelProperty(required = false, value = \"epoch timestamp in milliseconds\")\n public Long getExpires() {\n return expires;\n }", "public void setExpireAfterWrite(Duration expireAfterWrite) {\n this.expireAfterWrite = expireAfterWrite;\n }", "@Override\n public final void setExpiration(double expirationTime) {\n safetyHelper.setExpiration(expirationTime);\n }", "public void setExpiryDate(Date expiryDate) {\n this.expiryDate = expiryDate;\n }", "public static void setExpires(@NotNull HttpServletResponse response, @Nullable Date date) {\n if (date == null) {\n response.setHeader(HEADER_EXPIRES, \"-1\");\n }\n else {\n response.setHeader(HEADER_EXPIRES, formatDate(date));\n }\n }", "@NotNull public Builder offers(@NotNull Offer offer) {\n putValue(\"offers\", offer);\n return this;\n }", "public Builder clearExpiryTimeSecs() {\n bitField0_ = (bitField0_ & ~0x00000008);\n expiryTimeSecs_ = 0;\n onChanged();\n return this;\n }", "public long getExpires() {\n return expires;\n }", "public long getExpiresIn() {\n return expiresIn;\n }", "@ApiModelProperty(value = \"The number of seconds until this request can no longer be answered.\")\n public BigDecimal getExpiresIn() {\n return expiresIn;\n }", "@Nullable\n public Long getExpiresIn() {\n return expiresIn;\n }", "int getExpiryTimeSecs();", "public void setExpiredSessions(long expiredSessions);", "public static void setExpiresDays(@NotNull HttpServletResponse response, int days) {\n Date expiresDate = DateUtils.addDays(new Date(), days);\n setExpires(response, expiresDate);\n }", "public Date getExpires() {\r\n return expiresDate;\r\n }", "public void setExpirationDate(Date expirationDate) {\r\n this.expirationDate = expirationDate;\r\n }", "public void setExpired(String value) {\n setAttributeInternal(EXPIRED, value);\n }", "void setExpiredDate(Date expiredDate);", "@java.lang.Override\n public long getExpires() {\n return expires_;\n }", "@NotNull public Builder offers(@NotNull Offer.Builder offer) {\n putValue(\"offers\", offer.build());\n return this;\n }", "@Nullable\n public Date getExpiresAt() {\n return expiresAt;\n }", "public void setExpirationDate(Date expirationDate) {\n this.expirationDate = expirationDate;\n }", "synchronized void setExpiration(long newExpiration) {\n \texpiration = newExpiration;\n }", "public void setExpiryDelay(int cMillis)\n {\n m_cExpiryDelay = Math.max(cMillis, 0);\n }", "public void setExpireTime(String ExpireTime) {\n this.ExpireTime = ExpireTime;\n }", "public Builder clearExpires() {\n copyOnWrite();\n instance.clearExpires();\n return this;\n }", "public String getExpiresString() {\n return expiresString;\n }", "public void setNewFittedOffer(Offer offer){ \r\n\t\t//System.out.println(\"previous offer list size= \"+ this.FittedOffers.size());\r\n\t\tthis.FittedOffers.add(offer);\r\n\t\t//System.out.println(\"current offer list size= \"+ this.FittedOffers.size());\r\n\t}", "@Override\n\tpublic void setTokenExpiryTime(long arg0) {\n\t\t\n\t}", "@Autowired\n\tpublic void setExpiry(@Value(\"${repair.expiry}\") Duration expiry) {\n\t\tthis.expiry = DurationConverter.oneOrMore(expiry);\n\t}", "public void setExpiration(long expiration) {\n this.expiration = expiration;\n }", "public void setCookieKeepExpire(int value) {\n this.cookieKeepExpire = value;\n }", "long getExpires();", "public void setExpirationTime(Date expirationTime) {\n this.expirationTime = expirationTime;\n }", "public final void setExpiryTime(long expire) {\n\t\tm_tmo = expire;\n\t}", "public void setExpireMinutes (int expireMinutes)\n\t{\n\t\tif (expireMinutes > 0)\n\t\t{\n\t\t\tm_expire = expireMinutes;\n\t\t\tlong addMS = 60000L * m_expire;\n\t\t\tm_timeExp = System.currentTimeMillis() + addMS;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_expire = 0;\n\t\t\tm_timeExp = 0;\n\t\t}\n\t}", "public Long getExpires_in() {\r\n\t\treturn expires_in;\r\n\t}", "public void setCacheExpirationSeconds(long cacheExpirationSeconds) {\n cache.setCacheExpirationSeconds(cacheExpirationSeconds);\n }", "public void set(String key, Object obj, Date expires) {\n \t\tthis.set(null, key, obj, expires);\n \t}", "public void setExpirationDate(Timestamp aExpirationDate) {\n expirationDate = aExpirationDate;\n }", "public void setExpirationDate(java.util.Date expirationDate) {\n this.expirationDate = expirationDate;\n }", "@java.lang.Override\n public long getExpires() {\n return instance.getExpires();\n }", "public static void setExpiresHours(@NotNull HttpServletResponse response, int hours) {\n Date expiresDate = DateUtils.addHours(new Date(), hours);\n setExpires(response, expiresDate);\n }", "Update withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);", "public void setAudioVideoEndTime(Date value) {\n setAttributeInternal(AUDIOVIDEOENDTIME, value);\n }", "void setExpired(boolean expired);", "AgentPolicyBuilder setMaxCacheAgeMs(long maxCacheAgeMs);", "public void setExpiryDate(java.util.Calendar expiryDate) {\r\n this.expiryDate = expiryDate;\r\n }", "protected abstract void _set(String key, Object obj, Date expires);", "public Builder setExpirationDate(long value) {\n bitField0_ |= 0x00000200;\n expirationDate_ = value;\n\n return this;\n }", "public void setExpiryDestination(ObjectName destination);", "public final void setexpiry_date(String expiry_date)\n\t{\n\t\tsetexpiry_date(getContext(), expiry_date);\n\t}", "public void setExpirationDate(Date expirationDate) {\n\t\tthis.expirationDate = expirationDate;\n\t}", "public void setExpirationDate(Date expirationDate) {\n\t\tthis.expirationDate = expirationDate;\n\t}", "@java.lang.Override\n public boolean hasExpires() {\n return instance.hasExpires();\n }", "protected void setTokenExpirationTime(MendeleyOAuthToken token,\r\n\t\t\tSortedSet<String> responseParameters) {\r\n\t\tif (responseParameters != null && !responseParameters.isEmpty()) {\r\n\t\t\tCalendar calendar = Calendar.getInstance();\r\n\t\t\tint secondsToLive = Integer.valueOf(responseParameters.first());\r\n\t\t\tcalendar.add(Calendar.SECOND, secondsToLive);\r\n\t\t\ttoken.setExpirationTime(calendar.getTime());\r\n\t\t}\r\n\t}", "public void setTimeToLiveSeconds(String timeToLiveSeconds) {\n try {\n setTimeToLiveSeconds(Integer.parseInt(timeToLiveSeconds));\n }\n catch (Exception exception) {\n System.out.println(\"AuthStorageSession.setTimeToLiveSeconds: \"+exception);\n setTimeToLiveSeconds(-1);\n }\n }", "long getExpiration();", "public void setDateExpiry( Timestamp tDateExpiry )\r\n {\r\n _tDateExpiry = tDateExpiry;\r\n }", "@SuppressWarnings(\"unused\")\n void expire();", "public Builder setExpirationDate(long value) {\n\n expirationDate_ = value;\n bitField0_ |= 0x00000020;\n onChanged();\n return this;\n }", "public final void setRetentionExpiryDateTime(long expires) {\n\t m_retainUntil = expires;\n\t}", "void set(K key, V value, LocalDateTime expiresAt) throws CapacityExceededException;", "public void setExpireBefore(Duration expireBefore)\n {\n this.expireBefore = expireBefore;\n }", "public void setExpireTime(java.util.Date expireTime) {\r\n this.expireTime = expireTime;\r\n }", "public CloudfrontUrlBuilder expireAt(Date date)\n {\n expireDate.instant = date;\n\n return this;\n }", "public void setExpireDate(Date expireDate) {\n this.expireDate = expireDate;\n }", "public void setExpireDate(Date expireDate) {\n this.expireDate = expireDate;\n }", "public void setExpireDate(Date expireDate) {\n this.expireDate = expireDate;\n }", "public void setExpireDate(Date expireDate) {\n this.expireDate = expireDate;\n }", "boolean hasExpires();", "public void setMaxMessageAgeSeconds(int maxMessageAgeSeconds) {\n\t\tif (maxMessageAgeSeconds >= 0) {\n\t\t\tthis.maxMessageAgeSeconds = maxMessageAgeSeconds;\n\t\t}\n\t}", "public void setExpiryTime(long expiryTime) // Override this method to use intrinsic level-specific expiry times\n {\n super.setExpiryTime(expiryTime);\n\n if (expiryTime > 0)\n this.levels.setExpiryTime(expiryTime); // remove this in sub-class to use level-specific expiry times\n }", "public void setExpirationDate(String expirationDate) {\r\n\t\tthis.expirationDate = expirationDate;\r\n\t}", "private void setExpiresDate(Date date, long offset)\n {\n date.setTime(System.currentTimeMillis() + offset);\n }", "public void setExpirationDate(java.util.Calendar expirationDate) {\n this.expirationDate = expirationDate;\n }", "public int getExpiryTime() {\n return expiryTime;\n }", "public int getExpiry();", "OffsetDateTime expirationTimeIfNotActivatedUtc();", "public int getExpiry()\n {\n return expiry;\n }", "public void setExpiryTime(java.util.Calendar param){\n localExpiryTimeTracker = true;\n \n this.localExpiryTime=param;\n \n\n }", "long getExpirationDate();", "@java.lang.Override\n public boolean hasExpires() {\n return ((bitField0_ & 0x00000004) != 0);\n }", "long getExpiryTime() {\n return expiryTime;\n }" ]
[ "0.71713877", "0.6351325", "0.60674906", "0.605106", "0.5864672", "0.55565274", "0.5414968", "0.52419186", "0.52225435", "0.52208096", "0.5213387", "0.51931673", "0.5129307", "0.50833464", "0.50634843", "0.5062021", "0.5041978", "0.50303346", "0.5022525", "0.5004959", "0.4995515", "0.49654496", "0.4962171", "0.49576384", "0.4957342", "0.4931408", "0.4894406", "0.4872003", "0.48672414", "0.4864269", "0.48471287", "0.4843075", "0.4830763", "0.48295903", "0.48276767", "0.4818859", "0.47846842", "0.47749996", "0.47674796", "0.47622785", "0.47612098", "0.47312722", "0.47277007", "0.47239012", "0.4702337", "0.46942675", "0.4688169", "0.46868217", "0.46624008", "0.4657412", "0.46522987", "0.46463522", "0.46348548", "0.46294802", "0.46174076", "0.46125865", "0.4606909", "0.4600854", "0.4586626", "0.4573462", "0.45612362", "0.45359823", "0.4532541", "0.45292383", "0.45256758", "0.45220247", "0.45194766", "0.4518931", "0.451864", "0.451864", "0.45136243", "0.4499018", "0.44948003", "0.449021", "0.44684982", "0.44580677", "0.44546646", "0.44435295", "0.4436553", "0.44315624", "0.44055796", "0.44029814", "0.43970215", "0.43970215", "0.43970215", "0.43970215", "0.4387944", "0.4359753", "0.4355085", "0.43548694", "0.434118", "0.43185923", "0.43040857", "0.42984843", "0.42937374", "0.42590314", "0.42564452", "0.4253864", "0.4248959", "0.42444438" ]
0.86710566
0
Get the mode property: Abstract base class for defining a distribution mode.
public DistributionModeInternal getMode() { return this.mode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getMode()\n {\n return mode;\n }", "public String getMode() {\n return mode;\n }", "public String getMode() {\n return mode;\n }", "public String getMode(){\r\n\t\treturn mode;\r\n\t}", "public Mode getMode() {\n return mode;\n }", "public String getMode() {\n\n return mode;\n\n }", "@Override\n\tpublic String getMode() {\n\t\treturn this.mode;\n\t}", "public Mode getMode();", "public String getMode()\n {\n return mode.toString();\n }", "public int getMode() {\n return mode;\n }", "public int getMode() {\n return this.mode;\n }", "public abstract int getMode();", "java.lang.String getMode();", "public int getMode() {\n\t\treturn this.mode;\n\t}", "public PropertyMode getMode() {\n\t\treturn mode;\n\t}", "public final Modes getMode() {\n return mode;\n }", "public int getMode()\r\n {\r\n Bundle b = getArguments();\r\n return b.getInt(PARAM_MODE);\r\n }", "public int value() { return mode; }", "public int getModeValue(){\r\n\t\treturn modeValue;\r\n\t}", "public String getModeName() {\n return modeName;\n }", "public short getMode() {\n\t\treturn mMode;\n\t}", "public Integer getModeId() {\n return modeId;\n }", "public boolean getMode() {\n\t\t\treturn this.mode;\n\t\t}", "public final EnumModesBase getMode() {\r\n\t\treturn this.mode;\r\n\t}", "public int getMode() {\n\t\treturn currentMode;\n\t}", "@JsonProperty(\"mode\")\n public String getMode() {\n return mode;\n }", "public String getMode() {\n\t\treturn (String) getStateHelper().eval(OutputSourceCodePropertyKeys.mode, null);\n\t}", "public String getMode() {\n if (_avTable.get(ATTR_MODE) == null\n || _avTable.get(ATTR_MODE).equals(\"\")) {\n _avTable.noNotifySet(ATTR_MODE, \"ssb\", 0);\n }\n\n return _avTable.get(ATTR_MODE);\n }", "@Accessor(qualifier = \"mode\", type = Accessor.Type.GETTER)\n\tpublic ImpExValidationModeEnum getMode()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(MODE);\n\t}", "@Override\r\n\tpublic String getModeName()\r\n\t{\r\n\t\treturn MODE_NAME;\r\n\t}", "public final String getModeEntity() {\n\t\treturn modeEntity;\n\t}", "public IoMode getMode() {\r\n\t\treturn this.mode;\r\n\t}", "public int getResourceMode()\r\n {\r\n return getSemanticObject().getIntProperty(swb_resourceMode);\r\n }", "public T mode();", "public com.google.protobuf.ByteString\n getModeBytes() {\n java.lang.Object ref = mode_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n mode_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public boolean isMode() {\n return mode;\n }", "public Mode getMode() {\n\t\tPointer mode_ptr = binding_tv.get_type_mode(ptr);\n\t\tif (mode_ptr == null)\n\t\t\treturn null;\n\t\treturn new Mode(mode_ptr);\n\t}", "public com.google.protobuf.ByteString\n getModeBytes() {\n java.lang.Object ref = mode_;\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 mode_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public BlendMode getMode() {\n return mMode;\n }", "private static String mode() {\n return System.getProperty(SYSTEM_PROPERTY_NAME, System.getenv(ENV_VARIABLE_NAME));\n }", "int getOperatingMode();", "public static String getDicomExportMode() {\n\t\tif (xml == null) return \"auto\";\n\t\tif (dicomExportMode == null) return \"auto\";\n\t\tif (dicomExportMode.equals(\"QC\")) return \"QC\";\n\t\treturn \"auto\";\n\t}", "public TriggerType getMode() {\n return mode;\n }", "public int getScreenModeValue() {\n return screenMode_;\n }", "public java.lang.String getMode() {\n java.lang.Object ref = mode_;\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 mode_ = s;\n }\n return s;\n }\n }", "public int getScreenModeValue() {\n return screenMode_;\n }", "public CamMode getCamMode() {\n NetworkTableEntry camMode = m_table.getEntry(\"camMode\");\n double cam = camMode.getDouble(0.0);\n CamMode mode = CamMode.getByValue(cam);\n return mode;\n }", "public int getMode()\r\n { \r\n return this.mode; // used at the beginning to check if the game has started yet\r\n }", "public java.lang.String getMode() {\n java.lang.Object ref = mode_;\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 mode_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public void setMode(String mode) {\n this.mode = mode;\n }", "public DistributionPolicyInternal setMode(DistributionModeInternal mode) {\n this.mode = mode;\n return this;\n }", "String getOperatingModeName();", "public void setMode(int mode) {\n this.mode = mode;\n }", "public String getCompMode ()\n {\n return compMode;\n }", "public java.lang.String getModele() {\n return modele;\n }", "public String getGameMode() {\n return gameMode;\n }", "public void setMode(int mode) {\r\n\t\tthis.mode = mode;\r\n\t}", "public UI_MODE mode() { \n if (filter_rbmi.isSelected()) return UI_MODE.FILTER;\n else if (edgelens_rbmi.isSelected()) return UI_MODE.EDGELENS;\n else if (timeline_rbmi.isSelected()) return UI_MODE.TIMELINE;\n else return UI_MODE.EDIT;\n }", "public void setMode(String mode){\n\t\tthis.mode=mode;\n\t}", "@ZAttr(id=46)\n public ZAttrProvisioning.GalMode getGalMode() {\n try { String v = getAttr(Provisioning.A_zimbraGalMode); return v == null ? null : ZAttrProvisioning.GalMode.fromString(v); } catch(com.zimbra.common.service.ServiceException e) { return null; }\n }", "private String getMode(Resource renderletDef) {\n\t\tIterator<Triple> renderletModeIter = configGraph.filter(\n\t\t\t\t(NonLiteral) renderletDef, TYPERENDERING.renderingMode, null);\n\t\tif (renderletModeIter.hasNext()) {\n\t\t\tTypedLiteral renderletMode = (TypedLiteral) renderletModeIter.next().getObject();\n\t\t\treturn LiteralFactory.getInstance().createObject(String.class,\n\t\t\t\t\trenderletMode);\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic long getModeParameter() {\n\t\treturn 0;\n\t}", "public String getWmode() {\n\t\tif (null != this.wmode) {\n\t\t\treturn this.wmode;\n\t\t}\n\t\tValueExpression _ve = getValueExpression(\"wmode\");\n\t\tif (_ve != null) {\n\t\t\treturn (String) _ve.getValue(getFacesContext().getELContext());\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public final String getModeTaxoid() {\n\t\treturn modeTaxoid;\n\t}", "com.google.protobuf.ByteString\n getModeBytes();", "String getACModeName();", "int getACMode();", "public String getShipMode() {\n return (String)getAttributeInternal(SHIPMODE);\n }", "@objid (\"617db243-55b6-11e2-877f-002564c97630\")\n @Override\n public RepresentationMode getRepresentationMode() {\n if (getParent() == null)\n return RepresentationMode.STRUCTURED;\n return getParent().getRepresentationMode();\n }", "public java.lang.String getModeOfConveyance () {\n\t\treturn modeOfConveyance;\n\t}", "public void setMode(int mode){\n mMode = mode;\n }", "public final ObjectProperty<DisplayMode> displayModeProperty() {\n return displayMode;\n }", "String getSceneModePref();", "@JsonProperty(\"mode\")\n public void setMode(String mode) {\n this.mode = mode;\n }", "public char getGameMode() {\n return gameMode;\n }", "public int getDisplayMode() {\n return this.displayMode;\n }", "public double mode(int dimension) {\n return 0.0;\n }", "@Override\n public int getMC() {\n return this.modeCount;\n }", "public String getProgramModeAsString() {\n return getProgramMode().name();\n }", "public void setMode(short mode)\n\t{\n\t\tthis.mode = mode;\n\t}", "public ProvisionMode getProvisionMode() {\r\n\t\treturn mode;\r\n\t}", "public Map<String, ArrayList<Integer>> modes() {\n return this.modes;\n }", "public static String getMode() {\n\t\treturn \"rs232 mode get\" + delimiter + \"rs232 mode get \";\n\t}", "public OutputMode getOutputMode() {\n\t\treturn this.recordingProperties.outputMode();\n\t}", "public Integer getMM_Factor(int mode) {\n for (int[] res : getMM_Factors())\n {\n if (res[0] == mode)\n return res[1];\n }\n return null;\n }", "public int getPropertyShowMode()\n {\n return propertyShowMode;\n }", "public ColorMode getColorMode() {\n\t\treturn getValue(Property.COLOR_MODE, ColorMode.values(), ColorMode.GRADIENT);\n\t}", "@Override\n public RunMode getMode() {\n return null;\n }", "public ProgramMode getProgramMode() {\n return _programMode;\n }", "public static int mode()\r\n\t{\r\n\t\tint mode;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Veuillez entrer 1 pour allez en mode Joueur1 contre Joueur2\");\r\n\t\t\tSystem.out.println(\"Veuillez entrer 2 pour aller en mode Joueur1 contre IA\");\r\n\t\t\tSystem.out.println(\"Veuillez entrer 3 pour allez en mode spectateur d'une partie IA contre IA\");\r\n\t\t\tmode = Saisie.litentier();\r\n\t\t} while (mode > 4);\r\n\t\treturn mode;\r\n\t}", "public final String getModeDate() {\n\t\treturn modeDate;\n\t}", "public void setMode(boolean value) {\n this.mode = value;\n }", "public IModeParser getMode();", "public UploadMode getMode() {\n return mode;\n }", "public SampleMode getSampleMode();", "public int evalMode() {\n return this.uidState.evalMode(this.op, this.mode);\n }", "public double mode(){\r\n\t\t\r\n\t\t//make a double to return the mode\r\n\t\tdouble mode = 0.0;\r\n\t\t\r\n\t\t//make 2 possible mode doubles\r\n\t\tdouble maybeMode;\r\n\t\t\r\n\t\t//make 2 mode count integers\r\n\t\tint modeCount1= 0;\r\n\t\tint modeCount= 0;\r\n\t\t\r\n\t\t//outer loop to go through the array\r\n\t\tfor (int i = 0; i < this.data.length; i++)\r\n\t\t{\r\n\t\t\t//assign maybeMode in order to \r\n\t\t\tmaybeMode = this.data[i];\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.data.length; j++)\r\n\t\t\t{\r\n\t\t\t\tif (maybeMode == this.data[j]){\r\n\t\t\t\t\tmodeCount1++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//if the new number (at index i) occurs more \r\n\t\t\t//often than the old number (or is the first one)\r\n\t\t\t//assign the new number to mode\r\n\t\t\t//and its count to modeCount\r\n\t\t\tif (modeCount1 > modeCount)\r\n\t\t\t{\r\n\t\t\t\tmode = maybeMode;\r\n\t\t\t\tmodeCount = modeCount1;\r\n\t\t\t}\r\n\t\t\t//reset mode count\r\n\t\t\tmodeCount1 = 0;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//outer loop to go through the array again\r\n\t\tfor (int i = 0; i < this.data.length; i++)\r\n\t\t{\r\n\t\t\t//assign maybeMode in order to \r\n\t\t\tmaybeMode = this.data[i];\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.data.length; j++)\r\n\t\t\t{\r\n\t\t\t\tif (maybeMode == this.data[j]){\r\n\t\t\t\t\tmodeCount1++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ((maybeMode != mode) && (modeCount1 == modeCount)){\r\n\t\t\t\treturn Double.NaN;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//if the mode actually occurs more than once, return it\r\n\t\tif (modeCount > 1)\r\n\t\t{ return mode; }\r\n\t\t//if not, there is no mode and return NaN\r\n\t\telse\r\n\t\t{ return Double.NaN; }\r\n\t\t\r\n\t}", "public final String getTableMode() {\n\t\treturn tableMode;\n\t}", "@Override\n\tpublic final native String getCompatMode() /*-{\n return this.compatMode;\n\t}-*/;", "public static String getDatabaseExportMode() {\n\t\tif ((xml == null) || (databaseExportMode == null)) return \"disabled\";\n\t\treturn databaseExportMode;\n\t}" ]
[ "0.7595175", "0.75647604", "0.75647604", "0.75136864", "0.7501487", "0.7501039", "0.74936277", "0.74892676", "0.7480695", "0.74664044", "0.7418013", "0.7387329", "0.7376182", "0.7374875", "0.7340262", "0.73112744", "0.7243981", "0.70332074", "0.702427", "0.7010288", "0.6965553", "0.6938049", "0.69300145", "0.6889611", "0.6864786", "0.68595725", "0.6790903", "0.6779777", "0.6709713", "0.67044276", "0.66871536", "0.66727114", "0.66120166", "0.6557751", "0.65443957", "0.6538476", "0.65347886", "0.6534729", "0.64867383", "0.6476479", "0.6469254", "0.64516693", "0.6428799", "0.6415844", "0.6406815", "0.6395815", "0.63808376", "0.63554", "0.6355078", "0.63101393", "0.6267863", "0.6240842", "0.62391263", "0.6206611", "0.61836064", "0.6179758", "0.6151727", "0.61482966", "0.6126357", "0.6113285", "0.6103687", "0.6099734", "0.6085663", "0.6078369", "0.60765874", "0.6069489", "0.6053997", "0.60529786", "0.60188705", "0.6005711", "0.5996889", "0.5992643", "0.59778965", "0.5975039", "0.5939636", "0.5936489", "0.5936243", "0.5927044", "0.59244496", "0.5920918", "0.5885751", "0.58556354", "0.58513737", "0.58401656", "0.5831154", "0.5830055", "0.58246857", "0.58173597", "0.58155364", "0.58108914", "0.5789849", "0.5784767", "0.5775714", "0.57684606", "0.57675654", "0.57499886", "0.57387745", "0.57273334", "0.5724732", "0.57156646" ]
0.83810943
0
Set the mode property: Abstract base class for defining a distribution mode.
public DistributionPolicyInternal setMode(DistributionModeInternal mode) { this.mode = mode; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMode(int mode) {\n this.mode = mode;\n }", "public void setMode(int mode) {\r\n\t\tthis.mode = mode;\r\n\t}", "public void setMode(int mode){\n mMode = mode;\n }", "@Override\n\tpublic void setMode(int mode) {\n\t\t\n\t}", "public void setMode(short mode)\n\t{\n\t\tthis.mode = mode;\n\t}", "public void setMode(String mode) {\n this.mode = mode;\n }", "public void setMode(String mode){\n\t\tthis.mode=mode;\n\t}", "public void setMode(int mode) {\r\n switch (mode) {\r\n case CentroidUserObject.VARIANCES_MODE:\r\n setDrawVariances(true);\r\n setDrawValues(false);\r\n break;\r\n case CentroidUserObject.VALUES_MODE:\r\n setDrawVariances(false);\r\n setDrawValues(true);\r\n break;\r\n }\r\n }", "public void setMode(boolean value) {\n this.mode = value;\n }", "public void setMode(final String mode) {\n this.mode = checkEmpty(mode);\n }", "public void setMode(int mode)\r\n {\r\n \r\n setMode_0(nativeObj, mode);\r\n \r\n return;\r\n }", "public void setMode(int mode) {\n \t\treset();\n \t}", "public void setMode(int i) {\r\n\t\t_mode = i;\r\n\t}", "boolean setMode(int mode);", "public void setMode(int inMode) {\n mode = inMode;\n }", "public void setMode(DcMotor.RunMode mode) {\n lDrive.setMode(mode);\n rDrive.setMode(mode);\n }", "public void setMode(String mode) \n\t{\n\t\tthis.mode = string2Octal(mode);\n\t}", "@Override\n public void setMode(RunMode mode) {\n\n }", "public void setMode(String mode) {\n this.mode = mode == null ? null : mode.trim();\n }", "public void setMode(String mode) {\n\t\tgetStateHelper().put(OutputSourceCodePropertyKeys.mode, mode);\n\t}", "public void setMode(String value) {\n _avTable.set(ATTR_MODE, value);\n }", "public Builder setMode(int mode){\n mMode = mode;\n return this;\n }", "public void setMode(int mode) {\r\n this.mode = mode;\r\n setSleeping(mode == MODE_EMPTY);\r\n repaint();\r\n }", "public void setMode(WhichVariables mode)\n\t{\n\t\tif (!mode.equals(m_mode))\n\t\t{\n\t\t\tm_mode = mode;\n\t\t\tm_viewer.refresh();\n\t\t}\n\t}", "public void setMode(DcMotor.RunMode mode) {\n leftFront.setMode(mode);\n leftRear.setMode(mode);\n rightFront.setMode(mode);\n rightRear.setMode(mode);\n }", "public void setForcedScalingMode(int mode) {\n boolean z = true;\n if (mode != 1) {\n mode = 0;\n }\n if (mode == 0) {\n z = false;\n }\n this.mDisplayScalingDisabled = z;\n StringBuilder sb = new StringBuilder();\n sb.append(\"Using display scaling mode: \");\n sb.append(this.mDisplayScalingDisabled ? \"off\" : \"auto\");\n Slog.i(TAG, sb.toString());\n this.mWmService.reconfigureDisplayLocked(this);\n this.mWmService.mDisplayWindowSettings.setForcedScalingMode(this, mode);\n }", "public void setMode(String mode) {\n if (\"null\".equals(mode)) {\n mode = null;\n }\n\n if (mode == null || mode.equals(MODE_VALUE_GEOSPATIAL)) {\n this.mode = mode;\n } else {\n throw new AppEngineConfigException(\"Invalid mode: '\" + mode);\n }\n }", "void changeMode(int mode);", "public void setMode(ProvisionMode mode) {\r\n\t\tthis.mode = mode;\r\n\t}", "@JsonProperty(\"mode\")\n public void setMode(String mode) {\n this.mode = mode;\n }", "public final void setCurrentMode(final String mode) {\n mCurrentMode = mode;\n }", "public void setModeId(Integer modeId) {\n this.modeId = modeId;\n }", "public void setMode(String channel, String mode);", "public void setPortMode(String mode){\r\n\t\tthis.portMode=mode;\r\n\t\tif(!portMode.equals(\"floating\")){\r\n\t\t\tthis.currentPort=(new Integer(portMode)).intValue();\r\n\t\t}\r\n\t}", "public DistributionModeInternal getMode() {\n return this.mode;\n }", "public void setCategory (String mode) { category = mode; }", "public final void setGameMode(int mode)\n {\n switch (mode) {\n case WildLifeGame.MODE_CONSOLE:\n modeConsole = true;\n break;\n case WildLifeGame.MODE_WINDOW:\n modeConsole = false;\n break;\n }\n if (modeConsole) {\n System.out.println(\"Le jeu fonctionne en mode console...\");\n }\n }", "public void setMode(int m) {\n if (m == LIST || m == EXTRACT)\n mode = m;\n }", "public void setMode(int i){\n\tgameMode = i;\n }", "public void setDoblyMode (String mode) {\n int i = Integer.parseInt(mode);\n if (i >= 0 && i <= 3) {\n writeSysfs(AUIDO_DSP_AC3_DRC, \"drcmode\" + \" \" + mode);\n } else {\n writeSysfs(AUIDO_DSP_AC3_DRC, \"drcmode\" + \" \" + \"2\");\n }\n }", "public static void setCurrentMode(Modes mode){\n\t\tcurrentMode = mode;\n\t}", "public void setResourceMode(int value)\r\n {\r\n getSemanticObject().setIntProperty(swb_resourceMode, value);\r\n }", "public Builder setMode(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000100;\n mode_ = value;\n onChanged();\n return this;\n }", "public void setSourceMode(int mode) {\n _mode = mode;\n }", "public String getMode(){\r\n\t\treturn mode;\r\n\t}", "public void setProcessingMode(int mode) {\n\tif (mode != NON_BLOCKING && mode != DEMAND_DRIVEN)\n throw new IllegalArgumentException\n (\"Mode must be NON_BLOCKING or DEMAND_DRIVEN\") ;\n\n\tprocessingMode = mode ;\n }", "public void setMode(Mode type) {\n this.mode = type;\n if (type == Mode.THREE_STATE)\n value = null;\n else\n value = false;\n }", "public void setSupportMode(int mode) {\n // skip to avoid useless operation\n if (mSupportMode == mode) return;\n\n if (mode == MODE_AUTOMOTIVE) {\n mSupportMode = MODE_AUTOMOTIVE;\n setupAutomotiveMode();\n } else if (mode == MODE_ONE_MULTIILINE_TEXTVIEW) {\n mSupportMode = MODE_ONE_MULTIILINE_TEXTVIEW;\n if (null != mPrimaryView) {\n mPrimaryView.setState(ActionBarTextView.PRIMARY_MULTILINE_ONLY);\n }\n setSecondaryVisibility(View.GONE);\n\n } else {\n mSupportMode = MODE_DEFAULT;\n }\n getDefaultHeight();\n adjustPrimaryState();\n adjustSecondaryState();\n }", "public void setDitherMode(int mode) {\n\t\tif (mode != DITHER_MODE_AUTOMATIC && mode != DITHER_MODE_ON\n\t\t\t\t&& mode != DITHER_MODE_OFF) {\n\t\t\tthrow new IllegalArgumentException(\"Illegal DitherMode\");\n\t\t}\n\t\tthis.ditherMode = mode;\n\t}", "public void setMode(UploadMode mode) {\n this.mode = mode;\n }", "public void setModeinfo( String modeinfo )\n {\n this.modeinfo = modeinfo;\n }", "public void setDisplayMode(final int mode) {\n if (mode != this.displayMode) {\n this.displayMode = mode;\n this.gridPanel.setLayout(new GridLayout(0,\n this.displayMode == CONT_FACING ? 2 : 1));\n reload();\n }\n }", "public void setMode(final int type) {\r\n\t\tif (current != null) {\r\n\t\t\tcurrent.setMode(type);\r\n\t\t\telementView.repaint();\r\n\t\t\tnotifyModificationListeners();\r\n\t\t}\r\n\t}", "@Accessor(qualifier = \"mode\", type = Accessor.Type.SETTER)\n\tpublic void setMode(final ImpExValidationModeEnum value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(MODE, value);\n\t}", "public void setMetrMode(final int[] mode) {\n\t\tif (mode==null || mode.length!=4) {\n\t\t\tthrow new IllegalArgumentException(\"Invalide metrology mode\");\n\t\t}\n\t\tThread t = new Thread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tString modeStr=\"[\"+mode[0]+\", \"+mode[1]+\", \"+mode[2]+\", \"+mode[3]+\"]\";\n\t\t\t\ttry {\n\t\t\t\t\tlogger.log(AcsLogLevel.DEBUG,\"Setting metrology mode to \"+modeStr);\n\t\t\t\t\tmount.SET_METR_MODE(mode);\n\t\t\t\t\tlogger.log(AcsLogLevel.DEBUG,\"Metrology mode set to \"+modeStr);\n\t\t\t\t} catch (Throwable t) {\n\t\t\t\t\tAcsJMetrologyEx ex = new AcsJMetrologyEx(t);\n\t\t\t\t\tex.setAntennatype(AntennaType.VERTEX.description);\n\t\t\t\t\tex.setOperation(\"Invalid metrology mode\");\n\t\t\t\t\tnotifier.commandExecuted(0,\"Set Vertex metr mode to \"+modeStr,\"Error from remote component while setting metrology mode to \"+modeStr,ex);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tt.setDaemon(true);\n\t\tt.setName(\"Vertex:setMetrMode\");\n\t\tt.start();\n\t}", "public void setMode(@SliceMode int mode) {\n setMode(mode, false /* animate */);\n }", "public void setMode(int mode) {\n if (currentEventHandler != null) {\n currentEventHandler.setActive(false);\n }\n\n switch (mode) {\n case ADD_MODE: currentEventHandler = addEventHandler;\n canvas.setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));\n break;\n case PAN_MODE: currentEventHandler = panEventHandler;\n canvas.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));\n break;\n case REMOVE_MODE: currentEventHandler = removeEventHandler;\n canvas.setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));\n break;\n case AUTO_MODE: currentEventHandler = autoEventHandler;\n canvas.setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));\n break;\n }\n\n if (currentEventHandler != null) {\n currentEventHandler.setActive(true);\n }\n }", "public void setMode(String[] args) {\n\t\t\tfor (String arg : args) {\n\t\t\t\tif (arg.equals(\"-i\")) {\n\t\t\t\t\tthis.mode = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}", "public void change() {\r\n this.mode = !this.mode;\r\n }", "public void setMode(int mode0) {\n\t\t// invalid mode?\n\t\tint mode = mode0;\n\t\tif (mode != MODE_IMAGES && mode != MODE_GEOGEBRA\n\t\t\t\t&& mode != MODE_GEOGEBRA_SAVE && mode != MODE_DATA) {\n\t\t\tLog.debug(\n\t\t\t\t\t\"Invalid file chooser mode, MODE_GEOGEBRA used as default.\");\n\t\t\tmode = MODE_GEOGEBRA;\n\t\t}\n\n\t\t// do not perform any unnecessary actions\n\t\tif (this.currentMode == mode) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (mode == MODE_GEOGEBRA) { // load/save ggb, ggt etc. files\n\t\t\tsetMultiSelectionEnabled(true);\n\t\t} else { // load images\n\t\t\tsetMultiSelectionEnabled(false);\n\t\t}\n\n\t\t// set the preview panel type: image, data or ?\n\t\tpreviewPanel.setPreviewPanelType(mode);\n\n\t\t// TODO apply mode specific settings..\n\n\t\tthis.currentMode = mode;\n\t}", "public String getMode() {\n return mode;\n }", "public String getMode() {\n return mode;\n }", "public void setMode(InteractMode newMode) {\r\n\t\tcurrentMode = newMode;\r\n\t\tlastModeSwitch = System.currentTimeMillis();\r\n\t}", "public String getMode()\n {\n return mode;\n }", "public void setMode(PortfolioRecord portRecord, Mode mode) {\n if (mode != currMode) {\n currMode = mode;\n\n if (portRecord.getHistory().size() > 0) {\n updatePerformanceGraph(true, portRecord);\n } else {\n formatYAxis();\n }\n }\n }", "public String getMode() {\n\n return mode;\n\n }", "public void mode() {\n APIlib.getInstance().addJSLine(jsBase + \".mode();\");\n }", "public abstract int getMode();", "public int getMode() {\n return mode;\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:14:32.594 -0400\", hash_original_method = \"45C4A93D9DB00E5177EB1AA33C0FC790\", hash_generated_method = \"A67AFB0821ABBDFC1442B7AD04AF9F51\")\n \n public static boolean setPowerModeCommand(int mode){\n \tdouble taintDouble = 0;\n \ttaintDouble += mode;\n \n \treturn ((taintDouble) == 1);\n }", "void setMotorsMode(DcMotor.RunMode runMode);", "public void setOutput(int mode) {\n\t\tswitch(mode) {\n\t\tcase UP:\n\t\t\tup = true;\n\t\t\tdown = false;\n\t\t\tleft = false;\n\t\t\tright = false;\n\t\t\tbreak;\n\t\tcase DOWN:\n\t\t\tup = false;\n\t\t\tdown = true;\n\t\t\tleft = false;\n\t\t\tright = false;\n\t\t\tbreak;\n\t\tcase LEFT:\n\t\t\tup = false;\n\t\t\tdown = false;\n\t\t\tleft = true;\n\t\t\tright = false;\n\t\t\tbreak;\n\t\tcase RIGHT:\n\t\t\tup = false;\n\t\t\tdown = false;\n\t\t\tleft = false;\n\t\t\tright = true;\n\t\t\tbreak;\n\t\t}\n\t}", "public Mode getMode() {\n return mode;\n }", "@Override\n\tpublic String getMode() {\n\t\treturn this.mode;\n\t}", "public int getMode() {\n return this.mode;\n }", "void setDisplayMode(DisplayMode mode);", "public void setMode(int newMode) {\n\t\tint oldMode = mode; \n\t\tmode = newMode;\n\t\tif(mode != REPAIR_MODE || mode != SELL_MODE) \n\t\t\tlblMouse.setText(\"\");\n\t\tif(mode == REPAIR_MODE) \n\t\t\tlblMouse.setText(\"REPAIR\");\n\t\telse if(mode == SELL_MODE) \n\t\t\tlblMouse.setText(\"SELL\"); \n\t\tif(mode == PAUSE_MODE) { \n\t\t\tlblPause.setVisible(true);\n\t\t\tgameEngine.togglePaused();\n\t\t\t//gameEngine.stopRender(); \n\t\t\tdoTrapThread = false;\n\t\t\tdoMonsterThread = false;\n\t\t\tdoMapThread = false;\n\t\t\tgameHud.toggleButtons();\n\t\t}\n\t\tif(oldMode == PAUSE_MODE && mode != PAUSE_MODE) {\n\t\t\tgameHud.toggleButtons();\n\t\t\tgameEngine.togglePaused();\n\t\t\t//gameEngine.startRender();\n\t\t\tdoTrapThread = true;\n\t\t\tdoMonsterThread = true;\n\t\t\tdoMapThread = true;\n\t\t\tlblPause.setVisible(false);\n\t\t}\n\t\t\n\t\tif(oldMode == BUY_MODE && mode != BUY_MODE) {\n\t\t\t//purchase = null;\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\n protected void screenMode(int mode) {\n\n }", "public void setDistribution(int distribution) {\n this.distribution = distribution;\n }", "public void setProgramMode(ProgramMode newValue) {\n ProgramMode oldValue = _programMode;\n if (oldValue != newValue) {\n _programMode = newValue;\n firePropertyChange(PROGRAM_MODE_PROP, oldValue, newValue);\n }\n }", "public void changeMode() {\n methodMode = !methodMode;\n }", "public void setWmode(String wmode) {\n\t\tthis.wmode = wmode;\n\t\tthis.handleConfig(\"wmode\", wmode);\n\t}", "Mode(int height, int width, int mines)\n {\n this.height = height;\n this.width = width;\n this.mines = mines;\n }", "public void shapeMode(int mode) {\n\t\tthis.shapeMode = mode;\n\n\t\tswitch (mode) {\n\t\tcase (POINTS):\n\t\t\tDebug.info(\"Jay3dModel\",\"draw mode:\\t\\tPOINTS\");\n\t\tbreak;\n\n\t\tcase (LINES):\n\t\t\tDebug.info(\"Jay3dModel\",\"draw mode:\\t\\tLINES\");\n\t\tbreak;\n\n\t\tcase (POLYGON):\n\t\t\tDebug.info(\"Jay3dModel\",\"draw mode:\\t\\tPOLYGON\");\n\t\tbreak;\n\n\t\tcase (TRIANGLES):\n\t\t\tDebug.info(\"Jay3dModel\",\"draw mode:\\t\\tTRIANGLES\");\n\t\tbreak;\n\n\t\tcase (TRIANGLE_STRIP):\n\t\t\tDebug.info(\"Jay3dModel\",\"draw mode:\\t\\tTRIANGLE_STRIP\");\n\t\tbreak;\n\n\t\tcase (QUADS):\n\t\t\tDebug.info(\"Jay3dModel\",\"draw mode:\\t\\tQUADS\");\n\t\tbreak;\n\n\t\tcase (QUAD_STRIP):\n\t\t\tDebug.info(\"Jay3dModel\",\"draw mode:\\t\\t\");\n\t\tbreak;\n\t\t}\n\t}", "public Mode getMode();", "public void setGameMode(char mode) throws IllegalArgumentException {\n if (mode != 'c' && mode != 'C' && mode != 'p' && mode != 'P') {\n throw new IllegalArgumentException(\"Invalid Input: \" + mode);\n }\n if (mode == 'c' || mode == 'C') {\n gameMode = 0;\n } else {\n gameMode = 1;\n }\n }", "public void setDrawmode(final int drawmode) {\n if (drawmode != this.drawmode){\n this.drawmode = drawmode;\n batch.end();\n //GameObject.getSpritesheet().getFullImage().endUse();\n Gdx.gl10.glTexEnvf(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE, drawmode);\n //GameObject.getSpritesheet().getFullImage().startUse();\n batch.begin();\n }\n }", "public PropertyMode getMode() {\n\t\treturn mode;\n\t}", "public void setMotionMode(int mode) {\n\t\tm_motionMode = mode;\n\t}", "public int getModeValue(){\r\n\t\treturn modeValue;\r\n\t}", "public void setTestMode(boolean value) {\n this.testMode = value;\n }", "private void _setMode(String name) {\n Mode oldValue = getMode();\n setMode(Mode.getMode(name, oldValue));\n }", "public void setPriceMode(final ProductPriceModeEnum priceMode);", "public com.anychart.scales.ScatterTicks mode(String mode) {\n APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + \".mode(%s);\", wrapQuotes(mode)));\n\n return this;\n }", "public int getMode() {\n\t\treturn this.mode;\n\t}", "public void setIconMode(IconMode mode){\n\t\tcurrentMode = mode;\n\t\t\n\t\tif (mode==IconMode.Text)\n\t\t{\n\t\t\tsuper.setWidget(titlelab);\n\t\t\tsuper.setHeight(\"30px\");\n\t\t\t\n\t\t} \n\t\tif (mode==IconMode.Image)\n\t\t{\n\t\t\t//set if not loading\n\t\t\tif (loadedPic){\n\t\t\t\tsuper.setWidget(Picture);\n\t\t\t\tsuper.setHeight(\"100px\");\n\t\t\t}\n\t\t\t\n\t\t} \n\t\tif (mode==IconMode.CaptionedImage)\n\t\t{\n\t\t\t\n\t\t} \n\t}", "public void setDTS_DownmixMode(String mode) {\n int i = Integer.parseInt(mode);\n if (i >= 0 && i <= 1) {\n writeSysfs(AUIDO_DSP_DTS_DEC, \"dtsdmxmode\" + \" \" + mode);\n } else {\n writeSysfs(AUIDO_DSP_DTS_DEC, \"dtsdmxmode\" + \" \" + \"0\");\n }\n }", "public void setMode(SwerveMode newMode) {\n\t\tSmartDashboard.putString(\"mode\", newMode.toString());\n // Re-enable SwerveModules after mode changed from Disabled\n if (mode == SwerveMode.Disabled) {\n for (SwerveModule mod: modules) {\n mod.enable();\n }\n }\n mode = newMode;\n int index = 0; // Used for iteration\n switch(newMode) {\n case Disabled:\n for (SwerveModule mod: modules) {\n mod.setSpeed(0);\n mod.disable();\n }\n break;\n case FrontDriveBackDrive:\n for (SwerveModule mod: modules) {\n mod.unlockSetpoint();\n mod.setSetpoint(RobotMap.forwardSetpoint);\n }\n break;\n case FrontDriveBackLock:\n for (SwerveModule mod: modules) {\n if (index < 2) {\n mod.unlockSetpoint();\n mod.setSetpoint(RobotMap.forwardSetpoint);\n }\n else {\n mod.unlockSetpoint();\n\n mod.lockSetpoint(RobotMap.forwardSetpoint);\n }\n index++;\n }\n break;\n case FrontLockBackDrive:\n for (SwerveModule mod: modules) {\n if (index > 1) {\n mod.unlockSetpoint();\n }\n else {\n mod.unlockSetpoint();\n\n mod.lockSetpoint(RobotMap.forwardSetpoint);\n }\n index++;\n }\n break;\n case StrafeLeft:\n for (SwerveModule mod: modules) {\n \t\tmod.unlockSetpoint();\n mod.lockSetpoint(RobotMap.leftSetpoint);\n }\n break;\n case StrafeRight:\n for (SwerveModule mod: modules) {\n \t\tmod.unlockSetpoint();\n mod.lockSetpoint(RobotMap.rightSetpoint);\n }\n break;\n default:\n break;\n\n }\n}", "public void setModele(java.lang.String modele) {\n this.modele = modele;\n }", "public static void init( int mode ) {\n\t\tMAIDFactory.init(mode);\n\t}" ]
[ "0.78229845", "0.77716047", "0.7675266", "0.7619684", "0.7565374", "0.7515391", "0.74153435", "0.7221212", "0.72163886", "0.72079015", "0.7203864", "0.71203387", "0.70548046", "0.70445883", "0.70350224", "0.6986426", "0.6965611", "0.6954364", "0.6944954", "0.69162375", "0.68854284", "0.68565094", "0.68426955", "0.6820974", "0.67698383", "0.676135", "0.6688075", "0.6643118", "0.65784615", "0.6553792", "0.647679", "0.64556664", "0.64290893", "0.640904", "0.6379361", "0.63759965", "0.63362294", "0.63225293", "0.6314419", "0.631341", "0.63122535", "0.63050103", "0.62967634", "0.62564105", "0.6245046", "0.6232576", "0.61980855", "0.619612", "0.6186086", "0.61835325", "0.61776865", "0.61766505", "0.61743855", "0.61588764", "0.61569226", "0.61514455", "0.6135156", "0.6129819", "0.60648865", "0.60301954", "0.6002903", "0.6002903", "0.5992181", "0.5988799", "0.59827715", "0.59824413", "0.59813637", "0.5941449", "0.59111", "0.5891739", "0.5887871", "0.5873576", "0.5847397", "0.58356506", "0.58227533", "0.58180064", "0.580886", "0.58043426", "0.57994384", "0.57908136", "0.57876986", "0.577612", "0.5771579", "0.576989", "0.57645357", "0.576098", "0.5751397", "0.57492137", "0.5735198", "0.5733925", "0.573082", "0.5700346", "0.56997305", "0.5695232", "0.5695028", "0.56932837", "0.5688431", "0.5678443", "0.5663714", "0.56547713" ]
0.7703142
2
Created by retor on 30.12.2014.
public interface MapWorkerInterface<T> { public void setupMap(SupportMapFragment fragment) throws NullPointerException; public boolean isNull(T map); public void drawMarkers(ArrayList<Bus> array); public void clearMap(); public void setupLocation(); public T getMap(); public void whatNearMe(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\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 anular() {\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\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\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 ligar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private void poetries() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n protected void getExras() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void 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}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private void init() {\n\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n protected void init() {\n }", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tpublic void init() {}", "@Override\n public void init() {}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\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\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "private void kk12() {\n\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public int getOrder() {\n return 0;\n }", "@Override\n\tpublic void postInit() {\n\t\t\n\t}", "private void init() {\n\n\n\n }", "@Override\n public int retroceder() {\n return 0;\n }", "public void mo55254a() {\n }" ]
[ "0.60386944", "0.6031633", "0.5940195", "0.5878383", "0.58678967", "0.5857232", "0.5827458", "0.5797465", "0.5797465", "0.5761244", "0.57482797", "0.57318544", "0.5720876", "0.57181835", "0.57175297", "0.5692818", "0.5664328", "0.5661262", "0.5661262", "0.5661262", "0.5661262", "0.5661262", "0.564829", "0.56466806", "0.5640162", "0.563004", "0.5622378", "0.56061935", "0.55653936", "0.55514556", "0.5551154", "0.5551154", "0.5551154", "0.5544232", "0.5541165", "0.5541165", "0.552949", "0.5527449", "0.5516062", "0.55147797", "0.55121356", "0.55121356", "0.55112284", "0.55112284", "0.55112284", "0.5508048", "0.5508048", "0.5508048", "0.55059457", "0.5502214", "0.5487005", "0.5487005", "0.54836345", "0.54653674", "0.5464495", "0.54631317", "0.5459656", "0.54585195", "0.545585", "0.54503095", "0.54503095", "0.544971", "0.5444453", "0.54399145", "0.54349065", "0.54304534", "0.5426041", "0.5422413", "0.54215664", "0.54205644", "0.5418204", "0.5417232", "0.5415283", "0.54144436", "0.5411252", "0.5409922", "0.54079014", "0.539538", "0.539538", "0.539538", "0.539538", "0.539538", "0.539538", "0.53949636", "0.5393637", "0.53872645", "0.538052", "0.5375415", "0.53336793", "0.5317955", "0.5312272", "0.5304687", "0.5304687", "0.5301332", "0.5296714", "0.5294038", "0.52937186", "0.5291808", "0.528259", "0.52824783", "0.52816993" ]
0.0
-1
Abstract interface for the results provided by a web search. Each result exposes a set of readonly properties. While title and summary are retrieved upon result creation, both content and links are fetched from the original document when accessing either one for the first time. The URL might be malformed.
public interface SearchResult { /** * Gets the rank of the result fetched. * * @return The rank of the result (starting with 1). */ public int getRank(); /** * Gets the title of the result fetched. * * @return The title of result. */ public String getTitle(); /** * Gets the URL that can be used for accessing the document. The URL is specifically required * when fetching the content. * * @return The URL of the result. * @throws SearchResultException The URL might be malformed. */ public URL getURL() throws SearchResultException; /** * Get a short summary of the document. This summary is usually provided by the SearchEngine * and should therefore not resolve in an exception. * * @return The summary of the result. */ public String getSummary(); /** * Retrieves the HTML content of a result. For this, a HTTP connection has to be created that * can result in connection exceptions. These exceptions are packed in abstract * "SearchResultException". The content will be plain text. * * @return The content document related to a result * @throws SearchResultException The retrieval of the document might fail. */ public String getContent() throws SearchResultException; /** * Retrieves all links of a result document. For this the content document is searched for all * links and forms. Their URLs are extracted, cleaned, and returned as a list. * * @return List of URLs of documents linked to by this document * @throws SearchResultException The document might not be available and retrieval might fail. */ public Set<String> getLinks() throws SearchResultException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "interface Result {\n\n /** The page which contains matches. */\n @NotNull\n Resource getTarget();\n\n /** The content child of the page which contains matches. */\n @NotNull\n Resource getTargetContent();\n\n /** A link that shows the target, including search terms with {@link #PARAMETER_SEARCHTERM} */\n @NotNull\n String getTargetUrl();\n\n /** The title of the search result. */\n @NotNull\n String getTitle();\n\n /** The score of the search result. */\n Float getScore();\n\n /**\n * One or more descendants of {@link #getTarget()} that potentially match the search expression. Mostly useful\n * for generating excerpts; can contain false positives in some search algorithms.\n */\n @NotNull\n List<Resource> getMatches();\n\n /** The fulltext search expression for which this result was found. */\n @NotNull\n String getSearchExpression();\n\n /**\n * A basic excerpt from the matches that demonstrates the occurrences of the terms from {@link\n * #getSearchExpression()} in this result. Might be empty if not applicable (e.g. if the search terms were found\n * in meta information). If there are several matches, we just give one excerpt. You might want to provide your\n * own implementation for that to accommodate for specific requirements.\n *\n * @return a text with the occurrences of the words marked with HTML tag em .\n */\n @NotNull\n String getExcerpt() throws SearchTermParseException;\n }", "public interface SearchResult {\n\t/**\n\t * Returns the meta data of this entity associated with the search result.\n\t * \n\t * @return\tThe meta data\n\t */\n\tMetadata getMetaData();\n\t\n\t/**\n\t * Returns the identifier of this entity associated with the search result.\n\t * \n\t * @return\tThe identifier\n\t */\n\tString getHash();\n\t\n\t/**\n\t * Returns the hash algorithm used for hashing the content.\n\t * \n\t * @return The hash algorithm\n\t */\n\tString getHashAlgorithm();\n}", "public interface SearchResult\n{\n /**\n * Title of search result item.\n * \n * @return String title\n */\n String getTitle();\n /**\n * Name of search result item.\n * \n * @return String title\n */\n String getName();\n /**\n * Select the link of the search result item.\n * \n * @return true if link found and selected\n */\n HtmlPage clickLink();\n /**\n * Verify if folder or not, true if search row represent\n * a folder.\n * \n * @return boolean true if search result is of folder\n */\n boolean isFolder();\n \n /**\n * Date of search result item.\n * \n * @return String Date\n */\n \n String getDate();\n \n /**\n * Site of search result item.\n * \n * @return String Site\n */\n \n String getSite();\n \n /**\n * Select the site link of the search result item.\n * \n * @return true if link found and selected\n */\n HtmlPage clickSiteLink();\n \n /**\n * Select the Date link of the search result item.\n * \n * @return true if link found and selected\n */\n \n\t HtmlPage clickDateLink();\n\t \n\t /**\n * Actions of search result item.\n * \n * @return enum ActionSet\n */\n\t ActionsSet getActions();\n\n /**\n * Method to click on content path in the details section\n *\n * @return SharePage\n */\n public HtmlPage clickContentPath();\n\n /**\n * Method to get thumbnail url\n *\n * @return String\n */\n public String getThumbnailUrl();\n\n /**\n * Method to get preview url\n *\n * @return String\n */\n public String getPreViewUrl();\n\n /**\n * Method to get thumbnail of element\n *\n * @return String\n */\n public String getThumbnail();\n\n /**\n * Method to click on Download icon for the element\n */\n public void clickOnDownloadIcon();\n\n /**\n * Select the site link of the search result item.\n *\n * @return true if link found and selected\n */\n HtmlPage clickSiteName();\n\t \n\t/**\n * Select the Image link of the search result item.\n * \n * @return PreViewPopUpPage if link found and selected\n */\n\tPreViewPopUpPage clickImageLink();\n\n\tHtmlPage selectItemCheckBox();\n\n\tboolean isItemCheckBoxSelected();\n\t\n}", "public String getContent() throws SearchResultException;", "public URL getURL() throws SearchResultException;", "LazyDataModel<ReagentResult> getSearchResults();", "public interface SearchService {\n\n /**\n * Parameter that is appended to the generated links that contains the positive search terms and phrases of the\n * search expression. For several terms it occurs several times.\n */\n String PARAMETER_SEARCHTERM = \"search.term\";\n\n /**\n * Represents a result of the search consisting of a target page and one or more matching subresources. For use by\n * the search result renderer.\n */\n interface Result {\n\n /** The page which contains matches. */\n @NotNull\n Resource getTarget();\n\n /** The content child of the page which contains matches. */\n @NotNull\n Resource getTargetContent();\n\n /** A link that shows the target, including search terms with {@link #PARAMETER_SEARCHTERM} */\n @NotNull\n String getTargetUrl();\n\n /** The title of the search result. */\n @NotNull\n String getTitle();\n\n /** The score of the search result. */\n Float getScore();\n\n /**\n * One or more descendants of {@link #getTarget()} that potentially match the search expression. Mostly useful\n * for generating excerpts; can contain false positives in some search algorithms.\n */\n @NotNull\n List<Resource> getMatches();\n\n /** The fulltext search expression for which this result was found. */\n @NotNull\n String getSearchExpression();\n\n /**\n * A basic excerpt from the matches that demonstrates the occurrences of the terms from {@link\n * #getSearchExpression()} in this result. Might be empty if not applicable (e.g. if the search terms were found\n * in meta information). If there are several matches, we just give one excerpt. You might want to provide your\n * own implementation for that to accommodate for specific requirements.\n *\n * @return a text with the occurrences of the words marked with HTML tag em .\n */\n @NotNull\n String getExcerpt() throws SearchTermParseException;\n }\n\n /**\n * Fulltext search for resources. The resources are grouped if they are subresources of one target page, as\n * determined by the parameter targetResourceFilter.\n * <p>\n * Limitations: if the searchExpression consists of several search terms (implicitly combined with AND) this finds\n * only resources where a single property matches the whole search condition, i.e., all those terms. If several\n * resources of a page contain different subsets of those terms, the page is not found.\n *\n * @param context The context we use for the search.\n * @param selectors a selector string to determine the right search strategy, e.g. 'page'\n * @param root Optional parameter for the node below which we search.\n * @param searchExpression Mandatory parameter for the fulltext search expression to search for. For the syntax\n * see\n * {@link QueryConditionDsl.QueryConditionBuilder#contains(String)}\n * . It is advisable to avoid using AND and OR.\n * @param searchFilter an optional filter to drop resources to ignore.\n * @return possibly empty list of results\n * @see com.composum.sling.core.mapping.jcr.ResourceFilterMapping\n */\n @NotNull\n List<Result> search(@NotNull BeanContext context, @NotNull String selectors,\n @NotNull String root, @NotNull String searchExpression, @Nullable ResourceFilter searchFilter,\n int offset, @Nullable Integer limit)\n throws RepositoryException, SearchTermParseException;\n\n\n interface LimitedQuery {\n\n /**\n * Executes the query with the given limit; returns a pair of a boolean that is true when we are sure that all\n * results have been found in spite of the limit, and the results themselves.\n */\n Pair<Boolean, List<Result>> execQuery(int matchLimit);\n }\n\n /**\n * Execute the query with raising limit until the required number of results is met. We don't know in advance how\n * large we have to set the limit in the query to get all neccesary results, since each page can have an a priori\n * unknown number of matches. Thus, the query is executed with an estimated limit, and is reexecuted with tripled\n * limit if the number of results is not sufficient and there are more limits.\n *\n * @return up to limit elements of the result list with the offset first elements skipped.\n */\n @NotNull\n List<Result> executeQueryWithRaisingLimits(LimitedQuery limitedQuery, int offset, Integer limit);\n}", "public interface Hit {\r\n\t\r\n\t/** @return ID of the search result (post ID, topic ID,...). */\r\n\tlong getResultId();\r\n\t\r\n\t/** @return Score of the search result. */\r\n\tfloat getScore();\r\n\r\n}", "public SearchResults() {\n\t\tPageFactory.initElements(driver, this);\n\t}", "SearchResult<TimelineMeta> search(SearchQuery searchQuery);", "public abstract S getSearch();", "CopySearchResult find(ContentQuery query) throws ResourceAccessException;", "public interface Query {\n\n\t/**\n\t * @return ID of the given query\n\t */\n\tint queryID();\n\t\n\t/**\n\t * @return given query\n\t */\n\tString query();\n\t\n\t/**\n\t * @return list of relevant documents to the corresponding query\n\t */\n\tList<RelevanceInfo> listOfRelevantDocuments();\n\t\n\t/**\n\t * @return list of results to the corresponding query after running one of the retrieval models\n\t */\n\tList<Result> resultList();\n\t\n\t/**\n\t * @param resultList\n\t * @Effects adds results to the result list of the corresponding query\n\t */\n\tvoid putResultList(List<Result> resultList);\n}", "TSearchResults createSearchResults(TSearchQuery searchQuery);", "public Set<String> getLinks() throws SearchResultException;", "public interface Searcher {\n\n\t/**\n\t * returns document titles for given query\n\t * \n\t * @param query\n\t * @return\n\t * @throws SearcherException\n\t */\n\tList<String> getDocumentTitles(String query) throws SearcherException;\n\n}", "public void process(Manager manager, SearchRequest q)\n\t{\n\t\tResultSet rs = q.getResultSet();\n\t\tnew_query(manager, q, rs);\n\t\tint docids[] = rs.getDocids();\n\t\tint resultsetsize = docids.length;\n\t\tif (show_url_early && show_url)\n\t\t{\n\t\t\tString[] urls = new String[resultsetsize];\n\t\t\tString[] metadata = null;\n\t\t\tlogger.debug(\"early url decoration\");\n\t\t\tsynchronized(metaCache) {\n\t\t\t\ttry {\n\t\t\t\t\tfor(int i=0;i<resultsetsize;i++) {\n\t\t\t\t\t\tInteger DocNoObject = new Integer(docids[i]);\n\t\t\t\t\t\tif (metaCache.containsKey(DocNoObject))\n\t\t\t\t\t\t\t\tmetadata = (String[]) metaCache.get(DocNoObject);\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tmetadata = metaIndex.getItems(keys, docids[i]);\n\t\t\t\t\t\t\tmetaCache.put(DocNoObject,metadata);\n\t\t\t\t\t\t}\n\t\t\t\t\t\turls[i] = metadata[0];\n\t\t\t\t\t}\n\t\t\t\t\trs.addMetaItems(\"url\", urls);\n\t\t\t\t\n\t\t\t\t}catch(IOException ioe) {}\n\t\t\t} \n\t\t\t\n\n\t\t}\n\n\t\tif (show_docid_early && show_docid)\n\t\t{\n\t\t\tString[] documentids = new String[resultsetsize];\n\t\t\tfor(int i=0;i<resultsetsize;i++)\n\t\t\t{\n\t\t\t\tdocumentids[i] = docIndex.getDocumentNumber(docids[i]);\n\t\t\t}\n\n\t\t\tSystem.err.println(\"Decorating with docnos for \"+documentids.length + \"result\");\n\t\t\tif (documentids.length > 0)\n\t\t\t\tSystem.err.println(\"\\tFirst docno is \"+documentids[0]);\n\t\t\trs.addMetaItems(\"docid\", documentids);\n\t\t}\n\t}", "List<SearchResult> search(SearchQuery searchQuery);", "@Override\n public String doSearchResult() {\n return null;\n }", "public Result getResults()\r\n {\r\n return result;\r\n }", "public String getSummary(SearchResultFields pResult) \n {\n String summary = (String) (pResult.getFields().get(\"content\"));\n return summary;\n }", "public interface HTMLGetter {\n public Document get(String url) throws Exception;\n}", "protected abstract List<List<SearchResults>> processStream();", "public Collection<T> getResults();", "void setSearchResults(LazyDataModel<ReagentResult> searchResults);", "@Override\n public ParseResult filter(Content content, ParseResult parseResult,\n HTMLMetaTags metaTags, DocumentFragment doc) {\n\n // get parse obj\n Parse parse = parseResult.get(content.getUrl());\n\n // construct base url\n URL base;\n try {\n base = new URL(content.getBaseUrl());\n } catch (MalformedURLException e) {\n Parse emptyParse = new ParseStatus(e).getEmptyParse(getConf());\n parseResult.put(content.getUrl(), new ParseText(emptyParse.getText()),\n emptyParse.getData());\n return parseResult;\n }\n\n try {\n // extract license metadata\n Walker.walk(doc, base, parse.getData().getParseMeta(), getConf());\n } catch (ParseException e) {\n Parse emptyParse = new ParseStatus(e).getEmptyParse(getConf());\n parseResult.put(content.getUrl(), new ParseText(emptyParse.getText()),\n emptyParse.getData());\n return parseResult;\n }\n\n return parseResult;\n }", "public interface ISearchView extends BaseView {\n String getInputContent();\n void setSearchResult(List<Person> data);\n}", "void setQueryResultsUrl(String queryResultsUrl);", "public interface ISearchView extends IView{\n void showLoadSearchResult(List<Map<String, Object>> data);\n void showLoadSearchHistory(List<SearchHistory> data);\n String getSearch();\n}", "public list_results_doc_result(list_results_doc_result other) {\n if (other.isSetSuccess()) {\n java.util.List<Examination> __this__success = new java.util.ArrayList<Examination>(other.success.size());\n for (Examination other_element : other.success) {\n __this__success.add(new Examination(other_element));\n }\n this.success = __this__success;\n }\n }", "public interface Results {\n\n\tboolean resultsOk();\n\n\tResultsPanel getResultPanel();\n\n\tString getAnalysisName();\n}", "@Override\n @XmlElement(name = \"result\", required = true)\n public Collection<Result> getResults() {\n return results = nonNullCollection(results, Result.class);\n }", "public void map()\n\t{\n\t // key is the documentId\n\t\t// value is the url\n\t\t//fetch the document using the documentId\n\t\t\n\t}", "boolean getUseSearchResult();", "public List getSummaries(List result) throws DocumentNotFoundException {\n List ret = new ArrayList();\n for (Object o : result) {\n ProbDoc doc = (ProbDoc) o;\n String docID = doc.getDocID();\n ret.add(new XMLDoc(docID, getSummary(docID)));\n }\n return ret;\n }", "public GameList getSearchResult(){ return m_NewSearchResult;}", "public interface QueryResponseParser {\n Documents<IdolSearchResult> parseQueryResults(AciSearchRequest<String> searchRequest, AciParameters aciParameters, QueryResponseData responseData, IdolDocumentService.QueryExecutor queryExecutor);\n\n List<IdolSearchResult> parseQueryHits(Collection<Hit> hits);\n}", "public ReactorResult<org.ontoware.rdfreactor.schema.rdfs.Resource> getAllOfficialArtistWebpage_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), OFFICIALARTISTWEBPAGE, org.ontoware.rdfreactor.schema.rdfs.Resource.class);\r\n\t}", "List<T> getResults();", "ReagentSearch getReagentSearch();", "public ListSearchResults()\n {\n logEnter(LOG_TAG, \"<init>\");\n\n entryMap = new HashMap<String,SearchResultEntry>(0);\n entries = new LinkedList<SearchResultEntry>();\n instance = null;\n }", "public static QueryResult fromIndexerResult(Document document) {\n return new QueryResult.Builder()\n .content(document.get(LuceneFieldConstants.CONTENT.getText()))\n .filename(document.get(LuceneFieldConstants.FILE_NAME.getText()))\n .build();\n\n }", "private void search() {\n String result = \"<body bgcolor=\\\"black\\\"> \" +\n \"<font color=\\\"#009933\\\"\";\n gs.setQueryString(txtQueury.getText());\n try {\n gsr = gs.doSearch();\n txtCountRes.setText(\"\" + gsr.getEstimatedTotalResultsCount());\n gsre = gsr.getResultElements();\n\n for (int i = 0; i < gsre.length; i++) {\n if (googleTitle.isSelected()) {\n result +=\n \"<font color=\\\"red\\\"><u><b>Title: </u></b><a href=\\\"\" +\n gsre[i].getURL() + \"\\\">\"\n + gsre[i].getTitle() + \"</a><br>\" +\n \"<br><b>URL: \" +\n gsre[i].getHostName() + gsre[i].getURL() +\n \"</b></font><br>\";\n }\n if (googleSummary.isSelected()) {\n result += \"<u><b>Summary: </u></b>\" +\n gsre[i].getSummary() +\n \"<br>\";\n }\n if (googleSnippet.isSelected()) {\n result += \"<u><b>Snippet: </u></b>\" +\n gsre[i].getSnippet() +\n \"<br>\";\n }\n if (googleHostName.isSelected()) {\n result += \"<u><b>Host: </u></b>\" + gsre[i].getHostName() +\n \"<br>\";\n }\n if (googleDirectoryTitle.isSelected()) {\n result += \"<u><b>Directory Title: </u></b>\" +\n gsre[i].getDirectoryTitle() + \"<br>\";\n }\n if (googleCachedSize.isSelected()) {\n result += \"<u><>Cached Size: </u></b>\" +\n gsre[i].getCachedSize() + \"<br>\";\n }\n result += \"<br>\";\n }\n } catch (GoogleSearchFault e) {\n msg(\"Erreur d'exécution \" + e.getMessage(), \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n\n //affichage de la recherche\n editor.setText(result);\n }", "public interface SearchQuerySet extends QuerySet\n{\n\n // for AbstractSearch\n public static final int STAT_MODELS = 1;\n public static final int STAT_CLUSTERS = 2;\n public static final int STAT_GENOMES = 4;\n public static final int STAT_MODEL_CLUSTERS = 8;\n\n public String getStatsById(Collection data);\n public String getStatsByQuery(String query);\n public String getStatsById(Collection data,int stats);\n public String getStatsByQuery(String query,int stats);\n \n // for BlastSearch\n public String getBlastSearchQuery(Collection dbNames, Collection keys, KeyTypeUser.KeyType keyType);\n \n //for ClusterIDSearch\n public String getClusterIDSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for ClusterNameSearch\n public String getClusterNameSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for DescriptionSearch\n public String getDescriptionSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for GoSearch \n public String getGoSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for GoTextSearch\n public String getGoTextSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for IdSearch\n public String getIdSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for QueryCompSearch\n public String getQueryCompSearchQuery(String comp_id, String status, KeyTypeUser.KeyType keyType);\n \n // for QuerySearch\n public String getQuerySearchQuery(String queries_id, KeyTypeUser.KeyType keyType); \n \n // for SeqModelSearch\n public String getSeqModelSearchQuery(Collection model_ids, KeyTypeUser.KeyType keyType);\n \n // for UnknowclusterIdSearch\n public String getUnknownClusterIdSearchQuery(int cluster_id, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetSearch\n public String getProbeSetSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetKeySearch\n public String getProbeSetKeySearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for QueryTestSearch\n public String getQueryTestSearchQuery(String query_id, String version, String genome_id);\n \n // for QueryStatsSearch\n public String getQueryStatsSearchQuery(List query_ids,List DBs);\n \n // for PskClusterSearch\n public String getPskClusterSearchQuery(int cluster_id,KeyTypeUser.KeyType keyType);\n \n // for ClusterCorrSearch\n public String getClusterCorrSearchQuery(int cluster_id, int psk_id, KeyTypeUser.KeyType keyType);\n \n // for UnknownGenesSearch\n public String getUnknownGenesSearchQuery(Collection sources, KeyTypeUser.KeyType keyType);\n \n}", "public java.util.List<SearchRecord> generateSearchResults(String domain, String queryText, JSONObject configuration, int numberOfResults, JSONObject advConfig) {\n\t\tif (advConfig.length() > 0) {\n\t\t\tconfiguration = advConfig;\n\t\t}\n\t\t\n\t\tJSONObject googleScholarConfiguration = configuration.optJSONObject(\"googlescholar\");\n\t\tif (googleScholarConfiguration == null) { googleScholarConfiguration = new JSONObject(); }\n\t\n\t\tjava.util.List<SearchRecord> result = new java.util.ArrayList<SearchRecord>();\n\n\n\t\tint position = 0;\n\t\tnumberOfResults = Math.min(MAX_NUMBER_OF_RESULTS, numberOfResults); \n\t\tString userAgent = SourceHandlerInterface.getNextUserAgent(domain);\n\t\t\n\t\ttry (CloseableHttpClient httpclient = HttpClients.custom().setUserAgent(userAgent).build()) {\n\t\t\tString uri = this.createURIString(queryText, numberOfResults, googleScholarConfiguration);\n\t\t\tsrcLogger.log(Level.INFO, \"googlescholar URI: \" + uri);\n\t\t\t\n\t\t\twhile (result.size() < numberOfResults && uri != null) {\n\t\t\t\ttry (CloseableHttpResponse response = httpclient.execute(new HttpGet(uri))) {\n\t\n\t\t\t\t\tint code = response.getStatusLine().getStatusCode();\n\t\t\t\t\tif (code != HttpStatus.SC_OK) {\n\t\t\t\t\t\tsrcLogger.log(Level.SEVERE, \"googlescholar HTTP Response code: \" + code);\n\t\t\t\t\t\tsrcLogger.log(Level.SEVERE, \" status line: \" + response.getStatusLine());\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tString content = FileUtilities.read(response.getEntity().getContent());\n\t\t\t\t\torg.jsoup.nodes.Document doc = Jsoup.parse(content, uri);\n\n\t\t\t\t\t/*\n\t\t\t\t\t \n\t\t\t'title': '.gs_rt a *::text',\n 'url': '.gs_rt a::attr(href)',\n 'related-text': '.gs_ggsS::text',\n 'related-type': '.gs_ggsS .gs_ctg2::text',\n 'related-url': '.gs_ggs a::attr(href)',\n 'citation-text': '.gs_fl > a:nth-child(1)::text',\n 'citation-url': '.gs_fl > a:nth-child(1)::attr(href)',\n 'authors': '.gs_a a::text',\n 'description': '.gs_rs *::text',\n 'journal-year-src': '.gs_a::text',\n\t\t\t\t\t \n\t\t\t\t\t */\n\t\t\t\t\t\n\t\t\t\t\tElements items = doc.select(\"div.gs_r\");\n\t\t\t\t\tfor (org.jsoup.nodes.Element e: items) {\n\t\t\t\t\t\tString url = null;\n\t\t\t\t\t\t// First, check to see if a full text document is available. If so, use that as the url.\n\t\t\t\t\t\tElements links = e.select(\"div.gs_ggsd a\");\n\t\t\t\t\t\tfor (Element linkElement: links) {\n\t\t\t\t\t\t\tif (linkElement.text().contains(\"Find Text @ NCSU\") == false) {\n\t\t\t\t\t\t\t\turl = linkElement.attr(\"href\");\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\t\n\t\t\t\t\t\tElement link = e.select(\"h3.gs_rt a\").first();\n\t\t\t\t\t\tif (link == null) { continue; }\n\t\t\t\t\t\tString title = link.text(); \n\t\t\t\t\t\tif (url == null) { url = link.attr(\"href\"); }\n\t\t\t\t\t\tString description = null; \n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tdescription = e.select(\".gs_rs\").first().text();\n\t\t\t\t\t\t} catch (NullPointerException npe) {\n\t\t\t\t\t\t\tsrcLogger.log(Level.WARNING,\"No description fround in google scholar handler, null pointer exception\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (title != null || url != null || description !=null)\t{\n\t\t\t\t\t\t\tposition++;\n\t\t\t\t\t\t\tSearchRecord r = new SearchRecord(title,url,description,position,SOURCE_HANDLER_NAME);\n\t\t\t\t\t\t\tresult.add(r);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Next, let's get the next page ...\n\t\t\t\t\ttry {\n\t\t\t\t\t\tElement nextLink = doc.select(\"a:contains(Next):has(span.gs_ico_nav_next)\").first();\n\t\t\t\t\t\turi = nextLink.attr(\"href\");\n\t\t\t\t\t\tif (uri.startsWith(\"http\") == false) {\n\t\t\t\t\t\t\turi = \"https://scholar.google.com\" + uri;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(uri);\t\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\turi = null; // link not found\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\tsrcLogger.log(Level.SEVERE, \"googlescholar exception: \",e);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Exception ioe) {\n\t\t\tsrcLogger.log(Level.SEVERE, \"httpclient exception: \" + ioe.toString());\n\t\t\treturn null;\t\t\t\n\t\t}\n\t\t\n\t\t//result.stream().forEach(System.out::println);\n\t\t\n\t\treturn result;\n\t}", "Search getSearch();", "@Override\n public void crawl() {\n Document doc;\n try {\n\n\n doc = Jsoup.connect(rootURL).userAgent(\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A\").get();\n\n Elements articles = doc.select(\"section.list article\");\n\n System.out.println(\"Number of articles found:\"+articles.size());\n //list of links found\n for(Element article: articles){\n\n Element titleLink = article.select(\"a\").first();\n System.out.println(titleLink.attr(\"abs:href\"));\n\n //if the url found is in the cache, do not retrieve the url.\n if(urlCache.contains(titleLink.attr(\"abs:href\"))) {\n System.out.println(\"Doucment found in cache, ignoring document\");\n continue;\n }\n\n storeDocument(Jsoup.connect(titleLink.attr(\"abs:href\")).get());\n\n //add the URL to the cache so that we don't retrieve it again.\n urlCache.add(titleLink.attr(\"abs:href\"));\n }\n\n\n } catch (Exception e){\n logger.log(Level.SEVERE, \"Error Retrieving from URL\", e);\n e.printStackTrace();\n }\n }", "@Override\n public Data3DPlastic search() {\n return super.search();\n }", "public interface SearcherConstructor {\n public HashMap<String,String> getHeader();\n public String getUrl(String word, int page);\n public NetImage[] getImageList(String response);\n}", "public AbstractElement(final Result result) {\n results = singleton(result, Result.class);\n }", "SearchResult<TimelineMeta> search(SearchParameter searchParameter);", "@java.lang.Override\n public entities.Torrent.NodeSearchResult getResults(int index) {\n return results_.get(index);\n }", "@Override\n protected void completeIndexerSearchResult(String response, IndexerSearchResult indexerSearchResult, AcceptorResult acceptorResult, SearchRequest searchRequest, int offset, Integer limit) {\n Document doc = Jsoup.parse(response);\n if (doc.select(\"table.xMenuT\").size() > 0) {\n Element navigationTable = doc.select(\"table.xMenuT\").get(1);\n Elements pageLinks = navigationTable.select(\"a\");\n boolean hasMore = !pageLinks.isEmpty() && pageLinks.last().text().equals(\">\");\n boolean totalKnown = false;\n indexerSearchResult.setOffset(searchRequest.getOffset());\n int total = searchRequest.getOffset() + 100; //Must be at least as many as already loaded\n if (!hasMore) { //Parsed page contains all the available results\n total = searchRequest.getOffset() + indexerSearchResult.getSearchResultItems().size();\n totalKnown = true;\n }\n indexerSearchResult.setHasMoreResults(hasMore);\n indexerSearchResult.setTotalResults(total);\n indexerSearchResult.setTotalResultsKnown(totalKnown);\n } else {\n indexerSearchResult.setHasMoreResults(false);\n indexerSearchResult.setTotalResults(0);\n indexerSearchResult.setTotalResultsKnown(true);\n }\n indexerSearchResult.setPageSize(100);\n indexerSearchResult.setOffset(offset);\n }", "abstract public boolean performSearch();", "public interface PagableResult {\n Integer getTotal();\n Integer getResults();\n}", "public List<MCRContent> getAll() throws IOException, JDOMException, SAXException {\n\t\tList<MCRContent> resultsSet = new ArrayList<>();\n\t\t// build basic part of API URL\n\t\tString baseQueryURL = API_URL + \"/affiliation/AFFILIATION_ID:\" + AFFIL_ID + \"?apikey=\" + API_KEY\n\t\t\t\t+ \"&view=DOCUMENTS\";\n\n\t\t// divide API request in blocks a XXX documents (in final version 200\n\t\t// documents per block, number of blocks determined by total number of\n\t\t// documents)\n\t\t// int numberOfPublications = getNumberOfPublications(baseQueryURL);\n\t\t// at the moment only testing, two blocks a 10 documents\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tint start = 10 * i;\n\t\t\tint count = 10;\n\n\t\t\t// build API URL\n\t\t\tString queryURL = baseQueryURL + \"&start=\" + start + \"&count=\" + count + \"&view=DOCUMENTS\";\n\n\t\t\t// add block to list of blocks\n\t\t\tresultsSet.add(getResponse(queryURL));\n\t\t}\n\t\t// return API-response\n\t\treturn resultsSet;\n\t}", "public ReactorResult<org.ontoware.rdfreactor.schema.rdfs.Resource> getAllCommercialInformationURL_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), COMMERCIALINFORMATIONURL, org.ontoware.rdfreactor.schema.rdfs.Resource.class);\r\n\t}", "public List getResultSummaries(Query query)\n throws UnsupportedQueryException, IndexException, DocumentNotFoundException {\n List r = getResult(query);\n List result = new ArrayList();\n for (Object o : r) {\n ProbDoc pd = (ProbDoc) o;\n result.add(new XMLDoc(pd, getSummary(pd)));\n }\n return result;\n }", "@Override\r\n\tpublic void process(ResultItems resultItems, Task task) {\n\t\tfinal String url = resultItems.getRequest().getUrl();\r\n\t\tSystem.out.println(\"****************--Entry Pipeline Process--*****************\");\r\n\t\tSystem.out.println(\"Get page: \" + url);\r\n\r\n\t\t/*\r\n\t\t * if(url.matches(\r\n\t\t * \"http://blog\\\\.sina\\\\.com\\\\.cn/s/articlelist_.*\\\\.html\")){//文章列表\r\n\t\t * System.out.println(\"No Op in Article List\"); // }else\r\n\t\t * if(url.matches(\"http://www\\\\.asianews\\\\.it/news-en/.*\")){\r\n\t\t */\r\n\t\t// 具体文章内容\r\n\t\tString time = null, title = null, content = null, abstracts = null, convertUrl = null,query=\"\";\r\n\r\n\t\tfor (Map.Entry<String, Object> entry : resultItems.getAll().entrySet()) {\r\n\t\t\t// System.out.println(entry.getKey()+\":\\n\"+entry.getValue());\r\n\r\n\t\t\tif (AsianViewDetailItem.TIME.equals(entry.getKey())) {\r\n\t\t\t\ttime = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.TITLE.equals(entry.getKey())) {\r\n\t\t\t\ttitle = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.ABSTRACT.equals(entry.getKey())) {\r\n\t\t\t\tabstracts = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.CONTENT.equals(entry.getKey())) {\r\n\t\t\t\tcontent = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.URL.equals(entry.getKey())) {\r\n\t\t\t\tassert url.equals(entry.getValue());\r\n\t\t\t} else if (AsianViewDetailItem.CONVERT_URL.equals(entry.getKey())) {\r\n\t\t\t\tconvertUrl = (String) entry.getValue();\r\n\t\t\t}else if(AsianViewDetailItem.QUERY.equals(entry.getKey())){\r\n//\t\t\t\tquery=\"//query_\"+(String) entry.getValue();\r\n\t\t\t\tquery=(entry.getValue()!=null)?\"//query_\"+entry.getValue():\"\";\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// System.out.println(\"Time:\\n\"+CorpusFormatter.timeFormat(time));\r\n\t\t//\r\n\t\t// System.out.println(\"Title:\\n\"+title);\r\n\t\t//\r\n\t\t// System.out.println(\"Abstract:\\n\"+abstracts);\r\n\t\t//\r\n\t\t// System.out.println(\"Content:\\n\"+content);\r\n\t\t//\r\n\t\t// System.out.println(\"Url:\\n\"+url);\r\n\r\n\t\tString id = String.format(\"%s-%s\", time, ++counter);\r\n\r\n\t\tfinal String fileName = String.format(\".//\" + FileUtils.docName + \"%s//%s.txt\",query, id);\r\n\t\tSystem.out.println(\"File name :\" + fileName);\r\n\t\t// FileUtils.writeContent(fileName, time, title, content);\r\n\t\tFileUtils.writeCorpus(fileName,\r\n\t\t\t\tconvertUrl != null\r\n\t\t\t\t\t\t? CorpusFormatter.format(id, time, url, \"T\", \"P\", title, abstracts,\r\n\t\t\t\t\t\t\t\tcontent, \"\", \"\", convertUrl)\r\n\t\t\t\t\t\t: CorpusFormatter.format(id, time, url, \"T\", \"P\", title, abstracts,\r\n\t\t\t\t\t\t\t\tcontent, \"\", \"\"));\r\n\r\n\t\t// }else{\r\n\t\t// System.out.println(\"Can't match Url\");\r\n\t\t// }\r\n\t\tSystem.out.println(\"****************--Exit Pipeline Process--*****************\");\r\n\r\n\t}", "@SuppressWarnings( \"unchecked\" )\n\t@Transactional\n\t@RequestMapping( value = \"/search\", method = RequestMethod.GET )\n\tpublic @ResponseBody Map<String, Object> getPublicationList( \n\t\t\t@RequestParam( value = \"query\", required = false ) String query,\n\t\t\t@RequestParam( value = \"publicationType\", required = false ) String publicationType,\n\t\t\t@RequestParam( value = \"authorId\", required = false ) String authorId,\n\t\t\t@RequestParam( value = \"eventId\", required = false ) String eventId,\n\t\t\t@RequestParam( value = \"page\", required = false ) Integer page, \n\t\t\t@RequestParam( value = \"maxresult\", required = false ) Integer maxresult,\n\t\t\t@RequestParam( value = \"source\", required = false ) String source,\n\t\t\t@RequestParam( value = \"fulltextSearch\", required = false ) String fulltextSearch,\n\t\t\t@RequestParam( value = \"year\", required = false ) String year,\n\t\t\t@RequestParam( value = \"orderBy\", required = false ) String orderBy,\n\t\t\tfinal HttpServletResponse response )\n\t{\n\t\t/* == Set Default Values== */\n\t\tif ( query == null ) \t\t\tquery = \"\";\n\t\tif ( publicationType == null ) \tpublicationType = \"all\";\n\t\tif ( page == null )\t\t\t\tpage = 0;\n\t\tif ( maxresult == null )\t\tmaxresult = 50;\n\t\tif ( fulltextSearch == null || ( fulltextSearch != null && fulltextSearch.equals( \"yes\" ) ) )\n\t\t\tfulltextSearch = \"yes\";\n\t\telse\t\t\t\t\t\t\tfulltextSearch = \"no\";\n\t\tif ( year == null || year.isEmpty() )\n\t\t\tyear = \"all\";\n\t\tif ( orderBy == null )\t\t\torderBy = \"citation\";\n\t\t// Currently, system only provides query on internal database\n\t\tsource = \"internal\";\n\t\t\t\n\t\t\n\t\t// create JSON mapper for response\n\t\tMap<String, Object> responseMap = new LinkedHashMap<String, Object>();\n\n\t\tresponseMap.put( \"query\", query );\n\t\tif ( !publicationType.equals( \"all\" ) )\n\t\t\tresponseMap.put( \"publicationType\", publicationType );\n\t\tif ( !year.equals( \"all\" ) )\n\t\t\tresponseMap.put( \"year\", year );\n\t\tresponseMap.put( \"page\", page );\n\t\tresponseMap.put( \"maxresult\", maxresult );\n\t\tresponseMap.put( \"fulltextSearch\", fulltextSearch );\n\t\tresponseMap.put( \"orderBy\", orderBy );\n\t\t\n\t\tMap<String, Object> publicationMap = publicationFeature.getPublicationSearch().getPublicationListByQuery( query, publicationType, authorId, eventId, page, maxresult, source, fulltextSearch, year, orderBy );\n\t\t\n\t\tif ( (Integer) publicationMap.get( \"totalCount\" ) > 0 )\n\t\t{\n\t\t\tresponseMap.put( \"totalCount\", (Integer) publicationMap.get( \"totalCount\" ) );\n\t\t\treturn publicationFeature.getPublicationSearch().printJsonOutput( responseMap, (List<Publication>) publicationMap.get( \"publications\" ) );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresponseMap.put( \"totalCount\", 0 );\n\t\t\tresponseMap.put( \"count\", 0 );\n\t\t\treturn responseMap;\n\t\t}\n\t}", "public abstract Intent constructResults();", "List<String> getDocumentTitles(String query) throws SearcherException;", "@Override\r\n\t\t\tpublic List<ScoredDocument> search(Query query) {\n\t\t\t\treturn null;\r\n\t\t\t}", "public ReactorResult<org.ontoware.rdfreactor.schema.rdfs.Resource> getAllOfficialFileWebpage_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), OFFICIALFILEWEBPAGE, org.ontoware.rdfreactor.schema.rdfs.Resource.class);\r\n\t}", "public interface Result<T> {\r\n\t/**\r\n\t * Return all of the players involved in this result.\r\n\t */\r\n\tList<Player> getPlayers();\r\n\r\n\t/**\r\n\t * Returns all of the results (however the implementation stores them)\r\n\t */\r\n\tList<T> getResults();\r\n\r\n\t/**\r\n\t * Adds a specific subsidiary result to this aggregation. When implemented,\r\n\t * this method may perform on-the-fly analysis appropriate to this game, ie,\r\n\t * keeping track of number of games won by each Player or types of moves\r\n\t * deployed by a Player (defection/cooperation in Prisoner's Dilemma).\r\n\t * Alternatively, this information may be aggregated by the Game's associated\r\n\t * DataReader, in which case the default implementation in AbstractResult\r\n\t * should be sufficient. \r\n\t */\r\n\tvoid add(T result);\r\n}", "default void download(SearchResult result) {\n download(result, \".\");\n }", "@Override\n\tprotected void parseResult() {\n\t\t\n\t}", "public void findBookDetails(AnnotateImageResponse imageResponse) throws IOException {\n\n String google = \"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=\";\n String search = \"searchString\";\n String charset = \"UTF-8\";\n\n URL url = new URL(google + URLEncoder.encode(search, charset));\n Reader reader = new InputStreamReader(url.openStream(), charset);\n GoogleResults results = new Gson().fromJson(reader, GoogleResults.class);\n\n // Show title and URL of 1st result.\n System.out.println(results.getResponseData().getResults().get(0).getTitle());\n System.out.println(results.getResponseData().getResults().get(0).getUrl());\n }", "public QueryResult<T> getResult();", "WebCrawlerData retrieve(String url);", "public abstract RefreshResults refresh();", "public interface CarResultsPage {\n\n String getDesignId();\n\n Boolean isDiscountNoteDisplayed();\n\n boolean isNoResultsMessageDisplayed();\n\n boolean isWhatIsHotRateModuleDisplayed();\n\n LegalNotesFragment getLegalNotesFragment();\n\n boolean isNearbyAirportModuleDisplayed();\n\n String getStartLocation();\n\n CarSolutionFragmentsList<CarSolutionFragment> getResult();\n\n boolean isIntentMediaElementsExisting();\n\n boolean isMeSoBannersDisplayed();\n}", "abstract public void search();", "public List<SimilarResult<T>> getResults() {\n return Collections.unmodifiableList(results);\n }", "public static ReactorResult<org.ontoware.rdfreactor.schema.rdfs.Resource> getAllOfficialArtistWebpage_as(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\treturn Base.getAll_as(model, instanceResource, OFFICIALARTISTWEBPAGE, org.ontoware.rdfreactor.schema.rdfs.Resource.class);\r\n\t}", "abstract GridPane createSearchResultArea(ResultSet result);", "entities.Torrent.NodeSearchResult getResults(int index);", "public interface SearchView {\n void showPictureSuccess(int page, List<ResponseSearch.DataBean> dataBeen);\n void showNoMoreData();\n void showFailed();\n}", "public interface Search {\n ArrayList<Section> searchSecByTitle(String info);\n\n ArrayList<Section> searchSecByCourse_id(String info);\n}", "public abstract ISearchCore getSearchCore();", "public interface PaginatedResult<T> {\n\n\t/**\n\t * Get the contents as an array of component type\n\t */\n\tpublic T[] items();\n\n\t/**\n\t * Obtain params required to perform the given relative query\n\t */\n\tpublic abstract PaginatedResult<T> first() throws AblyException;\n\tpublic abstract PaginatedResult<T> current() throws AblyException;\n\tpublic abstract PaginatedResult<T> next() throws AblyException;\n\n\tpublic abstract boolean hasFirst();\n\tpublic abstract boolean hasCurrent();\n\tpublic abstract boolean hasNext();\n}", "public DocumentListFeed exactTitleQuery(String title) throws MalformedURLException, IOException, ServiceException;", "public IScapSyncSearchResult[] getResults();", "String getQueryResultsUrl();", "public static void search() {\n\t\tList<Domain> domains = DomainService.findAll();\n\t\t\n\t\tlogger.info(\"{} domains selected to search\", domains.size());\n\t\t\n\t\tMap<String, Integer> sourceMap = getSourceMap();\n\t\tString currentDomain = \"\";\n\t\t\n\t\tMap<String, SearchResult> resultMap = new HashMap<String, SearchResult>();\n\t\t\n\t\tfor (Domain domain : domains) {\n\t\t\tcurrentDomain = domain.getName();\n\t\t\t\n\t\t\tlogger.info(\"{} domain searching started\", currentDomain);\n\t\t\t\n\t\t\t// The last search time prevents getting the same articles which were already retrieved at the last search\n\t\t\tString lastSearch = MongoService.getLastSearchTime(currentDomain);\t\t\t\n\t\t\tMongoService.setLastSearchTime(currentDomain, DatetimeUtil.getUTCDatetime());\n\t\t\t\n\t\t\tlogger.info(\"{} domain last searched {}\", currentDomain, lastSearch);\n\t\t\t\n\t\t\tList<String> domainKeywords = domain.getKeywords();\n\t\t\tList<Source> sources = domain.getSources();\n\t\t\t\n\t\t\tList<String> sourceNames = new ArrayList<String>();\n\t\t\tfor (Source source : sources) {\n\t\t\t\tsourceNames.add(source.getDomain());\n\t\t\t}\n\t\t\t\n\t\t\tList<Topic> topics = domain.getTopics();\n\t\t\t\n\t\t\t// If the domain contains any topic, get the topic keywords and merge them with the domain keywords. \n\t\t\tif (topics.size() > 0) {\n\t\t\t\tfor (Topic topic : topics) {\n\t\t\t\t\tList<String> topicKeywords = topic.getKeywords();\n\t\t\t\t\t\n\t\t\t\t\tList<String> ids = Searcher.search(sourceNames, lastSearch, domainKeywords, topicKeywords);\n\t\t\t\t\t\n\t\t\t\t\tfor (String id : ids) {\n\t\t\t\t\t\tif (resultMap.containsKey(id)) {\n\t\t\t\t\t\t\tSearchResult result = resultMap.get(id);\n\t\t\t\t\t\t\tArticle article = result.getArticle();\n\t\t\t\t\t\t\tarticle.attachTopic(topic);\n\t\t\t\t\t\t\tarticle.attachDomain(domain);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSearchResult result;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tresult = new SearchResult(id);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tArticle article = result.getArticle();\n\t\t\t\t\t\t\tArticleDocument doc = result.getDoc();\n\t\t\t\t\t\t\tarticle.attachDomain(domain);\n\t\t\t\t\t\t\tarticle.setSourceId(sourceMap.get(doc.getSource()));\n\t\t\t\t\t\t\tarticle.attachTopic(topic);\n\t\t\t\t\t\t\tresultMap.put(id, result);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tList<String> ids = Searcher.search(sourceNames, lastSearch, domainKeywords, null);\n\t\t\t\t\n\t\t\t\tfor (String id : ids) {\n\t\t\t\t\tSearchResult result;\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tresult = new SearchResult(id);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tArticle article = result.getArticle();\n\t\t\t\t\tArticleDocument doc = result.getDoc();\n\t\t\t\t\tarticle.attachDomain(domain);\n\t\t\t\t\tarticle.setSourceId(sourceMap.get(doc.getSource()));\n\t\t\t\t\tresultMap.put(id, result);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfor (Map.Entry<String, SearchResult> entry : resultMap.entrySet())\n\t\t\t{\n\t\t\t\tlogger.info(\" {} : {}\", entry.getValue().getArticle().getTitle(), entry.getValue().getArticle().getUrl());\n\t\t\t}\n\t\t}\n\t\t\n\t\tinsertArticles(resultMap);\n\t}", "public interface ArticleListViewInterface {\n void showSearchResult(LoaderSearchResult loaderSearchResult);\n}", "@Override\r\n\tpublic String getDescription() {\n\t\tString descr=\"Results\";\r\n\t\treturn descr;\r\n\t}", "public DefaultResults() {\n this.results = new ArrayList<R>();\n this.totalCc = new ArrayList<Long>();\n this.maximalCc = new ArrayList<Long>();\n this.totalBytes = new ArrayList<Long>();\n this.maximalBytes = new ArrayList<Long>();\n this.maximalMemory = new ArrayList<Long>();\n }", "@java.lang.Override\n public java.util.List<entities.Torrent.NodeSearchResult> getResultsList() {\n return results_;\n }", "@Override\r\n\tpublic void find(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tURL1=\"/admin/xiaoshuolist.jsp\";\r\n\t\tthis.searchFields=\"title,content,categorytitle,author\";\r\n\t\tsuper.find(request, response);\r\n\t}", "java.util.List<entities.Torrent.NodeSearchResult>\n getResultsList();", "protected abstract void retrievedata();", "ResultSummary getActualResultSummary();", "public interface ISearchResultCustomizer<T>\r\n{\r\n\t/**\r\n\t * Customizer.\r\n\t *\r\n\t * @param results the results\r\n\t * @return the list\r\n\t */\r\n\tpublic default List<T> customize(List<T> results)\r\n\t{\r\n\t\treturn results;\r\n\t}\r\n\r\n\t/**\r\n\t * Can be used to customize the file being exported and result in entire new file.\r\n\t * @param results\r\n\t * @param resultFile\r\n\t * @return\r\n\t */\r\n\tpublic default FileInfo customizeExportingFile(ExecuteSearchResponse results, FileInfo resultFile)\r\n\t{\r\n\t\treturn resultFile;\r\n\t}\r\n}", "public ReactorResult<org.ontoware.rdfreactor.schema.rdfs.Resource> getAllCopyrightInformationURL_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), COPYRIGHTINFORMATIONURL, org.ontoware.rdfreactor.schema.rdfs.Resource.class);\r\n\t}", "void download(SearchResult result, String downloadPath);", "void initiateIndexing(HarvestResultDTO harvestResult) throws DigitalAssetStoreException;", "public static SearchResults createSearchResults(ClientResults apiResults) {\n List<SearchResult> resultList = new ArrayList<>();\n if (apiResults == null) return null;\n List<Item> topList = apiResults.getItems()\n .subList(0, (apiResults.getItems().size() >= MAX_DISPLAY_COUNT) ? MAX_DISPLAY_COUNT : apiResults.getItems().size());\n for (Item apiResult : topList) {\n\n if (apiResult.getOwner() == null ||\n apiResult.getDescription().isEmpty() ||\n StringUtil.isEmpty(apiResult.getName()) ||\n StringUtil.isEmpty(apiResult.getUrl()) ||\n StringUtil.isEmpty(apiResult.getDescription()) ||\n StringUtil.isEmpty(apiResult.getStargazersCount())) continue;\n\n Owner owner = apiResult.getOwner();\n if (StringUtil.isEmpty(owner.getAvatarUrl()) ||\n StringUtil.isEmpty(owner.getOrgName())) continue;\n\n SearchResult result = new SearchResult();\n result.setRepositoryName(apiResult.getName());\n result.setOrgName(owner.getOrgName());\n result.setWebUrl(apiResult.getUrl());\n result.setAvatarUrl(apiResult.getOwner().getAvatarUrl());\n result.setDescription(apiResult.getDescription());\n try {\n result.setStarCount(Integer.parseInt(apiResult.getStargazersCount()));\n } catch (NullPointerException exception) {\n continue;\n }\n resultList.add(result);\n\n }\n SearchResults searchResults = new SearchResults();\n searchResults.setSearchResults(resultList);\n return searchResults;\n }", "SearchResult getBestResult(List<SearchResult> results, SearchQuery query);", "public List<CorpusSearchHit> getResult() {\n return result;\n }" ]
[ "0.69843453", "0.6687512", "0.6659099", "0.61619014", "0.5975745", "0.596704", "0.5870744", "0.56823367", "0.56754583", "0.5657077", "0.56095403", "0.55635494", "0.552764", "0.55049795", "0.5461939", "0.5451745", "0.54315513", "0.5425314", "0.53931487", "0.53908116", "0.53876346", "0.53821075", "0.5362392", "0.53549474", "0.53511906", "0.5350662", "0.53381246", "0.5336175", "0.53305805", "0.53270674", "0.53266597", "0.5311052", "0.53105897", "0.53061265", "0.5273695", "0.5268696", "0.52660257", "0.5256136", "0.5255955", "0.5255434", "0.5236663", "0.5230354", "0.5222715", "0.5216473", "0.5204231", "0.51978", "0.5195882", "0.51778346", "0.5170762", "0.51629686", "0.514894", "0.51435417", "0.51293415", "0.5129049", "0.51185584", "0.51183003", "0.51121265", "0.5102433", "0.50924647", "0.5088247", "0.50688034", "0.5045153", "0.5037187", "0.50347227", "0.5012821", "0.501156", "0.5004602", "0.49976367", "0.4996607", "0.49882624", "0.49843642", "0.4982504", "0.49814087", "0.49768582", "0.4972155", "0.49699894", "0.4967219", "0.49656764", "0.4959479", "0.49594098", "0.49547103", "0.49536324", "0.49531597", "0.49485222", "0.49404123", "0.49395344", "0.4939257", "0.4933073", "0.49257788", "0.49217325", "0.49215096", "0.49179488", "0.49163258", "0.49138415", "0.49088517", "0.4900058", "0.48917133", "0.48882627", "0.48881888", "0.4886281" ]
0.7444063
0
Gets the rank of the result fetched.
public int getRank();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getRank() {\n validify();\n return Client.INSTANCE.pieceGetRank(ptr);\n }", "long getRank();", "public int returnRank() {\n return this.data.returnRank();\n }", "public Integer getRank() {\n return this.rank;\n }", "public int getRank() {\r\n return rank;\r\n }", "public Integer getRank(){\r\n\t\treturn rank;\r\n\t}", "public int getRank() {\n return rank;\n }", "public int getRank() {\n return rank;\n }", "public int getRank() {\n return rank;\n }", "public Integer getRank() {\r\n\t\treturn this.rank;\r\n\t}", "public long getRank() {\n return rank_;\n }", "public int getRanking() {\n return ranking_;\n }", "public int getRank()\n {\n return rank;\n }", "public int getRank()\n\t{\n\t\treturn rank;\n\t}", "public int getRank()\n {\n return rank;\n }", "public int getRank() {\r\n\t\tif(!isValid)\r\n\t\t\treturn -1;\r\n\t\treturn rank;\r\n\t}", "public int getRank()\r\n {\r\n return this.rank;\r\n }", "public int rank() { return this.rank; }", "public long getRank() {\n return rank_;\n }", "public Integer rank() {\n return data.getInt(FhirPropertyNames.PROPERTY_RANK);\n }", "public int getRanking() {\n return ranking_;\n }", "int getRanking();", "public int getRank() {\n\t\treturn rank;\n\t}", "public int getRank() {\n\t\treturn rank;\n\t}", "public int getRank() {\n\t\treturn rank;\n\t}", "public int getRank() {\n\t\treturn rank;\n\t}", "long getFromRank();", "public String rank() {\r\n return rank;\r\n }", "public int Rank();", "public int getRanking(){\n int spelerID = Integer.valueOf(spelerIDField.getText());\n int ranking=0;\n try {\n Connection con = Main.getConnection();\n PreparedStatement st = con.prepareStatement(\"SELECT ranking FROM Spelers WHERE idcode = ?\");\n st.setInt(1, spelerID);\n ResultSet rs= st.executeQuery();\n if(rs.next()) {\n return rs.getInt(\"ranking\");\n }\n }catch(Exception e) {\n System.out.println(e);\n }\n return ranking;\n }", "public byte getRank() {\n return rank;\n }", "public Integer getRankValue() {\r\n\t\treturn rank;\r\n\t}", "public Rank getRank()\n\t{\n\t\treturn rank;\n\t}", "public String getRank()\r\n\t{\r\n\t\treturn rank;\r\n\t}", "public int getRank(){\r\n return this.rank;\r\n }", "public int getRank(){\n return rank;\n }", "public String getRank()\n {\n return _rank;\n }", "public String getRank() {\r\n return rank;\r\n }", "public String getRank() {\n return rank;\n }", "public int getRank(){\n return this.rank;\n }", "public int getRank(){\r\n\t\tif(this.rank.equals(RANKS[0])){ return -1; } // \"no card\"\r\n\t\treturn rankValue.get(this.rank);\r\n\t}", "@Override\n public int getRank() {\n return rank;\n }", "public String getRank() {\n\t\treturn rank;\n\t}", "public Rank rank(){\n return PackedCard.rank(this.nbCard);\n }", "public RankType getRank() {\n return rank;\n }", "long getToRank();", "public int getrank() {\n\t\treturn this.rank;\n\t}", "public Rank getRank()\n {\n return rank;\n }", "Response<Integer> getRank(String leaderboardId, int score, int scope);", "public Ranking getRanking() {\n return ranking;\n }", "Response<Integer> getRank(String leaderboardId, String username, String uniqueIdentifier, int scope);", "public LSPRanking getRanking () {\r\n return ranking;\r\n }", "public int getRank(){\n\t\tswitch(getTkn()){\n\t\t\tcase Not:\n\t\t\treturn 7;\n\t\t\t\n\t\t\tcase Kali:\n\t\t\tcase Bagi:\n\t\t\tcase Mod:\n\t\t\tcase Div:\n\t\t\treturn 6;\n\t\t\t\n\t\t\tcase Tambah:\n\t\t\tcase Kurang:\n\t\t\treturn 5;\n\t\t\t\n\t\t\tcase KurangDari:\n\t\t\tcase LebihDari:\n\t\t\tcase KurangDariSamaDengan:\n\t\t\tcase LebihDariSamaDengan:\n\t\t\treturn 4;\n\t\t\t\t\t\t\n\t\t\tcase SamaDengan:\n\t\t\tcase TidakSamaDengan:\n\t\t\treturn 3;\n\t\t\t\n\t\t\tcase And:\n\t\t\treturn 2;\n\t\t\t\n\t\t\tcase Xor:\n\t\t\treturn 1;\n\t\t\t\n\t\t\tcase Or:\n\t\t\treturn 0;\n\n\t\t\tdefault:\n\t\t\treturn -999;\n\t\t}\n\t}", "public int getRankInteger(Rank _rank) {\n return _rank.rank;\n }", "public int rank() throws MPJException {\n\n IbisIdentifier id = MPJ.getMyId();\n if (this.table != null) {\n for (int i = 0; i < this.table.size(); i++) {\n IbisIdentifier a = this.table.elementAt(i);\n if (a.equals(id)) {\n return (i);\n }\n }\n }\n\n return (MPJ.UNDEFINED);\n }", "public int getRank ()\n {\n return this.ranks; \n }", "public Vector getRank() {\n return rank;\n }", "public int getRank(){\n return Value;\n }", "public short getRank(){\n\t\treturn srtRank;\r\n\t\t\r\n\t}", "public int getIdentifiableRank(Identifiable identifiable) {\n\t\tString key = identifiable.getURI().lastSegment();\n\t\tif(rankCache.containsKey(key)) \n\t\t\treturn rankCache.get(key);\n\t\t\n\t\tActivator.logError(\"Unable to find server rank for node \"+key+\". Assigning to first server\", new Exception());\n\t\treturn 0;\n\t\t// Random\n//\t\tint hash = identifiable.getURI().toString().hashCode();\n//\t\thash = Math.abs(hash);\n//\t\tint node = hash % getNumNodes();\n//\t\treturn node;\n\n\t\t// USA Mexico\n//\t\tif((identifiable.getURI().lastSegment().startsWith(\"MX\") || identifiable.getURI().lastSegment().startsWith(\"MEX\"))) return 1; \n//\t\treturn 0; // everything else is on the first node.\n\t}", "public int value() {\n return this.intRank;\n }", "public Card.Rank rank() {\n return PackedCard.rank(packedCard);\n }", "public Integer getGameRank() {\n return gameRank;\n }", "public Rank getRank() {\n return cardRank;\n }", "public double getRankScore() {\n return this.rankScore;\n }", "public int Rank() {\n return group_.Rank();\n }", "public String getRank() {\n if(dbMgr.checkAdmin(username))\n return \"Admin\";\n\n else if(dbMgr.checkBannedUser(username))\n return \"Banned\";\n\n else if(dbMgr.checkReviewUser(username))\n return \"Review User\";\n\n else if(dbMgr.checkPremiumUser(username))\n return \"Premium User\";\n\n else \n return \"user\";\n }", "public List<RankingDTO> getRanking() {\n\t\treturn this.ranking;\n\t}", "public String getResearchrank() {\r\n\t\treturn researchrank;\r\n\t}", "private int getGlobalRanking() {\n\t\tint globalRanking = 0;\n\t\ttry{\n\t\t\t//Retrieve list of all players and order them by global score\n\t\t\tArrayList<Player> allPlayers = dc.getAllPlayerObjects();\n\t\t\tCollections.sort(allPlayers, new Comparator<Player>(){\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic int compare(Player p1, Player p2) {\n\t\t\t\t\treturn p2.getGlobalScore() - p1.getGlobalScore();\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\n\t\t\t//Search for the user in the ordered list\n\t\t\tglobalRanking = allPlayers.indexOf(dc.getCurrentPlayer()) +1;\n\n\t\t} catch(DatabaseException e) {\n\t\t\tactivity.showNegativeDialog(\"Error\", e.prettyPrint(), \"OK\");\n\t\t}\n\t\treturn globalRanking;\n\t}", "public int rank(K key);", "@Override\r\n\tpublic float getRank() {\r\n\t\tfloat rank = 0;\r\n\t\tif( players != null && !players.isEmpty() ) {\r\n\t\t\tfloat totalAbility = 0;\r\n\t\t\tfor (Player player : players) {\r\n\t\t\t\ttotalAbility += player.getAbility();\r\n\t\t\t}\r\n\t\t\trank = totalAbility / players.size();\r\n\t\t}\r\n\t\t\r\n\t\treturn rank;\r\n\t}", "private int getRank(DiceModel playerToRank) {\n\t\tint rank = 1;\n\t\tint ph; // placeholder\n\t\tint d1 = playerToRank.getDie1();\n\t\tint d2 = playerToRank.getDie2();\n\t\tint d3 = playerToRank.getDie3();\n\t\t\n\t\t// sorting them in ascending order\n\t\t// switch the 2nd number into first position if it is bigger\n\t\tif (d2 > d1) {\n\t\t\tph = d1;\n\t\t\td1 = d2;\n\t\t\td2 = ph;\n\t\t} // switch the 3rd number into second position if it is bigger\n\t\tif (d3 > d2) {\n\t\t\tph = d2;\n\t\t\td2 = d3;\n\t\t\td3 = ph;\n\t\t} // switch the 2nd number into first position if it is bigger\n\t\tif (d2 > d1) {\n\t\t\tph = d1;\n\t\t\td1 = d2;\n\t\t\td2 = ph;\n\t\t}\n\t\t\n\t\t// now to get their ranking\n\t\t// check for 4,2,1\n\t\tif (d1 == 4 && d2 == 2 && d3 == 1) {\n\t\t\trank = 4;\n\t\t} else if (d1 == d2 && d1 == d3) { // checks for triples\n\t\t\trank = 3;\n\t\t} else if ((d1 == d2 && d1 != d3) || d2 == d3) { // pairs\n\t\t\trank = 2;\n\t\t} else {\n\t\t\trank = 1;\n\t\t}\n\t\t\n\t\treturn rank;\n\t}", "KingdomRank getRank(KingdomUser user);", "DataFrameRank<R,C> rank();", "BigInteger getNumberReturned();", "public static int GetRankNumber(RankingSystem rank) {\n\t\tif (rank == RankingSystem.Strong) {\n\t\t\treturn 5;\n\t\t}\n\t\telse if (rank == RankingSystem.AboveAverage) {\n\t\t\treturn 4;\n\t\t}\n\t\telse if (rank == RankingSystem.Average) {\n\t\t\treturn 3;\n\t\t}\n\t\telse if (rank == RankingSystem.BelowAverage) {\n\t\t\treturn 2;\n\t\t}\n\t\treturn 1;\n\t}", "public String getRankString(){ return this.rank; }", "public void rank(){\n\n\t}", "public int getIdeaRanked(int rank) {\n\t\tif (rank < 1 || rank > NUM_RANKED)\n\t\t\tthrow new IllegalArgumentException(\"Invalid idea rank: \" + rank);\n\t\treturn topIdeas[rank - 1];\n\t}", "public long getFromRank() {\n return fromRank_;\n }", "public int getResult() {\n return this.result;\n }", "public int getResult() {\n\t\t\treturn this.result;\r\n\t\t}", "private int setRank() {\n this.rank = 0;\n for(int row = 0; row < SIZE; row++){\n for(int col = 0; col < SIZE; col++){\n int currentBoardNumber = row * 3 + col + 1;\n if(row == 2 && col == 2) {\n currentBoardNumber = 0;\n }\n if(this.board[row][col] != currentBoardNumber) {\n this.rank += 1;\n }\n }\n }\n this.rank += this.prevMoves.length();\n return this.rank;\n }", "public long getToRank() {\n return toRank_;\n }", "public int bestRank() {\n\t\treturn this.decade(this.indexOfBestDecade());\n\t}", "public long getFromRank() {\n return fromRank_;\n }", "public String getNumRank(int rank){\n\t\tString num;\n\t\tswitch (rank) {\n\t\tcase 1: num = \"2\";break;\n\t\tcase 2: num = \"4\"; break;\n\t\tcase 3: num = \"8\"; break;\n\t\tcase 4: num = \"16\"; break;\n\t\tcase 5: num = \"32\"; break;\n\t\tcase 6: num = \"64\"; break;\n\t\tcase 7: num = \"128\"; break;\n\t\tcase 8: num = \"256\"; break;\n\t\tcase 9: num = \"512\"; break;\n\t\tdefault: num = \"2\";\n\t\t\tbreak;\n\t\t}\n\t\treturn num;\n\t}", "public int getRank() {\n\t\tDependencyElement p = prev;\n\t\tint rank = 0;\n\t\twhile (p != null) {\n\t\t\trank++;\n\t\t\tp = p.prev;\n\t\t}\n\t\treturn rank;\n\t}", "public int getRank(int score) {\n int i = 0;\n for (i = 0; i < scoreInfoList.size(); i++) {\n if (score > scoreInfoList.get(i).getScore()) {\n break;\n }\n }\n System.out.println(\"rank \" + (i + 1));\n return i + 1;\n }", "public int calcRank() {\n sortCardsInHand();\n\n // check Royal flush\n if (this.areCardsInStraight() && this.cards[0].getValue() == 10 && areCardsInSameSuite()) return 10;\n\n // Straight flush: All five cards in consecutive value order, with the same suit\n if (areCardsInSameSuite() && areCardsInStraight()) return 9;\n\n int pairCheck = CardOperations.numberOfPairs(this.getHashMapOfValues());\n\n // Four of a kind: Four cards of the same value\n if (pairCheck == 4) return 8;\n\n // Full house: Three of a kind and a Pair\n if (pairCheck == 5) return 7;\n\n // Flush: All five cards having the same suit\n if (areCardsInSameSuite()) return 6;\n\n // Straight: All five cards in consecutive value order\n if (areCardsInStraight()) return 5;\n\n // Three of a kind: Three cards of the same value\n if (pairCheck == 3) return 4;\n\n // Two pairs: Two different pairs\n if (pairCheck == 2) return 3;\n\n // A pair: Two cards of same value\n if (pairCheck == 1) return 2;\n\n // High card: Highest value card\n return 1;\n }", "public long getToRank() {\n return toRank_;\n }", "public int getRank(int decade) {\n\t\treturn rank.get(decade);\n\t}", "public int[] get_ranking() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic int calcRankByID(String id) {\n\t\tint rank = 0;\r\n\r\n\t\ttry {\r\n\t\t\tconn = DriverManager.getConnection(URL, USER, PASS);\r\n\t\t\tString sql = \"select * from member order by score desc\";\r\n\t\t\tps = conn.prepareStatement(sql);\r\n\t\t\trs = ps.executeQuery();\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\trank++;\r\n\t\t\t\tif(rs.getString(\"id\").equals(id))\r\n\t\t\t\t\treturn rank;\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tps.close();\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\treturn rank;\r\n\t\t}\r\n\r\n\t\treturn rank;\r\n\t}", "public int getResult() {\r\n\t\t\treturn result_;\r\n\t\t}", "public int getScore(int index) {\n return ranking.get(index).getvalue();\n }", "public int getResult() {\r\n\t\t\t\treturn result_;\r\n\t\t\t}", "public int rank(Key key) {\n return rank(key, root);\n }" ]
[ "0.76271176", "0.75852746", "0.734971", "0.72456676", "0.724171", "0.7220911", "0.7212788", "0.7212788", "0.7212788", "0.71975625", "0.71965885", "0.7186311", "0.7183714", "0.7172875", "0.7156587", "0.71551615", "0.7147422", "0.7136991", "0.7134674", "0.7129345", "0.7125088", "0.7114604", "0.7083204", "0.7083204", "0.7083204", "0.7083204", "0.70691305", "0.7058582", "0.70567405", "0.6991043", "0.6974013", "0.6962635", "0.6932086", "0.6929216", "0.69250774", "0.6918365", "0.6906716", "0.68737507", "0.6871903", "0.6865455", "0.68370783", "0.6798038", "0.6783981", "0.6772835", "0.67709816", "0.6746504", "0.6745539", "0.6735962", "0.6693353", "0.6671054", "0.66674995", "0.6647475", "0.66463906", "0.6630555", "0.6624286", "0.66118103", "0.6596884", "0.65901434", "0.6553723", "0.65041554", "0.6455663", "0.6429806", "0.6367486", "0.63409835", "0.62819386", "0.6273851", "0.6235243", "0.6225509", "0.6184959", "0.61061215", "0.6096449", "0.6095192", "0.6068928", "0.6016315", "0.59845644", "0.59600246", "0.5958678", "0.5954455", "0.59500533", "0.59383774", "0.5922184", "0.5887108", "0.5884853", "0.5884805", "0.5876046", "0.58578146", "0.58540344", "0.58505404", "0.58412415", "0.5824047", "0.58137834", "0.5782883", "0.5770804", "0.57656515", "0.5741963", "0.57148", "0.569145", "0.5686216", "0.5682124" ]
0.73008615
4
Gets the title of the result fetched.
public String getTitle();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "public java.lang.String getTitle();", "public java.lang.Object getTitle() {\n return title;\n }", "public java.lang.String getTitle() {\n return title;\n }", "public java.lang.String getTitle() {\n return title;\n }", "public String getTitle()\n {\n return (this.title);\n }", "public java.lang.String getTitle() {\n return title;\n }", "public java.lang.String getTitle() {\n return title;\n }", "public java.lang.String getTitle() {\n return title;\n }", "public String getTitle() {\n return titleName;\n }", "public com.a9.spec.opensearch.x11.QueryType.Title xgetTitle()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.a9.spec.opensearch.x11.QueryType.Title target = null;\n target = (com.a9.spec.opensearch.x11.QueryType.Title)get_store().find_attribute_user(TITLE$2);\n return target;\n }\n }", "public String getTitle() {\r\n return this.title;\r\n }", "public String getTitle(){\n\n\t\treturn title;\n\t}", "public String getTitle() \r\n\t{\r\n\t\treturn this.title;\r\n\t}", "public String getTitle() {\n\t\treturn this.title;\n\t}", "public String getTitle() {\n\t\treturn this.title;\n\t}", "public String getTitle() {\n\t\treturn this.title;\n\t}", "public String getTitle()\r\n {\r\n return this.title;\r\n }", "public String getTitle() {\n \t\treturn title;\n \t}", "public String getTitle()\r\n {\r\n return title;\r\n }", "public String getTitle()\r\n {\r\n return title;\r\n }", "public String getTitle()\n {\n return title;\n }", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return _title;\r\n }", "public String getTitle()\n\t{\n\t\treturn title;\n\t}", "public String getTitle()\n\t{\n\t\treturn title;\n\t}", "public String getTitle(){\n\t\treturn this.title;\n\t}", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return this.title;\n }", "public String getTitle() {\n return this.title;\n }", "public String getTitle() {\n return this.title;\n }", "public String getTitle() {\n return this.title;\n }", "public String getTitle() {\n return this.title;\n }", "public java.lang.String getTitle() {\n java.lang.Object ref = title_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n title_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getTitle() {\n java.lang.Object ref = title_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n title_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getTitle()\n {\n return this.title;\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public java.lang.String getTitle() {\n java.lang.Object ref = title_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n title_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }" ]
[ "0.73328644", "0.73328644", "0.73328644", "0.73328644", "0.73328644", "0.7318567", "0.72408104", "0.7215073", "0.7185705", "0.7154384", "0.7143318", "0.7143318", "0.7143318", "0.7141245", "0.7129673", "0.70858157", "0.70853513", "0.7078589", "0.7072322", "0.7072322", "0.7072322", "0.7065767", "0.7064885", "0.706231", "0.706231", "0.70574194", "0.7054581", "0.7054581", "0.7054581", "0.7054581", "0.7054581", "0.7054581", "0.7054581", "0.7051689", "0.7051689", "0.7051689", "0.7051689", "0.7051689", "0.7051689", "0.7051689", "0.70511675", "0.70440096", "0.70440096", "0.70403415", "0.70380116", "0.70380116", "0.70380116", "0.70380116", "0.70380116", "0.7034163", "0.7034163", "0.7034163", "0.7034163", "0.7034163", "0.7034061", "0.7034061", "0.7029016", "0.7028414", "0.7016915", "0.7016915", "0.7016915", "0.7016915", "0.7016915", "0.7016915", "0.7016915", "0.7016915", "0.7016915", "0.7016915", "0.7016915", "0.7016915", "0.7016915", "0.7015199", "0.7015199", "0.7012143", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525", "0.7010525" ]
0.0
-1
Gets the URL that can be used for accessing the document. The URL is specifically required when fetching the content.
public URL getURL() throws SearchResultException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCompanyDocumentUrl() {\n\t\tString address = getProperties().getProperty(\"company.document.url\").trim();\n\t\treturn address;\n\t}", "private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }", "public String getURL()\n {\n return getURL(\"http\");\n }", "public String getURL() {\n\t\treturn prop.getProperty(\"URL\");\n\t}", "public java.lang.String getURL() {\n return URL;\n }", "private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}", "public String getURL();", "public URL getDocument() {\r\n return this.document;\r\n }", "public String getURL() {\r\n\t\treturn dURL.toString();\r\n\t}", "@Nonnull public String getURL() {\n return url;\n }", "public java.lang.CharSequence getURL() {\n return URL;\n }", "@Property String getDocumentURI();", "public URL getURL() {\r\n try {\r\n return new URL(\"http://www.bluej.org/doc/writingextensions.html\");\r\n } catch (Exception eee) {\r\n // The link is either dead or otherwise unreachable\r\n System.out.println(\"Simple extension: getURL: Exception=\" + eee.getMessage());\r\n return null;\r\n }\r\n }", "public final String getUrl() {\n return properties.get(URL_PROPERTY);\n }", "public String getUrl() {\n\t\tif (prop.getProperty(\"url\") == null)\n\t\t\treturn \"\";\n\t\treturn prop.getProperty(\"url\");\n\t}", "public String getContentURL();", "public java.lang.CharSequence getURL() {\n return URL;\n }", "java.net.URL getUrl();", "public String getURL(Version version) {\n return getUrl() + version.getDocument().getDocumentURL();\n }", "public String getURL(){\r\n\t\t \r\n\t\t\r\n\t\treturn rb.getProperty(\"url\");\r\n\t}", "public java.lang.String getUrl () {\r\n\t\treturn url;\r\n\t}", "public java.lang.String getUrl() {\n return url;\n }", "@Schema(description = \"Link to get this item\")\n public String getUrl() {\n return url;\n }", "@Override\r\n public String getURL() {\n return url;\r\n }", "public String getURL() {\n return url;\n }", "public String getURL() {\r\n return url;\r\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return url_;\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return url_;\n }", "public URL getURL() {\r\n if (myURL == null)\r\n throw new IllegalStateException(\r\n \"A URL has not been set for the PackageSite\");\r\n\r\n return myURL;\r\n }", "public String getURL() {\n\t\treturn URL;\n\t}", "public String getURL() {\r\n\t\treturn url;\r\n\t}", "public String getURL() {\n\t\treturn url;\n\t}", "public String getDocumentURI() {\n return this.documentURI;\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getUrl() {\r\n\t\treturn url;\r\n\t}", "public String getUrl() {\r\n\t\treturn url;\r\n\t}", "Uri getUrl();", "public String getUrl()\n {\n return url;\n }", "public abstract String getURL();", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n }\n return s;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n }\n return s;\n }\n }", "public String getUrl() {\n\t\t\treturn url;\n\t\t}", "@Nullable\n public abstract String url();", "public String getUrl() {\r\n\t\t\treturn url;\r\n\t\t}", "String url();", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public Uri getUrl() {\n return Uri.parse(urlString);\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n }\n return s;\n }\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n return s;\n }\n }", "public String getDownloadUrl(Document document)\r\n {\r\n if (isObjectNull(document)) { throw new IllegalArgumentException(String.format(\r\n Messagesl18n.getString(\"ErrorCodeRegistry.GENERAL_INVALID_ARG_NULL\"), \"document\")); }\r\n\r\n try\r\n {\r\n AbstractAtomPubService objectService = (AbstractAtomPubService) cmisSession.getBinding().getObjectService();\r\n return objectService.loadLink(session.getRepositoryInfo().getIdentifier(), document.getIdentifier(),\r\n AtomPubParser.LINK_REL_CONTENT, null);\r\n }\r\n catch (Exception e)\r\n {\r\n convertException(e);\r\n }\r\n return null;\r\n }", "public String getUrl() {\n return url;\n }", "public String getCollectionUrl() {\n\t\tString t = doc.get(\"url\");\n\n\t\tif (t == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn t;\n\t\t}\n\t}", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n return s;\n }\n }", "public String getUrl() {\n Object ref = url_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String url() {\n return this.url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "URL getUrl();", "public String getUrl() {\n Object ref = url_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n url_ = s;\n }\n return s;\n }\n }", "public String getUrl();" ]
[ "0.73479223", "0.7328027", "0.7172091", "0.7169862", "0.71613365", "0.71142066", "0.7109426", "0.70576495", "0.70431274", "0.70183563", "0.70174485", "0.7016505", "0.70122623", "0.7008989", "0.70082486", "0.7000495", "0.69861794", "0.6923082", "0.68965334", "0.68519855", "0.6848046", "0.6842648", "0.6827593", "0.68123645", "0.68016076", "0.68002045", "0.67966413", "0.67966413", "0.6779925", "0.6751271", "0.6748197", "0.67183995", "0.6702849", "0.66884905", "0.66884905", "0.6682677", "0.6682677", "0.66784006", "0.6676165", "0.66744614", "0.66666555", "0.66666555", "0.6665782", "0.66638064", "0.6663337", "0.6656343", "0.66544366", "0.66544366", "0.66544366", "0.66544366", "0.66544366", "0.66544366", "0.66544366", "0.66544366", "0.66544366", "0.6651602", "0.6651602", "0.6651602", "0.6651602", "0.6651602", "0.6651602", "0.6651602", "0.66501915", "0.664647", "0.6646323", "0.6646323", "0.6646323", "0.6646323", "0.6646323", "0.6646323", "0.6646323", "0.6646323", "0.6646323", "0.6646323", "0.6646323", "0.6646323", "0.6646323", "0.6646323", "0.6646323", "0.6646323", "0.6646323", "0.6646323", "0.6646323", "0.6646323", "0.6646323", "0.6646323", "0.66355526", "0.66335297", "0.66130555", "0.66087055", "0.6607233", "0.6607233", "0.6600102", "0.6598065", "0.6597579", "0.6595936", "0.6589444", "0.6589444", "0.6588472", "0.65883654", "0.65753824" ]
0.0
-1
Get a short summary of the document. This summary is usually provided by the SearchEngine and should therefore not resolve in an exception.
public String getSummary();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getSummary();", "public java.lang.String getSummary(){\r\n return this.summary;\r\n }", "public String getSummary() {\r\n return summary;\r\n }", "public String getSummary() {\n return summary;\n }", "public String getSummary(org.jsoup.nodes.Document doc) {\r\n Element summaryEl = doc.getElementsByTag(\"summary\").first();\r\n return summaryEl != null ? StringUtil.normaliseWhitespace(summaryEl.text()).trim() : \"\";\r\n }", "public abstract CharSequence getSummary();", "public String getSummary() {\n\t\treturn summary;\n\t}", "public String getSummary() {\n\t\treturn summary;\n\t}", "@NonNull\n public Optional<String> getSummary() {\n return Optional.ofNullable(this.summary);\n }", "public Document getSummary(ProbDoc doc) throws DocumentNotFoundException {\n return getSummary(doc.getDocID());\n }", "public java.lang.String getSummary()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(SUMMARY$18);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "@Override\r\n\tpublic String getSummary() {\n\t\treturn null;\r\n\t}", "public String getSummary(SearchResultFields pResult) \n {\n String summary = (String) (pResult.getFields().get(\"content\"));\n return summary;\n }", "@Override\n\tpublic String getSummary() {\n\t\treturn null;\n\t}", "public Document getSummary(String docID) throws DocumentNotFoundException {\n return getDocument(docID);\n }", "public native final String summary() /*-{\n\t\treturn this[\"summary\"];\n\t}-*/;", "@JsonProperty(\"summary\")\n public String getSummary() {\n return summary;\n }", "public String summaryStats() {\n\t\treturn new StringBuilder()\n\t\t\t\t.append(\"Documents: \"+countCorpusDocuments()+\", \")\n\t\t\t\t.append(\"Terms: \"+countCorpusTerms()+\", \")\n\t\t\t\t.append(\"Unique terms: \"+countUniqueTerms()).toString();\n\t}", "@Override\n\tprotected Summary doGetSummary(Document document, Locale locale, String snippet, PortletRequest portletRequest,\n\t\t\tPortletResponse portletResponse) throws Exception {\n\t\t Summary summary = createSummary(document);\n\t\t summary.setMaxContentLength(200);\n\t\t return summary;\n\t}", "org.apache.xmlbeans.XmlString xgetSummary();", "org.hl7.fhir.String getDocumentation();", "public String getShortExplanation()\r\n\t{\r\n\t\treturn this._shortExplanation;\r\n\t}", "public String getSummary() {\n/* 121 */ StringBuilder sb = new StringBuilder();\n/* 122 */ sb.append(\"FindIds exeMicros[\").append(this.executionTimeMicros).append(\"] rows[\").append(this.rowCount).append(\"] type[\").append(this.desc.getName()).append(\"] predicates[\").append(this.predicates.getLogWhereSql()).append(\"] bind[\").append(this.bindLog).append(\"]\");\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 128 */ return sb.toString();\n/* */ }", "public String shortDescription() {\n return this.shortDescription;\n }", "public org.apache.xmlbeans.XmlString xgetSummary()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(SUMMARY$18);\n return target;\n }\n }", "public String getSummary()\r\n {\r\n // String variables to hold summary\r\n String summary = this.myEntry;\r\n\r\n //Each word is seperated by a space so the method should count 9 spaces or less\r\n int spaceCount = 0;\r\n // Variable to store the current index of the word\r\n // while ten words havent been found or blog post is finished\r\n int subscript = 0;\r\n // While loop\r\n while(spaceCount <= 9 && subscript < this.myEntry.length())\r\n {\r\n String nextChar = this.myEntry.substring(subscript, subscript + 1);\r\n // Check if space\r\n if (nextChar.equals(\" \"))\r\n {\r\n if (spaceCount <= 9)\r\n spaceCount++;\r\n else\r\n break;\r\n }\r\n summary = summary + nextChar;\r\n subscript++;\r\n }\r\n return summary;\r\n }", "public String summaryInfo() {\n DecimalFormat form2 = new DecimalFormat(\"#,##0.0##\");\n String result = \"\";\n result += \"----- Summary for \" + getName() + \" -----\"; \n result += \"\\nNumber of Icosahedrons: \" + (numberOfIcosahedrons());\n result += \"\\nTotal Surface Area: \" \n + form2.format(totalSurfaceArea());\n result += \"\\nTotal Volume: \" + form2.format(totalVolume()); \n result += \"\\nAverage Surface Area: \" \n + form2.format(averageSurfaceArea());\n result += \"\\nAverage Volume: \" + form2.format(averageVolume());\n result += \"\\nAverage Surface/Volume Ratio: \" \n + form2.format(averageSurfaceToVolumeRatio());\n \n return result;\n }", "public PrimitiveMethodSummary getSummary() {\n PrimitiveMethodSummary s = new PrimitiveMethodSummary(this,\n method,\n param_nodes,\n my_global,\n methodCalls,\n callToRVN,\n callToTEN,\n castMap,\n castPredecessors,\n returned,\n thrown,\n passedAsParameter,\n sync_ops,\n string_nodes);\n return s;\n }", "final public String getShortDesc()\n {\n return ComponentUtils.resolveString(getProperty(SHORT_DESC_KEY));\n }", "private String readSummary(XmlPullParser parser) throws IOException, XmlPullParserException {\n\t parser.require(XmlPullParser.START_TAG, ns, \"summary\");\n\t String summary = readText(parser);\n\t parser.require(XmlPullParser.END_TAG, ns, \"summary\");\n\t return summary;\n\t }", "public String getShortTitle() {\n\t\tString t = doc.get(\"shorttitle\");\n\n\t\tif (t == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn t;\n\t\t}\n\t}", "public void setSummary(String summary) {\n this.summary = summary;\n }", "public java.lang.Boolean getSummary() {\n return summary;\n }", "@NonNull\n public String getShortDescription() {\n return shortDescription;\n }", "public Map<Integer, Object> getDocumentSummaryInformation()\r\n {\r\n return (m_documentSummaryInformation);\r\n }", "String getOfferSummary();", "public String getShortContent();", "public String getSummaryStatistics() {\n String format = \"%-50s \\t %12d \\t %12f \\t %12f %n\";\n int n = (int) getCount();\n double avg = getAverage();\n double std = getStandardDeviation();\n String name = getName();\n return String.format(format, name, n, avg, std);\n }", "public abstract String getSummaryForDatabase();", "public javax.accessibility.Accessible getAccessibleSummary() {\n // Not yet supported.\n return null;\n }", "public void setSummary(String summary) {\n this.summary = summary;\n }", "public String summaryInfo() {\r\n \r\n DecimalFormat df = new DecimalFormat(\"#,##0.0##\");\r\n String result = \"\";\r\n result = \"----- Summary for \" + getName() + \" -----\";\r\n result += \"\\nNumber of Ellipsoid Objects: \" + list.size();\r\n result += \"\\nTotal Volume: \" + df.format(totalVolume()) + \" cubic units\";\r\n result += \"\\nTotal Surface Area: \" + df.format(totalSurfaceArea()) \r\n + \" square units\";\r\n result += \"\\nAverage Volume: \" + df.format(averageVolume()) \r\n + \" cubic units\";\r\n result += \"\\nAverage Surface Area: \" + df.format(averageSurfaceArea()) \r\n + \" square units\";\r\n \r\n return result;\r\n }", "void setSummary(java.lang.String summary);", "@Override\n\tpublic String getSummary(Locale locale) {\n\t\treturn \"Title: \" + _dataset.getTitle();\n\t}", "public String getBrief() {\n return brief;\n }", "public String getBrief() {\n return brief;\n }", "public String getBrief() {\r\n\t\treturn brief;\r\n\t}", "public String getShortDescription() {\r\n\t\treturn shortDescription;\r\n\t}", "public String getSummary() {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\tsb.append( \"<html> Carrying <b>\");\r\n\t\tsb.append( getEquipmentCount() );\r\n\t\tsb.append( \"</b> weighing <b>\" );\r\n\t\tsb.append( getEquipmentWeight() );\r\n\t\tsb.append( \"</b>lbs</html>\");\r\n\t\treturn sb.toString();\r\n\t}", "public String getShortDescription() {\n return (String) getValue(SHORT_DESCRIPTION);\n }", "public String summary()\n {\n String summary = mName;\n \n if(isARuleBreaker())\n {\n summary += \" – \" + numberOfBrokenRules() + \" st regelbrott, \" + fineAmountOfBrokenRules() + \" kronor\";\n }\n else\n {\n summary += \" – INGA regelbrott!\";\n }\n \n return summary;\n }", "public void testReadDocumentSummaryInformation()\n throws FileNotFoundException, IOException,\n NoPropertySetStreamException, MarkUnsupportedException,\n UnexpectedPropertySetTypeException\n {\n final String dataDirName = System.getProperty(\"HPSF.testdata.path\");\n final File dataDir = new File(dataDirName);\n final File[] docs = dataDir.listFiles(new FileFilter()\n {\n public boolean accept(final File file)\n {\n return file.isFile() && file.getName().startsWith(\"Test\");\n }});\n for (int i = 0; i < docs.length; i++)\n {\n final File doc = docs[i];\n System.out.println(\"Reading file \" + doc);\n\n /* Read a test document <em>doc</em> into a POI filesystem. */\n final POIFSFileSystem poifs = new POIFSFileSystem(new FileInputStream(doc));\n final DirectoryEntry dir = poifs.getRoot();\n DocumentEntry dsiEntry = null;\n try\n {\n dsiEntry = (DocumentEntry) dir.getEntry(DocumentSummaryInformation.DEFAULT_STREAM_NAME);\n }\n catch (FileNotFoundException ex)\n {\n /*\n * A missing document summary information stream is not an error\n * and therefore silently ignored here.\n */\n }\n\n /*\n * If there is a document summry information stream, read it from\n * the POI filesystem.\n */\n if (dsiEntry != null)\n {\n final DocumentInputStream dis = new DocumentInputStream(dsiEntry);\n final PropertySet ps = new PropertySet(dis);\n final DocumentSummaryInformation dsi = new DocumentSummaryInformation(ps);\n \n /* Execute the get... methods. */\n dsi.getByteCount();\n dsi.getByteOrder();\n dsi.getCategory();\n dsi.getCompany();\n dsi.getCustomProperties();\n // FIXME dsi.getDocparts();\n // FIXME dsi.getHeadingPair();\n dsi.getHiddenCount();\n dsi.getLineCount();\n dsi.getLinksDirty();\n dsi.getManager();\n dsi.getMMClipCount();\n dsi.getNoteCount();\n dsi.getParCount();\n dsi.getPresentationFormat();\n dsi.getScale();\n dsi.getSlideCount();\n }\n }\n }", "public String getModifiedSummary() {\r\n\t\treturn modifiedSummary;\r\n\t}", "public String getTableSummary() {\n return \"A summary description of table data\";\n }", "public void setSummary(String summary) {\n\t\tthis.summary = summary;\n\t}", "String getDocumentation();", "String getDocumentation();", "@ApiModelProperty(value = \"A human-readable explanation specific to this occurrence of the problem\")\n \n public String getDetail() {\n return detail;\n }", "public String getSummary() {\n\t\treturn country; \n\t}", "public String getProductSummary() {\r\n\t\tif (getProducts() != null) {\r\n\t\t\tif (getProducts().size() == 1) {\r\n\t\t\t\treturn getProducts().get(0);\r\n\t\t\t}\r\n\t\t\tif (getProducts().size() > 1) {\r\n\t\t\t\t\r\n\t\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t\tsb.append(getProducts().get(0))\r\n\t\t\t\t .append( \" (plus \")\r\n\t\t\t\t .append(getProducts().size()-1)\r\n\t\t\t\t .append( \" more)\");\r\n\t\t\t\treturn sb.toString();\r\n\t\t\t}\t\r\n\t\t}\r\n\r\n\t\treturn \"No products\";\r\n\t}", "public static String getDoc() {\n return doc;\n }", "public String getFullTitle() {\n\t\tString t = doc.get(\"fulltitle\");\n\n\t\tif (t == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn t;\n\t\t}\n\t}", "@Override\n\t\t\tpublic String toString(int doc) throws IOException {\n\t\t\t\treturn null;\n\t\t\t}", "public String getShortTitle()\n {\n // return definition short title\n String title = definition.getShortTitle();\n if (title != null)\n {\n return title;\n }\n\n // return node or default short title\n return super.getShortTitle();\n }", "@JsonProperty(\"summary\")\n public void setSummary(String summary) {\n this.summary = summary;\n }", "String getDetailedDescription() {\n return context.getString(detailedDescription);\n }", "@Override\n public String getSummary() {\n return super.getSummary() + SYMBOL_SEPARATOR + getTimingString();\n }", "@Override\r\n\tpublic String getDocumentInfo() {\n\t\treturn null;\r\n\t}", "public GiftCardProductQuery shortDescription(ComplexTextValueQueryDefinition queryDef) {\n startField(\"short_description\");\n\n _queryBuilder.append('{');\n queryDef.define(new ComplexTextValueQuery(_queryBuilder));\n _queryBuilder.append('}');\n\n return this;\n }", "public String description();", "public String printSummary(){\n String ans=\"\";\n for(Sentence sentence : contentSummary){\n //tv_output.setText(sentence.value);\n ans+=sentence.value + \".\";\n }\n return ans;\n }", "public synchronized String getFullText() {\n StringBuilder sb = new StringBuilder();\n for (DocumentSection s : sections) {\n sb.append(s.getText());\n }\n return sb.toString();\n }", "public String getDocumentInfo() {\n MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());\n return dt.getName() + \" \" + getDocumentNo();\n }", "public void setSummary(String summary) {\n this.summary = summary == null ? null : summary.trim();\n }", "public String toString() {\n StringBuilder sb = new StringBuilder();\n return sb.append(summary).append(\" is \").append(getValueDescription()).toString();\n }", "public String getSummaryStatisticsHeader() {\n return String.format(\"%-50s \\t %12s \\t %12s \\t %12s %n\", \"Name\", \"Count\", \"Average\", \"Std. Dev.\");\n }", "public String getHumanReadableDescription();", "public static String debugDocument(Document doc) {\n return \"<\" + System.identityHashCode(doc)\n + \", title='\" + doc.getProperty(Document.TitleProperty)\n + \"', stream='\" + doc.getProperty(Document.StreamDescriptionProperty)\n + \", \" + doc.toString() + \">\";\n }", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "public void setSummary(String summary) {\r\n this.summary = summary == null ? null : summary.trim();\r\n }", "public String displayShort(){\n return \"\\tId: \" + id + \"\\n\" +\n \"\\tName: \" + name + \"\\n\" +\n \"\\tDescription: \" + description + \"\\n\";\n }", "public String getDescription() {\n\t\tString t = doc.get(\"description\");\n\n\t\tif (t == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn t;\n\t\t}\n\t}", "@Override\r\n\tpublic String getDescription() {\n\t\tString descr=\"Results\";\r\n\t\treturn descr;\r\n\t}", "public String getDocinfo() {\n return docinfo;\n }", "public String getYearSummary() throws Exception {\n\t\treturn this.xqueryUtil.getYearSummary();\n\t}", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();" ]
[ "0.73094237", "0.69979596", "0.6965467", "0.6964907", "0.688864", "0.683872", "0.6825809", "0.6825809", "0.6788575", "0.6687015", "0.6633481", "0.6526694", "0.6474787", "0.64557564", "0.64269584", "0.6388454", "0.6372097", "0.6367812", "0.6325679", "0.6320674", "0.62295914", "0.6199353", "0.61349094", "0.6128738", "0.6102216", "0.60767525", "0.6058938", "0.6057192", "0.60289025", "0.5998912", "0.59914696", "0.59836245", "0.5978796", "0.5957981", "0.5940587", "0.59294206", "0.59250015", "0.59221715", "0.58887804", "0.58861375", "0.5872161", "0.585663", "0.5834265", "0.5808292", "0.5793866", "0.5793866", "0.57612747", "0.5751097", "0.57409686", "0.5740419", "0.56690365", "0.56643045", "0.5663882", "0.5663819", "0.56432605", "0.5611791", "0.5611791", "0.56104046", "0.5610123", "0.5569994", "0.55655706", "0.5534769", "0.5514395", "0.5504168", "0.54892707", "0.5488637", "0.54831773", "0.5461416", "0.5457979", "0.54558146", "0.54418916", "0.5432527", "0.5416361", "0.541223", "0.5408991", "0.5408395", "0.54040426", "0.5398109", "0.5376869", "0.5376869", "0.5376869", "0.5376869", "0.5376869", "0.5376869", "0.5376869", "0.5376869", "0.5376869", "0.5376869", "0.5376869", "0.5376869", "0.5371925", "0.53550845", "0.5331439", "0.5328681", "0.532539", "0.5324289", "0.5317268", "0.5317268", "0.5317268", "0.5317268" ]
0.71535534
1
Retrieves the HTML content of a result. For this, a HTTP connection has to be created that can result in connection exceptions. These exceptions are packed in abstract "SearchResultException". The content will be plain text.
public String getContent() throws SearchResultException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getHTML() throws Exception {\n\t\t// create object to store html source text as it is being collected\n\t\tStringBuilder html = new StringBuilder();\n\t\t// open connection to given url\n\t\tURL url = new File(urlString).toURI().toURL();\n\t\t// create BufferedReader to buffer the given url's HTML source\n\t\tBufferedReader htmlbr =\n\t\t\t\tnew BufferedReader(new InputStreamReader(url.openStream()));\n\t\tString line;\n\t\t// read each line of HTML code and store in StringBuilder\n\t\twhile ((line = htmlbr.readLine()) != null) {\n\t\t\thtml.append(line);\n\t\t}\n\t\thtmlbr.close();\n\t\t// convert StringBuilder into a String \n\t\tString stringHtml = html.toString();\n\t\t\n\t\t// preprocess the string to replace all special chars\n\t\tstringHtml.replaceAll(\"&#39\", \"'\");\n\t\tstringHtml.replaceAll(\"&#8208\", \"-\");\n\t\tstringHtml.replaceAll(\"&#38\", \"&\");\n\t\t\n\t\treturn stringHtml;\n\t}", "public static String getContentFromUrl(URL url) throws Exception {\n HttpGet httpget = new HttpGet(url.toURI());\n DefaultHttpClient httpclient = new DefaultHttpClient();\n log.info(\"Executing request \" + httpget.getRequestLine());\n HttpResponse response = httpclient.execute(httpget);\n int statusCode = response.getStatusLine().getStatusCode();\n log.info(\"Response is with status code \" + statusCode);\n Header[] errorHeaders = response.getHeaders(\"X-Exception\");\n log.warning(\"Error headers are: \" + Arrays.toString(errorHeaders));\n String content = EntityUtils.toString(response.getEntity());\n log.info(\"Content is: \" + content);\n return content;\n }", "public interface SearchResult {\n\n\t/**\n\t * Gets the rank of the result fetched.\n\t * \n\t * @return The rank of the result (starting with 1).\n\t */\n\tpublic int getRank(); \n\n /**\n * Gets the title of the result fetched.\n * \n * @return The title of result.\n */\n public String getTitle();\n \n /**\n * Gets the URL that can be used for accessing the document. The URL is specifically required\n * when fetching the content.\n * \n * @return The URL of the result.\n * @throws SearchResultException The URL might be malformed.\n */\n public URL getURL() throws SearchResultException; \n \n /**\n * Get a short summary of the document. This summary is usually provided by the SearchEngine\n * and should therefore not resolve in an exception.\n * \n * @return The summary of the result.\n */\n public String getSummary();\n \n /**\n * Retrieves the HTML content of a result. For this, a HTTP connection has to be created that\n * can result in connection exceptions. These exceptions are packed in abstract \n * \"SearchResultException\". The content will be plain text.\n * \n * @return The content document related to a result\n * @throws SearchResultException The retrieval of the document might fail.\n */\n public String getContent() throws SearchResultException;\n \n /**\n * Retrieves all links of a result document. For this the content document is searched for all\n * links and forms. Their URLs are extracted, cleaned, and returned as a list. \n * \n * @return List of URLs of documents linked to by this document\n * @throws SearchResultException The document might not be available and retrieval might fail.\n */\n public Set<String> getLinks() throws SearchResultException;\n}", "public String getContentFromUrl(String strUrl) throws IOException {\n String content = \"\";\n URL url = null;\n HttpURLConnection httpURLConnection = null;\n url = new URL(strUrl);\n httpURLConnection = (HttpURLConnection) url.openConnection();\n httpURLConnection.setRequestMethod(Constants.METHOD_GET);\n httpURLConnection.setConnectTimeout(Constants.CONNECTION_TIME_OUT);\n httpURLConnection.setReadTimeout(Constants.READ_INPUT_TIME_OUT);\n httpURLConnection.setDoInput(true);\n httpURLConnection.connect();\n int responseCode = httpURLConnection.getResponseCode();\n if (responseCode == HttpURLConnection.HTTP_OK) {\n content = parserResultFromContent(httpURLConnection.getInputStream());\n }\n return content;\n }", "public URL getURL() throws SearchResultException;", "interface Result {\n\n /** The page which contains matches. */\n @NotNull\n Resource getTarget();\n\n /** The content child of the page which contains matches. */\n @NotNull\n Resource getTargetContent();\n\n /** A link that shows the target, including search terms with {@link #PARAMETER_SEARCHTERM} */\n @NotNull\n String getTargetUrl();\n\n /** The title of the search result. */\n @NotNull\n String getTitle();\n\n /** The score of the search result. */\n Float getScore();\n\n /**\n * One or more descendants of {@link #getTarget()} that potentially match the search expression. Mostly useful\n * for generating excerpts; can contain false positives in some search algorithms.\n */\n @NotNull\n List<Resource> getMatches();\n\n /** The fulltext search expression for which this result was found. */\n @NotNull\n String getSearchExpression();\n\n /**\n * A basic excerpt from the matches that demonstrates the occurrences of the terms from {@link\n * #getSearchExpression()} in this result. Might be empty if not applicable (e.g. if the search terms were found\n * in meta information). If there are several matches, we just give one excerpt. You might want to provide your\n * own implementation for that to accommodate for specific requirements.\n *\n * @return a text with the occurrences of the words marked with HTML tag em .\n */\n @NotNull\n String getExcerpt() throws SearchTermParseException;\n }", "private String getContent(String url) throws BoilerpipeProcessingException, IOException {\n int code;\n HttpURLConnection connection = null;\n URL uri;\n do{\n uri = new URL(url);\n if(connection != null)\n connection.disconnect();\n connection = (HttpURLConnection)uri.openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setConnectTimeout(5000);\n connection.setReadTimeout(5000);\n connection.connect();\n code = connection.getResponseCode();\n if(code == 301)\n url = connection.getHeaderField( \"Location\" );\n }while (code == 301);\n\n System.out.println(url + \" :: \" + code);\n String content = null;\n if(code < 400) {\n content = ArticleExtractor.INSTANCE.getText(uri);\n }\n connection.disconnect();\n return content;\n }", "public static String getContentString(HttpURLConnection con) throws IOException{\n\n //Read the http response from the url\n BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream()));\n String response = \"\", inputLine;\n while ((inputLine = in.readLine()) != null) {\n response += inputLine;\n }\n in.close();\n\n return response;\n }", "private String doHttpClientGet() {\n\t\t\r\n\t\tHttpGet httpGet=new HttpGet(url);\r\n\t\tHttpClient client=new DefaultHttpClient();\r\n\t\ttry {\r\n\t\t\tHttpResponse response=client.execute(httpGet);\r\n\t\t\tif(response.getStatusLine().getStatusCode()==HttpStatus.SC_OK){\r\n\t\t\t\tresult=EntityUtils.toString(response.getEntity());\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"content----->\"+result);\r\n\t\t} catch (ClientProtocolException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public String getResponse() throws BooruEngineConnectionException {\n try {\n if (this.mResponse == null){\n StringBuilder response = new StringBuilder();\n BufferedReader reader = new BufferedReader(new InputStreamReader(mConnection.getInputStream()));\n String input;\n while ((input = reader.readLine()) != null) response.append(input);\n reader.close();\n this.mResponse = response.toString();\n }\n return this.mResponse;\n } catch (IOException e){\n mErrStream = mConnection.getErrorStream();\n throw new BooruEngineConnectionException(e);\n\n }\n }", "protected String handleXmlResult(final Object result) throws Exception {\r\n\r\n String xmlResult = null;\r\n if (result instanceof HttpResponse) {\r\n HttpResponse httpRes = (HttpResponse) result;\r\n assertHttpStatusOfMethod(\"\", httpRes);\r\n assertContentTypeTextXmlUTF8OfMethod(\"\", httpRes);\r\n xmlResult = EntityUtil.toString(httpRes.getEntity(), HTTP.UTF_8);\r\n }\r\n else if (result instanceof String) {\r\n xmlResult = (String) result;\r\n }\r\n return xmlResult;\r\n }", "public HTML getHtml() {\n return new HTML(url, body);\n }", "public static String getResponseContent(URL url) throws IOException {\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n String encoding = conn.getContentEncoding();\n if (encoding == null) {\n encoding = \"UTF-8\";\n }\n int responseCode = conn.getResponseCode();\n InputStream stream;\n if (responseCode != HttpURLConnection.HTTP_OK) {\n stream = conn.getErrorStream();\n } else {\n stream = conn.getInputStream();\n }\n try {\n return IOUtils.toString(stream, encoding);\n }\n finally {\n stream.close();\n }\n }", "public void receiveResultGetContents(\r\n\t\t\tcom.autometrics.analytics.v9.j2ee.webservices.v1_0.GetContentsResponse result) {\r\n\t}", "private String getUrlContents(String theUrl) {\n StringBuilder content = new StringBuilder();\n try {\n URL url = new URL(theUrl);\n URLConnection urlConnection = url.openConnection();\n //reads the response\n BufferedReader br = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()), 8);\n String line;\n while ((line = br.readLine()) != null) {\n content.append(line + \"\\n\");\n }\n br.close();\n }catch (Exception e) {\n //error occured, usually network related\n e.printStackTrace();\n }\n return content.toString();\n }", "private void getHtmlCode() {\n\t try {\n\t Document doc = Jsoup.connect(\"http://www.example.com/\").get();\n\t Element content = doc.select(\"a\").first();\n//\t return content.text();\n\t textView.setText(content.text());\n\t } catch (IOException e) {\n\t // Never e.printStackTrace(), it cuts off after some lines and you'll\n\t // lose information that's very useful for debugging. Always use proper\n\t // logging, like Android's Log class, check out\n\t // http://developer.android.com/tools/debugging/debugging-log.html\n\t Log.e(TAG, \"Failed to load HTML code\", e);\n\t // Also tell the user that something went wrong (keep it simple,\n\t // no stacktraces):\n\t Toast.makeText(this, \"Failed to load HTML code\",\n\t Toast.LENGTH_SHORT).show();\n\t }\n\t }", "SearchResult(byte[] xml) throws SAXException {\n\n\t\tDocumentBuilder builder;\n\t\tDocument response;\n\n\t\ttry {\n\t\t\tbuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\n\t\t\tresponse = builder.parse(new ByteArrayInputStream(xml));\n\n\t\t\tElement result = (Element) response.getElementsByTagName(RESULT_TAG).item(0);\n\t\t\tNodeList items = result.getElementsByTagName(CLICS_TAG).item(0).getChildNodes();\n\n\t\t\t// clics\n\t\t\tresults = new ClicMetaData[items.getLength()];\n\n\t\t\tfor (int i = 0; i < results.length; i++) {\n\t\t\t\tresults[i] = new ClicMetaData((Element) items.item(i));\n\t\t\t}\n\n\t\t\t// pagination related stuff\n\t\t\tElement paginationNode = (Element) result.getElementsByTagName(PAGINATION_TAG).item(0);\n\t\t\ttotalResults = Integer.parseInt(paginationNode.getElementsByTagName(TOTAL_RESULTS_TAG).item(0)\n\t\t\t\t\t.getFirstChild().getNodeValue());\n\t\t\tElement pagesNode = ((Element) paginationNode.getElementsByTagName(PAGES_TAG).item(0));\n\t\t\ttotalPages = Integer.parseInt(pagesNode.getElementsByTagName(TOTAL_PAGES_TAG).item(0).getFirstChild()\n\t\t\t\t\t.getNodeValue());\n\t\t\tcurrentPage = Integer.parseInt(pagesNode.getElementsByTagName(CURRENT_PAGE_TAG).item(0).getFirstChild()\n\t\t\t\t\t.getNodeValue());\n\n\t\t} catch (SAXException e) {\n\t\t\tthrow new SAXException(MALFORMED_RESPONSE);\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(MALFORMED_RESPONSE);\n\t\t} catch (ParserConfigurationException e) {\n\t\t\tthrow new SAXException(MALFORMED_RESPONSE);\n\t\t} catch (NegativeArraySizeException e) {\n\t\t\tthrow new IllegalArgumentException(EMPTY_PAGE);\n\t\t}\n\t}", "public Object getContent() throws DashboardException {\n if (content == null) {\n return null;\n }\n BufferedReader br = null;\n StringBuilder sb = new StringBuilder();\n String line;\n try {\n br = new BufferedReader(new InputStreamReader((InputStream) content, Charset.defaultCharset()));\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n } catch (IOException e) {\n throw new DashboardException(\"Error in retrieving dashboard content\", e);\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n log.error(\"Error in closing dashboard content buffered reader\");\n }\n }\n }\n return sb.toString();\n }", "public entities.Torrent.NodeSearchResult getResults(int index) {\n if (resultsBuilder_ == null) {\n return results_.get(index);\n } else {\n return resultsBuilder_.getMessage(index);\n }\n }", "private void getArticles() throws Exception {\n\t\t\tHttpClient httpClient = new DefaultHttpClient();\n\n\t\t\tStringBuilder uriBuilder = new StringBuilder(BASE_URL);\n\t\t\turiBuilder.append(mURL);\n\n\t\t\tHttpGet request = new HttpGet(uriBuilder.toString());\n\t\t\tHttpResponse response = httpClient.execute(request);\n\n\t\t\tint status = response.getStatusLine().getStatusCode();\n\n\t\t\tif (status != HttpStatus.SC_OK) {\n\n\t\t\t\t// Log whatever the server returns in the response body.\n\t\t\t\tByteArrayOutputStream ostream = new ByteArrayOutputStream();\n\n\t\t\t\tresponse.getEntity().writeTo(ostream);\n\t\t\t\tmHandler.sendEmptyMessage(0);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tInputStream content = response.getEntity().getContent();\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(content));\n\t\t\tStringBuilder result = new StringBuilder();\n\n\t\t\tString line;\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tresult.append(line);\n\t\t\t}\n\n\t\t\t// Clean up and close connection.\n\t\t\tcontent.close();\n\n\t\t\tString html = result.toString();\n\t\t\t//This is our regex to match each article\n\t\t\t//This website's html is not xml compatible so regex is next best thing\n\t\t\tPattern p = Pattern.compile(\"<td class=\\\"title\\\"><a href=\\\"(.*?)\\\".*?>(.*?)<\\\\/a>(<span class=\\\"comhead\\\">(.*?)<\\\\/span>)?.*?<\\\\/td><\\\\/tr><tr><td colspan=2><\\\\/td><td class=\\\"subtext\\\">.*? by <a href=\\\"user\\\\?.*?\\\">(.*?)<\\\\/a>.*?<a href=\\\"item\\\\?id=(.*?)\\\">\");\n\t\t\tMatcher m = p.matcher(html);\n\t\t\tList<Article> articles = new ArrayList<Article>();\n\t\t\twhile(m.find()) {\n\t\t\t\tString url = m.group(1);\n\t\t\t\tString title = m.group(2);\n\t\t\t\tString domain = m.group(4);\n\t\t\t\tString author = m.group(5);\n\t\t\t\tString discussionID = m.group(6);\n\t\t\t\tArticle eachArticle = new Article(title, domain, url, author, discussionID);\n\t\t\t\tarticles.add(eachArticle); \n\t\t\t}\n\n\t\t\tMessage msg = mHandler.obtainMessage();\n\t\t\tBundle bundle = new Bundle();\n\t\t\tbundle.putParcelableArrayList(\"articles\", (ArrayList<? extends Parcelable>) articles);\n\t\t\tmsg.setData(bundle);\n\t\t\tmHandler.sendMessage(msg);\n\t\t}", "public String extractHtml(HttpURLConnection connection) {\n if (connection == null) return \"\";\n Scanner scanner = null;\n try {\n scanner = new Scanner(connection.getInputStream());\n } catch (IOException e) {\n return \"\";\n }\n scanner.useDelimiter(\"\\\\Z\");\n try {\n return scanner.next();\n } catch (Exception e) {\n return \"\";\n }\n }", "public org.apache.calcite.avatica.proto.Responses.ResultSetResponse getResults(int index) {\n if (resultsBuilder_ == null) {\n return results_.get(index);\n } else {\n return resultsBuilder_.getMessage(index);\n }\n }", "public String getResponse(String query) throws RmesException {\n\t\treturn repositoryUtils.getResponse(query, repositoryUtils.initRepository(config.getRdfServerPublication(), config.getRepositoryIdPublication()));\n\t}", "public void doGet() throws IOException {\n\n // search ressource\n byte[] contentByte = null;\n try {\n contentByte = ToolBox.readFileByte(RESOURCE_DIRECTORY, this.url);\n this.statusCode = OK;\n ContentType contentType = new ContentType(this.extension);\n sendHeader(statusCode, contentType.getContentType(), contentByte.length);\n } catch (IOException e) {\n System.out.println(\"Ressource non trouvé\");\n statusCode = NOT_FOUND;\n contentByte = ToolBox.readFileByte(RESPONSE_PAGE_DIRECTORY, \"pageNotFound.html\");\n sendHeader(statusCode, \"text/html\", contentByte.length);\n }\n\n this.sendBodyByte(contentByte);\n }", "@Override\n protected Void doInBackground(Void... params) {\n try {\n documentoHtml = Jsoup.connect(\"http://eldolarenmexico.com/\").get();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "private String getText(URL url){\n\tString parsedHtml=null;\n\ttry{\n\t\tHttpURLConnection urlConn = (HttpURLConnection) url.openConnection();\n\t\tString line = null;\n\t\tStringBuilder tmp = new StringBuilder();\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));\n\t\twhile ((line = in.readLine()) != null) {\n\t\t tmp.append(line);\n\t\t}\n\t\t \n\t\tDocument doc = Jsoup.parse(tmp.toString());\n\t\tparsedHtml = doc.title() + doc.body().text();\n\t\t\n\t}\n\tcatch(IOException e){\n\t\tSystem.out.println(\"Page not reached for: \"+url );\n\t}\n\tfinally{\n\t\treturn parsedHtml;\n\t}\n\t\n}", "@Test\n\tpublic void testBinaryReadHtmlResponseFromProvider() throws Exception {\n\t\tHttpGet httpGet = new HttpGet(\"http://localhost:\" + ourPort + \"/Binary/html\");\n\t\thttpGet.addHeader(\"Accept\", \"text/html\");\n\n\t\tCloseableHttpResponse status = ourClient.execute(httpGet);\n\t\tString responseContent = IOUtils.toString(status.getEntity().getContent(), Charsets.UTF_8);\n\t\tstatus.close();\n\t\tassertEquals(200, status.getStatusLine().getStatusCode());\n\t\tassertEquals(\"text/html\", status.getFirstHeader(\"content-type\").getValue());\n\t\tassertEquals(\"<html>DATA</html>\", responseContent);\n\t\tassertEquals(\"Attachment;\", status.getFirstHeader(\"Content-Disposition\").getValue());\n\t}", "public String getContentByUrl(HttpClient httpClient, String url) {\n\t\tHttpEntity resEntity = null;\n\t\t\n\t\tHttpResponse response = null;\n\n\t\ttry {\n\n\t\t\tHttpGet httpget = new HttpGet(url);\n\n\t\t\tresponse = httpClient.execute(httpget);\n\n\t\t\tint status = response.getStatusLine().getStatusCode();\n\n\t\t\tif (status == HttpStatus.SC_OK) {\n\n\t\t\t\t// get reponse content type\n\t\t\t\tHeader header = response.getFirstHeader(\"Content-Type\");\n\t\t\t\tString contentType = header.getValue();\n\n\t\t\t\tif (contentType != null && contentType.startsWith(\"image/\")) {\n\t\t\t\t\t// if get an image response, return the url\n\t\t\t\t\treturn url;\n\t\t\t\t}\n\n\t\t\t\tresEntity = response.getEntity();\n\n//\t\t\t\tif(sm.encode != null && sm.encode.equals(\"\")){\n//\t\t\t\t\tsm.encode = null;\n//\t\t\t\t}\n//\t\t\t\tif (sm.encode == null\n//\t\t\t\t\t\t&& (resEntity.getContentEncoding() != null || resEntity\n//\t\t\t\t\t\t\t\t.getContentType() != null)) {\n//\t\t\t\t\tif (resEntity.getContentEncoding() != null) {\n//\t\t\t\t\t\tsm.encode = resEntity.getContentEncoding().getValue();\n//\t\t\t\t\t} else {\n//\n//\t\t\t\t\t\tHeaderElement[] eles = resEntity.getContentType()\n//\t\t\t\t\t\t\t\t.getElements();\n//\t\t\t\t\t\tfor (HeaderElement ele : eles) {\n//\t\t\t\t\t\t\tfor (NameValuePair para : ele.getParameters()) {\n//\t\t\t\t\t\t\t\tif (\"charset\".equals(para.getName())) {\n//\t\t\t\t\t\t\t\t\tsm.encode = para.getValue();\n//\t\t\t\t\t\t\t\t\tbreak;\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\tif (sm.encode != null) {\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}\n//\t\t\t\t}\n\n\t\t\t\tif(sm.encode != null && !sm.encode.equals(\"\")){\n\t\t\t\treturn EntityUtils.toString(resEntity, sm.encode);\n\t\t\t\t}else{\n\t\t\t\t\treturn EntityUtils.toString(resEntity, \"utf-8\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t} catch (OutOfMemoryError e) {\n\t\t} catch (NullPointerException ne) {\n\t\t\tne.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally{\n\t\t\tif( response.getEntity() != null ) {\n\t\t\ttry {\n\t\t\t\tEntityUtils.consume(response.getEntity());\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\treturn null;\n\t}", "private String getPageContent(SlingHttpServletRequest request, String pagePath) {\n\n\t\tfinal int DEFAULT_PORT = 80;\n\t\tfinal String JCR_CONTENT_LOCATION = \"/_jcr_content/content.html\";\n\t\tfinal int TIMEOUT = 5000;\n\t\tfinal String HTTP_404_ERROR_RESPONSE = \"404\";\n\n\t\tResourceResolver resourceResolver = request.getResource().getResourceResolver();\n\t\tResource resource = resourceResolver.getResource(pagePath);\n\n\t\tif (resource != null) {\n\n\t\t\tString content = null;\n\n\t\t\t// Create a HttpClient object\n\t\t\t\n\t\t\tHttpClient client = new HttpClient();\n\t\t\t\n\t\t\t// Establish a connection within 5 seconds\n\t\t\tclient.getHttpConnectionManager().getParams().setConnectionTimeout(TIMEOUT);\n\n\t\t\tString url;\n\t\t\tif (request.getRemotePort() == DEFAULT_PORT) {\n\t\t\t\turl = \"http://\" + request.getServerName() + pagePath + JCR_CONTENT_LOCATION;\n\t\t\t} else {\n\t\t\t\turl = \"http://\" + request.getServerName() + \":\" + request.getServerPort() + pagePath\n\t\t\t\t + JCR_CONTENT_LOCATION;\n\t\t\t}\n\n\t\t\t// If user is working on author instance, there is gonna be a 404 code because of the credentials\n\t\t\tHttpMethod method = new GetMethod(url);\n\n\t\t\ttry {\n\t\t\t\tclient.executeMethod(method);\n\t\t\t\tif (method.getStatusCode() == HttpStatus.SC_OK\n\t\t\t\t && !StringUtils.containsIgnoreCase(method.getResponseBodyAsString(), \"http 404\")) {\n\t\t\t\t\tcontent = method.getResponseBodyAsString();\n\t\t\t\t\tcontent = content + \"<!-- Path of the content : \" + pagePath + \" -->\";\n\t\t\t\t} else {\n\t\t\t\t\tlog.info(\"Error 404 - Resource is not available\");\n\t\t\t\t\tcontent = HTTP_404_ERROR_RESPONSE;\n\t\t\t\t}\n\t\t\t} catch (HttpException e) {\n\t\t\t\tlog.error(e.getMessage(), e);\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.error(e.getMessage(), e);\n\t\t\t}\n\n\t\t\t// Clean up the connection resources\n\t\t\tmethod.releaseConnection();\n\n\t\t\t// Return the content\n\t\t\treturn content;\n\t\t} else {\n\t\t\tlog.info(\"Error 404 - Resource is not available\");\n\t\t\treturn HTTP_404_ERROR_RESPONSE;\n\t\t}\n\t}", "public abstract Source getContent() throws SOAPException;", "public QueryResult<T> getResult();", "@Override\n\tpublic String fetchProblemStatement() {\n\t\tDocument doc;\n\n\t\ttry {\n\t\t\tString u = getUrl();\n\t\t\tdoc = Jsoup.connect(u).timeout(10000).get();\n\n\t\t\tElements problems = doc\n\t\t\t\t\t.getElementsByClass(\"primary-colum-width-left\");\n\n\t\t\tthis.setProblemStatement(problems.html());\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"codechef: Error fetching Problem Statement \"\n\t\t\t\t\t+ problemId + \" -> \" + e.getMessage());\n\t\t\t// e.printStackTrace();\n\t\t}\n\n\t\tSystem.out.println(\"codechef: fetched problem \" + problemId);\n\n\t\treturn this.problemStatement;\n\t}", "public String getContent() throws BadLocationException {\n\t\treturn fDocument.get(offset, length);\n\t}", "public static String getAll() {\n Result r = new Result();\n int status = 0;\n if((status = doGetList(r)) != 200) return \"Error from server \"+ status;\n return r.getValue();\n }", "public String process() throws Exception\r\n\t{\r\n\t\treturn result;\r\n\t}", "@Override\r\n\tpublic String getContentByWebPage(Integer mesId, String taxId)\r\n\t\t\tthrows SQLException {\n\t\treturn reportDao.getContentByWebPage(mesId, taxId);\r\n\t}", "public interface SearchResult {\n\t/**\n\t * Returns the meta data of this entity associated with the search result.\n\t * \n\t * @return\tThe meta data\n\t */\n\tMetadata getMetaData();\n\t\n\t/**\n\t * Returns the identifier of this entity associated with the search result.\n\t * \n\t * @return\tThe identifier\n\t */\n\tString getHash();\n\t\n\t/**\n\t * Returns the hash algorithm used for hashing the content.\n\t * \n\t * @return The hash algorithm\n\t */\n\tString getHashAlgorithm();\n}", "public String getResponseContent() {\n\t\treturn responseContent;\n\t}", "java.lang.String getResponse();", "private BufferedReader readRes(final HttpURLConnection con)\n throws ServerStatusException, IOException {\n int responsecode = con.getResponseCode();\n if (responsecode == HttpURLConnection.HTTP_OK) {\n return new BufferedReader(new InputStreamReader(\n con.getInputStream()));\n }\n\n throw new ServerStatusException(con.getURL().toString(), responsecode);\n }", "public String getContent() throws IOException {\r\n\t\tlogger.trace(\"getContent() - start\");\r\n\t\tif (status.contains(DatasetStatus.STATUS_CONTENT)) {\r\n\t\t\tlogger.trace(\"getContent() - {}\", DatasetStatus.STATUS_CONTENT);\r\n\t\t\tlogger.debug(\"getContent() - content\");\r\n\t\t\tlogger.trace(\"getContent() - end\");\r\n\t\t\treturn content;\r\n\t\t}\r\n\t\tlogger.trace(\"getContent() - end\");\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic GetContentResponse getContent(String pageUrl) {\n\t\t\n\t\tList<Content> content = contentRespositry.findByPageUrlOrderBySortAsc(pageUrl);\n\t\tGetContentResponse response = new GetContentResponse();\n\t\tresponse.setStatusCode(200);\n\t\tresponse.setStatusMessage(\"Get Content\");\n\t\tresponse.setContentList(null);\n\t\treturn response;\n\t}", "@Override\n protected String doInBackground(String... params) {\n StringBuilder results = new StringBuilder();\n\n try {\n URL url = new URL(params[0]);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\n int statusCode = conn.getResponseCode();\n if (statusCode == 200) {\n InputStream inputStream = new BufferedInputStream(conn.getInputStream());\n\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8));\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n results.append(line);\n }\n }\n\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n return results.toString();\n }", "String getContent() throws IOException;", "@Override\n protected String doInBackground(URL... params) {\n URL searchUrl = params[0];\n String talk2meSearchResults = null;\n try {\n talk2meSearchResults = NetworkUtils.getResponseFromHttpUrl(searchUrl);\n Log.d(TAG, \"talk2meSearchResults is : \" + talk2meSearchResults.toString());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return talk2meSearchResults;\n }", "private String getContent(HttpResponse response) throws IOException {\n return IOUtils.toString(\n response.getEntity().getContent(),\n StandardCharsets.UTF_8\n );\n }", "private static String fetchHTML(String link) {\n\t\tStringBuffer buffer = null;\n\t\ttry {\n\t\t\tURL url = new URL(getURL(link));\n\t\t\tInputStream is = url.openStream();\n\t\t\tint ptr = 0;\n\t\t\tbuffer = new StringBuffer();\n\t\t\twhile ((ptr = is.read()) != -1) {\n\t\t\t buffer.append((char)ptr);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn buffer.toString();\n\t}", "@Override\n\t\tprotected Document doInBackground(Void... URL) {\n\t\t\ttry {\n\t\t\t\tpostContent = Jsoup.connect(postURL).get();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t\tLog.e(\"Pratyaksha_ERROR\", \"Error fetching post\");\n\t\t\t}\n\t\t\treturn postContent;\n\t\t}", "public String getSummary(SearchResultFields pResult) \n {\n String summary = (String) (pResult.getFields().get(\"content\"));\n return summary;\n }", "private String getContentStringFromURL(URL url) {\n\n HttpURLConnection con = null;\n //Versuch der Verbindung\n try {\n con = (HttpURLConnection) url.openConnection();\n\n\n // Optional\n con.setRequestMethod(\"GET\");\n\n // HTTP-Status-Code\n int responseCode = con.getResponseCode();\n //System.out.println(\"\\nSending 'GET' request to URL : \" + url);\n //System.out.println(\"Response Code : \" + responseCode);\n\n BufferedReader in = new BufferedReader(\n new InputStreamReader(con.getInputStream()));\n String inputLine;\n StringBuffer response = new StringBuffer();\n\n //Einlesen der Antwort\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n in.close();\n\n //Antwort wird in einen String gewandelt und zurück geliefert\n return response.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "public String sendGet(String url)\n\t{\n\t\t//Getting most relevant user-agent from robots.txt\n\t\tbest_match = findBestMatch();\n\t\t//Deicing whether or not to skip\n\t\tif (shouldSkip(url))\n\t\t{\n\t\t\treturn \"skipped\";\n\t\t}\n\t\tif (url.startsWith((\"https\")))\n\t\t{\n\t\t\treturn sendGetSecure(url);\n\t\t}\n\t\ttry \n\t\t{\n\t\t\t//Creating URL objects\n\t\t\tURL http_url = new URL(url);\n\t\t\t//Delaying visit if directed to by robots.txt\n\t\t\tcrawlDelay();\n\t\t\tHttpURLConnection secure_connection = (HttpURLConnection)http_url.openConnection();\n\t\t\t//Setting request method\n\t\t\tsecure_connection.setRequestMethod(\"GET\");\n\t\t\t//Sending all headers except for host (since URLConnection will take care of this)\n\t\t\tfor (String h: headers.keySet())\n\t\t\t{\n\t\t\t\tif (!h.equals(\"Host\"))\n\t\t\t\t{\n\t\t\t\t\tsecure_connection.setRequestProperty(h, headers.get(h));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Getting ResponseParser object to read in page content\n\t\t\tp = new ResponseParser(new BufferedReader(new InputStreamReader(secure_connection.getInputStream())));\n\t\t\t\n\t\t\t//Parsing all response headers from returned object\n\t\t\tMap<String,String> p_headers = p.getHeaders();\n\t\t\tMap<String, List<String>> response_headers = secure_connection.getHeaderFields();\n\t\t\tfor (Map.Entry<String, List<String>> entry : response_headers.entrySet()) \n\t\t\t{\n\t\t\t\tif (entry.getKey() == null)\n\t\t\t\t{\n\t\t\t\t\tp.setResponse(entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tp_headers.put(entry.getKey(),entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If we didn't get any headers in the response, the URL was invalid\n\t\t\tif (p.getHeaders().size() == 0)\n\t\t\t{\n\t\t\t\treturn (\"invalid url\");\n\t\t\t}\n\t\t\t\n\t\t\t//Otherwise return the contents of the returned document\n\t\t\treturn p.getData();\n\t\t\t\n\t\t} \n\t\tcatch (IOException | IllegalArgumentException e) \n\t\t{\n\t\t\treturn \"invalid url\";\n\t\t}\t\t\n//\t\ttry\n//\t\t{\n//\t\t\t//Deals with secure request\n//\t\t\tif (url.startsWith((\"https\")))\n//\t\t\t{\n//\t\t\t\treturn sendGetSecure(url);\n//\t\t\t}\n//\t\t\t//Parsing host and port from URL\n//\t\t\tURLInfo url_info = new URLInfo(url);\n//\t\t\thost = url_info.getHostName();\n//\t\t\tport = url_info.getPortNo();\n//\t\t\t\n//\t\t\t//Changing Host header if necessary\n//\t\t\theaders.put(\"Host\", host + \":\" + port);\n//\t\t\t\n//\t\t\t//Getting file path of URL\n//\t\t\tString file_path = url_info.getFilePath();\n//\t\t\t\n//\t\t\t//If we weren't able to find a host, URL is invalid\n//\t\t\tif (host == null)\n//\t\t\t{\n//\t\t\t\treturn \"invalid url\";\n//\t\t\t}\n//\t\t\t\n//\t\t\t//Delaying visits based on robots.txt crawl delay\n//\t\t\tcrawlDelay();\n//\t\t\t\n//\t\t\t//Otherwise, opening up socket and sending request with all headers\n//\t\t\tsocket = new Socket(host, port);\n//\t\t\tout = new PrintWriter(socket.getOutputStream(), true);\n//\t\t\tString message = \"GET \" + file_path + \" HTTP/1.1\\r\\n\";\n//\t\t\tfor (String header: headers.keySet())\n//\t\t\t{\n//\t\t\t\tString head = header + \": \" + headers.get(header) + \"\\r\\n\";\n//\t\t\t\tmessage = message + head;\n//\t\t\t}\n//\t\t\tout.println(message);\n//\n//\t\t\t//Creating ResponseParser object to parse the Response\n//\t\t\tp = new ResponseParser(socket);\n//\t\t\t\n//\t\t\t//If we didn't get any headers in the response, the URL was invalid\n//\t\t\tif (p.getHeaders().size() == 0)\n//\t\t\t{\n//\t\t\t\treturn (\"invalid url\");\n//\t\t\t}\n//\t\t\t//Otherwise return the contents of the returned document\n//\t\t\treturn p.getData();\n//\t\t} \n//\t\tcatch (UnknownHostException e) \n//\t\t{\n//\t\t\tSystem.err.println(\"Unknown Host Exception\");\n//\t\t\tSystem.err.println(\"Problem url is: http://www.youtube.com/motherboardtv?feature=watch&trk_source=motherboard\");\n//\t\t} \n//\t\tcatch (IOException | IllegalArgumentException e) \n//\t\t{\n//\t\t\tSystem.err.println(\"IO Exception\");;\n//\t\t}\n//\t\t//Return null for all caught exceptions (Servlet will deal with this)\n//\t\treturn null;\n\t}", "public String ToSearchContent()\n\t{\n\t\treturn \"Success\";\n\t}", "public T getContent();", "public InputStream getEntityContent(String url) throws ClientProtocolException, IOException {\n HttpGet getMethod = new HttpGet(url);\n HttpResponse response = httpClient.execute(getMethod);\n HttpEntity entity = response.getEntity();\n return entity == null ? null : entity.getContent();\n }", "java.lang.String getContent();", "java.lang.String getContent();", "java.lang.String getContent();", "java.lang.String getContent();", "java.lang.String getContent();", "java.lang.String getContent();", "protected void handleResult(String result) {}", "@GET\r\n @Produces(\"text/html\")\r\n public String getHtml() {\r\n return \"<html><body>the solution is :</body></html> \";\r\n }", "public static String getContent(InputStream stream) throws Exception {\n return getContent(new InputStreamReader(stream));\n }", "@Override\r\n public Reader contentReader() {\r\n try {\r\n return okResponse.body().charStream();\r\n } catch (IOException e) {\r\n throw fail(e);\r\n }\r\n }", "public com.github.yeriomin.playstoreapi.ResponseWrapper getResponse() {\n if (responseBuilder_ == null) {\n return response_;\n } else {\n return responseBuilder_.getMessage();\n }\n }", "public static CharSequence GetHttpResponse(String urlString) throws IOException {\n\t\tURL url = new URL(urlString);\n\t\tURLConnection connection = url.openConnection();\n\t\tif (!(connection instanceof HttpURLConnection)) {\n\t\t\tthrow new IOException(\"Not an HTTP connection\");\n\t\t}\n\t\tHttpURLConnection httpConnection = (HttpURLConnection) connection;\n\t\tint responseCode = httpConnection.getResponseCode();\n\t\tif (responseCode != HttpURLConnection.HTTP_OK) {\n\t\t\tString responseMessage = httpConnection.getResponseMessage();\n\t\t\tthrow new IOException(\"HTTP response code: \" + responseCode + \" \" + responseMessage);\n\t\t}\n\t\tInputStream inputStream = httpConnection.getInputStream();\n\t\tBufferedReader reader = null;\n\t\ttry {\n\t\t\treader = new BufferedReader(new InputStreamReader(inputStream));\n\t\t\tint contentLength = httpConnection.getContentLength();\n\t\t\t// Some services does not include a proper Content-Length in the response:\n\t\t\tStringBuilder result = (contentLength > 0) ? new StringBuilder(contentLength) : new StringBuilder();\n\t\t\twhile (true) {\n\t\t\t\tString line = reader.readLine();\n\t\t\t\tif (line == null) break;\n\t\t\t\tresult.append(line);\n\t\t\t}\n\t\t\treturn result;\n\t\t} finally {\n\t\t\tif (reader != null) reader.close();\n\t\t}\n\t}", "public static QueryResult fromIndexerResult(Document document) {\n return new QueryResult.Builder()\n .content(document.get(LuceneFieldConstants.CONTENT.getText()))\n .filename(document.get(LuceneFieldConstants.FILE_NAME.getText()))\n .build();\n\n }", "public String getContent() {\n String s = page;\n\n // Bliki doesn't seem to properly handle inter-language links, so remove manually.\n s = LANG_LINKS.matcher(s).replaceAll(\" \");\n\n wikiModel.setUp();\n s = getTitle() + \"\\n\" + wikiModel.render(textConverter, s);\n wikiModel.tearDown();\n\n // The way the some entities are encoded, we have to unescape twice.\n s = StringEscapeUtils.unescapeHtml(StringEscapeUtils.unescapeHtml(s));\n\n s = REF.matcher(s).replaceAll(\" \");\n s = HTML_COMMENT.matcher(s).replaceAll(\" \");\n\n // Sometimes, URL bumps up against comments e.g., <!-- http://foo.com/-->\n // Therefore, we want to remove the comment first; otherwise the URL pattern might eat up\n // the comment terminator.\n s = URL.matcher(s).replaceAll(\" \");\n s = DOUBLE_CURLY.matcher(s).replaceAll(\" \");\n s = HTML_TAG.matcher(s).replaceAll(\" \");\n\n return s;\n }", "@Override\n\tpublic Result getResult() {\n\t\treturn m_Result;\n\t}", "private static String getHTTPResponse(URL url){\n\t\t\n\t\tStringBuilder response = new StringBuilder();\n\t\t\n\t\ttry{\n\t\t\tURLConnection connection = url.openConnection();\n\t\t\tBufferedReader res = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n\t\t\tString responseLine;\n\t\t\t\n\t\t\twhile((responseLine = res.readLine()) != null)\n\t\t\t\tresponse.append(responseLine);\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e){System.out.println(\"Error - wrong input or service down\");}\n\t\t\n\t\treturn response.toString();\n\t}", "@Override\n\tpublic void run() {\n\t\ttry{\n\t\t\tboolean redirected=false;\n\t\t\tint responseCode=0;\n\t\t\tint tries=0;\n\t\t\tString location=site.getUrl();\n\t\t\tHttpURLConnection urlConnection=null;\n\t\t\tdo{\n\t\t\t\tURL url = new URL(location);\n\t\t\t\turlConnection = (HttpURLConnection) url.openConnection();\n\t\t\t\turlConnection.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11\");\n\t\t\t\turlConnection.setConnectTimeout(Constants.CONNECTION_TIMEOUT);\n\t\t\t\turlConnection.setReadTimeout(Constants.READ_TIMEOUT);\n\t\t\t\turlConnection.setRequestMethod(\"GET\");\n\t\t\t\turlConnection.setInstanceFollowRedirects(true);\n\t\t\t\turlConnection.setUseCaches(false);\n\t\t\t\turlConnection.setAllowUserInteraction(false);\n\t\t\t\turlConnection.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\t\tresponseCode = urlConnection.getResponseCode();\n\t\t\t\t\n\t\t\t\tif(responseCode==HttpURLConnection.HTTP_MOVED_TEMP || responseCode==HttpURLConnection.HTTP_MOVED_PERM){ //handle 302 and 301 redirect. \n\t\t\t\t\tredirected=true;\n\t\t\t\t\tlocation = urlConnection.getHeaderField(\"Location\");\n\t\t\t\t\ttries++;\n\t\t\t\t}else\n\t\t\t\t\tredirected=false;\n\t\t\t}while(redirected && tries<3);\n\t\t\t\n\t\t\tif (responseCode == HttpURLConnection.HTTP_OK){\n\t\t\t\ttry (InputStream is = urlConnection.getInputStream();\n\t\t BufferedReader br = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8))) {\n\t\t String content = br.lines().collect(Collectors.joining(System.lineSeparator()));\n\t \tthis.callback.webContentCallBack(site, content);\n\t\t } \n\t\t\t}else this.callback.webContentCallBack(site, null); //any other case, null is returned as the content. \n\t\t}catch (Exception e) {\n\t\t\tLogger.getLogger(Fetcher.class.getName()).log(Level.WARNING, \"Site:\"+site.getUrl()+\" failed fetching.\", e);\n\t\t\ttry {\n\t\t\t\tthis.callback.webContentCallBack(site, null); //any exception, null is returned as the content. \n\t\t\t} catch (Exception e1) {\n\t\t\t} \n\t\t}\n\t}", "public ResourceContent getContent() throws IOException;", "public Api getQueryResult(String query) throws Exception {\n\t\tApi api = getQueryResult(getWiki(),query);\n\t\treturn api;\n\t}", "private static String getResponseAsString(HttpURLConnection connection) throws Exception {\n InputStream in = connection.getInputStream();\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n int b;\n while ((b = in.read()) != -1) {\n out.write(b);\n }\n return out.toString();\n }", "public String parserResultFromContent(InputStream is) throws IOException {\n String result = \"\";\n BufferedReader reader = new BufferedReader(\n new InputStreamReader(is, Constants.CHARSET_NAME_UTF8));\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n result += line;\n }\n is.close();\n return result;\n }", "@Override\n\tpublic void fetchContent() throws UrlConnectionException, JSONException,\n\t\t\tJSONNullableException, NotConnectedException,\n\t\t\tNetworkStatePermissionException\n\t{\n\n\t}", "public static String getText(String html) throws Exception\n\t{\n\t\tStringBean sb = new StringBean();\n\t\tsb.setLinks(false);\n\t\tParser p = Parser.createParser(html, null);\n\t\tp.visitAllNodesWith(sb);\n\t\treturn sb.getStrings();\n\t}", "@java.lang.Override\n public entities.Torrent.NodeSearchResult getResults(int index) {\n return results_.get(index);\n }", "public java.lang.String getContent(\n ) {\n return this._content;\n }", "org.apache.calcite.avatica.proto.Responses.ResultSetResponse getResults(int index);", "public String getResponce() {\r\n\t\t// raw version of qry string\r\n\t\tString qry = \"https://slack.com/api/users.info?token=\" + this.Token + \"&user=\" + this.ID + \"&pretty=1\";\r\n\t\tURL obj;\r\n\t\ttry {\r\n\t\t\tobj = new URL(qry);\r\n\t\t\tHttpURLConnection con;\r\n\t\t\ttry {\r\n\t\t\t\tcon = (HttpURLConnection) obj.openConnection();\r\n\t\t\t\tcon.setRequestMethod(\"GET\");\r\n\t\t\t\t// add request header\r\n\t\t\t\tcon.setRequestProperty(\"User-Agent\", \"Mozilla/5.0\");\r\n\t\t\t\tint responseCode = con.getResponseCode();\r\n\t\t\t\t// System.out.println(\"\\nSending 'GET' request to URL : \" + qry);\r\n\t\t\t\t// System.out.println(\"Response Code : \" + responseCode);\r\n\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\r\n\t\t\t\tString inputLine;\r\n\t\t\t\tStringBuffer response = new StringBuffer();\r\n\t\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n\t\t\t\t\tresponse.append(inputLine);\r\n\t\t\t\t}\r\n\t\t\t\tin.close();\r\n\t\t\t\t// print in String\r\n\t\t\t\t// System.out.println(response.toString());\r\n\t\t\t\treturn response.toString();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t} catch (MalformedURLException 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 \"FAILED!\";\r\n\r\n\t}", "public java.lang.String getContent() {\n return this._content;\n }", "public String getResultsString()\r\n {\r\n String ResultsString = null;\r\n try\r\n {\r\n ResultsString = ResultsDocument.getText(ResultsDocument.getStartPosition().getOffset(),\r\n ResultsDocument.getLength() );\r\n }\r\n catch (BadLocationException InputException)\r\n {\r\n\t System.out.println(\"GrepFrame.getResultsString: Results document not initialised: \"\r\n\t + InputException);\r\n }\r\n return ResultsString;\r\n }", "protected HTTPSampleResult errorResult(Throwable e, HTTPSampleResult res) {\n res.setSampleLabel(res.getSampleLabel());\n res.setDataType(SampleResult.TEXT);\n ByteArrayOutputStream text = new ByteArrayOutputStream(200);\n e.printStackTrace(new PrintStream(text));\n res.setResponseData(text.toByteArray());\n res.setResponseCode(NON_HTTP_RESPONSE_CODE+\": \"+e.getClass().getName());\n res.setResponseMessage(NON_HTTP_RESPONSE_MESSAGE+\": \"+e.getMessage());\n res.setSuccessful(false);\n res.setMonitor(this.isMonitor());\n return res;\n }", "protected HTTPSampleResult errorResult(Throwable e, HTTPSampleResult res) {\n res.setSampleLabel(res.getSampleLabel());\n res.setDataType(SampleResult.TEXT);\n ByteArrayOutputStream text = new ByteArrayOutputStream(200);\n e.printStackTrace(new PrintStream(text));\n res.setResponseData(text.toByteArray());\n res.setResponseCode(NON_HTTP_RESPONSE_CODE+\": \" + e.getClass().getName());\n res.setResponseMessage(NON_HTTP_RESPONSE_MESSAGE+\": \" + e.getMessage());\n res.setSuccessful(false);\n res.setMonitor(this.isMonitor());\n return res;\n }", "public abstract String getResponse();", "public String getContent() throws IOException {\n ContentType type = getContentType();\n \n if(type == null) {\n return body.getContent(\"UTF-8\");\n } \n return getContent(type);\n }", "@Override\n public String getContent() throws FileNotFound, CannotReadFile\n {\n Reader input = null;\n try\n {\n input = new InputStreamReader(resource.openStream());\n String content = IOUtils.toString(input).replace(\"\\r\\n\", \"\\n\");\n\n return content;\n } catch (FileNotFoundException ex)\n {\n throw new FileNotFound();\n } catch (IOException ex)\n {\n throw new CannotReadFile();\n } finally\n {\n InternalUtils.close(input);\n }\n }", "@NonNull\n @Override\n public <X extends Throwable> ResultT getResult(@NonNull Class<X> exceptionType) throws X {\n if (getFinalResult() == null) {\n throw new IllegalStateException();\n }\n if (exceptionType.isInstance(getFinalResult().getError())) {\n throw exceptionType.cast(getFinalResult().getError());\n }\n Throwable t = getFinalResult().getError();\n if (t != null) {\n throw new RuntimeExecutionException(t);\n }\n return getFinalResult();\n }", "public String getParsedContent(String contextRoot, CmsPageRevision cmsPageRevision) throws InstantiationException, IllegalAccessException, ClassNotFoundException {\n\t\treturn this.getContent();\n\t}", "public interface HTMLGetter {\n public Document get(String url) throws Exception;\n}", "public String requestContent(String urlStr) {\n String result = null;\n HttpURLConnection urlConnection;\n try {\n URL url = new URL(urlStr);\n urlConnection = (HttpURLConnection) url.openConnection();\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n try {\n InputStream in = new BufferedInputStream(urlConnection.getInputStream());\n result = convertStreamToString(in);\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n urlConnection.disconnect();\n }\n return result;\n }", "public static String httpGet(String url) throws Exception {\r\n \t\tDefaultHttpClient client = new DefaultHttpClient();\r\n \t\tHttpResponse response = null;\r\n \t\tString responseString = null;\r\n \t\tHttpUriRequest request = new HttpGet(url);\r\n \t\trequest.setHeader(\"Accept-Encoding\", \"gzip\");\r\n \t\trequest.setHeader(\"User-Agent\", \"gzip\");\r\n\t\tresponse = client.execute(request);\r\n \t\tif (response.getStatusLine().getStatusCode() != 200) {\r\n \t\t\tthrow new HttpException(\"Server error: \"\r\n \t\t\t\t\t+ response.getStatusLine().getStatusCode());\r\n \t\t} else {\r\n \t\t\tresponseString = parseResponse(response);\r\n \r\n \t\t}\r\n \t\treturn responseString;\r\n \t}", "public Object getResults( int _intSelector ) throws Exception {\n\t\t\n\t\tObject resultToReturn = new Object();\n\t\t\n\t\tResultsContainerI resultsContainer;\n\t\tresultsContainer = this.appTda_.getResults();\n\t\tResultGeneric res;\n\t\t\n\t\tres = resultsContainer.getResult( _intSelector );\n\t\t\n\t\t// Check all allowable \"specific\" result types\n\t\t// (we need to cast here because Api \"consumers\" such as Matlab otherwise\n\t\t// can't make sense of the generic return type (and so wouldn't be\n\t\t// able to get to the results)\n\t\tif ( res.getResult() instanceof ResultsCollection ) {\n\t\t\t\n\t\t\tresultToReturn = (ResultsCollection) res.getResult();\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\t// default (TODO)\n\t\t\tresultToReturn = res.getResult();\n\t\t}\n\t\t\n\t\treturn resultToReturn;\n\t}", "public static Map getTestResults(HTMLizer h, Statement s) throws SQLException {\n String sql = getResultSql();\n return getResults (h, s, sql);\n }", "void showResults() throws IOException{\n\t\tCountService cs = CountService.getInstance();\n\t\t\n\t\tout.write(\"/------------------------Resultado Final------------------------/\" + \"\\n\" );\n\t\tout.write(\"O número total de links pesquisados é:\" + cs.getCount() + \"\\n\");\n\t\tout.write(\"O número de links Quebrados é:\" + cs.getCountQueb() + \"\\n\");\n\t\tout.write(\"O número de links ok é:\" + cs.getCountOk() + \"\\n\");\n\t\tout.write(\"O número de links Proibidos é:\" + cs.getCountProibido()+ \"\\n\");\n\t\tout.write(\"O número de métodos impedidos é:\" + cs.getCountImpedido()+ \"\\n\");\n\t\tout.write(\"O número de redirecionados é:\" + cs.getCountRedirecionado()+ \"\\n\");\n\t\tout.write(\"Erro Server:\" + cs.getCountErroServer()+ \"\\n\");\n\t\tout.write(\"Unknown Host Name:\" + cs.getCountUnknownHost()+ \"\\n\");\n\t\tout.write(\"Bad Gatway:\" + cs.getCount502()+ \"\\n\");\n\t\tout.write(\"O número resposta diferente de 4.. e 200 é:\" + cs.getCountPesq() + \"\\n\");\n\t\tout.write(\"/------------------------------------------------------------------/\" + \"\\n\");\n\t\tString dateTime = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\").format(new Date()); \n\t\tout.write(\"Fim dos testes: \" + dateTime + \"\\n\");\n\t\tSystem.out.println(\"Teste finalizado\");\n\t}", "public String getDocument() throws Exception;", "private String responseString(HttpURLConnection con) throws IOException, NullPointerException {\r\n\t\t\t\r\n\tStringBuilder content = null;\r\n\ttry (BufferedReader in = new BufferedReader(\r\n new InputStreamReader(con.getInputStream()))) {\r\n\r\n\t\tString line;\r\n content = new StringBuilder();\r\n\r\n while ((line = in.readLine()) != null) {\r\n content.append(line);\r\n }\r\n }\r\n\treturn (content != null ? content.toString() : null);\r\n\t\r\n\t}", "public String getContent() {\n return this.m_content;\n }", "private static String getResponseContent(RequestURL request)\n\t\t\tthrows GPlaceServiceException {\n\t\tStringBuilder response = new StringBuilder();\n\t\tHttpURLConnection conn = null;\n\n\t\ttry {\n\t\t\tURL url = new URL(request.toString());\n\t\t\tconn = (HttpURLConnection) url.openConnection();\n\t\t\tInputStreamReader in = new InputStreamReader(conn.getInputStream());\n\t\t\tint read;\n\t\t\tchar[] buff = new char[1024];\n\t\t\twhile ((read = in.read(buff)) != -1) {\n\t\t\t\tresponse.append(buff, 0, read);\n\t\t\t}\n\t\t\treturn response.toString();\n\t\t} catch (MalformedURLException e) {\n\t\t\tthrow new GPlaceServiceException(\n\t\t\t\t\t\"Could not request PlacesAPI because the URL is malformed\",\n\t\t\t\t\te);\n\t\t} catch (IOException e) {\n\t\t\tthrow new GPlaceServiceException(\n\t\t\t\t\t\"Could not request PlacesAPI because there happened an error during data transmission\");\n\t\t} finally {\n\t\t\tif (conn != null) {\n\t\t\t\tconn.disconnect();\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.5833355", "0.57878417", "0.5726819", "0.55695534", "0.550735", "0.54717994", "0.5390633", "0.5260628", "0.52547395", "0.5214685", "0.5160012", "0.5144414", "0.51191944", "0.51077956", "0.51075244", "0.5104539", "0.50978875", "0.507911", "0.50658613", "0.5063529", "0.50183564", "0.5015265", "0.49685666", "0.49447337", "0.48990023", "0.48607147", "0.48557794", "0.48487496", "0.48373", "0.48299292", "0.4821251", "0.48205462", "0.4819602", "0.4809576", "0.4806862", "0.47899738", "0.47852802", "0.4785156", "0.47840777", "0.4773262", "0.4772394", "0.4768515", "0.476526", "0.47636133", "0.47585785", "0.4728628", "0.4727056", "0.4725933", "0.47246873", "0.4723999", "0.47220722", "0.47200122", "0.46977887", "0.4697324", "0.46785778", "0.46785778", "0.46785778", "0.46785778", "0.46785778", "0.46785778", "0.46776298", "0.4675407", "0.46753648", "0.46710196", "0.4665728", "0.46597672", "0.4657001", "0.46520948", "0.4651852", "0.46498355", "0.4642698", "0.46394706", "0.4638343", "0.46352893", "0.4630295", "0.46221653", "0.46129707", "0.4607591", "0.45987064", "0.45978677", "0.45974758", "0.45958498", "0.4589017", "0.45818892", "0.457678", "0.4574651", "0.45675078", "0.45641217", "0.45591745", "0.4558307", "0.45545936", "0.4553943", "0.45514888", "0.45506746", "0.4548789", "0.45472383", "0.45455706", "0.45410186", "0.45346048", "0.45331106" ]
0.69985205
0
Retrieves all links of a result document. For this the content document is searched for all links and forms. Their URLs are extracted, cleaned, and returned as a list.
public Set<String> getLinks() throws SearchResultException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "Set<Link> extractLinks(CrawlDoc doc, ParseState parseState)\n throws IOException;", "List<Link> getLinks();", "public List<TparselinksEntity> getAllLinks();", "public void getLinks() {\n\n var client = HttpClient.newBuilder()\n .followRedirects(HttpClient.Redirect.ALWAYS)\n .build();\n\n HttpRequest request = HttpRequest.newBuilder()\n .uri(URI.create(URL_PREFIX))\n .build();\n client.sendAsync(request, HttpResponse.BodyHandlers.ofLines())\n .thenApply(HttpResponse::body)\n .thenApply(this::processLines)\n .thenApply(versions -> tasks(versions))\n .join();\n }", "public List<String> getLinks();", "public void printAllSearchResultLinks(){\n\n System.out.println(\"resultLinks.size() = \" + resultLinks.size() );\n\n for (WebElement eachLinkElm : resultLinks) {\n // remove empty text with if statement\n System.out.println(\"eachLinkElm.getText() = \" + eachLinkElm.getText() );\n\n }\n\n }", "private List<String> getOfferPagesLinks(Document document) {\n return document.select(\"div[class=product-image loaded] > a[href]\").eachAttr(\"abs:href\");\n }", "public List<MCRContent> getAll() throws IOException, JDOMException, SAXException {\n\t\tList<MCRContent> resultsSet = new ArrayList<>();\n\t\t// build basic part of API URL\n\t\tString baseQueryURL = API_URL + \"/affiliation/AFFILIATION_ID:\" + AFFIL_ID + \"?apikey=\" + API_KEY\n\t\t\t\t+ \"&view=DOCUMENTS\";\n\n\t\t// divide API request in blocks a XXX documents (in final version 200\n\t\t// documents per block, number of blocks determined by total number of\n\t\t// documents)\n\t\t// int numberOfPublications = getNumberOfPublications(baseQueryURL);\n\t\t// at the moment only testing, two blocks a 10 documents\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tint start = 10 * i;\n\t\t\tint count = 10;\n\n\t\t\t// build API URL\n\t\t\tString queryURL = baseQueryURL + \"&start=\" + start + \"&count=\" + count + \"&view=DOCUMENTS\";\n\n\t\t\t// add block to list of blocks\n\t\t\tresultsSet.add(getResponse(queryURL));\n\t\t}\n\t\t// return API-response\n\t\treturn resultsSet;\n\t}", "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 }", "public ArrayList<Link> getLinks() {\n\t\treturn getPageObjects(Link.class);\n\t}", "public Collection<Map<String, String>> getLinks();", "public static URL[] HTMLLinks(String url) throws Exception\n\t{\n\t\t// Get the links\n\n\t\tURLConnection conn = (new java.net.URL(url)).openConnection();\n\t\tconn.setRequestProperty(\"User-Agent\",\"Mozilla/5.0 ( compatible ) \");\n\t\tconn.setRequestProperty(\"Accept\",\"*/*\");\n\n\t\tLinkBean sb = new LinkBean();\n\t\tsb.setURL(url);\n\t\tsb.setConnection(conn);\n\t\tURL[] outlinks = sb.getLinks();\n\n\t\t// make links fully qualified\n\t\tURI baseURI = null;\n\t\ttry\n\t\t{\n\t\t\tbaseURI = new URI(url);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t\treturn new URL[0];\n\t\t}\n\n\t\t// ----\n\t\tList<URL> fqurls = new ArrayList<URL>();\n\t\tfor (int i = 0; i < outlinks.length; i++)\n\t\t{\n\t\t\tURL fqurl = null;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tfqurl = baseURI.resolve(outlinks[i].toURI()).toURL();\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tlogger.error(e.getMessage(), e);\n\t\t\t}\n\t\t\tif (fqurl != null)\n\t\t\t{\n\t\t\t\tfqurls.add(fqurl);\n\t\t\t}\n\t\t}\n\t\treturn fqurls.toArray(new URL[fqurls.size()]);\n\t}", "private @NotNull List<String> getAllLinks(final String text, final String urlStart) {\n List<String> links = new ArrayList<>();\n\n int i = 0;\n while (text.indexOf(urlStart, i) != -1) {\n int linkStart = text.indexOf(urlStart, i);\n int linkEnd = text.indexOf(\" \", linkStart);\n if (linkEnd != -1) {\n String link = text.substring(linkStart, linkEnd);\n links.add(link);\n } else {\n String link = text.substring(linkStart);\n links.add(link);\n }\n i = text.indexOf(urlStart, i) + urlStart.length();\n }\n\n return links;\n }", "public DocumentListFeed getAllDocuments() throws MalformedURLException, IOException, ServiceException;", "public static List<UrlInfo> searchAllUrl() {\n\n //getSynonyms(queryKeywords);\n\n ArrayList<Long> keywordIdList = new ArrayList<Long>();\n ArrayList<Long> finalIdList = new ArrayList<Long>();\n\n String email = Secured.getUser(ctx());\n List<UrlEntry> entryIdList = UrlEntry.find()\n .select(\"entryId\")\n .where()\n .eq(\"email\", email)\n .findList();\n for (UrlEntry entry : entryIdList) {\n finalIdList.add(entry.getEntryId());\n }\n System.out.println(\"finalIdList---\" + finalIdList);\n List<UrlInfo> urlList = UrlInfo.find().select(\"url\").where().in(\"urlEntryId\", finalIdList).findList();\n /*ArrayList<String> urls = new ArrayList<String>();\n for (UrlInfo urlInfo : urlList) {\n urls.add(urlInfo.getUrl());\n }\n System.out.println(\"urls in search----\" + urls);*/\n return urlList;\n }", "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<Link> getLinks()\n {\n return links;\n }", "public static Set<String> parsePage(Document doc){\n\t\ttry{\n\t\t\tElements links = doc.select(\"a[href]\");\n\t\t\tSet<String> pageLinks = new HashSet<String>();\n\t\t\tfor(Element link : links){\n\t\t\t\tpageLinks.add(link.attr(\"abs:href\"));\n\t\t\t}\n\t\t\treturn pageLinks;\n\t\t}catch(Exception err){\n\t\t\terr.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public DocumentSignedLocation[] getDocumentContentUrls(String[] documentLinks) throws DocumentServiceException {\n\tAuthenticationToken token = this.store.getUserToken();\n\tif (token == null) {\n\t throw new DocumentServiceException(\"Service requires authentication.\");\n\t}\n\ttry {\n\t DocumentSignedLocation[] dsls = new DocumentSignedLocation[documentLinks.length];\n\t for (int i=0; i<documentLinks.length; i++) {\n\t\tString documentUrl = documentLinks[i];\n\t String documentUrlSig;\n\t\tdocumentUrlSig = AuthSubUtil.formAuthorizationHeader(\n\t\t token.getToken(), AuthenticationKey.getAuthSubKey(), new URL(documentUrl), \"GET\");\n DocumentSignedLocation dsl =\n \t new DocumentSignedLocation(documentUrl, documentUrlSig);\n\t dsls[i] = dsl;\n\t }\n\t return dsls;\n\t} catch (Exception e) {\n\t e.printStackTrace();\n throw new DocumentServiceException(e.getMessage());\n\t}\n }", "@NonNull List<SaldoLink> getLinks() {\n return links;\n }", "public List<URI> getLinks() {\n return links; // this is already unmodifiable\n }", "public static ArrayList<URL> listLinks(URL baseURL, String htmlText) {\n // list to store links\n ArrayList<URL> links = new ArrayList<URL>();\n\n // compile string into regular expression\n Pattern p = Pattern.compile(REGEX);\n\n // match provided text against regular expression\n Matcher m = p.matcher(htmlText);\n\n // loop through every match found in text\n while ( m.find() ) \n {\n // add the appropriate group from regular expression to list\n try {\n\t\t\t\tlinks.add(new URL(baseURL, m.group(GROUP)));\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\tSystem.err.println(\"Invalid URL\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n }\n return links;\n }", "public String[] getUrls() {\n\t\tif (results == null)\n\t\t\treturn null;\n\t\tWebSearchResult[] resultsArray = results.listResults();\n\t\tString[] urls = new String[resultsArray.length];\n\t\tfor (int i = 0; i < urls.length; i++) {\n\t\t\turls[i] = resultsArray[i].getUrl();\n\t\t}\n\t\treturn urls;\n\t}", "public Set<String> getLinks() {\n return links;\n }", "public List<String> getLinks() {\r\n\t\treturn this.links;\r\n\t}", "public List<Link> links() {\n\t\t\treturn new NonNullList<>(_links);\n\t\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}", "java.util.List<org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProto> \n getLinksList();", "public List<ResourceLink> links() {\n return 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 List<Link> getLinks() {\n\t\treturn _links;\n\t}", "@Override\n\tpublic ArrayList<String> getLinks() {\n\t\treturn this.description.getLinks();\n\t}", "public List<Link> links() {\n return this.links;\n }", "public List<Link> getLinks()\t{return Collections.unmodifiableList(allLinks);}", "private List<String> getMyDocsFromSomewhere(String aPath) {\n\t\tList<String> ret = new ArrayList<>();\n\t\ttry {\n\t\t\tFile startFileUrl = new File(aPath);\n\t\t\tFile[] files = startFileUrl.listFiles();\n\t\t\tfor (File file : files) {\n\t\t\t\t\n\t\t\t\tBodyContentHandler handler = new BodyContentHandler();\n\t\t\t\tMetadata metadata = new Metadata();\n\t\t\t\tFileInputStream inputstream = new FileInputStream(file);\n\t\t\t\tParseContext pcontext = new ParseContext();\n\n\t\t\t\t// Html parser\n\t\t\t\tHtmlParser htmlparser = new HtmlParser();\n\t\t\t\thtmlparser.parse(inputstream, handler, metadata, pcontext);\n\t\t\t\t// System.out.println(\"Contents of the document:\" +\n\t\t\t\t// handler.toString());\n\t\t\t\t// System.out.println(\"Metadata of the document:\");\n\t\t\t\tString[] metadataNames = metadata.names();\n\t\t\t\tStringBuilder build = new StringBuilder();\n\t\t\t\tfor (String name : metadataNames) {\n\t\t\t\t\tbuild.append(metadata.get(name));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tret.add(handler.toString());\n\t\t\t\tret.add(build.toString());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"--error: \" + aPath);\n\t\t\tSystem.out.println(\"--error: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn ret;\n\t}", "public Set<L> getLinks() {\n return links;\n }", "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 }", "List<ProductLink> links();", "public List<Link> getLinks() {\n\t return Collections.unmodifiableList(links);\n\t}", "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 }", "public List getDocuments(List result) throws DocumentNotFoundException {\n List ret = new ArrayList();\n for (Object o : result) {\n ProbDoc doc = (ProbDoc) o;\n String docID = doc.getDocID();\n ret.add(new XMLDoc(docID, getDocument(docID)));\n }\n return ret;\n }", "List<? extends Link> getLinks();", "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 ArrayList<ExternalLink> getExternalLinks() {\n\t\treturn getPageObjects(ExternalLink.class);\n\t}", "public Set<Link> links() {\n return links;\n }", "public DocumentListFeed getAllFeeds() throws MalformedURLException, IOException, ServiceException;", "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}", "@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}", "@java.lang.Override\n public java.util.List<org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProto> getLinksList() {\n return links_;\n }", "@GET\n public Response getLinks() {\n List<Link> links = new ArrayList<>();\n links.add(Link.fromUri(CommonConstants.API_URI+\"users/login\").rel(\"login\").build());\n links.add(Link.fromUri(CommonConstants.API_URI+\"users/\").rel(\"users\").build());\n links.add(Link.fromUri(CommonConstants.API_URI+\"boardgames/\").rel(\"boardgames\").build());\n\n return Response.ok().links(links.toArray(new Link[links.size()])).build();\n }", "public static LinkedHashSet<String> searchLinks(String searchUrl) {\n LinkedHashSet<String> uniqueLinks = new LinkedHashSet();\n Document doc;\n try {\n doc = Jsoup.connect(searchUrl).get();\n Elements links = doc.select(\"a\");\n for(Element url : links){\n if (validUrl(url.attr(\"href\"))) {\n uniqueLinks.add(url.attr(\"href\"));\n }\n }\n } catch (IOException e) {\n }\n return uniqueLinks;\n }", "public Set<String> getFullTextUrls(final Record record)\n {\n \treturn MarcUtils.getFullTextUrls(record);\n }", "public ArrayList<ExternalLink> getExternalLinksRecursive() {\n\t\treturn getPageObjectsRecursive(ExternalLink.class);\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}", "private void adaptResultListToPDFFormat() {\n ArrayList<Result> result = new ArrayList<Result>();\n for (int i = 0; i < pdfBoxDocuments.size(); i++) {\n PDFDocument pdf = pdfBoxDocuments.get(i);\n\n String title = pdf.getDocname();\n title = title.substring(title.lastIndexOf('/') + 1, title.lastIndexOf('.'));\n String kwic = pdf.getText()[0];\n String url = pdf.getDocname();\n result.add(new Result(title, kwic, url));\n }\n results = new Results();\n results.setResults(result);\n }", "private void montaListaDeItensDeLinks(org.jsoup.nodes.Document doc, JSONArray description) {\n Elements links = doc.select(\"div\").select(\"ul\").select(\"li\").select(\"a\");\n JSONArray listalinks = new JSONArray();\n for (Element link : links) {\n\n listalinks.put(link.attr(\"abs:href\"));\n }\n\n // Após a lista de links montada ela é incluída dentro de um nó links do json de\n // saída\n JSONObject ljson = new JSONObject();\n ljson.put(\"type\", \"links\");\n ljson.put(\"content\", listalinks);\n\n // O novo item (ljson) está pronto e é incluindo como um item da lista\n // description\n description.put(ljson);\n }", "public Stream<ParsedURL> urls() {\n return stream().map(req -> new ParsedURL(req.getUrl()));\n }", "public List<Image> parseMainImagesResult(Document doc) {\n\n ArrayList<Image> mainImages = new ArrayList<>();\n Elements mainHtmlImages = doc.select(CSS_IMAGE_QUERY);\n Timber.i(\"Images: %s\", mainHtmlImages.toString());\n String href;\n Image mainImage;\n for (Element mainHtmlImage : mainHtmlImages) {\n href = mainHtmlImage.attr(\"href\");\n Timber.i(\"Link href: %s\", href);\n mainImage = new Image(href);\n mainImages.add(mainImage);\n }\n return mainImages;\n }", "org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProto getLinks(int index);", "@java.lang.Override\n public org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProto getLinks(int index) {\n return instance.getLinks(index);\n }", "public ArrayList<URI> getList() { return new ArrayList<URI>(); }", "public List<cn.edu.nju.teamwiki.jooq.tables.pojos.Document> fetchByUrl(String... values) {\n return fetch(Document.DOCUMENT.URL, values);\n }", "public static List<String> getLinks(String url, NodeFilter filter) throws ParserException\n\t{\n\t\tParser parser = getParser(url);\n\t\tNodeList list = new NodeList();\n\t\tfor (NodeIterator e = parser.elements(); e.hasMoreNodes();)\n\t\t{\n\t\t\tlist.add(getNodes(e.nextNode(), filter));\n\t\t}\n\t\tList<String> strings = new ArrayList<String>();\n\t\tfor (NodeIterator i = list.elements(); i.hasMoreNodes();)\n\t\t{\n\t\t\tNode n = i.nextNode();\n\t\t\tif (n instanceof LinkTag)\n\t\t\t{ // text\n\t\t\t\tString link = ((LinkTag) n).extractLink();\n\t\t\t\tif (!strings.contains(link))\n\t\t\t\t{\n\t\t\t\t\tstrings.add(((LinkTag) n).extractLink());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn strings;\n\t}", "public ArrayList<String> getWebLink(){\r\n\t\treturn webLinks;\t\t\r\n\t}", "public List<ScorerDoc> get_results(){\n\t\tList<ScorerDoc> docs_array = new ArrayList<ScorerDoc>();\n\t\twhile (!queue.isEmpty())\n\t\t\tdocs_array.add(queue.poll());\n\t\t\n\t\tCollections.reverse(docs_array);\n\t\treturn docs_array;\n\t}", "public ReactorResult<org.ontoware.rdfreactor.schema.rdfs.Resource> getAllOfficialFileWebpage_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), OFFICIALFILEWEBPAGE, org.ontoware.rdfreactor.schema.rdfs.Resource.class);\r\n\t}", "public final List<Link> getLinks() {\n\t\tList<Link> r = new ArrayList<Link>();\n\t\tlockMe(this);\n\t\tfor (Link lnk: links) {\n\t\t\tr.add(lnk.getCopy());\n\t\t}\n\t\tunlockMe(this);\n\t\treturn r;\n\t}", "@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 static ArrayList<Document> getDocumentList() {\n\t\tRequestContent rp = new RequestContent();\n\t\trp.type = RequestType.GET_DOCUMENTS;\n\t\tReceiveContent rp1 = sendReceive(rp);\n\t\tArrayList<Document> doc = (ArrayList<Document>) rp1.parameters[0];\n\t\treturn doc;\n\t}", "public List<Map<String,Object>> getURLs() {\n return urls;\n }", "public void getAlbumLinks() {\n Elements elements = document.getElementsByClass(\"\\n\" +\n \" js-link-block-cover-link\\n\" +\n \" link-block-cover-link\\n\" +\n \" \");\n albumsLinks = new String[elements.size()];\n for (int i = 0; i < elements.size(); i++) {\n String element = elements.get(i).attr(\"href\");\n albumsLinks[i] = element;\n }\n }", "public ReactorResult<org.ontoware.rdfreactor.schema.rdfs.Resource> getAllPaymentURL_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), PAYMENTURL, org.ontoware.rdfreactor.schema.rdfs.Resource.class);\r\n\t}", "private void getLinks(Page page, Element content, boolean withConnection) throws JSONException, SQLException {\n\t\tString pageTitle = page.getTitle();\n\t\tString pageId = String.valueOf(page.getPageId());\n\t\tElements links = content.select(\"a[href]\");\n\t\tPageApi pa = new PageApi();\n\t\tfor (Iterator<Element> iterator = links.iterator(); iterator.hasNext();) {\n\t\t\tElement element = iterator.next();\n\t\t\tString link = element.attr(\"href\");\n\t\t\t/**\n\t\t\t * It has to be an internal wikipedia link\n\t\t\t */\n\t\t\tif (link.startsWith(\"/wiki/\")) {\n\t\t\t\t/**\n\t\t\t\t * Ignore unrelevant links\n\t\t\t\t */\n\t\t\t\tif (link.startsWith(\"/wiki/Category:\") || link.startsWith(\"/wiki/Special:\")\n\t\t\t\t\t\t|| link.startsWith(\"/wiki/Wikipedia:\") || link.startsWith(\"/wiki/Help:\")\n\t\t\t\t\t\t|| link.startsWith(\"/wiki/Template:\") || link.startsWith(\"/wiki/Portal:\")\n\t\t\t\t\t\t|| link.startsWith(\"/wiki/Talk:\") || link.startsWith(\"/wiki/\" + pageTitle + \":\")\n\t\t\t\t\t\t|| link.startsWith(\"/wiki/File:\") || link.startsWith(\"/wiki/Template_talk:\")) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tlink = link.replace(\"/wiki/\", \"\");\n\t\t\t\tPage character = pa.getPageInfoForTitle(link);\n\t\t\t\tif (withConnection) {\n\t\t\t\t\tif (tempList.contains(character.getPageId())) {\n\t\t\t\t\t\tpersistConnection(pageId, character);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tpersistCharacter(pageId, character);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void crawl() {\n Document doc;\n try {\n\n\n doc = Jsoup.connect(rootURL).userAgent(\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A\").get();\n\n Elements articles = doc.select(\"section.list article\");\n\n System.out.println(\"Number of articles found:\"+articles.size());\n //list of links found\n for(Element article: articles){\n\n Element titleLink = article.select(\"a\").first();\n System.out.println(titleLink.attr(\"abs:href\"));\n\n //if the url found is in the cache, do not retrieve the url.\n if(urlCache.contains(titleLink.attr(\"abs:href\"))) {\n System.out.println(\"Doucment found in cache, ignoring document\");\n continue;\n }\n\n storeDocument(Jsoup.connect(titleLink.attr(\"abs:href\")).get());\n\n //add the URL to the cache so that we don't retrieve it again.\n urlCache.add(titleLink.attr(\"abs:href\"));\n }\n\n\n } catch (Exception e){\n logger.log(Level.SEVERE, \"Error Retrieving from URL\", e);\n e.printStackTrace();\n }\n }", "public java.util.List<? extends org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProtoOrBuilder> \n getLinksOrBuilderList() {\n return links_;\n }", "@RequestMapping(path = \"/controversialLinks\", method = RequestMethod.GET)\n public ArrayList<Link> getControversialYadas() {\n\n ArrayList<Link> allLinks = (ArrayList<Link>) links.findAll();\n generateControveryScore(allLinks);\n\n return links.findAllByOrderByControversyScoreDesc();\n }", "public List<LinkDetails> scrapeRSSPageForLinks(String rssUrl) {\n\t\tString description = \"\";\n\t\tString title = \"\";\n\t\tString link = \"\";\n\t\tString pubdate = \"\";\n\t\tURL url;\n\t\tInputStream in;\n\n\t\tList<LinkDetails> rssProcessedData = new ArrayList<LinkDetails>();\n\n\t\ttry {\n\t\t\turl = new URL(rssUrl);\n\t\t} catch (MalformedURLException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t\ttry {\n\t\t\tin = url.openStream();\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t\t// create XML input factory\n\t\tXMLInputFactory inputFactory = XMLInputFactory.newInstance();\n\n\t\t// read the XML document\n\t\ttry {\n\n\t\t\tXMLEventReader eventReader = inputFactory.createXMLEventReader(in);\n\n\t\t\tboolean isFeedHeader = true;\n\t\t\twhile (eventReader.hasNext()) {\n\t\t\t\tXMLEvent event = eventReader.nextEvent();\n\t\t\t\tif (event.isStartElement()) {\n\t\t\t\t\tString localPart = event.asStartElement().getName().getLocalPart();\n\n\t\t\t\t\t// System.out.println(localPart);\n\n\t\t\t\t\tswitch (localPart) {\n\n\t\t\t\t\tcase \"item\":\n\t\t\t\t\t\t// if (isFeedHeader) {\n\t\t\t\t\t\t// isFeedHeader = false;\n\t\t\t\t\t\t// System.out.println(\" title: \"+title+ \" description: \"+ description + \" link:\n\t\t\t\t\t\t// \"+link+\" pubDate: \"+pubdate);\n\t\t\t\t\t\t// }\n\t\t\t\t\t\tevent = eventReader.nextEvent();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"title\":\n\t\t\t\t\t\ttitle = getCharacterData(event, eventReader);\n\t\t\t\t\t\t// System.out.println(\"title: \"+title);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"description\":\n\t\t\t\t\t\tdescription = getCharacterData(event, eventReader);\n\t\t\t\t\t\t// System.out.println(\"description: \"+description);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"link\":\n\t\t\t\t\t\tlink = getCharacterData(event, eventReader);\n\t\t\t\t\t\tSystem.out.println(\"link: \" + link);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"pubDate\":\n\t\t\t\t\t\tpubdate = getCharacterData(event, eventReader);\n\t\t\t\t\t\t// System.out.println(\"pubDate: \"+pubdate);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\t\t\t\t} else if (event.isEndElement()) {\n\t\t\t\t\tif (event.asEndElement().getName().getLocalPart() == (\"item\")) {\n\n\t\t\t\t\t\tLinkDetails linkDetails = new LinkDetails(link, title, description, pubdate);\n\t\t\t\t\t\trssProcessedData.add(linkDetails);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (XMLStreamException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t\treturn rssProcessedData;\n\t}", "Collection<Document> getDocuments();", "private void scrapResultsInCurrentResultPage() {\n List<WebElement> searchResults = getSearchResults();\n\n for (int i = 0; i < searchResults.size(); i++) {\n WebElement result = searchResults.get(i);\n WebElement quoteButton = result.findElement(By.xpath(\".//a[@class='gs_or_cit gs_nph']\"));\n quoteButton.click();\n\n waitForMillis(500);\n\n WebElement bibtexLink = driver.findElement(By.xpath(\"//div[@id='gs_citi']/a[1]\"));\n waitUntilClickable(bibtexLink);\n bibtexLink.click();\n\n WebElement publicationCitationInBibtex = driver.findElement(By.xpath(\"/html/body/pre\"));\n searchResultsAsBibtex.add(publicationCitationInBibtex.getText());\n\n driver.navigate().back();\n\n WebElement quoteDialogCancelButton = driver.findElement(By.xpath(\"//*[@id=\\\"gs_cit-x\\\"]\"));\n waitUntilClickable(quoteDialogCancelButton);\n quoteDialogCancelButton.click();\n\n // Reload the reference to the DOM elements: the search results.\n searchResults = getSearchResults();\n }\n }", "public List<JRActionLink> getActionLinks() {\n return mActionLinks;\n }", "public List<IDoc> getDocs();", "public List<IDoc> getDocs();", "public ReactorResult<org.ontoware.rdfreactor.schema.rdfs.Resource> getAllCommercialInformationURL_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), COMMERCIALINFORMATIONURL, org.ontoware.rdfreactor.schema.rdfs.Resource.class);\r\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 }", "private List<PageExtract> getList() throws SQLException {\n\t\tDbConnector db = null;\n\t\ttry {\n\t\t\tdb = new DbConnector();\n\t\t} catch (ClassNotFoundException | SQLException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tdb.executeQuery(SqlConstants.SET_MAX_CONCAT_LENGTH);\n\t\tResultSet pageResult = db.executeQuery(SqlConstants.PAGE_EXTRACT);\n\t\tList<PageExtract> list = new ArrayList<>();\n\t\twhile (pageResult.next()) {\n\t\t\tint pageId = pageResult.getInt(\"pageId\");\n\t\t\tString content = pageResult.getString(\"content\");\n\t\t\tlist.add(new PageExtract(pageId, content));\n\n\t\t}\n\t\treturn list;\n\t}", "List<ButtonLink> getBtnActionLinks();", "@GET\r\n @Produces({MediaType.APPLICATION_XML})\r\n public Set<Document> findAll() throws InternalServerErrorException{\r\n LOGGER.info(\"Peticion de todos los documentos\");\r\n Set<Document> collection = null;\r\n try {\r\n collection = ejb.getDocumentList();\r\n } catch (GetCollectionException ex) {\r\n LOGGER.warning(\"ERROR en la obtencion de la lista de documentos\");\r\n throw new InternalServerErrorException();\r\n }\r\n LOGGER.info(\"Respuesta de obtencion de lista de documentos\");\r\n return collection;\r\n }", "public List<Topic> getLinks() {\n\t\tList<Topic> topics = new ArrayList<Topic>();\n\t\tTopic tp = null;\n\t\tString sqlSearch = \"select lid,label,url from \" + Constant.schema\n\t\t\t\t+ \".link\";\n\n\t\t// Define Connection, statement and resultSet\n\t\tConnection conn = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet result = null;\n\t\ttry {\n\t\t\tconn = DBConUtil.getConn();\n\t\t\tpstmt = conn.prepareStatement(sqlSearch);\n\t\t\tconn.setAutoCommit(true);\n\t\t\tresult = DBConUtil.query(conn, pstmt);\n\n\t\t\tif (result != null) {\n\t\t\t\twhile (result.next()) {\n\t\t\t\t\ttp = new Topic();\n\t\t\t\t\ttp.setTopicID(result.getInt(\"lid\"));\n\t\t\t\t\ttp.setLabel(result.getString(\"label\"));\n\t\t\t\t\ttp.setUrl(result.getString(\"url\"));\n\t\t\t\t\ttopics.add(tp);\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tDBConUtil.close(conn, pstmt, result);\n\t\t}\n\t\treturn topics;\n\t}", "public ReactorResult<org.ontoware.rdfreactor.schema.rdfs.Resource> getAllCopyrightInformationURL_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), COPYRIGHTINFORMATIONURL, org.ontoware.rdfreactor.schema.rdfs.Resource.class);\r\n\t}", "public List<Documentacion> getDocumentaciones() {\r\n\r\n\t\tList<Documentacion> lista = LatidoFacade.getInstance().getFindAllList(Documentacion.class.getName());\r\n\t\treturn lista;\r\n\t}", "public ArrayList<String> findLinks(Text value) throws CharacterCodingException{\n\t\tint start = value.find(\"<text\");\n\t\tstart = value.find(\">\", start);\n\t\tint end = value.find(\"</text>\", start);\n\t\t//start+=1;\n\t\tString textBlock=new String();\n\t\ttry{\n\t\tif(end < value.getLength())\n\t\t\ttextBlock = Text.decode(value.getBytes(), start, end-start);\n\t\telse\n\t\t\ttextBlock = Text.decode(value.getBytes(), start, value.getLength()-start);\n\t\t} catch(Exception e){\n\t\t\treturn null;\n\t\t}\n\t\tArrayList<String> List = new ArrayList<String>();\n\t\t\n\t\tPattern wikiLinkRegEx = Pattern.compile(\"\\\\[\\\\[(?:[^|\\\\]]*\\\\|)?([^\\\\]]+)\\\\]\\\\]\");\n\t\tMatcher patternMatcher = wikiLinkRegEx.matcher(textBlock);\n\t\twhile(patternMatcher.find()) {\n\t\t\tint flag=0;\n\t\t\tint startIndex = patternMatcher.start();\n\t\t\tint endIndex = patternMatcher.end();\n\t\t\tString wikiLink = textBlock.substring(startIndex+2, endIndex-2);\n\t\t\twikiLink = wikiLink.replace(\" \", \"_\");\n\n\t\t\t//Checking for the occurrence of '|'\n\t\t\tif(wikiLink.contains(\"|\")){\n\t\t\t\tint pipeIndex = wikiLink.indexOf(\"|\");\n\t\t\t\twikiLink = wikiLink.substring(0, pipeIndex);\n\t\t\t}\n\t\t\t\n\t\t\t//Flagging all the invalid WikiLinks \n\t\t\t//if(wikiLink.contains(\":\") || wikiLink.contains(\"#\") || wikiLink.contains(\"/\") ){\n\t\t\t//\tflag=1;\n\t\t\t//}\n\t\t\t\n\t\t\t// Add the valid WikiLinks in the List\n\t\t\tif(flag==0){\n\t\t\t\twikiLink = wikiLink.replace(\"&amp;\", \"&\");\n\t\t\t\tList.add(wikiLink);\n\t\t\t}\n\t }\n\t\treturn List;\n\t}", "private ArrayList<ResultPair> InitializeManualUrls()\n {\n\t ArrayList<ResultPair> fileUrls = new ArrayList<ResultPair>();\n\t fileUrls.add(new ResultPair(\"https://www.google.com\", true));\n\t fileUrls.add(new ResultPair(\"https://///www.google.com\", false));\n\t fileUrls.add(new ResultPair(\"\", false));\n\t fileUrls.add(new ResultPair(\"http://74.125.224.72/\", true));\n\t fileUrls.add(new ResultPair(\"file:///C:/\", true));\n\t fileUrls.add(new ResultPair(\"http://WWW.GOOGLE.COM\", true));\n\t fileUrls.add(new ResultPair(\"http://www.google.com:80/test1\", true));\n\t fileUrls.add(new ResultPair(\"h3t://go.cc:65a/$23?action=edit&mode=up\", false));\n\t fileUrls.add(new ResultPair(\"12345\", false));\n\t fileUrls.add(new ResultPair(\"http://www.space in here.com\", false));\n\t fileUrls.add(new ResultPair(\"http://site.com/#citation\", true));\n\t fileUrls.add(new ResultPair(\"ftp://site.com\", true));\n\t fileUrls.add(new ResultPair(\"http://site.com/hyphen-here\", true));\n\t fileUrls.add(new ResultPair(\"http://www.example.com:8080\", true));\n\t fileUrls.add(new ResultPair(\"foo://example.com:80/over/there?name=ferret#nose\", true));\n\t fileUrls.add(new ResultPair(\"foo://example.com:80/over/there#nose\", true));\n\t fileUrls.add(new ResultPair(\"foo://example.com/there?name=ferret\", true));\n\t fileUrls.add(new ResultPair(\"foo://example.com:8042/over/there?name=ferret#nose\", true));\n\t fileUrls.add(new ResultPair(\"http://[email protected]\", true));\n\t fileUrls.add(new ResultPair(\"http://142.10.5.2:8080/\", true));\n\t return fileUrls;\n }", "public List<Element> monitorPage(String link){\n\t\tSystem.out.println(\"monitor Page \" + link);\n\t\tDocument document;\n\t\tList<Element> results = new ArrayList<Element>();\n\t\t// se connecte au site\n\t\tdocument = connectToPage(link);\n\t\t// liste tous les éléments de la classe inner-article (i.e. tout ce qu'il y a sur la page\n\t\tSystem.out.println(document.toString());\n\t\t/*List<Element> articlesGeneral = new ArrayList<Element>();\n\t\tfor (Element element : elements) {\n\t\t\t// extrait chaque link a des articles \n\t\t\tElement linkPage = element.select(\"a\").first();\n\t\t\tarticlesGeneral.add(linkPage);\n\t\t}\n\t\tresults = articlesGeneral;*/\t\t\n\n\t\treturn results;\n\n\t}", "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 List<DocDownloadForm> allDocList(DataSource dataSource) \r\n\t{\n\t\treturn impl.allDocList(dataSource);\r\n\t}", "@Override\n public void getFilesContent(List<FileReference> resultFilesContent) {\n }", "@Override\n public void getFilesContent(List<FileReference> resultFilesContent) {\n }", "List<Link> findLinkByCache();", "private void odfContentList(Document document) {\n\t\t// mimetype\n\t\t// content\n\t\t// styles\n\t\t// meta\n\t\t// settings\n\t\t// META-INF/manifest - this thing should tell us what is in the document\n\t\t// Versions\n\t\t// Thumbnails\n\t\t// Pictures\n\n\t\tOdfPackage pkg = document.getPackage();\n\n\t\tfor (String file : pkg.getFilePaths()) {\n\t\t\tif (file != null)\n\t\t\t\tfilePaths.add(file);\n\t\t}\n\n\t}" ]
[ "0.66935825", "0.6438617", "0.6364327", "0.6344232", "0.6260262", "0.6183196", "0.61403203", "0.60765153", "0.60674286", "0.59886855", "0.5974194", "0.59668213", "0.590417", "0.5898591", "0.58302724", "0.5803553", "0.57600665", "0.5759026", "0.56984115", "0.56900144", "0.56823224", "0.56725806", "0.56678915", "0.56615645", "0.5636776", "0.5606914", "0.55898094", "0.55656695", "0.5562092", "0.55593234", "0.55314755", "0.5529949", "0.55235296", "0.5506024", "0.54823476", "0.5461309", "0.54598874", "0.5454867", "0.54532385", "0.5452346", "0.5429926", "0.5419984", "0.5395256", "0.53837305", "0.53724486", "0.5335543", "0.53259385", "0.53176945", "0.5313478", "0.53123665", "0.5295046", "0.52934533", "0.52530783", "0.52471644", "0.5241894", "0.5237063", "0.51750034", "0.51741135", "0.51308966", "0.5126435", "0.5121491", "0.5087923", "0.5077645", "0.50744367", "0.50701797", "0.50683004", "0.5061641", "0.5049261", "0.50443244", "0.50442356", "0.50404894", "0.5040067", "0.5030552", "0.5011479", "0.4984745", "0.49772277", "0.4962518", "0.49607435", "0.49446008", "0.49428496", "0.49342316", "0.49119964", "0.49119964", "0.49087754", "0.49034306", "0.48822102", "0.4872279", "0.48663288", "0.48638234", "0.48558798", "0.48543978", "0.48475", "0.48435858", "0.48397675", "0.48384905", "0.4837901", "0.48221225", "0.48221225", "0.48180506", "0.48099932" ]
0.68567795
0
Toast.makeText(MainActivity.this, "You're a budgeting star!", Toast.LENGTH_SHORT).show();
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Log.d(LOG_TAG, "setOnItemClickListener: position: " + position); switch(position){ case 0: Intent intent = new Intent(MainActivity.this, PieChartActivity.class); startActivity(intent); break; default: break; } }
{ "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 yell(String message){\n Toast.makeText(getApplicationContext(), message, 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 }", "@Override\n public void onClick(View v) {\n Toast.makeText(MainActivity.this, \"Goodbye!\", Toast.LENGTH_SHORT).show();\n }", "private void sendToCatTheater()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Theater'\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(MainActivity.this, \"Hello World\", Toast.LENGTH_LONG).show();\n }", "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 }", "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 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 }", "public void showMessage(String text)\n {\n Toast.makeText(this, text, Toast.LENGTH_SHORT).show();\n }", "private void displayToast(String message) {\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "void showToast(String message);", "void showToast(String message);", "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 }", "private void toastMessage (String message){\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "private void toastmessage(String message){\n Toast.makeText(Accountinfo.this,message,Toast.LENGTH_SHORT).show();\n }", "private void showToast(String message){\n\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 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 }", "public void showToast(String text){\n Toast.makeText(this,text,Toast.LENGTH_SHORT).show();\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 }", "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 }", "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 }", "public void showComingSoonMessage() {\n showToastMessage(\"Coming soon!\");\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 }", "@Override\n public void toastText(String s){\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_SHORT).show();\n }", "private void sendToCatDance()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Dance'\", Toast.LENGTH_SHORT).show();\n }", "private void sendToCatLit()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Literary'\", Toast.LENGTH_SHORT).show();\n }", "private void toast(String string){\n Toast.makeText(this, string, Toast.LENGTH_SHORT).show();\n }", "@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: [email protected]\", Toast.LENGTH_LONG);\n // This is for the toast message to show.\n toast.show();\n\n }", "public void toast (String msg)\n\t{\n\t\tToast.makeText (getApplicationContext(), msg, Toast.LENGTH_SHORT).show ();\n\t}", "protected void showToast(String message) {\n\tToast.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 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 }", "public void displayToast(String message) {\n Toast.makeText(getApplicationContext(), message,\n 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 sendToCatEd()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Education'\", Toast.LENGTH_SHORT).show();\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}", "public void ting(String msg) {\r\n\t\tToast.makeText(this, msg, Toast.LENGTH_SHORT).show();\r\n\t}", "public void DisplayToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_SHORT).show();\n }", "private void toast(String bread) {\n Toast.makeText(getActivity(), bread, Toast.LENGTH_SHORT).show();\n }", "@SuppressLint(\"StringFormatMatches\")\n private String createToast(double grade) {\n String message;\n Resources res = getResources();\n message = res.getString(R.string.toast_message, grade);\n return message;\n }", "private void toastMessage(String message) {\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n\n }", "private void sendToCatVA()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Visual Art'\", Toast.LENGTH_SHORT).show();\n }", "private void messageToUser(CharSequence text)\n {\n Context context = getApplicationContext();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.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 }", "static void makeToast(Context ctx, String s){\n Toast.makeText(ctx, s, Toast.LENGTH_SHORT).show();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString str = \"FeedBack : \" + feedbackText + \"\\n Rating : \" + String.valueOf(ratebar.getRating());\n\t\t\t\tToast.makeText(getApplicationContext(), str, Toast.LENGTH_LONG).show();\n\t\t\t}", "@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 }", "private void exibe_mensagem(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 }", "private void showToast(String msg) {\r\n Toast.makeText(Imprimir.this, msg, Toast.LENGTH_LONG).show();\r\n }", "private void showToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_LONG).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 void showMessage(String msg) {\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "public static void displayToast(Context context, String msg) {\n Toast.makeText(context, msg, Toast.LENGTH_LONG).show();\n\n }", "void toast(int resId);", "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 }", "@Override\n public void onClick(View v) {\n Toast.makeText(getContext(), \"Not Ready Yet :(\", Toast.LENGTH_SHORT).show();\n }", "void showToast(String value);", "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 }", "public static void showToast(Context context, String msg) {\n Toast.makeText(context, \"\" + msg, Toast.LENGTH_LONG).show();\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 toastMsg(View v){\n String msg = \"Message Sent!\";\n Toast toast = Toast.makeText(this,msg,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 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 }", "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 onClick(View v) {\n ((TextView) findViewById(R.id.text)).setText(\"Android is AWESOME!!\");\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 }", "public void showErrorMessage(){\n Toast.makeText(context, R.string.generic_error_message, Toast.LENGTH_LONG).show();\n }", "public void onClick(View v) {\n Toast toast = Toast.makeText(getApplicationContext(), \"This button will launch my Library 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 }", "@Override\n public void toastSemEnderecos() {\n Toast.makeText(MainActivity.this, R.string.semEndereco, Toast.LENGTH_SHORT).show();\n }", "public void message(String message){\n Toast.makeText(getContext(),message,Toast.LENGTH_SHORT).show();\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 }", "private void makeToast(String message){\n Toast.makeText(SettingsActivity.this, message, Toast.LENGTH_LONG).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 onClick(View v) {\n Toast.makeText(getContext(),\"hey uuuu clicked me \",Toast.LENGTH_SHORT).show();\n }", "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}", "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}", "private void displayMessage(String message) {\n Log.d(\"Method\", \"displayMessage()\");\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "public static void showToast(Context context, CharSequence message) {\n Toast.makeText(context, message, Toast.LENGTH_SHORT).show();\n }", "private void displayMessage(String message) {\n TextView priceTextView = (TextView) findViewById(R.id.price_tv);\n priceTextView.setText(message);\n }", "public void displayMessage(String message) {\n Toast.makeText(_context, message, Toast.LENGTH_SHORT).show();\n }", "public void showToast(String text)\n {\n Text icon = GlyphsDude.createIcon(FontAwesomeIconName.CHECK_CIRCLE,\"1.5em\");\n icon.setFill(Color.WHITE);\n Label l = new Label(text) ;\n l.setTextFill(Color.WHITE);\n l.setGraphic(icon);\n snackbar = new JFXSnackbar(PrinciplePane);\n snackbar.enqueue( new JFXSnackbar.SnackbarEvent(l));\n }", "private static void showToast(String stringToDisplay, Context context) {\n Toast.makeText(context, stringToDisplay, Toast.LENGTH_SHORT).show();\n }", "public void toastMessage(String message) {\n Context context = getApplicationContext();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, message, duration);\n toast.show();\n }", "private void sendToCatFilm()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Film'\", 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 }", "public void successfulReservation()\n {\n showToastMessage(getResources().getString(R.string.successfulReservation));\n }", "public void displayMessage(View view) {\n // I got the following line of code from StackOverflow: http://stackoverflow.com/questions/5620772/get-text-from-pressed-button\n String s = (String) ((Button)view).getText();\n CharSequence msg = new StringBuilder().append(\"This button will launch my \").append(s.toString()).append(\" app\").toString();\n Toast.makeText(view.getContext(),msg, Toast.LENGTH_SHORT).show();\n }", "private void gameWonDialog() {\n Toast makeText;\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.game_won), Toast.LENGTH_LONG);\n makeText.show();\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.final_score) + score, Toast.LENGTH_LONG);\n makeText.show();\n }", "private void toast(String aToast) {\n Toast.makeText(getApplicationContext(), aToast, Toast.LENGTH_LONG).show();\n }", "public static void showToast(Context context, String msg) {\n Toast.makeText(context, msg, Toast.LENGTH_LONG).show();\n }", "protected void toast() {\n }" ]
[ "0.7473658", "0.727255", "0.7256138", "0.7235503", "0.72050524", "0.71986926", "0.71501714", "0.71278936", "0.7055224", "0.7023866", "0.70144767", "0.701444", "0.701444", "0.6944876", "0.6934061", "0.6933886", "0.69272786", "0.69134104", "0.69134104", "0.69085467", "0.69021314", "0.6879442", "0.6878028", "0.6878028", "0.68671393", "0.68584466", "0.6856334", "0.68507683", "0.6849148", "0.6841767", "0.6820527", "0.681726", "0.68139946", "0.67980945", "0.67965144", "0.6788052", "0.67869014", "0.67837125", "0.67733186", "0.6772175", "0.6772175", "0.6772175", "0.67678803", "0.6758293", "0.67475945", "0.67420346", "0.673785", "0.67347956", "0.6696608", "0.6672519", "0.66707677", "0.66695607", "0.6650392", "0.6649609", "0.66489726", "0.66473407", "0.66447", "0.66364026", "0.66316783", "0.662499", "0.6611329", "0.66091776", "0.6605697", "0.65824604", "0.6577057", "0.6572485", "0.65723085", "0.6557485", "0.6556044", "0.6555078", "0.6545852", "0.65452486", "0.653413", "0.65211153", "0.6507574", "0.64913523", "0.6487734", "0.64873207", "0.64774084", "0.64728504", "0.64644724", "0.6460813", "0.64589906", "0.64578766", "0.6457545", "0.6451886", "0.64337313", "0.64330333", "0.6430733", "0.6427263", "0.64198613", "0.6413738", "0.64114916", "0.64049494", "0.6401386", "0.6400032", "0.63997364", "0.63922477", "0.6390735", "0.638409", "0.63633126" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.menu, menu);\r\n return true;\r\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7249256", "0.72037125", "0.7197713", "0.7180111", "0.71107703", "0.70437056", "0.70412415", "0.7014533", "0.7011124", "0.6983377", "0.69496083", "0.69436663", "0.69371194", "0.69207716", "0.69207716", "0.6893342", "0.6886841", "0.6879545", "0.6877086", "0.68662405", "0.68662405", "0.68662405", "0.68662405", "0.68546635", "0.6850904", "0.68238425", "0.6820094", "0.6817109", "0.6817109", "0.6816499", "0.6809805", "0.68039787", "0.6801761", "0.6795609", "0.6792361", "0.67904586", "0.67863315", "0.67613983", "0.67612505", "0.67518395", "0.6747958", "0.6747958", "0.67444956", "0.674315", "0.672999", "0.67269987", "0.67268807", "0.67268807", "0.67242754", "0.67145765", "0.6708541", "0.6707851", "0.6702594", "0.6702059", "0.6700578", "0.6698895", "0.66905326", "0.6687487", "0.6687487", "0.66857284", "0.66845626", "0.6683136", "0.66816247", "0.66716284", "0.66714823", "0.66655463", "0.6659545", "0.6659545", "0.6659545", "0.6658646", "0.6658646", "0.6658646", "0.6658615", "0.6656098", "0.665457", "0.6653698", "0.66525924", "0.6651066", "0.66510355", "0.6649152", "0.6648921", "0.6648275", "0.6647936", "0.66473657", "0.66471183", "0.6644802", "0.66427094", "0.66391647", "0.66359305", "0.6635502", "0.6635502", "0.6635502", "0.66354305", "0.66325855", "0.66324854", "0.6630521", "0.66282266", "0.66281354", "0.66235965", "0.662218", "0.66216594" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); Log.d(LOG_TAG, "nav item id: " + id); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } // Activate the navigation drawer toggle if (mDrawerToggle.onOptionsItemSelected(item)) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.79039484", "0.78061193", "0.7765948", "0.772676", "0.76312095", "0.76217103", "0.75842994", "0.7530533", "0.748778", "0.7458179", "0.7458179", "0.7438179", "0.74213266", "0.7402824", "0.7391232", "0.73864055", "0.7378979", "0.73700106", "0.7362941", "0.73555434", "0.73453045", "0.7341418", "0.7330557", "0.7327555", "0.7326009", "0.7318337", "0.73160654", "0.73132724", "0.73037714", "0.73037714", "0.73011225", "0.7297909", "0.7293188", "0.72863173", "0.7282876", "0.72807044", "0.72783154", "0.72595924", "0.72595924", "0.72595924", "0.7259591", "0.72591716", "0.7249715", "0.72243243", "0.7219297", "0.7216771", "0.72042644", "0.72012293", "0.7199543", "0.7193037", "0.7184855", "0.7177254", "0.7168334", "0.7167477", "0.71536905", "0.7153523", "0.7135821", "0.7134834", "0.7134834", "0.7128953", "0.7128911", "0.71241933", "0.7123363", "0.71228945", "0.71219414", "0.7117495", "0.71173275", "0.71169853", "0.7116851", "0.7116851", "0.7116851", "0.7116851", "0.71148705", "0.7112308", "0.7109725", "0.71084905", "0.71055764", "0.70995593", "0.7098301", "0.7096311", "0.70935965", "0.70935965", "0.7086441", "0.7082852", "0.70806813", "0.70801675", "0.7073609", "0.70681775", "0.7061872", "0.7060011", "0.7059868", "0.70513153", "0.7037599", "0.7037599", "0.7036033", "0.70353055", "0.70353055", "0.70322436", "0.70304227", "0.70294935", "0.70187974" ]
0.0
-1
Intent to go to form activity
public void onClickAdd(View v) { Intent intent = new Intent(this, ItemFormActivity.class); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent= new Intent(MenuDemoActivity.this,FormActivity.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\r\n\t\t\t}", "public void ShowNewTaskForm(View view)\n // //onClick ButtonNewTask\n {\n Log.d(\"CEGG\", \"click ButtonNewTask\");\n\n // //Explicit intent to start\n Intent intent = new Intent(\n getApplicationContext(), NewTaskFormActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(DialogInterface dialog,\n\n int which) {\n\n Intent i = new Intent(getApplicationContext(), MainActivity.class);\n i.putExtra(\"from_value\", \"enquiry\");\n startActivity(i);\n\n }", "@Override\n public void onClick(View view) {\n\n startActivity(getIntent());\n }", "public void ShowTaskListForm(View view)\n // //onClick ButtonNewTask\n {\n Log.d(\"CEGG\", \"click ShowTaskListForm\");\n\n // //Explicit intent to start\n Intent intent = new Intent(\n getApplicationContext(), TaskListActivity.class);\n startActivity(intent);\n }", "@Override\n public void goToEvent() {\n startActivity(new Intent(AddGuests.this, DetailEventRequest.class)); }", "private void goToDoctors() {\n\n Intent intent = new Intent(this, DoctorsActivity.class);\n intent.putExtra(EXTRA_EMAIL, email);\n startActivity(intent);\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent=new Intent(InputForm.this,SplashScreen.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onClick(View view) {\n startActivity(new Intent(MainActivity.this, InputActivity.class));\n }", "@Override\n public void onClick(View view) {\n startActivityForResult(new Intent(getContext(),RegistrarNotas.class),REGISTER_FORM_REQUEST);\n }", "@Override\r\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tIntent i = new Intent(AdminMapField.this, AdminMapField.class);\r\n\t\t\t\tstartActivity(i);\r\n\t\t\t}", "public void onClick(DialogInterface dialog, int which) {\n Intent nextScreen = new Intent(getApplicationContext(), Mockup1.class);\n startActivityForResult(nextScreen, 0);\n\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(\r\n\t\t\t\t\t\t\t\t\t\t\t\tDialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t\t\tIntent intent = new Intent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tAdminMapField.this,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tAdminMapField.class);\r\n\t\t\t\t\t\t\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\t\t\t\t\t\t}", "public void goToEntitySelectActivity() {\n Intent intent = new Intent(LoginActivity.this, EntitySelectActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n }", "public void onClick(View v) {\n\n startActivity(new Intent(MainPage.this, AddFD.class));\n\n\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getActivity(), ANQ.class);\n startActivity(intent);\n\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(getActivity(), ContactAdd.class);\n startActivityForResult(intent, 10001);\n }", "void showCreditCardForm() {\n Intent intent = new Intent(this, CreditCardActivity.class);\n intent.putExtra(CreditCardActivity.EXTRA_PKEY, getString(R.string.omise_pkey));\n startActivityForResult(intent, REQUEST_CC);\n }", "public void Volgende(Intent intent){\r\n\r\n startActivity(intent);\r\n\r\n }", "@Override\n public void onClick(View v) {\n Intent myIntent = new Intent(ChooseParty.this, HelpActivity.class);\n // myIntent.putExtra(\"key\", value); //Optional parameters\n myIntent.putExtra(\"username\", mUsername);\n startActivity(myIntent);\n }", "@Override\n public void onClick(View v) {\n Intent account = new Intent(Welcome.this, MyAccount.class);\n startActivity(account);\n\n }", "@Override\n public void onClick(View view) {\n\n Intent itCadastro = new Intent(\n PrincipalActivity.this, CadastroTrilheiroActivity_.class\n );\n startActivity(itCadastro);\n }", "@Override\n public void onClick(View arg0) {\n Intent email = new Intent(getApplicationContext(), email.class);\n startActivity(email);\n }", "public void go_to_setting(){\n Intent i=new Intent(LoginSelection.this, Configuration.class);\n startActivity(i);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(ActivityIndex.this, ActivityTrialMessage.class);\n intent.putExtra(\"fromIndex\", true);\n startActivity(intent);\n }", "public void onClick(View v) {\n\n\n\n startActivity(myIntent);\n }", "public void onClick(View view) {\n Intent nextScreen = new Intent(view.getContext(), Mockup1.class);\n startActivityForResult(nextScreen, 0);\n }", "private void goToRegisterActivity() {\n Intent intent = new Intent(LoginActivity.this, RegisterAccountActivity.class);\n startActivityForResult(intent, 0);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, CardapioActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n startActivity(new Intent(\n HomeScreen.this, AddPoi.class));\n\n }", "public void openCreateAccount(){\n Intent intent = new Intent(this, createAccountActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Intent returns = new Intent(Welcome.this, Returns.class);\n startActivity(returns);\n\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(Visa.this,Recepit.class);\n startActivity(intent);\n\n\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(SubmitPaymentActivity.this, PatientHomeActivity.class);\n //start activity\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent screenChange = new Intent(getApplicationContext(), settings.class);\n //creating a bundle to store the variables that will be passed into the next\n //activity\n //starting our activity for a result\n startActivity(screenChange);\n }", "private void goToRegisterScreen()\n {\n Intent intent = new Intent(this, Register.class);\n startActivity(intent);\n }", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tIntent i =new Intent(AdviceForm.this,AdviceFeedback.class);\n\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t}", "private void gotoOptions() {\n Intent launchOptions = new Intent(this, Preferences.class);\n startActivity(launchOptions);\n }", "@Override\n public void onClick(View view){\n Intent goToList = new Intent(SPQ7Page.this,SPQuestionList.class );\n\n // Executes Intent object.\n startActivity(goToList);\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent gotodaftar=new Intent(LogonActivity.this,PasswordActivity.class);\n\t\t\t\tstartActivity(gotodaftar);\n\t\t\t\t\n\t\t\t}", "private void ConfirmToken() {\n Intent i = new Intent(RegisterMe.this, ConfirmToken.class);\n startActivity(i);\n}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent1 = new Intent();\n\t\t\t\tintent1.setClass(Admin2Home.this, Admin2UseRegist.class);\n\t\t\t\tstartActivity(intent1);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent gotodaftar=new Intent(LogonActivity.this,RegisterActivity.class);\n\t\t\t\tstartActivity(gotodaftar);\n\t\t\t\t\n\t\t\t}", "public void toBeam(){\n Intent intent = new Intent(this, Beam.class);\n startActivity(intent);\n }", "@Override\r\n public void onClick(View view) {\n Intent intent = new Intent(GuidePage.this, LoginOrRegister.class);\r\n startActivity(intent);\r\n }", "public void Continuar (View view)\n {\n Intent continuar = new Intent( this, Formulario2.class);\n continuar.putExtra(\"nombre\",et_nombre.getText().toString());\n continuar.putExtra(\"apellido\",et_apellido.getText().toString());\n continuar.putExtra(\"telefono\",et_telefono.getText().toString());\n continuar.putExtra(\"email\",et_email.getText().toString());\n continuar.putExtra(\"direccion\",et_direccion.getText().toString());\n continuar.putExtra(\"fecha\",et_fecha.getText().toString());\n continuar.putExtra(\"spinner1\",s1.getSelectedItem().toString());\n continuar.putExtra(\"spinner2\",s2.getSelectedItem().toString());\n startActivity(continuar );\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\r\n\t\t\t\tIntent i=new Intent(getApplicationContext(),Pfillup.class);\r\n\t\t\t\tstartActivity(i);\r\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n final Intent i = new Intent(Resultat.this, MenuPrincipal.class);\n startActivity(i);\n }", "public void mantItinerario(View view){\n Intent intent = new Intent(this, mant_itinerario.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent Getintent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://feedback.avriant.com\"));\n startActivity(Getintent);\n }", "@Override public void onClick(View arg0) {\n Intent intent = new Intent(OweActivity.this, SetReminder.class);\n startActivity(intent);\n }", "@Override public void onClick(View arg0) {\n Intent intent = new Intent(OweActivity.this, SetReminder.class);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(Admin2Home.this, Admin2UseQuery.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "void openActivity() {\n Intent intent = new Intent(\"myaction\");\n Bundle bundle = new Bundle();\n bundle.putString(\"name\", \"hui\");\n intent.putExtras(bundle);\n startActivityForResult(intent, 1);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Intent callOnwerIntent = new Intent(Intent.ACTION_DIAL,\n Uri.parse(\"tel:\"+gym.getOwnerMobile().toString()));\n startActivity(callOnwerIntent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(MyInfoActivity.this, PhoneSetActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onClick(View v) {\n Intent cambioVentana = new Intent(Portada.this, MainActivity.class);\n startActivity(cambioVentana);\n }", "public void onClick(DialogInterface dialog, int which) {\n\n Intent nextScreen2 = new Intent(getApplicationContext(), CreateAccount.class);\n System.out.println(\"IN ALRT\");\n System.out.println(login);\n nextScreen2.putExtra(\"login\", login);\n nextScreen2.putExtra(\"password1\", password);\n nextScreen2.putExtra(\"password2\", password2);\n nextScreen2.putExtra(\"email\", email);\n nextScreen2.putExtra(\"birth_date\", dob);\n\n\n startActivityForResult(nextScreen2, 0);\n\n }", "@Override\n public void onClick(View v) {\n Intent cambioVentana = new Intent(Portada.this, Preferencias.class);\n startActivity(cambioVentana);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setClass(AddPlan.this,Favorite_Site.class);\n// Bundle bundle = new Bundle();\n// bundle.putString(\"myChoice\",\"hello\");\n// intent.putExtras(bundle);\n// startActivityForResult(intent,0);\n startActivity(intent);\n// //AddPlan.this.finish();\n finish();\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Intent intent = new Intent(CreateList.this, Login.class);\n activity.startActivity(intent);\n }", "public void transferActivity() {\n Intent intent = new Intent(this, AddInfoActivity.class);\n this.startActivity(intent);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n startActivity(new Intent(getApplicationContext(), home_page_register.class));\n\n }", "public static void startActivity(Context context) {\n context.startActivity(new Intent(context, CheetahSigninActivity.class));\n }", "@Override\n public void onClick(View view) {\n Intent httpIntent = new Intent(Intent.ACTION_VIEW);\n httpIntent.setData(Uri.parse(\"http://bvmengineering.ac.in\"));\n\n startActivity(httpIntent);\n\n }", "public void ButtonClicked(View view) {\n Intent intentInput = new Intent(DetailActivity.this, InputActivity.class);\n startActivity(intentInput);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent it = new Intent(ManaInsertActivity.this,ManaMediActivity.class); \n it.putExtras(it);\n startActivity(it);\n\t\t\t}", "@Override\n\tpublic void onClick(View view) {\n\t\tIntent intent = new Intent();\n\t\tif (view.getId() == R.id.ast_back_icon) {\n\t\t\tintent.setClass(this, AstLoginActivity.class);\n\t\t} else if (view.getId() == R.id.ast_mob_sdk_next_step_btn) {\n\t\t\tnew GuestPhoneCanBindHandler(AstGamePlatform.getInstance()\n\t\t\t\t\t.isDebugMode(), new HttpCallback() {\n\t\t\t\tpublic void onSuccess(int code, String msg, final Object data) {\n\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\tintent.setClass(getApplicationContext(),\n\t\t\t\t\t\t\tDeclareGetPasswdActivity.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * 登陆失败处理\n\t\t\t\t */\n\t\t\t\tpublic void onFailure(int code, final String msg, Object data) {\n\t\t\t\t\tif (code != 317) {\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), msg,\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\t\tintent.setClass(getApplicationContext(),\n\t\t\t\t\t\t\t\tRegetPasswdActivity.class);\n\t\t\t\t\t\tintent.putExtra(\"mobile\", ed.getText().toString());\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, ed.getText().toString()).post();\n\t\t\treturn;\n\t\t}\n\t\tfinish();\n\t\tstartActivity(intent);\n\t}", "public void onClick(View v)\n {\n Intent fp=new Intent(getApplicationContext(),SignUpDetails.class);\n startActivity(fp);\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tswitch(v.getId()){\n\t\tcase R.id.bnext:\n\t\tIntent i = new Intent(getApplicationContext(),ClientServerJSONActivity.class);\n\t\t//Intent i = new Intent(getApplicationContext(),Form.class);\n\t\tstartActivity(i);\n\t\tbreak;\n\t\tcase R.id.bexit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/services\"));\n startActivity(browserIntent);\n }", "@Override\n public void onClick(View view) {\n Intent i = new Intent(view.getContext(), EditProfil.class);\n i.putExtra(\"fullName\", nameTextView.getText().toString());\n i.putExtra(\"email\", emailTextView.getText().toString());\n i.putExtra(\"phone\",phoneTextView.getText().toString());\n startActivity(i);\n }", "public void GoToSignup(View v)\n\t\t {\n \t\t\tIntent intent = new Intent();\n\t\t\tintent.setClassName(this, FreewayCoffeeSignupActivity.class.getName());\n\t\t\tstartActivity(intent);\n\t\t\tfinish();\n\t\t }", "@Override\n public void onClick(View v) {\n\t \tIntent myIntent = new Intent(MainActivity.this, Select.class);\n\t \t//myIntent.putExtra(\"key\", value); //Optional parameters\n\t \tMainActivity.this.startActivity(myIntent);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(ResetPassword.this, ForgetPassword.class);\n startActivity(intent);\n finish();\n }", "public void toExamFi(View view) {\n Log.i(\"BOTTOM NAVIGATION\", \"to exam navigation item clicked\");\n Intent intent = new Intent(getApplicationContext(), ExamActivity.class);\n intent.putExtra(\"finnish\", true);\n intent.putExtra(\"startNewExam\", true);\n db.setIsFinnishQuestions(true);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(Admin2Home.this, Admin2Infomation.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(MainActivity.this, TriggerActivity.class);\n startActivity(intent);\n }", "public void buttonToExam(View view) {\n Log.i(\"BOTTOM NAVIGATION\", \"to exam button clicked\");\n Intent intent = new Intent(getApplicationContext(), ExamActivity.class);\n// intent.putExtra(\"extra\", \"extra\");\n startActivity(intent);\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\tcase R.id.sendbtn:\n\t\t\tGuideActivity.this.finish();\n\t\t\t// Intent intent=new\n\t\t\t// Intent(GuideActivity.this,FragmentManagerActivity.class);\n\t\t\tIntent intent = new Intent(GuideActivity.this, LoginActivity.class);\n\t\t\tstartActivity(intent);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\n public void onClick(View view){\n Intent intentWeb = new Intent(Intent.ACTION_VIEW);\n intentWeb.setData(Uri.parse(buttonUrl.getText().toString()));\n startActivity(intentWeb); //lancement\n\n }", "public void onClick(DialogInterface dialog, int which) {\n Intent i = new Intent(settingsScr.this,accountScr.class);\n i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(i);\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(MainActivity.this, AddressActivity.class);\n startActivityForResult(i,2);\n\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(MainActivity.this, PageDetailDestinasiPopuler.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent browser = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://petobesityprevention.org/\"));\n startActivity(browser);\n }", "@Override \n\t public void onClick(DialogInterface dialog, int which) {\n\t Intent intent = new Intent(MyActivity.this,ConPasswordChange.class);\n\t startActivity(intent);\n\t \n\t }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(MainActivity2.this, NewTripActivity.class);\n startActivityForResult(intent, NEW_TRIP_ACTIVITY_REQUEST_CODE);\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent(MainActivity.this, EditDataActivity.class);\n startActivity(intent);\n\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(Admin2Home.this, Admin2PasswordChange.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "private void onForgetPwd() {\n Intent intent = new Intent(this, ForgotPasswordActivity.class);\n startActivity(intent);\n finish();\n }", "@Override\n public void onClick(View view) {\n Intent nameIntent = new Intent(AccountSettingsActivity.this, NameActivity.class);\n startActivity(nameIntent);\n }", "@Override\n public void onClick(View v) {\n Intent welcome = new Intent(Welcome.this, Scan.class);\n startActivity(welcome);\n\n }", "public void startIntent(View view) {\n Intent addToDoIntent = new Intent(ToDoListActivity.this, AddToDoActivity.class);\n startActivityForResult(addToDoIntent, TODO_ADDED);\n }", "private void goToMainActivity(){\n Log.d(TAG, \"goToMainActivity: called\");\n saveUserLogin(login);\n\n Intent intent = new Intent(\"android.intent.action.MapActivity\");\n view.getContext().startActivity(intent);\n }", "public void onClick(View v) {\n\n Intent intent = new Intent();\n intent.setClass(save_succeed.this, enter.class);\n // 转向添加页面\n startActivity(intent);\n //finish()???\n }", "public void onClick(View view) {\n Intent intent = new Intent();\n intent.setAction(\"android.intent.action.VIEW\");\n intent.setType(\"text/plain\");\n intent.addCategory(\"android.intent.category.DEFAULT\");\n startActivity(intent);\n\n }", "public void gotoSignupActivity() {\n Intent intent = new Intent();\n intent.setClass(mContext, SignupActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivityForResult(intent, SIGNUP_ACTIVITY_CODE);\n }", "@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/\"));\n startActivity(browserIntent);\n }", "public void rejestruj (View view){\n\n android.content.Intent myIntent = new android.content.Intent(view.getContext(), Rejestracja.class);\n startActivity(myIntent);\n\n\n }", "public void mantDoble(View view){\n Intent intent = new Intent(this, mant_doble.class);\n startActivity(intent);\n }", "public void figura1(View view){\n Intent figura1 = new Intent(this,Figura1.class);\n startActivity(figura1);\n }" ]
[ "0.722217", "0.7130719", "0.7072999", "0.69961125", "0.6925536", "0.6831818", "0.6796979", "0.679104", "0.6786437", "0.674416", "0.6726762", "0.6716351", "0.66955626", "0.66638076", "0.6648729", "0.6635348", "0.6589445", "0.6589343", "0.65816396", "0.6558563", "0.6544691", "0.6543845", "0.6534928", "0.65043736", "0.6499488", "0.6494892", "0.6493142", "0.64794993", "0.64724547", "0.6468294", "0.6466568", "0.64616513", "0.645766", "0.6451914", "0.6450155", "0.6448491", "0.64455396", "0.64370304", "0.643672", "0.64364004", "0.642676", "0.64264464", "0.6425668", "0.6423016", "0.6419942", "0.64183885", "0.64126015", "0.640915", "0.63977736", "0.6397348", "0.6388766", "0.6388766", "0.6385157", "0.63848305", "0.6374955", "0.63740396", "0.637335", "0.63701755", "0.636712", "0.63430333", "0.63323015", "0.6330967", "0.6330439", "0.63290864", "0.63267875", "0.63247216", "0.63238084", "0.6321911", "0.63208485", "0.6314709", "0.6312997", "0.630878", "0.6301596", "0.63015074", "0.630044", "0.6295608", "0.62952375", "0.62937343", "0.62906426", "0.62863946", "0.6283017", "0.6279456", "0.6278125", "0.62773687", "0.62769", "0.62761825", "0.62756056", "0.6274637", "0.6274223", "0.6272673", "0.6271233", "0.6269969", "0.6268618", "0.6267978", "0.62656647", "0.62629527", "0.6251824", "0.6247042", "0.6245695", "0.6245362", "0.6244636" ]
0.0
-1
Remove from list and memory
public void removeElement(int pos){ itemList.remove(pos); SharedPreferences sp = getSharedPreferences(MYPREFS, 0); SharedPreferences.Editor editor = sp.edit(); // Get strings from memory and parse String[] nameWords = sp.getString("name", null).split(","); String[] costWords = sp.getString("cost", null).split(","); String[] statusWords = sp.getString("status", null).split(","); String[] categWords = sp.getString("category", null).split(","); if(nameWords!=null && nameWords.length>0) { // Update budget (increase) int budget = sp.getInt("budget", 0); int budgetNew = budget + Integer.parseInt(costWords[pos]); animateCtr(budget, budgetNew, (TextView)findViewById(R.id.budgetCurrent)); // if(budget < 0){ } Log.d(LOG_TAG, "new budget: " + budgetNew); // Remove chosen item at index pos from array, then reconstruct new string String[] nameNew = ArrayUtils.remove(nameWords, pos); String[] costNew = ArrayUtils.remove(costWords, pos); String[] statusNew = ArrayUtils.remove(statusWords, pos); String[] categNew = ArrayUtils.remove(categWords, pos); Log.d(LOG_TAG, "new arrays: " + Arrays.toString(nameNew) + "\n" + Arrays.toString(costNew) + "\n" + Arrays.toString(statusNew) + "\n" + Arrays.toString(categNew)); StringBuilder bName = new StringBuilder(); StringBuilder bCost = new StringBuilder(); StringBuilder bStatus = new StringBuilder(); StringBuilder bCateg = new StringBuilder(); for (int i = 0; i < nameNew.length; i++) { bName = bName.append(nameNew[i]).append(","); bCost = bCost.append(costNew[i]).append(","); bStatus = bStatus.append(statusNew[i]).append(","); bCateg = bCateg.append(categNew[i]).append(","); } Log.d(LOG_TAG, "stringbuilder test:" + bName.toString() + " " + bCost.toString() + " " + bStatus.toString() + " " + bCateg.toString()); // Update to memory editor.clear(); editor.putString("name", bName.toString()); editor.putString("cost", bCost.toString()); editor.putString("status", bStatus.toString()); editor.putString("category", bCateg.toString()); editor.putInt("old_budget", budget); editor.putInt("budget", budgetNew); editor.commit(); } //decrementCounter(pos); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void remove()\r\n { Exceptions.unmodifiable(\"list\"); }", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "Object remove();", "void remove();", "void remove();", "void remove();", "void remove();", "void remove();", "public Object remove();", "public void remove () {}", "public void remove() {\n\t }", "public void remove() {\n\t }", "public void remove() {\n\t }", "public void remove()\n {\n list.remove(cursor);\n cursor--;\n }", "public void remove() {\r\n //\r\n }", "@Override\n\t\t\tpublic void remove() {\n\t\t\t\tthrow new UnsupportedOperationException();\n//\t\t\t\tif (i == begin || removed)\n//\t\t\t\t\tthrow new IllegalStateException();\n//\t\t\t\telements.set(i-1, null);\n//\t\t\t\tremoved = true;\n\t\t\t}", "public void remove() {\n if (count == 0) {\n return;\n }\n \n Random rand = new Random();\n int index = rand.nextInt(count);\n for (int i = index; i < count - 1; i++) {\n list[i] = list[i+1];\n }\n count--; \n }", "public void remove() {\n\t}", "public void remove() {\n\t}", "public void remove(){\n }", "@Override\n public void remove() {\n if(elementToRemove != null){\n if(elementToRemove == lastInternalIteratorGivenElement){\n iterator.remove();\n }\n else{\n list.remove(elementToRemove);\n }\n }\n }", "public void remove() {\r\n return;\r\n }", "@Override\n\tpublic void pop() {\n\t\tlist.removeFirst();\n\t}", "public void testRemoveObj() {\r\n list.add(\"A\");\r\n list.add(\"B\");\r\n assertTrue(list.remove(\"A\"));\r\n assertEquals( \"B\", list.get(0));\r\n assertEquals( 1, list.size());\r\n list.add(\"C\");\r\n assertTrue(list.remove(\"C\"));\r\n assertEquals(\"B\", list.get(0));\r\n }", "@Override\n\tpublic void remove() { }", "public final void remove () {\r\n }", "public void remove() {\n\t itr.remove();\n\t size--;\n\t nextCount--;\n\t }", "public void remove() {\n\t itr.remove();\n\t size--;\n\t nextCount--;\n\t }", "void remove (int offset, int size);", "public void remove() {\n\n }", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "private void removeTailElement(){\n JavaBaseTask removed = items.remove(tail.getKey());\n System.out.println(\"element with index : \" + removed.getKey() + \"has been deleted doe to cache eviction\");\n tail = tail.previous;\n var headAu = head;\n while (headAu.next != null){\n headAu = headAu.next;\n }\n headAu = headAu.previous;\n headAu.next = null;\n }", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "public E remove();", "public E remove();", "public void remove() {\n elements[index] = null;\n size--;\n next();\n }", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "@Test\r\n\tpublic void testRemoveObject() {\r\n\t\tAssert.assertFalse(list.remove(null));\r\n\t\tAssert.assertTrue(list.remove(new Munitions(2, 3, \"iron\")));\r\n\t\tAssert.assertEquals(14, list.size());\r\n\t}", "@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}", "public void remove(int index) {\n for (int i = index; i < this.list.length-1; i++) {\n this.list[i]=this.list[i+1];\n }\n this.size--;\n }", "public boolean atomicRemove();", "public void remove(){throw new RuntimeException(\"Removing() is not implemented\");\r\n\t\t}", "@Override\n public E remove(int index) {\n\t E first = _store[index];\n\t _store[index] = null;\n\t for( int i = index; i< _size-1;i++) {\n\t\t _store[i]=_store[i+1];\n\t }\n\t_store[_size-1]=null;\n\t _size -=1;\n\t \n\t\t \n\treturn first;\n }", "@Override\n public void remove() {\n }", "@Test\r\n\tvoid testRemove4() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\ttest.add(9);\r\n\t\ttest.remove(1);\r\n\t\tassertNotEquals(8, test.list.length);\r\n\t}", "@Override\n public void remove() {\n }", "public void remove(int num) {\n // find the index of num\n for (int i = 0; i < count; i++) {\n if (list[i] == num) {\n // shift the elements leftward and decrement count\n for (int j = 0; j < count - 1; j++) {\n list[i+j] = list[i+j+1];\n }\n count--;\n return;\n }\n }\n }", "public void remove() { \n if (lastAccessed == null) throw new IllegalStateException();\n Node x = lastAccessed.previous;\n Node y = lastAccessed.next;\n x.next = y;\n y.previous = x;\n size--;\n if (current == lastAccessed) current = y;\n else index--;\n lastAccessed = null;\n }", "private void removeList()\r\n {\n if (tableCheckBinding != null)\r\n {\r\n tableCheckBinding.dispose();\r\n tableCheckBinding = null;\r\n }\r\n\r\n // m_TableViewer.setInput(null);\r\n WritableList newList = new WritableList(SWTObservables.getRealm(Display.getDefault()));\r\n for (int i = 0; i < 10; ++i)\r\n {\r\n newList.add(this.generateNewDataModelItem());\r\n }\r\n m_TableViewer.setInput(newList);\r\n }", "@Override\r\n\t\tpublic void remove() {\n\r\n\t\t}", "@Override\n public void remove() throws IllegalStateException{\n if (!removable) throw new IllegalStateException(\"nothing to remove\");\n ArrayList.this.remove(j - 1); // that was the last one returned\n j--; // next element has shifted one cell to the left\n removable = false; // do not allow remove again util next is called\n }", "public void remove() {\n\t\t if (lastReturned == null)\n\t\t throw new IllegalStateException(\n\t\t \"Iterator call to next() \" +\n\t\t \"required before calling remove()\");\n\t\t\tif (modCount != expectedModCount)\n\t\t\t\t throw new ConcurrentModificationException();\n\n\t\t\t// remove lastReturned by calling remove() in Hash.\n\t\t\t// this call will increment modCount\n\t\t\tHashAVL.this.remove(lastReturned);\n\t\t\texpectedModCount = modCount;\n\t\t\tlastReturned = null;\n\t\t}", "@Override\r\n\t\tpublic void remove() {\r\n\t\t\t// YOU DO NOT NEED TO WRITE THIS\r\n\t\t}", "public void removeFriendList(FriendList list);", "@Test\r\n\tvoid testRemove3() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\ttest.add(9);\r\n\t\ttest.remove(10);\r\n\t\tassertEquals(8, test.list.length);\r\n\t}", "@Test\n public void testRemoveAt() {\n testAdd();\n list1.removeAt(3);\n assertEquals(8, list1.size());\n assertEquals(15.25, list1.get(4), 0);\n assertEquals(14.25, list1.get(3), 0);\n assertEquals(17.25, list1.get(5), 0);\n }", "@Override\n public int remove() {\n isEmptyList();\n int result = first.value;\n first = first.next;\n first.previous = null;\n size--;\n return result;\n }", "public void deleteWholeList()\n {\n head = null;\n }", "@Override\n public T remove() {\n if(numItems == 0)\n return null;\n return this.arr[--numItems];\n }", "public Integer remove() {\n while (true) {\n\n if (buffer.isEmpty()) {\n System.out.println(\"List is empty! Waiting..\");\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n System.out.println(e.getMessage());\n }\n } else {\n full.waiting();\n mutex.waiting();\n int back = buffer.removeFirst();\n mutex.signal();\n empty.signal();\n return back;\n\n }\n }\n\n\n }", "@Override\n\tprotected void clearBuffer() {\n\t\tsynchronized (listLock) {\n\t\t\tif (deleteList != null && deleteList.size() > 0) {\n\t\t\t\tdeleteList.clear();\n\t\t\t}\n\t\t}\n\n\t}", "private final void fastRemove(final int index) {\r\n\t\tfinal int numMoved = this.size - index - 1;\r\n\t\tif (numMoved > 0) {\r\n\t\t\tSystem.arraycopy( this.elementData, index + 1, this.elementData, index, numMoved );\r\n\t\t}\r\n\t\tthis.elementData[--this.size] = null; // Let gc do its work\r\n\t}", "@Test\n void testRemoveDeletesElement() {\n MyList l = new MyList();\n l.put(\"key\", \"value\");\n l.remove(\"key\");\n\n assertEquals(false, l.contains(\"key\"));\n }", "@Override\n\tpublic E deQueue() {\n\t\treturn list.removeFirst();\n\t}", "@Override\n public void removeFromCache(List<NulsDigestData> txHashList) {\n\n }", "public void remove() {\r\n setRemovable(true);\r\n }", "public void remove() {\n\t\tprocess temp = queue.removeFirst();\n\t}", "@Test\n public void remove() {\n testList.add(42);\n testList.remove(42);\n assertEquals(0, testList.count());\n }", "void removeList(ShoppingList _ShoppingList);", "@Override\n public void remove(T t) {\n for (int i = 0; i < elementsInArray; i++) {\n if(t.equals(arrayList[i])) {\n arrayList[i] = null;\n elementsInArray--;\n return;\n }\n }\n }", "void remove(int idx);", "Object removeFirst();", "public void clear(){\n\n \tlist = new ArrayList();\n\n }", "void remove(int index);", "void remove(int index);", "void remove(int index);", "void remove(int index);", "@Override\r\n\tpublic void deleteItem() {\n\t\taPList.remove();\r\n\t}", "public static void testRemove(LinkedList list) {\n\t\tlist.remove(\"3\");\n\t\tlist.printForward();\n\t}", "public void remove()\n {\n if( current > 0 )\n {\n set(-- current);\n }\n }", "public void remove(){\r\n // Does Nothing\r\n }", "void removeAll();", "void removeAll();", "public boolean remove (Object obj) {\r\n\t\tboolean result = _list.remove (obj);\r\n\t\tHeapSet.heapify (this);\r\n\t\treturn result;\r\n\t}", "public static void main(String[] args) {\n\n ArrayList<Integer> arrayList=new ArrayList<>();\n\n arrayList.add(1);\n arrayList.add(1);\n arrayList.add(2);\n arrayList.add(5);\n\n\n System.out.println(arrayList);\n System.out.println(arrayList.remove(1));\n System.out.println(arrayList);\n\n }", "void remove( int index );", "public T remove(int index) {\n\n if (index >= size) {\n throw new IndexOutOfBoundsException(\"Index: \" + index + \", Size: \" + size);\n }\n\n T oldValue = myList[index];\n int value = size - index - 1;\n\n if (value > 0) {\n System.arraycopy(myList, index + 1, myList, index, value);\n }\n System.out.println(\"one \" + size);\n myList[--size] = null;\n System.out.println(\"two \" + size);\n\n return oldValue;\n }", "Set<Card> remove();" ]
[ "0.763817", "0.73589957", "0.73589957", "0.73589957", "0.73589957", "0.73589957", "0.7350816", "0.73421293", "0.73421293", "0.73421293", "0.73421293", "0.73421293", "0.72674805", "0.72509617", "0.6917807", "0.6917807", "0.6917807", "0.6898356", "0.6896402", "0.6878811", "0.68182266", "0.6781148", "0.6781148", "0.6713773", "0.6693306", "0.6690403", "0.66826075", "0.66791356", "0.66715056", "0.6662709", "0.6648523", "0.6648523", "0.6641017", "0.66267043", "0.6618095", "0.6618095", "0.66139257", "0.65946776", "0.65946776", "0.65946776", "0.65946776", "0.65946776", "0.65946776", "0.65946776", "0.65946776", "0.658586", "0.658586", "0.65786743", "0.6564381", "0.6564381", "0.65616643", "0.65525025", "0.65194184", "0.6491152", "0.6484564", "0.6469721", "0.64693385", "0.64622366", "0.6459002", "0.6458153", "0.64563644", "0.64559907", "0.6451893", "0.64417624", "0.6434327", "0.6431264", "0.6419932", "0.64189684", "0.64173824", "0.64120024", "0.64097756", "0.64001954", "0.6390697", "0.6383141", "0.6380557", "0.63796103", "0.6379332", "0.6360723", "0.635321", "0.63420105", "0.6338191", "0.63333637", "0.6331031", "0.6329867", "0.63297665", "0.63256234", "0.63206047", "0.63206047", "0.63206047", "0.63206047", "0.63150936", "0.6306191", "0.63050395", "0.6302037", "0.6293663", "0.6293663", "0.62897104", "0.62840754", "0.62786937", "0.62649363", "0.6262937" ]
0.0
-1
Created by Atom on 2015/8/26.
public interface UserInfoMapper { /** * 添加用户信息 * @param user 用户信息 * @return 返回影响行数 */ public int addUser(UserInfo user); /** * 获得所有用户信息 * @return 返回用户信息列表 */ public List<UserInfo> getAllUserInfo(); /** * 根据用户ID,获得用户信息 * @param userId 用户ID * @return 返回用户信息 */ public UserInfo getByUserId(Integer userId); public List<UserInfo> queryByUserAttr(UserInfo user); /** * 根据用户ID,删除用户信息 * @param userId 用户ID * @return 返回影响行数 */ public int delUser(Integer userId); /** * 更新用户信息 * @param user 更新内容 * @return 返回影响行数 */ public int updateUser(UserInfo user); }
{ "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}", "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\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void anular() {\n\n\t}", "private void m50366E() {\n }", "@Override\n\tprotected void getExras() {\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 nadar() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n public int describeContents() { return 0; }", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n void init() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@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\tpublic void dormir() {\n\t\t\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 }", "private void init() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "public void mo21877s() {\n }", "@Override\n public void init() {}", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void m23075a() {\n }", "private static void cajas() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void anularFact() {\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}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "private void kk12() {\n\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\r\n\tpublic void init() {}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\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 mo21779D() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void init() {\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 mo55254a() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "public void mo12930a() {\n }", "public void mo21878t() {\n }", "public void mo6081a() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n public void memoria() {\n \n }", "public final void mo91715d() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "public void mo21825b() {\n }", "public void mo97908d() {\n }", "public void mo12628c() {\n }", "@Override\n public void initialize() { \n }", "private void init() {\n\n\n\n }" ]
[ "0.6119467", "0.60991603", "0.60301834", "0.59591293", "0.58935535", "0.58076763", "0.58076763", "0.58070344", "0.58031535", "0.57813334", "0.5753361", "0.574683", "0.5715168", "0.57124907", "0.56953275", "0.56953275", "0.56953275", "0.56953275", "0.56953275", "0.5689567", "0.56809086", "0.56738406", "0.5670224", "0.5667265", "0.56597686", "0.5648901", "0.5648298", "0.56465834", "0.5635669", "0.56305426", "0.56251067", "0.56226546", "0.56196004", "0.56196004", "0.56196004", "0.56196004", "0.56196004", "0.56196004", "0.56196004", "0.55990875", "0.5593849", "0.55936015", "0.5593301", "0.5589961", "0.558887", "0.5587645", "0.5583048", "0.5579849", "0.5574588", "0.5573316", "0.55711883", "0.55711883", "0.55708283", "0.5567308", "0.5567308", "0.5567308", "0.5564545", "0.5564273", "0.5564273", "0.5564273", "0.55615455", "0.5558627", "0.5558627", "0.5558627", "0.5558627", "0.5558627", "0.5558627", "0.55545825", "0.5550323", "0.5550323", "0.5533307", "0.55255544", "0.55167675", "0.55167675", "0.55167675", "0.5506754", "0.55022246", "0.5497905", "0.5497199", "0.5497199", "0.54939723", "0.54908717", "0.5488404", "0.54879767", "0.54850966", "0.54827267", "0.54716444", "0.5468689", "0.54668003", "0.54631", "0.54607207", "0.5458593", "0.5457883", "0.5441351", "0.54363275", "0.54356515", "0.54331654", "0.5431643", "0.5428179", "0.5426681", "0.5415664" ]
0.0
-1
Get the updated snapshot of the model
public ModelSnapshot getModel() { return model; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Model getProjectSnapshot()\n\t{\n\t\treturn project.getProjectSnapshot();\n\t}", "SnapshotInner innerModel();", "Snapshot.Update update();", "Snapshot refresh();", "public Snapshot getLatestSnapshot() {\r\n return isSnapshot? null: snapshot;\r\n }", "@NonNull\n public ResultT getSnapshot() {\n return snapState();\n }", "public abstract byte[] getSnapshot();", "public synchronized DataSnapshot getSnapshot() {\n if (!initialSnapshotReceived) {\n try {\n wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n return snapshot;\n }", "public abstract SnapShot GetSnapshot();", "public Object getOriginalObject() {\n // Compute the original for unit of work writes.\n if ((originalObject == null) && getSession().isUnitOfWork() && (getQuery() != null) && (getQuery().isObjectLevelModifyQuery())) {\n setOriginalObject(((UnitOfWorkImpl)getSession()).getOriginalVersionOfObject(getSource()));\n }\n return originalObject;\n }", "public Image getSnapshot() {\n\t\treturn null;\n\t}", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "@Override\n public FarmUtilDomain.PublishUtilState snapshot() {\n return FarmUtilDomain.PublishUtilState.newBuilder().build();\n }", "@Override\n public HashedVersion getEndVersion() {\n return getSnapshot().getHashedVersion();\n }", "void onModelChanged(MatchSnapshot matchSnapshot);", "long getUpdated();", "public String getTransSnapshot() {\n return transSnapshot;\n }", "public AnyUriModel retrieveCurrentValues() {\r\n resetModelFromValues();\r\n return new AnyUriModel(model);\r\n }", "public Snapshot getPathSnapshot() {\r\n return isSnapshot? snapshot: null;\r\n }", "public CardSet takeSnapshot() {\n resetCardStates();\n\n CardSet snapshot = cardSet.getSnapshot();\n snapshots.push(snapshot);\n return snapshot;\n }", "String getUpdated();", "public LogModel getLogModel() {\n return localLogModel;\n }", "public interface Snapshot {\n /**\n * Gets the id property: Fully qualified resource Id for the resource.\n *\n * @return the id value.\n */\n String id();\n\n /**\n * Gets the name property: The name of the resource.\n *\n * @return the name value.\n */\n String name();\n\n /**\n * Gets the type property: The type of the resource.\n *\n * @return the type value.\n */\n String type();\n\n /**\n * Gets the location property: The geo-location where the resource lives.\n *\n * @return the location value.\n */\n String location();\n\n /**\n * Gets the tags property: Resource tags.\n *\n * @return the tags value.\n */\n Map<String, String> tags();\n\n /**\n * Gets the managedBy property: Unused. Always Null.\n *\n * @return the managedBy value.\n */\n String managedBy();\n\n /**\n * Gets the sku property: The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS.\n *\n * @return the sku value.\n */\n SnapshotSku sku();\n\n /**\n * Gets the timeCreated property: The time when the disk was created.\n *\n * @return the timeCreated value.\n */\n OffsetDateTime timeCreated();\n\n /**\n * Gets the osType property: The Operating System type.\n *\n * @return the osType value.\n */\n OperatingSystemTypes osType();\n\n /**\n * Gets the hyperVGeneration property: The hypervisor generation of the Virtual Machine. Applicable to OS disks\n * only.\n *\n * @return the hyperVGeneration value.\n */\n HyperVGeneration hyperVGeneration();\n\n /**\n * Gets the creationData property: Disk source information. CreationData information cannot be changed after the\n * disk has been created.\n *\n * @return the creationData value.\n */\n CreationData creationData();\n\n /**\n * Gets the diskSizeGB property: If creationData.createOption is Empty, this field is mandatory and it indicates the\n * size of the disk to create. If this field is present for updates or creation with other options, it indicates a\n * resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's\n * size.\n *\n * @return the diskSizeGB value.\n */\n Integer diskSizeGB();\n\n /**\n * Gets the diskSizeBytes property: The size of the disk in bytes. This field is read only.\n *\n * @return the diskSizeBytes value.\n */\n Long diskSizeBytes();\n\n /**\n * Gets the uniqueId property: Unique Guid identifying the resource.\n *\n * @return the uniqueId value.\n */\n String uniqueId();\n\n /**\n * Gets the encryptionSettingsCollection property: Encryption settings collection used be Azure Disk Encryption, can\n * contain multiple encryption settings per disk or snapshot.\n *\n * @return the encryptionSettingsCollection value.\n */\n EncryptionSettingsCollection encryptionSettingsCollection();\n\n /**\n * Gets the provisioningState property: The disk provisioning state.\n *\n * @return the provisioningState value.\n */\n String provisioningState();\n\n /**\n * Gets the incremental property: Whether a snapshot is incremental. Incremental snapshots on the same disk occupy\n * less space than full snapshots and can be diffed.\n *\n * @return the incremental value.\n */\n Boolean incremental();\n\n /**\n * Gets the encryption property: Encryption property can be used to encrypt data at rest with customer managed keys\n * or platform managed keys.\n *\n * @return the encryption value.\n */\n Encryption encryption();\n\n /**\n * Gets the region of the resource.\n *\n * @return the region of the resource.\n */\n Region region();\n\n /**\n * Gets the name of the resource region.\n *\n * @return the name of the resource region.\n */\n String regionName();\n\n /**\n * Gets the inner com.azure.resourcemanager.azurestack.compute.fluent.models.SnapshotInner object.\n *\n * @return the inner object.\n */\n SnapshotInner innerModel();\n\n /** The entirety of the Snapshot definition. */\n interface Definition\n extends DefinitionStages.Blank,\n DefinitionStages.WithLocation,\n DefinitionStages.WithResourceGroup,\n DefinitionStages.WithCreate {\n }\n /** The Snapshot definition stages. */\n interface DefinitionStages {\n /** The first stage of the Snapshot definition. */\n interface Blank extends WithLocation {\n }\n /** The stage of the Snapshot definition allowing to specify location. */\n interface WithLocation {\n /**\n * Specifies the region for the resource.\n *\n * @param location The geo-location where the resource lives.\n * @return the next definition stage.\n */\n WithResourceGroup withRegion(Region location);\n\n /**\n * Specifies the region for the resource.\n *\n * @param location The geo-location where the resource lives.\n * @return the next definition stage.\n */\n WithResourceGroup withRegion(String location);\n }\n /** The stage of the Snapshot definition allowing to specify parent resource. */\n interface WithResourceGroup {\n /**\n * Specifies resourceGroupName.\n *\n * @param resourceGroupName The name of the resource group.\n * @return the next definition stage.\n */\n WithCreate withExistingResourceGroup(String resourceGroupName);\n }\n /**\n * The stage of the Snapshot definition which contains all the minimum required properties for the resource to\n * be created, but also allows for any other optional properties to be specified.\n */\n interface WithCreate\n extends DefinitionStages.WithTags,\n DefinitionStages.WithSku,\n DefinitionStages.WithOsType,\n DefinitionStages.WithHyperVGeneration,\n DefinitionStages.WithCreationData,\n DefinitionStages.WithDiskSizeGB,\n DefinitionStages.WithEncryptionSettingsCollection,\n DefinitionStages.WithIncremental,\n DefinitionStages.WithEncryption {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n Snapshot create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n Snapshot create(Context context);\n }\n /** The stage of the Snapshot definition allowing to specify tags. */\n interface WithTags {\n /**\n * Specifies the tags property: Resource tags..\n *\n * @param tags Resource tags.\n * @return the next definition stage.\n */\n WithCreate withTags(Map<String, String> tags);\n }\n /** The stage of the Snapshot definition allowing to specify sku. */\n interface WithSku {\n /**\n * Specifies the sku property: The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS..\n *\n * @param sku The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS.\n * @return the next definition stage.\n */\n WithCreate withSku(SnapshotSku sku);\n }\n /** The stage of the Snapshot definition allowing to specify osType. */\n interface WithOsType {\n /**\n * Specifies the osType property: The Operating System type..\n *\n * @param osType The Operating System type.\n * @return the next definition stage.\n */\n WithCreate withOsType(OperatingSystemTypes osType);\n }\n /** The stage of the Snapshot definition allowing to specify hyperVGeneration. */\n interface WithHyperVGeneration {\n /**\n * Specifies the hyperVGeneration property: The hypervisor generation of the Virtual Machine. Applicable to\n * OS disks only..\n *\n * @param hyperVGeneration The hypervisor generation of the Virtual Machine. Applicable to OS disks only.\n * @return the next definition stage.\n */\n WithCreate withHyperVGeneration(HyperVGeneration hyperVGeneration);\n }\n /** The stage of the Snapshot definition allowing to specify creationData. */\n interface WithCreationData {\n /**\n * Specifies the creationData property: Disk source information. CreationData information cannot be changed\n * after the disk has been created..\n *\n * @param creationData Disk source information. CreationData information cannot be changed after the disk\n * has been created.\n * @return the next definition stage.\n */\n WithCreate withCreationData(CreationData creationData);\n }\n /** The stage of the Snapshot definition allowing to specify diskSizeGB. */\n interface WithDiskSizeGB {\n /**\n * Specifies the diskSizeGB property: If creationData.createOption is Empty, this field is mandatory and it\n * indicates the size of the disk to create. If this field is present for updates or creation with other\n * options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and\n * can only increase the disk's size..\n *\n * @param diskSizeGB If creationData.createOption is Empty, this field is mandatory and it indicates the\n * size of the disk to create. If this field is present for updates or creation with other options, it\n * indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can\n * only increase the disk's size.\n * @return the next definition stage.\n */\n WithCreate withDiskSizeGB(Integer diskSizeGB);\n }\n /** The stage of the Snapshot definition allowing to specify encryptionSettingsCollection. */\n interface WithEncryptionSettingsCollection {\n /**\n * Specifies the encryptionSettingsCollection property: Encryption settings collection used be Azure Disk\n * Encryption, can contain multiple encryption settings per disk or snapshot..\n *\n * @param encryptionSettingsCollection Encryption settings collection used be Azure Disk Encryption, can\n * contain multiple encryption settings per disk or snapshot.\n * @return the next definition stage.\n */\n WithCreate withEncryptionSettingsCollection(EncryptionSettingsCollection encryptionSettingsCollection);\n }\n /** The stage of the Snapshot definition allowing to specify incremental. */\n interface WithIncremental {\n /**\n * Specifies the incremental property: Whether a snapshot is incremental. Incremental snapshots on the same\n * disk occupy less space than full snapshots and can be diffed..\n *\n * @param incremental Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less\n * space than full snapshots and can be diffed.\n * @return the next definition stage.\n */\n WithCreate withIncremental(Boolean incremental);\n }\n /** The stage of the Snapshot definition allowing to specify encryption. */\n interface WithEncryption {\n /**\n * Specifies the encryption property: Encryption property can be used to encrypt data at rest with customer\n * managed keys or platform managed keys..\n *\n * @param encryption Encryption property can be used to encrypt data at rest with customer managed keys or\n * platform managed keys.\n * @return the next definition stage.\n */\n WithCreate withEncryption(Encryption encryption);\n }\n }\n /**\n * Begins update for the Snapshot resource.\n *\n * @return the stage of resource update.\n */\n Snapshot.Update update();\n\n /** The template for Snapshot update. */\n interface Update\n extends UpdateStages.WithTags,\n UpdateStages.WithSku,\n UpdateStages.WithOsType,\n UpdateStages.WithDiskSizeGB,\n UpdateStages.WithEncryptionSettingsCollection,\n UpdateStages.WithEncryption {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n Snapshot apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n Snapshot apply(Context context);\n }\n /** The Snapshot update stages. */\n interface UpdateStages {\n /** The stage of the Snapshot update allowing to specify tags. */\n interface WithTags {\n /**\n * Specifies the tags property: Resource tags.\n *\n * @param tags Resource tags.\n * @return the next definition stage.\n */\n Update withTags(Map<String, String> tags);\n }\n /** The stage of the Snapshot update allowing to specify sku. */\n interface WithSku {\n /**\n * Specifies the sku property: The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS..\n *\n * @param sku The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS.\n * @return the next definition stage.\n */\n Update withSku(SnapshotSku sku);\n }\n /** The stage of the Snapshot update allowing to specify osType. */\n interface WithOsType {\n /**\n * Specifies the osType property: the Operating System type..\n *\n * @param osType the Operating System type.\n * @return the next definition stage.\n */\n Update withOsType(OperatingSystemTypes osType);\n }\n /** The stage of the Snapshot update allowing to specify diskSizeGB. */\n interface WithDiskSizeGB {\n /**\n * Specifies the diskSizeGB property: If creationData.createOption is Empty, this field is mandatory and it\n * indicates the size of the disk to create. If this field is present for updates or creation with other\n * options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and\n * can only increase the disk's size..\n *\n * @param diskSizeGB If creationData.createOption is Empty, this field is mandatory and it indicates the\n * size of the disk to create. If this field is present for updates or creation with other options, it\n * indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can\n * only increase the disk's size.\n * @return the next definition stage.\n */\n Update withDiskSizeGB(Integer diskSizeGB);\n }\n /** The stage of the Snapshot update allowing to specify encryptionSettingsCollection. */\n interface WithEncryptionSettingsCollection {\n /**\n * Specifies the encryptionSettingsCollection property: Encryption settings collection used be Azure Disk\n * Encryption, can contain multiple encryption settings per disk or snapshot..\n *\n * @param encryptionSettingsCollection Encryption settings collection used be Azure Disk Encryption, can\n * contain multiple encryption settings per disk or snapshot.\n * @return the next definition stage.\n */\n Update withEncryptionSettingsCollection(EncryptionSettingsCollection encryptionSettingsCollection);\n }\n /** The stage of the Snapshot update allowing to specify encryption. */\n interface WithEncryption {\n /**\n * Specifies the encryption property: Encryption property can be used to encrypt data at rest with customer\n * managed keys or platform managed keys..\n *\n * @param encryption Encryption property can be used to encrypt data at rest with customer managed keys or\n * platform managed keys.\n * @return the next definition stage.\n */\n Update withEncryption(Encryption encryption);\n }\n }\n /**\n * Refreshes the resource to sync with Azure.\n *\n * @return the refreshed resource.\n */\n Snapshot refresh();\n\n /**\n * Refreshes the resource to sync with Azure.\n *\n * @param context The context to associate with this operation.\n * @return the refreshed resource.\n */\n Snapshot refresh(Context context);\n}", "Snapshot refresh(Context context);", "Model copy();", "@Override\n\tpublic Date getModifiedDate() {\n\t\treturn model.getModifiedDate();\n\t}", "@Override\n\tpublic Date getModifiedDate() {\n\t\treturn model.getModifiedDate();\n\t}", "@Override\n\tpublic Date getModifiedDate() {\n\t\treturn model.getModifiedDate();\n\t}", "SerializableState getSampleModel(Long id) throws RemoteException;", "public boolean isSnapshot() {\r\n\t\treturn snapshot;\r\n\t}", "protected BufferedImage snapshot() {\n\t\tBufferedImage bi = new BufferedImage(window.getContentPane().getWidth(), window.getContentPane().getHeight(), BufferedImage.TYPE_INT_RGB);\n\t\twindow.getContentPane().paint(bi.getGraphics());\n\t\treturn bi;\n\t}", "public DateTime getUpdatedDateTime() {\n return updatedDateTime;\n }", "public Date getUpdated() {\n return updated;\n }", "public Date getUpdated() {\n return updated;\n }", "SingleDocumentModel getCurrentDocument();", "@GET\n @Produces({\"application/xml\", \"application/json\"})\n public ModelBase pull() throws NotFoundException {\n // ?? get latest ontModel directly from TopologyManager ??\n ModelBase model = NPSGlobalState.getModelStore().getHead();\n if (model == null)\n throw new NotFoundException(\"None!\"); \n return model;\n }", "public String getUpdated() {\n if(updated == null)\n return \"\";\n return updated.toString();\n }", "public DateTime getUpdateTime() {\n return updated;\n }", "void updateModelFromView();", "public Model getModel () { return _model; }", "public void update(){\n\t\tSystem.out.println(\"Return From Observer Pattern: \\n\" + theModel.getObserverState() \n\t\t+ \"\\n\");\n\t}", "com.google.protobuf.ByteString getSnapshotLocationBytes();", "@JsonIgnore\n\tpublic Date getLatestUpdate()\n\t{\n\t\treturn latestUpdate;\n\t}", "public Date getUpdated() {\n return updated;\n }", "public Date getUpdated() {\n return updated;\n }", "public Date getUpdated() {\r\n return updated;\r\n }", "public Date getUpdated() {\r\n return updated;\r\n }", "void updateViewFromModel();", "SMRSnapshot<S> getSnapshot(@NonNull ViewGenerator<S> viewGenerator,\n @NonNull VersionedObjectIdentifier version);", "public Object getCurrentObject()\r\n\t{\r\n\t\tif (newState != null)\r\n\t\t{\r\n\t\t\t// Not applied yet\r\n\t\t\treturn newState.unmodifiedObject;\r\n\t\t}\r\n\r\n\t\treturn propertyBrowser.getObject();\r\n\t}", "public Long getUpdateAt() {\n return updateAt;\n }", "public Visit getUpdateVisit() {\n\t\treturn updateVisit;\n\t}", "public abstract BufferedImage getSnapshot();", "public LiveData<PersonEntity> getLatestEntry() {\n return latestPersonEntry;\n }", "public long getUpdate();", "SMRSnapshot<S> getImplicitSnapshot(\n @NonNull ViewGenerator<S> viewGenerator);", "public Integer getUpdated() {\r\n return updated;\r\n }", "Snapshot create();", "public Date getUpdatedAt() {\r\n return updatedAt;\r\n }", "public Date getUpdatedAt() {\r\n return updatedAt;\r\n }", "public Date getUpdatedAt() {\r\n return updatedAt;\r\n }", "public Date getUpdatedAt() {\n return updatedAt;\n }", "public Date getUpdatedAt() {\n return updatedAt;\n }", "public Date getUpdatedAt() {\n return updatedAt;\n }", "public Date getUpdatedAt() {\n return updatedAt;\n }", "public Date getUpdatedAt() {\n return updatedAt;\n }", "public Date getUpdatedAt() {\n return updatedAt;\n }", "public Date getUpdatedAt() {\n return updatedAt;\n }", "public State getState() { return model.getState(); }", "Snapshot apply();", "public DateTime updatedAt() {\n return this.updatedAt;\n }", "@Override\r\n\tpublic T getModel() {\n\t\treturn model;\r\n\t}", "void updateModel() {\n updateModel(false);\n }", "@Override\n public DocumentSnapshot getSnapshot() {\n return null;\n }", "@Override\n\tpublic int update(Object model) {\n\t\treturn 0;\n\t}", "public Model getCurrentModel() {\n return currentModel;\n }", "@Override\n public void Update(Model model) {\n\n }", "public Date getUpdated() {\n return mUpdated;\n }", "public Object getModel() {\n\t\treturn bm;\r\n\t}", "public java.lang.Long getUpdated() {\n return updated;\n }", "public String getUpdated() {\n return this.updated;\n }", "public String getUpdated() {\n return this.updated;\n }", "public String getRestorableState()\n {\n RestorableSupport rs = RestorableSupport.newRestorableSupport();\n this.doGetRestorableState(rs, null);\n\n return rs.getStateAsXml();\n }", "public Update clone() {\n return (Update)cloneContent(new Update());\n }", "boolean getDirty() { return dirty; }", "public synchronized List<Update<V>> getUpdates() {\n if (!isReadOnly() && updates == null) {\n updates = calculateUpdates();\n }\n return updates;\n }", "public abstract Object getObservedObject();", "public Bitmap snap() {\n\t\t\tBitmap bitmap = Bitmap.createBitmap(this.view.getWidth(),\n\t\t\t\t\tthis.view.getHeight(), Config.ARGB_8888);\n\t\t\tCanvas canvas = new Canvas(bitmap);\n\t\t\tview.draw(canvas);\n\t\t\treturn bitmap;\n\t\t}" ]
[ "0.72120357", "0.67437583", "0.6729368", "0.6628411", "0.66210485", "0.63490915", "0.60912466", "0.5905949", "0.58815837", "0.58177984", "0.5766412", "0.57434475", "0.57434475", "0.57434475", "0.57434475", "0.57434475", "0.57434475", "0.57434475", "0.57434475", "0.57434475", "0.57434475", "0.57434475", "0.57434475", "0.57434475", "0.5734988", "0.56728226", "0.56715184", "0.5625476", "0.5612698", "0.559103", "0.5571353", "0.55367684", "0.5506961", "0.5504608", "0.5497533", "0.54620427", "0.5454093", "0.5451654", "0.5451654", "0.5451654", "0.5440003", "0.5417285", "0.541625", "0.53905547", "0.5380009", "0.5380009", "0.53682363", "0.53672445", "0.53388315", "0.5334067", "0.5332824", "0.53295755", "0.53215194", "0.5319503", "0.5318618", "0.53099215", "0.53099215", "0.5299526", "0.5299526", "0.5294445", "0.5285013", "0.5279751", "0.5276135", "0.527018", "0.5266891", "0.5260723", "0.52530503", "0.5240021", "0.52353084", "0.5231718", "0.5231659", "0.5231659", "0.5231659", "0.52307385", "0.52307385", "0.52307385", "0.52307385", "0.52307385", "0.52307385", "0.52307385", "0.51823103", "0.51782185", "0.51744384", "0.51592326", "0.51505864", "0.51495063", "0.5145607", "0.5145388", "0.5127899", "0.5125718", "0.51235247", "0.5121311", "0.5119144", "0.5119144", "0.5107271", "0.510662", "0.5104855", "0.50864255", "0.5085405", "0.5079062" ]
0.70143557
1
This is the default constructor
public SelectSheetLayerPrintPanel() { super(); initialize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "defaultConstructor(){}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "public Orbiter() {\n }", "public Pitonyak_09_02() {\r\n }", "public PSRelation()\n {\n }", "public Pasien() {\r\n }", "private Instantiation(){}", "public Tbdtokhaihq3() {\n super();\n }", "public Anschrift() {\r\n }", "public Aanbieder() {\r\n\t\t}", "public CyanSus() {\n\n }", "public Chauffeur() {\r\n\t}", "public Curso() {\r\n }", "public CSSTidier() {\n\t}", "public Chick() {\n\t}", "public Coche() {\n super();\n }", "void DefaultConstructor(){}", "public Cohete() {\n\n\t}", "private Default()\n {}", "public Tbdcongvan36() {\n super();\n }", "public Generic(){\n\t\tthis(null);\n\t}", "public Lanceur() {\n\t}", "public Mannschaft() {\n }", "public Demo() {\n\t\t\n\t}", "public AntrianPasien() {\r\n\r\n }", "public Achterbahn() {\n }", "ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}", "public SgaexpedbultoImpl()\n {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public Mitarbeit() {\r\n }", "public Odontologo() {\n }", "public Supercar() {\r\n\t\t\r\n\t}", "public Trening() {\n }", "public SlanjePoruke() {\n }", "public Phl() {\n }", "public Basic() {}", "public Ov_Chipkaart() {\n\t\t\n\t}", "public _355() {\n\n }", "public Parser()\n {\n //nothing to do\n }", "public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}", "public Clade() {}", "protected Asignatura()\r\n\t{}", "public Zeffit()\n {\n // TODO: initialize instance variable(s)\n }", "public Data() {\n }", "public Data() {\n }", "private Rekenhulp()\n\t{\n\t}", "public Waschbecken() {\n this(0, 0);\n }", "public Node(){\n\n\t\t}", "public EnsembleLettre() {\n\t\t\n\t}", "@Override public void init()\n\t\t{\n\t\t}", "private TMCourse() {\n\t}", "public mapper3c() { super(); }", "public Libro() {\r\n }", "public ExamMB() {\n }", "protected Betaling()\r\n\t{\r\n\t\t\r\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "public Main() {\n\t\tsuper();\n\t}", "public Catelog() {\n super();\n }", "public Factory() {\n\t\tsuper();\n\t}", "public Data() {\n \n }", "public CMN() {\n\t}", "public PjxParser()\r\n {\r\n LOG.info(this + \" instantiated\");\r\n }", "private Main() {\n\n super();\n }", "public Magazzino() {\r\n }", "public ChaCha()\n\t{\n\t\tsuper();\n\t}", "public RngObject() {\n\t\t\n\t}", "public Alojamiento() {\r\n\t}", "public Excellon ()\n {}", "protected GraphNode() {\n }", "protected GraphNode() {\n }", "public SimOI() {\n super();\n }", "private Converter()\n\t{\n\t\tsuper();\n\t}", "public JSFOla() {\n }", "public Node() {\n }", "private Node() {\n\n }", "@Override\r\n\tpublic void init() {}", "public TTau() {}", "public Job() {\n\t\t\t\n\t\t}", "public AirAndPollen() {\n\n\t}", "public Soil()\n\t{\n\n\t}", "@Override\n public void init() {}", "public TennisCoach () {\n\t\tSystem.out.println(\">> inside default constructor.\");\n\t}", "public Livro() {\n\n\t}", "public Data() {}", "public Connection() {\n\t\t\n\t}", "public Goodsinfo() {\n super();\n }", "public DetArqueoRunt () {\r\n\r\n }", "public Car() {\r\n this(\"\", \"\", \"\", 0, Category.EMPTY, 0.00, \"\", 0, \"\", 0.00, \"\", DriveTrain.EMPTY,\r\n Aspiration.EMPTY, 0.00, 0.00, 0.00, 0.00, 0.0, 0.0, 0.0, 0.0, 0.0);\r\n }", "public Book() {\n\t\t// Default constructor\n\t}", "public Tigre() {\r\n }", "public Carrinho() {\n\t\tsuper();\n\t}", "public Content() {\n\t}", "public Rol() {}", "public Node() {\r\n\t}", "public Node() {\r\n\t}", "private Sequence() {\n this(\"<Sequence>\", null, null);\n }", "public Job() {\r\n\t\tSystem.out.println(\"Constructor\");\r\n\t}", "public Node() {\n\t}", "private NfkjBasic()\n\t\t{\n\t\t\t\n\t\t}" ]
[ "0.85315686", "0.8274922", "0.75848484", "0.74773645", "0.7456932", "0.7447545", "0.7443651", "0.7441528", "0.7410326", "0.74039483", "0.7391621", "0.7377517", "0.73672515", "0.7351425", "0.73242426", "0.7324195", "0.73132765", "0.73016304", "0.7279156", "0.7262864", "0.72578615", "0.7245583", "0.7229312", "0.72281915", "0.7211734", "0.72051984", "0.7185298", "0.7184384", "0.71790564", "0.7176436", "0.7175265", "0.71689993", "0.7151911", "0.7143988", "0.714167", "0.71416116", "0.71346617", "0.71331203", "0.7115635", "0.7104915", "0.7104565", "0.71001244", "0.7098205", "0.70919895", "0.70840013", "0.70816535", "0.70816535", "0.707803", "0.70770115", "0.70722747", "0.70719784", "0.7071146", "0.7067329", "0.7064678", "0.70623577", "0.7048247", "0.70420784", "0.70372427", "0.7030708", "0.7029412", "0.7029382", "0.7029282", "0.7024578", "0.7024181", "0.7022025", "0.70202535", "0.7017857", "0.7017089", "0.7014772", "0.7008654", "0.70085454", "0.70085454", "0.70051914", "0.7003109", "0.7000585", "0.69971156", "0.69901764", "0.6985152", "0.6983319", "0.6983309", "0.69713455", "0.6964426", "0.6964122", "0.6960143", "0.69536775", "0.6952563", "0.6951489", "0.6946712", "0.6943544", "0.69430006", "0.6937155", "0.69328207", "0.6928417", "0.69263786", "0.6925607", "0.69225854", "0.69225854", "0.69220567", "0.6916494", "0.6904696", "0.6902761" ]
0.0
-1
This method initializes this
private void initialize() { jLabel = new JLabel(); super.setName(aplicacion.getI18nString("SelectSheetLayerPrintPanel.Name")); java.awt.GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); java.awt.GridBagConstraints gridBagConstraints2 = new GridBagConstraints(); this.setLayout(new GridBagLayout()); this.setSize(365, 274); gridBagConstraints1.gridx = 0; gridBagConstraints1.gridy = 0; gridBagConstraints1.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints1.insets = new java.awt.Insets(0,34,0,0); gridBagConstraints2.gridwidth = 2; gridBagConstraints2.insets = new java.awt.Insets(0,0,0,40); this.add(jLabel, gridBagConstraints1); this.add(getJComboBox(), gridBagConstraints2); jLabel.setText(aplicacion.getI18nString("cbSheetLayer")+": "); gridBagConstraints2.gridx = 1; gridBagConstraints2.gridy = 0; gridBagConstraints2.weightx = 1.0; gridBagConstraints2.fill = java.awt.GridBagConstraints.HORIZONTAL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override public void init()\n\t\t{\n\t\t}", "public void initialize()\n {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public void init() {\n \n }", "@Override\n\t\tpublic void init() {\n\t\t}", "protected void initialize() {\n \t\n }", "@Override\r\n\tpublic void init() {}", "@Override\n public void initialize() {\n \n }", "public void init() {\n\t\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 initialize(){\n\t\t//TODO: put initialization code here\n\t\tsuper.initialize();\n\t\t\n\t}", "public void init() {\r\n\t\t// to override\r\n\t}", "@Override\n protected void init() {\n }", "@Override\n public void init() {}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "protected void initialize() {}", "protected void initialize() {}", "@Override\r\n public void initialize()\r\n {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "@Override\n public void init() {\n\n super.init();\n\n }", "public void init() {\r\n\r\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "protected void initialize() {\r\n }", "protected void initialize() {\r\n }", "public void initialize() {\n // empty for now\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void init() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n 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 initialize() \n {\n \n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "protected void init() {\n // to override and use this method\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public void initialize() {\r\n }", "private void init() {\n\n\t}", "public void init(){\n \n }", "protected void initialize() {\n\n\t}", "protected void initialize()\r\n {\n }", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n\n }", "@Override\n public void initialize() {\n\n }", "@Override\n\tpublic void initialize() {\n\t\t\n\t}", "public void init() {\n\t\t\n\t}", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n\t\t\n\t}", "protected void initialize() {\n\t\t\n\t}", "protected void init() {\n }", "@Override\r\n\tpublic void init() {\n\t\tsuper.init();\r\n\t}", "@Override\n\tpublic void init() {\n\t}", "private void initialize() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }" ]
[ "0.83539504", "0.8307917", "0.8282791", "0.825615", "0.8200049", "0.8198305", "0.8149035", "0.8121817", "0.8104103", "0.81024307", "0.81024307", "0.81024307", "0.80645996", "0.8053697", "0.8036853", "0.80288565", "0.801887", "0.7991998", "0.7991998", "0.79863125", "0.79849255", "0.7982825", "0.7977926", "0.797778", "0.7975714", "0.7970544", "0.7970544", "0.79680526", "0.79659796", "0.79659796", "0.79659796", "0.7965143", "0.7958811", "0.795454", "0.795454", "0.79539245", "0.79539245", "0.79539245", "0.79539245", "0.79539245", "0.79539245", "0.7943634", "0.7938932", "0.7938932", "0.7938932", "0.79177743", "0.7902158", "0.7902158", "0.7902158", "0.7902158", "0.7902158", "0.7901743", "0.7900613", "0.79001516", "0.789888", "0.78985375", "0.7898089", "0.7898089", "0.7898089", "0.7892801", "0.7892801", "0.7886553", "0.7886553", "0.7886553", "0.7886553", "0.7886553", "0.7886553", "0.7886553", "0.7886553", "0.7886553", "0.7886553", "0.7878777", "0.7878777", "0.78773355", "0.7871734", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.78624856", "0.7858029", "0.7858029", "0.7845209", "0.78346074", "0.78341997", "0.7832499", "0.7824276", "0.7824276" ]
0.0
-1
This method initializes jComboBox
private JComboBox getJComboBox() { if (jComboBox == null) { jComboBox = new JComboBox(); jComboBox.addActionListener( new ActionListener(){ public void actionPerformed(java.awt.event.ActionEvent arg0) { Layer selected=(Layer)jComboBox.getSelectedItem(); if (selected!=null) { jLabel.setText(aplicacion.getI18nString("SelectSheetLayerPrintPanel.Generar")+" " +selected.getFeatureCollectionWrapper().size()+" "+aplicacion.getI18nString("SelectSheetLayerPrintPanel.Hojas")); } }}); } return jComboBox; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected void InitComboBox() {\n\t\t\r\n\t}", "public void initialize() {\n fillCombobox();\n }", "private void initComboBox() {\n jComboBox1.removeAllItems();\n listaDeInstrutores = instrutorDao.recuperarInstrutor();\n listaDeInstrutores.forEach((ex) -> {\n jComboBox1.addItem(ex.getNome());\n });\n }", "private void initCombobox() {\n comboConstructeur = new ComboBox<>();\n comboConstructeur.setLayoutX(100);\n comboConstructeur.setLayoutY(250);\n\n\n BDDManager2 bddManager2 = new BDDManager2();\n bddManager2.start(\"jdbc:mysql://localhost:3306/concession?characterEncoding=utf8\", \"root\", \"\");\n listeConstructeur = bddManager2.select(\"SELECT * FROM constructeur;\");\n bddManager2.stop();\n for (int i = 0; i < listeConstructeur.size(); i++) {\n comboConstructeur.getItems().addAll(listeConstructeur.get(i).get(1));\n\n\n }\n\n\n\n\n\n\n }", "public ComboBox1() {\n initComponents();\n agregarItems();\n\n }", "private void fillComboBox() {\n jComboBoxFilterChains.setModel(new DefaultComboBoxModel(ImageFilterManager.getObject().getListOfFilters().toArray()));\n }", "private void initComboBoxes()\n\t{\n\t\tsampling_combobox.getItems().clear();\n\t\tsampling_combobox.getItems().add(\"Random\");\n\t\tsampling_combobox.getItems().add(\"Cartesian\");\n\t\tsampling_combobox.getItems().add(\"Latin Hypercube\");\n\n\t\t// Set default value.\n\t\tsampling_combobox.setValue(\"Random\");\n\t}", "private void initialize()\n {\n this.setPreferredSize(new com.ulcjava.base.application.util.Dimension(549,426));\n this.add(getComboBox(), com.ulcjava.base.application.ULCBorderLayoutPane.NORTH);\n }", "public GrafosTP1UI() {\n initComponents();\n control = new Controlador();\n jComboBox1.setSelectedIndex(0); \n }", "private void setUpComboBox2() {\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>());\n jComboBox1.addItem(\"Unit Test\");\n jComboBox1.addItem(\"Quiz\");\n jComboBox1.addItem(\"Assignment\");\n jComboBox1.addItem(\"Other\");\n }", "private void initializeComboboxes() {\n ObservableList<Integer> options = FXCollections.observableArrayList(vertexesCurrentlyOnScreen);\n startingVertex = new ComboBox<>(options);\n finalVertex = new ComboBox<>(options);\n startingVertex.setBorder((new Border(new BorderStroke(Color.LIGHTGRAY, BorderStrokeStyle.SOLID, new CornerRadii(2), new BorderWidths(1.5)))));\n finalVertex.setBorder(new Border(new BorderStroke(Color.LIGHTGRAY, BorderStrokeStyle.SOLID, new CornerRadii(2), new BorderWidths(1.5))));\n }", "private void initComponents() {\r\n\r\n jLabel1 = new javax.swing.JLabel();\r\n manageCompoundJButton = new javax.swing.JButton();\r\n enterpriseLabel = new javax.swing.JLabel();\r\n valueLabel = new javax.swing.JLabel();\r\n drugComboBox = new javax.swing.JComboBox();\r\n\r\n setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\r\n\r\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\r\n jLabel1.setText(\"My Work Area -Supplier Role\");\r\n add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 40, -1, -1));\r\n\r\n manageCompoundJButton.setText(\"Manage Compound\");\r\n manageCompoundJButton.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n manageCompoundJButtonActionPerformed(evt);\r\n }\r\n });\r\n add(manageCompoundJButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 290, -1, -1));\r\n\r\n enterpriseLabel.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\r\n enterpriseLabel.setText(\"EnterPrise :\");\r\n add(enterpriseLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 90, 120, 30));\r\n\r\n valueLabel.setText(\"<value>\");\r\n add(valueLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 100, 130, -1));\r\n\r\n drugComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\r\n add(drugComboBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 210, 210, -1));\r\n }", "@FXML\n\tprivate void initialize() {\n\t\tlistNomType = FXCollections.observableArrayList();\n\t\tlistIdType=new ArrayList<Integer>();\n\t\ttry {\n\t\t\tfor (Type type : typeDAO.recupererAllType()) {\n listNomType.add(type.getNomTypeString());\n listIdType.add(type.getIdType());\n }\n\t\t} catch (ConnexionBDException e) {\n\t\t\tnew Popup(e.getMessage());\n\t\t}\n\t\tcomboboxtype.setItems(listNomType);\n\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n try {\n loadTable();\n ObservableList<String> opt = FXCollections.observableArrayList(\n \"A01\",\n \"A02\",\n \"A02\",\n \"A03\",\n \"A04\",\n \"B01\",\n \"B02\",\n \"B03\",\n \"B04\",\n \"C01\",\n \"C02\",\n \"C03\",\n \"C04\",\n \"D01\",\n \"D02\",\n \"D03\",\n \"D04\");\n \n cb1.setItems(opt);\n \n \n \n \n ObservableList<String> options = FXCollections.observableArrayList();\n Connection cnx = Myconn.getInstance().getConnection();\n String e=\"\\\"\"+\"Etudiant\"+\"\\\"\";\n ResultSet rs = cnx.createStatement().executeQuery(\"select full_name from user where role=\"+e+\"\");\n while(rs.next()){\n options.add(rs.getString(\"full_name\"));\n \n }\n// ObservableList<String> options = FXCollections.observableArrayList(\"Option 1\",\"Option 2\",\"Option 3\");\n comboE.setItems(options);\n } catch (SQLException ex) {\n Logger.getLogger(SoutenanceController.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 703, 720);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tc1 = new JComboBox();\r\n\t\tc1.setModel(new DefaultComboBoxModel(Month.values()));\r\n\t\tc1.setBounds(330, 211, 215, 32);\r\n\t\tframe.getContentPane().add(c1);\r\n\t\tc1.addItemListener(this);\r\n\t\t\r\n\t\tl1 = new JLabel(\"ans\");\r\n\t\tl1.setBounds(353, 289, 162, 46);\r\n\t\tframe.getContentPane().add(l1);\r\n\t}", "private void fillComboBox() {\n List<String> times = this.resultSimulation.getTimes();\n this.timesComboBox.getItems().addAll(times);\n this.timesComboBox.getSelectionModel().select(0);\n }", "private void initData() {\n\t\tcomboBoxInit();\n\t\tinitList();\n\t}", "private void initComboBox() {\n\t\tsynchronized (realTimeComboModel.files) {\n\t\t\trealTimeComboModel.files.clear();\n\t\t\t\n\t\t\tSet<TopComponent> comps = TopComponent.getRegistry().getOpened();\n\t\t\tfor (TopComponent tc : comps) {\n\t\t\t\tNode[] arr = tc.getActivatedNodes();\n\t\t\t\tif (arr != null) {\n\t\t\t\t\tfor (int j = 0; j < arr.length; j++) {\n\t\t\t\t\t\tDataObject dataObject = (DataObject) arr[j].getCookie(DataObject.class);\n\t\t\t\t\t\tFile file = new File(dataObject.getPrimaryFile().getPath());\n\t\t\t\t\t\tif (file.exists() && file.isFile()/* && !temp.contains(file.getName())*/) {\n\t\t\t\t\t\t\trealTimeComboModel.files.add(file);\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\t\n\t\tcomboBox.setRenderer(new RealTimeComboRenderer()); // if no this line, combobox will show nothing after refeshing with few files\n\t}", "@Override\n public final void init() {\n super.init();\n UIUtils.clearAllFields(upperPane);\n changeStatus(Status.NONE);\n intCombo();\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODOcomboBoxCh\n remplirTableView();\n comboBoxCh.getItems().addAll(\"Code Adherent\", \"Nom Adherent\");\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n //Preenche o comboBox sexo\r\n cb_sexo.setItems(listSexo);\r\n cb_uf.setItems(listUf);\r\n cb_serie.setItems(listSerie);\r\n\r\n// // Preenche o comboBox UF\r\n// this.cb_uf.setConverter(new ConverterDados(ConverterDados.GET_UF));\r\n// this.cb_uf.setItems(AlunoDAO.executeQuery(null, AlunoDAO.QUERY_TODOS));\r\n//\r\n// //Preenche o comboBox Serie\r\n// this.cb_serie.setConverter(new ConverterDados(ConverterDados.GET_SERIE));\r\n// this.cb_serie.setItems(AlunoDAO.executeQuery(null, AlunoDAO.QUERY_TODOS));\r\n this.codAluno.setCellValueFactory(cellData -> cellData.getValue().getCodigoProperty().asObject());\r\n this.nomeAluno.setCellValueFactory(cellData -> cellData.getValue().getNomeProperty());\r\n this.sexoAluno.setCellValueFactory(cellData -> cellData.getValue().getSexoProperty());\r\n this.enderecoAluno.setCellValueFactory(cellData -> cellData.getValue().getEnderecoProperty());\r\n this.cepAluno.setCellValueFactory(cellData -> cellData.getValue().getCepProperty());\r\n this.nascimentoAluno.setCellValueFactory(cellData -> cellData.getValue().getNascimentoProperty());\r\n this.ufAluno.setCellValueFactory(cellData -> cellData.getValue().getUfProperty());\r\n this.maeAluno.setCellValueFactory(cellData -> cellData.getValue().getMaeProperty());\r\n this.paiAluno.setCellValueFactory(cellData -> cellData.getValue().getPaiProperty());\r\n this.telefoneAluno.setCellValueFactory(cellData -> cellData.getValue().getTelefoneProperty());\r\n this.serieAluno.setCellValueFactory(cellData -> cellData.getValue().getSerieProperty());\r\n this.ensinoAluno.setCellValueFactory(cellData -> cellData.getValue().getEnsinoProperty());\r\n\r\n //bt_excluir.disableProperty().bind(tabelaAluno.getSelectionModel().selectedItemProperty().isNull());\r\n //bt_editar.disableProperty().bind(tabelaAluno.getSelectionModel().selectedItemProperty().isNull());\r\n }", "public NderroPass() {\n initComponents();\n loadComboBox();\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t\tfecha = new Date();\r\n\t\t\r\n\t\tlistaBancos = new ArrayList<SelectItem>();\r\n\t\tlistaRegiones = new ArrayList<SelectItem>();\r\n\t\tlistaCiudades = new ArrayList<SelectItem>();\r\n\t\tlistaComunas = new ArrayList<SelectItem>();\r\n\t\t\r\n\t\tfor(EmpresaDTO empresa : configJProcessService.selectEmpresasByOrganizacion(1))\r\n\t\t\tlistaBancos.add(new SelectItem(empresa.getId(), empresa.getNombre()));\r\n\t}", "private void initComponents() {\n\n\t jComboBox1 = new javax.swing.JComboBox();\n\t jSeparator1 = new javax.swing.JSeparator();\n\t jComboBox2 = new javax.swing.JComboBox();\n\t jButton1 = new javax.swing.JButton();\n\t jLabel1 = new javax.swing.JLabel();\n\t jLabel2 = new javax.swing.JLabel();\n\t jTextField1 = new javax.swing.JTextField();\n\t jLabel3 = new javax.swing.JLabel();\n\t jButton2 = new javax.swing.JButton();\n\t jLabel4 = new javax.swing.JLabel();\n\t \n\t rcp_ = new RecupClientProfil(main_);\n\t rp_ = new RecupProduit(main_);\n\t rml_ = new RecupMargeLivraison(main_);\n\t\t\tmd = new ModificationDonnees(main_);\n\n\t\t\t// recherche des clients en base et ajout dans combobox1\n\t\t\tlistClient = rcp_.recuperationProfil();\n\t\t\tjComboBox1 = new JComboBox(listClient);\n\t \n\t //jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n\t // recherche des produits associes au client selectionne\n\t\t\tlistProduit = rp_.recuperationProduit();\n\t\t\tjComboBox2 = new JComboBox(listProduit);\n\t //jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n\t jButton1.setText(\"Rechercher\");\n\t jButton1.addActionListener(new java.awt.event.ActionListener() {\n\t public void actionPerformed(java.awt.event.ActionEvent evt) {\n\t jButton1ActionPerformed(evt);\n\t }\n\t });\n\n\t // Recherche en base le taux de reprise actuel\n\t // en fonction du client et du produit selectionne\n\t jLabel1.setText(\"Taux de reprise actuel : \");\n\n\t jLabel2.setText(\"Nouveau taux : \");\n\n\t jTextField1.setText(\"\");\n\n\t jLabel3.setText(\"%\");\n\n\t jButton2.setText(\"Enregistrer\");\n\t jButton2.addActionListener(new java.awt.event.ActionListener() {\n\t public void actionPerformed(java.awt.event.ActionEvent evt) {\n\t jButton2ActionPerformed(evt);\n\t }\n\t });\n\t \n\t jLabel4.setText(\"Marge de reprise\");\n\n\t javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t this.setLayout(layout);\n\t layout.setHorizontalGroup(\n\t layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t .addGroup(layout.createSequentialGroup()\n\t .addContainerGap()\n\t .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n\t .addGroup(layout.createSequentialGroup()\n\t .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t .addGroup(layout.createSequentialGroup()\n\t .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)\n\t .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n\t .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))\n\t .addComponent(jLabel1))\n\t .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n\t .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t .addGroup(layout.createSequentialGroup()\n\t .addComponent(jLabel2)\n\t .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n\t .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n\t .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t .addComponent(jLabel3))\n\t .addComponent(jButton2)\n\t .addComponent(jButton1))\n\t .addGap(24, 24, 24))\n\t .addComponent(jSeparator1))\n\t .addComponent(jLabel4))\n\t .addContainerGap(641, Short.MAX_VALUE))\n\t );\n\t layout.setVerticalGroup(\n\t layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t .addGroup(layout.createSequentialGroup()\n\t .addContainerGap()\n\t .addComponent(jLabel4)\n\t .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n\t .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n\t .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n\t .addComponent(jButton1))\n\t .addGap(30, 30, 30)\n\t .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n\t .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n\t .addComponent(jLabel3)\n\t .addComponent(jLabel2)\n\t .addComponent(jLabel1))\n\t .addGap(30, 30, 30)\n\t .addComponent(jButton2)\n\t .addGap(18, 18, 18)\n\t .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n\t .addContainerGap(315, Short.MAX_VALUE))\n\t );\n\t }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n //Agrega valores a los combobox\n ObservableList<String> list = FXCollections.observableArrayList(\"1\",\"2\");\n cbCantidad.setItems(list);\n \n ObservableList<String> list2 = FXCollections.observableArrayList(\"Visible\", \"Oculto\");\n cbVisibilidad.setItems(list2);\n }", "public void Bindcombo() {\n\n MyQuery1 mq = new MyQuery1();\n HashMap<String, Integer> map = mq.populateCombo();\n for (String s : map.keySet()) {\n\n jComboBox1.addItem(s);\n\n }\n\n }", "private void initComponents() {\r\n\r\n goHomeButton = ViewManager.createGoHomeButton();\r\n jScrollPane1 = new javax.swing.JScrollPane();\r\n jTable1 = ViewUtil.createUneditableTable();\r\n addNewButton = new javax.swing.JButton();\r\n deleteButton = new javax.swing.JButton();\r\n modifyButton = new javax.swing.JButton();\r\n searchButton = new javax.swing.JButton();\r\n searchTxtArea = new javax.swing.JTextField();\r\n jComboBox1 = new javax.swing.JComboBox<>();\r\n \r\n jScrollPane1.setViewportView(jTable1);\r\n\r\n addNewButton.setText(\"Add\");\r\n\r\n deleteButton.setText(\"Delete\");\r\n\r\n modifyButton.setText(\"Modify\");\r\n \r\n modifyButton.addActionListener(this);\r\n \r\n searchButton.setText(\"Search\");\r\n \r\n searchButton.addActionListener(this);\r\n searchTxtArea.setText(\"\");\r\n\r\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(NameConverter.getTitleArr(\"Discount\")));\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\r\n this.setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap(70, Short.MAX_VALUE)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 664, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(searchTxtArea, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(addNewButton)\r\n .addGap(33, 33, 33)\r\n .addComponent(deleteButton)))\r\n .addGap(37, 37, 37)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(modifyButton, javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(searchButton, javax.swing.GroupLayout.Alignment.TRAILING))))\r\n .addGap(66, 66, 66))\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\r\n .addComponent(goHomeButton, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addContainerGap())))\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(goHomeButton, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(30,30,30)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(searchTxtArea, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(searchButton)\r\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(29, 29, 29)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(addNewButton)\r\n .addComponent(deleteButton)\r\n .addComponent(modifyButton))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 339, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(49, 49, 49))\r\n );\r\n\r\n searchButton.getAccessibleContext().setAccessibleName(\"searchButton\");\r\n }", "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}", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n // TODO\r\n ratingcombobox.getItems().addAll(\"1\",\"2\",\"3\",\"4\",\"5\");\r\n }", "private void initializeComponents() {\n\n startHourSpinner.setValue( DEFAULT_START_HOUR );\n endHourSpinner.setValue( DEFAULT_END_HOUR );\n \n //Add the time freq\n TimeFreq[] theFreqArr = new TimeFreq[ ]{ new TimeFreq(TimeFreq.HOURLY), new TimeFreq(TimeFreq.DAILY), new TimeFreq(TimeFreq.WEEKLY), new TimeFreq(TimeFreq.MONTHLY) };\n freqCombo.setModel(new javax.swing.DefaultComboBoxModel( theFreqArr ));\n \n addListListeners();\n \n }", "private void initControlList() {\n this.controlComboBox.addItem(CONTROL_PANELS);\n //this.controlComboBox.addItem(PEER_TEST_CONTROL);\n //this.controlComboBox.addItem(DISAGGREGATION_CONTROL);\n this.controlComboBox.addItem(AXIS_CONTROL);\n this.controlComboBox.addItem(DISTANCE_CONTROL);\n this.controlComboBox.addItem(SITES_OF_INTEREST_CONTROL);\n this.controlComboBox.addItem(CVM_CONTROL);\n this.controlComboBox.addItem(X_VALUES_CONTROL);\n }", "private void setupComboBox(){\n\n //enhanced for loop populates book comboBox with books\n for(Book currentBook : books){ //iterates through books array\n bookCB.addItem(currentBook.getTitle()); //adds book titles to comboBox\n }\n\n //enhanced for loop populates audio comboBox with audio materials\n for(AudioVisualMaterial currentAudio : audio){ //iterates through audio array\n audioCB.addItem(currentAudio.getAuthor()); //adds audio authors to comboBox\n }\n\n //enhanced for loop populates video comboBox with video materials\n for(AudioVisualMaterial currentVideo : video){ //iterates through video array\n videoCB.addItem(currentVideo.getTitle()); //adds video titles to comboBox\n }\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 nameLabel = new javax.swing.JLabel();\n performButton = new javax.swing.JButton();\n availableNames = new javax.swing.JComboBox<>();\n\n setMaximumSize(new java.awt.Dimension(435, 600));\n setMinimumSize(new java.awt.Dimension(435, 600));\n setPreferredSize(new java.awt.Dimension(435, 600));\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel2.setText(\"Знайти за назвою\");\n jLabel2.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\n nameLabel.setText(\"Назва:\");\n\n performButton.setText(\"Виконати\");\n performButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n performButtonActionPerformed(evt);\n }\n });\n\n availableNames.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\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 .addGap(140, 140, 140)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(40, 40, 40)\n .addComponent(nameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(availableNames, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(150, 150, 150)\n .addComponent(performButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(nameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(availableNames, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(40, 40, 40)\n .addComponent(performButton))\n );\n\n nameLabel.getAccessibleContext().setAccessibleName(\"id\");\n\n getAccessibleContext().setAccessibleParent(this);\n }", "public void populateQualityCombo() {\n\n // Making a list of poster qualities\n List<KeyValuePair> qualityList = new ArrayList<KeyValuePair>() {{\n\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w92, \"Thumbnail\\t[ 92x138 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w154, \"Tiny\\t\\t\\t[ 154x231 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w185, \"Small\\t\\t[ 185x278 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w342, \"Medium\\t\\t[ 342x513 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w500, \"Large\\t\\t[ 500x750 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w780, \"xLarge\\t\\t[ 780x1170 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_original, \"xxLarge\\t\\t[ HD ]\"));\n }};\n\n // Converting the list to an observable list\n ObservableList<KeyValuePair> obList = FXCollections.observableList(qualityList);\n\n // Filling the ComboBox\n cbPosterQuality.setItems(obList);\n\n // Setting the default value for the ComboBox\n cbPosterQuality.getSelectionModel().select(preferences.getInt(\"mediaQuality\", 3));\n }", "private void initialize() {\r\n\t\t\r\n\t\tfinal List<Caixa> listaCaixa = new CaixaService(JPAUtil.createEntityManager()).getList();\r\n\t\t\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 321, 190);\r\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tfinal JComboBox cmbCaixa = new JComboBox();\r\n\t\tcmbCaixa.setBounds(10, 11, 285, 20);\r\n\t\tframe.getContentPane().add(cmbCaixa);\r\n\t\t\r\n\t\tString[] itensCombo = new String[listaCaixa.size()];\r\n\t\tfor(int i=0;i<listaCaixa.size();i++) {\r\n\t\t\titensCombo[i]=listaCaixa.get(i).getNome();\r\n\t\t}\r\n\t\t\r\n\t\tDefaultComboBoxModel<String> comboBoxModel = new DefaultComboBoxModel<String>(itensCombo);\r\n\t\tcmbCaixa.setModel(comboBoxModel);\r\n\t\t\r\n\t\t\r\n\t\tJButton btnVerTodos = new JButton(\"Ver todos os caixas\");\r\n\t\tbtnVerTodos.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tTelaCaixaVendaRelatorio tela = new TelaCaixaVendaRelatorio();\r\n\t\t\t\ttela.getFrame().setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnVerTodos.setBounds(10, 117, 285, 23);\r\n\t\tframe.getContentPane().add(btnVerTodos);\r\n\t\t\r\n\t\tJButton btnVerCaixaSelecionado = new JButton(\"Ver caixa selecionado\");\r\n\t\tbtnVerCaixaSelecionado.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tTelaCaixaVendaRelatorio telaCaixaVendaRelatorio = new TelaCaixaVendaRelatorio(listaCaixa.get(cmbCaixa.getSelectedIndex()));\r\n\t\t\t\t\ttelaCaixaVendaRelatorio.getFrame().setVisible(true);\r\n\t\t\t\t}catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnVerCaixaSelecionado.setBounds(10, 83, 285, 23);\r\n\t\tframe.getContentPane().add(btnVerCaixaSelecionado);\r\n\t}", "public FrmEjemploCombo() {\n initComponents();\n \n cargarAutos();\n }", "private void initComponents() {\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\r\n setTitle(title());\r\n setMinimumSize(new java.awt.Dimension(1000, 500));\r\n\r\n toolsPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));\r\n\r\n channelComboBox.setMinimumSize(new java.awt.Dimension(75, 20));\r\n channelComboBox.setPreferredSize(new java.awt.Dimension(100, 20));\r\n channelComboBox.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n channelComboBox_actionPerformed(evt);\r\n }\r\n });\r\n toolsPanel.add(channelComboBox);\r\n\r\n getContentPane().add(toolsPanel, java.awt.BorderLayout.NORTH);\r\n getContentPane().add(tabsPanel, java.awt.BorderLayout.CENTER);\r\n\r\n valuesPanel.setLayout(new javax.swing.BoxLayout(valuesPanel, javax.swing.BoxLayout.Y_AXIS));\r\n getContentPane().add(valuesPanel, java.awt.BorderLayout.EAST);\r\n\r\n pack();\r\n }", "private void initializeOrganFilterComboBox() {\n organFilterComboBox.setItems(organs);\n organFilterComboBox.getItems()\n .addAll(organString, \"Liver\", \"Kidneys\", \"Heart\", \"Lungs\", \"Intestines\",\n \"Corneas\", \"Middle Ear\", \"Skin\", \"Bone\", \"Bone Marrow\", \"Connective Tissue\");\n organFilterComboBox.getSelectionModel().select(0);\n }", "private void initMyComponents() {\n this.jPanel1.setLayout(new BoxLayout(this.jPanel1, BoxLayout.Y_AXIS));\n this.jPanel1.add(controller.getPressureController().getEMeasureBasicView());\n this.jPanel1.add(controller.getTemperatureController().getEMeasureBasicView());\n this.controller.getPressureController().getListeners().add(this);\n this.controller.getTemperatureController().getListeners().add(this);\n this.jComboBox1.setModel(new DefaultComboBoxModel(FluidKind.values()));\n this.changeResponce();\n }", "public void fillCombobox() {\n List<String> list = new ArrayList<String>();\n list.add(\"don't link\");\n if (dataHandler.persons.size() == 0) {\n list.add(\"No Persons\");\n ObservableList obList = FXCollections.observableList(list);\n cmb_linkedPerson.setItems(obList);\n cmb_linkedPerson.getSelectionModel().selectFirst();\n } else {\n for (int i = 0; i < dataHandler.persons.size(); i++) {\n list.add(dataHandler.persons.get(i).getName());\n ObservableList obList = FXCollections.observableList(list);\n cmb_linkedPerson.setItems(obList);\n cmb_linkedPerson.getSelectionModel().selectFirst();\n }\n }\n }", "@Override\n public void initialize(URL location, ResourceBundle resources) {\n comboBoxCh.getItems().addAll(\"id_Livre\", \"id_Auteur\", \"titre\");\n remplirTableView();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jComboBox1 = new javax.swing.JComboBox<>();\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jPanel3 = new javax.swing.JPanel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jPanel4 = new javax.swing.JPanel();\n jButton4 = new javax.swing.JButton();\n jButton5 = new javax.swing.JButton();\n jButton6 = new javax.swing.JButton();\n jPanel7 = new javax.swing.JPanel();\n jButton13 = new javax.swing.JButton();\n jButton14 = new javax.swing.JButton();\n jButton15 = new javax.swing.JButton();\n jPanel8 = new javax.swing.JPanel();\n jButton16 = new javax.swing.JButton();\n jButton17 = new javax.swing.JButton();\n jButton18 = new javax.swing.JButton();\n jPanel9 = new javax.swing.JPanel();\n jButton19 = new javax.swing.JButton();\n jButton20 = new javax.swing.JButton();\n jButton21 = new javax.swing.JButton();\n jPanel10 = new javax.swing.JPanel();\n jButton22 = new javax.swing.JButton();\n jButton23 = new javax.swing.JButton();\n jButton24 = new javax.swing.JButton();\n jPanel11 = new javax.swing.JPanel();\n jButton25 = new javax.swing.JButton();\n jButton26 = new javax.swing.JButton();\n jButton27 = new javax.swing.JButton();\n jPanel12 = new javax.swing.JPanel();\n jButton28 = new javax.swing.JButton();\n jButton29 = new javax.swing.JButton();\n jButton30 = new javax.swing.JButton();\n jPanel13 = new javax.swing.JPanel();\n jButton31 = new javax.swing.JButton();\n jButton32 = new javax.swing.JButton();\n jButton33 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jPanel14 = new javax.swing.JPanel();\n jPanel15 = new javax.swing.JPanel();\n jButton34 = new javax.swing.JButton();\n jPanel16 = new javax.swing.JPanel();\n jButton37 = new javax.swing.JButton();\n jPanel17 = new javax.swing.JPanel();\n jButton35 = new javax.swing.JButton();\n jButton36 = new javax.swing.JButton();\n jButton38 = new javax.swing.JButton();\n jButton39 = new javax.swing.JButton();\n jButton40 = new javax.swing.JButton();\n jButton41 = new javax.swing.JButton();\n jPanel18 = new javax.swing.JPanel();\n jTextField2 = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jTextField4 = new javax.swing.JTextField();\n jTextField5 = new javax.swing.JTextField();\n jTextField6 = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jPanel19 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jPanel20 = new javax.swing.JPanel();\n jPanel5 = new javax.swing.JPanel();\n jButton7 = new javax.swing.JButton();\n jButton8 = new javax.swing.JButton();\n jButton9 = new javax.swing.JButton();\n jButton10 = new javax.swing.JButton();\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setUndecorated(true);\n\n jPanel2.setBackground(new java.awt.Color(204, 204, 204));\n\n jButton1.setText(\"3\");\n jButton1.setFocusPainted(false);\n\n jButton2.setText(\"2\");\n jButton2.setFocusPainted(false);\n\n jButton3.setText(\"1\");\n jButton3.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton1)\n .addComponent(jButton2)\n .addComponent(jButton3))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addContainerGap(33, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3)\n .addContainerGap())\n );\n\n jButton4.setText(\"6\");\n jButton4.setFocusPainted(false);\n\n jButton5.setText(\"5\");\n jButton5.setFocusPainted(false);\n\n jButton6.setText(\"4\");\n jButton6.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton4)\n .addComponent(jButton5)\n .addComponent(jButton6))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton6)\n .addContainerGap())\n );\n\n jButton13.setText(\"9\");\n jButton13.setFocusPainted(false);\n\n jButton14.setText(\"8\");\n jButton14.setFocusPainted(false);\n\n jButton15.setText(\"7\");\n jButton15.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);\n jPanel7.setLayout(jPanel7Layout);\n jPanel7Layout.setHorizontalGroup(\n jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton13)\n .addComponent(jButton14)\n .addComponent(jButton15))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel7Layout.setVerticalGroup(\n jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton13)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton14)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton15)\n .addContainerGap())\n );\n\n jPanel8.setBackground(new java.awt.Color(255, 204, 204));\n jPanel8.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton16.setText(\"12\");\n jButton16.setFocusPainted(false);\n\n jButton17.setText(\"11\");\n jButton17.setFocusPainted(false);\n\n jButton18.setText(\"10\");\n jButton18.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);\n jPanel8.setLayout(jPanel8Layout);\n jPanel8Layout.setHorizontalGroup(\n jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel8Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton16)\n .addComponent(jButton17)\n .addComponent(jButton18))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel8Layout.setVerticalGroup(\n jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton16)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton17)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton18)\n .addContainerGap())\n );\n\n jPanel9.setBackground(new java.awt.Color(255, 204, 204));\n jPanel9.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton19.setText(\"15\");\n jButton19.setFocusPainted(false);\n\n jButton20.setText(\"14\");\n jButton20.setFocusPainted(false);\n\n jButton21.setText(\"13\");\n jButton21.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);\n jPanel9.setLayout(jPanel9Layout);\n jPanel9Layout.setHorizontalGroup(\n jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel9Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton19)\n .addComponent(jButton20)\n .addComponent(jButton21))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel9Layout.setVerticalGroup(\n jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton19)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton20)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton21)\n .addContainerGap())\n );\n\n jPanel10.setBackground(new java.awt.Color(255, 204, 204));\n jPanel10.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton22.setText(\"18\");\n jButton22.setFocusPainted(false);\n\n jButton23.setText(\"17\");\n jButton23.setFocusPainted(false);\n\n jButton24.setText(\"16\");\n jButton24.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);\n jPanel10.setLayout(jPanel10Layout);\n jPanel10Layout.setHorizontalGroup(\n jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel10Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton22)\n .addComponent(jButton23)\n .addComponent(jButton24))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel10Layout.setVerticalGroup(\n jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton22)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton23)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton24)\n .addContainerGap())\n );\n\n jPanel11.setBackground(new java.awt.Color(153, 153, 255));\n jPanel11.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton25.setText(\"21\");\n jButton25.setFocusPainted(false);\n\n jButton26.setText(\"20\");\n jButton26.setFocusPainted(false);\n\n jButton27.setText(\"19\");\n jButton27.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);\n jPanel11.setLayout(jPanel11Layout);\n jPanel11Layout.setHorizontalGroup(\n jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel11Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton25)\n .addComponent(jButton26)\n .addComponent(jButton27))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel11Layout.setVerticalGroup(\n jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton25)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton26)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton27)\n .addContainerGap())\n );\n\n jPanel12.setBackground(new java.awt.Color(153, 153, 255));\n jPanel12.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton28.setText(\"24\");\n jButton28.setFocusPainted(false);\n\n jButton29.setText(\"23\");\n jButton29.setFocusPainted(false);\n\n jButton30.setText(\"22\");\n jButton30.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);\n jPanel12.setLayout(jPanel12Layout);\n jPanel12Layout.setHorizontalGroup(\n jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel12Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton28)\n .addComponent(jButton29)\n .addComponent(jButton30))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel12Layout.setVerticalGroup(\n jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel12Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton28)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton29)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton30)\n .addContainerGap())\n );\n\n jButton31.setText(\"27\");\n jButton31.setFocusPainted(false);\n\n jButton32.setText(\"26\");\n jButton32.setFocusPainted(false);\n\n jButton33.setText(\"25\");\n jButton33.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);\n jPanel13.setLayout(jPanel13Layout);\n jPanel13Layout.setHorizontalGroup(\n jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel13Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton31)\n .addComponent(jButton32)\n .addComponent(jButton33))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel13Layout.setVerticalGroup(\n jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel13Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton31)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton32)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton33)\n .addContainerGap())\n );\n\n jLabel2.setText(\"Hospitalización\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel2))\n .addContainerGap(22, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(9, 9, 9)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n\n jPanel14.setBackground(new java.awt.Color(204, 204, 204));\n\n jButton34.setText(\"A-2\");\n jButton34.setBorder(null);\n jButton34.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);\n jPanel15.setLayout(jPanel15Layout);\n jPanel15Layout.setHorizontalGroup(\n jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel15Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton34, javax.swing.GroupLayout.DEFAULT_SIZE, 44, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel15Layout.setVerticalGroup(\n jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel15Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton34, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(38, 38, 38))\n );\n\n jButton37.setText(\"A-1\");\n jButton37.setBorder(null);\n jButton37.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);\n jPanel16.setLayout(jPanel16Layout);\n jPanel16Layout.setHorizontalGroup(\n jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton37, javax.swing.GroupLayout.DEFAULT_SIZE, 44, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel16Layout.setVerticalGroup(\n jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton37, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(37, 37, 37))\n );\n\n javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);\n jPanel14.setLayout(jPanel14Layout);\n jPanel14Layout.setHorizontalGroup(\n jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel14Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n jPanel14Layout.setVerticalGroup(\n jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel14Layout.createSequentialGroup()\n .addGap(11, 11, 11)\n .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel14Layout.createSequentialGroup()\n .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 1, Short.MAX_VALUE))\n .addComponent(jPanel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n\n jPanel17.setBackground(new java.awt.Color(204, 204, 204));\n\n jButton35.setText(\"Masculino\");\n jButton35.setBorder(null);\n jButton35.setFocusPainted(false);\n jButton35.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton35ActionPerformed(evt);\n }\n });\n\n jButton36.setText(\"Femenino\");\n jButton36.setBorder(null);\n jButton36.setFocusPainted(false);\n\n jButton38.setText(\"Pediatrico\");\n jButton38.setBorder(null);\n jButton38.setFocusPainted(false);\n\n jButton39.setText(\"Ginecologia\");\n jButton39.setBorder(null);\n jButton39.setFocusPainted(false);\n jButton39.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton39ActionPerformed(evt);\n }\n });\n\n jButton40.setText(\"C. General\");\n jButton40.setBorder(null);\n jButton40.setFocusPainted(false);\n jButton40.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton40ActionPerformed(evt);\n }\n });\n\n jButton41.setText(\"M. General\");\n jButton41.setBorder(null);\n jButton41.setFocusPainted(false);\n jButton41.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton41ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);\n jPanel17.setLayout(jPanel17Layout);\n jPanel17Layout.setHorizontalGroup(\n jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel17Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel17Layout.createSequentialGroup()\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton36, javax.swing.GroupLayout.DEFAULT_SIZE, 61, Short.MAX_VALUE)\n .addComponent(jButton35, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton39, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton40, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel17Layout.createSequentialGroup()\n .addComponent(jButton38, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton41, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(158, Short.MAX_VALUE))\n );\n jPanel17Layout.setVerticalGroup(\n jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel17Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton35, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton39, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton36, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton40, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton38, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton41, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n jPanel18.setBackground(new java.awt.Color(204, 204, 204));\n\n jLabel3.setText(\"Nombre (s):\");\n\n jLabel4.setText(\"Primer Apellido:\");\n\n jLabel5.setText(\"Segundo apellido:\");\n\n jLabel6.setText(\"Edad:\");\n\n jLabel7.setText(\"Diagnostico:\");\n\n javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);\n jPanel18.setLayout(jPanel18Layout);\n jPanel18Layout.setHorizontalGroup(\n jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel18Layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel7))\n .addContainerGap(40, Short.MAX_VALUE))\n );\n jPanel18Layout.setVerticalGroup(\n jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel18Layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel4)\n .addGap(1, 1, 1)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel5)\n .addGap(1, 1, 1)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel6)\n .addGap(2, 2, 2)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel7)\n .addGap(2, 2, 2)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel19.setBackground(new java.awt.Color(204, 204, 204));\n\n jLabel1.setText(\"Busqueda paciente hospitalizado:\");\n\n javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);\n jPanel19.setLayout(jPanel19Layout);\n jPanel19Layout.setHorizontalGroup(\n jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel19Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel19Layout.setVerticalGroup(\n jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel19Layout.createSequentialGroup()\n .addContainerGap(14, Short.MAX_VALUE)\n .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n jPanel20.setBackground(new java.awt.Color(204, 204, 204));\n\n jButton7.setText(\"U-1\");\n jButton7.setBorder(null);\n jButton7.setFocusPainted(false);\n\n jButton8.setText(\"U-2\");\n jButton8.setBorder(null);\n jButton8.setFocusPainted(false);\n\n jButton9.setText(\"U-3\");\n jButton9.setBorder(null);\n jButton9.setFocusPainted(false);\n\n jButton10.setText(\"U-4\");\n jButton10.setBorder(null);\n jButton10.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);\n jPanel5.setLayout(jPanel5Layout);\n jPanel5Layout.setHorizontalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(41, 41, 41)\n .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(41, 41, 41)\n .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(41, 41, 41))\n );\n jPanel5Layout.setVerticalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(4, 4, 4)))\n .addContainerGap(12, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);\n jPanel20.setLayout(jPanel20Layout);\n jPanel20Layout.setHorizontalGroup(\n jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel20Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel20Layout.setVerticalGroup(\n jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel20Layout.createSequentialGroup()\n .addContainerGap(12, Short.MAX_VALUE)\n .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\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(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jPanel20, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel17, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel14, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(jPanel18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\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.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n }", "private void buildComboBoxes() {\n buildCountryComboBox();\n buildDivisionComboBox();\n }", "public void setComboBoxValues() {\n String sql = \"select iName from item where iActive=? order by iName asc\";\n \n cbo_iniName.removeAllItems();\n try {\n pst = conn.prepareStatement(sql);\n pst.setString(1,\"Yes\");\n rs = pst.executeQuery();\n \n while (rs.next()) {\n cbo_iniName.addItem(rs.getString(1));\n }\n \n }catch(Exception e) {\n JOptionPane.showMessageDialog(null,\"Item list cannot be loaded\");\n }finally {\n try{\n rs.close();\n pst.close();\n \n }catch(Exception e) {}\n }\n }", "private void setupComboBox() {\n nodeSelectComboBox.setEditable(true);\n\n getNodes();\n\n // Set to all nodes\n nodeSelectComboBox.setItems(FXCollections.observableList(new LinkedList<String>(nodeIDs.keySet())));\n nodeSelectComboBox.setOnAction(param -> {\n longName = nodeSelectComboBox.getValue();\n nodeID = nodeIDs.get(longName);\n if(eventHandler != null) {\n eventHandler.handle(param);\n }\n });\n // Filter nodes based on user input\n nodeSelectComboBox.setOnKeyReleased(param -> {\n nodeSelectComboBox.setItems(FXCollections.observableList(new LinkedList<String>(nodeIDs.keySet()).stream()\n .filter(longName -> showNode(longName, nodeSelectComboBox.getValue())).collect(Collectors.toList())));\n });\n }", "void fillCombo_name(){\n combo_name.setItems(FXCollections.observableArrayList(listComboN));\n }", "public BlackRockCityMapUI ()\n {\n initComponents ();\n cbYear.setSelectedItem (\"2023\");\n\n }", "@Override\n\tpublic void initialize(URL location, ResourceBundle resources) {\n\t\tcombobox.setItems(list);\n\t\tcombobox2.setItems(list2);\n\t\t\n\t}", "private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox();\n jPanel1 = new javax.swing.JPanel();\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(UnitConverterTopComponent.class, \"UnitConverterTopComponent.jLabel1.text\")); // NOI18N\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n jComboBox1.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jComboBox1ItemStateChanged(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 .addGap(0, 0, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 331, Short.MAX_VALUE)\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)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 457, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n }", "@PostConstruct\r\n private void init() {\n this.ccTypes = new ArrayList<SelectItem>();\r\n this.ccTypes.add(new SelectItem(CreditCardType.CARD_A, getCCTypeLabel(CreditCardType.CARD_A)));\r\n this.ccTypes.add(new SelectItem(CreditCardType.CARD_B, getCCTypeLabel(CreditCardType.CARD_B)));\r\n\r\n // Initialize categories select items\r\n this.categories = new ArrayList<SelectItem>();\r\n this.categories.add(new SelectItem(\"cat_it\", getCategoryLabel(\"cat_it\")));\r\n this.categories.add(new SelectItem(\"cat_gr\", getCategoryLabel(\"cat_gr\")));\r\n this.categories.add(new SelectItem(\"cat_at\", getCategoryLabel(\"cat_at\")));\r\n this.categories.add(new SelectItem(\"cat_mx\", getCategoryLabel(\"cat_mx\")));\r\n }", "public pansiyon() {\n initComponents();\n for (int i =1900; i <2025; i++) {\n \n cmbkayıtyılı.addItem(Integer.toString(i));\n \n }\n for (int i =1900; i <2025; i++) {\n \n cmbayrılısyılı.addItem(Integer.toString(i));\n \n }\n }", "public Carta() {\n initComponents();\n \n \n \n items[0] = \"Entradas\";\n items[1] = \"Fuertes\";\n items[2] = \"Postres\";\n comboCategorias.setModel(new javax.swing.DefaultComboBoxModel(items));\n comboCategoriasM.setModel(new javax.swing.DefaultComboBoxModel(items));\n\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n counselorDetailsBEAN = new CounselorDetailsBEAN();\n counselorDetailsBEAN = Context.getInstance().currentProfile().getCounselorDetailsBEAN();\n ENQUIRY_ID = counselorDetailsBEAN.getEnquiryID();\n // JOptionPane.showMessageDialog(null, ENQUIRY_ID);\n countryCombo();\n cmbCountry.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Object>() {\n \n\n @Override\n public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {\n //JOptionPane.showMessageDialog(null, cmbCountry.getSelectionModel().getSelectedItem().toString());\n String[] parts = cmbCountry.getSelectionModel().getSelectedItem().toString().split(\",\");\n String value = parts[0];\n locationcombo(value);\n }\n\n private void locationcombo(String value) {\n List<String> locations = SuggestedCourseDAO.getLocation(value);\n for (String s : locations) {\n location.add(s);\n }\n cmbLocation.setItems(location);\n }\n\n });\n cmbLocation.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Object>() {\n\n @Override\n public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {\n universityCombo(cmbLocation.getSelectionModel().getSelectedItem().toString());\n }\n\n private void universityCombo(String value) {\n List<String> universities = SuggestedCourseDAO.getUniversities(value);\n for (String s : universities) {\n university.add(s);\n }\n cmbUniversity.setItems(university);\n }\n \n });\n cmbUniversity.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Object>() {\n\n @Override\n public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {\n levetCombo(cmbUniversity.getSelectionModel().getSelectedItem().toString());\n }\n\n private void levetCombo(String value) {\n List<String> levels = SuggestedCourseDAO.getLevels(value);\n for (String s : levels) {\n level.add(s);\n }\n cmbLevel.setItems(level);\n }\n });\n\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n comboTimeZones = new javax.swing.JComboBox<>();\n jLabel1 = new javax.swing.JLabel();\n\n setPreferredSize(new java.awt.Dimension(540, 360));\n addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n formMousePressed(evt);\n }\n });\n setLayout(null);\n\n comboTimeZones.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n comboTimeZones.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n comboTimeZonesActionPerformed(evt);\n }\n });\n add(comboTimeZones);\n comboTimeZones.setBounds(0, 0, 540, 20);\n\n jLabel1.setText(\"2019.07.16@ClickMeBaby!\");\n add(jLabel1);\n jLabel1.setBounds(390, 340, 150, 20);\n }", "private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n lblPlatform = new javax.swing.JLabel();\n platformComboBox = new javax.swing.JComboBox();\n btnManagePlatforms = new javax.swing.JButton();\n filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 100), new java.awt.Dimension(0, 0));\n progressLabel = new javax.swing.JLabel();\n progressPanel = new javax.swing.JPanel();\n\n setLayout(new java.awt.GridBagLayout());\n\n lblPlatform.setLabelFor(platformComboBox);\n lblPlatform.setText(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"LBL_Platform_ComboBox\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_LEADING;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 12);\n add(lblPlatform, gridBagConstraints);\n lblPlatform.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSN_labelPlatform\")); // NOI18N\n lblPlatform.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSD_labelPlatform\")); // NOI18N\n\n platformComboBox.setModel(platformsModel);\n platformComboBox.setRenderer(platformsCellRenderer);\n platformComboBox.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n platformComboBoxItemStateChanged(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_LEADING;\n gridBagConstraints.weightx = 0.1;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 0);\n add(platformComboBox, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(btnManagePlatforms, org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"LBL_PanelOptions_Manage_Button\")); // NOI18N\n btnManagePlatforms.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnManagePlatformsActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_TRAILING;\n gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n add(btnManagePlatforms, gridBagConstraints);\n btnManagePlatforms.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSN_buttonManagePlatforms\")); // NOI18N\n btnManagePlatforms.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSD_buttonManagePlatforms\")); // NOI18N\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints.weighty = 0.1;\n add(filler1, gridBagConstraints);\n\n progressLabel.setText(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"LBL_Platform_Progress\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;\n add(progressLabel, gridBagConstraints);\n progressLabel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSN_platformProgress\")); // NOI18N\n progressLabel.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSD_platformProgress\")); // NOI18N\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 0.1;\n add(progressPanel, gridBagConstraints);\n }", "public UpdateHospede() {\n initComponents();\n this.setLocationRelativeTo(null);\n String tDoc[]=new String[tipoDoc.length];\n for(int i=0;i<tipoDoc.length;i++){\n tDoc[i]=tipoDoc[i];\n }\n tipoDocCB.setModel(new javax.swing.DefaultComboBoxModel<>(tDoc));\n this.setLocationRelativeTo(null);\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n val.addRequiredValidator(txtDescription);\n btnAdd.setText(\"CREATE\");\n enableOption(false);\n LinkedList<String> col = new LinkedList<>();\n// col.addFirst(\"ALL\");\n// col.add(\"DATE\");\n// col.add(\"DESCRIPTION\");\n col.addFirst(\"DESCRIPTION\");\n cmbColumn.getItems().addAll(col);\n MyUtils.selectComboBoxValue(cmbColumn, \"DESCRIPTION\");\n fillTable();\n lblName.setText(\"Welcome \"+DiaryFXMLController.curUser.getUname());\n// JOptionPane.showMessageDialog(null, \"\"+currUsr.getUid()+\"==\"+currUsr.getUname()+\"==\"+currUsr.getPass());\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // T\n cb_periodo.setItems(FXCollections.observableArrayList(Arrays.asList(\"Manhã\" , \"Tarde\")));\n }", "public RegisterCashierFrame() {\n initComponents();\n lblUsername.setText(\"Hello \"+UserProfile.getUserName());\n super.setLocationRelativeTo(null);\n try {\n EmpList = Empdao.getCashierData();\n \n for (Object a : EmpList.keySet())\n jComboBox1.addItem((String) a);\n \n \n }\n catch(SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error in SQl\"+ex, \"Input Error\",JOptionPane.ERROR_MESSAGE);\n ex.printStackTrace();\n\n }\n \n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n workerTypeComboBox.setItems(workerTypes);\n userIDComboBox.setItems(userIDObservableList);\n }", "@Override\n public void initialize(URL url, ResourceBundle rb)\n {\n txtDuration.setDisable(true);\n txtFile.setDisable(true);\n comboCategoryBox.setItems(FXCollections.observableArrayList(\"Blues\", \"Hip Hop\", \"Pop\", \"Rap\",\n \"Rock\", \"Techno\", \"Other\"));\n comboCategoryBox.setVisibleRowCount(6);\n txtOtherCategory.setVisible(false);\n }", "private JComboBox getJComboBox() {\r\n if (jComboBox == null) {\r\n jComboBox = new JComboBox();\r\n jComboBox.setEnabled(false); \r\n\r\n ActionListener al = new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n String animal = getCurrentAnimal();\r\n if (animal != null) {\r\n jTabbedPane.removeAll();\r\n createFlowTab(animal);\r\n createResourcesTab(animal);\r\n createChartTab(animal);\r\n }\r\n }\r\n };\r\n\r\n // Ensures that the default listener will be executed first.\r\n jComboBoxListeners.addLast(al);\r\n }\r\n return jComboBox;\r\n }", "private void buildComboBox() {\r\n\r\n comboBoxKernelOpen = new JComboBox();\r\n comboBoxKernelOpen.setFont(serif12);\r\n comboBoxKernelOpen.setBackground(Color.white);\r\n\r\n if (image.getNDims() == 2) {\r\n comboBoxKernelOpen.addItem(\"3x3 - 4 connected\");\r\n comboBoxKernelOpen.addItem(\"5x5 - 12 connected\");\r\n comboBoxKernelOpen.addItem(\"User sized circle.\");\r\n comboBoxKernelOpen.setSelectedIndex(2);\r\n } else if (image.getNDims() == 3) {\r\n comboBoxKernelOpen.addItem(\"3x3x3 - 6 connected (2.5D: 4)\");\r\n comboBoxKernelOpen.addItem(\"5x5x5 - 24 connected (2.5D: 12)\");\r\n comboBoxKernelOpen.addItem(\"User sized sphere.\");\r\n }\r\n }", "@Override\r\n public void initialize(URL location, ResourceBundle rb) {\r\n\r\n cityComboBox.setItems(Data.getCountries());\r\n DivisionComboBox.setItems(Data.getDivisions());\r\n\r\n Connection connection;\r\n try {\r\n connection = Database.getConnection();\r\n ResultSet rs = connection.createStatement().executeQuery(\"SELECT Customer_ID, Customer_Name, Address, Postal_Code, Phone, c.Division_ID, Division, o.Country_ID, o.Country\\n\" +\r\n \"FROM customers c INNER JOIN first_level_divisions f ON c.Division_ID = f.Division_ID\\n\" +\r\n \"INNER JOIN countries o ON o.Country_ID = f.Country_ID ORDER BY Customer_ID;\");\r\n while (rs.next()) {\r\n customersTable.add(new Customer(rs.getInt(\"Customer_ID\"),\r\n rs.getString(\"Customer_Name\"),\r\n rs.getString(\"Address\"),\r\n rs.getString(\"Division\"),\r\n rs.getString(\"Postal_Code\"),\r\n rs.getString(\"Country\"),\r\n rs.getString(\"Phone\"),\r\n rs.getInt(\"Division_ID\")));\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(AddCustomerController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n custIDCol.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\r\n custNameCol.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\r\n custAddress1Col.setCellValueFactory(new PropertyValueFactory<>(\"address\"));\r\n custCityCol.setCellValueFactory(new PropertyValueFactory<>(\"division\"));\r\n custZipCol.setCellValueFactory(new PropertyValueFactory<>(\"zip\"));\r\n custCountryCol.setCellValueFactory(new PropertyValueFactory<>(\"country\"));\r\n custPhoneCol.setCellValueFactory(new PropertyValueFactory<>(\"phone\"));\r\n\r\n customersTableView.setItems(customersTable);\r\n }", "public Create_Course() {\n initComponents();\n comboBoxLec();\n comboBoxDep();\n }", "public ItemPro() {\n initComponents();\n comboFill();\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJLabel label = new JLabel(\"\\u5546\\u54C1ID\");\r\n\t\tlabel.setBounds(10, 27, 54, 15);\r\n\t\tframe.getContentPane().add(label);\r\n\t\t\r\n\t\tString[] IDChoose = new String[gc.getGoodsId().size()];\r\n\t\tIDChoose = gc.getGoodsId().toArray(IDChoose);\t\t\r\n\t\tfinal JComboBox comboBox_2 = new JComboBox(IDChoose);//商品ID\t\t\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"\\u4ED3\\u5E93ID\");//仓库ID\r\n\t\tlblNewLabel.setBounds(181, 27, 54, 15);\r\n\t\tframe.getContentPane().add(lblNewLabel);\r\n\t\t\r\n\t\tJLabel label_1 = new JLabel(\"\\u5546\\u54C1\\u540D\\u79F0\");//名称\r\n\t\tlabel_1.setBounds(10, 62, 54, 15);\r\n\t\tframe.getContentPane().add(label_1);\r\n\t\t\r\n\t\tfinal JTextPane textPane_2 = new JTextPane();\r\n\t\ttextPane_2.setBounds(67, 58, 87, 19);\r\n\t\tframe.getContentPane().add(textPane_2);\r\n\t\t\r\n\t\tJLabel label_2 = new JLabel(\"\\u5546\\u54C1\\u7C7B\\u522B\");//类别\r\n\t\tlabel_2.setBounds(181, 62, 54, 15);\r\n\t\tframe.getContentPane().add(label_2);\r\n\t\t\r\n\t\tfinal JTextPane textPane = new JTextPane();\r\n\t\ttextPane.setBounds(250, 56, 104, 21);\r\n\t\tframe.getContentPane().add(textPane);\t\t\t\r\n\t\t\r\n\t\tJLabel label_3 = new JLabel(\"\\u5E93\\u5B58\\u4E0A\\u9650\");//上限\r\n\t\tlabel_3.setBounds(10, 97, 54, 15);\r\n\t\tframe.getContentPane().add(label_3);\r\n\t\t\r\n\t\tfinal JTextPane textPane_4 = new JTextPane();\r\n\t\ttextPane_4.setBounds(67, 91, 87, 21);\r\n\t\tframe.getContentPane().add(textPane_4);\r\n\t\t\r\n\t\tJLabel label_4 = new JLabel(\"\\u5E93\\u5B58\\u4E0B\\u9650\");//下限\r\n\t\tlabel_4.setBounds(181, 97, 54, 15);\r\n\t\tframe.getContentPane().add(label_4);\r\n\t\t\r\n\t\tfinal JTextPane textPane_5 = new JTextPane();\r\n\t\ttextPane_5.setBounds(250, 87, 104, 25);\r\n\t\tframe.getContentPane().add(textPane_5);\r\n\t\t\r\n\t\tJLabel label_5 = new JLabel(\"\\u6210\\u672C\\u4EF7\");//成本\r\n\t\tlabel_5.setBounds(10, 128, 41, 15);\r\n\t\tframe.getContentPane().add(label_5);\r\n\t\t\r\n\t\tfinal JTextPane textPane_6 = new JTextPane();\r\n\t\ttextPane_6.setBounds(67, 122, 87, 21);\r\n\t\tframe.getContentPane().add(textPane_6);\r\n\t\t\r\n\t\tJLabel label_6 = new JLabel(\"\\u9884\\u552E\\u4EF7\");//预售价\r\n\t\tlabel_6.setBounds(181, 125, 54, 15);\r\n\t\tframe.getContentPane().add(label_6);\r\n\t\t\r\n\t\tfinal JTextPane textPane_7 = new JTextPane();\r\n\t\ttextPane_7.setBounds(250, 122, 104, 21);\r\n\t\tframe.getContentPane().add(textPane_7);\r\n\t\t\r\n\t\tJLabel label_7 = new JLabel(\"\\u751F\\u4EA7\\u5382\\u5BB6\");//厂家\r\n\t\tlabel_7.setBounds(10, 152, 54, 15);\r\n\t\tframe.getContentPane().add(label_7);\r\n\t\t\r\n\t\tfinal JTextPane textPane_8 = new JTextPane();\r\n\t\ttextPane_8.setBounds(67, 153, 87, 21);\r\n\t\tframe.getContentPane().add(textPane_8);\r\n\t\t\r\n\t\tJLabel label_8 = new JLabel(\"\\u5546\\u54C1\\u578B\\u53F7\");//型号\r\n\t\tlabel_8.setBounds(181, 152, 54, 15);\r\n\t\tframe.getContentPane().add(label_8);\r\n\t\t\r\n\t\tfinal JTextPane textPane_9 = new JTextPane();\r\n\t\ttextPane_9.setBounds(250, 153, 104, 21);\r\n\t\tframe.getContentPane().add(textPane_9);\r\n\t\t\r\n\t\t//通过商品号和仓库号来显示商品信息\r\n\t\t//仓库ID下拉框\r\n\t\tString[] WIDChoose = new String[gc.getWareHouseId((String)comboBox_2.getSelectedItem()).size()];\r\n\t\tWIDChoose = gc.getWareHouseId((String)comboBox_2.getSelectedItem()).toArray(WIDChoose);\t\t\r\n\t\tfinal JComboBox comboBox = new JComboBox(WIDChoose);//仓库ID\r\n\t\tcomboBox.addItemListener(new ItemListener() {\r\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\r\n\t\t\r\n\t\t\t\tgoods good = new goods();\r\n\t\t\t\tgood = gc.findByGoodsIdandWareId((String)comboBox_2.getSelectedItem(), (String)comboBox.getSelectedItem());\r\n\t\t\t\t\r\n\t\t\t\ttextPane_2.setText(good.getGoods_name());\r\n\t\t\t\ttextPane.setText(good.getGoods_category());\r\n\t\t\t\ttextPane_4.setText(String.valueOf(good.getGoods_up()));\r\n\t\t\t\ttextPane_5.setText(String.valueOf(good.getGoods_down()));\r\n\t\t\t\ttextPane_6.setText(String.valueOf(good.getGoods_cost()));\r\n\t\t\t\ttextPane_7.setText(String.valueOf(good.getGoods_prprice()));\r\n\t\t\t\ttextPane_8.setText(good.getGoods_factory());\r\n\t\t\t\ttextPane_9.setText(good.getGoods_version());\r\n\t\t\t}\r\n\t\t});\t\t\r\n\t\tcomboBox.setBounds(248, 24, 106, 21);\r\n\t\tframe.getContentPane().add(comboBox);\r\n\t\r\n\t\tgoods good = new goods();\r\n\t\tgood = gc.findByGoodsIdandWareId((String)comboBox_2.getSelectedItem(), (String)comboBox.getSelectedItem());\r\n\t\t\r\n\t\ttextPane_2.setText(good.getGoods_name());\r\n\t\ttextPane.setText(good.getGoods_category());\r\n\t\ttextPane_4.setText(String.valueOf(good.getGoods_up()));\r\n\t\ttextPane_5.setText(String.valueOf(good.getGoods_down()));\r\n\t\ttextPane_6.setText(String.valueOf(good.getGoods_cost()));\r\n\t\ttextPane_7.setText(String.valueOf(good.getGoods_prprice()));\r\n\t\ttextPane_8.setText(good.getGoods_factory());\r\n\t\ttextPane_9.setText(good.getGoods_version());\t\t\r\n\t\t\r\n\t \r\n\t\tcomboBox_2.addItemListener(new ItemListener() {\r\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tgoods good = new goods();\r\n\t\t\t\tgood = gc.findByGoodsIdandWareId((String)comboBox_2.getSelectedItem(), (String)comboBox.getSelectedItem());\r\n\t\t\t\t\r\n\t\t\t\ttextPane_2.setText(good.getGoods_name());\r\n\t\t\t\ttextPane.setText(good.getGoods_category());\r\n\t\t\t\ttextPane_4.setText(String.valueOf(good.getGoods_up()));\r\n\t\t\t\ttextPane_5.setText(String.valueOf(good.getGoods_down()));\r\n\t\t\t\ttextPane_6.setText(String.valueOf(good.getGoods_cost()));\r\n\t\t\t\ttextPane_7.setText(String.valueOf(good.getGoods_prprice()));\r\n\t\t\t\ttextPane_8.setText(good.getGoods_factory());\r\n\t\t\t\ttextPane_9.setText(good.getGoods_version());\r\n\t\t\t}\r\n\t\t});\r\n\t\tcomboBox_2.setBounds(67, 24, 87, 21);\r\n\t\tframe.getContentPane().add(comboBox_2);\r\n\t\t//显示截止到此\r\n\t\r\n\r\n\r\n\t}", "public void fillPLComboBox(){\n\t\tmonths.add(\"Select\");\n\t\tmonths.add(\"Current Month\");\n\t\tmonths.add(\"Last Month\");\n\t\tmonths.add(\"Last 3 Months\");\n\t\tmonths.add(\"View All\");\n\t}", "public String init() {\n\t\ttry{\n\t\t for (int i = 0; i < table_names.size(); i++)\n\t\t combo_box.addItem(table_names.get(count++));\n\t }\n\t\t//if the ArrayList of table_names is empty, then it will throw a NullPointerException\n\t\tcatch (NullPointerException nullpointer){\n\t\t\tnullpointer.printStackTrace();\n\t\t}\n\t\tfinally{\n\t\t text_box.setEditable(false);\n\t//\t select_table.addActionListener(new ActionListener() {\n\t//\t public void actionPerformed(ActionEvent e) {\n\t//\t if (count < table_names.size())\n\t//\t combo_box.addItem(table_names.get(count++));\n\t//\t }\n\t//\t });\n\t\t combo_box.addActionListener(new ActionListener() {\n\t\t public void actionPerformed(ActionEvent e) {\n\t\t text_box.setText(\"\"+ ((JComboBox) e.getSource()).getSelectedItem());\n\t\t table_name=(String) ((JComboBox) e.getSource()).getSelectedItem();\n\t\t }\n\t\t });\n\t\t if (table_name!=\"\"){\n\t\t \tset_table_name(table_name);\n\t\t \treturn table_name;\n\t\t }\n\t\t else\n\t\t \treturn \"\";\n\t\t}\n\t \n\t }", "private void loadlec() {\n try {\n\n ResultSet rs = DBConnection.search(\"select * from lecturers\");\n Vector vv = new Vector();\n//vv.add(\"\");\n while (rs.next()) {\n\n// vv.add(rs.getString(\"yearAndSemester\"));\n String gette = rs.getString(\"lecturerName\");\n\n vv.add(gette);\n\n }\n //\n jComboBox1.setModel(new DefaultComboBoxModel<>(vv));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void llenarComboBox(){\n TipoMiembroComboBox.removeAllItems();\n TipoMiembroComboBox.addItem(\"Administrador\");\n TipoMiembroComboBox.addItem(\"Editor\");\n TipoMiembroComboBox.addItem(\"Invitado\");\n }", "public void init() {\n initComponents();\n initData();\n }", "private void ComboBoxLoader (){\n try {\n if (obslistCBOCategory.size()!=0)\n obslistCBOCategory.clear();\n /*add the records from the database to the ComboBox*/\n rset = connection.createStatement().executeQuery(\"SELECT * FROM category\");\n while (rset.next()) {\n String row =\"\";\n for(int i=1;i<=rset.getMetaData().getColumnCount();i++){\n row += rset.getObject(i) + \" \";\n }\n obslistCBOCategory.add(row); //add string to the observable list\n }\n\n cboCategory.setItems(obslistCBOCategory); //add observable list into the combo box\n //text alignment to center\n cboCategory.setButtonCell(new ListCell<String>() {\n @Override\n public void updateItem(String item, boolean empty) {\n super.updateItem(item, empty);\n if (item != null) {\n setText(item);\n setAlignment(Pos.CENTER);\n Insets old = getPadding();\n setPadding(new Insets(old.getTop(), 0, old.getBottom(), 0));\n }\n }\n });\n\n //listener to the chosen list in the combo box and displays it to the text fields\n cboCategory.getSelectionModel().selectedItemProperty().addListener((obs, oldValue, newValue)->{\n if(newValue!=null){\n Scanner textDisplay = new Scanner((String) newValue);\n txtCategoryNo.setText(textDisplay.next());\n txtCategoryName.setText(textDisplay.nextLine());}\n\n });\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n }", "public void initialize() {\r\n\t\t\r\n\t\tJLabel lblLevel = new JLabel(\"Level\");\r\n\t\tlblLevel.setBounds(120, 124, 100, 45);\r\n\t\tlblLevel.setForeground(new Color(184, 134, 11));\r\n\t\tlblLevel.setFont(new Font(\"Britannic Bold\", Font.PLAIN, 35));\r\n\t\tadd(lblLevel);\r\n\t\t\r\n\t\tlevelList = new JComboBox<String>();\r\n\t\tlevelList.setUI(new MyComboBoxUI());\r\n\t\t((JLabel)levelList.getRenderer()).setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlevelList.setBounds(280, 124, 400, 45);\r\n\t\tlevelList.setBorder(BorderFactory.createLineBorder(Color.BLUE));\r\n\t\tlevelList.setForeground(new Color(184, 134, 11));\r\n\t\tlevelList.setFont(new Font(\"Britannic Bold\", Font.PLAIN, 35));\r\n\t\tlevelList.setBackground(Color.WHITE);\r\n\t\tadd(levelList);\r\n\t\t\r\n\t\t// Load all unlocked levels to the combobox\r\n\t\tint highest = lvlm.getHighestLevel().getLevelNum();\r\n\t\tfor (int i = 0; i < lvlList.size(); i++) {\r\n\t\t\tLevel l = lvlList.get(i);\r\n\t\t\tif (l.getLevelNum() <= highest) {\r\n\t\t\t\tString name = lvlList.get(i).toString();\r\n\t\t\t\tlevelList.addItem(name);\r\n\t\t\t}\r\n\t\t}\t\t\r\n//\t\tlevelList.setRenderer(new DisabledItemsRenderer<String>());\r\n\r\n\t\tImageIcon buttonBack = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/button_back.png\"));\r\n\t\tImageIcon newBtnBack = new ImageIcon(buttonBack.getImage().getScaledInstance(227, 69, java.awt.Image.SCALE_SMOOTH));\r\n\t\tImageIcon btnBackRollover = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/button_back_Rollover.png\"));\r\n\t\tImageIcon newBtnBackRollover = new ImageIcon(btnBackRollover.getImage().getScaledInstance(227, 69, java.awt.Image.SCALE_SMOOTH));\r\n\t\tImageIcon btnBackPressed = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/button_back_Pressed.png\"));\r\n\t\tImageIcon newBtnBackPressed = new ImageIcon(btnBackPressed.getImage().getScaledInstance(227, 69, java.awt.Image.SCALE_SMOOTH));\r\n\t\tJButton btnBack = new JButton(newBtnBack);\r\n\t\tbtnBack.setBounds(20, 500, 227, 69);\r\n\t\tbtnBack.setBorderPainted(false);\r\n\t\tbtnBack.setBackground(Color.WHITE);\r\n\t\tbtnBack.setBorder(null);\r\n\t\tbtnBack.setContentAreaFilled(false);\r\n\t\tbtnBack.addActionListener(new MainMenuController());\r\n\t\tbtnBack.setRolloverEnabled(true);\r\n\t\tbtnBack.setRolloverIcon(newBtnBackRollover);\r\n\t\tbtnBack.setPressedIcon(newBtnBackPressed);\r\n\t\tadd(btnBack);\r\n\t\t\r\n\t\tImageIcon buttonStart = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/button_startGame.png\"));\r\n\t\tImageIcon newBtnStart = new ImageIcon(buttonStart.getImage().getScaledInstance(227, 69, java.awt.Image.SCALE_SMOOTH));\r\n\t\tImageIcon btnStartRollover = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/button_startGame_Rollover.png\"));\r\n\t\tImageIcon newBtnStartRollover = new ImageIcon(btnStartRollover.getImage().getScaledInstance(227, 69, java.awt.Image.SCALE_SMOOTH));\r\n\t\tImageIcon btnStartPressed = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/button_startGame_Pressed.png\"));\r\n\t\tImageIcon newBtnStartPressed = new ImageIcon(btnStartPressed.getImage().getScaledInstance(227, 69, java.awt.Image.SCALE_SMOOTH));\r\n\t\tJButton btnStartGame = new JButton(newBtnStart);\r\n\t\tbtnStartGame.setBounds(550, 500, 227, 69);\r\n\t\tbtnStartGame.setBorderPainted(false);\r\n\t\tbtnStartGame.setBackground(Color.WHITE);\r\n\t\tbtnStartGame.setBorder(null);\r\n\t\tbtnStartGame.setContentAreaFilled(false);\r\n\t\tbtnStartGame.addActionListener(new StartGameController());\r\n\t\tbtnStartGame.setRolloverEnabled(true);\r\n\t\tbtnStartGame.setRolloverIcon(newBtnStartRollover);\r\n\t\tbtnStartGame.setPressedIcon(newBtnStartPressed);\r\n\t\tadd(btnStartGame);\r\n\r\n\t\tImageIcon backgroundImg = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/secondBackground.png\"));\r\n\t\tImageIcon newBackground = new ImageIcon(backgroundImg.getImage().getScaledInstance(800, 573, java.awt.Image.SCALE_SMOOTH));\r\n\t\tJLabel background = new JLabel(newBackground);\r\n\t\tbackground.setVerticalAlignment(SwingConstants.TOP);\r\n\t\tbackground.setBackground(Color.WHITE);\r\n\t\tbackground.setBounds(0, 0, 800, 600);\r\n\t\tadd(background);\r\n\t\tsetLayout(null);\r\n\t}", "public OnlineCon() {\n initComponents();\n fillcombo();\n }", "public void initComponents() {\n//metoda gatherBrandSet z klasy CarManager przyjmuje polaczenie do bazy\n carManager.gatherBrandSet(connectionManager.getStatement());\n//petla iterujaca po elementach zbioru marek i dodajaca elementy do listy\n carBrandList.removeAll(carBrandList);\n for(String o: carManager.getBrandSet()){\n\n carBrandList.add(o);\n }\n\n//ustawianie listy jako ChoiceBox w GUI\n brandCBox.setItems(carBrandList);\n\n//Marka Box wrazliwa na zmiany\n brandCBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n//przesylanie wyboru Marki do CarManager\n carManager.setBrandChoice((String) brandCBox.getValue());\n carManager.gatherModelSet(connectionManager.getStatement());\n//Czyszczenie listy i dodawanie nowych obiektow z ModelSet do ModelList\n carModelList.removeAll(carModelList);\n for (String p : carManager.getModelSet())\n carModelList.add(p);\n\n modelCBox.setItems(carModelList);\n// Listener do zmiany Modelu\n modelCBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n//Ustawianie wartosci wybranej z przycisku\n carManager.setMarkaChoice((String) modelCBox.getValue());\n// Mechaniz wyboru silnika\n carManager.gatherEngineSet(connectionManager.getStatement());\n\n\n carEngineList.removeAll(carEngineList);\n for(String p: carManager.getEngineSet())\n carEngineList.add(p);\n\n engineCBox.setItems(carEngineList);\n engineCBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n carManager.setEngineChoice(String.valueOf(engineCBox.getValue()));\n }\n });\n\n\n }\n });\n\n }\n });\n//Pobieranie Elementow z bazy\n elementManager.gatherElementSet(connectionManager.getStatement());\n\n servActivities.setItems(carActivityList);\n servActivities.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n\n\n }\n });\n\n carElementList.removeAll(carModelList);\n for(String p: elementManager.getElementSet())\n carElementList.add(p);\n\n elementActivities.setItems(carElementList);\n elementActivities.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n elementManager.setElementChoice(String.valueOf(elementActivities.getValue()));\n\n }\n });\n//Ustawianie lat\n yearList.removeAll(yearList);\n for(int i = 2017; i> 1970; i--){\n yearList.add(i);\n }\n yearCBox.setItems(yearList);\n //Przypisywanie do zmiennej\n yearCBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n carManager.setYearChoice(0);\n carManager.setYearChoice(Integer.valueOf(String.valueOf(yearCBox.getValue())));\n }\n });\n\n}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jButton5 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox<>();\n\n addInternalFrameListener(new javax.swing.event.InternalFrameListener() {\n public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {\n formInternalFrameActivated(evt);\n }\n public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jLabel1.setText(\"* Vehiculo\");\n\n jTextField1.setFont(new java.awt.Font(\"Arial\", 0, 10)); // NOI18N\n\n jLabel2.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jLabel2.setText(\"Color\");\n\n jButton1.setBackground(new java.awt.Color(255, 255, 255));\n jButton1.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton1.setText(\" \");\n jButton1.setFocusable(false);\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel3.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jLabel3.setText(\"* Serie\");\n\n jTextField2.setFont(new java.awt.Font(\"Arial\", 0, 10)); // NOI18N\n\n jLabel4.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jLabel4.setText(\"Placas\");\n\n jTextField3.setFont(new java.awt.Font(\"Arial\", 0, 10)); // NOI18N\n\n jButton2.setBackground(new java.awt.Color(255, 255, 255));\n jButton2.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton2.setText(\"Agregar\");\n jButton2.setFocusable(false);\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton3.setBackground(new java.awt.Color(255, 255, 255));\n jButton3.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton3.setText(\"Cancelar\");\n jButton3.setFocusable(false);\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jButton4.setBackground(new java.awt.Color(255, 255, 255));\n jButton4.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton4.setText(\"Actualizar\");\n jButton4.setFocusable(false);\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n jTextArea1.setColumns(20);\n jTextArea1.setFont(new java.awt.Font(\"Dialog\", 0, 10)); // NOI18N\n jTextArea1.setLineWrap(true);\n jTextArea1.setRows(5);\n jTextArea1.setWrapStyleWord(true);\n jTextArea1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Comentario\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 1, 8))); // NOI18N\n jScrollPane1.setViewportView(jTextArea1);\n\n jButton5.setBackground(new java.awt.Color(255, 255, 255));\n jButton5.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton5.setText(\"Eliminar\");\n jButton5.setFocusable(false);\n\n jLabel5.setFont(new java.awt.Font(\"Dialog\", 1, 10)); // NOI18N\n jLabel5.setText(\"Agencia\");\n\n jComboBox1.setFont(new java.awt.Font(\"Dialog\", 1, 10)); // NOI18N\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\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 .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(29, 29, 29)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(22, 22, 22)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jTextField1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 406, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton2))))\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 .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton4)\n .addComponent(jButton3)\n .addComponent(jButton2)\n .addComponent(jButton5))\n .addContainerGap(15, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void inicializarCombos() {\n\t\tlistaGrupoUsuario = GrupoUsuarioDAO.readTodos(this.mainApp.getConnection());\n\t\tfor (GrupoUsuario grupo : listaGrupoUsuario) {\n\t\t\tthis.observableListaGrupoUsuario.add(grupo.getNombre());\n\t\t}\n\t\tthis.comboGrupoUsuario.setItems(this.observableListaGrupoUsuario);\n\t\tnew AutoCompleteComboBoxListener(comboGrupoUsuario);\n\n\t\tObservableList<String> status = FXCollections.observableArrayList(\"Bloqueado\",\"Activo\",\"Baja\");\n\t\tthis.comboStatus.setItems(status);\n\t\tthis.comboEmpleados.setItems(FXCollections.observableArrayList(this.listaEmpleados));\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n gender.getItems().setAll(\"laki-laki\",\"perempuan\");\n status.getItems().setAll(\"admin\",\"user\");\n // bind the selected fruit label to the selected fruit in the combo box.\n //selectedFruit.textProperty().bind(fruitCombo.getSelectionModel().selectedItemProperty());\n\n\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTextField1 = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jTextField2 = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jComboBox1 = new javax.swing.JComboBox<>();\n\n setToolTipText(\"\");\n setPreferredSize(new java.awt.Dimension(600, 500));\n\n jTextField1.setEditable(false);\n jTextField1.setBackground(new java.awt.Color(141, 141, 157));\n jTextField1.setFont(new java.awt.Font(\"Modern No. 20\", 0, 36)); // NOI18N\n jTextField1.setForeground(new java.awt.Color(255, 255, 255));\n jTextField1.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n jTextField1.setText(\"Criar Professor\");\n jTextField1.setToolTipText(\"\");\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel1.setText(\"Nome: \");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel2.setText(\"Grau Académico:\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel3.setText(\"Idade: \");\n\n jButton1.setText(\"Criar Professor\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/GUI/undo.png\"))); // NOI18N\n jButton2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n jButton2.setDebugGraphicsOptions(javax.swing.DebugGraphics.NONE_OPTION);\n jButton2.setDefaultCapable(false);\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jTextField2.setName(\"Nome\"); // NOI18N\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n\n jTextField3.setName(\"Idade\"); // NOI18N\n\n jComboBox1.setName(\"Grau académico\"); // 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 .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jTextField1))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(197, 197, 197)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 216, Short.MAX_VALUE)\n .addGap(88, 88, 88)\n .addComponent(jButton2)\n .addGap(22, 22, 22)))\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 76, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 338, Short.MAX_VALUE)\n .addComponent(jTextField3)\n .addComponent(jComboBox1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(72, 72, 72))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(139, 139, 139)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField3)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jComboBox1))\n .addGap(113, 113, 113)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(44, 44, 44))\n );\n }", "private JComboBox getJComboBox() {\n\t\tif (jComboBox == null) {\n\t\t\tjComboBox = new JComboBox(filesList);\n\t\t\tjComboBox.setPreferredSize(new Dimension(130, 24));\n\t\t\tjComboBox.setEditable(true);\n\t\t}\n\t\treturn jComboBox;\n\t}", "@Override\r\n public void initialize(URL url, ResourceBundle resourceBundle) {\n trig_combo.getItems().addAll(\"SIN\",\"COS\",\"TAN\");\r\n \r\n //Selecting SIN as Initial Value\r\n trig_combo.setValue(\"SIN\");\r\n \r\n //adding number list up to 20 (20!)\r\n power_combo.getItems().addAll(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20);\r\n \r\n //Disabling Power field at Starting\r\n power_combo.setDisable(true);\r\n power_combo.setOpacity(.5);\r\n \r\n //Initial message as Instruction\r\n type.setTextFill(Color.DARKCYAN);\r\n type.setText(\"Angle Multiple and Power are only applicable to the First Angle\");\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox<>();\n jLabel4 = new javax.swing.JLabel();\n jComboBox2 = new javax.swing.JComboBox<>();\n jLabel5 = new javax.swing.JLabel();\n jComboBox3 = new javax.swing.JComboBox<>();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n\n setClosable(true);\n setIconifiable(true);\n setTitle(\"Настройки организации\");\n setFrameIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/settings.png\"))); // NOI18N\n addInternalFrameListener(new javax.swing.event.InternalFrameListener() {\n public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {\n formInternalFrameIconified(evt);\n }\n public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {\n }\n });\n\n jLabel1.setText(\"Организация\");\n\n jLabel2.setText(\"jLabel2\");\n\n jLabel3.setText(\"Основная валюта\");\n\n jLabel4.setText(\"Основной склад\");\n\n jLabel5.setText(\"Контрагент \");\n\n jButton1.setText(\"Отмена\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Сохранить\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\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 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jButton2))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel5))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jComboBox2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jComboBox3, 0, 166, Short.MAX_VALUE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 6, Short.MAX_VALUE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 40, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addContainerGap())\n );\n\n pack();\n }", "private void initialize() {\n\t\tjLabel3 = new JLabel();\n\t\tjLabel = new JLabel();\n\t\tthis.setLayout(null);\n\t\tthis.setBounds(new java.awt.Rectangle(0, 0, 486, 377));\n\t\tjLabel.setText(PluginServices.getText(this,\n\t\t\t\t\"Areas_de_influencia._Introduccion_de_datos\") + \":\");\n\t\tjLabel.setBounds(5, 20, 343, 21);\n\t\tjLabel3.setText(PluginServices.getText(this, \"Cobertura_de_entrada\")\n\t\t\t\t+ \":\");\n\t\tjLabel3.setBounds(6, 63, 190, 21);\n\t\tthis.add(jLabel, null);\n\t\tthis.add(jLabel3, null);\n\t\tthis.add(getLayersComboBox(), null);\n\t\tthis.add(getSelectedOnlyCheckBox(), null);\n\t\tthis.add(getMethodSelectionPanel(), null);\n\t\tthis.add(getResultSelectionPanel(), null);\n\t\tthis.add(getExtendedOptionsPanel(), null);\n\t\tconfButtonGroup();\n\t\tlayersComboBox.setSelectedIndex(0);\n\t\tinitSelectedItemsJCheckBox();\n\t\tdistanceBufferRadioButton.setSelected(true);\n\t\tlayerFieldsComboBox.setEnabled(false);\n\t\tverifyTypeBufferComboEnabled();\n\t}", "private void initComponents(){\n\t\n\t\tthis.setLayout(null);\n\t\t\n\t\tscreensize = Toolkit.getDefaultToolkit().getScreenSize();\n\t\t\n\t\tlogo = new JLabel(getLogoIcon(), JLabel.CENTER); // 500x50\n\t\t\n\t\toptionList = new JComboBox();\n\t\t\n\t\tcreate = new JButton(\"Create\");\n\t\tclose = new JButton(\"Close\");\n\t\t\n\t\tcreate.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tcreateActionPerformed(evt);\n\t\t\t}\n\t\t});\n\t\t\n\t\tclose.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tcloseActionPerformed(evt);\n\t\t\t}\n\t\t});\n\t\t\n\t}", "public void initialize(URL url, ResourceBundle rb) {\r\n \r\n choiceBoxLabel.setText(\"\");\r\n //choiceBox.getItems().add(\"salut\");\r\n try {\r\n PreparedStatement pt = c.prepareStatement(\"select * from service\");\r\n ResultSet rs = pt.executeQuery();\r\n while (rs.next()) {\r\n comboBox_service.getItems().add(rs.getString(2));\r\n } } catch (SQLException ex) {\r\n Logger.getLogger(service.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n // choiceBox_service.setValue(choiceBox_service.getValue());\r\n \r\n //comboBox_listRdv();\r\n listRdvReserved();\r\n \r\n \r\n }", "@Override\r\n\tpublic void initialize(URL location, ResourceBundle resources) {\n\t\tpKindChoiceBox.setValue(\"전체\");\r\n\t\tpKindChoiceBox.setItems(productKindList);\r\n\t\tsearchKindComboBox.setItems(searchKindList);\r\n\t\t\r\n\t\tTableColumn<ProductDataModel, Integer> tcP_id = (TableColumn<ProductDataModel, Integer>) rsvListTable.getColumns().get(0);\r\n\t\tTableColumn<ProductDataModel, String> tcKind = (TableColumn<ProductDataModel, String>) rsvListTable.getColumns().get(1);\r\n\t\tTableColumn<ProductDataModel, String> tcTitle = (TableColumn<ProductDataModel, String>) rsvListTable.getColumns().get(2);\r\n\t\tTableColumn<ProductDataModel, String> tcGenre = (TableColumn<ProductDataModel, String>) rsvListTable.getColumns().get(3);\n\t\tTableColumn<ProductDataModel, Integer> tcAgeG = (TableColumn<ProductDataModel, Integer>) rsvListTable.getColumns().get(4);\r\n\t\tTableColumn<ProductDataModel, String> tcRdate = (TableColumn<ProductDataModel, String>) rsvListTable.getColumns().get(5);\r\n\t\tTableColumn<ProductDataModel, String> tcIsrental = (TableColumn<ProductDataModel, String>) rsvListTable.getColumns().get(6);\r\n\t\tTableColumn<ProductDataModel, Integer> tcRentalCnt = (TableColumn<ProductDataModel, Integer>) rsvListTable.getColumns().get(7);\r\n\t\ttcP_id.setCellValueFactory(new PropertyValueFactory<ProductDataModel, Integer>(\"p_id\"));\r\n\t\ttcKind.setCellValueFactory(new PropertyValueFactory<ProductDataModel, String>(\"kind\"));\r\n\t\ttcTitle.setCellValueFactory(new PropertyValueFactory<ProductDataModel, String>(\"title\"));\r\n\t\ttcGenre.setCellValueFactory(new PropertyValueFactory<ProductDataModel, String>(\"genre\"));\n\t\ttcAgeG.setCellValueFactory(new PropertyValueFactory<ProductDataModel, Integer>(\"age_grade\"));\r\n\t\ttcRdate.setCellValueFactory(new PropertyValueFactory<ProductDataModel, String>(\"release\"));\r\n\t\ttcIsrental.setCellValueFactory(new PropertyValueFactory<ProductDataModel, String>(\"isRental\"));\r\n\t\ttcRentalCnt.setCellValueFactory(new PropertyValueFactory<ProductDataModel, Integer>(\"rentalCnt\"));\r\n\t\t\r\n\t\tpds = db.selectProductDatas();\r\n\t\tfor(ProductDatas pd : pds){\r\n\t\t\tproductList.add(new ProductDataModel(pd));\r\n\t\t}\r\n\t\trsvListTable.setItems(productList);\r\n\t\t\r\n\t}", "private void fillSubjectCombo() throws SQLException, ClassNotFoundException {\n ArrayList<Subject> subjectList = SubjectController.getAllSubject();\n //subjectList.removeAllItems();\n for (Subject subject : subjectList) {\n subjectCombo.addItem(subject);\n\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabNom = new javax.swing.JLabel();\n jLabAp1 = new javax.swing.JLabel();\n jLabAp2 = new javax.swing.JLabel();\n jLabSex = new javax.swing.JLabel();\n jLabEdad = new javax.swing.JLabel();\n jLabNomin = new javax.swing.JLabel();\n jLabIRPF = new javax.swing.JLabel();\n jTexNom = new javax.swing.JTextField();\n jTexAp1 = new javax.swing.JTextField();\n jTexNomin = new javax.swing.JTextField();\n jTexAp2 = new javax.swing.JTextField();\n jTexEd = new javax.swing.JTextField();\n jTexIRPF = new javax.swing.JTextField();\n jBAcept = new javax.swing.JButton();\n jBAtras = new javax.swing.JButton();\n jCoBSex = new javax.swing.JComboBox<>();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabNom.setText(\"Nombre :\");\n\n jLabAp1.setText(\"Apellido 1:\");\n\n jLabAp2.setText(\"Apellido 2:\");\n\n jLabSex.setText(\"Sexo:\");\n\n jLabEdad.setText(\"Edad:\");\n\n jLabNomin.setText(\"Nomina:\");\n\n jLabIRPF.setText(\"IRPF:\");\n\n jTexNom.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTexNomActionPerformed(evt);\n }\n });\n\n jBAcept.setText(\"Aceptar\");\n jBAcept.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBAceptActionPerformed(evt);\n }\n });\n\n jBAtras.setText(\"Atrás\");\n jBAtras.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBAtrasActionPerformed(evt);\n }\n });\n\n jCoBSex.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"H\", \"M\", \"NB\" }));\n jCoBSex.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCoBSexActionPerformed(evt);\n }\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 .addGroup(layout.createSequentialGroup()\n .addContainerGap(19, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabNomin)\n .addGap(27, 27, 27)\n .addComponent(jTexNomin, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabAp1)\n .addComponent(jLabSex))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCoBSex, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTexAp1))))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jBAtras, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 143, Short.MAX_VALUE)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(42, 42, 42)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabAp2)\n .addComponent(jLabEdad)\n .addComponent(jLabIRPF))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jTexEd, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 116, Short.MAX_VALUE)\n .addComponent(jTexIRPF, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTexAp2)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jBAcept, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(layout.createSequentialGroup()\n .addGap(116, 116, 116)\n .addComponent(jLabNom)\n .addGap(34, 34, 34)\n .addComponent(jTexNom, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(27, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(17, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabNom)\n .addComponent(jTexNom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabAp1)\n .addComponent(jLabAp2)\n .addComponent(jTexAp1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTexAp2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabSex)\n .addComponent(jLabEdad)\n .addComponent(jTexEd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jCoBSex, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabIRPF)\n .addComponent(jLabNomin)\n .addComponent(jTexNomin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTexIRPF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 33, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jBAtras)\n .addComponent(jBAcept)))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n txtUrunSeriNo = new javax.swing.JTextField();\n txtSatisFiyati = new javax.swing.JTextField();\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 jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n txtUrunModel = new javax.swing.JTextField();\n txtUrunIsmi = new javax.swing.JTextField();\n txtAlisFiyati = new javax.swing.JTextField();\n txtAdet = new javax.swing.JTextField();\n jPanel2 = new javax.swing.JPanel();\n jLabel9 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n comboDepo = new javax.swing.JComboBox<>();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Stok Ekle | Stok Otomasyonu |\");\n setFocusTraversalPolicyProvider(true);\n setLocation(new java.awt.Point(0, 0));\n setResizable(false);\n setType(java.awt.Window.Type.UTILITY);\n\n jButton1.setText(\"EKLE\");\n jButton1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton1MouseClicked(evt);\n }\n });\n\n txtSatisFiyati.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));\n txtSatisFiyati.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtSatisFiyatiKeyTyped(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel2.setText(\"Ürün Seri No : \");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel3.setText(\"Ürün İsmi :\");\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel4.setText(\"Ürün Model :\");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel5.setText(\"Adet :\");\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel6.setText(\"Alış Fiyatı :\");\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel7.setText(\"Satış Fiyatı :\");\n\n txtAlisFiyati.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtAlisFiyatiKeyTyped(evt);\n }\n });\n\n txtAdet.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtAdetKeyTyped(evt);\n }\n });\n\n jPanel2.setBackground(new java.awt.Color(48, 66, 105));\n\n jLabel9.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel9.setForeground(new java.awt.Color(255, 255, 255));\n jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel9.setText(\"# Ürün Ekle #\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(40, 40, 40)\n .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, 234, Short.MAX_VALUE)\n .addGap(32, 32, 32))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel9)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel8.setText(\"Depo :\");\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 .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel8)\n .addComponent(jLabel7)\n .addComponent(jLabel6)\n .addComponent(jLabel5)\n .addComponent(jLabel4)\n .addComponent(jLabel3)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(comboDepo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtAlisFiyati, javax.swing.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)\n .addComponent(txtAdet)\n .addComponent(txtUrunModel)\n .addComponent(txtUrunIsmi)\n .addComponent(txtUrunSeriNo)\n .addComponent(txtSatisFiyati, javax.swing.GroupLayout.Alignment.TRAILING))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 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(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 276, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtUrunSeriNo, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtUrunIsmi, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtUrunModel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtAdet, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtAlisFiyati, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtSatisFiyati, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(comboDepo, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void initializeComboSize() {\n\t\tsizeOptions.clear();\n\t\tfor (int i = 0; i < restaurant.getSizes().size(); i++) {\n\t\t\tif (restaurant.getSizes().get(i) != null) {\n\t\t\t\tsizeOptions.add(restaurant.getSizes().get(i));\n\t\t\t}\n\t\t}\n\t\tComboSize.setItems(sizeOptions);\n\t}", "public void construirSetOperadores() {\n\n\t\tlabeltituloSeleccionOperador = new JLabel();\n\n\t\tcomboOperadores = new JComboBox(operadores);// creamos el Cuarto combo,y le pasamos un array de cadenas\n\t\tcomboOperadores.setSelectedIndex(0);// por defecto quiero visualizar el Cuarto item\n\t\t\n\n\t\tlabeltituloSeleccionOperador.setText(\"Seleccione el operador que relaciona ambas reglas\");\n\t\tpanelCentral.add(labeltituloSeleccionOperador);\n\t\tlabeltituloSeleccionOperador.setBounds(30, 30, 50, 20);\n\t\tpanelCentral.add(comboOperadores);\n\t\tcomboOperadores.setBounds(100, 30, 150, 24);\n\t\t\n\n\t\tpanelCentral.setBounds(10, 50, 370, 110);\n\n\t\t/* Creamos el objeto controlador, para manejar los eventos */\n\t\tControlDemoCombo controlDemoCombo = new ControlDemoCombo(this);\n\t\tcomboOperadores.addActionListener(controlDemoCombo);// agregamos escuchas\n\n\t}", "@Override\n\tpublic void initialize(URL url, ResourceBundle rb) {\n\n\t\tJsonObject tableConfig = openConfig (\"Tablas BD\", \"./resources/config/TablasBD_A.json\");\n\n\t\tpp = PersistenciaSuperAndes.getInstance(tableConfig);\n\t\t\n\t\tObservableList<String> e = FXCollections.observableArrayList(\"Administrador\", \"Sucursal\");\n\n\t\tcomboBox.setItems(e); \n\n\n\t}", "@Override\r\n public void initialize(URL url, ResourceBundle rb)\r\n {\r\n //setup update status string builder and status area\r\n updateCoinStatusSB = new StringBuilder();\r\n coinUpdateStatus.setVisible(false);\r\n \r\n //set image remove buttons to be disabled (enabled later if image exists\r\n removeCoinImageBtn1.setVisible(false);\r\n removeCoinImageBtn2.setVisible(false);\r\n\r\n //setup combo boxes\r\n coinCurrencyComboBox.getItems().addAll(CoinCurrency.values());\r\n coinGradeComboBox.getItems().addAll(CoinGrade.values());\r\n \r\n // Define rendering of selected value shown in ComboBox.\r\n collectionComboBox.setConverter(new StringConverter<CollectionProperty>()\r\n {\r\n @Override\r\n public String toString(CollectionProperty collection)\r\n {\r\n if (collection == null)\r\n {\r\n return null;\r\n } else\r\n {\r\n return collection.getCollectionName();\r\n }\r\n }\r\n\r\n @Override\r\n public CollectionProperty fromString(String personString)\r\n {\r\n return null; // No conversion fromString needed.\r\n }\r\n });\r\n // Define rendering of the list of values in ComboBox drop down. \r\n collectionComboBox.setCellFactory((comboBox)\r\n -> \r\n {\r\n return new ListCell<CollectionProperty>()\r\n {\r\n @Override\r\n protected void updateItem(CollectionProperty item, boolean empty)\r\n {\r\n super.updateItem(item, empty);\r\n\r\n if (item == null || empty)\r\n {\r\n setText(null);\r\n } else\r\n {\r\n setText(item.getCollectionName());\r\n }\r\n }\r\n };\r\n });\r\n\r\n //setup add image button listeners\r\n addCoinImageBtn1.setOnAction(new EventHandler<ActionEvent>()\r\n {\r\n @Override\r\n public void handle(ActionEvent e)\r\n {\r\n loadImageButtonAction(1);\r\n }\r\n });\r\n addCoinImageBtn2.setOnAction(new EventHandler<ActionEvent>()\r\n {\r\n @Override\r\n public void handle(ActionEvent e)\r\n {\r\n loadImageButtonAction(2);\r\n }\r\n });\r\n removeCoinImageBtn1.setOnAction(new EventHandler<ActionEvent>()\r\n {\r\n @Override\r\n public void handle(ActionEvent e)\r\n {\r\n removeImageButtonAction(1);\r\n }\r\n });\r\n removeCoinImageBtn2.setOnAction(new EventHandler<ActionEvent>()\r\n {\r\n @Override\r\n public void handle(ActionEvent e)\r\n {\r\n removeImageButtonAction(2);\r\n }\r\n });\r\n\r\n }", "private void prefil_demo_values() {\n //Dont forget to look at \"Controller.connect()\" method\n //\n MY_SQL = false;\n DATE_FORMAT = \"yy/MM/dd\";\n String quality = \"1702860-ST110\";\n jComboBoxQuality.addItem(quality);\n jComboBoxQuality.setSelectedItem(quality);\n String testCode = \"10194\";\n jComboBoxTestCode.addItem(testCode);\n jComboBoxTestCode.setSelectedItem(testCode);\n //\n String testName = \"ML\";\n jComboBoxTestName.addItem(testName);\n jComboBoxTestName.setSelectedItem(testName);\n //\n }", "private void initialize() {\r\n this.setSize(new Dimension(800,600));\r\n this.setContentPane(getJPanel());\r\n\r\n List<String> title = new ArrayList<String>();\r\n title.add(\"Select\");\r\n title.add(\"Field Id\");\r\n title.add(\"Field Name\");\r\n title.add(\"Field Type\");\r\n title.add(\"Image\");\r\n\r\n List<JComponent> componentList = new ArrayList<JComponent>();\r\n componentList.add(checkInit);\r\n componentList.add(fieldIdInit);\r\n componentList.add(filedNameInit);\r\n componentList.add(fieldTypeInit);\r\n componentList.add(imageButton);\r\n\r\n String []arrColumn = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n String []arrTitle = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n // init grid\r\n grid = new GridUtils(pageSheet, title, componentList, arrColumn, preButton, afterButton, 5, arrTitle);\r\n // set title\r\n grid.setPageInfo(pageInfoLbl);\r\n \r\n searchDetailList();\r\n \r\n initComboBox();\r\n \r\n setTitle(\"Page Select page\");\r\n\t}", "public student() {\n this.setExtendedState(this.getExtendedState() | this.MAXIMIZED_BOTH);\n initComponents();\n jLabel6.setVisible(false);\n jLabel7.setVisible(false);\n jLabel8.setVisible(false);\n jButton2.setVisible(false);\n jLabel9.setVisible(false);\n \n jComboBox2.removeAllItems();\n jComboBox4.removeAllItems();\n jComboBox1.removeAllItems();\n jComboBox3.removeAllItems();\n \n jComboBox2.addItem(\"Engineering\");\n jComboBox2.setSelectedItem(\"Engineering\");\n jComboBox2.addItem(\"MCA\");\n \n jComboBox1.addItem(\"Mechanical\");\n jComboBox1.setSelectedItem(\"Mechanical\");\n jComboBox1.addItem(\"Computer\");\n //jComboBox1.addItem(\"Computer\");\n\n jComboBox3.addItem(\"FE\");\n jComboBox3.setSelectedItem(\"FE\");\n jComboBox3.addItem(\"SE\");\n jComboBox3.addItem(\"TE\");\n jComboBox3.addItem(\"BE\");\n \n jComboBox4.addItem(\"A\");\n jComboBox4.setSelectedItem(\"A\");\n jComboBox4.addItem(\"B\");\n }", "public void init() {\n\t\tframe = new JFrame(\"Find the Capital City\");\n\t\tcountryLabel = new JLabel(\"Country:\");\n\t\tcapitalLabel = new JLabel(\"Capital City:\");\n\t\tcountryBox = new JComboBox<>(CountryUtil.COUNTRY_LIST);\n\t\tcapitalBox = new JTextField();\n\t\t\n\t\tcountryBox.addActionListener(new MyActionListener());\n\t\tcapitalBox.setEditable(false);\n\t\tcountryLabel.setHorizontalAlignment(JLabel.CENTER);\n\t\tcapitalLabel.setHorizontalAlignment(JLabel.CENTER);\n\t\t\n\t\tframe.setLayout(new GridLayout(2, 2));\n\t\tframe.add(countryLabel);\n\t\tframe.add(countryBox);\n\t\tframe.add(capitalLabel);\n\t\tframe.add(capitalBox);\n\t\t\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setSize(350, 100);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setVisible(true);\n\t}", "public void setComboBoxPertemuan() {\n if (listPertemuanCount == null) {\n framePresensi.getPertemuanComboBox().setModel(new DefaultComboBoxModel());\n } else {\n framePresensi.getPertemuanComboBox().setModel(new ComboboxPertemuan().getPertemuan(listPertemuanCount));\n }\n }", "public CreateAttendance() {\n initComponents();\n this.setLocationRelativeTo(null);\n jComboBox1.setSelectedItem(null);\n jComboBox2.setSelectedItem(null);\n getContentPane().setBackground(Color.LIGHT_GRAY);\n }", "@FXML\n\tpublic void initialize() {\n\t\t\n\t\tcbCores.getItems().add(\"Azul\");\n\t\tcbCores.getItems().add(\"Vermelho\");\n\t\tcbCores.getItems().add(\"Verde\");\n\t\t\n\t\tcbCores1.getItems().add(\"Azul\");\n\t\tcbCores1.getItems().add(\"Vermelho\");\n\t\tcbCores1.getItems().add(\"Verde\");\n\t\t\n\t\t//cbCores.setItems(FXCollections.observableArrayList(cbCores));\n\t}" ]
[ "0.8285389", "0.8276003", "0.81677395", "0.80511504", "0.79940766", "0.7863848", "0.77549857", "0.7671729", "0.7493763", "0.74187714", "0.7388828", "0.73492336", "0.73348415", "0.7289962", "0.7278249", "0.71716195", "0.71514654", "0.7146467", "0.7081788", "0.7081153", "0.70680976", "0.70651555", "0.7020435", "0.6985463", "0.6982094", "0.6973612", "0.6971723", "0.6970511", "0.69681966", "0.69653064", "0.6954364", "0.69371974", "0.69235325", "0.6903646", "0.6902452", "0.68948644", "0.68749124", "0.68748957", "0.68650556", "0.68611044", "0.686108", "0.6856611", "0.6847584", "0.6846891", "0.68398446", "0.68379635", "0.68353784", "0.6821455", "0.68195564", "0.6817391", "0.6817097", "0.6812983", "0.67994565", "0.67954475", "0.6789907", "0.67484504", "0.674535", "0.674157", "0.6731", "0.67298514", "0.6729657", "0.671821", "0.67140156", "0.6712274", "0.6707343", "0.67019886", "0.6701157", "0.66989833", "0.6694906", "0.6686559", "0.6683243", "0.6678263", "0.6656602", "0.66515374", "0.6642449", "0.662942", "0.66211796", "0.661056", "0.66044325", "0.6604412", "0.65982044", "0.6597616", "0.65906745", "0.6588756", "0.6586371", "0.6585649", "0.6583889", "0.6574234", "0.65731543", "0.65693665", "0.65670055", "0.65559405", "0.6553864", "0.654974", "0.6549588", "0.6542312", "0.6540448", "0.6537307", "0.6536903", "0.65270007", "0.6519389" ]
0.0
-1
Linked List Constructor; done for you
public LinkedList() { this.head = null; this.tail = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public linkedList() { // constructs an initially empty list\r\n\r\n }", "public LinkedLists() {\n }", "public MyLinkedList() \n\t{\n\t\t\n\t}", "public MySinglyLinkedList() { }", "public MyLinkedList()\n {\n head = new Node(null, null, tail);\n tail = new Node(null, head, null);\n }", "public LinkedList() {\n\t\tthis(\"list\");\n\t}", "public MyLinkedList() {\n first = null;\n n = 0;\n }", "public CircularlyLinkedList() { }", "public LinkedList(){\n this.size = 0;\n first = null;\n last = null;\n }", "public MyLinkedList() {\n this.size = 0;\n this.head = new ListNode(0);\n }", "public LinkedList() {\n\t\titems = lastNode = new DblListnode<E>(null);\n\t\tnumItems=0;\n\t}", "public LinkedList(){\n this.head = null;\n this.numNodes = 0;\n }", "public LinkedList () {\n\t\tMemoryBlock dummy;\n\t\tdummy = new MemoryBlock(0,0);\n\t\ttail = new Node(dummy);\n\t\tdummy = new MemoryBlock(0,0);\n\t\thead = new Node(dummy);\n\t\ttail.next = head;\n\t\thead.previous = tail;\n\t\tsize = 2;\n\t}", "public LinkedList() {\n head = null;\n numElement = 0;\n }", "public LinkedList(Object item) {\n\t\tif (item != null) {\n\t\t\tcurrent = end = start = new ListItem(item);// item is the start and end\n\t\t}\n\t}", "public LinkedListDemo() {\r\n }", "public SLList()\n {\n head = tail = null;\n }", "public MyLinkedList() {\n size = 0;\n head = null;\n tail = null;\n }", "public LinkedListDemo() {\n\t\tlength = 0;\n\t\thead = new ListNode();\n\t\n\t}", "public MyLinkedList() {\n dummyHead = new Node();\n size = 0;\n }", "public SkipListNode() {\n\t// construct a dummy node\n\tdata = null;\n\tnext = new ArrayList<SkipListNode<K>>();\n\tnext.add(null);\n }", "public LinkedList(){\n count = 0;\n front = rear = null;\n }", "public LinkedList(){\n\t\thead = null;\n\t\ttail = null;\n\t}", "public LinkedList() {\r\n front = new ListNode(null);\r\n back = new ListNode(null, front, null);\r\n front.next = back;\r\n size = 0;\r\n }", "public LinkList(String data){\n this.head = new Node(data, null);\n this.tail = this.head;\n }", "public MyLinkedList() {\n length = 0;\n }", "public MyLinkedList() {\n \thead = null;\n \ttail = null;\n }", "public DLList() {\n head = null;\n tail = null;\n }", "DListNode() {\n item[0] = 0;\n item[1] = 0;\n item[2] = 0;\n prev = null;\n next = null;\n }", "public LinkedList () {\n\t\thead = null;\n\t\tcount = 0;\n\t}", "public LinkedList() {\n\t\tfirst = null;\n\t}", "public LinkedList()\r\n {\r\n front = null;\r\n rear = null;\r\n numElements = 0;\r\n }", "public LinkedList(String listName) {\n\t\tname = listName;\n\t\tfirstNode = lastNode = null;\n\t\tsize=0;\n\t}", "public DoublyLinkedList() {\r\n\t\tinitializeDataFields();\r\n\t}", "public LinkedList()\n\t{\n\t\tthis.head = new Node(null);\n\t\tsize = 0;\n\t}", "public LinkedList()\n { \n first = null;\n \n }", "public SinglyLinkedList(){\n this.first = null;\n }", "public GenLinkedList() {\r\n\t\thead = curr = prev = null;\r\n\t}", "public CS228LinkedList() {\r\n\t\thead = new Node();\r\n\t\ttail = new Node();\r\n\t\thead.next = tail;\r\n\t\ttail.prev = head;\r\n\r\n\t\t// TODO - any other initialization you need\r\n\t}", "public LinkedList()\n {\n head = null;\n tail = null;\n }", "public LinkedList() \n\t{\n\t\thead = null;\n\t\ttail = head;\n\t}", "public LinkedList() {\n\t\thead = new Node(null, null);\n\t\tsize = 0;\n\t\titerator = null;\n\t}", "public LinkedList()\r\n {\r\n head = null;\r\n tail = null;\r\n }", "public LinkedList()\n\t{\n\t\thead = null;\n\t}", "public LinkList() {\n this.head = null;\n this.tail = null;\n }", "public Linked_list() {\n pre = new Node();\n post = new Node();\n pre.next = post;\n post.prev = pre;\n }", "public SinglyLinkedList()\n {\n first = null; \n last = null;\n }", "public CustomSinglyLinkedList()\n {\n head = null;\n tail = head;\n size = 0;\n }", "public SLL() {\n\t\tsuper();\n\t\tthis.head = null;\n\t\tthis.size = 0;\n\t}", "public LinkedList() {\n size = 0;\n head = new DoublyLinkedNode<E>(null);\n tail = new DoublyLinkedNode<E>(null);\n\n head.setNext(tail);\n tail.setPrevious(head);\n }", "public ListNode(Object d) {\n\t\tdata = d;\n\t\tnext = null;\n\t}", "public LL() {\n head = null;\n }", "public ListNode() {\n\t\tthis(0, null);\n\t}", "public SingleLinkedList() {\r\n start = null;\r\n System.out.println(\"A List Object was created\");\r\n }", "public LinkedList() {\n\t\thead = null;\n\t\tsize = 0;\n\t}", "public LinkedList(){\n size=0;\n }", "public DLListIterator() {\r\n node = head;\r\n nextCalled = false;\r\n }", "public StringLinkedList() {\n super();\n }", "LinkedList(E data){\n\n }", "public List(E value) {\n\t\thead = new ListNode(value, null);\n\t}", "public SinglyLinkedList() {\n this.len = 0;\n }", "public Lista()\n {\n empty=true;\n next = null;\n }", "public ListNode(E data, ListNode next) {\r\n\t\t\t//this.data = data;\r\n\t\t\tthis(data);\r\n\t\t\tthis.next = next;\r\n\t\t}", "public WordLinkedList() {\r\n\r\n head = new Node(null, null);\r\n listSize = 0;\r\n //constructor for a dummy node with nothing in the linked list\r\n\r\n }", "public CLinkedList() {\n \tthis.sentinel = new Node();\n \tthis.sentinel.succ = sentinel;\n \tthis.sentinel.pred = sentinel;\n \tthis.size = 0;\n }", "public Node(int data, Node next, char a) {\n // Call the other constructor in the list\n this(data);\n this.next = next;\n }", "public WCLinkedList(){\n size=0;\n head = null;\n tail = null;\n }", "DListNode2(Object vertex1) {\r\n vertex = vertex1;\r\n list = null;\r\n prev = null;\r\n next = null;\r\n }", "public DoubleLinked() {\n first = null;\n last = null;\n N = 0;\n }", "public ObjectListNode() {\n info = null;\n next = null;\n }", "public DoublyLinkedList(){\r\n\r\n\t\thead = null;\r\n\t\ttail = null;\r\n\t\tcount = 0;\r\n\t}", "public SinglyLinkedList() {\n this.head = null; \n }", "public SingleLinkedList()\n {\n head = null;\n tail = null;\n size=0;\n }", "Node(Object newItem){\n item = newItem; //--points to a different\n next = null;\n }", "public LinkedList() {\n\t\thead = null;\n\t\ttail = null;\n\t\tsize = 0;\n\t}", "public DoubleLinkedSeq()\r\n {\r\n manyNodes = 0; \r\n head = null;\r\n tail = null;\r\n cursor = null;\r\n precursor = null; // Implemented by student.\r\n }", "public ListNode(int mark)\r\n {\r\n // initialise instance variables\r\n this.mark = mark;\r\n this.next = null;\r\n }", "public ObjectListNode (Object o) {\n info = o;\n next = null;\n }", "public LinkedList(E data, Node<E> next) {\n size++;\n prev = null;\n head = new Node(data, next);\n cursor = head;\n tail = head;\n }", "public ListNode(E d, ListNode<E> node)\n { \n nextNode = node;\n data = d;\n }", "public ListNode(Object newItem){\n\t\tlistItem = newItem;\n\t\tnext = null;\n\t}", "public MyLinkedList() {\r\n // when the linked list is created head will refer to null\r\n head = null;\r\n }", "public ListNode(Object d, ListNode n) {\n\t\tdata = d;\n\t\tnext = n;\n\t}", "public DoubleLinkedList()\n {\n \tfirst=last=null;\n }", "public DesignLinkedList() {\n head = null;\n tail = head;\n len = 0;\n }", "public LinkedListSum() {}", "public ListNode(E d)\n {\n nextNode = null;\n data = d;\n }", "public Stack()\n {\n ll = new LinkedList<>();\n }", "public DoubleLinkedList() {\r\n header.next = header.previous = header;\r\n//INSTRUMENTATION BEGIN\r\n //initializates instrumentation fields for concrete objects\r\n _initialSize = this.size;\r\n _minSize = 0;\r\n//INSTRUMENTATION END\r\n }", "public ObjectListNode (Object o, ObjectListNode p) {\n info = o;\n next = p;\n }", "public DLList() {\r\n init();\r\n }", "public MyListIterator()\n {\n forward = true;\n canRemove = false;\n left = head;\n right = head.next;\n idx = 0;\n }", "LinkedEntry() {\n super(null, null, 0, null);\n nxt = prv = this;\n }", "public ListReferenceBased() {\r\n\t numItems = 0; // declares numItems is 0\r\n\t head = null; // declares head is null\r\n }", "Node()\r\n { // constructor for head Node \r\n prev = this;\r\n next = this;\r\n trafficEntry = new TrafficEntry();\r\n }", "public InputLinkedList() \n\t{\n\t\thead = null;\n\t}", "public List() {\n\t\tthis.head = null; \n\t}", "public LinkedListInt() {\nhead = null;\nsize = 0;\n}", "public LinkedListStructureofaSinglyLinkedListClass() {\n\t\theadNode=null;\n\t\tsize=0;\n\t\t\n\t}", "SkipList()\r\n {\r\n head = new Node<T>(1); //Create a new head of our skip list and give it height 1.\r\n }" ]
[ "0.81333965", "0.79533184", "0.7943607", "0.78014743", "0.77623665", "0.7725752", "0.7724612", "0.76936316", "0.7663708", "0.76490325", "0.762956", "0.7613618", "0.75954556", "0.7504373", "0.74998736", "0.7496551", "0.74932706", "0.7483972", "0.7483655", "0.74606", "0.7445159", "0.74223894", "0.7422004", "0.7421715", "0.74203575", "0.7399897", "0.73940146", "0.738894", "0.7388434", "0.738809", "0.7364089", "0.7331489", "0.73285824", "0.7325376", "0.73211294", "0.7316192", "0.73143697", "0.7309331", "0.7306745", "0.7295619", "0.72942233", "0.7280597", "0.72773427", "0.7272776", "0.7264759", "0.7262583", "0.7260271", "0.7256846", "0.72495794", "0.7230201", "0.72243124", "0.7206691", "0.72063965", "0.71975446", "0.7196172", "0.7176929", "0.71546185", "0.7154597", "0.71450794", "0.7135201", "0.713467", "0.71334326", "0.7122763", "0.7122271", "0.7121765", "0.711273", "0.7100435", "0.7094754", "0.7090151", "0.70859677", "0.70795846", "0.70743537", "0.7072493", "0.7071049", "0.7062903", "0.70558095", "0.70377153", "0.7022704", "0.7019934", "0.70150816", "0.70147794", "0.70110863", "0.7011054", "0.6994302", "0.6979208", "0.6979139", "0.69774246", "0.6976611", "0.6964674", "0.69646686", "0.6963157", "0.6962498", "0.6949567", "0.6942574", "0.6939696", "0.6923569", "0.69189155", "0.69002515", "0.68981344", "0.6891998" ]
0.7172579
56
Adds the String to the front of the linked list.
public void addAtFront(String str) { newNode = new Node(str); next = newNode.getNext(); head = newNode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void pushFront(String value)\n {\n\tStringListNode node = new StringListNode(value);\n\tnode.next = head;\n\tif (null == head) {\t// the list was empty\n\t tail = node;\n\t}\n\telse {\n\t head.prev = node;\n\t}\n\thead = node;\n }", "private void addFront(String x)\n {\n head = new Node(x, head);\n if (tail == null)\n tail = head;\n\n size++;\n }", "public void addFirst(String val)\n {\n ListNode newNode = new ListNode();\n newNode.setData(val);\n newNode.setNext(head);\n head = newNode;\n if (tail == null)\n {\n tail = head;\n }\n size++;\n }", "public void addFirst(String data) {\n Node temp = new Node(data);\n if (n == 0) {\n first = temp;\n } else {\n Node oldFirst = first;\n first = temp;\n first.next = oldFirst;\n }\n n++;\n\n }", "public void addToStart(String value) {\n ListElement current = new ListElement(value);\n if (count == 0) {\n head = current;\n tail = current;\n } else {\n current.connectNext(head);\n head = current;\n }\n count++;\n }", "public void insertAtBeginning(String data)\n\t{ \n\t\t\n\t\tNode node=new Node();\n\t\tnode.data = data;\n\t\tnode.next = null;\n\t\t\n\t\tnode.next = head;\n\t\t\n\t\thead =node;\n\t}", "public void addFirst(String element) {\n\t\tslist.addFirst(element);\n\t}", "public void addFrontNode(T a) {\r\n head = new ListNode(a, head);\r\n }", "@Override\n public void prepend(T elem) {\n if(isEmpty()) { //if list is empty\n first = new DLNode(elem, null, null);//new element created, there's nothing before and after it yet\n last = first;\n }\n else{ //list in not empty\n \n first = new DLNode(elem, null, first); //new element goes to the front, there nothing before it, the old first element is after it\n \n first.next.prev = first; //ensure that reference to our first element is pointing to the new first element\n }\n \n }", "public void add(String text){\n\t\thead = add(text, head ,0);\n\t}", "public void enqueue(String s)\n {\n if(first == true)\n {\n head.data = s;\n head.next = new Node(null, null);\n tail = head.next;\n first = false;\n }\n else\n {\n tail.data = s;\n tail.next = new Node(null, null);\n tail = tail.next;\n }\n }", "public void addFirst(Object e) {\n if(head == null) {\n tail = head = new Node(e, null, null);\n return;\n }\n\n Node n = new Node(e, null, head);\n head.setPrevious(n);\n head = n;\n }", "public void addToFront(T element){\n LinearNode<T> node = new LinearNode<T>(element);\n node.setNext(front);\n front = node;\n // modify rear when adding to an empty list\n if (isEmpty()){\n rear = node;\n }\n count++;\n }", "public void addToFront(T elem) {\n\t\tNode newNode = new Node();\n\t\tnewNode.value = elem;\n\t\tnewNode.next = first;\n\t\tfirst = newNode;\t\n\t}", "@Override\n public void addToFront(T data){\n Node<T> temp = new Node<>();\n\n temp.setData(data);\n temp.setNext(head.getNext());\n\n head.setNext(temp);\n }", "public void addCharAtFront(char c) {\n\t\t\n\t\tDoubleNode f = new DoubleNode(null, c, null);\n\t\tf.setC(c);\n\t\tif(head==null&&tail==null){\n\t head=f;\n\t tail=f;\n\t\t}\n\t\telse{\n\t\t\thead.setPrev(f);\n\t\t\tf.setNext(head);\n\t\t\thead=f;\n\t\t}\n\t}", "public void addFront(E d) {\n\t\t// make new node to contain d\n\t\tListNode<E> node = new ListNode<E>(d);\n\t\tif (this.head == null) {\n\t\t\t// the list is empty so make the head point at the node\n\t\t\tthis.head = node;\n\t\t\tthis.last = node;\n\t\t} else {\n\t\t\t// the list it not empty, so the old head's next points at the node\n\t\t\t// the head points at the node\n\t\t\tnode.next = this.head;\n\t\t\tthis.head = node;\n\t\t}\n\t\tthis.size++;\n\t}", "private void addToFront(ListNode node) {\n\t // new node inserted into the linked list\n\t node.prev = head;\n\t node.next = head.next;\n\n\t \n\t head.next.prev = node;\n\t head.next = node;\n\t }", "public void insertBefore(String value, StringListIterator position)\n {\n\tStringListNode node = new StringListNode(value, position.node.prev, position.node);\n\tposition.node.prev = node;\n\tif (head == position.node) {\n\t head = node;\n\t}\n\telse {\n\t node.prev.next = node;\n\t}\n }", "public void addFirst(E e) { // adds element e to the front of the list\n // TODO\n if (size == 0) {\n tail = new Node<>(e, null);\n tail.setNext(tail);\n } else {\n Node<E> newest = new Node<>(e, tail.getNext());\n tail.setNext(newest);\n }\n size++;\n }", "public void addToFront(T value) {\n\t\tstart = new Node<T>(value, start);\n\t}", "@Override\n\tpublic void addAtBeginning(String data) {\n\t}", "void prepend(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (front == null) \n\t\t{\n\t\t\tfront = back = temp; // if the list is empty the node will be the first node in the list making it the front and back node\n\t\t\tlength++;\n index = 0; //added because i failed the test scripts because i wasn't managing the indicies\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfront.prev=temp; //the temp node is inserted before the front\n\t\t\ttemp.next=front; //the node after temp will be the front because temp was inserted before the front\n\t\t\tfront = temp; //the front is now the temp node\n\t\t\tlength++;\n index++;//added because i failed the test scripts because i wasn't managing the indicies\n\t\t}\n\t}", "public void add(String str) {\n\t\tlistStr.add(str);\n\t\t//cast the array list to a linked list\n\t\tLinkedList<Object> linkedString = new LinkedList<Object>(listStr);\n\t\t//while there is something in the LinkedList, run following code\n \twhile (linkedString.size() > 0) {\n \t//print out the current first in \"queue\" word\n \tSystem.out.print(linkedString.get(0) + \" \");\n //remove the first item in the linked list\n \t \tlinkedString.removeFirst();\n \t}\n \t//print out a new blank line for better readability\n \tSystem.out.println(\"\\n\");\n\t}", "private void addToFront(Node node) {\n \n if(head == null) {\n head = node;\n tail = node;\n } \n else {\n node.next = head;\n head.prev = node;\n head = node;\n }\n }", "public void bringToFront(int index) {\n\t\tif (index<this.size()){\n\t\t\tNode front = this.head;\n\t\t\tNode oneBack = new Node(\"\");\n\t\t\tfor (int counter=0; counter < index; counter++){\n\t\t\t\toneBack = front;\n\t\t\t\tfront = front.next;\n\t\t\t}\n\t\t\toneBack.next=front.next;\n\t\t\tfront.next = head;\n\t\t\thead = front;\n\t\t}\n\t}", "void pushFront(T value) throws ListException;", "public void insertAtHead(String s)\n {\n Node temp = new Node(s);\n boolean isDuplicate = false;\n \n if(head == null)\n {\n head = temp;\n temp.next = head;\n }\n else\n {\n Node current = head;\n \n while(current.next != head && isDuplicate == false)\n {\n if(current.data.equals(s))\n {\n isDuplicate = true;\n }\n current = current.next;\n }\n \n if(isDuplicate == false)\n {\n temp.next = head;\n current.next = temp;\n head = temp;\n }\n }\n }", "public void add(String data) {\n Node temp = new Node(data);\n if (n == 0) {\n first = temp;\n } else {\n Node x = first;\n while(x.next != null) {\n x = x.next;\n }\n x.next = temp;\n }\n n++;\n }", "@Override\r\n public void addFront(T b) {\r\n head = head.addFront(b);\r\n }", "private void prepend(T t) {\n Node<T> n = new Node<T>();\n n.data = t;\n n.next = head;\n head = n;\n }", "@Override\n public void insertFirst(E e) {\n if (listHead == null) {\n listHead = new Node(e);\n listTail = listHead;\n }\n\n // In the general case, we simply add a new node at the start\n // of the list via the head pointer.\n else {\n listHead = new Node(e, listHead);\n }\n }", "public void addFront(E item) {\r\n\t\tNode<E> node = new Node<E>(item, first);\r\n\t\tif(isEmpty())\r\n\t\t\tfirst = last = node;//it would be the first node so it would be first and last\r\n\t\telse {\r\n\t\t\tfirst = node;//creates a new node and puts it in the 1st position\r\n\t\t}\r\n\t}", "@Test\n\tpublic void addNodeAtFront() {\n\t\tSystem.out.println(\"Adding a node at the front of the list\");\n\t\tdll.push(3);\n\t\tdll.push(2);\n\t\tdll.push(1);\n\t\tdll.print();\n\t}", "public void addToFront(T data) {\n if (data == null) {\n throw new IllegalArgumentException(\"You can't insert null \"\n + \"data in the structure.\");\n }\n if (size == 0) {\n head = new DoublyLinkedListNode<T>(data);\n tail = head;\n size += 1;\n } else {\n DoublyLinkedListNode<T> newnode =\n new DoublyLinkedListNode<T>(data);\n newnode.setNext(head);\n head.setPrevious(newnode);\n head = newnode;\n size += 1;\n }\n }", "public void addFront (E val) {\n\t\tNode <E> n = new Node(val, head);\n\t\thead = n;\n\t\tcount ++;\n\t}", "public void queueAtFront(String newData) {\r\n\t\tNode newNode = new Node(newData); //New node with inputed value\r\n\t\tNode currentHead = head; //Copied head node to be used when reassigning head's next node\r\n\t\t\r\n\t\tnewNode.prev = tail;\r\n\t\tnewNode.index = head.index + 1;\r\n\t\thead = newNode; //New node becomes the head\r\n\t\thead.next = currentHead; //Head's next node becomes previous head\r\n\t\tsize++;\r\n\t\tprintQueue();\r\n\t}", "public void addFirst(T item) {\n\t\tNode nn = new Node();\n\t\tnn.data = item;\n\t\tnn.next = null;\n\n\t\t// linking\n\t\tnn.next = head;\n\t\thead = nn;\n\n\t}", "private void addToFront(ListNode node) {\n node.prev = head;\n node.next = head.next;\n \n //wire the head next prev to node and the connect head to node\n head.next.prev = node;\n head.next = node;\n }", "public void addAtStart(Node node) {\n if(this.head == null) {\n add(node);\n return;\n };\n\n node.next = this.head;\n this.head = node;\n this.length++;\n }", "public void addFirst(E item){\r\n\r\n //checking the precondition\r\n\tif(item == null){\r\n\t\tthrow new IllegalArgumentException(\" item cannot equal null \");\r\n\t}\r\n\t\r\n\t//creating a new front of the list\r\n\tDoubleListNode<E> firstNode = new DoubleListNode<E>(end.getPrev(), item, null);\r\n\t\r\n\t//setting the front of the list to the head\r\n\tfirstNode.setNext(head);\r\n\t\r\n\t//setting the head to new first node\r\n\thead = firstNode;\r\n\t\r\n\t//setting the headData\r\n\theadData = head.getData();\r\n\t\r\n\r\n\r\n }", "public void insertAtFront(T data) {\n \t\n \t//create a new node\n Node<T> aNode = new Node<>(data);\n \n //if list is empty we assign a new node as First and Last node;\n if (isEmpty()) { \t\n firstNode = lastNode = aNode;\n } \n //if list is not empty we use setNext method of Node class to link this new node with first\n //other words: firtNode is not first anymore, first node is just new made\n //and AFTER this we say that first node is new node we just made\n else { \n aNode.setNext(firstNode);\n firstNode = aNode;\n }\n }", "public void add(String value) {\n\t\tif (head == null)\n\t\t\thead = new Node(value);\n\t\telse if (head.value.compareTo(value) > 0) {\n\t\t\thead = new Node(value, head);\n\t\t} else if (head.value.compareTo(value) == 0) {\n\t\t\treturn;\n\t\t} else\n\t\t\trecAdd(head, value);\n\t}", "@Override\n public void add(T elem) {\n if(isEmpty()) { //if list is empty\n prepend(elem);//we can reuse prepend() method to add to the front of list\n }\n else {\n \n last.next = new DLNode(elem, last, null); //new element follows the last one, the previous node is the old last one\n last = last.next; //the last node now is the one that follows the old last one\n }\n \n }", "void insertBefore(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertBefore() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertBefore() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == front) \n\t\t{\n\t\t\tprepend(data); //if the cursor is at the front of the list, you can just call prepend since you will be inserting the element before the front element \n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.prev = cursor.prev; //the new node temp's previous becomes the cursors previous\t\n temp.next = cursor; //the new node temp's next becomes the cursor\n cursor.prev.next = temp; //cursor's previous next element becomes temp\n cursor.prev = temp; //cursor's previous becomes temp\n length++;\n index++;\n\t\t}\n\t}", "public void addFirst(E e) {\n this.head = new Node<>(e, head);\t// create and link a new node\r\n if (this.size == 0)\r\n this.tail = this.head;\r\n this.size ++;\r\n }", "public StringListIterator first()\n {\n\treturn new StringListIterator(head);\n }", "public void addFirst(Object value)\n {\n if(last == null && first == null)\n {\n ListNode temp = new ListNode(value, null);\n last = temp;\n first = temp;\n }\n else\n {\n first = new ListNode(value, first);\n }\n \n }", "public void addFirst(Object data) {\n Node newNode = new Node(data);\n newNode.next = head;\n head = newNode;\n size ++;\n if (head.next == null) {\n tail = head;\n }\n }", "public void addAtStart(Item item) { \t\n \tif(head.item == null) {\n \t\thead.item = item;\n\t \t\tif(isEmpty()) {\n\t \t\thead.next = tail;\n\t \t\ttail.next = head;\n\t \t\t} \t\t\n \t} else {\n \t\tNode oldHead;\n \t\toldHead = head;\n \t\thead = new Node();\n \t\thead.item = item;\n \t\thead.next = oldHead;\n \t\ttail.next = head;\n \t}\n \tsize++;\n }", "public void add(String str) {\r\n list.add(str);\r\n }", "public void pushBack(String value)\n {\n\tStringListNode node = new StringListNode(value);\n\tif (null == tail) {\t// the list was empty\n\t head = node;\n\t tail = node;\n\t return;\n\t}\n\ttail.next = node;\n\tnode.prev = tail;\n\ttail = node;\n }", "@Override\n public void prepend(T element){\n if(isEmpty()){\n add(element);\n } else{\n this.first = new DLLNode<T>(element, null, this.first);\n this.first.successor.previous = this.first;\n }\n }", "public void addFront(int data) //O(1)\n\t{\n\t\tSinglyLinkedListNode node = new SinglyLinkedListNode();\n\t\tnode.setData(data);\n\t\tif(head == null)\n\t\t{\n\t\t\t head = node;\n\t\t\t node.setNext(null);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnode.setNext(head);\n\t\t\thead = node;\n\t\t}\n\t}", "private void addFirst (E item)\n {\n Node<E> temp = new Node<E>(item); // create a new node\n // and link to the first node\n head = temp;\n size++;\n }", "public void addAtStart(T value) {\n Node<T> newNode = new Node<>();\n newNode.data = value;\n newNode.next = head;\n head = newNode;\n }", "public void insertFront(Node newNode) {\n\t\tif(size == 0) {\n\t\t\thead = newNode;\n\t\t\ttail = newNode;\n\t\t} else {\n\t\t\thead.prev = newNode;\n\t\t\tnewNode.prev = null;\n\t\t\tnewNode.next = head;\n\t\t\thead = newNode;\n\t\t}\n\n\t\tsize++;\n\t}", "public void addFirst(Object element)\n {\n Node newNode = new Node();\n newNode.data = element;\n newNode.next = first;\n first = newNode; \n \n }", "@Override\n\tpublic void prepend(Object data) {\n\t\tNode newNode = new Node(data);\n\t\tnewNode.setNext(this.head);\n\t\thead = newNode;\n\t\tsize++;\n\n\t}", "public void addFirst(Item item) {\n Node oldFirst = first;\n first = new Node(null, item, oldFirst);\n if (oldFirst == null)\n last = first;\n else\n oldFirst.prev = first;\n size++;\n }", "public void addFirst(E item) {\n Node<E> n = new Node<>(item, head);\n size++;\n if(head == null) {\n // The list was empty\n head = tail = n;\n } else {\n head = n;\n }\n }", "public void addFirst(T item) {\n\tif ( _size == 0 ) {\n\t _front = _end = new DLLNode<T>(item, null, null);\n\n\t}\n\telse{\n\t DLLNode<T> temp = new DLLNode<T>(item, _front, null);\n\t _front.setNext(temp);\n\t _front = temp;\n\t}\n\t_size++;\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n Node node = new Node();\n node.item = item;\n node.next = first;\n if (first == null) {\n first = node;\n last = first;\n }\n else {\n first.pre = node;\n first = node;\n }\n len++;\n }", "public void insertAtFrontOfList(T item){\n //if (contains(item) == false){\n MyDoubleNode<T> temp = new MyDoubleNode();\n if (isEmpty()){\n temp.data = item;\n head.next = temp;\n temp.prev = head;\n tail.prev = temp;\n temp.next = tail;\n }\n else {\n temp.data = item;\n temp.next = head.next;\n temp.prev = head;\n head.next = temp;\n }\n //}\n }", "public void addFirst(Item item){\n this.doublyLinkedList.addFirst(item);\n }", "public void addFirst(T element)\r\n {\r\n Node<T> newNode = new Node<T>(element);\r\n \r\n if (front == null)\r\n front = rear = newNode;\r\n else\r\n {\r\n newNode.next = front;\r\n front = newNode;\r\n }\r\n numElements++;\r\n }", "public void addAtStart(T data) {\n Node<T> newNode = new Node<T>();\n newNode.data = data;\n\n newNode.next = head;\n head = newNode;\n size++;\n }", "public void addFirst(Item item) {\n if (item != null) {\n if (size == 0) { // initiation for the first adding\n first = new Node();\n last = new Node();\n first.item = item;\n first.front = null;\n first.back = null;\n last = first;\n } else { // normal front adding\n Node oldfirst = first;\n first = new Node();\n first.front = null;\n first.item = item;\n first.back = oldfirst;\n oldfirst.front = first;\n }\n size++;\n } else throw new IllegalArgumentException(\"?\");\n }", "public void addFirst(T element) {\r\n \r\n if (element == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n \r\n Node n = new Node(element);\r\n \r\n if (size() == 0) {\r\n \r\n front = n;\r\n last = n;\r\n }\r\n \r\n else {\r\n n.next = front;\r\n front = n;\r\n }\r\n \r\n size++; \r\n }", "public void addfirst(Item item)\r\n {\r\n Node first = pre.next;\r\n Node x = new Node();\r\n x.item = item;\r\n x.prev = pre;\r\n x.next = first;\r\n pre.next = x;\r\n first.prev = x;\r\n n++;\r\n }", "@Override\n\tpublic Position<E> addFirst(E e) {\n\t\treturn addBetween(head, head.next, e);\n\t}", "public void insertFirst(int data) { // insert at front of list\n\t\tNode newNode = new Node(data); // creation of new node.\n\t\tif (first == null) // means LinkedList is empty.\n\t\t\tlast = newNode; // newNode <--- last\n\t\telse\n\t\t\tfirst.previous = newNode; // newNode <-- old first\n\t\tnewNode.next = first; // newNode --> old first\n\t\tfirst = newNode; // first --> newNode\n\t}", "public void insertAtTail(String s)\n {\n Node temp = new Node(s);\n \n if(head == null)\n {\n head = temp;\n temp.next = head;\n }\n else\n {\n Node current = head;\n \n while(current.next != head)\n {\n current = current.next;\n }\n \n current.next = temp;\n temp.next = head;\n }\n }", "public void insertFirst( T data )\n\t{\n\t\t//make a new node to insert it\n\t\tLinkedListNode<T> newNode = new LinkedListNode<T>();\n\t\t//add data to the node\n\t\tnewNode.setData(data);\n\t\t//link up the new node by\n\t\t//have the new node point to the old current node\n\t\tnewNode.setNext(head);\n\t\t//set the new node as the head\n\t\thead = newNode;\t\n\t\t//increment the size of the list\n\t\tlistSize++;\n\t}", "public void addFirst(Comparable o){\n\t\t head=new ListElement(o,head);\n\t }", "@Override\n public void addBefore(E element) {\n Node<E> newNodeList = new Node<>(element, cursor);\n\n if (prev == null) {\n head = newNodeList;\n cursor = newNodeList;\n } else {\n prev.setNext(newNodeList);\n cursor = newNodeList;\n }\n\n size++;\n }", "private void prependNode(Node prependNode) {\n\t\tNode currentNode = head;\n\t\tif(currentNode==null) {\n\t\t\thead = prependNode;\n\t\t} else {\n\t\t\tprependNode.next = currentNode;\n\t\t\thead = prependNode;\n\t\t}\n\t}", "public void addFirst(E e) {\n\r\n Node newNode = new Node(e,head);\r\n head = newNode;\r\n\r\n if(head.getNext() == null){\r\n tail = head;\r\n }\r\n\r\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n Node<Item> node = new Node<Item>(item);\n if (head == null) {\n head = node;\n tail = head;\n } else {\n head.prev = node;\n node.next = head;\n head = node;\n }\n\n size++;\n }", "public void addFirst(Object item){\n MovieNode first = new MovieNode(item);\t//Step 1: Create the MovieNode\n first.next = head.next;\t\t\t//Step 2: Copy the next of head to the next of MovieNode\n head.next = first;\t\t\t\t//Step 3: Update the head next value to point to the new MovieNode\n size++;\t\t\t\t\t\t\t//Step 4: Update the number of nodes in the list\n }", "public void prepend(Item item) {\n Node newNode = new Node();\n newNode.item = item;\n newNode.next = head.next;\n head.next = newNode;\n size++;\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new NullPointerException(\"Element cannot be null.\");\n }\n Node node = new Node(item);\n node.next = head.next;\n node.prev = head;\n head.next.prev = node;\n head.next = node;\n size++;\n }", "public void addFirst(E element){\n Node<E> newNode = new Node<E>(element);\n newNode.setNext(head.getNext());\n head.setNext(newNode);\n newNode.getNext().setPrevious(newNode);\n newNode.setPrevious(head); \n size++;\n }", "public void addBefore(Node node){\n node.next = head;\n head = node;\n count.incrementAndGet();\n }", "public void insertAtFront(T insertItem) {\n\t\tNode<T> node = new Node<T>(insertItem);\n\t\t\n\t\tif (isEmpty()) // firstNode and lastNode refer to same object\n\t\t\tfirstNode = lastNode = node;\n\t\telse { // firstNode refers to new node\n\t\t\tnode.nextNode = firstNode;\n\t\t\tfirstNode = node;\n\t\t\t// you can replace the two previous lines with this line: firstNode\n\t\t\t// = new ListNode( insertItem, firstNode );\n\t\t}\n\t\tsize++;\n\t}", "protected void addToHead(T val)\n\t{\n\t\tListElement<T> newElm = new ListElement<T>(val, head);\n\t\t\n\t\tif(head != null)\n\t\t\thead.setPrev(newElm);\n\t\telse\n\t\t\t//If list was empty befor addition\n\t\t\ttail = newElm;\n\t\t\t\n\t\thead = newElm;\n\t}", "public void addAtStart(T v) {\n if (this.head == null) {\n add(v);\n return;\n };\n\n Node node = new Node(v, this.head);\n this.head = node;\n this.length++;\n }", "void addFirst(Key k) {\n\t\tfirstNode = new Node(k, getFirstNode()); // creates new node, pointing to the previous first node and sets it to firstNode\n\t\tif(size++==0) lastNode = firstNode;\n\t}", "public PersistentLinkedList<T> addFirst(T data) {\n return add(0, data);\n }", "public void addFirst(Item item) {\n Node newNode = new Node();\n newNode.data = item;\n // if the DList was already empty:\n if(isEmpty()) {\n // set the next pointer of newNode to last\n newNode.next=last;\n last.prev = newNode;\n newNode.prev=first;\n first.next = newNode;\n }\n // no need to touch the last sentinel node, unless the list was already empty:\n else {\n // copy the old actual node that frist sentinel was point to\n Node oldFirst = first.next;\n first.next = newNode;\n newNode.next = oldFirst;\n newNode.prev=first;\n oldFirst.prev = newNode;\n }\n // update size\n size++;\n }", "public void setFirst(StringNode first) {\n this.first = first;\n }", "public void addFirst(Item item) {\n if (item == null) throw new NullPointerException(\"Item is null\");\n if (isEmpty()) {\n first = new Node<Item>(item);\n last = first;\n } else {\n Node<Item> newFirst = new Node<Item>(item);\n newFirst.next = first;\n first.prev = newFirst;\n first = newFirst;\n }\n size++;\n }", "public void add(String newData) {\n\t\t// DO NOT CHANGE THIS METHOD\n\t\tNode node = new Node(newData);\n\t\tnode.next = head;\n\t\thead = node;\n\t\tnumElements++;\n\t}", "public void addFirst(Item item) {\n if (item == null)\n throw new IllegalArgumentException();\n \n final Node<Item> f = first;\n final Node<Item> newNode = new Node<>(null, item, f);\n first = newNode;\n if (f == null)\n last = newNode;\n else\n f.prev = newNode;\n size++;\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n\n this.first = new Node(item, this.first, null);\n\n if (this.size == 0) {\n this.last = this.first;\n } else {\n this.first.next.prev = this.first;\n }\n\n this.size++;\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException(\"Item must not be null.\");\n }\n\n Node<Item> oldFirst = first;\n first = new Node<>();\n first.item = item;\n first.next = oldFirst;\n if (oldFirst == null) {\n last = first;\n } else {\n oldFirst.previous = first;\n }\n size++;\n assert check();\n }", "public void addAtStart(int item) {\n\t\tCLL_LinkNode new_node = new CLL_LinkNode(item);\n\t\tif (this.length == 0) {\n\t\t\tthis.headNode = new_node;\n\t\t\tthis.headNode.setNext(this.headNode);\n\t\t} else {\n\t\t\tCLL_LinkNode temp_node = this.headNode;\n\t\t\twhile (temp_node.getNext() != this.headNode)\n\t\t\t\ttemp_node = temp_node.getNext();\n\t\t\ttemp_node.setNext(new_node);\n\t\t\tnew_node.setNext(headNode);\n\t\t\tthis.headNode = new_node;\n\t\t}\n\t\tthis.length++;\n\t}", "private void addAsFirst(LinkedList<T>.Node<T> elementZero) {\n\t\telementZero.setPriorNode(itsFirstNode.getPriorNode());\n\t\telementZero.setNextNode(itsFirstNode);\n\t\titsFirstNode.setPriorNode(elementZero);\n\t\titsFirstNode = elementZero;\n\t}", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException(\"Can not call addFirst() with a null argument\");\n }\n Node<Item> oldFirst = first;\n first = new Node<Item>();\n first.item = item;\n first.next = oldFirst;\n if (isEmpty()) {\n last = first;\n }\n else {\n // first.prev = oldFirst;\n oldFirst.prev = first;\n }\n n++;\n }", "public void prepend(final T data) {\n Node<T> newNode = new Node<>(data);\n if (head != null) {\n newNode.setNext(head);\n }\n head = newNode;\n numElement++;\n }" ]
[ "0.7769937", "0.74076176", "0.6784414", "0.6750231", "0.6658527", "0.66033924", "0.65776736", "0.6573853", "0.6556703", "0.65424347", "0.65214413", "0.6512984", "0.6505978", "0.6466021", "0.646085", "0.6428147", "0.6426474", "0.6406809", "0.63845354", "0.63611436", "0.6323537", "0.6323149", "0.6313114", "0.6306917", "0.63056713", "0.63037217", "0.6282675", "0.6274373", "0.6250742", "0.6241507", "0.6236992", "0.6222471", "0.62170655", "0.61875325", "0.6186163", "0.61782444", "0.61560476", "0.61556524", "0.6147905", "0.613183", "0.6125113", "0.6121394", "0.61109173", "0.6100748", "0.60923094", "0.6091531", "0.60894173", "0.60794216", "0.60773367", "0.6076393", "0.6072351", "0.6071493", "0.60684705", "0.6063325", "0.6054073", "0.60517144", "0.6037911", "0.6037145", "0.6035172", "0.6030867", "0.6021291", "0.60152805", "0.6014521", "0.6009153", "0.600577", "0.5981671", "0.5963799", "0.5961361", "0.5960561", "0.59510434", "0.59393054", "0.59299225", "0.5924078", "0.5922513", "0.5903189", "0.5900696", "0.58890015", "0.58840597", "0.5883944", "0.58777565", "0.5869366", "0.58677715", "0.5865239", "0.5864497", "0.58609086", "0.58607286", "0.585886", "0.58564734", "0.5855005", "0.585316", "0.58504367", "0.5849077", "0.5840827", "0.58336306", "0.5825584", "0.5813568", "0.5805043", "0.5804588", "0.5802242", "0.57970864" ]
0.79428595
0
Adds the String to the end of the linked list.
public void addAtEnd(String str) { newNode = new Node(str); newNode = tail; tail = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addLast(String data){\n tail = new Node(data, null, tail);\n Node second = tail.prev;\n if(second!=null)\n second.next = tail;\n else\n head = tail;\n size++;\n }", "public void addToEnd(String value) {\n ListElement current = new ListElement(value);\n if (count == 0) {\n head = current;\n } else {\n tail.connectNext(current);\n }\n tail = current;\n count++;\n }", "public void addLast(String s){\r\n\t\tNode lastnode = new Node(s);\r\n\t\tNode temp = head;\r\n\t\tif(head == null){\r\n\t\t\taddFirst(s);\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\twhile(temp.next != null){\r\n\t\t\t\ttemp = temp.next;\r\n\t\t\t}\r\n\t\t\ttemp.next = lastnode;\r\n\t\t\ttemp = temp.next;\r\n\t\t}\r\n\t}", "private void addEnd(String x)\n {\n if (tail == null)\n {\n tail = new Node(x, null);\n head = tail;\n }\n else\n {\n tail.next = new Node(x, null);\n tail = tail.next;\n }\n size++;\n }", "public void addLast(String val)\n {\n if (head != null)\n { \n ListNode newNode = new ListNode();\n newNode.setData(val);\n newNode.setNext(null);\n tail.setNext(newNode);\n tail = newNode;\n size++;\n }\n else\n {\n addFirst(val);\n }\n }", "public void add(String str) {\r\n list.add(str);\r\n }", "public void add(String str) {\n\t\tlistStr.add(str);\n\t\t//cast the array list to a linked list\n\t\tLinkedList<Object> linkedString = new LinkedList<Object>(listStr);\n\t\t//while there is something in the LinkedList, run following code\n \twhile (linkedString.size() > 0) {\n \t//print out the current first in \"queue\" word\n \tSystem.out.print(linkedString.get(0) + \" \");\n //remove the first item in the linked list\n \t \tlinkedString.removeFirst();\n \t}\n \t//print out a new blank line for better readability\n \tSystem.out.println(\"\\n\");\n\t}", "public void add(String newData) {\n\t\t// DO NOT CHANGE THIS METHOD\n\t\tNode node = new Node(newData);\n\t\tnode.next = head;\n\t\thead = node;\n\t\tnumElements++;\n\t}", "public void add(String text){\n\t\thead = add(text, head ,0);\n\t}", "void append(String new_data) {\n // 1. allocate node \n // 2. put in the data \n Node new_node = new Node(new_data);\n\n Node last = head;\n // used in step 5\n\n // 3. This new node is going to be the last node, so\n // make next of it as NULL\n new_node.next = null;\n\n // 4. If the Linked List is empty, then make the new\n // node as head \n if (head == null) {\n new_node.prev = null;\n head = new_node;\n return;\n }\n\n // 5. Else traverse till the last node \n while (last.next != null) {\n last = last.next;\n }\n\n // 6. Change the next of last node \n last.next = new_node;\n\n // 7. Make last node as previous of new node \n new_node.prev = last;\n }", "public void add(String new_word) {\n LinkedList i = this;\n\n while (i.next != null) {\n i = i.next;\n }\n i.next = new LinkedList(new_word);\n }", "private void add(String thestring) {\n\t\t\n\t}", "public boolean add(String s)\n\t{\n\t\t// adds a new string to the list and returns true if there is a change: O(n).\n\t\tif (head == null)\n\t\t{\n\t\t\thead = new node(s,null);\n\t\t\thead.setNext(tail);\n\t\t\ttail = head;\t\n\t\t\treturn true;\t\n\t\t\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\tnode temp = new node(s,null);\n\t\t\ttail.setNext(temp);\n\t\t\ttail = tail.getNext();\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t}", "public void add(String data) {\n Node temp = new Node(data);\n if (n == 0) {\n first = temp;\n } else {\n Node x = first;\n while(x.next != null) {\n x = x.next;\n }\n x.next = temp;\n }\n n++;\n }", "public void add(String str);", "public void add(String str);", "public void add(String element){\n\t\tif(!contains(element)){\n\t\t\tlist.addLast(element);\n\t\t}\n\t}", "public void validAdd(String element){\n\t\tlist.addLast(element);\n\t}", "public void add(final String string) throws IOException {\n\n\t\t// first store position of string in pointers file...\n\n\t\t// the first four bytes store the maximum position in this file!\n\t\tfinal long posInFile = 4 + this.max*8;\n\n\t\tStringArray.storeLongInPage(this.pointersFilename, posInFile, this.lastString);\n\n\t\t// update max also in pointers file...\n\n\t\tthis.max++;\n\n\t\tStringArray.storeIntInPage(this.pointersFilename, 0, this.max);\n\n\t\t// now store the string...\n\t\tthis.lastString = StringArray.storeStringInPage(this.stringsFilename, this.lastString, string);\n\n\t\t// and update the position into which the last string is stored!\n\n\t\tStringArray.storeLongInPage(this.stringsFilename, 0, this.lastString);\n\t}", "public void addLast(E e) { // adds element e to the end of the list\n // TODO\n addFirst(e);\n tail = tail.getNext();\n }", "public void insertAtEnd(String v) {\n\t\tif(length==0) insertAtBegin(v);\n\t\telse {ElementDPtr e= new ElementDPtr(v,tail.getPrev(),tail);\n\t\t System.out.println(v + \" tail \" + tail.getPrev().getValue());\n\t\t if (tail.getPrev().getValue().equals(\"\")) e.setPrev(head);\n\t\t \n\t\t e.getPrev().setNext(e);\n\t\t System.out.println(v + \" it \" + length);\n\t\t tail.setPrev(e); \n\t\t length += 1; }\n\t\tSystem.out.println(tail.getPrev().getValue() + \" insertE \" + length);\n\t}", "public void add(String text) {\n list.add(text);\n }", "public void addLast(String item) {\r\n\t\tNode next = header;\r\n\t\twhile (next.next != null) {\r\n\t\t\tnext = next.next;\r\n\t\t}\r\n\t\tNode n = new Node();\r\n\t\tn.value = item;\r\n\t\tnext.next = n;\r\n\t\tn.previous = next;\r\n\r\n\t}", "public void add(StringData stringData) {\n this.webUserList.add(stringData);\n }", "@Test\n\tpublic void addNodeAtEnd() {\n\t\tSystem.out.println(\"Adding a node at the End of the list\");\n\t\tdll.append(1);\n\t\tdll.append(2);\n\t\tdll.append(3);\n\t\tdll.print();\n\t}", "private void addAfter(Node n, String data)\n {\n Node next = n.next;\n n.next = new Node(data, next);\n size++;\n }", "public abstract void append(String s);", "public void addLast(Object e) {\n if(head == null) {\n addFirst(e);\n return;\n }\n\n Node n = new Node(e, tail, null);\n tail.setNext(n);\n tail = n;\n }", "@Override\n\tpublic IDnaStrand append(String dna) {\n\t\tNode newNode = new Node(dna);\n \n if (myFirst == null) {\n myFirst = newNode;\n myLast = newNode;\n newNode.next = null;\n }\n else {\n \tmyLast.next= newNode;\n \tmyLast = newNode;\n }\n \n\t\t\n\t\n\t\tmySize += dna.length();\n\t\tmyAppends += 1;\n\t\t\n\t\treturn this;\n\t}", "public void setNextPieceString(final String theString) {\n this.myNextPiece.setNextPieceString(theString);\n }", "public void insertAtTail(String s)\n {\n Node temp = new Node(s);\n \n if(head == null)\n {\n head = temp;\n temp.next = head;\n }\n else\n {\n Node current = head;\n \n while(current.next != head)\n {\n current = current.next;\n }\n \n current.next = temp;\n temp.next = head;\n }\n }", "public void pushBack(String value)\n {\n\tStringListNode node = new StringListNode(value);\n\tif (null == tail) {\t// the list was empty\n\t head = node;\n\t tail = node;\n\t return;\n\t}\n\ttail.next = node;\n\tnode.prev = tail;\n\ttail = node;\n }", "public void addLast(Object data) {\n Node newNode = new Node(data);\n if(isEmpty()) {\n addFirst(data);\n } else {\n tail.next = newNode;\n tail = newNode;\n size ++;\n }\n }", "public void addANodeToEnd(E addData)\n\n\t{\n\t\tNode position = head;\n\t\t// when the link is null, stop the loop and add a node \n\t\twhile (position.link != null) {\n\t\t\t// get next node\n\t\t\tposition = position.link;\n\t\t}\n\t\t// add a new node to the end\n\t\tposition.link = new Node(addData, null);\n\n\t}", "public void addLast(T e) {\n if (_size == 0) {\n _end = new DLLNode<T>(e, null, null);// Same thing as in addFront()\n _front = _end;\n }\n else {\n _end.setNext(new DLLNode<T>(e, _end, null));// add something after the last thing and make that the new end\n _end = _end.getNext();\n }\n _size++;\n }", "public void addLast(Item item) {\n this.doublyLinkedList.addLast(item);\n\n }", "public void append(Object element)\n {\n if(head==tail){\n head=tail=new SLListNode(element,null);\n return;\n }\n tail=tail.next=new SLListNode(element,null);\n }", "public void add(String element) {\n\t\tslist.add(element);\n\t}", "StringCursor addString(String string) throws RemoteException;", "public void insertAfter(String value, StringListIterator position)\n {\n\tStringListNode node = new StringListNode(value, position.node, position.node.next);\n\tposition.node.next = node;\n\tif (tail == position.node) {\n\t tail = node;\n\t}\n\telse {\n\t node.next.prev = node;\n\t}\n }", "public void addCharAtEnd(char c){\n\t\t\n\t\tDoubleNode e = new DoubleNode(null, c, null);\n\t\te.setC(c);\n\t\tif(tail==null&&head==null){\n\t\ttail=e;\n\t\thead=e;\n\t\t}\t\n\t\telse{\n\t\ttail.setNext(e);\n\t\te.setPrev(tail);;\n\t\ttail=e;\n\t\t\tif(head==null){\n\t\t\t\thead=tail.getPrev();\n\t\t\t}\n\t\t}\t\n\t}", "public void add(int num, String str) {\r\n\t\tNode temp = new Node();\r\n\t\ttemp.num = num;\r\n\t\ttemp.str = str;\r\n\t\ttemp.next = null;\r\n\t\t\r\n\t\t//Adding for empty linked list\r\n\t\tif (head == null) {\r\n\t\t\thead = temp;\r\n\t\t\tthis.length = 1;\r\n\t\t}\r\n\t\t\r\n\t\t//Adding for non-empty linked list\r\n\t\telse {\r\n\t\t\tNode curr = new Node();\r\n\t\t\tcurr = head;\r\n\t\t\twhile (curr.next != null) {\r\n\t\t\t\tcurr = curr.next;\r\n\t\t\t}\r\n\t\t\tcurr.next = temp;\r\n\t\t\tthis.length++;\r\n\t\t}\r\n\t}", "private void _add(final String value) {\n appended();\n\n buffer.encode(value);\n }", "void append(String str) {\n ta.append(str);\n\n }", "public void add(String value) {\n add(value, false);\n }", "@Override\n public void addToEnd(T data){\n Node<T> dataNode = new Node<>();\n\n dataNode.setData(data);\n dataNode.setNext(null);\n\n Node<T> tempHead = this.head;\n while(tempHead.getNext() != null) {\n tempHead = tempHead.getNext();\n }\n\n tempHead.setNext(dataNode);\n }", "@Override\n\tpublic Position<E> addLast(E e) {\n\t\treturn addBetween(tail.prev, tail, e);\n\t}", "protected void setLastItem(String s)\n {\n lastItem = s;\n }", "ILoLoString append(ILoString that);", "public void addLastNode(E e){\r\n ListNode n = new ListNode(e, null);\r\n if(head == null) head = n;\r\n else {\r\n ListNode c = head;\r\n while(c.getLink() != null){\r\n c = c.getLink();\r\n }\r\n c.setLink(n);\r\n }\r\n }", "public final void addLast(Node n) {\n this.tail.set(n);\n this.tail = n;\n this.size++;\n }", "@Override\n public void add(T elem) {\n if(isEmpty()) { //if list is empty\n prepend(elem);//we can reuse prepend() method to add to the front of list\n }\n else {\n \n last.next = new DLNode(elem, last, null); //new element follows the last one, the previous node is the old last one\n last = last.next; //the last node now is the one that follows the old last one\n }\n \n }", "void add(String value);", "public void addLast(E x) {\n\t\t\n\t\tNode p = mTail;\n\t\tp.data = x;\n\n\t\tmTail = new Node(null, null);\n\n\t\tp.next = mTail;\n\n\t\tmSize++;\n\t\tmodCount++;\n\t}", "@Override\n public boolean add(ListNode e) {\n if (this.size() != 0){\n ListNode last = this.getLast();\n last.setNext(e);\n }\n return super.add(e);\n }", "static void add(String s) {\n if (s != null) {\n a.add(s);\n }\n }", "public void append(String textString) {\n\t\tif (cacheSize == (stringCache.length - 1)) {\n\t\t\t// Need to resize the array if we max out the buffer\n\t\t\tresizeCache();\n\t\t}\n\t\tstringCache[cacheSize] = textString;\n\t\tcacheSize++;\n\t\tlength += textString.length();\n\t}", "public void addLast(E item) {\n Node<E> n = new Node<>(item);\n size++;\n if(tail == null) {\n // The list was empty\n head = tail = n;\n } else {\n tail.next = n;\n tail = n;\n }\n }", "public void add(String value) {\n\t\tif (head == null)\n\t\t\thead = new Node(value);\n\t\telse if (head.value.compareTo(value) > 0) {\n\t\t\thead = new Node(value, head);\n\t\t} else if (head.value.compareTo(value) == 0) {\n\t\t\treturn;\n\t\t} else\n\t\t\trecAdd(head, value);\n\t}", "public void append(String str) {\n\t\tta.append(str);\n\t\tta.setCaretPosition(ta.getText().length() - 1);\n\t}", "@Override\n\tpublic void addAtBeginning(String data) {\n\t}", "@Override\n public ListNode<T> append(T e) {\n \treturn new ListNode<T>(e,this);\n }", "public void addLast(E e) {\n\r\n if(head == null){\r\n addFirst(e);\r\n } else {\r\n\r\n Node newNode = new Node(e);\r\n tail.setNext(newNode);\r\n tail = newNode;\r\n\r\n }\r\n\r\n }", "public void addFirst(String val)\n {\n ListNode newNode = new ListNode();\n newNode.setData(val);\n newNode.setNext(head);\n head = newNode;\n if (tail == null)\n {\n tail = head;\n }\n size++;\n }", "public boolean add(String s){\n if(count == contents.length) {\n return false;\n }\n contents[count] = s;\n count++;\n return true;\n }", "public void addLast(E element){\n Node<E> newNode = new Node<E>(element);\n newNode.setNext(tail);\n tail.getPrevious().setNext(newNode);\n newNode.setPrevious(tail.getPrevious());\n tail.setPrevious(newNode);\n size++;\n }", "public Node<E> addToEnd(Node<E> node){\n Node<E> previous = tail.getPrevious();\n\n previous.setNext(node);\n node.setPrevious(previous);\n tail.setPrevious(node);\n node.setNext(tail);\n size++;\n\n return node;\n }", "public void add(String value);", "public void addLast(Item item) {\n if (item == null) {\n throw new NullPointerException(\"Element cannot be null.\");\n }\n Node node = new Node(item);\n node.next = tail;\n node.prev = tail.prev;\n tail.prev.next = node;\n tail.prev = node;\n size++;\n }", "@Override\r\n\tpublic void addLast(E e) {\n\t\t\r\n\t}", "public void add(E data) {\r\n\t\tNode<E> newNode = new Node<E>(data, null);\r\n\t\t/**\r\n\t\t * If the LinkList is empty, add the node next to the headNode, and it become the last element\r\n\t\t */\r\n\t\tif(headNode.link == null) {\r\n\t\t\theadNode.link = newNode;\r\n\t\t\ttailNode = newNode;\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\ttailNode.link = newNode;\r\n\t\t\ttailNode= newNode;\r\n\t\t}\r\n\t\t\r\n\t\tsize++;\r\n\t}", "public ILoString append(String that) {\n return new ConsLoString(this.first, this.rest.append(that)); \n }", "@Override\n public void add(String text) {\n wordsLinkedList.addAll(Arrays.asList(text.split(\"\\\\s\")));\n }", "public StringLinkedList() {\n super();\n }", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n Node<Item> node = new Node<Item>(item);\n if (head == null) {\n head = node;\n tail = node;\n } else {\n tail.next = node;\n node.prev = tail;\n tail = node;\n }\n size++;\n }", "public void add (Object x) {\n\t\tif (this.isEmpty()) {\n\t\t\tmyHead = new ListNode(x);\n\t\t\tmyTail = myHead;\n\t\t\tmySize++;\n\t\t}\n\t\telse {\n\t\t\tmyTail.myNext = new ListNode(x);\n\t\t\tmyTail = myTail.myNext;\n\t\t\tmySize++;\n\t\t}\n\t\t\n\t}", "public void addLast(Item item) {\n if (item == null)\n throw new IllegalArgumentException();\n \n final Node<Item> l = last;\n final Node<Item> newNode = new Node<>(l, item, null);\n last = newNode;\n if (l == null)\n first = newNode;\n else\n l.next = newNode;\n size++;\n }", "public void appendToEnd(T data){\n\t Node end = new Node(data);\n\t Node current = this;\n\t \n\t while(current.next != null){\n\t current = current.next;\n\t }\n\t \n\t current.next = end;\n\t //System.out.println(current.next.data);\n\t }", "public LinkedString concat(LinkedString str)\n {\n int num = this.length();\n for(int i = 0; i < str.length(); i++)\n {\n this.insert(num + i, str.charAt(i));\n }\n \n return this;\n }", "public boolean add(String newValue) {\n if (newValue == null)\n return false;\n if (contains(newValue))\n return false;\n\n\n if ((float)(size() + MINIMAL_CHANGE) / (capacity()) > getUpperLoadFactor()) {\n\n int oldCapacity = capacity();\n capacity *= SIZE_CHANGE;\n LinkedListString[] newLinked = new LinkedListString[capacity()];\n rehash(newLinked, oldCapacity);\n\n linkedListStrings = newLinked;\n\n }\n\n int index = clamp(newValue);\n\n if (linkedListStrings[index] == null){\n linkedListStrings[index] = new LinkedListString();\n }\n\n linkedListStrings[index].add(newValue);\n\n sizeCounter++;\n return true;\n\n }", "public boolean add(String s) {\n\t\tif (s != \"\") return start.get().add(s, 0);\n\t\tAtomicBoolean result = emptyAbsent;\n\t\temptyAbsent.set(false);\n\t\treturn result.get();\n\t}", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n Node node = new Node();\n node.item = item;\n node.pre = last;\n if (last == null) {\n last = node;\n first = last;\n }\n else {\n last.next = node;\n last = node;\n }\n len++;\n }", "public void append(String str) {\r\n\t\ttry {\r\n\t\t\tdoc.insertString(doc.getLength(), str, null);\r\n\t\t} catch (BadLocationException e) {\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\t}", "public void append(E it) {\r\n\t\ttail = tail.setNext(new Link<E>(it, null));\r\n\t\tcnt++;\r\n\t}", "public void addLast(T item) throws Exception {\n\t\tNode nn = new Node();\n\t\tnn.data = item;\n\t\tnn.next = null;\n\n\t\tif (isEmpty()) {\n\n\t\t\t// your ll was already empty and now you are adding an element for the 1st time\n\t\t\t// : spcl case\n\t\t\thead = nn;\n\n\t\t} else {\n\n\t\t\t// linking\n\t\t\tNode last = getNodeAt(size() - 1);\n\t\t\tlast.next = nn;\n\n\t\t}\n\t}", "@Override\n\tpublic void append(String str) {\n\t\ttry {\n\t\t\ttextarea.append(BULLET + str + ENDLINE);\n\t\t} catch(NullPointerException e) {\n\t\t\ttextarea.setText(null);\n\t\t}\n\t}", "@Override\n public void insertLast(E e) {\n if (listHead == null) {\n listHead = new Node(e);\n listTail = listHead;\n }\n\n // In the general case, we simply add a new node to the end\n // of the list via the tail pointer.\n else {\n listTail.next = new Node(e, listTail.next);\n listTail = listTail.next;\n }\n }", "public void addAtEnd(int item) {\n\t\t// pre: a head node is created; length doesn't matter\n\t\t// post: node added in the end; length increased\n\t\tCLL_LinkNode new_node = new CLL_LinkNode(item);\n\t\tif (this.length == 0) {\n\t\t\tthis.headNode = new_node;\n\t\t\tthis.headNode.setNext(this.headNode);\n\t\t} else {\n\t\t\tCLL_LinkNode temp_node = this.headNode;\n\t\t\twhile (temp_node.getNext() != this.headNode)\n\t\t\t\ttemp_node = temp_node.getNext();\n\t\t\ttemp_node.setNext(new_node);\n\t\t\tnew_node.setNext(headNode);\n\t\t}\n\t\tthis.length++;\n\t}", "public void addNode(String item){\n Node newNode = new Node(item,null);\nif(this.head == null){\n this.head = newNode;\n}else{\n Node currNode = this.head;\n while(currNode.getNextNode() != null){\n currNode = currNode.getNextNode();\n }\n currNode.setNextNode(newNode);\n}\nthis.numNodes++;\n }", "public void addLast(T item){\n\tif ( _size == 0 ) {\n\t _front = _end = new DLLNode<T>(item, null, null);\n\n\t}\n\telse{\n\t DLLNode<T> temp = new DLLNode<T>(item, null, _end);\n\t _end.setPrev(temp);\n\t _end = temp;\n\t}\n\t_size++;\n }", "public void appendNodeToEnd(Node n){\n\t Node end = n;\n\t Node current = this;\n\t \n\t while(current.next != null){\n\t current = current.next;\n\t }\n\t \n\t current.next = end;\n\t //System.out.println(current.next.data);\n\t }", "public LinkedList concatenate(LinkedList anotherList) {\n\t\tLinkedList newString = stringList;\n\t\t\n\t\treturn newString;\n\t}", "public void addLast(E e) {\n addBetween(e, trailer.getPrev(), trailer);\n }", "void addNode(String node);", "public boolean add (Object o) {return addLast(o);}", "public void addAtFront(String str) {\n newNode = new Node(str);\n next = newNode.getNext();\n head = newNode;\n }", "public void add(E e){\n Node newNode = new Node(e);\n\n if(tail == null){\n this.head = newNode;\n }\n else {\n tail.next = newNode;\n newNode.prev = tail;\n }\n tail = newNode;\n size++;\n }", "public void addLast(Item item) {\n\t\tif (item == null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tNode<Item> node = new Node<Item>();\n\t\tnode.item = item;\n\t\tif (tail == null) {\n\t\t\thead = node;\n\t\t} else {\n\t\t\ttail.next = node;\n\t\t\tnode.prev = tail;\n\t\t}\n\t\ttail = node;\n\t\tnode.next = null;\n\t\tN++;\n\t}", "public void addText(String newText) {\n lb.setText(newText + \"\\n\" + lb.getText());\n instance.setVvalue(0);\n }", "public void addAtEnd( int d ) {\n\t\tif( head == null ) {\n\t\t\tNode temp = new Node();\n\t\t\ttemp.data = d;\n\n\t\t\thead = tail = temp;\n\n\t\t} else {\n\t\t\tNode temp = new Node();\n\t\t\ttemp.data = d;\n\n\t\t\ttail.next = temp;\n\t\t\ttail = tail.next;\n\t\t}\n\t}" ]
[ "0.7220628", "0.7189761", "0.7158736", "0.70235074", "0.6844065", "0.67456955", "0.66269165", "0.65441513", "0.6537735", "0.65241873", "0.65193665", "0.6487507", "0.63852984", "0.6354193", "0.6353552", "0.6353552", "0.6317358", "0.6311952", "0.63026404", "0.6240542", "0.62403554", "0.6212308", "0.62032497", "0.61876315", "0.618652", "0.6154824", "0.61533046", "0.61428976", "0.6139877", "0.6118401", "0.6090842", "0.60706115", "0.6054205", "0.60434544", "0.60252655", "0.5966931", "0.5954691", "0.59446573", "0.5932944", "0.5917582", "0.5916213", "0.591484", "0.59144074", "0.5894666", "0.58807755", "0.5874162", "0.5866837", "0.586205", "0.5860615", "0.58490825", "0.583879", "0.58383113", "0.5829606", "0.5822349", "0.581714", "0.58138937", "0.58062536", "0.58056897", "0.5803256", "0.58003855", "0.5796636", "0.5792354", "0.5791486", "0.57909113", "0.57875615", "0.578599", "0.57854503", "0.5778359", "0.57677245", "0.57671607", "0.574813", "0.5746928", "0.57416946", "0.5735285", "0.5732325", "0.5725913", "0.57236195", "0.5720242", "0.57153255", "0.57137614", "0.5699047", "0.5695964", "0.5695477", "0.56936145", "0.56845427", "0.56694967", "0.56677514", "0.56647563", "0.5664532", "0.56596994", "0.5654182", "0.5647936", "0.5635927", "0.56242454", "0.56241554", "0.5623679", "0.5618019", "0.56151", "0.5614496", "0.5612324" ]
0.76135695
0
Removes the first occurrence of the given string.
public void remove(String str) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void remove(String str);", "public String removeFirst() {\n\t\treturn removeAt(0);\n\t}", "@Override\n\tpublic void remove(String string) {\n\t\t\n\t}", "public static String remove(String str) {\r\n\t\t//todo\r\n\t\t\r\n\t\treturn str.substring(1,str.length()-1);\r\n\t}", "public void remove(String s) {\n boolean remove = false;\n for (int i = 0; i < size && !remove; i++) {\n if (elements[i] == s) {\n remove = true;\n elements[i] = null;\n }\n }\n }", "ILoString removeFirst(int n);", "public static String remove(String s, String exception) {\n\t\tint i;\n\t\twhile((i = s.indexOf(exception)) > -1)\n\t\t\ts = (i == 0) ? s.substring(i + 1) : s.substring(0, i) + s.substring(i + 1);\n\t\treturn s;\n\t}", "SNode removeStr(String str);", "public static String removeAnything(String s, String remove){\n\t\ts=\"1a2b3c\";\n\t\tremove=\"abc\";\n\t\tString copy=\"\";\n\t\tfor(int i=0; i<s.length(); i++){\n\t\t\tString letter=s.substring(i, i+1);\n\t\t\tif (remove.indexOf(letter) ==1)\n\t\t\t\tcopy=copy+letter;\n\t\t}\n\t\treturn copy;\n\t}", "private static String removeWord(String string, String word) {\n\t\tif (string.contains(word)) {\n\t\t\tstring = string.replaceAll(word, \"\");\n\t\t}\n\n\t\t// Return the resultant string\n\t\treturn string;\n\t}", "void removeString(StringCursor cursor) throws RemoteException;", "public void remove(String s)\n {\n\telems.remove(s);\n }", "public void remove(String string) {\n\t\tlistStr.remove(string);\n\t\t//cast the array list to a linked list\n\t\tLinkedList<Object> linkedString = new LinkedList<Object>(listStr);\n \t//while there is something in the LinkedList, run following code\n \twhile (linkedString.size() > 0) {\n \t//print out the current first in \"queue\" word\n \tSystem.out.print(linkedString.get(0) + \" \");\n //remove the first item in the linked list\n \t \tlinkedString.removeFirst();\n \t}\n \t//print out a new blank line for better readability\n \tSystem.out.println(\"\\n\");\n\t}", "void unsetString();", "public void removeAll(String s) {\n for (int i = 0; i < size; i++) {\n if (elements[i] == s) {\n elements[i] = null;\n }\n }\n }", "Object removeFirst();", "public String eliminateDuplicate(String s) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tchar prev = s.charAt(0);\n\t\tsb.append(String.valueOf(prev));\n\t\tfor (int i = 1; i < s.length(); i++) {\n\t\t\tif (s.charAt(i) != prev) {\n\t\t\t\tprev = s.charAt(i);\n\t\t\t\tsb.append(String.valueOf(prev));\n\t\t\t}\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "public T removeFirst();", "public ILoString removeFirst(int n) {\n return this;\n }", "@Override\r\n\tpublic boolean removeFirstOccurrence(Object o) {\n\t\treturn false;\r\n\t}", "private static String removeHelper(String s, int index) {\r\n \tif (index == 0) {\r\n \t\treturn s;\r\n \t}\r\n \telse {\r\n \t\tchar cur = s.charAt(index);\r\n \t\tchar prev = s.charAt(index - 1);\r\n \t\tString result = s.substring(0, index);\r\n \t\tif (cur == prev) {\r\n \t\t\treturn removeHelper(result, index - 1);\r\n \t\t}\r\n \t\telse {\r\n \t\t\treturn removeHelper(result, index - 1) + cur;\r\n \t\t}\r\n \t}\r\n }", "public void unsetStr()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(STR$0, 0);\r\n }\r\n }", "static String superReducedString(String s) {\n StringBuffer buff = new StringBuffer(s);\n for(int i = buff.length() - 1; i >= 0; i--){\n int j = i + 1;\n if(j >= buff.length()) continue;\n\n if(buff.charAt(i) == buff.charAt(j)) {\n buff.delete(i, j + 1);\n }\n }\n\n if(buff.length() == 0) return \"Empty String\";\n return String.valueOf(buff);\n }", "private String removeFirstChar(String name) {\n\t\treturn name.substring(1, name.length());\n\t}", "public static String delFirstChar(String word){\n\t\tif(word.length() <= 1){\n\t\t\treturn word;\n\t\t}\n\t\tword = word.substring(1, word.length());\n\t\tguessPW(word);\n\t\treturn word;\n\n\t}", "public String removeA(String string) {\n\t\tString result=\"\";\n\t\tint length=string.length();\n\t\tif(length==1)\n\t\t{\n\t\t\tif(string.charAt(0)!='A')\n\t\t\t\tresult=string;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tchar firstchar=string.charAt(0);\n\t\t char secondchar=string.charAt(1);\n\t\t if(string.contains(\"A\") && (firstchar=='A' || secondchar=='A'))\n\t\t\t{\n\t\t\t\tString rest_of_string=string.substring(2, length);\n\t\t\t\tif(firstchar=='A' && secondchar=='A')\n\t\t\t\t{\n\t\t\t\t\tresult=rest_of_string;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tif(firstchar=='A')\n\t\t\t\t\t{\n\t\t\t\t\t\tresult=secondchar+rest_of_string;\n\t\t\t\t\t}\n\t\t\t\t\telse if(secondchar=='A')\n\t\t\t\t\t{\n\t\t\t\t\t\tresult=firstchar+rest_of_string;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tresult=string;\n\t\t}\n\t\treturn result;\n\t}", "public static String remove(String str, String remove) {\r\n if (isEmpty(str) || isEmpty(remove)) {\r\n return str;\r\n }\r\n return replace(str, remove, EMPTY, -1);\r\n }", "public String trimOne(String str) {\n return trim(str, 1);\n }", "SimpleString removePrefix(SimpleString address);", "public String withoutX(String str) {\r\n if (str.length() > 0 && str.charAt(0) == 'x') {\r\n str = str.substring(1);\r\n }\r\n\r\n if (str.length() > 0 && str.charAt(str.length() - 1) == 'x') {\r\n str = str.substring(0, str.length() - 1);\r\n }\r\n return str;\r\n }", "public String withoutEnd(String str) {\r\n return str.length() > 1 ? str.substring(1, str.length() - 1) : \"\";\r\n }", "public String removeDuplicates(String S) {\n if(S==null||S.length()==0){\n return S;\n }\n Deque<Character> stack=new LinkedList<>();\n for(int i=0,length=S.length();i<length;i++){\n if(stack.size()!=0&&(stack.peekFirst()==S.charAt(i))){\n stack.removeFirst();\n }\n else{\n stack.addFirst(S.charAt(i));\n }\n }\n StringBuilder builder=new StringBuilder();\n while(stack.size()!=0){\n builder.insert(0,stack.removeFirst());\n }\n return builder.toString();\n }", "public boolean remove(String str) \n {\n \treturn (remove(root, str, 0));\n }", "public E removeFirst();", "static String super_reduced_string(String s) {\n if (s.equals(\"\")) return \"Empty String\";\n\n StringBuffer buffer = new StringBuffer(s);\n for (int i = 1; i < buffer.length(); i++) {\n if (buffer.charAt(i) == buffer.charAt(i - 1)) {\n // Delete both if they are the same\n buffer.delete(i - 1, i + 1);\n i = 0;\n }\n\n if (buffer.length() == 0) {\n return \"Empty String\";\n }\n }\n\n return buffer.toString();\n }", "public final synchronized void mo27315b(String str) {\n String concat = String.valueOf(str).concat(\"|T|\");\n SharedPreferences.Editor edit = this.f10287a.edit();\n for (String next : this.f10287a.getAll().keySet()) {\n if (next.startsWith(concat)) {\n edit.remove(next);\n }\n }\n edit.commit();\n }", "public void remove(String arg0) {\n\t\t\n\t}", "private void remove(String paramString) {\n }", "private String removeCall(String string, Call call)\n {\n String[] lines = string.split(\"\\n\");\n String newString = \"\";\n for(String line : lines)\n {\n if(!line.contains(call.callString))\n {\n newString = newString + line + \"\\n\";\n }\n }\n return newString;\n }", "public static String removeMatchingString(final String original, final String toRemove) {\n if (null == original || original.isEmpty() || null == toRemove || toRemove.isEmpty()) {\n return original;\n }\n\n int matchIndex = original.indexOf(toRemove, 0);\n if (matchIndex == -1) {\n return original;\n }\n\n StringBuilder buffer = new StringBuilder(original.length() - toRemove.length());\n int currIndex = 0;\n do {\n buffer.append(original.substring(currIndex, matchIndex));\n currIndex = matchIndex + toRemove.length();\n matchIndex = original.indexOf(toRemove, currIndex);\n } while (matchIndex != -1);\n\n buffer.append(original.substring(currIndex));\n return buffer.toString();\n }", "@Override\n\tpublic T remover(String obj) {\n\t\treturn null;\n\t}", "public void mo16917b(String str) {\n try {\n this.f9119b.edit().remove(str).apply();\n } catch (Throwable unused) {\n }\n }", "public static String afterFirst(final String s, final char c)\n\t{\n\t\tif (s == null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tfinal int index = s.indexOf(c);\n\n\t\tif (index == -1)\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\n\t\treturn s.substring(index + 1);\n\t}", "public String removeStringIterator(String oldS, Character ch) {\n\t\tif (oldS == null) {\n\t\t\treturn oldS;\n\t\t}\n\n StringBuilder sb = new StringBuilder();\n char[] oldArray = oldS.toCharArray();\n for(int i = 0; i < oldArray.length; i++){\n if(oldArray[i] == ch.charValue()){\n\n } else {\n sb.append(oldArray[i]);\n }\n }\n return sb.toString();\n\t}", "public static String[] remove(String[] strings, String string) {\n int index = indexOf(strings, string);\n if (index < 0)\n return strings;\n else\n return removeAt(strings, index);\n }", "public static String rest(String s) {\n return s.substring(1);\n }", "public final synchronized void mo47209c(String str) {\n String concat = String.valueOf(str).concat(\"|T|\");\n Editor edit = this.f49750a.edit();\n for (String str2 : this.f49750a.getAll().keySet()) {\n if (str2.startsWith(concat)) {\n edit.remove(str2);\n }\n }\n edit.commit();\n }", "public char FirstAppearingOnce()\n {\n \n for(int i = 0; i < stringstream.size(); i++){\n char ch = stringstream.get(i);\n\t\t\tif(!rep.contains(ch)){\n return ch;\n }\n }\n return '#';\n }", "public static String removeDuplicate(String word) {\n StringBuffer sb = new StringBuffer();\n if(word.length() <= 1) {\n return word;\n }\n char current = word.charAt(0);\n sb.append(current);\n for(int i = 1; i < word.length(); i++) {\n char c = word.charAt(i);\n if(c != current) {\n sb.append(c);\n current = c;\n }\n }\n return sb.toString();\n }", "public String removeQueryString(String string) {\n\t\tString pathWithoutQueryString = string;\n\t\tif (string != null && string.matches(\".*\\\\?.*\")) {\n\t\t\tpathWithoutQueryString = string.split(\"\\\\?\")[0];\n\t\t}\n\t\treturn pathWithoutQueryString;\n\t}", "private static String removeFirstLastQuotations(String string)\n\t{\n\t\tint firstIndex = string.indexOf('\\\"');\n\t\tint lastIndex = string.lastIndexOf('\\\"');\n\t\tif (firstIndex == 0 && lastIndex == string.length() - 1)\n\t\t\treturn string.substring(1, lastIndex);\n\t\t\n\t\treturn string;\n\t}", "public boolean removeString(String string) {\r\n\t\tboolean removed = false;\r\n\t\tif (this.strings != null && string != null && !string.trim().equals(\"\")) {\r\n\t\t\tString stringTrimmedLowercase = string.trim().toLowerCase();\r\n\t\t\tremoved = this.strings.remove(stringTrimmedLowercase);\r\n\t\t}\r\n\t\treturn removed;\r\n\t}", "public static String remove(String str, char remove) {\r\n if (isEmpty(str) || str.indexOf(remove) == -1) {\r\n return str;\r\n }\r\n char[] chars = str.toCharArray();\r\n int pos = 0;\r\n for (int i = 0; i < chars.length; i++) {\r\n if (chars[i] != remove) {\r\n chars[pos++] = chars[i];\r\n }\r\n }\r\n return new String(chars, 0, pos);\r\n }", "public T removeFirst( ){\r\n\t\t//calls remove onfirst\r\n\t\tT toRemove = getFirst();\r\n\t\treturn remove(toRemove);\r\n\t}", "private String deleteLastChar(String s) {\n\t\treturn s.substring(0, s.length() - 1); \n\t}", "public ILoString removeFirst(int n) {\n if (n > 0) {\n return this.rest.removeFirst(n - 1);\n }\n\n else {\n return this;\n }\n }", "public String deFront(String str) {\r\n if (!str.isEmpty()) {\r\n if (str.length() > 1) {\r\n if (str.charAt(0) == 'a' && str.charAt(1) != 'b') {\r\n\r\n return \"a\" + str.substring(2);\r\n } else if (str.charAt(0) != 'a' && str.charAt(1) == 'b') {\r\n\r\n return str.substring(1);\r\n } else if (str.charAt(1) != 'b') {\r\n\r\n return str.substring(2);\r\n }\r\n }\r\n if (str.length() == 1) {\r\n if (str.charAt(0) != 'a') {\r\n\r\n return \"\";\r\n }\r\n }\r\n }\r\n\r\n return str;\r\n }", "public static String removeCharacter(char c, String s) {\n if(s==null) return s;\n StringBuffer ret = new StringBuffer();\n \n for(int i = 0; i < s.length(); ++i) {\n if(s.charAt(i) != c) {\n ret.append(s.charAt(i));\n }\n }\n return ret.toString();\n }", "public void removeWord(String word) throws WordException;", "public String atFirst(String str) {\r\n return str.length() > 1 ? str.substring(0, 2) : (str + \"@@\").substring(0, 2);\r\n }", "public static String delete(String str1,String str2){\n\t\tString newOne=str1.replace(str2, \"\");\n\t\treturn newOne;\n\t}", "public static String rest(String s) {\n\treturn s.substring(1);\n\t}", "public String remove(String key) {\n Node pos = find(key);\n if (pos == null) {\n return null;\n }\n size--;\n\n if (head == pos) {\n head = pos.next;\n }\n pos.remove();\n\n return pos.pairStringString.getValue();\n }", "public static String stripLabel(String s) {\n\t\tint labelEnd = labelEnd(s);\n\t\tif (labelEnd == -1) {\n\t\t\treturn s.trim();\n\t\t} else {\n\t\t\treturn s.substring(labelEnd + 1).trim();\n\t\t}\n\t}", "private String removeExtension(String string) {\n\t\tString pathWithoutExtension = string;\n\t\tint dotIndex = string.lastIndexOf('.');\n\t\tif (dotIndex > 0) {\n\t\t\tpathWithoutExtension = string.substring(0, dotIndex);\n\t\t}\n\t\treturn pathWithoutExtension;\n\t}", "public static String RemoveDublicates(String str) {\n String result = \"\"; //storing result of the loop\n for (int i = 0; i < str.length(); i++) {\n char ch = str.charAt(i);\n if (!result.contains(\"\" + ch)) { // this is char so we need convert comcating to empty string\n result += ch;\n }\n\n }\n return result;\n }", "public void m3539g(String str) {\n try {\n if (this.f2512b.containsKey(str)) {\n this.f2512b.remove(str);\n }\n } catch (Throwable th) {\n }\n }", "private static String removegivenChar(String str,int pos) {\n\t\treturn str.substring(0,pos) + str.substring(pos+1);\r\n\t}", "public static String delete(String str, String subStr, int type) {\n\t\tif(type == 0) {\n\t\t\tfor(int i = 0; i < str.length() - subStr.length(); i++) {\n\t\t\t\tif(str.substring(i, i + subStr.length()).equals(subStr)) {\n\t\t\t\t\treturn str.substring(0, i) + str.substring(i + subStr.length());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if(type == 1) {\n\t\t\t\n\t\t\tfor(int i = 0; i < str.length() - subStr.length() + 1; i++) {\n\t\t\t\tString strNew = str;\n\t\t\t\tif(str.substring(i, i + subStr.length()).equals(subStr)) {\n\t\t\t\t\tfor(int j = 0; j < str.length() - subStr.length(); j++) {\n\t\t\t\t\t\tstrNew = str.substring(0, i) + str.substring(i + subStr.length());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstr = strNew;\n\t\t\t}\n\t\t}\n\t\treturn str;\n\t\t\n\t}", "public static String removeConsecutiveDuplicates(String s) {\n\t\tif (s.length() <= 1)\r\n\t\t\treturn s;\r\n\t\tif (s.substring(1, 2).equals(s.substring(0, 1)))\r\n\t\t\treturn removeConsecutiveDuplicates(s.substring(1));\r\n\t\telse\r\n\t\t\treturn s.substring(0, 1) + removeConsecutiveDuplicates(s.substring(1));\r\n\t}", "public String removeString(String oldS, Character ch) {\n\t\tif (oldS == null) {\n\t\t\treturn oldS;\n\t\t}\n\t\tString removeS = ch.toString();\n\t\tString newS = oldS.replaceAll(removeS,\"\");\n\t\treturn newS;\n\t}", "public char findFirstUniqueCharacter (String string) { // O(n*n)\n for (int i = 0; i < string.length(); i++) {\n char currentChar = string.charAt(i);\n\n if (i == string.lastIndexOf(currentChar)) {\n return currentChar;\n }\n }\n\n return '\\n';\n }", "private static int firstUniqChar1(String s) {\n int[] counts = new int[128];\n for (int i = 0; i < s.length(); i++) {\n int c = s.charAt(i);\n counts[c] = counts[c] + 1;\n }\n\n int uniqueIdx = -1;\n for (int i = 0; i < s.length(); i++) {\n if (counts[(int) s.charAt(i)] == 1) {\n uniqueIdx = i;\n break;\n }\n }\n\n return uniqueIdx;\n }", "public static String cutOut(String mainStr, String subStr){\n if (mainStr.contains(subStr))\n {\n String front = mainStr.substring(0, (mainStr.indexOf(subStr))); //from beginning of mainStr to before subStr\n String back = mainStr.substring((mainStr.indexOf(subStr)+subStr.length())); //the string in mainStr after the subStr\n return front + back;\n }\n else // if subStr isn't in the mainStr it just returns mainStr\n {\n return mainStr;\n }\n }", "String removeLabel(String label);", "public void removeAllCharAfter(int firstRemoved) {\n if (this.mRemovedChars == null) {\n this.mRemovedChars = new BitSet(this.mOriginal.length());\n }\n this.mRemovedChars.set(firstRemoved, this.mOriginal.length());\n }", "public static String removeTagsFromString(String arg) {\n // string has no tags to begin with\n if(arg.indexOf(\"t/\") == -1) { \n return arg;\n }\n \n return arg.substring(0,arg.indexOf(\"t/\")); \n }", "public void clearParser(String str){\r\n\r\n String[] words = str.split(\" \");\r\n String word = words[words.length - 1];\r\n\r\n if(values.get(word) == null) {\r\n word = word.substring(0, word.length() - 1);\r\n setValue(word, 0);\r\n }\r\n else{\r\n values.replace(word,0);\r\n }\r\n\r\n }", "public void remove(Comparable removedString) {\r\n\t\tListNode currentNode = null;\r\n\t\t\r\n\t\twhile (currentNode != null && removed == false) {\r\n\t\t\treturnifInTheFirstNode();\r\n\t\t\treturnIfInTheCurrentNode();\r\n\t\t}\r\n\t\r\n\t}", "public static void removeDuplicates(char [] str)\n{\n\tif(str.length <2) return;\n\tif(str == null) return;\n\tint j, tail=1;\n\tfor(int i=1; i<str.length; i++)\n\t{\n\t\tfor(j=0; j<tail; j++)\n\t\t{\n\t\t\tif(str[i] == str[j])\n\t\t\t\tbreak;\n\t\t}\n\t\tif(j==tail)\n\t\t{\n\t\t\tstr[tail++] = str[i];\n\t\t\t\n\t\t}\n\t}\n\tstr[tail] = '\\0';\t\n}", "void remove(String str) {\n assertEquals(words.contains(str), trie.remove(str));\n words.remove(str);\n dictionary.add(str);\n assertEquals(words.size(), trie.size());\n checkConsistency();\n }", "public static String removeAdjacentDuplicateChars(String s) {\r\n \tif (s.length() == 0) {\r\n \t\treturn \"\";\r\n \t}\r\n \telse {\r\n \t\tint len = s.length();\r\n \t\tString result = removeHelper(s, len - 1);\r\n \t\treturn result;\r\n \t}\r\n }", "@Override\n public Item removeFirst() {\n nextFirst = moveForward(nextFirst, 1);\n Item output = items[nextFirst];\n items[nextFirst] = null;\n size -= 1;\n return output;\n }", "static String trimStart(String s) {\n StringBuilder sb = new StringBuilder(s);\n while(sb.length() > 0 && (sb.charAt(0) == '\\u005cr'\n || sb.charAt(0) == '\\u005cn'\n || sb.charAt(0) == '\\u005ct'\n || sb.charAt(0) == ' ')) {\n sb.deleteCharAt(0);\n }\n return sb.toString();\n }", "public static String cutOut(String str1, String str2)\n {\n if(str1.indexOf(str2) == -1)\n return str1;\n int n = str1.indexOf(str2);\n return str1.substring(0, n) + str1.substring(n + str2.length());\n }", "static String trim(String s) {\n return s.substring(0, s.length() - 1);\n }", "public String removeAt(int index) {\n\t\tif (index == 0) {\n\t\t\tString result = head.value;\n\t\t\thead = head.next;\n\t\t\treturn result;\n\t\t} else\n\t\t\treturn recRemove(head, index).value;\n\t}", "public static void main(String[] args) {\n\n ArrayList<String> strArray = new ArrayList<>();\n strArray.add(\"man\");\n strArray.add(\"hi\");\n strArray.add(\"yo\");\n strArray.add(\"hi\");\n String strToBeRemoved =\"hi\";\n\n removeAll(strArray, strToBeRemoved);\n\n\n }", "public static String stripEnding(final String s, final String ending)\n\t{\n\t\tif (s == null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\t// Stripping a null or empty string from the end returns the\n\t\t// original string.\n\t\tif (ending == null || \"\".equals(ending))\n\t\t{\n\t\t\treturn s;\n\t\t}\n\t\tfinal int endingLength = ending.length();\n\t\tfinal int sLength = s.length();\n\n\t\t// When the length of the ending string is larger\n\t\t// than the original string, the original string is returned.\n\t\tif (endingLength > sLength)\n\t\t{\n\t\t\treturn s;\n\t\t}\n\t\tfinal int index = s.lastIndexOf(ending);\n\t\tfinal int endpos = sLength - endingLength;\n\n\t\tif (index == endpos)\n\t\t{\n\t\t\treturn s.substring(0, endpos);\n\t\t}\n\n\t\treturn s;\n\t}", "public static String strip(final String string) {\n return ChatColor.stripColor(string);\n }", "public String deDup(String input) {\n // Corner Cases\n if (input == null || input.length() <= 1) {\n return input;\n }\n char[] array = input.toCharArray();\n int slow = 1;\n for (int fast = 1; fast < array.length; fast++) {\n if (array[fast] != array[slow - 1]) {\n array[slow++] = array[fast];\n }\n }\n return new String(array, 0, slow);\n }", "public void removePartOfSet(java.lang.String value) {\r\n\t\tBase.remove(this.model, this.getResource(), PARTOFSET, value);\r\n\t}", "public void shingleStrippedString(String s) {\n\t\t\n\t\tString s_stripped = s.replaceAll(\"\\\\s\",\"\");\n//\t\tSystem.out.println(s_stripped);\n\t\tthis.shingleString(s_stripped);\n\t}", "void unsetValueString();", "public static void delete(String s, String d)\r\n\t{\r\n\t\tlong time = 0;\r\n\t\tlong t1 = 0;\r\n\t\tint character;\r\n\t\tBufferedReader br = null;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tbr = new BufferedReader(new FileReader(d));\r\n\t\t} \r\n\t\tcatch (FileNotFoundException e1) \r\n\t\t{\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\tint nc = 0;\r\n\t\ttry \r\n\t\t{\r\n\t\t\twhile ((character = br.read()) != -1) \r\n\t\t\t{\r\n\t\t\t s = s + (char)character; \r\n\t\t\t nc++;\r\n\t\t\t}\r\n\t\t} catch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tlong st1 = System.nanoTime();\r\n\t\twhile(s.length() != 0)\r\n\t\t{\r\n\t\t\ts = s.substring(1, s.length());\r\n\t\t}\r\n\t\tlong et1 = System.nanoTime();\r\n\t\tt1 = et1-st1;\r\n\t\ttime = t1/nc;\r\n\t\tSystem.out.println(\"Average time for deleting with String: \" + time+ \"ns\" + \" for \" + nc + \" operations\");\r\n\t\tSystem.out.println(\"Total time for deleting with String: \" + t1+ \"ns\" + \" for \" + nc + \" operations\");\r\n\t}", "public T remove(String name) {\n\t\tint idx = indexOf(name, 0);\n\t\tif (idx != -1)\n\t\t\treturn remove(idx);\n\t\treturn null;\n\t}", "private Set<String> cleanSet(Set<String> s){\n\t\t\tLog.i(TAG, \"cleanSet(msg)\");\n\n\t\t\tif (s.contains(\"\")) {\n\t\t\t\ts.remove(\"\");\t\n\t\t\t}if (s.contains(\"etc\")) { // Developers prerogative\n\t\t\t\ts.remove(\"etc\");\n\t\t\t}\n\t\t\treturn s;\n\t\t}", "public Object removeFirst() {\r\n Object first = header.next.element;\r\n remove(header.next);\r\n return first;\r\n }", "public Node removeFirst() {\r\n\t\treturn removeNode(0);\r\n\t}", "@Override\r\n\tpublic boolean removeLastOccurrence(Object arg0) {\n\t\treturn false;\r\n\t}" ]
[ "0.69133186", "0.6765094", "0.6654256", "0.6642524", "0.66421634", "0.6538942", "0.6380492", "0.6328488", "0.6314184", "0.6304687", "0.6071102", "0.60691726", "0.60413045", "0.6016312", "0.6003071", "0.5971258", "0.5952691", "0.59458613", "0.592014", "0.58644927", "0.5861943", "0.58505434", "0.58466196", "0.58355397", "0.5822374", "0.5783742", "0.5774016", "0.5760233", "0.5722757", "0.568436", "0.5658778", "0.5656431", "0.56560886", "0.56196743", "0.5607572", "0.5602368", "0.55950457", "0.5573959", "0.55631036", "0.555504", "0.55530685", "0.5531321", "0.55121887", "0.5510285", "0.55055517", "0.55023074", "0.5497632", "0.54813504", "0.5471073", "0.5464209", "0.5464202", "0.5461375", "0.5459939", "0.54525644", "0.54403937", "0.54382163", "0.54373384", "0.54267395", "0.542155", "0.542115", "0.54139125", "0.5376742", "0.53677183", "0.53601784", "0.5348928", "0.5336746", "0.53361064", "0.5331418", "0.53183293", "0.5313562", "0.5307623", "0.52990234", "0.52892023", "0.5285773", "0.5285016", "0.5278065", "0.5273421", "0.5262994", "0.5258988", "0.5254462", "0.5248753", "0.52463186", "0.52462935", "0.5243043", "0.52391464", "0.5238335", "0.5236863", "0.5230219", "0.52295", "0.5222256", "0.5218405", "0.52142894", "0.52046114", "0.5204361", "0.5198957", "0.5187439", "0.51868767", "0.5175888", "0.5175434", "0.517167" ]
0.64619434
6
Retrieves, but does not remove, the head of this Linked List, or returns null if this Linked List is empty.
public String head() { if (isEmpty() == false) { return head.getData(); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T getFirst() {\n\t\t//if the head is not empty\n\t\tif (head!= null) {\n\t\t\t//return the data in the head node of the list\n\t\t\treturn head.getData();\n\t\t}\n\t\t//otherwise return null\n\t\telse { return null; }\n\t}", "public Node<E> getFirst(){\n Node<E> toReturn = head.getNext();\n return toReturn == tail ? null: toReturn;\n }", "public LinkedListNode<T> getFirstNode()\n\t{\n\t\treturn this.head;\n\t}", "public DoublyLinkedListNode<T> getHead() {\n // DO NOT MODIFY!\n return head;\n }", "public LinkedListNode<T> getFirstNode()\n\t{\n\t\treturn head;\n\t}", "public LinkedListNode<T> getFirstNode() {\n\t\t//return the head node of the list\n\t\treturn head;\t\t\n\t}", "public LinkedNode head() {\n return head;\n }", "public T lookupHead(){\n if (head.next == tail && tail.prev == head){\n return null;\n }\n else {\n return head.next.data;\n }\n }", "public synchronized ListNode getHead() {\n\t\treturn head;\n\t}", "public E first() {\n if (this.isEmpty()) return null;\r\n return this.head.getElement();\r\n }", "public E first() { // returns (but does not remove) the first element\n // TODO\n if (isEmpty()) return null;\n return tail.getNext().getElement();\n }", "public Node getHeadNode() {\r\n\t\treturn head;\r\n\t}", "public Node getHead() {\n\t\treturn head;\n\t}", "public Node getHead() {\n\t\treturn head;\n\t}", "public Node getHead() {\n return (Node) get();\n }", "public Node getHead() {\r\n return head;\r\n }", "public synchronized DoubleLinkedListNodeInt getFirst() {\n\t\tif(isEmpty())\n\t\t\treturn null;\n\t\treturn head.getNext();\n\t}", "public Node<T> head()\r\n {\r\n return head; \r\n }", "public E first() {\n\r\n if (head == null) {\r\n return null;\r\n } else {\r\n return head.getItem();\r\n }\r\n\r\n }", "public Node<E> getHead() {\n\t return head;\n\t }", "public Item getFirst() {\n Node removed = head.next;\n head.next = removed.next;\n removed.next = null;\n size--;\n return removed.item;\n }", "public Node<T> getFirst() \r\n {\r\n if (isEmpty()) return sentinel;\r\n return sentinel.next;\r\n }", "public T getHead() {\n return get(0);\n }", "public MyNode getHead()\r\n {\r\n \treturn head;\r\n }", "public NodeD getHead() {\n return head;\n }", "public ListNode getHead()\n {\n return head;\n }", "ElementNode gethead(){\r\n\t\t\treturn this.head;\r\n\t\t}", "@Override\r\n\tpublic T getHead()\r\n\t{\r\n\t\tif (isEmpty()) { throw new EmptyQueueException(); }\r\n\t\treturn head.element;\r\n\t}", "@Override\n public T peekFront() {\n if (isEmpty()) {\n return null;\n }\n return head.peekFront();\n }", "public StackNode getHead() {\n\t\treturn head;\n\t}", "public Node<E> getHead() { return head; }", "private E removeFirst ()\n {\n Node<E> temp = head;\n if (head != null) {\n head = head.next;\n size--;\n return temp.data;\n }\n else\n return null;\n }", "public E getFirst(){\n return head.getNext().getElement();\n }", "public E peekFirst() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\treturn mHead.next.data;\n\t}", "public Object removeFirst() {\n if(head == null) return null;\n if(head.getNext() == null) {\n Object temp = head.getElement();\n head = tail = null;\n return temp;\n }\n\n Object temp = head.getElement();\n Node n = head.getNext();\n n.setPrevious(null);\n head = n;\n\n return temp;\n }", "@Override\n\tpublic Head getHead() {\n\t\treturn head;\n\t}", "public T removeHead()\n\t{\n\t\tif(size == 0)\n\t\t{\n\t\t\tSystem.out.println(\"list is empty\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t//advance head reference\n\t\tT value = head.value;\n\t\thead = head.next;\n\t\t\n\t\tsize--;\n\t\treturn value;\n\t\t\n\t}", "public T getHead() {\n\t\treturn head.value;\n\t}", "public int getHead() {\n return this.head;\n }", "public T deleteFromHead() {\n if (isEmpty()) \n return null;\n T el = head.info;\n if (head == tail) // if only one node on the list;\n head = tail = null;\n else head = head.next;\n return el;\n }", "public T popHead() {\n \n if(head == null) {\n return null;\n }\n \n Node<T> temp = head;\n head = head.getNext();\n return temp.getValue();\n }", "public node getFirst() {\n\t\treturn head;\n\t\t//OR\n\t\t//getAt(0);\n\t}", "public DLLNode<T> getHead(){\n\t\treturn head;\n\t}", "public Atom getHead ()\r\n\t{\r\n\t\treturn _head.get(0);\r\n\t}", "public E pollFirst() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\tE retVal = mHead.next.data;\n\t\tremove(mHead.next);\n\n\t\tmodCount++;\n\t\tmSize--;\n\n\t\treturn retVal;\n\t}", "public E head() {\n E ret = (val == null\n ? null\n : val ); //@ nowarn Cast;\n //@ assume ret != null ==> \\typeof(ret) <: elementType;\n //@ assume !containsNull ==> ret != null;\n return ret;\n }", "public ListNode getFirstNode(){\n\t\treturn firstNode;\n\t}", "public String getHead() {\n return _head;\n }", "protected T removeFromHead()\n\t{\n\t\tif(head == null)\n\t\t\treturn null;\n\t\t\n\t\tT ret = head.getVal();\n\t\thead = head.getNext();\n\t\t\n\t\tif(head == null)\n\t\t\ttail = head;\n\t\telse\n\t\t\thead.setPrev(null);\n\t\t\n\t\treturn ret;\n\t}", "public E first() {\n if(isEmpty()){\n return null;\n }else{\n return header.getNext().getElement();\n }\n }", "public E peek() {\n if(head == null) {\n // The list is empty\n throw new NoSuchElementException();\n } else {\n return head.item;\n }\n }", "public T getMin() {\n\t\tif (heapSize > 0) {\n\t\t\treturn lstEle.get(0);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public final String getHead() {\n \t\treturn head;\n \t}", "public E removeFirst() { // removes and returns the first element\n // TODO\n if (isEmpty( )) return null;\n Node<E> head = tail.getNext();\n if (head == tail) tail = null;\n else tail.setNext(head.getNext( ));\n size--;\n return head.getElement( );\n }", "public synchronized T get(){\n if (list.isEmpty()) return null;\n return list.remove(0);\n }", "@Override\r\n\tpublic Object first(){\r\n\t\tcheck();\r\n\t\treturn head.value;\r\n\t}", "public Object front() {\n ListNode p = this.l.start;\n while(p.next!=null)\n {\n p = p.next;\n }\n\t\treturn (Object) p.item;\n\t}", "public Node getHeadNode();", "public Object removeFirst(){\n //Check if there is data to be removed, if not return null\n if(size == 0){\t//size 0 indicates no data in the linkedlist\n return null;\n }\n MovieNode removed = head.next;\n head.next = head.next.next;\n size--;\n return removed.data;\n }", "Node removeFirst() {\n\t\tNode tmp = head;\n\t\thead = head.next;\n\t\treturn tmp;\n\t}", "public int head () {\n return head;\n }", "public Element first() {\n if(isEmpty()) return null;\n else return header.getNextNode().getContent();\n }", "public T peek() {\n\t\tif (this.l.getHead() != null)\n\t\t\treturn this.l.getHead().getData();\n\t\telse {\n\t\t\tSystem.out.println(\"No element in stack\");\n\t\t\treturn null;\n\t\t}\n\t}", "public Integer getHead(){\n\t\treturn head;\n\t}", "public Node<T> getFirst() {\r\n\t\treturn first;\r\n\t}", "public T deleteHead(){\n if (head.next != tail || tail.prev != head) {\n T data = head.next.data;\n head = head.next;\n return data;\n }\n return null;\n }", "public T getFirst()\n\t{\n\t\treturn head.getData();\n\t}", "@Override\r\n\tpublic T first() {\n\t\treturn head.content;\r\n\t}", "public Node getFirstNode() {\n\t return firstNode;\r\n\t }", "public E top() {\n return !isEmpty() ? head.item : null;\n }", "public String getHead() {\n\t\t\tString vS = \"NONE\";\n\t\t\tif (length != 0) vS = head.getValue();\n\t\treturn vS;\n\t\t}", "public Node getFirst()\n {\n return this.first;\n }", "public static <C> C FIRST(LIST<C> L) {\n if ( isNull( L ) ) {\n return null;\n }\n if ( L.iter != null ) {\n if ( L.iter.hasNext() ) {\n return L.iter.next();\n } else {\n L.iter = null;\n return null;\n }\n }\n return L.list.getFirst();\n }", "public E getHead() {\r\n\t\tif (head == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\treturn indices.get(0).data;\t\r\n\t\t}\r\n\t}", "public E getFirst() {\r\n\t\t// element checks to see if the list is empty\r\n\t\treturn element();\r\n\t}", "public int getFirstElement() {\n\t\tif( head == null) {\n\t\t\tSystem.out.println(\"List is empty\");\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\telse {\n\t\t\treturn head.data;\n\t\t}\n\t}", "private T get() {\n Queue<T> h = head;\n Queue<T> first = h.next;\n h.next = h; // help GC\n\n head = first;\n T x = first.item;\n first.item = null;\n return x;\n }", "public Node getFirst() {\r\n\t\treturn getNode(1);\r\n\t}", "public E first() {\n if (isEmpty()) return null;\n return first.item;\n }", "public Pair GetHead() {\n return snake.get(head);\n }", "public T pollFirst() {\n if (!isEmpty()) {\n T polled = (T) list[startIndex];\n startIndex++;\n if (isEmpty()) {\n startIndex = 0;\n nextindex = 0;\n }\n return polled;\n }\n return null;\n }", "public E peek() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\treturn mHead.next.data;\n\t}", "public T head();", "public E removeFront() {\n\t\tif (count == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tE temp = head.value;\n\t\t\thead = head.next;\n\t\t\tcount--;\n\t\t\treturn temp;\n\t\t}\n\t}", "public T peek()\n {\n\n if (ll.getSize()==0){\n return null;\n }else\n return ll.getData(ll.getSize()-1);\n }", "public Integer freelistHead() {\n\t\treturn freelist;\n\t}", "public T removeFromFront() {\n DoublyLinkedListNode<T> temp = head;\n if (size == 0) {\n throw new NoSuchElementException(\"The list is empty, so there\"\n + \" is nothing to get.\");\n } else {\n if (head == tail) {\n head = tail;\n tail = null;\n return temp.getData();\n } else {\n head = head.getNext();\n head.setPrevious(null);\n size -= 1;\n return temp.getData();\n }\n }\n\n\n }", "public Object getFirst() {\n\t\tcurrent = start;\n\t\treturn start == null ? null : start.item;\n\t}", "public T first() throws EmptyCollectionException{\n if (front == null){\n throw new EmptyCollectionException(\"list\");\n }\n return front.getElement();\n }", "public T removeFirst() {\r\n \r\n if (size == 0) {\r\n return null;\r\n }\r\n \r\n T deleted = front.element;\r\n front = front.next;\r\n size--;\r\n \r\n return deleted;\r\n }", "@Override\n\tpublic Object peek() {\n\t\treturn list.getFirst();\n\t}", "Node firstNode() {\r\n\t\treturn first.next.n;\r\n\t}", "protected T removeBeginning() {\r\n\t\tif (!this.isEmpty()) {\r\n\t\t\tSNode<T> startNode = this.getHead().getPrev();\r\n\t\t\tthis.getHead().setPrev(startNode.getPrev());\r\n\t\t\tsize--;\r\n\t\t\treturn startNode.getValue();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static <T> T getFirst(List<T> list) {\n\t\treturn list != null && !list.isEmpty() ? list.get(0) : null;\n\t}", "@Override\r\n\t\tpublic Node getFirstChild()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public Node<E> getNodeFromCache() {\n if (this.cacheSize == 0) {\n return null;\n }\n Node<E> node = this.firstCachedNode;\n this.firstCachedNode = node.next;\n node.next = null;\n this.cacheSize--;\n return node;\n }", "public E getFirst() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\t\treturn mHead.next.data;\n\t}", "public Node deleteFirst() {\n\n\t\tif (first == null) { // means LinkedList in empty, throw exception.\n\t\t\tthrow new LinkedListEmptyException(\n\t\t\t\t\t\"LinkedList doesn't contain any Nodes.\");\n\t\t}\n\n\t\tNode tempNode = first;\n\t\tif (first.next == null) // if only one item\n\t\t\tlast = null; // null <-- last\n\t\telse\n\t\t\tfirst.next.previous = null; // null <-- old next\n\t\tfirst = first.next; // first --> old next\n\t\treturn tempNode;\n\t}", "public Item removeFirst() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\t\tNode<Item> tmp = head;\n\t\thead = head.next;\n\t\tif (head == null) {\n\t\t\ttail = null;\n\t\t} else {\n\t\t\thead.prev = null;\n\t\t}\n\t\tN--;\n\t\ttmp.next = null;\n\t\treturn tmp.item;\n\t}", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = head.item;\n if (size == 1) {\n tail = null;\n head = null;\n } else {\n Node<Item> nextHead = head.next;\n nextHead.prev = null;\n head = nextHead;\n }\n\n size--;\n return item;\n }" ]
[ "0.7812845", "0.7779323", "0.77451634", "0.7741718", "0.77295417", "0.76990265", "0.75954336", "0.7575094", "0.75496316", "0.75454867", "0.748388", "0.74626887", "0.7456004", "0.7456004", "0.74210525", "0.73544127", "0.73318136", "0.73193014", "0.72840977", "0.7274688", "0.7196815", "0.7195586", "0.71532065", "0.7152691", "0.713101", "0.7107725", "0.7094246", "0.70934695", "0.7074785", "0.7044734", "0.7030221", "0.7024066", "0.69793004", "0.69768673", "0.69640756", "0.6956115", "0.6901092", "0.68939936", "0.6886464", "0.6872769", "0.68588525", "0.68580574", "0.68379337", "0.68372613", "0.6793165", "0.6783617", "0.67770827", "0.6770379", "0.6764424", "0.67309344", "0.67238027", "0.6697384", "0.6693325", "0.668937", "0.6672392", "0.66545784", "0.6641707", "0.6629026", "0.6614503", "0.65914655", "0.65831184", "0.6581708", "0.65792906", "0.65784883", "0.6560587", "0.65172863", "0.6491823", "0.6483193", "0.6456118", "0.6452035", "0.64390504", "0.6437714", "0.642333", "0.6412692", "0.6412512", "0.64085543", "0.64080834", "0.64014405", "0.63971055", "0.63674146", "0.636304", "0.6352973", "0.6350628", "0.63376933", "0.63366187", "0.63288265", "0.6313967", "0.63132685", "0.63082737", "0.6297158", "0.6290758", "0.628114", "0.62679064", "0.62624687", "0.6249672", "0.62454486", "0.6230869", "0.6186491", "0.61755097", "0.61705875" ]
0.7545191
10
Retrieves, but does not remove, the tail of this Linked List, or returns null if this Linked List is empty.
public String tail() { if (isEmpty() == false) { return head.getData(); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DoublyLinkedListNode<T> getTail() {\n // DO NOT MODIFY!\n return tail;\n }", "public LinkedNode tail() {\n return tail;\n }", "public synchronized ListNode getTail() {\n\t\treturn tail;\n\t}", "Node removeLast() {\n\t\tif (isEmpty()) return null;\n\t\t\n\t\t// Is there a better way using tail?\n\t\tNode curr = head;\n\t\twhile (curr.next != null)\n\t\t\tcurr = curr.next;\n\t\treturn curr;\n\t}", "public synchronized ListNode getLast() {\n\t\tif (head == null)\n\t\t\treturn null;\n\t\tif (head.getNext() == null) {\n\t\t\treturn head;\n\t\t}\n\t\tListNode p = head.getNext();\n\t\twhile (p.getNext() != null) {\n\t\t\tp = p.getNext();\n\t\t}\n\t\treturn p;\n\t}", "public node getLast() {\n\t\tif(head == null) {\n\t\t\treturn null;\n\t\t}\n\t\tnode tmp = head;\n\t\twhile(tmp.next !=null) {\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp;\n\n\t\t//OR\n\t\t//getAt(size()-1);\n\t}", "public E last() { // returns (but does not remove) the last element\n // TODO\n\n if ( isEmpty()) return null ;\n return tail.getElement();\n }", "public Node getTail() {\n\t\treturn tail;\n\t}", "public Node getTail() {\n\t\treturn tail;\n\t}", "public E last() {\n if (this.isEmpty()) return null;\r\n return this.tail.getElement();\r\n }", "protected T removeFromTail()\n\t{\n\t\tif(tail == null)\n\t\t\treturn null;\n\t\t\n\t\tT ret = tail.getVal();\n\t\ttail = tail.getPrev();\n\t\t\n\t\tif(tail == null)\n\t\t\thead = tail;\n\t\telse\n\t\t\ttail.setNext(null);\n\t\t\n\t\treturn ret;\n\t}", "protected T removeEnd() {\r\n\t\tif (!this.isEmpty()) {\r\n\t\t\tSNode<T> iterator = this.getHead();\r\n\t\t\twhile (iterator.getPrev().getPrev() != tail) {\r\n\t\t\t\titerator = iterator.getPrev();\r\n\t\t\t}\r\n\t\t\tSNode<T> endNode = iterator.getPrev();\r\n\t\t\titerator.setPrev(tail);\r\n\t\t\tsize--;\r\n\t\t\treturn endNode.getValue();\r\n\t\t}\r\n\t\t// The list is empty\r\n\t\treturn null;\r\n\t}", "public synchronized DoubleLinkedListNodeInt getLast() {\n\t\tif(isEmpty())\n\t\t\treturn null;\n\t\treturn tail.getPrev();\n\t}", "public E getTail() {\n if (isCurrent() && tail != null) { return tail.getData(); }\n else { throw new IllegalStateException(\"There is no tail element.\"); }\n }", "public ListNode getTail()\n {\n return tail;\n }", "public E last() {\n\r\n if(tail == null) {\r\n return null;\r\n } else {\r\n return tail.getItem();\r\n\r\n }\r\n }", "public LinkedListNode<T> getLastNode() {\n\t\t//if the head is null\n\t\tif (head == null) {\n\t\t\t//return null\n\t\t\treturn null;\n\t\t}\n\t\t//create a new linkedlistnode that's equal to the head\n\t\tLinkedListNode<T> node = head;\n\t\t//while the node after the current node isn't null\n\t\twhile (node.getNext() != null) {\n\t\t\t//get the next node\n\t\t\tnode = node.getNext();\n\t\t}\n\t\t//return the last node\n\t\treturn node;\n\t}", "public NodeD getTail() {\n return tail;\n }", "public T popTail() {\n if(head == null) {\n return null;\n }\n \n Node<T> tail = head;\n Node<T> preTail = head;\n \n if(head.getNext() == null) {\n tail = head;\n head = null;\n }\n\n while (tail.getNext() != null) {\n preTail = tail;\n tail = tail.getNext();\n }\n preTail.unsetNext();\n \n return tail.getValue();\n }", "public Object removeLast() {\n if(tail == null) return null;\n if(tail == head) return removeFirst();\n\n Object temp = tail.getElement();\n Node n = tail.getPrevious();\n n.setNext(null);\n tail = n;\n\n return temp;\n }", "public LinkedListNode<T> getLastNode()\n\t{\n\t\t//if the list is empty\n\t\tif(isEmpty()){\n\t\t\treturn null;\n\t\t}\n\t\t//if the head is the last node\n\t\tif(head.getNext() == null){\n\t\t\t//return head\n\t\t\treturn head;\n\t\t}\n\t\t\n\t\t//set current node to head node\n\t\tLinkedListNode<T> currentNode = head;\n\t\t//while there's next node\n\t\twhile (currentNode.getNext()!=null){\n\t\t\t//current node becomes next node\n\t\t\tcurrentNode = currentNode.getNext();\n\t\t}\n\t\t//return the final node in list\n\t\treturn currentNode;\n\t}", "public E last() {\n if (next == null) {\n return head();\n } else {\n JMLListEqualsNode<E> ptr = this;\n //@ maintaining ptr != null;\n while (ptr.next != null) {\n ptr = ptr.next;\n }\n //@ assert ptr.next == null;\n //@ assume ptr.val != null ==> \\typeof(ptr.val) <: \\type(Object);\n E ret = (ptr.val == null\n ? null\n : (ptr.val) );\n //@ assume ret != null ==> \\typeof(ret) <: elementType;\n //@ assume !containsNull ==> ret != null;\n return ret;\n }\n }", "public E last() {\n if(isEmpty()){\n return null;\n }else{\n return trailer.getPrev().getElement();\n }\n }", "public LinkedListNode<T> getLastNode()\n\t{\n\t\t//create a currentNode variable, initialized with head pointer\n\t\tLinkedListNode<T> currentNode = this.head;\n\t\t//account for special case if the head is the only node\n\t\tif (this.head==null)\n\t\t\treturn this.head;\n\t\t//assuming that the next node is not null\n\t\twhile(currentNode.getNext() != null)\n\t\t\tcurrentNode = currentNode.getNext();\n\t\t//once the next node is null, return the current node\n\t\treturn currentNode;\n\t}", "public T deleteFromTail() {\n if (isEmpty()) \n return null;\n T el = tail.info;\n if (head == tail) // if only one node in the list;\n head = tail = null;\n else { // if more than one node in the list,\n SLLNode<T> tmp; // find the predecessor of tail;\n for (tmp = head; tmp.next != tail; tmp = tmp.next);\n tail = tmp; // the predecessor of tail becomes tail;\n tail.next = null;\n }\n return el;\n }", "public T getTail() {\n\t\treturn tail.value;\n\t}", "public E removeLast() {\n\t\tif (this.maxCapacity == 0) {\n\t\t\tSystem.out.println(\"incorrect Operation \");\n\t\t\tSystem.out.println(\"bottom less Stack\");\n\t\t\treturn null;\n\t\t} \n\t\t\n\t\tif (this.size > 0) {\n\t\t\tNode<E> nextNode = head.getNext();\n\t\t\tNode<E> prevNode = null;\n\t\t\twhile (nextNode != null) {\n\t\t\t\tif (nextNode.getNext() == null) {\n\t\t\t\t\tNode<E> lastNode = nextNode;\n\t\t\t\t\tthis.tail = prevNode;\n\t\t\t\t\tthis.tail.setNext(null);\n\t\t\t\t\tthis.size--;\n\t\t\t\t\treturn lastNode.getElement();\n\t\t\t\t}\n\t\t\t\tprevNode = nextNode;\n\t\t\t\tnextNode = nextNode.getNext();\n\t\t\t}\n\t\t} \n\t\t\t\n\t\treturn null;\n\t}", "public E peekLast() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tNode p = mHead.next;\n\t\twhile (p.next != mTail) {\n\t\t\tp = p.next;\n\t\t}\n\n\t\treturn p.data;\n\t}", "public Node getTailNode();", "public Node<E> remove_last_node(){\r\n if (theData.size() <= 0) return null;\r\n\r\n Node<E> item = theData.get(theData.size()-1);\r\n\r\n theData.remove(theData.size() - 1);\r\n\r\n return item;\r\n }", "public Element last() {\n if(isEmpty()) return null;\n else return trailer.getPreNode().getContent();\n }", "public Node<T> getLast() \r\n {\r\n if (isEmpty()) return sentinel;\r\n return sentinel.prev;\r\n }", "public Node removeTail(){\n\t\tif(head==null) return null;\n\t\t\n\t\t// check if only one node exists\n\t\tif(head.getNext()==null) {\n\t\t\tNode temp = head;\n\t\t\thead = null;\n\t\t\treturn temp;\n\t\t}\n\t\t\n\t\tNode current = head;\n\t\tNode previous = null;\n\t\t\n\t\t// traverse to last node\n\t\twhile(current.getNext()!=null){\n\t\t\tprevious = current;\n\t\t\tcurrent = current.getNext();\n\t\t}\n\t\t\n\t\t// remove the last node\n\t\tNode tail = previous.getNext();\n\t\tprevious.setNext(null);\n\t\t\n\t\treturn tail;\n\t}", "public E getLast() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tNode p = mHead.next;\n\t\twhile (p.next != mTail) {\n\t\t\tp = p.next;\n\t\t}\n\n\t\treturn p.data;\n\t}", "public E removeLast() {\n\r\n E last = null;\r\n\r\n if(head == null){\r\n last = null;\r\n } else if(head.getNext() == null){\r\n last = head.getItem();\r\n } else {\r\n Node<E> curr = head;\r\n\r\n while(curr.getNext().getNext() != null) {\r\n curr = curr.getNext();\r\n }\r\n\r\n last = curr.getNext().getItem();\r\n curr.setNext(null);\r\n this.tail = curr;\r\n }\r\n\r\n return last;\r\n\r\n }", "public T pop()\n\t{\n\t\tif (head == null)\n\t\t\treturn null;\n\t\t\n\t\tT ret = head.data;\n\t\thead = head.link;\n\t\tsize--;\n\t\treturn ret;\n\t}", "public T getLast()\n\t//POST: FCTVAL == last element of the list\n\t{\n\t\tNode<T> tmp = start;\n\t\twhile(tmp.next != start) //traverse the list to end\n\t\t{\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp.value;\t//return end element\n\t}", "public T removeLast() {\r\n \r\n if (size == 0) {\r\n return null;\r\n }\r\n \r\n else if (size == 1) {\r\n \r\n T deleted = front.element;\r\n front = null;\r\n last = null;\r\n size--;\r\n return deleted;\r\n }\r\n \r\n else {\r\n Node n = front;\r\n \r\n while (n.next.next != null) {\r\n n = n.next;\r\n }\r\n \r\n \r\n T deleted = n.next.element;\r\n n.next = null;\r\n last = n;\r\n size--;\r\n return deleted;\r\n }\r\n \r\n }", "@Override\n\tpublic E dequeue() {\n\t\tif (! isEmpty()) {\n\t\t\tNode temp = first;\n\t\t\tE e = temp.element;\n\t\t\tfirst = temp.next;\n\t\t\t\n\t\t\tif (temp == last)\n\t\t\t\tlast = null;\n\t\t\treturn e;\n\t\t}\n\t\treturn null;\n\t}", "public E removeLast() {\r\n\t\tif (tail == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\tNode<E> temp = tail;\r\n\t\t\tif (head == tail) {\r\n\t\t\t\thead = null;\r\n\t\t\t\ttail = null;\r\n\t\t\t} else {\r\n\t\t\t\ttail = tail.prev;\r\n\t\t\t\ttail.next = null;\r\n\t\t\t}\r\n\t\t\tindices.remove(size - 1);\r\n\t\t\tsize--;\r\n\t\t\treturn temp.data;\r\n\t\t}\r\n\t}", "public PersistentLinkedList<T> removeLast() {\n return remove(this.treeSize - 1);\n }", "public E dequeue() {\n\t\tif(isEmpty()){\n\t\t\tSystem.out.println(\"Queue is already empty\");\n\t\t\treturn null;\n\t\t}else{\n\t\t\tif(head.next==tail){\n\t\t\t\ttail=head;\n\t\t\t}\n\t\t\tE e=head.next.e;\n\t\t\thead.next=head.next.next;\n\t\t\treturn e;\n\t\t}\n\t\t\n\t}", "public E pop() {\n if (isEmpty()) {\n return null;\n } else {\n E e = head.item;\n head = head.next;\n size--;\n return e;\n }\n\n }", "public Item getLast() {\n Node nextToLast = findNode(size-1);\n Node removed = nextToLast.next;\n nextToLast.next = head;\n removed.next = null;\n size--;\n return removed.item;\n }", "private ListNode popTail() {\n\t ListNode tailItem = tail.prev;\n\t removeFromList(tailItem);\n\n\t return tailItem;\n\t }", "private DLinkedNode popTail() {\n\t\tDLinkedNode res = tail.prev;\n\t\tremoveNode(res);\n\t\treturn res;\n\t}", "public Type show_tail() {\n \t \n \t //just return element in tail\n\t return(len != 1 ? tail.show_element(): null);\n }", "public T dequeue()\n\t{\n\t\tNode<T> eliminado = head;\n\t\thead = head.getNext();\n\t\tif(head == null)\n\t\t{\n\t\t\ttail = null;\n\t\t}\n\t\tsize--;\n\t\treturn eliminado.getElement();\n\t}", "public E pollLast() {\r\n\t\tif (isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tE ret = (E) data.get(data.size() - 1);\r\n\t\tdata.remove(data.size() - 1);\r\n\t\treturn ret;\r\n\t}", "@Override\r\n\tpublic T dequeue()\r\n\t{\r\n\t\tif (isEmpty()) { throw new EmptyQueueException(); }\r\n\r\n\t\tLinkedNode<T> target = head;\r\n\t\tT item = target.element;\r\n\r\n\t\thead = target.next;\r\n\r\n\t\ttarget.element = null;\r\n\t\ttarget.next = null;\r\n\r\n\t\tif (head == null)\r\n\t\t{\r\n\t\t\ttail = null;\r\n\t\t}\r\n\r\n\t\tcount--;\r\n\t\treturn item;\r\n\t}", "public T peek()\n {\n\n if (ll.getSize()==0){\n return null;\n }else\n return ll.getData(ll.getSize()-1);\n }", "public Object getLast() throws ListException {\r\n\t\tif (size() >= 1) {\r\n\t\t\tDoublyNode lastNode = head.getPrev();\r\n\t\t\treturn lastNode.getItem();\r\n\t\t} else {\r\n\t\t\tthrow new ListException(\"getLast on an empty list\");\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic Object last(){\r\n\t\tcheck();\r\n\t\treturn tail.value;\r\n\t}", "private DLinkedNode popTail(){\n DLinkedNode res = tail.pre;\n this.removeNode(res);\n return res;\n }", "public E removeLast() {\n if(isEmpty()){\n return null;\n }else{\n return remove(trailer.getPrev());\n }\n }", "public Item removeLast() {\n if (size == 0) {\n return null;\n } else if (size == 1) {\n StuffNode i = sentinel.prev;\n sentinel.next = sentinel;\n sentinel.prev = sentinel;\n size -= 1;\n return i.item;\n } else {\n StuffNode i = sentinel.prev;\n i.prev.next = sentinel;\n sentinel.prev = i.prev;\n size -= 1;\n return i.item;\n }\n }", "public Node travelToLastNode() {\n if (next!=null) {\n Node currentNode = next;\n while (currentNode.next != null) {\n currentNode = currentNode.next;\n }\n return currentNode;\n } else {\n return this;\n }\n }", "public E pollLast() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\n\t\tE retVal = remove(getNode(size() - 1));\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "public T removeFromBack() {\n if (size == 0) {\n throw new NoSuchElementException(\"The list is empty, \"\n + \"so there is nothing to get.\");\n }\n if (head == tail) {\n head.setNext(null);\n head.setPrevious(null);\n tail.setNext(null);\n tail.setPrevious(null);\n size -= 1;\n return tail.getData();\n } else {\n T temp = tail.getData();\n tail = tail.getPrevious();\n tail.setNext(null);\n size -= 1;\n return temp;\n\n }\n }", "private DLinkedNode popTail() {\n\t\t\tDLinkedNode res = tail.pre;\n\t\t\tthis.removeNode(res);\n\t\t\treturn res;\n\t\t}", "@Override\r\n\tpublic T last() {\n\t\treturn tail.content;\r\n\t}", "public T dequeue() {\n if (first != null) {\n size--;\n T data = first.data;\n first = first.next;\n\n if (first == null) {\n last = null; // avoid memory leak by removing reference\n }\n\n return data;\n }\n return null;\n }", "public PlanNode getLastChild() {\n return this.children.isEmpty() ? null : this.children.getLast();\n }", "public Item removeLast() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = tail.item;\n if (size == 1) {\n tail = null;\n head = null;\n } else {\n Node<Item> tailPrev = tail.prev;\n tailPrev.next = null;\n tail = tailPrev;\n }\n size--;\n return item;\n }", "public T pop()\n {\n if (ll.getSize()==0){\n return null;\n }else {\n T temp = ll.getData(ll.getSize() - 1);\n ll.remove(ll.getSize() - 1);\n\n return temp;\n }\n }", "public Object pop (){\n if(!head.equals(null)){\r\n Object data = head.data;\r\n head = head.next;\r\n return data;\r\n }\r\n else\r\n return null; \r\n }", "public T pop() {\n if (head == null) {\n return null;\n } else {\n Node<T> returnedNode = head;\n head = head.getNext();\n return returnedNode.getItem();\n }\n }", "public Node getLast() {\r\n\t\treturn getNode(this.size());\r\n\t}", "public Node<T> getLast() {\r\n\t\treturn last;\r\n\t}", "public Column getTail() {\n return tail != null ? tail : this;\n }", "public E pop() {\n if(head == null) {\n // The list is empty\n throw new NoSuchElementException();\n } else if(head == tail) {\n // The list was of size one\n E item = head.item;\n head = tail = null;\n size = 0;\n return item;\n } else {\n E item = head.item;\n head = head.next;\n size--;\n return item;\n }\n }", "public T pop() {\n\t\tif (this.l.getHead() != null) {\n\t\t\tT tmp = l.getHead().getData();\n\t\t\tl.setHead(l.getHead().getNext());\n\t\t\treturn tmp;\n\t\t} else {\n\t\t\tSystem.out.println(\"No element in stack\");\n\t\t\treturn null;\n\t\t}\n\t}", "public Node getLast()\n {\n return this.last;\n }", "String deq() \n\t{\n\t\tif ( !isEmpty() )\n\t\t{\n\t\t\tString t = head.item;\n\t\t\thead = head.next;\n\n\t\t\tif (head == null)\n\t\t\t{\n\t\t\t\ttail = null;\n\t\t\t}\n\t\t\treturn t;\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "InductiveList<E> tail() throws UnsupportedOperationException;", "public Item removeLast() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\t\tNode<Item> tmp = tail;\n\t\ttail = tail.prev;\n\t\tif (tail == null) {\n\t\t\thead = null;\n\t\t} else {\n\t\t\ttail.next = null;\n\t\t}\n\t\ttmp.prev = null;\n\t\tN--;\n\t\treturn tmp.item;\n\n\t}", "public synchronized ListNode removeFromEnd() {\n\t\tif (head == null)\n\t\t\treturn null;\n\t\tListNode p = head, q = null, next = head.getNext();\n\t\tif (next == null) {\n\t\t\thead = null;\n\t\t\t// reduce the length of the list\n\t\t\tlength -= 1;\n\t\t\treturn p;\n\t\t}\n\t\twhile ((next = p.getNext()) != null) {\n\t\t\tq = p;\n\t\t\tp = next;\n\t\t}\n\t\tq.setNext(null);\n\t\t// reduce the length of the list\n\t\tlength -= 1;\n\t\treturn p;\n\t}", "public E first() { // returns (but does not remove) the first element\n // TODO\n if (isEmpty()) return null;\n return tail.getNext().getElement();\n }", "public E removeFirst() { // removes and returns the first element\n // TODO\n if (isEmpty( )) return null;\n Node<E> head = tail.getNext();\n if (head == tail) tail = null;\n else tail.setNext(head.getNext( ));\n size--;\n return head.getElement( );\n }", "public T removeLast() {\n if (size() == 0) {\n return null;\n }\n nextLast = minusOne(nextLast);\n size -= 1;\n T toRemove = items[nextLast];\n items[nextLast] = null;\n if (isSparse()) {\n resize(capacity / 2);\n }\n return toRemove;\n }", "public T removeLast(){\n\tT ret = _end.getCargo();\n\t_end = _end.getNext();\n\t_end.setPrev(null);\n\t_size--;\n\treturn ret;\n }", "public T removeLast() \r\n {\r\n if (isEmpty()) throw new NoSuchElementException();\r\n Node<T> currLast = sentinel.prev;\r\n Node<T> toBeLast = currLast.prev;\r\n T currLastVal = currLast.getValue();\r\n toBeLast.next = sentinel;\r\n sentinel.prev = toBeLast;\r\n currLast = null;\r\n size--;\r\n return currLastVal;\r\n }", "@Override\r\n\t\tpublic Node getLastChild()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public T pop() {\n\t\tT data = null;\n\t\tif (head == null)\n\t\t\treturn null;\n\n\t\tif (head.getNext() == null) {\n\t\t\tdata = head.getData();\n\t\t\thead = null;\n\t\t\treturn data;\n\t\t}\n\n\t\tNode<T> next = head.getNext();\n\t\tdata = head.getData();\n\t\thead = null;\n\t\thead = next;\n\t\treturn data;\n\t}", "public T deleteHead(){\n if (head.next != tail || tail.prev != head) {\n T data = head.next.data;\n head = head.next;\n return data;\n }\n return null;\n }", "@Override\n public E getLast() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n return dequeue[tail];\n }", "public T last() throws EmptyCollectionException{\n if (rear == null){\n throw new EmptyCollectionException(\"list\");\n }\n return rear.getElement();\n }", "public IntVector tail () {\n return tail;\n }", "public E dequeue() {\n if (isEmpty()) return null; //nothing to remove.\n E item = first.item;\n first = first.next; //will become null if the queue had only one item.\n n--;\n if (isEmpty()) last = null; // special case as the queue is now empty. \n return item;\n }", "public E removeLast(){\r\n return null;\r\n }", "@Override\r\n\tpublic E peekLast() {\n\t\treturn null;\r\n\t}", "public T removeHead()\n\t{\n\t\tif(size == 0)\n\t\t{\n\t\t\tSystem.out.println(\"list is empty\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t//advance head reference\n\t\tT value = head.value;\n\t\thead = head.next;\n\t\t\n\t\tsize--;\n\t\treturn value;\n\t\t\n\t}", "@Override\n public Object dequeue() {\n Object objeto;\n if (!isEmpty()){ // Pré-condição\n objeto = memo[head];\n if (++head >= MAX){\n head = 0; // MAX-1 é a ultima posição do vetor\n }\n \n total--;\n if (total == 0){\n head = -1;\n tail = -1;\n }\n \n return objeto; // Retor o objeto que estava na head\n }\n else{\n return null; // Não se retira elemento de FILA vazia\n }\n }", "protected T removeFromHead()\n\t{\n\t\tif(head == null)\n\t\t\treturn null;\n\t\t\n\t\tT ret = head.getVal();\n\t\thead = head.getNext();\n\t\t\n\t\tif(head == null)\n\t\t\ttail = head;\n\t\telse\n\t\t\thead.setPrev(null);\n\t\t\n\t\treturn ret;\n\t}", "public E pop(){\n\t\tif(top == null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tE retval = top.element;\n\t\ttop = top.next;\n\t\t\n\t\treturn retval;\n\t}", "public T dequeue(){\n T front = getFront(); // might throw exception, assumes firstNode != null\n firstNode = firstNode.getNext();\n\n if (firstNode == null){\n lastNode = null;\n } // end if\n return front;\n }", "public T popHead() {\n \n if(head == null) {\n return null;\n }\n \n Node<T> temp = head;\n head = head.getNext();\n return temp.getValue();\n }", "@Override\n public E removeLast() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[tail];\n dequeue[tail] = null;\n tail--;\n if (tail == -1) {\n tail = dequeue.length - 1;\n }\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }", "public E getLast(){\n return tail.getPrevious().getElement();\n }", "public T removeLast()\r\n {\r\n T removedData; // holds data from removed node\r\n Node<T> walker; // for traversing the list\r\n\r\n if (numElements == 0)\r\n throw new NoSuchElementException(\r\n \"Remove attempted on empty list\\n\");\r\n removedData = rear.data;\r\n if (numElements == 1)\r\n front = rear = null;\r\n else\r\n {\r\n walker = front; \r\n while (walker.next != rear)\r\n {\r\n walker = walker.next;\r\n }\r\n walker.next = null;\r\n rear = walker;\r\n }\r\n \r\n numElements--;\r\n return removedData;\r\n }" ]
[ "0.7855269", "0.77741736", "0.765011", "0.76108104", "0.7602764", "0.7473138", "0.74700433", "0.74510205", "0.74510205", "0.74503905", "0.74074274", "0.74070394", "0.73696536", "0.7368949", "0.73568267", "0.731995", "0.72988486", "0.7261896", "0.72370327", "0.7236583", "0.7178359", "0.71749574", "0.71184516", "0.71161824", "0.70897955", "0.7081984", "0.7033358", "0.696101", "0.6939361", "0.6894314", "0.6851064", "0.6819564", "0.6818666", "0.68118834", "0.67940855", "0.6786618", "0.67592037", "0.6686127", "0.66733754", "0.6671315", "0.6669484", "0.6665582", "0.6641788", "0.6641347", "0.66297567", "0.6621112", "0.66112125", "0.6607999", "0.6598391", "0.65868175", "0.6582298", "0.65784067", "0.6577172", "0.6543904", "0.65417284", "0.6534564", "0.6524096", "0.6523032", "0.65132034", "0.6506402", "0.6504029", "0.6466993", "0.64635086", "0.64554", "0.6444051", "0.64407873", "0.64367515", "0.6434756", "0.6394728", "0.6387335", "0.6385201", "0.6356793", "0.63558006", "0.634935", "0.634292", "0.6338516", "0.6332143", "0.6327939", "0.6316984", "0.6315351", "0.63131243", "0.6300189", "0.6299596", "0.62911934", "0.62814176", "0.6276427", "0.62517244", "0.624863", "0.62458575", "0.6241038", "0.62393284", "0.62364817", "0.6233351", "0.62253356", "0.62204534", "0.62180877", "0.61964935", "0.61959755", "0.6192186", "0.6177974" ]
0.7756766
2
Returns the number of Strings in the Linked List.
public int size() { if (head == null) { return 0; } else { int size = 0; while (head.getNext() != null) { head = head.getNext(); size++; } return size; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getSize()\n\t{\n\t\t// returns n, the number of strings in the list: O(n).\n\t\tint count = 0;\n \t\tnode p = head; \n\t\twhile (p != null)\n \t\t{\n \t\tcount ++;\n \t\tp = p.next;\n \t\t}\n \t\treturn count;\n\t}", "public int len() {\n\t\tint i = 0;\n\t\tif(stringList != null) {\n\t\t\tIterator iterator = stringList.iterator();\n\t\t\twhile(iterator.hasNext()) {\n\t\t\t\titerator.next();\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn i;\n\t}", "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 }", "@Override\n public int size() {\n\n Node nodePointer = listHead;\n int size = 0;\n while (nodePointer != null) {\n size += 1;\n nodePointer = nodePointer.next;\n }\n return size;\n }", "public int length(){\n\t\tint cnt = 0;\n\t\tNode temp = this.head;\n\t\twhile(temp != null){\n\t\t\ttemp = temp.next;\n\t\t\tcnt++;\n\t\t}\n\t\treturn cnt;\n\t}", "int size()\n\t{\n\t\t//Get the reference of the head of the Linked list\n\t\tNode ref = head;\n\t\t\n\t\t//Initialize the counter to -1\n\t\tint count = -1;\n\t\t\n\t\t//Count the number of elements of the Linked List\n\t\twhile(ref != null)\n\t\t{\n\t\t\tcount++;\n\t\t\tref = ref.next;\n\t\t}\n\t\t\n\t\t//Return the number of elements as the size of the Linked List\n\t\treturn count;\n\t}", "public int length() {\n int ret_val = 1;\n LinkedList i = this;\n\n while (i.next != null) {\n i = i.next;\n ret_val++;\n }\n return ret_val;\n }", "public int length() {\n\tif (next == null) return 1;\n\telse return 1 + next.length();\n }", "public int size() {\n int counter = 1;\n Lista iter = new Lista(this);\n while (iter.next != null) {\n iter = iter.next;\n counter += 1;\n }\n return counter;\n }", "public int length(){\n\t\tint length = 0;\n\t\tListNode temp = firstNode;\n\t\twhile(temp!=null){\n\t\t\tlength++;\n\t\t\ttemp = temp.getNextNode();\n\t\t}\n\n\t\treturn length;\n\t}", "public int length()\n {\n int count = 0;\n Node position = head;\n\n while(position != null)\n {\n count++;\n position = position.nLink;\n } // end while\n\n return count;\n }", "public int size()\n\t{\n\t\tint count = 0;\n\t\tSinglyLinkedListNode node = head;\n\t\twhile(head != null)\n\t\t{\n\t\t\tcount++;\n\t\t\tif(node.getNext() != null)\n\t\t\t{\n\t\t\t\tnode = node.getNext();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "public int size() {\n\t\tint size = 0;\n\t\tnode tmp = head;\n\t\twhile(tmp != null) {\n\t\t\tsize++;\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn size;\n\t}", "public int size() {\n Node<T> temp = head;\n int count = 0;\n while (temp != null)\n {\n count++;\n temp = temp.next;\n }\n return count;\n }", "public int size()\n {\n Node n = head.getNext();\n int count = 0;\n while(n != null)\n {\n count++; \n n = n.getNext();\n }\n return count;\n }", "public int countNumStrings() // Wrapper Method.\n\t{\n\t\treturn countNumStrings(this.root);\n\t}", "public int size(){\n\t\tListUtilities start = this.returnToStart();\n\t\tint count = 1;\n\t\twhile(start.nextNum != null){\n\t\t\tcount++;\n\t\t\tstart = start.nextNum;\n\t\t}\n\t\treturn count;\n\t}", "public int size()\n {\n int result = 0;\n SingleNode current = head;\n \n while (current != null)\n {\n result++;\n current = current.getNext();\n }\n return result;\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 size()\n {\n \tDNode<E> temp=first;\n \tint count=0;\n \twhile(temp!=null)\t\t//Iterating till the end of the list\n \t{\n \t\tcount++;\n \t\ttemp=temp.next;\n \t}\n \treturn count;\n }", "public int size()\n { \t\n \t//initialize a counter to measure the size of the list\n int sizeVar = 0;\n //create local node variable to update in while loop\n LinkedListNode<T> localNode = getFirstNode();\n \n //update counter while there are still nodes\n while(localNode != null)\n {\n sizeVar += 1;\n localNode = localNode.getNext();\n }\n \n return sizeVar;\n }", "@Override\n public int size() {\n if(isEmpty()){ //if list is empty, size is 0\n return 0;\n }\n /*int size = 1; //if list is not empty, then we have at least one element in it\n DLNode<T> current = last; //a reference, pointing to the last element\n while(current.prev != null){\n current = current.prev;\n size++;\n }*/\n \n int count = 0;\n DLNode<T> p = first;\n while (p != null){\n count++;\n p = p.next;\n }\n //return size;\n return count;\n }", "public int size() {\r\n\t\t\tint size = 0;\r\n\t\t\tListNode counter = header;\r\n\t\t\twhile (counter != null) {\r\n\t\t\t\tsize++;\r\n\t\t\t\tcounter = counter.next;\r\n\t\t\t}\r\n\t\t\treturn size;\r\n\t\t}", "@Override\n public int size() {\n return wordsLinkedList.size();\n }", "public int size() {\n ListNode current = front;\n int size = 0;\n while (current != null) {\n size += 1;\n current = current.next;\n }\n return size;\n }", "public int getNumStrings(){\n\t\treturn numStrings;\n\t}", "public int size() {\n\r\n int size = 0;\r\n for(Node n = head; n.getNext() != null; n = n.getNext()) {\r\n size++;\r\n }\r\n\r\n return size;\r\n }", "public int size() {\n if (first.p == null) return 0;\n int counter = 1;\n Node n = first;\n while (!n.next.equals(first) && counter != 0) {\n counter++;\n n = n.next;\n }\n return counter;\n }", "public static int getNumberOfStrings(){\n\t\treturn setOfStrings.length;\n\t}", "public int size() {\r\n\t\treturn this.strings != null ? this.strings.size() : 0;\r\n\t}", "public int getSize() {\n\t\tint size = 0;\n\t\tNode current = head;\n\t\twhile (current != null) {\n\t\t\tcurrent = current.next;\n\t\t\tsize++;\n\t\t}\n\t\treturn size;\n\t}", "public int size() {\n\t\tint count = 0;\n\t\tListNode current = front;\n\t\twhile (current != null) {\n\t\t\tcurrent = current.next;\n\t\t\tcount++;\n\t\t}\n\t\treturn count;\n\t}", "public int size() {\n//\t\tint rtn = 0;\n//\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n//\t\t\trtn++;\t\n//\t\t}\n//\t\treturn rtn;\n\t\treturn mySize;\n\t}", "public int size(){\n\t\tListMapEntry temp = first;\n\t\tint c=0;\n\t\twhile(temp!=null){\n\t\t\tc++;\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\treturn c;\n\t}", "@Contract(pure = true)\n public static <E> int listLength(Node<E> head) {\n Node<E> cursor;\n int answer;\n\n answer = 0;\n for (cursor = head; cursor != null; cursor = cursor.getNext()) { answer++; }\n return answer;\n }", "public int nodeCounter() {\n\n\t\tDLNode n = head;\n\t\tint nodeCounter = 0;\n\t\twhile (n != null) {\n\t\t\tn = n.next;\n\t\t\tnodeCounter++;\n\t\t}\n\t\treturn nodeCounter;\n\t}", "public int size() {\n\t\t\n\t\tint count = 0;\n\t\t\n\t\t// Iterate through list and increment count until pointer cycles back to head (tail.next)\n\t\tfor (Node curr = head; curr == tail.next; curr = curr.next) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\treturn count;\n\t}", "public int sizeOfLinkedList(){\n\t\treturn size;\n\t}", "public int size(){\n int size = 0;\n for(LinkedList<E> item : this.data){\n size += item.size();\n }\n return size;\n }", "int node_size()\n {\n Node temp =headnode;\n int count=0;\n while (temp.next!=null)\n {\n count++;\n temp=temp.next;\n }\n return count;\n }", "public static int numberOfElement()\n\t{\n\t\treturn REF_INT_STRING.size();\n\t}", "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 }", "public int size() {\n\t\tint rtn = 0;\n\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\trtn++;\n\t\t}\n\t\tthis.mySize = rtn;\n\t\treturn rtn;\n\t}", "int getLinksCount();", "public int size() {\n // recursive approach seems more perspicuous\n if( headReference == null) return 0;\n else return size( headReference);\n }", "public int size(){\n if (head == null) {\n // Empty list\n return 0;\n } else {\n return head.size();\n }\n }", "public int size() {\n\t\tint count = 0;\n\t\tfor (Node<T> current = start; current == null; current = current.next) {\n\t\t\tcount++;\n\t\t}\n\t\treturn count;\n\t}", "public int size()\n\t{\n\t\tint count = 0;\n\t\tif(this.isEmpty())\n\t\t\treturn count;\n\t\telse\n\t\t{\n\t\t\t// Loop through and count the number of nodes.\n\t\t\tNode<T> curr = head;\t\n\t\t\twhile(curr != null)\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t\tcurr = curr.getNext();\n\t\t\t}\n\t\t\treturn count;\n\t\t}\n\t}", "public int getSize() {\n\t\tint size=0;\n\t\tfor(Node<E> p=head.next;p!=null; p=p.next){\n\t\t\tsize++;\n\t\t}\n\t\treturn size;\n\t}", "private static int length(Node head) {\n Node current = head;\n // if list is empty simply return length zero\n if (head == null) {\n return 0;\n }\n int count = 1;\n while (current.next != head) {\n current = current.next;\n count++;\n }\n return count;\n }", "public int size() {\n int found = 0;\n Node<T> it = head.get();\n // Do a raw count.\n for (int i = 0; i < capacity; i++) {\n if (!it.free.get()) {\n found += 1;\n }\n it = it.next;\n }\n return found;\n }", "public int countUniqueStrings()\n\t{\n\t\treturn countUniqueStrings(this.root);\n\t}", "public int sizeOf() {\n BookList target = this;\n int count = 0;\n if (isEmpty()){\n count= 0;\n }\n else if (!isEmpty()){\n count = 1;\n while (target.next != null){\n target = target.next;\n if(target.next == null){\n }\n \n ++count;\n }\n \n }\n\t\treturn count;\n\t}", "public static <AnyType> int listSize(LinkedList<AnyType> theList) {\n LinkedListIterator<AnyType> itr;\n int size = 0;\n\n for (itr = theList.first(); itr.isValid(); itr.advance()) {\n size++;\n }\n\n return size;\n }", "public int printLength(ListNode head) {\n\t\tif (head == null) {\n\t\t\tSystem.out.println(\"Empty List\");\n\t\t}\n\t\tint count = 0;\n\t\tListNode current = head;\n\t\twhile (current != null) {\n\t\t\tcurrent = current.next;\n\t\t\tcount++;\n\t\t}\n\t\t//System.out.println(\"Length of Linked List is : \" + count);\n\t\treturn count;\n\t}", "public int getCount() {\n return listName.length;\n }", "public int length()\n {\n if(integerList == null)\n return 0;\n else\n return integerList.length;\n }", "public static int listLength( IntNode head ) {\r\n\t\tint answer = 0;\r\n\t\tfor (IntNode cursor = head; cursor != null; cursor = cursor.link) {\r\n\t\t\tanswer++;\r\n\t\t}\r\n\t\treturn answer;\r\n\t}", "public int length() {\n return links.length;\n }", "public int findLength(ListNode head){\n\n int len = 0;\n ListNode curr = head;\n while(curr != null){\n curr = curr.next;\n len++;\n }\n\n return len;\n }", "public int size() {\n if(head == null) {\n return 0;\n }\n \n int i = 1;\n Node<T> node = head;\n while(node.getNext() != null) {\n node = node.getNext();\n i++;\n }\n return i;\n }", "public int size()\n\t{\n\t\tint size = 0;\n\t\t\n\t\tfor (LinkedList<Entry> list : entries)\n\t\t\tsize += (list == null) ? 0 : list.size();\n\t\t\n\t\treturn size;\n\t}", "int size() {\n if (this.next.equals(this)) {\n return 0;\n }\n return this.next.size(this);\n }", "public int getLength()\n\t{\n\t\tDNode tem=first;\n\t\tint length=0;\n\t\twhile(tem.nextDNode!=null)\n\t\t{\n\t\t\tlength=length+1;\n\t\t\ttem=tem.nextDNode;\n\t\t}\n\t\tif(first!=null)\n\t\t\tlength=length+1;\n\t\treturn length;\n\t}", "public int size() {\n\t\treturn recSize(head);\n\t}", "@Override\n public Integer getSize() {\n Integer size = 0;\n Node<T> tempNode = this.head;\n while(tempNode.getNext() != null){\n tempNode = tempNode.getNext();\n size++;\n }\n return size;\n }", "public static int LLlength(Node head) {\n\t\tint length = 0;\n\t\tNode currentNode = head;\n\t\twhile(currentNode != null) {\n\t\t\tlength++;\n\t\t\tcurrentNode = currentNode.next;\n\t\t}\n\t\treturn length;\n\t}", "public int numItemInList() {\n return nextindex - startIndex;\n }", "public int size() {\n\t\t//if the head isn't null\n\t\tif (head != null) {\n\t\t\t//create a node that's set to the head\n\t\t\tLinkedListNode<T> node = head;\n\t\t\t//set number of nodes to 0\n\t\t\tint numNodes = 0;\n\n\t\t\t//while the node isn't null\n\t\t\twhile (node != null) {\n\t\t\t\t//increment the number of nodes\n\t\t\t\tnumNodes++;\n\t\t\t\t//set node to the next node\n\t\t\t\tnode = node.getNext();\n\t\t\t}\n\t\t\t//return the number of nodes\n\t\t\treturn numNodes;\n\t\t}\n\t\t//otherwise, the head is null meaning the list is empty\n\t\telse {\n\t\t\t//size is 0 (empty)\n\t\t\treturn 0;\n\t\t}\n\t}", "public int size() {\n\t\tint numElements = 0;\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tif (list[i] != null) {\n\t\t\t\tnumElements++;\n\t\t\t}\n\t\t}\n\t\treturn numElements;\n\t}", "public int cardinality() {\n return strings.size();\n }", "public int size() {\n return headReference == null ? 0 : headReference.size();\n }", "String size();", "public long getStringCount() {\n return ByteUtils.toUnsignedInt(stringCount);\n }", "public int getSize(){\n\t\tint size = list.size();\n\t\treturn size;\n\n\t}", "@Override\n\tpublic int size() {\n\t\tif(top == null) {\n\t\t\treturn 0;\n\t\t}\n\t\tNode<T> tempNode = top;\n\t\tint counter = 1;\n\t\twhile(tempNode.getLink() != null) {\n\t\t\tcounter++;\n\t\t\ttempNode = tempNode.getLink();\n\t\t}\n\t\treturn counter;\n\t}", "public int count() {\n\t\tint q = 0;\n\t\tfor(int i = 0; i < list.length; i++) if (list[i] != null) q++;\n\t\treturn q;\n\t\t\n\t}", "int getListCount();", "public int listSize(){\r\n return counter;\r\n }", "public int size() {\n \t\n \tint i = 0;\n \t\n \twhile(this.front != null) {\n \t\ti = i+1;\n \t\tthis.front = this.front.next; \n \t}\n \t\n \treturn i;\n \t\n }", "public int size()\n\t{\n\t\treturn list.size();\n\t}", "public int size()\n\t{\n\t\treturn list.size();\n\t}", "public int Count()\n {\n\tint total = 0;\n\tnode cur = new node();\n\tcur = Head.Next;\n\tif(cur == Head)\n\t return total;\n\twhile(cur != Head)\n\t {\n\t\ttotal++;\n\t\tcur = cur.Next;\n\t }\n\treturn total;\n }", "@Override\n public int size() {\n int i = 0;\n boolean cont = true;\n Node holder = new Node();\n holder = head;\n do {\n if (isEmpty()) {\n cont = false;\n } else if (holder.getNext() == null) {\n i++;\n cont = false;\n } else {\n holder = holder.getNext();\n i++;\n }\n } while (cont == true);\n return i;\n }", "public long size() {\n return links.length * links.length;\n }", "public int size()\n\t{\n\t\treturn listSize;\n\t}", "public int size(){\n\t\tNode<E> current = top;\n\t\tint size = 0;\n\t\t\n\t\twhile(current != null){\n\t\t\tcurrent = current.next;\n\t\t\tsize++;\n\t\t}\n\t\t\n\t\treturn size;\n\t}", "public int size() {\n\t\treturn list.size();\n\t}", "public int getWordCount() {\n\t\treturn list.size();\n\t}", "public int size(){\n\t\treturn list.size();\n\t}", "public int size(){\n\t\treturn list.size();\n\t}", "public int length() {\n\t\treturn this.n;\n\t}", "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 double length() {\n if (first.p == null) return 0;\n double distance = 0.0;\n Node n = first;\n Node n2 = first.next;\n while (!n.next.equals(first)) {\n distance += n.p.distanceTo(n2.p);\n n = n.next;\n n2 = n2.next;\n }\n distance += n.p.distanceTo(n2.p);\n return distance;\n }", "public int getCount() {\n\t\treturn stringArray.size();\n\t}", "Long getNumberOfElement();", "public int getSizeList(){\r\n\t\tint size;\r\n\t\tif (arrayWordsList != null )\r\n\t\t\tsize = arrayWordsList.length;\r\n\t\telse\r\n\t\t\tsize = 0;\r\n\t\t\r\n\t\treturn size;\r\n\t}", "public int getCount(){\n int c = 0;\n for(String s : this.counts){\n c += Integer.parseInt(s);\n }\n return c;\n }", "public int count() {\n return count(\"\");\n }", "public int size()\n {\n if(_list!=null)\n return _list.size();\n return 0;\n }" ]
[ "0.8459494", "0.79125255", "0.7575937", "0.74219346", "0.73505473", "0.72785884", "0.72497344", "0.7241363", "0.7201836", "0.71962106", "0.71903324", "0.7180206", "0.7167153", "0.7162204", "0.71449476", "0.71444017", "0.7129059", "0.700855", "0.70078", "0.699259", "0.6990248", "0.69846684", "0.6962561", "0.6955078", "0.69500744", "0.6931302", "0.6920564", "0.6905213", "0.68980235", "0.6879592", "0.6863385", "0.68607706", "0.6836581", "0.68356234", "0.6834192", "0.6816645", "0.6813027", "0.67875725", "0.678712", "0.6782823", "0.67816466", "0.6774009", "0.67677265", "0.6752184", "0.671206", "0.6703293", "0.6699305", "0.6691406", "0.6691288", "0.66774654", "0.6668882", "0.6666721", "0.6660141", "0.6633468", "0.662444", "0.6613068", "0.6607584", "0.66062254", "0.66042864", "0.66028076", "0.6600522", "0.65856254", "0.658141", "0.65774846", "0.65702987", "0.6540995", "0.65408486", "0.65367895", "0.65328366", "0.6520988", "0.6518505", "0.650281", "0.64997005", "0.6488188", "0.6488016", "0.64760226", "0.64700943", "0.64697194", "0.646551", "0.6463884", "0.6458895", "0.6458895", "0.6454186", "0.64416814", "0.6432573", "0.6432566", "0.6431272", "0.6426599", "0.6408425", "0.6399226", "0.6399226", "0.6388235", "0.6376123", "0.63745356", "0.63594335", "0.63521624", "0.63516426", "0.63397485", "0.63381344", "0.63344264" ]
0.66889435
49
Tests if this Linked List is empty.
public boolean isEmpty() { if (head == null && tail == null) { System.out.println("This list is empty"); return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isEmpty(){\n\t\treturn sizeOfLinkedList() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn firstNode == null; // return true if List is empty\n\t}", "public boolean isEmpty() {\n\t\tif (l.getHead() == null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean isEmpty() {\n return head.next == null;\n }", "public boolean isLinkedListEmpty()\r\n {\r\n \treturn(firstNode==null);\r\n }", "public boolean isEmpty(){\n\t\treturn firstNode == null; //return true if List is empty\n\t}", "public boolean empty() {\n\t\treturn list.size() == 0;\n\t}", "public boolean isEmpty()\n\t{\n\t\treturn (head == null);\n\t}", "public boolean isEmpty() {\r\n\t\treturn head == null;\r\n\t}", "public boolean isEmpty() {\r\n\t\treturn head == null;\r\n\t}", "public boolean isEmpty() {\r\n\t\treturn al.listSize == 0;\r\n\t}", "public synchronized boolean isEmpty() {\n\t\treturn head.getNext() == tail;\n\t}", "public boolean isEmpty() {\n\t\treturn head == null;\n\t}", "public boolean isEmpty() {\n\t\treturn head == null;\n\t}", "public boolean isEmpty() {\n\t\treturn head == null;\n\t}", "public boolean isEmpty() {\n\t\treturn head == null;\n\t}", "public boolean isEmpty() {\n\t\tif (head == null) \n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean isEmpty() // true if list is empty\r\n\t{\r\n\t\treturn (first == null);\r\n\t}", "public boolean isEmpty() {\n\t\treturn(head == null);\t\t\n\t}", "public boolean isEmpty()\n {\n return head == null;\n }", "public boolean isEmpty() {\n return head.next == head;\n }", "public boolean isEmpty() {\n\t\t//if head is null\n\t\tif (head == null) {\n\t\t\t//return true, no items in list\n\t\t\treturn true;\n\t\t}\n\t\t//otherwise\n\t\treturn false;\n\t}", "public boolean isEmpty() {\n return head == null;\n }", "public boolean isEmpty() {\n return head == null;\n }", "public boolean isEmpty() {\n return (head == null && tail == null);\n }", "public boolean isEmpty() {\n return (head == tail) && size == 0;//size==0时为空\n }", "public final boolean isEmpty() {\r\n\t\treturn this.size == 0;\r\n\t}", "public boolean empty()\n {\n boolean check;\n if(head.data == null && tail.data == null)\n check = true;\n else\n check = false;\n return check;\n }", "public boolean isEmpty() {\n return head == null || tail == null;\n }", "public boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "public boolean isEmpty() {\n\t\treturn (head==tail);\n\t}", "boolean isEmpty() {\n\t\treturn m_list_nodes.size() == 0;\n\t}", "public boolean isEmpty()\n\t{\n\t\treturn (head == null && tail == null);\n\t}", "public boolean isEmpty()\n\t{\n\t\tif (head == null)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isEmpty()\n\t{\n\t\treturn list.isEmpty();\n\t}", "public boolean isEmpty(){\n\t\treturn (head == null) && (tail == null);\n\t}", "public boolean isEmpty()\n\t{\n\t\tif(head == null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean isEmpty()\n\t{\n\t\tif(head == null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean isEmpty(){\n\n\t\treturn (head==null);\n\t}", "public boolean empty()\n {\n\treturn null == head;\n }", "public boolean isEmpty()\n {\n //this method is used to check length\n //replacing head == null so I don't have to maintain a head\n //also error checks for null lists\n return (entryList == null || (entryList.size() == 0));\n //just doing .size() == 0 will raise a null pointer exception on occasion\n }", "public boolean isEmpty() {\n return head == tail;\n }", "public boolean isEmpty()\r\n {\r\n return (head==null);\r\n }", "public boolean isEmpty() {\n\t\treturn this.size == 0;\n\t}", "public boolean isEmpty() {\n return list.isEmpty();\n }", "public boolean empty() {\n if (list.size() == 0) {\n return true;\n }\n else {\n return false;\n }\n }", "public boolean isEmpty()\r\n\t {\r\n\t return head == null;\r\n\t }", "public boolean isEmpty()\n {\n if (this.head == null)\n return true;\n else\n return false;\n \n }", "public boolean isEmpty() {\n\t\treturn(this.size == 0);\n\t}", "public boolean isEmpty(){\n return this.listSize == 0;\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\tif (head == null) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isEmpty() {\n return (this.size == 0);\n }", "public boolean empty() {\n return list.isEmpty();\n }", "public boolean isEmpty() {\n return this.size == 0;\n }", "public boolean isEmpty() {\n return this.size == 0;\n }", "public synchronized boolean isEmpty () {\n return list.isEmpty();\n }", "public boolean isEmpty() {\n\t\t\n\t\tif(head==null){\n\t\treturn true;\n\t\t}\n\t\telse{\n\t\treturn false;\n\t\t}\n\t}", "public boolean isEmpty()\n {\n return this.size == 0;\n }", "public boolean isEmpty()\n {\n if(head == null){\n return true;\n }\n return false;\n }", "public boolean isEmpty() {\n return (head == -1) || (head > tail);\n }", "public boolean isEmpty() {\n return head == -1 && tail == -1;\n }", "public boolean empty() {\n\t\treturn (size() <= 0);\n\t}", "public final boolean isEmpty()\n {\n return this.pointer == 0;\n }", "public boolean isEmpty() {\n return (size() == 0);\n }", "public boolean isEmpty()\r\n {\r\n return (size() == 0);\r\n }", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn this.size == 0;\r\n\t}", "public boolean isEmpty() {\n\t\treturn (size == 0);\n\t}", "public boolean isEmpty() \r\n\t{\r\n\t\treturn size() == 0;\r\n\t}", "public boolean isEmpty() {\n\t\treturn (_items.size() == 0);\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "public boolean isEmpty() {\n\t\treturn firstNode == null;\n\t}", "public boolean isEmpty() {\n\t return size() == 0;\n\t }", "public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}", "public boolean isEmpty()\n {\n return ll.getSize()==0? true: false;\n }", "public boolean isEmpty(){\n\n \treturn list.size() == 0;\n\n }", "public boolean isEmpty() {\n return stack.isListEmpty();\n }", "public final boolean isEmpty() {\n return mSize == 0;\n }", "public boolean isEmpty(){\n\t\tif(list.isEmpty()){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isEmpty() {\n return firstNode == null;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public synchronized boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty() {\n\n\t\treturn size == 0;\n\n\t}", "public boolean isEmpty()\n {\n return (numNodes == 0);\n }", "public boolean isEmpty() {\n return (size == 0);\n }", "public boolean isEmpty() {\n\t\treturn size == 0;\r\n\t}", "public static boolean empty() {\n\n if (list.size() != 0){\n return false;\n }\n return true;\n }", "public boolean isEmpty() {\r\n\t\treturn size == 0;\r\n\t}" ]
[ "0.8434485", "0.8402743", "0.8381777", "0.8340763", "0.8264986", "0.8247274", "0.82348067", "0.8215994", "0.8204091", "0.8204091", "0.8203535", "0.8184972", "0.81764716", "0.81764716", "0.81764716", "0.81764716", "0.81474465", "0.81352973", "0.81349504", "0.8134667", "0.81299794", "0.8126982", "0.8117049", "0.8117049", "0.81140774", "0.81042355", "0.8104003", "0.81039995", "0.81015235", "0.809817", "0.80832016", "0.8077824", "0.80769813", "0.8060688", "0.80590844", "0.8055816", "0.8038564", "0.8038564", "0.80377346", "0.8023262", "0.80121535", "0.800364", "0.79984885", "0.79981494", "0.79941016", "0.79903185", "0.79893947", "0.7987445", "0.79743487", "0.7968506", "0.7964831", "0.79608846", "0.7959117", "0.79380286", "0.79380286", "0.79365164", "0.7929988", "0.7923462", "0.7900572", "0.78890586", "0.7888616", "0.78716034", "0.7870989", "0.7859601", "0.7847507", "0.7846631", "0.7842799", "0.7839459", "0.7837527", "0.7832804", "0.7832804", "0.78321004", "0.78275627", "0.7821322", "0.7821322", "0.7821322", "0.7821322", "0.7820493", "0.78197646", "0.781865", "0.7814268", "0.7813409", "0.7791775", "0.77879125", "0.77879125", "0.77879125", "0.77879125", "0.77879125", "0.77879125", "0.77879125", "0.77879125", "0.77879125", "0.77879125", "0.77848566", "0.7780456", "0.77715474", "0.77700907", "0.7768979", "0.77649987", "0.77582353" ]
0.8126441
22
The Linked List will be empty after this call returns.
public void makeEmpty() { System.out.println("List is now empty"); head = null; tail = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public linkedList() { // constructs an initially empty list\r\n\r\n }", "public List() {\n\t\tthis.head = null; \n\t}", "public DLList() {\n head = null;\n tail = null;\n }", "public UtillLinkList() {\n\t\tlist = new LinkedList<String>();\n\t}", "public void clearList() {\n\t\thead = null;\n\t\tlength = 0;\n\t}", "public LinkList() {\n this.head = null;\n this.tail = null;\n }", "public LinkedList() {\n\t\thead = null;\n\t\tsize = 0;\n\t}", "public WCLinkedList(){\n size=0;\n head = null;\n tail = null;\n }", "public LinkedList () {\n\t\thead = null;\n\t\tcount = 0;\n\t}", "SELLbeholder() {\n listehode = new Node(null, null);\n }", "public LinkedList() {\n head = null;\n numElement = 0;\n }", "public DLListIterator() {\r\n node = head;\r\n nextCalled = false;\r\n }", "public void linkedListQueue(){\r\n\t\tfirst = null;\r\n\t\tlast = null;\r\n\t\tN = 0;\r\n\t}", "public LinkedList() {\n\t\titems = lastNode = new DblListnode<E>(null);\n\t\tnumItems=0;\n\t}", "public LinkedList() {\n\t\thead = null;\n\t\ttail = null;\n\t\tsize = 0;\n\t}", "public LinkedList() {\n\t\tfirst = null;\n\t}", "public SinglyLinkedList() {\n this.head = null; \n }", "public LinkedListStructureofaSinglyLinkedListClass() {\n\t\theadNode=null;\n\t\tsize=0;\n\t\t\n\t}", "public GenLinkedList() {\r\n\t\thead = curr = prev = null;\r\n\t}", "public void clearList() {\n\t\tthis.head = null;\n\t\tthis.tail = null;\n\t\tlength = 0;\n\t}", "public LinkedList(){\n this.size = 0;\n first = null;\n last = null;\n }", "public void clearLinkedList()\r\n {\r\n \tfirstNode = null;\r\n \tlength = 0;\r\n }", "public LinkedList()\n\t{\n\t\tthis.head = new Node(null);\n\t\tsize = 0;\n\t}", "public MyLinkedList() {\n length = 0;\n }", "public ObjectListNode() {\n info = null;\n next = null;\n }", "public LinkedList(){\n this.head = null;\n this.numNodes = 0;\n }", "public LinkedList()\n\t{\n\t\thead = null;\n\t}", "public SortedLinkedList() {\n\t\thead = null;\n\t}", "public SinglyLinkedList() {\n this.len = 0;\n }", "public SLList()\n {\n head = tail = null;\n }", "public LinkedList() {\n\t\thead = new Node(null, null);\n\t\tsize = 0;\n\t\titerator = null;\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 SLL() {\n\t\tsuper();\n\t\tthis.head = null;\n\t\tthis.size = 0;\n\t}", "public LinkedList() {\n this.head = null;\n this.tail = null;\n }", "myArrayList() {\n\t\thead = null;\n\t\ttail = null;\n\t}", "public MyLinkedList() {\n this.size = 0;\n this.head = new ListNode(0);\n }", "PublicLinkedList() {\n\t\tfront = back = null;\n\t}", "public LinkedListDemo() {\n\t\tlength = 0;\n\t\thead = new ListNode();\n\t\n\t}", "public LinkedList(){\n\t\thead = null;\n\t\ttail = null;\n\t}", "@Override\n public void makeEmpty() {\n this.head = null;\n this.tail = null;\n }", "@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 }", "public static LinkedList createEmpty(){\n return new LinkedList();\n }", "public void reset() {\n this.list.clear();\n }", "public void clearList()\n\t{\n\t\tnodeManager.clearList();\n\t}", "void operateLinkedList() {\n\n List linkedList = new LinkedList();\n linkedList.add( \"syed\" );\n linkedList.add( \"Mohammed\" );\n linkedList.add( \"Younus\" );\n System.out.println( linkedList );\n linkedList.set( 0, \"SYED\" );\n System.out.println( linkedList );\n linkedList.add( 0, \"Mr.\" );\n System.out.println( linkedList );\n\n\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 clear()\n {\n\tsize = 0;\n\thead = new SkipListNode<K>();\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}", "public MyLinkedList() {\n size = 0;\n head = null;\n tail = null;\n }", "public LL() {\n head = null;\n }", "public LinkedNode() {\n\t myNextNode = null;\n }", "public Lista()\n {\n empty=true;\n next = null;\n }", "public LinkedList(){\n size=0;\n }", "public MyLinkedList() {\n \thead = null;\n \ttail = null;\n }", "public LinkedList() \n\t{\n\t\thead = null;\n\t\ttail = head;\n\t}", "public LinkedList()\r\n {\r\n head = null;\r\n tail = null;\r\n }", "public void clear() {\n\t\thead.setNext(null);\n\t\tmodcount++;\n\t\tnodeCount = 0;\n\t}", "public DoublyLinkedList() {\r\n\t\tinitializeDataFields();\r\n\t}", "public void clear() {\n\t\thead = null;\n\t}", "public SinglyLinkedList() {\n this.head = null;\n this.tail = null;\n this.size = 0;\n }", "public void deleteList() {\n this.head = deleteListWrap(this.head);\n }", "public LinkedList()\n {\n head = null;\n tail = null;\n }", "public void clear() {\n\t\tnodeList.clear();\n\t}", "public void clear() {\n this.next = null;\n this.mList.clear();\n this.notifyDataSetChanged();\n }", "@Override\n\tpublic void clear() {\n\t\thead = null;\n\t\tsize = 0;\n\t}", "public DoubleLinkedList() {\n\t\thead = null;\n\t\ttail = null;\n\t\telements = 0;\n\t}", "public LinkedList()\r\n {\r\n front = null;\r\n rear = null;\r\n numElements = 0;\r\n }", "public LinkedList(){\n count = 0;\n front = rear = null;\n }", "public void Reset()\n {\n this.list1.clear();\n }", "public LinkedListOfEmployees() {\r\n\t\thead = null;\r\n\t}", "public void clear ()\n {\n headNode.next = null;\n currentNode = headNode;\n size = 0;\n }", "public InputLinkedList() \n\t{\n\t\thead = null;\n\t}", "public MyLinkedList() {\r\n // when the linked list is created head will refer to null\r\n head = null;\r\n }", "public void clear() {\n\t\thead = null;\n\t\tsize = 0;\n\n\t}", "public MyLinkedList() {\n dummyHead = new Node();\n size = 0;\n }", "public void deleteFirst(){\n\t\tDLLNode<T> newNode = head;\n\t\t//if the list is empty\n\t\tif ( size == 0 ){\n\t\t\t//set both the head and tail to null\n\t\t\thead = null;\n\t\t\ttail = null;\n\t\t\t//size decreases by 1\n\t\t\tsize--;\n\t\t}\n\t\telse{\n\t\t\t//assign head to the following node\n\t\t\thead = head.getNext();\n\t\t\t//set the previous node (ex-head) to null\n\t\t\thead.setPrev( null );\n\t\t\t//size decreases by 1\n\t\t\tsize--;\n\t\t}\n\t}", "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}", "protected void clear() {\n\n\t\tthis.myRRList.clear();\n\t}", "public SinglyLinkedList(){\n this.first = null;\n }", "@Override\n public void clear() {\n wordsLinkedList.clear();\n }", "public MyLinkedList() {\n first = null;\n n = 0;\n }", "public DesignLinkedList() {\n head = null;\n tail = head;\n len = 0;\n }", "public LinkedList () {\n\t\tMemoryBlock dummy;\n\t\tdummy = new MemoryBlock(0,0);\n\t\ttail = new Node(dummy);\n\t\tdummy = new MemoryBlock(0,0);\n\t\thead = new Node(dummy);\n\t\ttail.next = head;\n\t\thead.previous = tail;\n\t\tsize = 2;\n\t}", "public CustomSinglyLinkedList()\n {\n head = null;\n tail = head;\n size = 0;\n }", "public LinkedList()\n { \n first = null;\n \n }", "public CircularLinkedList()\n {\n current = null;\n size = 0;\n }", "public void clear() {\n head = null;\n numElement = 0;\n }", "@Override\r\n public void clear() {\r\n \r\n this.array = new LinkedList[capacity];\r\n \r\n this.size = 0;\r\n \r\n }", "public DoublyLinkedList(){\r\n\r\n\t\thead = null;\r\n\t\ttail = null;\r\n\t\tcount = 0;\r\n\t}", "void reinitialize() {\n super.reinitialize();\n head = tail = null;\n }", "public LinkedListGeneric() {\n head = null;\n }", "public void clear() {\n used = 0;\n head = -1;\n }", "public void removeAllItems()\r\n {\r\n head = tail = null;\r\n nItems = 0;\r\n }", "@Override\n public void clear() {\n head = null;\n size = 0;\n }", "public SinglyLinkedList()\n {\n first = null; \n last = null;\n }", "public SingleLinkedList() {\r\n start = null;\r\n System.out.println(\"A List Object was created\");\r\n }", "public void deleteWholeList()\n {\n head = null;\n }", "public DoubleLinked() {\n first = null;\n last = null;\n N = 0;\n }", "public ListADTImpl() {\r\n head = new GenericEmptyNode();\r\n }", "public List() {\n this.list = new Object[MIN_CAPACITY];\n this.n = 0;\n }" ]
[ "0.7282727", "0.722934", "0.7208099", "0.7194883", "0.71841735", "0.7142583", "0.708286", "0.7028296", "0.70141137", "0.70097893", "0.69998306", "0.6966012", "0.6941022", "0.6931853", "0.69304574", "0.6911331", "0.68955564", "0.68937147", "0.6889208", "0.6888233", "0.68878055", "0.6875633", "0.6865841", "0.6855722", "0.68549544", "0.68525726", "0.6850293", "0.6819698", "0.68124926", "0.6807536", "0.6796032", "0.6790945", "0.67838615", "0.677614", "0.6770383", "0.67616457", "0.6761262", "0.675833", "0.6755778", "0.67470044", "0.6741849", "0.67300904", "0.6729587", "0.6723733", "0.671223", "0.6711597", "0.67054033", "0.6701796", "0.6700977", "0.67004615", "0.66989475", "0.669757", "0.6692693", "0.66911006", "0.66765857", "0.66648644", "0.66616046", "0.6648099", "0.6634352", "0.66292995", "0.6618654", "0.66159064", "0.66009355", "0.65958965", "0.65932935", "0.65913", "0.6590934", "0.65891355", "0.6578361", "0.6566819", "0.65650177", "0.65603125", "0.65573853", "0.65494955", "0.6542445", "0.65360475", "0.65353787", "0.6534615", "0.65337175", "0.65312487", "0.65233904", "0.65101266", "0.65027183", "0.6494421", "0.6489476", "0.6488667", "0.6482724", "0.64782983", "0.6474039", "0.64689213", "0.6466099", "0.64634407", "0.6455358", "0.6452637", "0.64434874", "0.64361286", "0.64290684", "0.64283013", "0.6414185", "0.64113176" ]
0.7118672
6
Creates a String that lists the nodes of the linked list. Head > A > B > C > Tail
public String toString() { if (head == null && tail == null) { return null; } else if (head.getNext() == null) { return head.getData(); } else { while (head.getNext() != null) { head = head.getNext(); System.out.println(head.getData()); } return head.getData(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String toString() {\n String str = head.getValue() + \"->\";\n Node holder = head.getNext();\n for (int i = 2; i < size(); i++) {\n str = str + holder.getValue() + \"->\";\n holder = holder.getNext();\n }\n str = str + tail.getValue();\n return str;\n }", "public void printList()\n {\n String str = \"head > \";\n \n if(head == null)\n {\n str += \"null\";\n }\n else if(head.next == head)\n {\n str += head.data + \" (singly-linked, circular)\";\n }\n else\n {\n Node current = head;\n \n //While loop to create the string of all nodes besides the last one\n while(current.next != head)\n {\n str += current.data + \" > \";\n \n current = current.next;\n }\n \n str += current.data + \" (singly-linked, circular)\";\n }\n \n System.out.println(str);\n }", "public String toString ()\n {\n String str = \"\";\n Node nodeRef = head;\n for (int i = 0; i < size&& nodeRef!= null; i++) {\n str = str + nodeRef.data + \"\\n\";\n nodeRef = nodeRef.next;}\n return str;\n }", "public String toString(){\n String result = \"\";\n ListNode current = front;\n while(current != null){\n result = result + current.toString() + \"\\n\";\n current = current.getNext();\n }\n return result;\n }", "public String toString() {\n\t\t// Anmerkung: StringBuffer wäre die bessere Lösung.\n\t\tString text = \"\";\n\t\tListNode<E> p = head;\n\t\twhile (p != null) {\n\t\t\ttext += p.toString() + \" \";\n\t\t\tp = p.getTail();\n\t\t}\n\t\treturn \"( \" + text + \") \";\n\t}", "@Override\n public String toString(){\n Node curr=this.head;\n String str=\"\";\n while(curr!=null){\n str+=(curr.data + \" -> \");\n curr=curr.next;\n }\n return str;\n }", "@Override\n public String toString(){\n Node curr=this.head;\n String str=\"\";\n while(curr!=null){\n str+=(curr.data + \" -> \");\n curr=curr.next;\n }\n return str;\n }", "public String toString()\n\t{\n\t\tNode current = head.getNext();\n\t\tString output = \"\";\n\t\t\n\t\twhile(current != null){\n\t\t\toutput += \"[\" + current.getData().toString() + \"]\\n\";\n\t\t\tcurrent = current.getNext();\n\t\t}\n\t\t\n\t\treturn output;\n\t}", "@Override\n public String toString(){\n String str = \"\";\n DLNode<T> current = first;//a reference to the first node\n while (current != null) {//loop as long as we reach the end of the list\n str += current + \"\\n\";//store current element in a String at every iteration\n current = current.next;\n }\n return str;\n }", "public String toString() {\n\t\tString str = \"\";\n\t\tNode current = head;\n\t\tstr += \"[ \";\n\t\twhile (current != null) {\n\t\t\tstr += current.value;\n\t\t\tif (current.next != null) {\n\t\t\t\tstr += \", \";\n\t\t\t}\n\n\t\t\tcurrent = current.next;\n\t\t}\n\t\tstr += \" ]\";\n\n\t\treturn str;\n\t}", "@Override\n public String toString() {\n String ret = \"\";\n Node curr = head;\n while (curr != null) {\n ret += curr.data + \" \";\n curr = curr.next;\n }\n return ret;\n }", "public String toString()\n { \t\n \t//initialize String variable to return \n \tString listString = \"\";\n \t//create local node variable to update in while loop\n LinkedListNode<T> localNode = getFirstNode();\n \n //concatenate String of all nodes in list\n while(localNode != null)\n {\n listString += localNode.toString();\n localNode = localNode.getNext();\n }\n \n //return the string to the method\n return listString;\n }", "@Override\n public String toString(){\n Node<E> headPtr = headNode;\n StringBuffer buff= new StringBuffer();\n buff.append(\"[\");\n while(headPtr!=null){\n buff.append(headPtr.data);\n headPtr=headPtr.next;\n if(headPtr!=null)\n buff.append(\",\");\n }\n buff.append(\"]\");\n return buff.toString();\n }", "public String toString()\n\t{\n\t\tString stringList = \"\";\n\t\tNode temp = front;\n\t\twhile(temp != null)\n\t\t{\n\t\t\tstringList += String.valueOf(temp.data) + \" \"; //places the data from the Node into the empty string\n\t\t\ttemp = temp.next; //moevs onto the next Node in the list\n\t\t}\n\t\treturn stringList;\n\t}", "public String toString() { // display the linked list\n\t\tString output = \"\";\n\t\tNode<E> current = head;\n\t\twhile (current != null) {\n\t\t\toutput += \"[\" + current.getValue().toString() + \"]\";\n\t\t\tcurrent = current.getNext();\n\t\t}\n\t\treturn output;\n\t}", "public String toString() {\n//\t\tif (isEmpty()) {\n//\t\t\treturn null;\n//\t\t}\n\t\t//create a string that holds the value of the list\n\t\t//held inside curly braces for my viewing pleasure\n\t\tString s = \"\";\n\t\t//if the list is not empty\n\t\tif (isEmpty()!= true) {\n\t\t\t//create a node and set it to the head\n\t\t\tLinkedListNode<T> curNode = head;\n\t\t\t\t//while the current node isn't null\n\t\t\t\twhile (curNode != null) {\n\t\t\t\t\t//add the data in the node to my string\n\t\t\t\t\ts += curNode.getData();\n\t\t\t\t\t//set current node to be the next node\n\t\t\t\t\tcurNode = curNode.getNext();\n\t\t\t\t}\n\t\t}\n\t\t//return the final string\n\t\treturn s;\n\t}", "public String toString()\n\t{\n\n if ( !isEmpty() )\n\t\t{ \n Node tNode = head;\n String str = tNode.item;\n\t\t\twhile (tNode.next != null)\n\t\t\t{\n\t\t\t\ttNode = tNode.next;\n str = str + \" -> \" + tNode.item;\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t\treturn null;\n\t\t//return \"\";\n }", "public String toString()\n {\n StringBuilder output = new StringBuilder(\"\");\n Node p = head;\n while (p != null)\n {\n if (p.data.length() > 1)\n output.append(\"\\t\");\n output.append(p.data + \"\\n\");\n p = p.next;\n }\n\n return new String(output);\n }", "public String toString() {\n\n\t\tString s = \"\";\n\t\tNode N = head;\n\t\twhile (N != null) {\n\t\t\ts += N.item + \" \";\n\t\t\tN = N.next;\n\t\t}\n\t\treturn s;\n\n\t}", "public String toString() {\r\n\t\tNode<E> current = head;\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\twhile (current != null) {\r\n\t\t\tsb.append(\",\" + current.data);\r\n\t\t\tcurrent = current.next;\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "public String toString() {\n\t\t//if list is empty\n\t\tif ( head == null ) {\n\t\t\treturn \"list is empty\";\n\t\t} else {\n\t\t\tString str = head.toString();\n\t\t\tfor ( DLLNode<T> node = head.getNext(); node != null; node = node.getNext() ) {\n\t\t\t\tstr += \">\" + node.getData().toString();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}", "public String toString(){\n\t\tString list=\"\";\n\t\tif(isEmpty()==false){\n\t\t\tDoubleNode temp=head;\n\t\t\twhile(temp!=null){\n\t\t\tlist += temp.getC();\n\t\t\ttemp=temp.getNext();\n\t\t\t}\n\t\t\treturn list;\n\t\t}\n\t\telse{\n\t\t\treturn list;\n\t\t}\n\t}", "public String toString() {\n//\t\tif(this.head == null){\n//\t\t\treturn \"1\";\n//\t\t}\n\t\tNode current_node = this.head;\n\t\tString s = current_node.toString();\n\t\twhile(current_node.next != null){\n\t\t\ts += \" * \";\n\t\t\ts += current_node.next.toString();\n\t\t\tcurrent_node = current_node.next;\n\t\t}\n\t\treturn s;\n\t}", "public String toString() {\n\n\t\tif (head == null) {\n\t\t\treturn \"[empty list]\";\n\t\t}\n\t\tDLNode n = head;\n\t\tStringBuilder s = new StringBuilder();\n\t\ts.append(\"[\");\n\n\t\tfor (int i = 0; i < nodeCounter(); i++) {\n\n\t\t\tif (i != 0) {\n\t\t\t\ts.append(\", \");\n\t\t\t}\n\n\t\t\tif (n.val != Integer.MIN_VALUE) {\n\t\t\t\ts.append(n.val);\n\t\t\t} else if (n.list != null) {\n\t\t\t\ts.append(n.list.toString());\n\t\t\t} else {\n\t\t\t\ts.append(\"X\");\n\t\t\t}\n\t\t\tn = n.next;\n\n\t\t}\n\t\ts.append(\"]\");\n\t\tString s1 = s.toString();\n\n\t\treturn s1;\n\n\t}", "public String toString() {\n String str = \"\";\n if(n == 0) {\n str = \"LinkedList is empty\";\n }\n for(Node x = first; x != null; x = x.next) {\n str += \"[\" + x.data + \"]\";\n }\n return str;\n }", "@Override\r\n\tpublic String toString() {\r\n\t\tString list = \"List Contents: \\n\";\r\n\t\tSNode<T> iterator = this.getHead().getPrev();\r\n\t\twhile (iterator != tail) {\r\n\t\t\tlist += iterator.toString() + \" \\n\";\r\n\t\t\titerator = iterator.getPrev();\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "@Override\r\n public String toString() {\r\n String str = \"[\";\r\n if (!isEmpty()) {\r\n Node<T> current = head.next();\r\n while (current != tail) {\r\n str = str + current.getData();\r\n if (current.next != tail) {\r\n str = str + \", \";\r\n }\r\n current = current.next();\r\n }\r\n }\r\n return str + \"]\";\r\n }", "public String toString() {\n StringBuilder s = new StringBuilder(\"{\");\n\n Node<T> next;\n if (start != null) {\n next = start;\n s.append(next);\n next = next.next;\n while (next != null) {\n s.append(\", \" + next);\n next = next.next;\n }\n }\n s.append(\"}\");\n return s.toString();\n }", "public String toString() {\n StringBuilder s = new StringBuilder();\n Node current = head;\n for(int i=0; i < size; i++) {\n s.append(\"[\");\n s.append(current.item);\n s.append(\"], \");\n current = current.next;\n }\n\n return s.toString();\n }", "public String toString(){\n String result = \"\";\n LinearNode<T> trav = front;\n while (trav != null){\n result += trav.getElement();\n trav = trav.getNext();\n }\n return result;\n }", "public String toString(){\n String re = null;\n Node tmp = head;\n while(tmp != null) {\n re = re + \" \" + tmp.element.toString();\n }\n return re;\n }", "public String printList() {\n String str = \"\";\n Node<T> currentNode = head;\n\n if(head == null)\n return \"Empty List\";\n else {\n while (currentNode.next != null) {\n str += currentNode.data + \",\";\n currentNode = currentNode.next;\n }\n str += currentNode.data;\n //System.out.println(str);\n }\n return str;\n }", "public String toString () {\n\t\tString result = \"\";\n\t\tNode <E> current = head;\n\t\twhile(current != null){\n\t\t\tresult += current.value + \", \";\n\t\t\tcurrent = current.next;\n\n\t\t}\n\t\tSystem.out.print(\"List: \" + result);\n\t\treturn \"List: \" + result;\n\t}", "public void displayNodes() {\n Node node = this.head;\n StringBuilder sb = new StringBuilder();\n while (node != null) {\n sb.append(node.data).append(\" \");\n node = node.next;\n };\n\n System.out.println(sb.toString());\n }", "public String toString() {\r\n StringBuilder sb = new StringBuilder(\"(\");\r\n Node<E> walk = head;\r\n while (walk != null) {\r\n sb.append(walk.getItem());\r\n if (walk != tail)\r\n sb.append(\", \");\r\n walk = walk.getNext();\r\n }\r\n sb.append(\")\");\r\n return sb.toString();\r\n }", "public String toString() {\n\t\tString result = \"[\";\n\t\tif (head == null) {\n\t\t\treturn result + \"]\";\n\t\t}\n\t\tresult = result + head.getData();\n\t\tListNode temp = head.getNext();\n\t\twhile (temp != null) {\n\t\t\tresult = result + \",\" + temp.getData();\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\treturn result + \"]\";\n\t}", "public String toString() {\n\t\tString result = \"[\";\n\t\tif (head == null) {\n\t\t\treturn result + \"]\";\n\t\t}\n\t\tresult = result + head.getData();\n\t\tListNode temp = head.getNext();\n\t\twhile (temp != null) {\n\t\t\tresult = result + \",\" + temp.getData();\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\treturn result + \"]\";\n\t}", "public String toString() {\n StringBuilder contents = new StringBuilder();\n Node curNode = head;\n\n while(curNode != null) {\n contents.append(curNode.item);\n curNode = curNode.nextNode;\n\n if(curNode != null) {\n contents.append(\", \");\n }\n }\n return contents.toString();\n }", "public String toString() {\n\t\t\tString result = \"\";\n\t\t\tif (head == null) {\n\t\t\t\treturn result+\"\\n\";\n\t\t\t}\n\t\t\tresult = result + head.getValue();\n\t\t ElementDPtr temp = head.getNext();\n\t\t\twhile (temp != null) {\n\t\t\t\tresult = result + \"\\n\" + temp.getValue();\n\t\t\t\ttemp = temp.getNext();\n\t\t\t}\n\t\t\treturn result + \"\";\n\t\t}", "public String toString() {\n \n StringBuffer sb = new StringBuffer();\n \n SingleNode current = head;\n while (current != null) {\n sb.append(current.getData());\n sb.append(\" \");\n current = current.getNext();\n }\n return \"List = \" + sb.toString();\n }", "public String toString() {\n if (head != null) {\n String str = \"\";\n Node node = head;\n while (node.next != null) {\n str += (node.data) + \", \";\n node = node.next;\n }\n str += (node.data);\n return str;\n } else {\n return \"Steque is empty.\";\n }\n }", "public String returnList() {\n\n String str = \"\";\n Node<T> currentNode = head;\n\n while (currentNode.next != null) {\n\n str += currentNode.data + \" \";\n currentNode = currentNode.next;\n\n }\n\n str = str + currentNode.data;\n return str;\n\n }", "public String toString() {\n // TODO: implement this method\n ListNode curr = nil.next();\n String retVal = \"[\";\n\n while(curr != nil){\n\n if(curr.isActive()){\n retVal += \" *\" + curr.value().toString() + \"*\" ;\n }else{\n retVal += \" \" + curr.value().toString() ;\n }\n\n curr = curr.next();\n }\n\n return retVal + \" ]\";\n }", "@Override\n public String toString(){\n String result = \"\";\n Node n = first;\n while(n != null){\n result += n.value + \" \";\n n = n.next;\n }\n return result;\n }", "public String toString()\n\t{\n\t\t//string to print out\n\t\tString printOut = \"\";\n\t\t//set the current node to head\n\t\tLinkedListNode<T> currentNode = head;\n\t\t//go through the list\n\t\twhile (currentNode.getNext() != null){\n\t\t\t//add to the string\n\t\t\tprintOut += currentNode.getData().toString() + \" \";\n\t\t\t//set the current node to next node\n\t\t\tcurrentNode = currentNode.getNext(); \n\t\t}\n\t\tprintOut += getLastNode().getData().toString();\n\t\treturn printOut;\n\t}", "public String toString()\n\t{\n\t\tString answer;\n\t\t//if the size not 0, indent 9 spaces to make room for the \"(null)<--\" that backwards will print\n\t\tif (size() != 0)\n\t\t\tanswer = \" \";\n\t\telse\n\t\t\tanswer = \"\";\n\n\t\tDLLNode cursor = head;\n\t\twhile (cursor != null)\n\t\t{\n\t\t\tanswer = answer + cursor.data + \"-->\";\n\t\t\tcursor = cursor.next;\n\t\t}\n\n\t\tanswer = answer + \"(null)\";\n\t\treturn answer;\n\t}", "public String toString(){\n String s = \"\";\n Node N = front;\n while( N != null){\n s += N.key + \" \" + N.value + \"\\n\"; \n N = N.next;\n }\n return s;\n }", "public String toString() {\n\t\tStringBuilder temp = new StringBuilder();\n\n\t\tfor (int index = 0; index < verticesNum; index++) {\n\t\t\tif(list[index] == null)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttemp.append(\"node:\");\n\t\t\ttemp.append(index);\n\t\t\ttemp.append(\": \");\n\t\t\ttemp.append(list[index].toString());\n\t\t\ttemp.append(\"\\n\");\n\t\t}\n\n\t\treturn temp.toString();\n\t}", "public String concatenate() {\n\t\t// loop over each node in the list and \n\t\t// concatenate into a single string\n\t\tString concatenate = \"\";\n\t\tNode nodref = head;\n\t\twhile (nodref != null){\n\t\t\tString temp = nodref.data;\n\t\t\tconcatenate += temp;\n\t\t\tnodref = nodref.next;\n\t\t}\n\t\treturn concatenate;\n\t}", "@Override\r\n public String toString() {\r\n \r\n StringBuilder sb = new StringBuilder();\r\n HTreeNode listrunner = getHeadNode();\r\n while (listrunner != null) {\r\n sb.append(listrunner.getCharacter());\r\n //no comma after the final element\r\n if (listrunner.getNext() != null) {\r\n sb.append(',');\r\n sb.append(' ');\r\n }\r\n listrunner = listrunner.getNext();\r\n }\r\n return sb.toString();\r\n }", "public String toString() {\n\t\tNode current = top;\n\t\tStringBuilder s = new StringBuilder();\n\t\twhile (current != null) {\n\t\t\ts.append(current.value + \" \");\n\t\t\tcurrent = current.next;\n\t\t}\n\n\t\treturn s.toString();\n\t}", "public String toString()\n {\n String out = \"SLList contains: \\n\";\n SLListNode ref = head;\n if(isEmpty())\n return out + \"0 Nodes\";\n else\n out+=\"head :\" + ref.data +\"\\n\";\n int j =1;\n while(ref.next!=null){\n \n out+=ref.data + \"\\t->\\t\";\n if(j%5 ==0)\n out+=\"\\n\";\n ref=ref.next;\n ++j;\n }\n out+=ref.data + \"\\t->\\tnull\";\n return out;\n }", "@Override\r\n\tpublic String toString() {\r\n\t\tString result = \"\";\r\n\t\tif (!this.isEmpty()) {\r\n\t\t\tfor (ListNode<E> iter = this.first(); iter != null; iter = iter.next) {\r\n\t\t\t\tresult += iter + \", \";\r\n\t\t\t}\r\n\t\t\tresult += \"\\n\";\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@Override\n public String toString() {\n return \"LinkedList{\"\n + \"head=\" + head\n + \", numElement=\" + numElement\n + '}';\n }", "public String toString()\n {\n String s = \"[\";\n\n ListNode temp = first; // start from the first node\n while (temp != null)\n {\n s += temp.getValue(); // append the data\n temp = temp.getNext(); // go to next node\n if (temp != null)\n s += \", \";\n }\n s += \"]\";\n return s;\n }", "public String toString() {\n String result = \"[]\";\n if (length == 0) return result;\n result = \"[\" + head.getNext().getData();\n DoublyLinkedList temp = head.getNext().getNext();\n while (temp != tail) {\n result += \",\" + temp.getData();\n temp = temp.getNext();\n }\n return result + \"]\";\n }", "public String toString () {\n return \"(\" + this.head() +\n this.tail().continueString();\n }", "public String display() {\n \tif (size != 0) {\n String str = \"\";\n Node temp = head;\n while (temp != null) {\n str += temp.value + \", \";\n temp = temp.next;\n }\n return str.substring(0, str.length() - 2);\n }\n return \"\";\n }", "@Override\n public String toString() {\n StringBuilder string = new StringBuilder();\n Node<E> node = first;\n string.append(\"size=\").append(size).append(\", [\");\n for (int i = 0; i < size; i++) {\n if (i != 0) {\n string.append(\", \");\n }\n string.append(node);\n node = node.next;\n }\n string.append(\"]\");\n return string.toString();\n }", "@Override\n public String toString() {\n // System.out.print(\"This doubly-linked list contains : \");\n StringBuilder sb = new StringBuilder();\n\n if(header == trailer) {\n sb.append(\"null\");\n }\n else {\n Node<Element> pointer = header.getNextNode();\n while (pointer != trailer) {\n sb.append(pointer.getContent()).append(\", \");\n pointer = pointer.getNextNode();\n }\n }\n return sb.toString();\n }", "@Override\n public String toString() {\n \t\n \t//call method is empty to check if there is a first node\n if (isEmpty()) {\n return nameList + \" is empty\";\n }\n \n //here StringBuilder is used to make sentence: \"The (name of list) id\"\n StringBuilder buffer = new StringBuilder();\n buffer.append(\"The \").append(nameList).append(\" contains:\\n\");\n \n //create current node and assign it to first node\n Node<T> current = firstNode;\n \n \n //while current node has next node, retrieve data from current node and append a \",\" to make it readeble\n while (current != null) {\n buffer.append(current.getData()).append(\"\");\n current = current.getNext();\n }\n return buffer.toString();\n }", "public String join() {\n\t\t// A stringbuilder is an efficient way to create a new string in Java, since += makes copies.\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (Node<T> current = start; current != null; current = current.next) {\n\t\t\tif (current != start) {\n\t\t\t\tsb.append(' ');\n\t\t\t}\n\t\t\tsb.append(current.value);\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String toString() {\n if (first.p == null) return \"\";\n StringBuilder sb = new StringBuilder();\n Node n = first;\n while (!n.next.equals(first)) {\n sb.append(n.p.toString() + \"\\n\");\n n = n.next;\n }\n sb.append(n.p.toString() + \"\\n\");\n return sb.toString();\n }", "@Override\n public String toString() {\n if (head == null) {\n // Empty list\n return \"\";\n } else {\n return head.toString();\n }\n }", "private static void printNodeList(ListNode head) {\n StringBuilder sb = new StringBuilder();\n\n while (head != null) {\n sb.append(head.val);\n sb.append(\"->\");\n head = head.next;\n }\n sb.append(\"null\");\n\n System.out.println(sb.toString());\n }", "public String toString(){\n String result = \"{\";\n for(LinkedList<E> list : this.data){\n for(E item : list){\n result += item.toString() + \", \";\n }\n }\n result = result.substring(0, result.length() -2);\n return result + \"}\";\n }", "public String toString()\n {\n if(this.head == null)\n return \"Lista je prazna!\";\n\n Vaspitac v = this.head;\n\n String str = \"[ \";\n while(v != null)\n {\n str += \"\\n\" + v.ime + \"\\n\\t\" + v + \"\\n\";\n v = v.next;\n }\n str += \"]\";\n return str;\n }", "public String toString() {\n\t\tif (front == null) {\n\t\t\treturn \"[]\";\n\t\t} else {\n\t\t\tString result = \"[\" + front.data;\n\t\t\tListNode current = front.next;\n\t\t\twhile (current != null) {\n\t\t\t\tresult += \", \" + current.data;\n\t\t\t\tcurrent = current.next;\n\t\t\t}\n\t\t\tresult += \"]\";\n\t\t\treturn result;\n\t\t}\n\t}", "public String toString(){\r\n\t DoubleLinkedSeq clone = new DoubleLinkedSeq(); \r\n\t clone = this.clone();\r\n\t String elements = \"{\";\r\n\t for(clone.cursor = head; clone.cursor != null; clone.cursor = clone.cursor.getLink()){\r\n\t\t elements = elements + (clone.cursor.getData() + \",\"); \r\n\t }\r\n\t \r\n\t elements = elements + \")\";\r\n\t \r\n\t return elements; \r\n }", "@Override\n\tpublic String toString()\n\t{\n\n\t\tStringBuffer sb = new StringBuffer(\"top->\");\n\t\tif (!isEmpty())\n\t\t{\n for(int i = getSize() - 1; i >= 0; i--)\n {\n if(i == getSize() - 1)\n {\n sb.append(list.get(i));\n }\n else \n {\n sb.append( \"->\" + list.get(i));\n }\n }\n //System.out.println(sb.toString());\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String toString(){\r\n\t\tString str = \"|\";\r\n\t\tArrayNode<T> temp = beginMarker.next;\r\n\t\twhile (temp != endMarker){\r\n\t\t\tstr+= temp.toString() + \"|\";\r\n\t\t\ttemp = temp.next;\r\n\t\t}\r\n\t\treturn str;\r\n\t}", "public String toListString() {\n\t\treturn head.toListString(); \n\t}", "@Override\n public String toString() {\n String str = \"graph [\\n\";\n\n Iterator<Node<E>> it = iterator();\n\n //Node display\n while(it.hasNext()){\n Node n = it.next();\n\n str += \"\\n\\tnode [\";\n str += \"\\n\\t\\tid \" + n;\n str += \"\\n\\t]\";\n }\n\n //Edge display\n it = iterator();\n\n while(it.hasNext()){\n Node n = it.next();\n\n Iterator<Node<E>> succsIt = n.succsOf();\n while(succsIt.hasNext()){\n Node succN = succsIt.next();\n\n str += \"\\n\\tedge [\";\n str += \"\\n\\t\\tsource \" + n;\n str += \"\\n\\t\\ttarget \" + succN;\n str += \"\\n\\t\\tlabel \\\"Edge from node \" + n + \" to node \" + succN + \" \\\"\";\n str += \"\\n\\t]\";\n }\n }\n\n str += \"\\n]\";\n\n return str;\n }", "public String toString() {\n String toReturn = \"\";\n\n Node walker = this.first;\n while(walker != null) {\n toReturn += walker.data + \"\\t\";\n walker = walker.next;\n }\n\n return toReturn;\n }", "private static void printList() {\n\tNode n=head;\n\tint size=0;\n\twhile(n!=null)\n\t{\n\t\tSystem.out.print(n.data+\" \");\n\t\tn=n.next;\n\t\tsize++;\n\t}\n\tn=head;\n\tfor(int i=0;i<size-1;i++)\n\t\tn=n.next;\n\tSystem.out.println(\"\\nreverse direction\");\n\twhile(n!=null)\n\t{\n\t\t\n\t\tSystem.out.print(n.data+\" \");\n\t\tn=n.prev;\n\t}\n\t\n}", "public String toString()\r\n {\n \tString result = \"\";\r\n \tNode n = this.top;\r\n \twhile (n != null)\r\n \t{\r\n \t\tresult = result + \" \" + n.getItem().toString();\r\n \t\tn = n.getNext();\r\n \t}\r\n \treturn result.trim();\r\n }", "public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"<\" + mainList.input);\n for (MainNode n = mainList.mainNext; n != null; n = n.mainNext) {\n if (n.next == null) {\n sb.append(\", \" + n.input);\n } else {\n for (NextNode m = n.next; m != null; m = m.next) {\n sb.append(\", \" + m.input);\n }\n sb.append(n.input);\n }\n }\n sb.append(\">\");\n return sb.toString();\n }", "private String linkString()\n {\n Iterator<DSAGraphNode<E>> iter = links.iterator();\n String outputString = \"\";\n DSAGraphNode<E> node = null;\n while (iter.hasNext())\n {\n node = iter.next();\n outputString = (outputString + node.getLabel() + \", \");\n }\n return outputString;\n }", "public void display() {\r\n\t\tNode curr = new Node();\r\n\t\tcurr = head;\r\n\t\tString Output = \"Here is the linked list from the head node till the end\";\r\n\t\twhile (curr != null) {\r\n\t\t\tOutput += \"\\n\" + curr.num + \", \" + curr.str;\r\n\t\t\tcurr = curr.next;\r\n\t\t}\r\n\t\tSystem.out.print(Output);\r\n\t}", "public String toString() {\r\n\t\t\tListNode current = header;\r\n\t\t\tString s = \"\";\r\n\t\t\twhile (current != null) {\r\n\t\t\t\ts += \"k: \" + current.key + \" v: \" + current.value + \"\\n\";\r\n\t\t\t\tcurrent = current.next;\r\n\t\t\t}\r\n\t\t\treturn s;\r\n\t\t}", "public String toString() {\r\n\t\tString result = \"[ \";\r\n\t\tLinkedNode nextNode = firstNode;\r\n\t\twhile (nextNode != null) {\r\n\t\t\tresult = result + nextNode.getKey() + \"\\n\";\r\n\t\t\tnextNode = nextNode.getNextNode();\r\n\t\t}\r\n\t\tresult = result + \" ]\";\r\n\t\treturn result;\r\n\t}", "@Override\r\n public String toString() {\r\n String toReturn = \"\";\r\n for (ListNode n : wordList) {\r\n toReturn += n.toString();\r\n }\r\n return toReturn;\r\n }", "public String toString() {\n\t\tStringBuffer rtn = new StringBuffer(\"\\nLinked List Hash:\" + hashCode());\n\t\tcurrent = start;\n\t\tint counter = 0;\n\t\twhile (current.next != null) {\n\t\t\trtn.append(\n\t\t\t\t\t\"\\nList item #\" + (++counter) + \" Hash: \" + current.hashCode()\n\t\t\t\t\t+ \"\\n\\t \" + current.item.getClass().getSimpleName()\n\t\t\t\t\t+ current.item.hashCode()\n\t\t\t//\t\t\t\t\t+ \"\\n\" + current.item + \"\\n\"\n\t\t\t//\t + \"Prev list item: \" + current.prev.hashCode()\n\t\t\t//\t\t+ \"\\nNext list item: \" + current.next.hashCode()\n\t\t\t);\n\t\t\tcurrent = current.next;\n\t\t}\n\t\trtn.append(\n\t\t\t\t\"\\nList item #\" + (++counter) + \" Hash: \" + current.hashCode()\n\t\t\t\t+ \"\\n\\t\" + current.item.getClass().getSimpleName()\n\t\t\t\t+ current.item.hashCode()\n\t\t\t\t//\t\t\t\t+ \"\\n\" + current.item + \"\\n\"\n\t\t\t\t//\t\t\t\t+ \"Prev list item: \" + current.prev.hashCode()\n\t\t\t\t+ \"\\n\\tThis is the final item.\"\n\t\t);\n\t\treturn rtn.toString();\n\t}", "static\nvoid\nprintList(Node head) \n\n{ \n\nwhile\n(head != \nnull\n) \n\n{ \n\nSystem.out.print(head.data + \n\" \"\n); \n\nhead = head.next; \n\n} \n\n\n}", "public String toString() {\r\n\t\tString cad = \"\";\r\n\t\tfor (int i = 0; i < nodes_.size(); i++) {\r\n\t\t\tcad += nodes_.get(i).getVal() + \" - \";\r\n\t\t}\r\n\t\treturn cad;\r\n\t}", "public static <T>\n String toString(DoubleLinked<T> list) {\n String result = \"[\";\n String nextString;\n for(Iterator<T> it = list.iterator(); it.hasNext();) {\n result += it.next().toString();\n String append = it.hasNext() ? \", \" : \"]\";\n result += append;\n }\n return result;\n }", "public String toString(ListNode root) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tListNode tmp = root;\n\t\twhile (tmp != null) {\n\t\t\tsb.append(tmp.val).append(\", \");\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tMercatorNode node = head;\n\t\tint depth = 0;\n\t\twhile (node != null) {\n\t\t\tsb.append(depth++ + \" \" + node.toString() + \"\\n\");\n\t\t\tnode = node.getNext();\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "public void printList() \r\n\t { \r\n\t Node tnode = head; \r\n\t while (tnode != null) \r\n\t { \r\n\t System.out.print(tnode.data+\" \"); \r\n\t tnode = tnode.next; \r\n\t } \r\n\t }", "public String toString()\r\n/* 112: */ {\r\n/* 113:199 */ String s = \"\";\r\n/* 114:200 */ for (N node : getNodes())\r\n/* 115: */ {\r\n/* 116:201 */ s = s + \"\\n{ \" + node + \" \";\r\n/* 117:202 */ for (N suc : getSuccessors(node)) {\r\n/* 118:203 */ s = s + \"\\n ( \" + getEdge(node, suc) + \" \" + suc + \" )\";\r\n/* 119: */ }\r\n/* 120:205 */ s = s + \"\\n} \";\r\n/* 121: */ }\r\n/* 122:207 */ return s;\r\n/* 123: */ }", "public String toString(){\n\t\tStringBuffer sb = new StringBuffer();\n\t\tTList<T> root = this.getRoot();\n\t\tif (root == this) \n\t\t\tsb.append(\"*\");\n\t\tif (root.visited())\n\t\t\tsb.append(\"-\");\n\t\tsb.append(root.getValue());\n\t\twhile (root.hasNext()) {\n\t\t\tsb.append(\" -> \");\n\t\t\troot = root.getNext();\n\t\t\tif (root == this) \n\t\t\t\tsb.append(\"*\");\n\t\t\tif (root.visited())\n\t\t\t\tsb.append(\"-\");\n\t\t\tsb.append(root.getValue());\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String toString() {\n\t\tString result = \"\";\n\t\tNode current = head;\n\n\t\twhile(current != null) {\n\t\t\tif (current.getCar() instanceof GasCar) {\n\t\t\t\tresult += ((GasCar)current.getCar()).getData() + \"\\n\";\n\t\t\t} else if (current.getCar() instanceof GreenCar) {\n\t\t\t\tresult += ((GreenCar)current.getCar()).getData() + \"\\n\";\n\t\t\t}\n\t\t\tcurrent = current.getNext();\n\t\t}\n\t\treturn result;\n\t}", "public String toString() {\r\n \r\n String resultn = \"\";\r\n int index = 0;\r\n while (index < list.size()) {\r\n resultn += \"\\n\" + list.get(index) + \"\\n\"; \r\n index++; \r\n } \r\n return getName() + \"\\n\" + resultn + \"\\n\";\r\n \r\n }", "@Override\n public String toString() {\n return \"Node{\" +\n \"course=\" + course +\n \", nextNode=\" + nextNode +\n '}';\n }", "public @Override String toString() {\n String res= \"[\";\n // invariant: res = \"[s0, s1, .., sk\" where sk is the object before node n\n for (Node n = sentinel.succ; n != sentinel; n= n.succ) {\n if (n != sentinel.succ)\n res= res + \", \";\n res= res + n.data;\n }\n return res + \"]\";\n }", "public String toString() {\n\t\t//TO DO\n\t\tStringBuilder s = new StringBuilder();\n\t\t\n\t\tNode<ArrayList<Book>> current = head;\n\t\t\n\t\twhile (current != null) {\n\t\t\t//System.out.print(current.letter );\n\t\t\t\n\t\t\ts.append(current.letter + \":\");\n\t\t\tfor(int i = 0; i < current.data.size(); i++) {\n\t\t\t\ts.append(current.data.get(i).getTitle());\n\t\t\t\tif (i != current.data.size() -1 ) {\n\t\t\t\t\ts.append(\", \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t//s.append(current.data.toString());//current.data is an array list of books\n\t\t\t\n\t\t\ts.append(System.getProperty(\"line.separator\"));\n\t\t\tcurrent = current.next;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn s.toString();\n\n\t}", "public String toString(ListNode l) {\n\t\t\t\tString result=\"[\";\n\t\t\t\tif(l==null) {\n\t\t\t\t\treturn result+\"]\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tresult=result+l.getData();\n\t\t\t\t\tListNode curr=l.getNext();\n\t\t\t\t\twhile(curr!=null) {\n\t\t\t\t\t\tresult=result+\",\"+curr.getData();\n\t\t\t\t\t\tcurr=curr.getNext();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn result+\"]\";\n\t\t\t\t\n\t\t\t}", "private void createNodes() {\n head = new ListNode(30);\n ListNode l2 = new ListNode(40);\n ListNode l3 = new ListNode(50);\n head.next = l2;\n l2.next = l3;\n }", "@Override\n public final String toString() {\n final StringBuilder nodes = new StringBuilder();\n nodes.append(this.sizeNodes()).append(\" Nodes: {\");\n final StringBuilder edges = new StringBuilder();\n edges.append(this.sizeEdges()).append(\" Edges: {\");\n for (final Node<N> node : this.getNodes()) {\n nodes.append(node.toString()).append(',');\n }\n for (final Edge<N, E> edge : this.getEdges()) {\n edges.append(edge.toString()).append(',');\n }\n final String newLine = System.getProperty(\"line.separator\");\n nodes.append('}').append(newLine).append(edges).append('}').append(newLine);\n return nodes.toString();\n }", "public String toString()\n {\n String result = \"\";\n\n Node first = this.first;\n while (first != null) {\n result += \"X = \" + first.getX() + \"\\n\";\n result += \"Y = \" + first.getY() + \"\\n\";\n result += \"X2 = \" + first.getX2() + \"\\n\";\n result += \"XY = \" + first.getXY() + \"\\n\";\n result += \"Y2 = \" + first.getY2() + \"\\n\";\n\n first = first.getNext();\n }\n\n return result;\n }" ]
[ "0.7479141", "0.74715114", "0.7369769", "0.73284364", "0.73112285", "0.72293", "0.721401", "0.7197192", "0.7178506", "0.71568424", "0.710371", "0.7101719", "0.70737183", "0.70476294", "0.70392954", "0.7039048", "0.70304", "0.6999924", "0.6964916", "0.6954937", "0.69292206", "0.6908723", "0.69083893", "0.6897011", "0.68775815", "0.6865249", "0.68593353", "0.6855632", "0.684761", "0.68463624", "0.6835252", "0.68334866", "0.6812258", "0.6809254", "0.67886823", "0.6771297", "0.6771297", "0.67587626", "0.6752876", "0.67337376", "0.6732866", "0.6715991", "0.6709157", "0.6675534", "0.6664449", "0.66409385", "0.66399556", "0.6602805", "0.6588384", "0.6568294", "0.655069", "0.65436304", "0.65414184", "0.6516624", "0.6472914", "0.64447767", "0.6430477", "0.6429477", "0.6419183", "0.6407038", "0.6363261", "0.63395995", "0.6337028", "0.6332944", "0.6300514", "0.62820476", "0.62666446", "0.6229362", "0.61887336", "0.61782855", "0.61766917", "0.6170434", "0.616061", "0.6148464", "0.6136091", "0.6123969", "0.61114424", "0.6106405", "0.60952795", "0.6091437", "0.60774755", "0.6077272", "0.606952", "0.6048731", "0.60375565", "0.60372776", "0.60328597", "0.6025903", "0.6016698", "0.6012581", "0.6001808", "0.5994503", "0.5970981", "0.5964565", "0.5945387", "0.5904442", "0.58991396", "0.5889406", "0.58834964", "0.5882277" ]
0.68227094
32
Misc Kafka client properties
private static Map<String, Object> getKafkaParams() { Map<String, Object> kafkaParams = new HashMap<>(); kafkaParams.put("bootstrap.servers", KAFKA_BROKER_LIST); kafkaParams.put("key.deserializer", StringDeserializer.class); kafkaParams.put("value.deserializer", StringDeserializer.class); kafkaParams.put("group.id", "DEFAULT_GROUP_ID"); kafkaParams.put("auto.offset.reset", "latest"); kafkaParams.put("enable.auto.commit", false); return kafkaParams; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ProducerPropsKeys {\n\n public static String KAFKA_PRODUCER_CONFIG = \"kafka.producer.config\";\n\n public static String KAFKA_MESSAGE_SCHEMA = \"kafka.message.schema\";\n\n}", "@PostConstruct\n private void init() {\n Properties props = new Properties();\n props.put(\"oracle.user.name\", user);\n props.put(\"oracle.password\", pwd);\n props.put(\"oracle.service.name\", serviceName);\n //props.put(\"oracle.instance.name\", instanceName);\n props.put(\"oracle.net.tns_admin\", tnsAdmin); //eg: \"/user/home\" if ojdbc.properies file is in home \n props.put(\"security.protocol\", protocol);\n props.put(\"bootstrap.servers\", broker);\n //props.put(\"group.id\", group);\n props.put(\"enable.auto.commit\", \"true\");\n props.put(\"auto.commit.interval.ms\", \"10000\");\n props.put(\"linger.ms\", 1000);\n // Set how to serialize key/value pairs\n props.setProperty(\"key.serializer\", \"org.oracle.okafka.common.serialization.StringSerializer\");\n props.setProperty(\"value.serializer\", \"org.oracle.okafka.common.serialization.StringSerializer\");\n\n producer = new KafkaProducer<>(props);\n }", "Properties getKafkaProperties() {\n Properties props = new Properties();\n props.put(StreamsConfig.APPLICATION_ID_CONFIG, \"example-window-stream\");\n props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, \"localhost:9092\");\n props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, \"earliest\");\n props.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.String().getClass().getName());\n props.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.String().getClass().getName());\n props.put(StreamsConfig.DEFAULT_TIMESTAMP_EXTRACTOR_CLASS_CONFIG, TardisTimestampExtractor.class);\n return props;\n }", "private static Properties getProperties() {\n var properties = new Properties();\n properties.setProperty(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, \"127.0.0.1:9092\");\n properties.setProperty(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName());\n properties.setProperty(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, GsonSerializer.class.getName());\n return properties;\n }", "private static TypedProperties getClientConfig() throws Exception {\n final Map<String, Object> bindings = new HashMap<>();\n bindings.put(\"$nbDrivers\", nbDrivers);\n bindings.put(\"$nbNodes\", nbNodes);\n return ConfigurationHelper.createConfigFromTemplate(BaseSetup.DEFAULT_CONFIG.clientConfig, bindings);\n }", "public ProvisionedClustersPropertiesWithoutSecrets() {\n }", "public static Properties configProducer() {\r\n\t\tProperties props = new Properties();\r\n\t\tprops.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, KafkaConstants.getBootstrapServers());\r\n\t\tprops.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class);\r\n\t\tprops.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, RentalCarEventDetailsSerializer.class);\r\n\r\n\t\treturn props;\r\n\t}", "public KafkaConfig() { }", "@Bean\r\n public Map<String, Object> producerConfig() {\r\n \t\r\n Map<String, Object> producerProperties = new HashMap<String, Object>();\r\n producerProperties.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG,propertiesManager.getBootstrapServer());\r\n producerProperties.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class);\r\n producerProperties.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, JsonSerializer.class);\r\n \r\n return producerProperties;\r\n }", "public static Properties configConsumer() {\r\n\t\tProperties props = new Properties();\r\n\t\tprops.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, KafkaConstants.getBootstrapServers());\r\n\t\tprops.put(ConsumerConfig.GROUP_ID_CONFIG, KafkaConstants.getGroupId());\r\n\t\tprops.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, KafkaConstants.getAutoCommit());\r\n\t\tprops.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, KafkaConstants.getOffsetReset());\r\n\t\tprops.put(ConsumerConfig.HEARTBEAT_INTERVAL_MS_CONFIG, KafkaConstants.getHeartbeatIntervalMs());\r\n\t\tprops.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);\r\n\t\tprops.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, RentalCarEventDetailsDeserializer.class);\r\n\r\n\t\treturn props;\r\n\t}", "public DataInputClientProperties() throws IOException {\n this(null);\n }", "public interface SupportedConfigurationProperties {\n interface Client {\n String ASK_SERVER_FOR_REPORTS = \"rtest.client.askServerForReports\";\n String SERVER_PORT = \"rtest.client.serverPort\";\n String SERVER_HOST = \"rtest.client.serverHost\";\n String REPORT_DIR = \"rtest.client.reportDir\";\n String MAX_CONNECTION_WAIT_PERIOD = \"rtest.client.maxConnectionWaitPeriodMs\";\n }\n}", "@Override\n public ProducerConfig createKafkaProducerConfig()\n {\n Properties props = new Properties();\n props.setProperty(\"serializer.class\", \"kafka.serializer.StringEncoder\");\n if (useZookeeper)\n {\n props.setProperty(\"zk.connect\", \"localhost:2182\");\n }\n else {\n props.setProperty(\"broker.list\", \"1:localhost:2182\");\n props.setProperty(\"producer.type\", \"async\");\n props.setProperty(\"queue.time\", \"2000\");\n props.setProperty(\"queue.size\", \"100\");\n props.setProperty(\"batch.size\", \"10\");\n }\n\n return new ProducerConfig(props);\n }", "protected void readProperties() {\n\t\tproperties = new HashMap<>();\n\t\tproperties.put(MQTT_PROP_CLIENT_ID, id);\n\t\tproperties.put(MQTT_PROP_BROKER_URL, brokerUrl);\n\t\tproperties.put(MQTT_PROP_KEEP_ALIVE, 30);\n\t\tproperties.put(MQTT_PROP_CONNECTION_TIMEOUT, 30);\n\t\tproperties.put(MQTT_PROP_CLEAN_SESSION, true);\n\t\tproperties.put(MQTT_PROP_USERNAME, user);\n\t\tproperties.put(MQTT_PROP_PASSWORD, password.toCharArray());\n\t\tproperties.put(MQTT_PROP_MQTT_VERSION, MqttConnectOptions.MQTT_VERSION_3_1_1);\n\t}", "public MqttBrokerMeta() {\n\n addDescription(\n \"This is an Mqtt client based on the Paho Mqtt client library. Mqtt is a machine-to-machine (M2M)/'Internet of Things' connectivity protocol. See http://mqtt.org\");\n addCategory(\"cloud\", \"network\");\n\n addDependency(\"io.moquette\", \"moquette-broker\", \"0.15\");\n exclude(\"com.fasterxml.jackson.core\", \"*\");\n exclude(\"io.netty\", \"*\");\n exclude(\"org.slf4j\", \"slf4j-log4j12\");\n\n addDependency(\"com.fasterxml.jackson.core\", \"jackson-core\", \"2.14.0\");\n addDependency(\"com.fasterxml.jackson.core\", \"jackson-databind\", \"2.14.0\");\n addDependency(\"com.fasterxml.jackson.core\", \"jackson-annotations\", \"2.14.0\");\n\n addDependency(\"io.netty\", \"netty-all\", \"4.1.82.Final\");\n\n \n\n setCloudService(false);\n\n }", "public Map<String, Object> getProperties() throws ClientException;", "@Test\n public void testConfigureKafkaNoUsername() {\n Map<String, String> props = new HashMap<>();\n props.put(PASSWORD, \"password\");\n Map<String, Object> config = Utils.configureKafka(props);\n Assert.assertEquals(new HashMap<>(), config);\n }", "public void intiSettings()throws Exception{\r\n\r\n\t\tinputStream = new FileInputStream(System.getProperty(\"user.dir\")+\"\\\\config.properties\");\r\n\t\tconfig.load(inputStream);\r\n\t\t\r\n\t\tprop.put(\"bootstrap.servers\", config.getProperty(\"bootstrap.servers\"));\r\n\t\tprop.put(\"key.serializer\", \"org.apache.kafka.common.serialization.StringSerializer\");\r\n\t\tprop.put(\"value.serializer\", \"org.apache.kafka.common.serialization.StringSerializer\");\r\n\r\n\t\ttopicName = config.getProperty(\"TopicName\");\r\n\t\ttopicName = createTopic(topicName);\r\n\t\t\r\n\t\tmessageList = Arrays.asList(config.getProperty(\"messages\").split(\"\\\\|\"));\r\n\t}", "public DefaultProperties() {\n\t\t// Festlegung der Werte für Admin-Zugang\n\t\tthis.setProperty(\"admin.username\", \"admin\");\n\t\tthis.setProperty(\"admin.password\", \"password\");\n\t\tthis.setProperty(\"management.port\", \"8443\");\n\n\t\t// Festlegung der Werte für CouchDB-Verbindung\n\t\tthis.setProperty(\"couchdb.adress\", \"http://localhost\");\n\t\tthis.setProperty(\"couchdb.port\", \"5984\");\n\t\tthis.setProperty(\"couchdb.databaseName\", \"profiles\");\n\n\t\t// Festlegung der Werte für Zeitvergleiche\n\t\tthis.setProperty(\"server.minTimeDifference\", \"5\");\n\t\tthis.setProperty(\"server.monthsBeforeDeletion\", \"18\");\n\t}", "public GeneralConsumer() {\n // Kafka consumer configuration settings\n Properties props = new Properties();\n\n// props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, IKafkaConstants.KAFKA_BROKERS);\n// props.put(ConsumerConfig.GROUP_ID_CONFIG, IKafkaConstants.GROUP_ID_CONFIG);\n// props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, LongDeserializer.class.getName());\n// props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class.getName());\n props.put(ConsumerConfig.MAX_POLL_RECORDS_CONFIG, 1000);\n props.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, \"false\");\n props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, \"earliest\");\n// Consumer<Long, String> consumer = new KafkaConsumer<>(props);\n// consumer.subscribe(Collections.singletonList(IKafkaConstants.TOPIC_NAME));\n\n// props.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, \"localhost:9092\");\n\n props.put(\"bootstrap.servers\", BOOTSTRAP_SERVERS);\n// props.put(\"acks\", \"all\");\n// props.put(\"retries\", 1);\n props.put(\"group.id\", \"dd\");\n// props.put(\"enable.auto.commit\", \"true\");\n// props.put(\"auto.commit.interval.ms\", \"1000\");\n// props.put(\"session.timeout.ms\", \"30000\");\n\n props.put(\"key.deserializer\",\n \"org.apache.kafka.common.serialization.StringDeserializer\");\n// props.put(\"value.deserializer\",\n// \"org.apache.kafka.common.serialization.StringDeserializer\");\n// consumer = new KafkaConsumer\n// <String, String>(props);\n\n props.put(\"value.deserializer\",\n \"org.apache.kafka.common.serialization.ByteArrayDeserializer\");\n consumer = new KafkaConsumer<String, byte[]>(props);\n\n// adminClient = AdminClient.create(props);\n }", "public KafkaConfig(String bootstrapServer) {\n this.bootstrapServer = bootstrapServer;\n kafkaGroupName = \"group1\";\n autoOffsetReset = \"earliest\";\n autoCommit = false;\n kafkaTopics = new HashMap<>();\n }", "public ClientConfiguration() {\n serverIp = DEFAULT_SERVER_IP;\n serverPort = DEFAULT_SERVER_PORT;\n }", "public Properties setProperties(String kafkaHosts,String flinkConsumerGroup){\n Properties properties = new Properties();\n properties.setProperty(\"bootstrap.servers\", kafkaHosts);\n properties.setProperty(\"group.id\", flinkConsumerGroup);\n return properties;\n }", "private KafkaProducer<String, String> createProducer(String brokerList) {\n if (USERNAME==null) USERNAME = \"token\";\n\n Properties properties = new Properties();\n //common Kafka configs\n properties.put(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG, brokerList);\n properties.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, \"SASL_SSL\");\n properties.put(SaslConfigs.SASL_MECHANISM, \"PLAIN\");\n properties.put(SaslConfigs.SASL_JAAS_CONFIG, \"org.apache.kafka.common.security.plain.PlainLoginModule required username=\\\"\" + USERNAME + \"\\\" password=\\\"\" + API_KEY + \"\\\";\");\n properties.put(SslConfigs.SSL_PROTOCOL_CONFIG, \"TLSv1.2\");\n properties.put(SslConfigs.SSL_ENABLED_PROTOCOLS_CONFIG, \"TLSv1.2\");\n properties.put(SslConfigs.SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_CONFIG, \"HTTPS\");\n //Kafka producer configs\n properties.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName());\n properties.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName());\n properties.put(ProducerConfig.CLIENT_ID_CONFIG, \"stocktrader-producer\");\n properties.put(ProducerConfig.ACKS_CONFIG, \"all\");\n properties.put(ProducerConfig.CLIENT_DNS_LOOKUP_CONFIG,\"use_all_dns_ips\");\n\n KafkaProducer<String, String> kafkaProducer = null;\n \n try {\n kafkaProducer = new KafkaProducer<>(properties);\n } catch (KafkaException kafkaError ) {\n logger.warning(\"Error while creating producer: \"+kafkaError.getMessage());\n Throwable cause = kafkaError.getCause();\n if (cause != null) logger.warning(\"Caused by: \"+cause.getMessage());\n throw kafkaError;\n }\n return kafkaProducer;\n }", "public FlinkConsumerFromKafkaUtil(){\n env = StreamExecutionEnvironment.getExecutionEnvironment();\n }", "@PostConstruct\n public void postConstruct() {\n Map<String, String> config = new HashMap<>();\n config.put(\"bootstrap.servers\", \"localhost:9092\");\n config.put(\"key.serializer\", \"org.apache.kafka.common.serialization.StringSerializer\");\n config.put(\"value.serializer\", \"org.apache.kafka.common.serialization.StringSerializer\");\n config.put(\"acks\", \"1\");\n producer = KafkaProducer.create(vertx, config);\n }", "public static Properties configStream() {\r\n\t\tProperties props = new Properties();\r\n\t\tprops.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, KafkaConstants.getBootstrapServers());\r\n\t\tprops.put(ConsumerConfig.GROUP_ID_CONFIG, KafkaConstants.getGroupId());\r\n\t\tprops.put(StreamsConfig.APPLICATION_ID_CONFIG, KafkaConstants.getApplicationId());\r\n\t\tprops.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.String().getClass());\r\n\t\tprops.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, RentalCarEventDetailsSerde.class);\r\n\r\n\t\treturn props;\r\n\t}", "@Override\n public KimbleClient[] clientStartInfo() {\n return clients;\n }", "PropertiesImpl(BytesClientImpl client) {\n this.service =\n RestProxy.create(PropertiesService.class, client.getHttpPipeline(), client.getSerializerAdapter());\n this.client = client;\n }", "public interface KafkaClientFactory {\n\n /**\n * Creates and returns a {@link Consumer} by merging default Bootique configuration with settings provided in a\n * {@link ConsumerConfig} argument. Uses default Kafka cluster connection information (default == single configuration\n * found in Bootique; if none or more than one exists, an exception is thrown). Returned Consumer needs to be\n * closed by the calling code when it is no longer in use.\n *\n * @param config Configuration of consumer specific to the given method call.\n * @param <K> Consumed message key type.\n * @param <V> Consumed message value type.\n * @return a new instance of Consumer.\n */\n <K, V> Consumer<K, V> createConsumer(ConsumerConfig<K, V> config);\n\n /**\n * Creates and returns a {@link Consumer} by merging default Bootique configuration with settings provided in a\n * {@link ConsumerConfig} argument. Returned Consumer needs to be closed by the calling code when it is no longer\n * in use.\n *\n * @param clusterName symbolic configuration name for the Kafka cluser coming from configuration.\n * @param config Configuration of consumer specific to the given method call.\n * @param <K> Consumed message key type.\n * @param <V> Consumed message value type.\n * @return a new instance of Consumer.\n */\n <K, V> Consumer<K, V> createConsumer(String clusterName, ConsumerConfig<K, V> config);\n\n <K, V> Producer<K, V> createProducer(ProducerConfig<K, V>config);\n\n <K, V> Producer<K, V> createProducer(String clusterName, ProducerConfig<K, V>config);\n}", "public static Properties consumeProps(String servers, String groupId) {\n Properties prop = new Properties();\n // bootstrap server lists.\n prop.put(\"bootstrap.servers\", servers);\n // groupId\n prop.put(\"group.id\", groupId);\n // record the offset.\n prop.put(\"enable.auto.commit\", \"false\");\n prop.put(\"auto.offset.reset\", \"earliest\");\n prop.put(\"session.timeout.ms\", \"300000\");\n prop.put(\"max.poll.interval.ms\", \"300000\");\n // get 10 records per poll.\n prop.put(\"max.poll.records\", 10);\n // Key deserializer\n prop.put(\"key.deserializer\", StringDeserializer.class.getName());\n // value deserializer\n prop.put(\"value.deserializer\", BeanAsArrayDeserializer.class.getName());\n return prop;\n }", "@Test\n public void testConfigureKafkaNoPassword() {\n Map<String, String> props = new HashMap<>();\n props.put(USERNAME, \"username\");\n Map<String, Object> config = Utils.configureKafka(props);\n Assert.assertEquals(new HashMap<>(), config);\n }", "@Override\n public io.emqx.exhook.ClientInfoOrBuilder getClientinfoOrBuilder() {\n return getClientinfo();\n }", "@Override\r\n\t\tpublic void setClientInfo(Properties properties)\r\n\t\t\t\tthrows SQLClientInfoException {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void createClient() {\n\t\t\n\t}", "PartnerTopicReadinessState partnerTopicReadinessState();", "@Bean\r\n public KafkaProducer<String, String> kafkaProducer() {\r\n Properties producerProperties = new Properties();\r\n producerProperties.put(\"bootstrap.servers\", kafkaBootstrapServers);\r\n producerProperties.put(\"acks\", \"all\");\r\n producerProperties.put(\"retries\", 0);\r\n producerProperties.put(\"batch.size\", 16384);\r\n producerProperties.put(\"linger.ms\", 1);\r\n producerProperties.put(\"buffer.memory\", 33554432);\r\n producerProperties.put(\"key.serializer\", \"org.apache.kafka.common.serialization.StringSerializer\");\r\n producerProperties.put(\"value.serializer\", \"org.apache.kafka.common.serialization.StringSerializer\");\r\n\r\n /*\r\n Creating a Kafka Producer object with the configuration above.\r\n */\r\n return new KafkaProducer<>(producerProperties);\r\n }", "@Override\r\n\t\tpublic Properties getClientInfo() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "public void testThatStandardTransportClientCanConnectToDefaultProfile() throws Exception {\n assertGreenClusterState(internalCluster().transportClient());\n }", "public KafkaJsonSerializer() {\n\n }", "private MessageProducer<Long, Long> createProducerWithConfig() {\n return kafka.registerProducer(\n ProducerRegistration.builder()\n .forTopic(kafka.getTopicConfiguration(\"example1\"))\n .withDefaultProducer()\n .withKeySerializer(new LongSerializer())\n .withValueSerializer(new LongSerializer())\n .build());\n }", "public interface MSK2Constants {\n @Metadata(description = \"The operation we want to perform\", javaType = \"String\")\n String OPERATION = \"CamelAwsMSKOperation\";\n @Metadata(description = \"The cluster name filter for list operation\", javaType = \"String\")\n String CLUSTERS_FILTER = \"CamelAwsMSKClusterFilter\";\n @Metadata(description = \"The cluster name for list and create operation\", javaType = \"String\")\n String CLUSTER_NAME = \"CamelAwsMSKClusterName\";\n @Metadata(description = \"The cluster arn for delete operation\", javaType = \"String\")\n String CLUSTER_ARN = \"CamelAwsMSKClusterArn\";\n @Metadata(description = \"The Kafka for the cluster during create operation\", javaType = \"String\")\n String CLUSTER_KAFKA_VERSION = \"CamelAwsMSKClusterKafkaVersion\";\n @Metadata(description = \"The number of nodes for the cluster during create operation\", javaType = \"Integer\")\n String BROKER_NODES_NUMBER = \"CamelAwsMSKBrokerNodesNumber\";\n @Metadata(description = \"The Broker nodes group info to provide during the create operation\",\n javaType = \"software.amazon.awssdk.services.kafka.model.BrokerNodeGroupInfo\")\n String BROKER_NODES_GROUP_INFO = \"CamelAwsMSKBrokerNodesGroupInfo\";\n}", "@Test\n public void testConfigureKafka() {\n Map<String, String> props = new HashMap<>();\n props.put(USERNAME, \"username\");\n props.put(PASSWORD, \"password\");\n\n Map<String, Object> expectedConfig = new HashMap<>();\n expectedConfig.put(SaslConfigs.SASL_MECHANISM, ScramMechanism.SCRAM_SHA_512.mechanismName());\n expectedConfig.put(\n SaslConfigs.SASL_JAAS_CONFIG,\n String.format(\n \"org.apache.kafka.common.security.scram.ScramLoginModule required \"\n + \"username=\\\"%s\\\" password=\\\"%s\\\";\",\n props.get(USERNAME), props.get(PASSWORD)));\n\n Map<String, Object> config = Utils.configureKafka(props);\n Assert.assertEquals(expectedConfig, config);\n }", "@BeforeTest\n public void setupEnv() {\n CLUSTER.start();\n endpoints = CLUSTER.getClientEndpoints();\n Client client = Client.builder()\n .endpoints(endpoints)\n .build();\n\n this.authDisabledKVClient = client.getKVClient();\n this.authDisabledAuthClient = client.getAuthClient();\n }", "@Override\n\tpublic void readClient(Client clt) {\n\t\t\n\t}", "public void createMiniKdcConf() {\n\t\tconf = MiniKdc.createConf();\n\t}", "public static void main(String[] args) throws Exception {\n\t\tProperties props = new Properties();\n\t\tprops.put(\"bootstrap.servers\", \"127.0.0.1:9092\");\n\t\tprops.put(\"acks\", \"all\");\n\t\tprops.put(\"retries\", 0);\n\t\tprops.put(\"batch.size\", 16384);\n\t\tprops.put(\"linger.ms\", 1);\n\t\tprops.put(\"buffer.memory\", 33554432);\n\t\tprops.put(\"key.serializer\", \"org.apache.kafka.common.serialization.StringSerializer\");\n\t\tprops.put(\"value.serializer\", \"org.apache.kafka.common.serialization.StringSerializer\");\n\n\t\t/*\n\t\t * Define new Kafka producer\n\t\t */\n\t\t@SuppressWarnings(\"resource\")\n\t\tProducer<String, String> producer = new KafkaProducer<>(props);\n\n\t\t/*\n\t\t * parallel generation of JSON messages on Transaction topic\n\t\t * \n\t\t * this could also include business logic, projection, aggregation, etc.\n\t\t */\n\t\tThread transactionThread = new Thread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tString topic = \"Transaction\";\n\t\t\t\tList<JSONObject> transactions = new ArrayList<JSONObject>();\n\t\t\t\tinitJSONData(\"ETLSpark_Transactions.json\", transactions);\n\t\t\t\tfor (int i = 0; i < transactions.size(); i++) {\n\t\t\t\t\tif (i % 200 == 0) {\n\t\t\t\t\t\tSystem.out.println(\"200 Transaction Messages procuded\");\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t} catch (InterruptedException 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\tproducer.send(new ProducerRecord<String, String>(topic, Integer.toString(i), transactions.get(i).toString()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/*\n\t\t * parallel generation of customer topic messages \n\t\t */\n\t\tThread customerThread = new Thread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tString topic = \"Customer\";\n\t\t\t\tList<JSONObject> customer = new ArrayList<JSONObject>();\n\t\t\t\tinitJSONData(\"ETLSpark_Customer.json\", customer);\n\t\t\t\tfor (int i = 0; i < customer.size(); i++) {\n\t\t\t\t\tif (i % 200 == 0) {\n\t\t\t\t\t\tSystem.out.println(\"200 Customer Messages procuded\");\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t} catch (InterruptedException 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\tproducer.send(new ProducerRecord<String, String>(topic, Integer.toString(i), customer.get(i).toString()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/*\n\t\t * parallel generation of messages (variable produceMessages)\n\t\t * \n\t\t * generated messages are based on mockaroo api\n\t\t */\n\t\tint produceMessages = 100000;\n\t\tThread accountThread = new Thread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tString topic = \"Account\";\n\t\t\t\tfor (int i = 0; i < produceMessages; i++) {\n//\t\t\t\t\tSystem.out.println(\"Account procuded\");\n\t\t\t\t\tproducer.send(new ProducerRecord<String, String>(topic, Integer.toString(i), getRandomTransactionJSON(i)));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttransactionThread.start();\n\t\tcustomerThread.start();\n\t\taccountThread.start();\n\n\t}", "@Bean\r\n public KafkaTemplate<String, Object> kafkaTemplate() {\r\n return new KafkaTemplate<>(producerFactory());\r\n }", "@Bean(destroyMethod = \"close\", name = \"restClient\")\n public RestHighLevelClient initRestClient() {\n List<HttpHost> hosts = new ArrayList<>();\n String[] hostArrays = host.split(\",\");\n for (String host : hostArrays) {\n if (StringUtils.isNotEmpty(host)) {\n hosts.add(new HttpHost(host.trim(), port, \"http\"));\n }\n }\n\n RestClientBuilder restClientBuilder = RestClient.builder(hosts.toArray(new HttpHost[0]));\n\n // configurable auth\n if (authEnable) {\n final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();\n credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(username, password));\n restClientBuilder.setHttpClientConfigCallback(httpAsyncClientBuilder -> httpAsyncClientBuilder\n .setDefaultCredentialsProvider(credentialsProvider));\n }\n\n restClientBuilder.setRequestConfigCallback(requestConfigBuilder -> requestConfigBuilder\n .setConnectTimeout(connTimeout).setSocketTimeout(socketTimeout)\n .setConnectionRequestTimeout(connectionRequestTimeout));\n\n return new RestHighLevelClient(restClientBuilder);\n }", "@Override public String brokerAddress() { return brokerAddress; }", "AmazonComprehendClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) {\n super(clientParams);\n this.awsCredentialsProvider = clientParams.getCredentialsProvider();\n this.advancedConfig = clientParams.getAdvancedConfig();\n init();\n }", "protected CommonSettings() {\r\n port = 1099;\r\n objectName = \"library\";\r\n }", "private ClientBootstrap() {\r\n init();\r\n }", "private NotificationClient() { }", "public ControllerClientConfig(String host) {\n this.host = host;\n this.port = 9990;\n }", "AmazonApplicationInsightsClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) {\n super(clientParams);\n this.awsCredentialsProvider = clientParams.getCredentialsProvider();\n this.advancedConfig = clientParams.getAdvancedConfig();\n init();\n }", "AbstractProducer(String env) {\n\t\t// set configs for kafka\n\t\tProperties props = new Properties();\n\t\tprops.put(\"bootstrap.servers\", PropertyLoader.getPropertyValue(\n\t\t\t\tPropertyFile.kafka, \"bootstrap.servers\"));\n\t\tprops.put(\"acks\",\n\t\t\t\tPropertyLoader.getPropertyValue(PropertyFile.kafka, \"acks\"));\n\t\tprops.put(\"retries\", Integer.parseInt(PropertyLoader.getPropertyValue(\n\t\t\t\tPropertyFile.kafka, \"retries\")));\n\t\tprops.put(\"batch.size\", Integer.parseInt(PropertyLoader\n\t\t\t\t.getPropertyValue(PropertyFile.kafka, \"batch.size\")));\n\t\tprops.put(\"linger.ms\", Integer.parseInt(PropertyLoader\n\t\t\t\t.getPropertyValue(PropertyFile.kafka, \"linger.ms\")));\n\t\tprops.put(\"buffer.memory\", Integer.parseInt(PropertyLoader\n\t\t\t\t.getPropertyValue(PropertyFile.kafka, \"buffer.memory\")));\n\t\tprops.put(\"key.serializer\", PropertyLoader.getPropertyValue(\n\t\t\t\tPropertyFile.kafka, \"key.serializer\"));\n\t\tprops.put(\"value.serializer\", PropertyLoader.getPropertyValue(\n\t\t\t\tPropertyFile.kafka, \"value.serializer\"));\n\n\t\t// Initialize the producer\n\t\tproducer = new KafkaProducer<String, String>(props);\n\n\t\t// Initialize the solr connector and the connector for the configuration\n\t\t// database\n\t\tsolr = new Solr();\n\t\tconfig = new MongoDBConnector(PropertyLoader.getPropertyValue(\n\t\t\t\tPropertyFile.database, \"config.name\") + \"_\" + env);\n\t}", "@Override\n\tpublic ResultSet getClientInfoProperties() throws SQLException {\n\t\treturn null;\n\t}", "org.apache.calcite.avatica.proto.Common.ConnectionProperties getConnProps();", "@Before\n\tpublic void setup() {\n\n\t\tclient = ClientBuilder.newClient();\n\n\t}", "public PublishingClientImpl() {\n this.httpClientSupplier = () -> HttpClients.createDefault();\n this.requestBuilder = new PublishingRequestBuilderImpl();\n }", "public AbstractClient(Properties options) {\n\t\tthis.options = options;\n\t}", "@Bean\r\n public ProducerFactory<String, Object> producerFactory() {\r\n return new DefaultKafkaProducerFactory<>(producerConfig());\r\n }", "protected ClientStatus() {\n }", "@Override\n\tpublic void createClient(Client clt) {\n\t\t\n\t}", "@Test\n public void testConfigureKafkaNullProps() {\n Map<String, Object> config = Utils.configureKafka(null);\n Assert.assertEquals(new HashMap<>(), config);\n }", "int zookeeperClientPort();", "@Override\n public Cassandra.Client getAPI() {\n return client;\n }", "private static KafkaProducer<String, String> createProducer(String a_broker) {\r\n\t\tProperties props = new Properties();\r\n\t\tprops.put(\"bootstrap.servers\", a_broker);\r\n\t\tprops.put(\"compression.type\", \"none\");\r\n\t\tprops.put(\"value.serializer\", StringSerializer.class.getName());\r\n\t\tprops.put(\"key.serializer\", StringSerializer.class.getName());\r\n\t\t\r\n\t\treturn new KafkaProducer<String, String>(props);\r\n\t}", "public Client() {\r\n\t// TODO Auto-generated constructor stub\r\n\t \r\n }", "@Deprecated\n public ConfigAccessor(RealmAwareZkClient zkClient) {\n _zkClient = zkClient;\n _usesExternalZkClient = true;\n }", "void configure(Map<String, ?> configs) throws KafkaException;", "public Client() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public SessionOpts() {\n traffic = TRAFFIC_MESSAGES;\n isMultipoint = false;\n proximity = PROXIMITY_ANY;\n transports = TRANSPORT_ANY;\n }", "public KafkaBacksideEnvironment() {\n\t\tConfigPullParser p = new ConfigPullParser(\"kafka-props.xml\");\n\t\tproperties = p.getProperties();\n\t\tconnectors = new HashMap<String, IPluginConnector>();\n\t\t//chatApp = new SimpleChatApp(this);\n\t\t//mainChatApp = new ChatApp(this);\n\t\t//elizaApp = new ElizaApp(this);\n\t\tbootPlugins();\n\t\t//TODO other stuff?\n\t\tSystem.out.println(\"Booted\");\n\t\t//Register a shutdown hook so ^c will properly close things\n\t\tRuntime.getRuntime().addShutdownHook(new Thread() {\n\t\t public void run() { shutDown(); }\n\t\t});\n\t}", "private void initializeProducers() {\r\n\t\tlogger.info(\"--> initializeProducers\");\r\n\t\t// actual Kafka producer used by all generic producers\r\n\t\ttry {\r\n\t\t\tsharedAvroProducer = new KafkaProducer<EDXLDistribution, IndexedRecord>(ProducerProperties.getInstance(connectModeSec));\r\n\t\t} catch (Exception cEx) {\r\n\t\t\tlogger.info(\"CISAdapter failed to create a KafkaProducer!\");\r\n\t\t\tcEx.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tlogger.info(\"Check Adpter DEV Mode\");\r\n\t\t\theartbeatProducer = new HeartbeatProducer(sharedAvroProducer, TopicConstants.HEARTBEAT_TOPIC);\t\r\n\t\t\theartbeatProducer.sendInitialHeartbeat();\r\n\t\t\taddAvroReceiver(TopicConstants.ADMIN_HEARTBEAT_TOPIC, new AdminHeartbeatConsumer(null));\r\n\t\t\tadpterMode = AdapterMode.DEV_MODE;\r\n\t\t} catch (Exception cEx) {\r\n\t\t\tlogger.info(\"CISAdapter initialized failed with non secure connection!\");\r\n\t\t\tlogger.info(\"Check Adpter SEC DEV Mode\");\r\n\t\t\tconnectModeSec = true;\r\n\t\t\tsharedAvroProducer = new KafkaProducer<EDXLDistribution, IndexedRecord>(ProducerProperties.getInstance(connectModeSec));\r\n\t\t\ttry {\r\n\t\t\t\theartbeatProducer = new HeartbeatProducer(sharedAvroProducer, TopicConstants.HEARTBEAT_TOPIC);\t\r\n\t\t\t\theartbeatProducer.sendInitialHeartbeat();\r\n\t\t\t\taddAvroReceiver(TopicConstants.ADMIN_HEARTBEAT_TOPIC, new AdminHeartbeatConsumer(null));\r\n\t\t\t\tadpterMode = AdapterMode.SEC_DEV_MODE;\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tlogger.info(\"Adapter running in TRIAL Mode, wait for AdminTool heartbeat for futur initalization!\");\r\n\t\t\t\taddAvroReceiver(TopicConstants.ADMIN_HEARTBEAT_TOPIC, new AdminHeartbeatConsumer(CISAdapter.aMe));\r\n\t\t\t\tadpterMode = AdapterMode.TRIAL_MODE;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (adpterMode != AdapterMode.TRIAL_MODE) {\r\n\t\t\tinitCoreTopics();\r\n\t\t\tadapterInitDone = true;\t\r\n\t\t} \r\n\t\tlogger.info(\"initializeProducers -->\");\r\n\t}", "@ApplicationScoped\n @Produces\n public ProducerActions<MessageKey, MessageValue> createKafkaProducer() {\n Properties props = (Properties) producerProperties.clone();\n\n // Configure kafka settings\n props.putIfAbsent(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServers);\n props.putIfAbsent(ProducerConfig.CLIENT_ID_CONFIG, \"Producer-\" + UUID.randomUUID().toString());\n props.putIfAbsent(ProducerConfig.ACKS_CONFIG, \"all\");\n props.putIfAbsent(ProducerConfig.LINGER_MS_CONFIG, 10);\n props.putIfAbsent(ProducerConfig.PARTITIONER_CLASS_CONFIG, KafkaSqlPartitioner.class);\n\n tryToConfigureSecurity(props);\n\n // Create the Kafka producer\n KafkaSqlKeySerializer keySerializer = new KafkaSqlKeySerializer();\n KafkaSqlValueSerializer valueSerializer = new KafkaSqlValueSerializer();\n return new AsyncProducer<MessageKey, MessageValue>(props, keySerializer, valueSerializer);\n }", "private void configureMqtt() {\n\t\tString protocol = null;\n\t\tint port = getPortNumber();\n\t\tif (isWebSocket()) {\n\t\t\tprotocol = \"ws://\";\n\t\t\t// If there is no port specified use default\n\t\t\tif(port == -1) {\n\t\t\t\tport = WS_PORT;\n\t\t\t}\n\t\t} else {\n\t\t\tprotocol = \"tcp://\";\n\t\t\t// If there is no port specified use default\n\t\t\tif(port == -1) {\n\t\t\t\tport = MQTT_PORT;\n\t\t\t}\n\t\t}\n\t\t\n\t\tString mqttServer = getMQTTServer();\n\t\tif(mqttServer != null){\n\t\t\tserverURI = protocol + mqttServer + \":\" + port;\n\t\t} else {\n\t\t\tserverURI = protocol + getOrgId() + \".\" + MESSAGING + \".\" + this.getDomain() + \":\" + port;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tpersistence = new MemoryPersistence();\n\t\t\tmqttAsyncClient = new MqttAsyncClient(serverURI, clientId, persistence);\n\t\t\tmqttAsyncClient.setCallback(mqttCallback);\n\t\t\tmqttClientOptions = new MqttConnectOptions();\n\t\t\tif (clientUsername != null) {\n\t\t\t\tmqttClientOptions.setUserName(clientUsername);\n\t\t\t}\n\t\t\tif (clientPassword != null) {\n\t\t\t\tmqttClientOptions.setPassword(clientPassword.toCharArray());\n\t\t\t}\n\t\t\tmqttClientOptions.setCleanSession(this.isCleanSession());\n\t\t\tif(this.keepAliveInterval != -1) {\n\t\t\t\tmqttClientOptions.setKeepAliveInterval(this.keepAliveInterval);\n\t\t\t}\n\t\t\tmqttClientOptions.setMaxInflight(getMaxInflight());\n\t\t} catch (MqttException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public ServerProperties() {\n try {\n initializeProperties();\n }\n catch (Exception e) {\n System.out.println(\"Error initializing server properties.\");\n }\n }", "private SystemPropertiesRemoteSettings() {}", "CommonProperties getProperties();", "public ServiceClient() {\n\t\tsuper();\n\t}", "Properties defaultTelemetryConfig();", "protected AmqpTransportConfig() {\n\t\tsuper();\n\t}", "Map<String, ClientMetrics> getClientMetrics();", "private HeartBeatMessage() {\n initFields();\n }", "public KafkaConfig(String bootstrapServer, String kafkaGroupName, String autoOffsetReset, Boolean autoCommit, Map<String, Integer> kafkaTopics) {\n this.bootstrapServer = bootstrapServer;\n this.kafkaGroupName = kafkaGroupName;\n this.autoOffsetReset = autoOffsetReset;\n this.autoCommit = autoCommit;\n this.kafkaTopics = kafkaTopics;\n }", "AWSIoTWirelessClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) {\n super(clientParams);\n this.awsCredentialsProvider = clientParams.getCredentialsProvider();\n this.advancedConfig = clientParams.getAdvancedConfig();\n init();\n }", "protected MqttConnectOptions buildMqttConnectOptions() {\n\t\tMqttConnectOptions options = new MqttConnectOptions();\n\t\toptions.setUserName(read(MQTT_PROP_USERNAME, String.class));\n\t\toptions.setPassword(read(MQTT_PROP_PASSWORD, char[].class));\n\t\toptions.setKeepAliveInterval(read(MQTT_PROP_KEEP_ALIVE, Integer.class));\n\t\toptions.setConnectionTimeout(read(MQTT_PROP_CONNECTION_TIMEOUT, Integer.class));\n\t\toptions.setCleanSession(read(MQTT_PROP_CLEAN_SESSION, Boolean.class));\n\t\toptions.setMqttVersion(read(MQTT_PROP_MQTT_VERSION, Integer.class));\n\t\treturn options;\n\t}", "private static Consumer<String, JsonNode> createConsumer() {\n final Properties props = new Properties();\n props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG,\n BOOTSTRAP_SERVERS);\n props.put(ConsumerConfig.CLIENT_ID_CONFIG, \"EventsMultiplexer\");\n props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG,\n StringDeserializer.class.getName());\n props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG,\n JsonDeserializer.class.getName());\n props.put(ConsumerConfig.GROUP_ID_CONFIG, \"MainGroup\");\n return new KafkaConsumer<>(props);\n }", "public KafkaAvroSerializer() {\n super();\n }", "TopicConnection getJMSTopicConnection();", "public Client() {\n _host_name = DEFAULT_SERVER;\n _port = PushCacheFilter.DEFAULT_PORT_NUM;\n }", "public HGDClient() {\n \n \t}", "Client getClient();", "private ClientTelemetryClientSettingsProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Integer getClientId() { return clientId; }", "protected void configureClient() {\n\t\tswitch (getVariant(ClientRegistration.class)) {\n\t\tcase STATIC_CLIENT:\n\t\t\tcallAndStopOnFailure(GetStaticClientConfiguration.class);\n\t\t\tconfigureStaticClient();\n\t\t\tbreak;\n\t\tcase DYNAMIC_CLIENT:\n\t\t\tcallAndStopOnFailure(StoreOriginalClientConfiguration.class);\n\t\t\tcallAndStopOnFailure(ExtractClientNameFromStoredConfig.class);\n\t\t\tconfigureDynamicClient();\n\t\t\tbreak;\n\t\t}\n\n\t\texposeEnvString(\"client_id\");\n\n\t\tcompleteClientConfiguration();\n\t}", "private APIClient() {\n }", "private CorrelationClient() { }" ]
[ "0.647317", "0.63053274", "0.63012505", "0.62795633", "0.60965586", "0.59397477", "0.5897664", "0.58886856", "0.5884837", "0.58459073", "0.5842265", "0.5799799", "0.57763267", "0.57568854", "0.57451904", "0.5679006", "0.56752634", "0.56611", "0.56349444", "0.56177306", "0.56161714", "0.5608003", "0.55909735", "0.55674213", "0.5557331", "0.55512345", "0.5549925", "0.55481154", "0.5539535", "0.55370414", "0.55052596", "0.5487501", "0.54789436", "0.5478659", "0.54633915", "0.54535437", "0.54227924", "0.5411422", "0.540833", "0.53523767", "0.5343981", "0.53229845", "0.5311516", "0.52818286", "0.52764654", "0.52750856", "0.5266696", "0.5264774", "0.52563834", "0.5241423", "0.52341706", "0.5228926", "0.5213456", "0.5199092", "0.51972324", "0.51968735", "0.5189053", "0.5185337", "0.51687825", "0.51681775", "0.5164373", "0.5161069", "0.51519823", "0.5140507", "0.5138956", "0.5138193", "0.51280636", "0.51207787", "0.5110812", "0.5094598", "0.50939316", "0.5092556", "0.50915754", "0.50751555", "0.50729024", "0.50623685", "0.5054356", "0.50480884", "0.5045225", "0.5036249", "0.5032587", "0.5030523", "0.5030035", "0.502885", "0.5027525", "0.5025434", "0.5015298", "0.5012716", "0.50054806", "0.5001144", "0.50009936", "0.49998826", "0.49992305", "0.49968755", "0.49918848", "0.4988102", "0.49848807", "0.49783862", "0.49732736", "0.49720708" ]
0.6518374
0
Increment count of letters the translator has been working on
public WSActionResult execute(WSContext wsContext, WSAssetTask task) { //various metadata WSUser translator = task.getTaskHistory().getLastHumanStepUser(); if(null == translator) { return new WSActionResult(WSActionResult.ERROR, "Can not determine asset's translator"); } log.info("Translator is " + translator.getFullName()); //set the translator attribute for later use, for FO only; This may be used in future enhancement; for now set all translators // String wkgroupName = task.getProject().getProjectGroup().getWorkgroup().getName(); // if(wkgroupName.startsWith("FO_")) { task.getProject().setAttribute(_mostRecentTranslatorAttr, translator.getFirstName() + " " + translator.getLastName() + " [" + translator.getUserName() + "]"); // } //obtain count attribute String attrTCount = null; try { attrTCount = Config.getTranslationsCountAttributeName(wsContext); AttributeValidator.validateAttribute(wsContext, attrTCount, ATTRIBUTE_OBJECT.USER, ATTRIBUTE_TYPE.INTEGER, translator, "0"); } catch (Exception e) { log.error(e.getLocalizedMessage()); return new WSActionResult(WSActionResult.ERROR, "Attribute " + attrTCount + " is misconfigured. " + e.getLocalizedMessage()); } int tasksTranslated; if(null == translator.getAttribute(attrTCount) || translator.getAttribute(attrTCount).length() == 0) { log.info("First time user. Set initial count of translated letters to 0"); tasksTranslated = 0; } else { tasksTranslated = WSAttributeUtils.getIntegerAttribute(this, translator, attrTCount); } if(tasksTranslated < 0) { return new WSActionResult(WSActionResult.ERROR, "Invalid number of translated letters for user " + translator.getUserName() + ": " + tasksTranslated); } translator.setAttribute(attrTCount, String.valueOf(++tasksTranslated)); return new WSActionResult(DONE, "User " + translator.getFullName() + " (" + translator.getUserName() + ") has translated " + tasksTranslated + " assets"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void increment(){\n\t\twordCount += 1;\n\t}", "int getLettersCount();", "private void RecalculateCharDistribution() {\r\n\t\tMap<Character, Integer> temp = new HashMap<>();\r\n\t\tfor (String s : sameWordLength) {\r\n\t\t\tfor (int i = 0; i < s.length(); i++) {\r\n\r\n\t\t\t\tchar ch = s.charAt(i);\r\n\t\t\t\tif (guessedCharacter.contains(ch)) {\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!temp.containsKey(ch)) {\r\n\t\t\t\t\t\ttemp.put(ch, 1);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tint t = temp.get(ch) + 1;\r\n\t\t\t\t\t\ttemp.put(ch, 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\r\n\t\tcharCount = temp;\r\n\r\n\t}", "public void addWordCount(){\r\n\t\twordCount = wordCount + 1;\r\n\t}", "public void increasecounter() {\n\t\tmPref.edit().putInt(PREF_CONVERTED, counter + 1).commit();\r\n\t}", "public static void main(String[] args) throws IOException {\n\n String file = \"C:/Java Projects/java-web-dev-exercises/src/exercises/CountingCharsSentence.txt\";\n Path path = Paths.get(file);\n List<String> lines = Files.readAllLines(path);\n Object[] string = lines.toArray();\n String string2 = Arrays.toString(string);\n\n String[] wordsInString = string2.toLowerCase().split(\"\\\\W+\");\n String rejoinedString = String.join(\"\", wordsInString);\n char[] charactersInString = rejoinedString.toCharArray();\n\n HashMap<Character, Integer> letterMap = new HashMap<>();\n\n\n for (char letter : charactersInString) {\n if (!letterMap.containsKey(letter)) {\n int letterCount = 1;\n letterMap.put(letter, letterCount);\n } else if (letterMap.containsKey(letter)) {\n letterMap.put(letter, letterMap.get(letter) + 1);\n }\n }\n\n\n System.out.println(letterMap);\n }", "public void addWordCount(int increment){\r\n\t\twordCount = wordCount + increment;\r\n\t}", "Alphabet(String chars) {\n char[] newChars = chars.toCharArray();\n Map<Character, Integer> map = new HashMap<>();\n for (char c : newChars) {\n if (map.containsKey(c)) {\n int counter = map.get(c);\n map.put(c, ++counter);\n } else {\n map.put(c, 1);\n }\n }\n\n for (char c : map.keySet()) {\n if (map.get(c) > 1) {\n throw new EnigmaException(\"Duplicates Found\");\n } else {\n _letters = chars;\n }\n }\n }", "public int getLettersCount() {\n return letters_.size();\n }", "public void zugInWerkstatt() {\n werkstatt++;\n }", "public static void cuentaLetras(char[] c)\n{\n for(int k=0; k < c.length; k++)\n {\n char currentChar = c[k]; \n //to check that currentChar is not in map, if not will add 1 count for firsttime\n if(map1.get(currentChar) == null){\n map1.put(currentChar, 1); \n } \n /*If it is repeating then simply we will increase the count of that key(character) by 1*/\n else {\n map1.put(currentChar, map1.get(currentChar) + 1);\n }\n } //todo el parrafo\n\n}", "public void add(char ch) {\n\n int count = 1;\n if (jumble.containsKey(ch)) {\n count = jumble.get(ch) + 1;\n }\n\n jumble.put(ch, count);\n total++;\n }", "private void incrementCounter()\r\n\t{\r\n\t\tthis.counter++;\r\n\t}", "public void incrementNumAttacked( ){\n this.numAttacked++;\n }", "public void updateCharacterCount() {\n CharSequence characterCountText;\n \n if (mSelectedProvider.getSocialSharingProperties()\n .getAsBoolean(\"content_replaces_action\")) {\n // twitter, myspace, linkedin\n if (doesActivityUrlAffectCharacterCountForSelectedProvider()\n && mShortenedActivityURL == null) {\n // twitter, myspace\n characterCountText = getText(R.string.calculating_remaining_characters);\n } else {\n int preview_length = mPreviewLabelView.getText().length();\n int chars_remaining = mMaxCharacters - preview_length;\n if (chars_remaining < 0)\n characterCountText = Html.fromHtml(\"Remaining characters: <font color=red>\"\n + chars_remaining + \"</font>\");\n else\n characterCountText = Html.fromHtml(\"Remaining characters: \" + chars_remaining);\n }\n } else { // facebook, yahoo\n int comment_length = mUserCommentView.getText().length();\n int chars_remaining = mMaxCharacters - comment_length;\n if (chars_remaining < 0)\n characterCountText = Html.fromHtml(\n \"Remaining characters: <font color=red>\" + chars_remaining + \"</font>\");\n else\n characterCountText = Html.fromHtml(\"Remaining characters: \" + chars_remaining);\n }\n \n mCharacterCountView.setText(characterCountText);\n Log.d(TAG, \"updateCharacterCount: \" + characterCountText);\n }", "@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\tcount_text();\r\n\t\t\t}", "@Override //old methd for letter count\n public Integer letterCount(String inputString) {\n char[] characterArray = inputString.toCharArray();\n Map<Character, Integer> wordFrequencyMap = new HashMap<Character, Integer>();\n\n for (char character : characterArray) {\n if (wordFrequencyMap.containsKey(character)) {\n\n Integer wordCount = (Integer) wordFrequencyMap.get(character);\n wordFrequencyMap.put(character, wordCount + 1);\n\n } else {\n wordFrequencyMap.put(character, 1);\n\n }\n }\n return null; //iterateWordCount(wordFrequencyMap);\n }", "public int getLettersCount() {\n return letters_.size();\n }", "private static void charCount(String str) {\n\t\t\n\t\tHashMap<Character, Integer> mp = new HashMap<Character, Integer>();\n\t\t\n\t\tchar[] cr=str.toCharArray();\n\t\t\n\t\tSystem.out.println(cr);\n\t\t\n\t\tfor(char c: cr) {\n\t\t\t\n\t\t\tif(mp.containsKey(c)) {\n\t\t\t\tmp.put(c, mp.get(c)+1);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\tmp.put(c, 1);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(Map.Entry<Character, Integer> ent: mp.entrySet()) {\n\t\t\tSystem.out.println(ent.getKey() + \" \" + ent.getValue());\n\t\t}\n\t\t\n\t}", "public void incrementCount() {\n count++;\n }", "public void incrementCount() {\n\t\tcount++;\n\t}", "private static void setCounter() {++counter;}", "WordCounter(){\r\n }", "manExp15(){ \r\n\r\n\tcount++; \r\n\r\n\tSystem.out.println(count); \r\n\r\n\t}", "static int countCharacters(String[] words, String chars) {\n int ans = 0;\n int[] letters = new int[26];\n char[] arr = chars.toCharArray();\n for (char a : arr) {\n letters[a-'a']++;\n }\n for (String s : words) {\n char[] charArray = s.toCharArray();\n int[] temp = new int[26];\n int i = 0;\n for (;i<charArray.length;i++) {\n if (letters[charArray[i]-'a'] > 0) {\n letters[charArray[i]-'a']--;\n temp[charArray[i]-'a']++;\n } else {\n break;\n }\n }\n if (i == charArray.length) {\n ans += s.length();\n }\n i=0;\n for (;i<temp.length;i++) {\n letters[i] += temp[i];\n }\n }\n return ans;\n }", "public long getLowerCaseLettersCount() {\n return lowerCaseLettersCount;\n }", "WordCounter(String inputText){\r\n \r\n wordSource = inputText;\r\n }", "void increaseSortLetter();", "public int getNumberOfCharactersInThisText(){\n\t\treturn this.number;\n\t}", "@Test\n public void testing() {\n String item = \"voodoo\";\n String result = LetterCounter.get(item);\n System.out.println(result);\n }", "private String getTextCount(int conut, String name) {\n for (int i = 0; i < conut; i++) {\r\n name = name + \" \";\r\n }\r\n return name;\r\n }", "public void incCounter()\n {\n counter++;\n }", "public void counterAddup(){\n\t\tfor (int i=0; i<window.size(); i++){\n\t\t\tif ( window.get(i).acked == false ){\n\t\t\t\twindow.get(i).counter = window.get(i).counter+1;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn ;\n\t}", "public int getWordsQuantity(){\n\t\treturn counter;\n\t}", "public void incCount() { }", "public void addCount()\n {\n \tcount++;\n }", "public int doCount(String s){\r\n\t\tint count = 0;\r\n\t\tint i;\r\n\t\tfor(i = 0; i < s.length(); i++){\r\n\t\t\tif ( s.charAt(i) == Letter )\r\n\t\t\t\tcount++;\r\n\t\t}\r\n\t\t\r\n\t\treturn count;\r\n\t\t\r\n\t}", "public void countOfLetters()\n {\n Scanner sc = new Scanner(System.in);\n //Ask an user to enter a string\n System.out.print(\"Enter a string: \");\n //Read next line as string and assign it value to String str\n String str = sc.nextLine();\n\n //Create a new int array with 26 elements\n int []Letters = new int[26];\n\n //For each index in str\n for(int i = 0; i < str.length(); i++)\n {\n //Get current character\n char c = str.toLowerCase().charAt(i);\n //Get char as int\n int val = (int)c;\n //If char is letter\n if(val >= 97 && val <= 122)\n {\n //Increment a value at position of this letter\n Letters[c-'a']++;\n }\n }\n //Get sum of the array\n int Sum = Arrays.stream(Letters).sum();\n //For each index in Letters\n for(int i = 0; i<Letters.length; i++)\n {\n //If value of current position > 0 then print count of this letter at given string and its percentage\n if(Letters[i] > 0)\n {\n System.out.printf(\"The count of `%c` is %x, the percentage is %f \\n\", (char)97+i, Letters[i], (double)Letters[i]/Sum);\n }\n }\n\n }", "public void incCounter(){\n counter++;\n }", "public void incrementCount(){\n count+=1;\n }", "public static void main(String[] args) {\n\t\t\n\t\tString s = \"asdfasdfafk asd234asda\";\n\t //Map<Character, Integer> charMap = new HashMap<Character, Integer>();\n\t \n\t Map<Character,Integer> map = new HashMap<Character,Integer>();\n\t for (int i = 0; i < s.length(); i++) {\n\t char c = s.charAt(i);\n\t System.out.println(c);\n\t //if (Character.isAlphabetic(c)) {\n\t if (map.containsKey(c)) {\n\t int cnt = map.get(c);\n\t System.out.println(cnt);\n\t map.put(c,++cnt);\n\t } else {\n\t map.put(c, 1);\n\t }\n\t \n\t }\n\t // }\n\t System.out.println(map);\n\t \n\t \n\t /* char[] arr = str.toCharArray();\n\t System.out.println(arr);\n\t \n\n\t\t\n\t\tfor (char value: arr) {\n\t\t \n\t\t if (Character.isAlphabetic(value)) { \n\t\t\t if (charMap.containsKey(value)) {\n\t\t charMap.put(value, charMap.get(value) + 1);\n\t\t \n\t\t } \n\t\t\t else { charMap.put(value, 1); \n\t\t } \n\t\t\t } \n\t\t }\n\t\t \n\t\t System.out.println(charMap);*/\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t \n \t}", "public void setLowerCaseLettersCount(long value) {\n this.lowerCaseLettersCount = value;\n }", "public void increaseCourseCount(){}", "private int countLetter(char c, File trainDir) {\r\n\t\tint totalCharacterCount = 0;\r\n\t\tfor(File file : trainDir.listFiles()){\r\n\t\t\ttry{\r\n\t\t\t\t// open file\r\n\t\t\t\tFileReader fr = new FileReader(file);\r\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\t\t\r\n\t\t\t\twhile(br.ready()){\r\n\t\t\t\t\t// read a character and increment our counter\r\n\t\t\t\t\t// if this character matches the one we are looking for\r\n\t\t\t\t\tif((char)br.read() == c){\r\n\t\t\t\t\t\ttotalCharacterCount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(FileNotFoundException e){\r\n\t\t\t\tSystem.err.println(\"Failed to Find File: \" + file.toString());\r\n\t\t\t}\r\n\t\t\tcatch(IOException ioe){\r\n\t\t\t\tSystem.err.println(ioe.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn totalCharacterCount;\r\n\t}", "private static int[] countLetters (String msg) {\n int[] counts = new int[26];\n for (char c : msg.toCharArray()) {\n char cuc = Character.toUpperCase(c);\n if (Character.isAlphabetic(cuc)) counts[ALPHABET.indexOf(cuc)]++;\n }\n \n return counts;\n }", "public void addStrangeCharacter() {\n strangeCharacters++;\n }", "public void increaseCount(){\n myCount++;\n }", "@Test\n public void countNumberOfCharactersInWords() {\n final long count = 0; //TODO\n\n assertEquals(105, count);\n }", "public static void increase(){\n c++;\n }", "@Override\n public void execute () {\n File file = new File(lettersDistribution.absolutePath);\n\n try (Scanner in = new Scanner(file)) {\n\n while (in.hasNext()) {\n String inputString = in.nextLine().toLowerCase();\n inputString = inputString.replace(\" \", \"\");\n char[] strArray = inputString.toCharArray();\n\n for (char c : strArray) {\n if (Character.isLetter(c)) {\n lettersDistribution.temporaryCharacterMap.put(c, lettersDistribution.temporaryCharacterMap.get(c) + 1);\n }\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public int calWord() {\n for(int i = 0; i < newWord.length(); i++) {\n for (String c : keySetPoint) {\n if(String.valueOf(newWord.charAt(i)).equals(c)) {\n point += mapPoint.get(c);\n }\n }\n }\n\n return point;\n }", "public int count(char ch) {\n int count = 0;\n if (jumble.containsKey(ch)) {\n count = jumble.get(ch);\n }\n return count;\n }", "public int getWrongLettersCount() {\n return wrongLettersCount;\n }", "void getCounter(){// wazifeye in mthod, shomaresh ast.\n selectedCellCounter=0;\n emptyCellCounter=0;\n charCounter=0;\n for(int i=0; i<30;i++)\n for(int j=0; j<26;j++){\n if(jtf[i][j].getText().length()==0)\n ++emptyCellCounter;\n else\n charCounter+=jtf[i][j].getText().length();\n if(jtf[i][j].getBackground()==Color.blue || jtf[i][j].getBackground()==Color.green)\n ++selectedCellCounter;\n }\n }", "void incrementCount();", "public int getNumCharacters()\n\t{\n\t\treturn gameCharCount;\n\t}", "@Override\r\n\tpublic int increase() throws Exception {\n\t\treturn 0;\r\n\t}", "int size() {\n return _letters.length();\n }", "@Test\n public void charCount() {\n final int expectedEight = 8;\n final int expectedFour = 4;\n\n CharCount charCounter = new CharCount();\n assertEquals(expectedEight, charCounter.characterCounter(\"fizzbuzz FIZZBUZZ\", 'z'));\n assertEquals(expectedEight, charCounter.characterCounter(\"fizzbuzz FIZZBUZZ\", 'Z'));\n assertEquals(expectedFour, charCounter.characterCounter(\"FIZZBUZZ\", 'z'));\n assertEquals(0, charCounter.characterCounter(\"TEdff fdjfj 223\", '1'));\n assertEquals(expectedFour, charCounter.characterCounter(\"TE00df0f f0djfj 223\", '0'));\n assertEquals(0, charCounter.characterCounter(\"RRuyt 111000AAdda\", (char) 0));\n }", "public void increase() {\r\n\r\n\t\tincrease(1);\r\n\r\n\t}", "public void increase()\n {\n setCount(getCount() + 1);\n }", "private void increaseAttempts() {\n attempts++;\n }", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int T = scan.nextInt();\n scan.nextLine();\n for(int i = 0 ; i < T ; i++){\n int count = 0;\n String text = scan.nextLine();\n char[] letters = text.toCharArray();\n\n if(letters.length > 0){\n char character = letters[0];\n\n for(int j = 1 ; j < letters.length ; j++){\n\n if(character == letters[j]){\n count++;\n }else{\n character = letters[j];\n }\n }\n }\n System.out.println(count);\n }\n scan.close();\n }", "@Override\n\t\t\tpublic void onTextChanged(CharSequence s, int start, int before,\n\t\t\t\t\tint count) {\n\t\t\t\ttxtMsgCount.setText(s.length() + \" Characters\");\n\t\t\t}", "public void increseReplyCount() {\n\r\n\t}", "public void calculate() {\n int result = 0;\n hashMap.clear();\n numOfLetters.clear(); // numOfLetters contains number of letters from the line\n controlList.clear(); // controlList contains the unique number of letters\n\n findNumberOfLetters();\n\n for (int count : numOfLetters) {\n for (int i = count; i > 0 ; i--) { // starting the count of first letter, control the controlList elements\n if(controlList.contains(i)) { // if controlList contains the number, that means we must delete one letter\n result++; // we increment result while deleting letter\n }\n else {\n controlList.add(i); // if the controlList does not contain the number, we dont need delete letter\n break; // when we find the number that controlList does not contain, it means we find the unique number for a letter.\n }\n }\n }\n\n System.out.println(lineNumber + \"- \" + result); // print the result\n lineNumber++;\n }", "public void upadateDictionary(){\n dict.setLength(0);\n for(Character l : LettersCollected) {\n dict.append(l + \" \");\n }\n dictionary.setText(dict);\n\n }", "private static void cryptanalysis() {\n\t for (char cipherChar : cipherText.toCharArray()) {\n\t if (Character.isLetter(cipherChar)) { // only letters are encrypted, punctuation marks and whitespace are not\n\t // following line converts letters to numbers between 0 and 25\n\t int cipher = (int) cipherChar - alphaIndex;\n\t // following line increments the value at frequency[cipher] to count frequency of letters used\n\t frequency[cipher] = frequency[cipher] + 1;\n\t }\n\t } \n\t char currChar = 'A';\n \t for (int i = 0; i < 26; i++) {\n \t\t System.out.println(currChar++ + \" \" + frequency[i]);\n \t }\n }", "public void countWordLengthsWithIsLettermethod(FileResource resource, int[] counts) {\r\n for (String word : resource.words()) {\r\n String trim = word.trim();\r\n int wordSize = trim.length();\r\n char firstChar = trim.charAt(0);\r\n char endChar = trim.charAt(trim.length()-1);\r\n if (!Character.isLetter(firstChar) && !Character.isLetter(endChar)) {\r\n wordSize -= 2;\r\n } else \r\n if (!Character.isLetter(firstChar) || !Character.isLetter(endChar)) {\r\n wordSize -= 1;\r\n }\r\n if(wordSize>=counts.length) {\r\n counts[counts.length-1] += 1; \r\n } else\r\n //right algorithm\r\n if( wordSize> 0 && counts[wordSize] != 0 ) {\r\n counts[wordSize] += 1;\r\n \r\n } else if ( wordSize> 0) {\r\n counts[wordSize] = 1;\r\n }\r\n }\r\n \r\n //test\r\n for(int i : counts) {\r\n System.out.println(i);\r\n }\r\n }", "public void increaseTurnCount()\n\t{\n\t\tturnNumber++;\n\t\tthis.currentPlayerID++;\n\t\tthis.currentPlayerID = this.currentPlayerID % this.playerList.size();\n\t}", "private void increaseCurrentPlayerIndex() {\n\t\tcurrentPlayer++;\n\t\tif(currentPlayer>3)\n\t\t\tcurrentPlayer=0;\n\t}", "public void incrementTimesPlayed() {\r\n\t\ttimesPlayed++;\r\n\t}", "static int countCharacters2(String[] words, String chars) {\n int count = 0;\n int[] seen = new int[26];\n //Count char of Chars String\n for (char c : chars.toCharArray())\n seen[c - 'a']++;\n // Comparing each word in words\n for (String word : words) {\n // simple making copy of seen arr\n int[] tSeen = Arrays.copyOf(seen, seen.length);\n int Tcount = 0;\n for (char c : word.toCharArray()) {\n if (tSeen[c - 'a'] > 0) {\n tSeen[c - 'a']--;\n Tcount++;\n }\n }\n if (Tcount == word.length())\n count += Tcount;\n }\n return count;\n }", "public int numWordsCurrent() {\r\n return 0;\r\n }", "public void count() {\n\t\talgae = -1;\n\t\tcrab = -1;\n\t\tbigFish = -1;\n\t\tfor(GameObjects o: objects) {\n\t\t\tswitch(o.toString()) {\n\t\t\tcase \"algae\":\n\t\t\t\talgae +=1;\n\t\t\t\tbreak;\n\t\t\tcase \"crab\":\n\t\t\t\tcrab +=1;\n\t\t\t\tbreak;\n\t\t\tcase \"big fish\":\n\t\t\t\tbigFish +=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private List<Tuple> charCountMap(Tuple input) {\n \n String[] words = input.snd().replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase().split(\"\\\\s+\");\n \n List<Tuple> output = new ArrayList<Tuple>();\n \n for(String word : words) {\n Integer chars = word.length();\n output.add(new Tuple(chars.toString(),\"1\"));\n }\n \n lolligag();\n \n //<charCount, 1>, <charCount, 1> ...\n return output;\n }", "public static void incTestCount() {\n mTestCount++;\n }", "private void countCharactersInFile() {\n\t\ttry (BufferedReader reader = Files.newBufferedReader(sourceFile, CHARSET)) {\n\t\t\tfinal char[] buffer = new char[8192];\n\t\t\tint nb = -1;\n\t\t\twhile (reader.ready()) {\n\t\t\t\tnb = reader.read(buffer);\n\t\t\t\tfor (int i = 0; i < nb; i++) {\n\t\t\t\t\tcharacterCount[buffer[i]]++;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (final IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\t}", "public void incrementCoinCount() {\n coinCount++;\n System.out.println(\"Rich! Coin count = \" + coinCount);\n }", "public static int duplicateCount(String text) {\n \r\n int count=0; \r\n \r\n \r\n \r\n int l=text.length(); int index=0; String s1=\"\"; char [] c= new\r\n char [text.length()] ; for (int i=0;i <text.length();i++) {\r\n c[i]=text.toLowerCase().charAt(index++);\r\n \r\n System.out.println(\"Character at c[\"+i+\"] is\"+c[i]);\r\n \r\n }\r\n \r\n System.out.println(\"Character array is \"+Arrays.toString(c));\r\n \r\n int charSize=c.length; int index2=1;\r\n \r\n HashMap h =new HashMap();\r\n for (int i=0;i<charSize;i++)\r\n {\r\n for(int j=i+1;j<charSize;j++)\r\n {\r\n if (c[i]==c[j])\r\n {\r\n count++;\r\n //s1=s1+c[j];\r\n \r\n h.put(c[j],count);\r\n }\r\n }\r\n }\r\n \r\n \r\n System.out.println(h);\r\n \r\n int hsize= h.size();\r\n \r\n return hsize;\r\n }", "public static int letterLoop(String romConcat, char charSearch) {\n\t\tint count = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < romConcat.length(); i++) {\r\n\t\t\tchar currentChar = romConcat.charAt(i);\r\n\t\t\t\r\n\t\t\tif (currentChar == charSearch) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn count;\r\n\t}", "private void incrementLetterGradeCounter( int grade )\n{\n switch ( grade / 10 )\n{\ncase 9: // grade was between 90\ncase 10: // and 100, inclusive\n++aCount; // increment aCount\nbreak; // necessary to exit switch\ncase 8: // grade was between 80 and 89\n++bCount; // increment bCount\nbreak; // exit switch\n case 7: // grade was between 70 and 79\n++cCount; // increment cCount\nbreak; // exit switch\ncase 6: // grade was between 60 and 69\n++dCount; // increment dCount\nbreak; // exit switch\ndefault: // grade was less than 60\n++fCount; // increment fCount\nbreak; // optional; will exit switch anyway\n} // end switch\n }", "@Override\n public void onClick(View v) {\n Integer amount_tries = (Integer.parseInt(tries_tv.getText().toString()) + 1);\n // putting it back as a String\n String new_tries = amount_tries.toString();\n // updating the tries textview to incremented value\n tries_tv.setText(new_tries);\n\n }", "public static int count(String str, char a) {\r\n\t\tint counter = 0;\r\n\t\tchar b = ' ';\r\n\t\tfor (int i = 0; i < str.length(); i++) {\r\n\t\t\tb = str.toLowerCase().charAt(i);\t// string prebaciti u mala slova\r\n\t\t\tif (b == a) {\r\n\t\t\t\tcounter++;\t\t\t// brojac ponavljanja karaktera\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn counter;\r\n\t}", "@Override\n\tpublic boolean increment() throws TokenizerException {\n\t\t\n\t\t StringBuffer res = new StringBuffer();\n\n\t\t\tToken current_token=t_stream.next();\n\t\t\tif(current_token==null)\n\t\t\t\treturn false;\n\t\t\tString str=current_token.getTermText();\n\t\t\tchar [] buf=current_token.getTermBuffer();\n\t\t\t\n\t\t\tfor(char a:buf)\n\t\t\t{\n\t\t\t\tif(Character.isLetterOrDigit(a) || a=='.')\n\t\t\t\t\tres.append(a);\n\t\t\t\telse if(a=='-')\n\t\t\t\t{\n\t\t\t\t\tif(matcher==null)\n\t\t\t\t\t\tmatcher = intpattern.matcher(str);\n\t\t\t\t\telse\n\t\t\t\t\t\tmatcher.reset(str);\n\t\t\t boolean isMatched = matcher.matches();\n\t\t\t \n\t\t\t if(isMatched)\n\t\t\t \t res=res.append(a);\n\t\t\t\t}\n\t\t\t\telse if(a==' ')\n\t\t\t\t\tres=res.append(a);\n\t\t\t}\n\t\t\t\n\t\t\tif(!(str.equals(res.toString())))\n\t\t\t{\n\t\t\t\tcurrent_token.setTermText(res.toString());\n\t\t\t\tt_stream.replace(current_token);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(t_stream.hasNext())\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t\t\n\t}", "private void incrPositiveCount(){\n m_PositiveCount++;\n }", "void upCount(){\n count++;\n }", "public void incMessagesSent() {\n this.messagesSent++;\n }", "private void updateCount(String word) {\n\t\t\tthis.count += invertedIndex.get(word).get(this.location).size();\n\t\t\tthis.score = (double) this.count / counts.get(this.location);\n\t\t}", "public static void main(String[] args) {\n\t\tString sentence = \"I think it's fair to say practice can be heplful in learning. \"\r\n\t\t\t\t+ \"Just about anything it can be true.\";\r\n\t\tchar myChar = 'a';\r\n\t\tint counter = 0;\r\n\t\t\r\n\t\tfor(int i=0; i<sentence.length(); i++)\r\n\t\t{\t//if you find the char value, count it in the if block\r\n\t\t\tif(sentence.charAt(i)==myChar)\r\n\t\t\t{\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Total number of occurences of 'a' is \"+counter);\r\n\t}", "public void increaseEntered() {\n numTimesEntered++;\n }", "public void countWord() {\n\t\tiniStorage();\n\t\tWordTokenizer token = new WordTokenizer(\"models/jvnsensegmenter\",\n\t\t\t\t\"data\", true);\n\t\t// String example =\n\t\t// \"Nếu bạn đang tìm kiếm một chiếc điện thoại Android? Đây là, những smartphone đáng để bạn cân nhắc nhất. Thử linh tinh!\";\n\t\t// token.setString(example);\n\t\t// System.out.println(token.getString());\n\n\t\tSet<Map.Entry<String, String>> crawlData = getCrawlData().entrySet();\n\t\tIterator<Map.Entry<String, String>> i = crawlData.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tMap.Entry<String, String> pageContent = i.next();\n\t\t\tSystem.out.println(pageContent.getKey());\n\t\t\tPageData pageData = gson.fromJson(pageContent.getValue(),\n\t\t\t\t\tPageData.class);\n\t\t\ttoken.setString(pageData.getContent().toUpperCase());\n\t\t\tString wordSegment = token.getString();\n\t\t\tString[] listWord = wordSegment.split(\" \");\n\t\t\tfor (String word : listWord) {\n\t\t\t\taddToDictionary(word, 1);\n\t\t\t\tDate date;\n\t\t\t\ttry {\n\t\t\t\t\tdate = simpleDateFormat.parse(pageData.getTime().substring(\n\t\t\t\t\t\t\t0, 10));\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\taddToStatByDay(date, word, 1);\n\t\t\t}\n\t\t}\n\t}", "public void setCharCount(long value) {\n this.charCount = value;\n }", "@Override\n protected Integer count() {\n Matcher matcher = UPPER.matcher(this.password);\n Integer score = 0;\n\n while (matcher.find()) {\n score++;\n }\n\n return score;\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner info = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Enter the phrase:\");\r\n\t\tString sentence = info.nextLine();\r\n\t\t\r\n\t\tsentence = sentence.trim().toUpperCase();\r\n\t\t\r\n\t\tfor (int i = 0; i < sentence.length(); i++) {\r\n\t\t\tif (sentence.charAt(i) <'A' || sentence.charAt(i) > 'Z' ) {\r\n\t\t\t\tsentence = sentence.replace(\"\"+sentence.charAt(i), \"/\");\r\n//\t\t\t\tSystem.out.println(sentence);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString[] word = sentence.split(\"/\") ;\r\n\t\t\r\n\t\tint total = 0;\r\n\t\tif (word.length < 1) {\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\tHashMap hMap = new HashMap();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (word[0].length() > 0) {\r\n\t\t\t\thMap.put(word[0].length(), 1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor (int i = 1; i < word.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < i; j++) {\r\n\t\t\t\t\tif (word[i].length() == word[j].length()) {\r\n\t\t\t\t\t\tint cnt = (int) hMap.get(word[i].length());\r\n\t//\t\t\t\t\tSystem.out.println(\"cnt==>\"+cnt);\r\n\t\t\t\t\t\thMap.put(word[i].length(),++cnt);\r\n\t\t\t\t\t\t\t\r\n\t//\t\t\t\t\tSystem.out.println(word[i].length()+\"==>\"+hMap.get(word[i].length()));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (j == (i-1)){\r\n\t\t\t\t\t\t\thMap.put(word[i].length(), 1);\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\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSet<Integer> keys1 = hMap.keySet();\r\n\t\r\n\t\t\tfor(int key:keys1) {\r\n\t\t\t\tif (key !=0) {\r\n\t\t\t\t\tSystem.out.println(hMap.get(key)+\" \"+key +\" letter words\");\r\n\t\t\t\t\ttotal += (int)hMap.get(key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(total+\" total words\");\r\n\t\t\r\n\t}", "public void Insert(char ch)\n {\n arr[ch]++;\n }", "public static int Sentence(String name) {\n int count = 0;\n\n char space = ' ';\n\n for (int a = 0; a < name.length(); a++) {\n if (name.charAt(a) == space) {\n count = count + 1;\n\n\n }\n\n\n }\n\n return count + 1;\n }", "public void incrementa(View view) {\n TextView mensagem = findViewById(R.id.Mensagem);\n count++;\n\n Integer i = new Integer(count);\n mensagem.setText(i.toString());\n\n }", "void incrementAddedCount() {\n addedCount.incrementAndGet();\n }", "public void increaseCount()\n {\n minesLeft++;\n repaint();\n if (minesLeft == 0 && minesFound == numMines)\n {\n endGame(true); //This could only trigger if the player had flagged too many squares,\n }\t\t\t\t\t\t//then went back and removed the erroneous ones.\n }", "public static void main (String [] args) {\n WordCount wordCount2 = new WordCount();\r\n \r\n int count = 0;\r\n //creates an new scanner\r\n Scanner input = new Scanner(System.in);\r\n //gets the sentence and splits it at the spaces into an array\r\n String sentence = getSentence (input);\r\n String [] words = sentence.split(\" \");\r\n //parsing through the array and changes the counter\r\n for (int i = 0; i < words.length; i++){\r\n if (words[i].charAt(0) == 'a' || words[i].charAt(0) == 'A') {\r\n count = wordCount2.decrementCounter(count);\r\n } else {\r\n count = wordCount2.incrementCounter(count);\r\n }\r\n \r\n \r\n }\r\n //outputs the results \r\n System.out.println (\"There are \" + count + \" words in this sentence.\"); \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }" ]
[ "0.697162", "0.6728414", "0.6674261", "0.64551663", "0.629672", "0.62330186", "0.6218747", "0.617519", "0.6140831", "0.6123992", "0.60947055", "0.6082551", "0.6078321", "0.6073166", "0.6066357", "0.60603905", "0.60595465", "0.6015088", "0.5991366", "0.597639", "0.5973664", "0.59678376", "0.59580904", "0.59116447", "0.59006006", "0.5871147", "0.5867539", "0.58634186", "0.58609056", "0.58533984", "0.5850181", "0.5843024", "0.58314425", "0.5819438", "0.58087355", "0.58084446", "0.5787589", "0.57872844", "0.57863545", "0.57766026", "0.5775618", "0.5758487", "0.57533586", "0.57406646", "0.572032", "0.5710971", "0.57081515", "0.5695618", "0.56896454", "0.5680282", "0.56716174", "0.5644487", "0.56381345", "0.56375736", "0.5632983", "0.5632457", "0.56227255", "0.56226826", "0.56189466", "0.5613948", "0.5604797", "0.55955106", "0.5586695", "0.558435", "0.5581852", "0.55803025", "0.5552347", "0.55329967", "0.5531672", "0.5527065", "0.55228704", "0.551867", "0.55170834", "0.55128425", "0.5502029", "0.5494871", "0.54930353", "0.5490701", "0.548921", "0.5488209", "0.5484375", "0.5477152", "0.54715544", "0.5470409", "0.546954", "0.5461573", "0.54600644", "0.5453282", "0.5441322", "0.5433376", "0.54322404", "0.5428968", "0.5428824", "0.54242647", "0.54233456", "0.5414176", "0.5411344", "0.54059863", "0.53984255", "0.5398306", "0.5395647" ]
0.0
-1
Creates a new instance of Search
public Concat() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Search create(String search, SearchBuilder builder);", "public search() {\n }", "public MagicSearch createMagicSearch();", "private Search() {}", "TSearchResults createSearchResults(TSearchQuery searchQuery);", "public SearchSettings() { }", "public Search() {\n this.timestamp = System.currentTimeMillis();\n }", "Search getSearch();", "public SearchDocument() {\n super();\n }", "private SearchServiceFactory() {}", "public AbstractSearchEngine() {}", "public GoogleSearch() {\n\n\n }", "public NotSearch()\n\t\t{\n\t\t}", "TSearchQuery createSearchQuery(SearchQueryDefinitionAPI searchQueryDefinition);", "public Search(String value) {\n this(value, false);\n }", "public abstract S getSearch();", "@SuppressWarnings(\"unchecked\")\n private void initSearch() {\n if (searchBasic != null) {\n return;\n }\n try {\n // get a search class instance\n if (searchRecordTypeDesc.getSearchClass() != null) {\n search = (SearchT) searchRecordTypeDesc.getSearchClass().newInstance();\n }\n\n // get a advanced search class instance and set 'savedSearchId' into it\n searchAdvanced = null;\n if (StringUtils.isNotEmpty(savedSearchId)) {\n if (searchRecordTypeDesc.getSearchAdvancedClass() != null) {\n searchAdvanced = (SearchT) searchRecordTypeDesc.getSearchAdvancedClass().newInstance();\n Beans.setProperty(searchAdvanced, SAVED_SEARCH_ID, savedSearchId);\n } else {\n throw new NetSuiteException(new NetSuiteErrorCode(NetSuiteErrorCode.OPERATION_NOT_SUPPORTED),\n i18n.advancedSearchNotAllowed(recordTypeName));\n }\n }\n\n // basic search class not found or supported\n if (searchRecordTypeDesc.getSearchBasicClass() == null) {\n throw new NetSuiteException(new NetSuiteErrorCode(NetSuiteErrorCode.OPERATION_NOT_SUPPORTED),\n i18n.searchNotAllowed(recordTypeName));\n }\n\n // get a basic search class instance\n searchBasic = (SearchT) searchRecordTypeDesc.getSearchBasicClass().newInstance();\n\n } catch (InstantiationException | IllegalAccessException e) {\n throw new NetSuiteException(new NetSuiteErrorCode(NetSuiteErrorCode.INTERNAL_ERROR), e.getMessage(), e);\n }\n }", "public SearchService(String name) {\n super(\"\");\n }", "public ListSearchResults()\n {\n logEnter(LOG_TAG, \"<init>\");\n\n entryMap = new HashMap<String,SearchResultEntry>(0);\n entries = new LinkedList<SearchResultEntry>();\n instance = null;\n }", "public Search createSearch(String searchText)\n\t\t{\n\t\t\tStringBuilder sb = new StringBuilder(searchText);\n\t\t\ttrim(sb);\n\t\t\tSearch current = null;\n\t\t\twhile(sb.length() > 0)\n\t\t\t{\n\t\t\t\tboolean not = false;\n\t\t\t\tif(sb.length() > 1 && lower(sb.charAt(0)) == 'o' && lower(sb.charAt(1)) == 'r')\n\t\t\t\t{ // OR operator\n\t\t\t\t\tsb.delete(0, 2);\n\t\t\t\t\tExpressionSearch exp = exp(false);\n\t\t\t\t\texp.add(current);\n\t\t\t\t\tcurrent = exp;\n\t\t\t\t\ttrim(sb);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse if(sb.length() > 2 && lower(sb.charAt(0)) == 'a' && lower(sb.charAt(1)) == 'n'\n\t\t\t\t\t&& lower(sb.charAt(2)) == 'd')\n\t\t\t\t{\n\t\t\t\t\tsb.delete(0, 3);\n\t\t\t\t\ttrim(sb);\n\t\t\t\t}\n\t\t\t\telse if(sb.length() > 1 && sb.charAt(0) == '!')\n\t\t\t\t{\n\t\t\t\t\tsb.delete(0, 1);\n\t\t\t\t\ttrim(sb);\n\t\t\t\t\tnot = true;\n\t\t\t\t}\n\n\t\t\t\tSearch next;\n\t\t\t\tif(sb.charAt(0) == '(')\n\t\t\t\t{\n\t\t\t\t\tint c = goPastParen(sb, 0);\n\t\t\t\t\tString nextExpr = sb.substring(1, c).trim();\n\t\t\t\t\tif(nextExpr.length() == 0)\n\t\t\t\t\t\tthrow new IllegalArgumentException(\"Empty parenthetical expression\");\n\t\t\t\t\tnext = createSearch(nextExpr);\n\t\t\t\t\tsb.delete(0, c + 1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tnext = parseNext(sb);\n\t\t\t\tif(not)\n\t\t\t\t{\n\t\t\t\t\tNotSearch notS = not();\n\t\t\t\t\tnotS.setOperand(next);\n\t\t\t\t\tnext = notS;\n\t\t\t\t}\n\n\t\t\t\tif(current instanceof ExpressionSearch\n\t\t\t\t\t&& ((ExpressionSearch) current).getOperandCount() == 1)\n\t\t\t\t\t((ExpressionSearch) current).add(next);\n\t\t\t\telse if(current != null)\n\t\t\t\t{\n\t\t\t\t\tExpressionSearch exp = exp(true);\n\t\t\t\t\texp.addOps(current, next);\n\t\t\t\t\tcurrent = exp;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcurrent = next;\n\n\t\t\t\ttrim(sb);\n\t\t\t}\n\t\t\tif(current instanceof ExpressionSearch)\n\t\t\t\t((ExpressionSearch) current).simplify();\n\t\t\treturn current;\n\t\t}", "public NormalSearch() throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException {\n super();\n //ins = new globalInstance();\n // TODO Auto-generated constructor stub\n }", "public TinySearchEngine()\n {\n this.myIndex = new HashMap();\n this.documentData = new HashMap();\n this.sorted = false;\n this.sort = new Sort();\n this.search = new BinarySearch();\n }", "public SearchPage() {\n\t\tPageFactory.initElements(driver, this);\n\t\t\n\t}", "SearchResultsType createSearchResultsType();", "public SearchTrack() {\n\t\tsuper();\n\t}", "public SearchViewController() {\n }", "public SearchByName() {\n initComponents();\n }", "public SearchCache() {\n this(CAPACITY, new Ticker());\n }", "public SOASearchPage() {\r\n\t\tsuper();\r\n\t}", "public static interface SearchType\n\t{\n\t\t/**\n\t\t * Creates a search of this type with the given query\n\t\t * \n\t\t * @param search The search query\n\t\t * @param builder The search builder that is compiling the search\n\t\t * @return The compiled search object representing the given query\n\t\t */\n\t\tpublic abstract Search create(String search, SearchBuilder builder);\n\n\t\t/** @return All headers that may begin a search of this type */\n\t\tpublic abstract String [] getHeaders();\n\t}", "private void createSearchViewModel() {\n SearchChampionViewModelFactory searchChampionViewModelFactory =\n new SearchChampionViewModelFactory(Injection.provideChampionsRepository(this));\n\n // Create ViewModel\n searchChampionViewModel = ViewModelProviders\n .of(this, searchChampionViewModelFactory)\n .get(SearchChampionViewModel.class);\n }", "public SearchPage() {\n\t\tdoRender();\n\t}", "public FindCommand(String searchTerms) {\n super(false);\n this.searchTerms = searchTerms;\n }", "public LibrarySearch() {\n\t\titems = new ArrayList<Reference>();\n\t}", "public static synchronized ClubSearch getInstance()\r\n {\r\n if (clubSearch == null)\r\n {\r\n clubSearch = new ClubSearch();\r\n }\r\n \r\n return clubSearch;\r\n }", "SearchResponse search(SearchRequest searchRequest) throws IOException;", "List<SearchResult> search(SearchQuery searchQuery);", "public QueryInfoSearch getQueryInfoSearch() {\n if (queryInfoSearch != null) return queryInfoSearch;\n queryInfoSearch = new QueryInfoSearch();\n return queryInfoSearch;\n }", "public void search() {\n }", "void searchProbed (Search search);", "public SearchException() {\n }", "public interface ISearch {\n\n Object build();\n}", "public VehicleSearchRequest createSearchVechicle() {\r\n\r\n\t\tVehicleSearchRequest searchRequest = new VehicleSearchRequest();\r\n\r\n\t\tif (StringUtils.isBlank(searchLocation)) {\r\n\t\t\tsearchRequest.setLocation(DefaultValues.LOCATION_DEFAULT.getDef());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setLocation(searchLocation);\r\n\t\t}\r\n\r\n\t\tif (StringUtils.isBlank(searchVehicleType)) {\r\n\t\t\tsearchRequest.setVehicleType(VehicleType.getEnum(DefaultValues.VEHICLE_TYPE_DEFAULT.getDef()));\r\n\t\t} else {\r\n\t\t\tsearchRequest.setVehicleType(VehicleType.getEnum(searchVehicleType));\r\n\t\t}\r\n\r\n\t\tif (StringUtils.isBlank(searchFin)) {\r\n\t\t\tsearchRequest.setFin(DefaultValues.FIN_DEFAULT.getDef());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setFin(searchFin);\r\n\t\t}\r\n\r\n\t\tif (StringUtils.isBlank(searchModel)) {\r\n\t\t\tsearchRequest.setModel(DefaultValues.MODEL_DEFAULT.getDef());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setModel(searchModel);\r\n\t\t}\r\n\r\n\t\tif (StringUtils.isBlank(searchFuelType)) {\r\n\t\t\tsearchRequest.setFuelType(FuelType.DEFAULT);\r\n\t\t} else {\r\n\t\t\tsearchRequest.setFuelType(FuelType.getEnum(searchFuelType));\r\n\t\t}\r\n\r\n\t\tif (searchMaxCapacity == 0) {\r\n\t\t\tsearchRequest.setMaxCapacity(DefaultValues.MAX_CAPACITY_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMaxCapacity(searchMaxCapacity);\r\n\t\t}\r\n\r\n\t\tif (searchMinCapacity == 0) {\r\n\t\t\tsearchRequest.setMinCapacity(DefaultValues.MIN_CAPACITY_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMinCapacity(searchMinCapacity);\r\n\t\t}\r\n\r\n\t\tif (searchMinYear == 0) {\r\n\t\t\tsearchRequest.setMinYear(DefaultValues.MIN_YEAR_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMinYear(searchMinYear);\r\n\t\t}\r\n\r\n\t\tif (searchMaxYear == 0) {\r\n\t\t\tsearchRequest.setMaxYear(DefaultValues.MAX_YEAR_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMaxYear(searchMaxYear);\r\n\t\t}\r\n\r\n\t\tif (searchMaxPrice == 0) {\r\n\t\t\tsearchRequest.setMaxPrice(DefaultValues.MAX_PRICE_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMaxPrice(searchMaxPrice);\r\n\t\t}\r\n\r\n\t\tif (searchMinPrice == 0) {\r\n\t\t\tsearchRequest.setMinPrice(DefaultValues.MIN_PRICE_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMinPrice(searchMinPrice);\r\n\t\t}\r\n\t\treturn searchRequest;\r\n\t}", "public SearchResponse search(SearchRequest request) throws SearchServiceException;", "public Controller() {\n\n lastSearches = new SearchHistory();\n\n }", "private void createSampleSearch() {\n String userNameToFind = \"mweston\";\n CustomUser user = userService.findByUserName(userNameToFind);\n List<Search> searches = user.getSearches();\n long mwestonUserId = user.getId();\n\n /**\n * The below check is done because when using a Postgres database I will not be using the\n * create-drop but instead validate so I do not want to make too many sample API requests\n * (such as every time I start up this application).\n */\n if(searches.size() > 0) {\n return ;\n }\n\n Search search = searchService.createSearch(SpringJPABootstrap.SAMPLE_ADDRESS);\n searchService.saveSearch(search, mwestonUserId);\n\n Search secondSearch = searchService.createSearch(SpringJPABootstrap.SAMPLE_ADDRESS_TWO);\n searchService.saveSearch(secondSearch, mwestonUserId);\n\n searchService.createSearch(SpringJPABootstrap.STONERIDGE_MALL_RD_SAMPLE_ADDRESS);\n\n search = searchService.createSearch(SpringJPABootstrap.SAMPLE_ADDRESS);\n searchService.saveSearch(search, mwestonUserId);\n\n search = searchService.createSearch(SpringJPABootstrap.SAMPLE_ADDRESS);\n searchService.saveSearch(search, mwestonUserId);\n\n search = searchService.createSearch(SpringJPABootstrap.SAMPLE_ADDRESS);\n searchService.saveSearch(search, mwestonUserId);\n\n search = searchService.createSearch(SpringJPABootstrap.SAMPLE_ADDRESS);\n searchService.saveSearch(search, mwestonUserId);\n }", "public void search() {\r\n \t\r\n }", "public SearchResults() {\n\t\tPageFactory.initElements(driver, this);\n\t}", "public SearchConditionSB() {\r\n }", "public Search() throws Exception {\n sesion = Controller.getSession();\n fullTextSesion = org.hibernate.search.Search.getFullTextSession(sesion);\n }", "TSearchResults searchWithQuery(TSearchQuery searchQuery, SearchParametersAPI overrideParameters, TRepo repo, AreaFactory<TContent, TArea> areaFactory, ContentFactory<TContent> contentFactory);", "private void makeSearchButton() {\n searchButton = new JButton();\n searchButton.setBorder(new CompoundBorder(\n BorderFactory.createMatteBorder(4, 0, 4, 7, DrawAttribute.lightblue),\n BorderFactory.createRaisedBevelBorder()));\n searchButton.setBackground(new Color(36, 45, 50));\n searchButton.setIcon(new ImageIcon(MapIcon.iconURLs.get(\"searchIcon\")));\n searchButton.setFocusable(false);\n searchButton.setBounds(320, 20, 43, 37);\n searchButton.setActionCommand(\"search\");\n }", "public SearchServlet() {\n\t\tsuper();\n\t}", "public GUISearch() {\n initComponents();\n }", "public SearchQuery build() {\n this._Web_search.set_maxDepth(_maxDepth);\n this._Web_search.set_maxResults(_maxResults);\n this._Web_search.set_threshold(_threshold);\n this._Web_search.set_beamWidth(_beamWidth);\n if (heuristicSearchType == null) {\n this._Web_search.setHeuristicSearchType(Enums.HeuristicSearchType.BEST_FIRST);\n } else {\n this._Web_search.setHeuristicSearchType(heuristicSearchType);\n }\n\n return new SearchQuery(this._query, this._Web_search);\n }", "public abstract ISearchCore getSearchCore();", "public Builder setSearch(com.clarifai.grpc.api.Search value) {\n if (searchBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n inputSource_ = value;\n onChanged();\n } else {\n searchBuilder_.setMessage(value);\n }\n inputSourceCase_ = 10;\n return this;\n }", "public static void main(String[] args) {\n\t\tSearch s = new Search();\n\t\ts.init();\n\t}", "public void testSearchManagerWithInstantiation() {\n loadTestingData();\n\n Query<?> cacheQuery = createQuery(\"blurb:'playing'\", Person.class);\n\n try (CloseableIterator<?> found = cacheQuery.iterator()) {\n assertTrue(found.hasNext());\n found.next();\n assertFalse(found.hasNext());\n }\n }", "public Search(Connection con, String inpt) {\n index = 0;\n conn = con;\n results = new ArrayList<>();\n input = inpt;\n query(conn, input);\n }", "public void buildSearcher() throws IOException {\n IndexReader rdr = DirectoryReader.open(FSDirectory.open(new File(indexDir).toPath()));\n searcher = new IndexSearcher(rdr);\n parser = new QueryParser(\"text\", new StandardAnalyzer());\n }", "abstract public void search();", "void search();", "void search();", "@Override\r\n\tpublic void search() {\n\r\n\t}", "protected SearchSearchResponse doNewSearch(QueryContext queryContext) throws Exception {\n\t\t\n\t\tBooleanQuery query = _queryBuilder.buildSearchQuery(queryContext);\n\t\t\n\t\tBooleanQuery rescoreQuery = \n\t\t\t\t_queryBuilder.buildRescoreQuery(queryContext);\n\t\t\n\t\tList<Aggregation> aggregations = getAggregations(queryContext);\n\n\t\treturn execute(queryContext, query, rescoreQuery, aggregations);\n\t}", "public Finder() {\n \n }", "@Override\n\tpublic void search() {\n\t}", "public SearchServiceRestClientImpl() {\n this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build());\n }", "public Indexer() {\n }", "public insearch() {\n initComponents();\n }", "public SearchQueryBuilder(String query, String searchType) {\n this(query, SearchTypeService.getSearchModel(searchType));\n }", "ReagentSearch getReagentSearch();", "private SearchBar() {\n controller = FilterController.getInstance();\n initComponents();\n createNewQueryPanel();\n }", "private static SearchResponse createSearchResponse() {\n long tookInMillis = randomNonNegativeLong();\n int totalShards = randomIntBetween(1, Integer.MAX_VALUE);\n int successfulShards = randomIntBetween(0, totalShards);\n int skippedShards = randomIntBetween(0, totalShards);\n InternalSearchResponse internalSearchResponse = InternalSearchResponse.empty();\n\n return new SearchResponse(\n internalSearchResponse,\n null,\n totalShards,\n successfulShards,\n skippedShards,\n tookInMillis,\n ShardSearchFailure.EMPTY_ARRAY,\n SearchResponse.Clusters.EMPTY\n );\n }", "private DynamicForm createSearchBox() {\r\n\t\tfinal DynamicForm filterForm = new DynamicForm();\r\n\t\tfilterForm.setNumCols(4);\r\n\t\tfilterForm.setAlign(Alignment.LEFT);\r\n\t\tfilterForm.setAutoFocus(false);\r\n\t\tfilterForm.setWidth(\"59%\"); //make it line up with sort box\r\n\t\t\r\n\t\tfilterForm.setDataSource(SmartGWTRPCDataSource.getInstance());\r\n\t\tfilterForm.setOperator(OperatorId.OR);\r\n\t\t\r\n\t\t//Visible search box\r\n\t\tTextItem nameItem = new TextItem(\"name\", \"Search\");\r\n\t\tnameItem.setAlign(Alignment.LEFT);\r\n\t\tnameItem.setOperator(OperatorId.ICONTAINS); // case insensitive\r\n\t\t\r\n\t\t//The rest are hidden and populated with the contents of nameItem\r\n\t\tfinal HiddenItem companyItem = new HiddenItem(\"company\");\r\n\t\tcompanyItem.setOperator(OperatorId.ICONTAINS);\r\n\t\tfinal HiddenItem ownerItem = new HiddenItem(\"ownerNickName\");\r\n\t\townerItem.setOperator(OperatorId.ICONTAINS);\r\n\r\n\t\tfilterForm.setFields(nameItem,companyItem,ownerItem);\r\n\t\t\r\n\t\tfilterForm.addItemChangedHandler(new ItemChangedHandler() {\r\n\t\t\tpublic void onItemChanged(ItemChangedEvent event) {\r\n\t\t\t\tString searchTerm = filterForm.getValueAsString(\"name\");\r\n\t\t\t\tcompanyItem.setValue(searchTerm);\r\n\t\t\t\townerItem.setValue(searchTerm);\r\n\t\t\t\tif (searchTerm==null) {\r\n\t\t\t\t\titemsTileGrid.fetchData();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tCriteria criteria = filterForm.getValuesAsCriteria();\r\n\t\t\t\t\titemsTileGrid.fetchData(criteria);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn filterForm;\r\n\t}", "private AniteQueryType(final int searchType)\r\n\t{\r\n\t\tthis.searchType = searchType;\r\n\t}", "public Search(UserInput userInput) {\n\t\tthis.userInput = userInput;\n\t\tstorage = Storage.getInstance();\n\t\tfeedback = Feedback.getInstance();\n\t\tnew ArrayList<Task>();\n\t}", "public SearchFile(){\r\n filePath = \"Unknown\";\r\n wordSearched = \"Unknown\";\r\n wordLength = 0;\r\n occurrences = 0;\r\n }", "public com.clarifai.grpc.api.Search.Builder getSearchBuilder() {\n return getSearchFieldBuilder().getBuilder();\n }", "private static Searcher createSearcher(String[] args) {\n if (args.length > 1 && \"duden\".equals(args[1])) {//Use DWDS by default, Duden only on explicit request\n return SearcherFactory.newDuden();\n } else {\n return SearcherFactory.newDwds();\n }\n }", "void searchStarted (Search search);", "public SearchResultPanel()\n\t{\n\t\tcreateComponents();\n\t\tdesignComponents();\n\t\taddComponents();\n\t}", "public TokenLocationSearchAnalyzer(Properties properties) {\n this();\n this.properties = properties;\n readInSearchTokens();\n }", "public SearchEntry() {\n initComponents();\n }", "@NonNull public abstract SearchView view();", "public DatasetSearchBean() {\n }", "public SearchIterator(Search... searches)\n\t\t{\n\t\t\ttheSearches = searches;\n\t\t}", "public AmazonCloudSearchClient() {\n this(new DefaultAWSCredentialsProviderChain(), new ClientConfiguration());\n }", "void loadSearch(UserSearch search);", "public SearchResponse<T, P> build(Pageable searchRequest, QueryResponse queryResponse) {\n // Create response\n SearchResponse<T, P> searchResponse = new SearchResponse<T, P>(searchRequest);\n searchResponse.setCount(queryResponse.getResults().getNumFound());\n searchResponse.setLimit(queryResponse.getResults().size());\n // The results and facets are copied into the response\n final List<ST> resultsST = queryResponse.getBeans(annotatedClass);\n // convert types\n final List<T> results = Lists.newArrayList();\n for (ST x : resultsST) {\n results.add(x);\n }\n searchResponse.setResults(results);\n searchResponse.setFacets(getFacetsFromResponse(queryResponse));\n setHighlightedFields(searchResponse, queryResponse);\n if(queryResponse.getSpellCheckResponse() != null){\n searchResponse.setSpellCheckResponse(SpellCheckResponseBuilder.build(queryResponse.getSpellCheckResponse()));\n }\n return searchResponse;\n }", "TSearchQuery prepareSearchQuery(SearchQueryDefinitionAPI searchQueryDefinition);", "public SearchResultModel(Parcel in) {\n\t\tthis.title = in.readString();\n\t\tthis.airDay = in.readString();\n\t\tthis.airTime = in.readString();\n\t\tthis.bannerUrl = in.readString();\n\t\tthis.certification = in.readString();\n\t\tthis.country = in.readString();\n\t\tthis.network = in.readString();\n\t\tthis.oveview = in.readString();\n\t\tthis.posterUrl = in.readString();\n\t\tthis.traktUrl = in.readString();\n\t\tthis.ratting_percentage = in.readString();\n\t\tthis.loved = in.readString();\n\t\tthis.hated = in.readString();\n\t\tthis.genres = in.readString();\n\t\tthis.firstAired = in.readInt();\n\t\tthis.runtime = in.readInt();\n\t\tthis.tvRageId = in.readInt();\n\t\tthis.tvdbId = in.readInt();\n\t\tthis.year = in.readInt();\n\t\tthis.ended = in.readByte() != 0;\n\t}", "public abstract Search defaultSearch(StringBuilder sb);", "public SearchContestsManagerAction() {\r\n }", "public SearchLogs() {\n this(\"search_logs\", null);\n }", "public Inventory inventorySearch (TheGroceryStore g, String searchKey);", "public LittleSearchEngine() {\n\t\tkeywordsIndex = new HashMap<String,ArrayList<Occurrence>>(1000,2.0f);\n\t\tnoiseWords = new HashSet<String>(100,2.0f);\n\t}", "public LittleSearchEngine() {\n\t\tkeywordsIndex = new HashMap<String,ArrayList<Occurrence>>(1000,2.0f);\n\t\tnoiseWords = new HashSet<String>(100,2.0f);\n\t}", "SearchResponse search(Pageable pageable, QueryBuilder query, AggregationBuilder aggregation);", "private SearchUI()\n\t{\n\t}" ]
[ "0.7994193", "0.78985566", "0.7826114", "0.77683765", "0.7609508", "0.72886056", "0.7287888", "0.7198915", "0.7125152", "0.6958173", "0.6857441", "0.68332213", "0.681801", "0.67939454", "0.6565847", "0.65158176", "0.6509529", "0.64808077", "0.64527535", "0.6366017", "0.6358442", "0.6325574", "0.6308995", "0.62990934", "0.62910515", "0.62874615", "0.628616", "0.62455916", "0.62289435", "0.6228287", "0.6225615", "0.6203367", "0.6188606", "0.6184656", "0.61835855", "0.6175352", "0.61561424", "0.61444473", "0.61399615", "0.6112945", "0.61096513", "0.6103286", "0.6098413", "0.6093992", "0.60498047", "0.6026531", "0.60261905", "0.60148495", "0.6006297", "0.5954785", "0.59500897", "0.59159696", "0.5913014", "0.59077364", "0.59071815", "0.58745605", "0.58701724", "0.58538246", "0.5844776", "0.5827592", "0.58235645", "0.5821583", "0.581423", "0.581423", "0.58116716", "0.58109105", "0.58031833", "0.5802931", "0.5801097", "0.5798824", "0.5780774", "0.576594", "0.57489425", "0.5730772", "0.57279366", "0.5723331", "0.5721284", "0.57147276", "0.57143956", "0.57053745", "0.5690416", "0.56808263", "0.5672368", "0.5671252", "0.5667634", "0.56618714", "0.5656926", "0.5641382", "0.5638202", "0.563754", "0.5637112", "0.5631161", "0.5630958", "0.5625939", "0.5621382", "0.56173515", "0.56127095", "0.56070703", "0.56070703", "0.5605729", "0.56013894" ]
0.0
-1
At least one parameter
@Override public boolean isValidParameterCount(int parameterCount) { return parameterCount> 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isParameterProvided();", "@Override\n\tpublic boolean isHaveParam() {\n\t\treturn param !=null;\n\t}", "boolean hasParameters();", "@Override\n\tpublic boolean isParam() {\n\t\treturn false;\n\t}", "public void checkParameters() {\n }", "@Override\r\n\tpublic String getFirstArg() {\n\t\treturn null;\r\n\t}", "private void checkForEmptyLine() throws OutmatchingParametersToMethodCall {\n if (this.params.isEmpty() && method.getParamAmount() != 0) {\n throw new OutmatchingParametersToMethodCall();\n } else if (method.getParamAmount() == 0 && !this.params.isEmpty()) {\n throw new OutmatchingParametersToMethodCall();\n }\n }", "@Override\n\tpublic boolean hasParameterGuard() {\n\t\treturn true;\n\t}", "public boolean hasParameter(){\n\t\tif (parameterType==null)\n\t\t\treturn false;\n\t\telse{\n\t\t\treturn true;\n\t\t}\n\t}", "boolean hasParameterValue();", "AstroArg empty();", "protected void validateParameter(String... param) throws NavigationException {\r\n\t\tif (param.length > 0){\r\n\t\t\tfor(int i = 0; i < param.length; i++){\r\n\t\t\t\tif (param[i] != null && param[i].isEmpty()) {\r\n\t\t\t\t\tthrow new NavigationException(\"parametro no enviado\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic int parametersCount() {\n\t\treturn 0;\n\t}", "@Override\n\tprotected boolean validateRequiredParameters() throws Exception {\n\t\treturn true;\n\t}", "public boolean hasParameter(String name) throws IllegalArgumentException {\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"hasParameter() \");\n Via via=(Via)sipHeader;\n \n if(name == null) throw new IllegalArgumentException\n (\"JAIN-EXCEPTION: null parameter\");\n return via.hasParameter(name);\n }", "@Override \n\t\tprotected int getNumParam() {\n\t\t\treturn 1;\n\t\t}", "default boolean hasVariadicParameter() {\n if (getNumberOfParams() == 0) {\n return false;\n } else {\n return getParam(getNumberOfParams() - 1).isVariadic();\n }\n }", "boolean hasParameterName();", "@Override\n\tpublic boolean hasParameter(String id) {\n\t\treturn false;\n\t}", "public abstract ImmutableSet<String> getExplicitlyPassedParameters();", "private void validateInputParameters(){\n\n }", "abstract public boolean argsNotFull();", "@Override\n public Class<?>[] getParameterTypes() {\n return null;\n }", "@Override\n public int getNumberArguments() {\n return 1;\n }", "public abstract boolean isArrayParams();", "public boolean isRequiredParam() {\n return this.isRequiredParam;\n }", "public boolean hasParameters() {\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"hasParameters()\");\n Via via=(Via)sipHeader;\n \n return via.hasParameters();\n }", "public boolean isSetParam() {\n return this.param != null;\n }", "@Override\n protected boolean hasValidNumberOfArguments(int numberOfParametersEntered) {\n return numberOfParametersEntered == 3;\n }", "@Override\n\t\tpublic Object[] getParameters() {\n\t\t\treturn null;\n\t\t}", "@Override\n\tpublic RequestParams onParams(int paramFlag) {\n\t\treturn null;\n\t}", "public boolean hasParameterName()\n {\n return this.paramName != null;\n }", "public static void notNullOrEmpty(Object[] parameter, String name) throws IllegalArgumentException\n {\n if(parameter == null || parameter.length == 0) {\n throw new IllegalArgumentException(name + \" parameter is empty.\");\n }\n }", "public boolean hasParam(String paramName);", "public boolean isSetParams() {\n return this.params != null;\n }", "protected abstract boolean checkedParametersAppend();", "@Override\n\tpublic Collection<Parameter<?>> getParameters() {\n\t\treturn null;\n\t}", "@Override\n public final int parseArguments(Parameters params) {\n return 1;\n }", "public void sum(){ //np param\n System.out.println(\"SUM method with no params\");\n\n }", "@Override\n public void setParameter(String parameter, String value) {\n //no parameters\n }", "@Override\n\tprotected void validateParameterValues() {\n\t\t\n\t}", "Optional<String[]> arguments();", "@Override\r\n public String getFirstArg() {\n return name;\r\n }", "private static void checkArg(Object paramObject) {\n/* 687 */ if (paramObject == null)\n/* 688 */ throw new NullPointerException(\"Argument must not be null\"); \n/* */ }", "protected void missingParams() {\r\n throw new IllegalStateException(\r\n \"Function is missing parameters: \" + getName());\r\n }", "public boolean isSetParams() {\n return this.params != null;\n }", "public boolean isSetParams() {\n return this.params != null;\n }", "public boolean isSetParams() {\n return this.params != null;\n }", "public boolean isSetParams() {\n return this.params != null;\n }", "public boolean isSetParams() {\n return this.params != null;\n }", "public void setRequiredParam(boolean requiredParam) {\n this.isRequiredParam = requiredParam;\n }", "ParameterList getParameters();", "private void checkArgTypes() {\n Parameter[] methodParams = method.getParameters();\n if(methodParams.length != arguments.length + 1) {\n throw new InvalidCommandException(\"Incorrect number of arguments on command method. Commands must have 1 argument for the sender and one argument per annotated argument\");\n }\n\n Class<?> firstParamType = methodParams[0].getType();\n\n boolean isFirstArgValid = true;\n if(requiresPlayer) {\n if(firstParamType.isAssignableFrom(IPlayerData.class)) {\n usePlayerData = true; // Command methods annotated with a player requirement can also use IPlayerData as their first argument\n } else if(!firstParamType.isAssignableFrom(Player.class)) {\n isFirstArgValid = false; // Otherwise, set it to invalid if we can't assign it from a player\n }\n } else if(!firstParamType.isAssignableFrom(CommandSender.class)) { // Non player requirement annotated commands must just take a CommandSender\n isFirstArgValid = false;\n }\n\n if(!isFirstArgValid) {\n throw new InvalidCommandException(\"The first argument for a command must be a CommandSender. (or a Player/IPlayerData if annotated with a player requirement)\");\n }\n }", "public boolean hasValidArgs() {\r\n // if it has has zero argument, it is valid\r\n boolean zeroArgs = this.getCmd().getArguments().size() == 0;\r\n // return the boolean value\r\n return zeroArgs;\r\n }", "int getNumParameters();", "@Override\n\tpublic String[] getParameterValues(String arg0) {\n\t\treturn null;\n\t}", "public boolean takesArgument() {\n if (argumentPresence != null) {\n return true;\n }\n return false;\n }", "private boolean hasParam(SearchCriteria sc, final String param) {\n final Object obj = sc.getParam(param);\n return obj != null && !obj.toString().isEmpty();\n }", "private void countParams() {\n if( paramCount >= 0 ) {\n return;\n }\n Iterator<AnyType> parser = name.getSignature( types );\n paramCount = needThisParameter ? 1 : 0;\n while( parser.next() != null ) {\n paramCount++;\n }\n valueType = parser.next();\n while( parser.hasNext() ) {\n valueType = parser.next();\n paramCount--;\n }\n }", "public int getNumOfParams() { return params.length; }", "@Override\n\tpublic Annotation[] getParameterAnnotations() {\n\t\treturn new Annotation[]{};\n\t}", "public Setparam() {\r\n super();\r\n }", "interface NoParametersListener {\n\tvoid execute();\n}", "protected int checkParam(Object o, String name)\n {\n if (o == null) {\n System.err.println(format(\"Parameter %s is not set\", name));\n return 1;\n }\n return 0;\n }", "protected static boolean ensureNumArgs( String param[], int n ) {\n\t\tif ( n >= 0 && param.length != n || n < 0 && param.length < -n ) {\n\t\t\tSystem.err.println( \"Wrong number (\" + param.length + \") of arguments.\" );\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private boolean isParamsEmpty(String... params){\n for (String param : params) {\n if (param.isEmpty())\n return true;\n }\n return false;\n }", "private void checkForEmptyParameter(String param, String paramName)\n\t\t\tthrows MissingParameterException, InvalidParameterException {\n\t\tif (param != null && param.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(paramName + \" can not be empty\");\n\t\t}\n\t}", "boolean isVarargs();", "boolean isVarargs();", "boolean isVarargs();", "private boolean validateParams(int amount) {\n\t\tString paramArray[] = {param1,param2,param3,param4,param5,param6};\r\n\t\tfor(int i = 0; i < amount; i++) {\r\n\t\t\tif(paramArray[i] == null) {\r\n\t\t\t\t//Error\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private boolean checkParams(String[] params){\r\n\t\tfor(String param:params){\r\n\t\t\tif(param == \"\" || param == null || param.isEmpty()){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "boolean isValid(final Parameter... parameters);", "@Override\n public boolean isSubroutineParameter(int index) {\n return false;\n }", "int getParametersCount();", "int getParametersCount();", "private void validateParameters() {\r\n if (command == null) {\r\n throw new BuildException(\r\n \"'command' parameter should not be null for coverity task.\");\r\n }\r\n\r\n }", "boolean hasAdParameter();", "@Test\n public void testWithEmptyString() throws org.nfunk.jep.ParseException\n {\n Stack<Object> parameters = CollectionsUtils.newParametersStack(\"\");\n function.run(parameters);\n assertEquals(TRUE, parameters.pop());\n }", "private void checkMandatoryArguments() throws ArgBoxException {\n\t\tfinal List<String> errors = registeredArguments.stream()\n\t\t\t\t.filter(arg -> arg.isMandatory())\n\t\t\t\t.filter(arg -> !parsedArguments.containsKey(arg))\n\t\t\t\t.map(arg -> String.format(\"The argument %1s is required !\", arg.getLongCall()))\n\t\t\t\t.collect(Collectors.toList());\n\t\tthrowException(() -> !errors.isEmpty(), getArgBoxExceptionSupplier(\"Some arguments are missing !\", errors));\n\t}", "public int getNumberParameters() { return parameters.length; }", "static boolean optionalPositionalParameterTypes(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"optionalPositionalParameterTypes\")) return false;\n if (!nextTokenIs(b, LBRACKET)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, LBRACKET);\n r = r && normalParameterTypes(b, l + 1);\n r = r && optionalPositionalParameterTypes_2(b, l + 1);\n r = r && consumeToken(b, RBRACKET);\n exit_section_(b, m, null, r);\n return r;\n }", "private static boolean paramValid(String paramName,String paramValue){\n return paramName!=null&&paramName.length()>0&&paramValue!=null&&paramValue.length()>0;\n }", "@Ignore\n\t@Test\n\tpublic void testParamNull() {\n\t\tregisterParamException(null, keyString, valueString);\n\t\tregisterParamException(groupString, null, valueString);\n\t\tregisterParamException(groupString, keyString, null);\n\t}", "protected void a(int paramInt1, int paramInt2, boolean paramBoolean, yz paramyz) {}", "private static void checkArg(Object s) {\n if (s == null) {\n throw new NullPointerException(\"Argument must not be null\");\n }\n }", "int getParamsCount();", "int countTypedParameters();", "private FunctionParametersValidator() {}", "@Test\n public void canDetect_TwoAnnotations_WithRuntimeRetention_ForSingleParam() {\n final MethodInfo methodInfo = classInfo.getMethodInfo()\n .getSingleMethod(\"twoAnnotations_WithRuntimeRetention_ForSingleParam\");\n\n assertThat(methodInfo.hasParameterAnnotation(ParamAnnoRuntime.class)).isTrue();\n\n assertThat(methodInfo.hasParameterAnnotation(SecondParamAnnoRuntime.class)).isTrue();\n }", "public boolean isParameter() {\n\t\treturn isWholeOperationParameter;\n\t}", "public Parameterized() {\n setParameters(null);\n }", "protected boolean onlyUsesTheseParameters(Set<TypeParameter> parameters) {\n if (isParameterized()) {\n if (isFullyInstantiated()) return true;\n\n for (ModifiedType modifiedType : getTypeParameters()) {\n Type parameter = modifiedType.getType();\n if (parameter instanceof TypeParameter typeParameter) {\n if (!parameters.contains(typeParameter)) return false;\n } else if (!parameter.onlyUsesTheseParameters(parameters)) return false;\n }\n }\n\n return true;\n }", "public void validateNamedParameters() {\n if (namedParameters != null) {\n for (Map.Entry<String, Object> e : namedParameters.entrySet()) {\n if (e.getValue() == null) {\n throw log.queryParameterNotSet(e.getKey());\n }\n }\n }\n }", "public boolean isParameterized() {\n\t\treturn this.typeSignatures != null && this.typeArguments != null;\n\t}", "private static boolean defaultFormalNamedParameter_1(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"defaultFormalNamedParameter_1\")) return false;\n defaultFormalNamedParameter_1_0(b, l + 1);\n return true;\n }", "private static boolean functionFormalParameter_1(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"functionFormalParameter_1\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = functionFormalParameter_1_0(b, l + 1);\n if (!r) r = functionFormalParameter_1_1(b, l + 1);\n if (!r) r = functionFormalParameter_1_2(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "@Test\n public void canDetect_ParameterAnnotation_OneRuntimeRetention_OneSourceRetention() {\n final MethodInfo methodInfo = classInfo.getMethodInfo()\n .getSingleMethod(\"oneRuntimeRetention_OneSourceRetention\");\n\n assertThat(methodInfo.hasParameterAnnotation(ParamAnnoRuntime.class)).isTrue();\n }", "private static boolean functionFormalParameter_1_1(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"functionFormalParameter_1_1\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = functionFormalParameter_1_1_0(b, l + 1);\n r = r && functionFormalParameter_1_1_1(b, l + 1);\n r = r && returnType(b, l + 1);\n r = r && componentName(b, l + 1);\n r = r && functionFormalParameter_1_1_4(b, l + 1);\n r = r && formalParameterList(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "protected void validatePreamp(int[] param) {\n }" ]
[ "0.7287414", "0.7041593", "0.70370996", "0.6957481", "0.6687635", "0.66395694", "0.66324806", "0.66300815", "0.6625655", "0.65823215", "0.6436243", "0.6426677", "0.6334109", "0.6319348", "0.63057864", "0.62876606", "0.62323684", "0.62189126", "0.61993617", "0.61925846", "0.61709297", "0.6131593", "0.609159", "0.6082851", "0.6081129", "0.6076646", "0.60658205", "0.60567975", "0.60415596", "0.6035056", "0.6025669", "0.60249186", "0.60085756", "0.59854937", "0.598228", "0.5957747", "0.59482294", "0.59409434", "0.59395987", "0.593714", "0.5921416", "0.59178555", "0.5912591", "0.59104013", "0.5909132", "0.5901291", "0.5901291", "0.5901291", "0.5901291", "0.5901291", "0.5890332", "0.58778423", "0.5869003", "0.5858917", "0.5854781", "0.5835473", "0.58345866", "0.5829871", "0.5827941", "0.581103", "0.58082294", "0.5805696", "0.5785625", "0.57682264", "0.57401067", "0.5735295", "0.5722365", "0.57132745", "0.57132745", "0.57132745", "0.5709075", "0.57056725", "0.5704286", "0.5697757", "0.56867737", "0.56867737", "0.56841624", "0.56837744", "0.56792784", "0.56776786", "0.5675497", "0.5664131", "0.5657892", "0.5656165", "0.564154", "0.5639069", "0.5638674", "0.56367224", "0.56363714", "0.56163925", "0.55752957", "0.5574349", "0.5572161", "0.55706847", "0.55550945", "0.5548347", "0.55475646", "0.55438906", "0.5541951", "0.5539121" ]
0.6525825
10
/ ARRANGE Nothing to arrange here. / ACT & ASSERT
@Test public void extractRequestedElement_null_throwIllegalArgumentException() { assertThrows(IllegalArgumentException.class, () -> MessageUtils.extractRequestedElement(null)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void ensureBufferSpace(int expectedAdditions)\n {\n\t\tthrow new UnsupportedOperationException(lengthChangeError);\n }", "@Override\n void invokeOperation() {\n\n AcquiredAccount from, to;\n if (fromIndex < toIndex) {\n from = acquire(fromIndex, this);\n to = acquire(toIndex, this);\n } else {\n to = acquire(toIndex, this);\n from = acquire(fromIndex, this);\n }\n\n if (from != null && to != null) {\n if (amount > from.amount)\n errorMessage = \"Underflow\";\n else if (to.amount + amount > MAX_AMOUNT)\n errorMessage = \"Overflow\";\n else {\n from.newAmount = from.amount - amount;\n to.newAmount = to.amount + amount;\n }\n this.completed = true;\n }\n\n if (fromIndex < toIndex) {\n release(toIndex, this);\n release(fromIndex, this);\n } else {\n release(fromIndex, this);\n release(toIndex, this);\n }\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void inorder() {\n\n\t}", "@Test\r\n @Override\r\n @ConditionalIgnore(condition = IgnoreTreeDeferredIssue.class)\r\n public void testSortedAddDiscontinous() {\r\n super.testSortedAddDiscontinous();\r\n }", "@Test\n public void testRemoveEntity_Allocation() throws DataBaseNotReadyException {\n // we assume that the test database contains at least one record\n // and that this allocation has some members attached.\n Allocation a = allocationCollection.findEntity(1L);\n assertNotNull(\"Bad test data?\", a);\n Person p = a.getPerson();\n assertNotNull(\"Bad test data?\", p);\n\n allocationCollection.removeEntity(a);\n\n assertNull(allocationCollection.findEntity(1L));\n for (Allocation pa : p.getAllocationList()) {\n assertFalse(Objects.equals(a, pa));\n }\n }", "protected final void _verifyAlloc(Object buffer)\n/* */ {\n/* 269 */ if (buffer != null) throw new IllegalStateException(\"Trying to call same allocXxx() method second time\");\n/* */ }", "@SuppressWarnings(\"unchecked\")\r\n private Void receiveObjectsAnswerImageryRemoves()\r\n {\r\n List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1];\r\n List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2];\r\n\r\n assertEquals(1, removes.size());\r\n assertEquals(1, adds.size());\r\n assertTrue(adds.get(0) instanceof TileGeometry);\r\n\r\n return null;\r\n }", "default void assertAppendPermittedUnsafe(long address, LogData newEntry) throws DataOutrankedException, ValueAdoptedException {\n LogData oldEntry = read(address);\n if (oldEntry.getType()==DataType.EMPTY) {\n return;\n }\n if (newEntry.getRank().getRank()==0) {\n // data consistency in danger\n throw new OverwriteException();\n }\n int compare = newEntry.getRank().compareTo(oldEntry.getRank());\n if (compare<0) {\n throw new DataOutrankedException();\n }\n if (compare>0) {\n if (newEntry.getType()==DataType.RANK_ONLY && oldEntry.getType() != DataType.RANK_ONLY) {\n // the new data is a proposal, the other data is not, so the old value should be adopted\n ReadResponse resp = new ReadResponse();\n resp.put(address, oldEntry);\n throw new ValueAdoptedException(resp);\n } else {\n return;\n }\n }\n }", "@Test(expected = VendingMachineException.class)\r\n\tpublic void testAddItem_already_occupied() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"A\");\r\n\t\tVendingMachineItem test2 = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test2, \"A\");\r\n\r\n\t}", "private void assertImmutableList() {\n\t\tassertImmutableList(wc);\n\t}", "@Override public void action() {\n //Do Nothing\n assert(checkRep());\n }", "private void ensureCap(){\n T[] temp = (T[])new Object[arr.length * 2];\n for(int i = 0; i < numItems; i++){\n temp[i] = this.arr[i];\n }\n this.arr = temp;\n }", "@SuppressWarnings(\"unchecked\")\r\n private Void receiveObjectsAnswerImagery()\r\n {\r\n List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1];\r\n List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2];\r\n\r\n assertTrue(removes.isEmpty());\r\n assertEquals(1, adds.size());\r\n assertTrue(adds.get(0) instanceof TileGeometry);\r\n\r\n return null;\r\n }", "@Test(expected = IllegalStateException.class)\n public void testRemove_After_Add() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.add(2);\n\n instance.remove();\n\n }", "@Test\r\n\tpublic void testAddItem_not_occupied() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"A\");\r\n\t\tassertEquals(test, vendMachine.getItem(\"A\"));\r\n\t}", "@Test(expected = IllegalStateException.class)\n public void testRemove_After_Set() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.set(2);\n\n instance.remove();\n\n }", "public void testAdd() {\n\ttry {\n SynchronousQueue q = new SynchronousQueue();\n assertEquals(0, q.remainingCapacity());\n q.add(one);\n shouldThrow();\n } catch (IllegalStateException success){\n\t}\n }", "@Test\n public void testAfterOffer() {\n pool.beforeOffer(controller1, CommInfrastructure.UEB, TOPIC1, EVENT1);\n\n // this should clear them\n assertFalse(pool.afterOffer(controller1, CommInfrastructure.UEB, TOPIC2, EVENT2, true));\n\n assertFalse(pool.beforeInsert(drools1, OBJECT1));\n verify(mgr1, never()).beforeInsert(any(), any());\n\n\n assertFalse(pool.beforeInsert(droolsDisabled, OBJECT1));\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 }", "@Test(expected = IllegalStateException.class)\n public void testSet_After_Remove() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.remove();\n\n instance.set(2);\n\n }", "@Test\r\n\tpublic void testRemoveObject() {\r\n\t\tAssert.assertFalse(list.remove(null));\r\n\t\tAssert.assertTrue(list.remove(new Munitions(2, 3, \"iron\")));\r\n\t\tAssert.assertEquals(14, list.size());\r\n\t}", "public void _release() {\n throw new NO_IMPLEMENT(reason);\n }", "private void offer() {\n\t\t\t\n\t\t}", "@Test\n @SuppressWarnings({\"unchecked\"})\n public void moveUp() {\n exQ.moveUp(JobIdFactory.newId());\n Mockito.verify(queue, Mockito.times(0)).swap( Mockito.any(PrioritizableRunnable.class),Mockito.any(PrioritizableRunnable.class));\n //the first shouldent be moved\n exQ.moveUp(this.ids.get(0));\n Mockito.verify(queue, Mockito.times(0)).swap( Mockito.any(PrioritizableRunnable.class),Mockito.any(PrioritizableRunnable.class));\n //otherwise move it up\n exQ.moveUp(this.ids.get(1));\n Mockito.verify(queue, Mockito.times(1)).swap(this.runnables.get(1),this.runnables.get(0));\n }", "@Override\n\tpublic boolean reserve() {\n\t\treturn false;\n\t}", "@Test(expected = IllegalStateException.class)\n public void testRemove_After_Remove() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.remove();\n\n instance.remove();\n\n }", "protected abstract void checkRemoved();", "void vaildate() {\n final int n = snapshotRootIndex >= 0? snapshotRootIndex + 1: numNonNull; \r\n int i = 0;\r\n if (inodes[i] != null) {\r\n for(i++; i < n && inodes[i] != null; i++) {\r\n final INodeDirectory parent_i = inodes[i].getParent();\r\n final INodeDirectory parent_i_1 = inodes[i-1].getParent();\r\n if (parent_i != inodes[i-1] &&\r\n (parent_i_1 == null || !parent_i_1.isSnapshottable()\r\n || parent_i != parent_i_1)) {\r\n throw new AssertionError(\r\n \"inodes[\" + i + \"].getParent() != inodes[\" + (i-1)\r\n + \"]\\n inodes[\" + i + \"]=\" + inodes[i].toDetailString()\r\n + \"\\n inodes[\" + (i-1) + \"]=\" + inodes[i-1].toDetailString()\r\n + \"\\n this=\" + toString(false));\r\n }\r\n }\r\n }\r\n if (i != n) {\r\n throw new AssertionError(\"i = \" + i + \" != \" + n\r\n + \", this=\" + toString(false));\r\n }\r\n }", "@Test\r\n public void testAtualizar() {\r\n TipoItemRN rn = new TipoItemRN();\r\n TipoItem tipoitem = new TipoItem();\r\n \r\n tipoitem.setDescricao(\"TesteAtualizarTipoItem\");\r\n rn.salvar(tipoitem);\r\n \r\n tipoitem=null;\r\n \r\n tipoitem = rn.pesquisarDescricaEq(\"TesteAtualizarTipoItem\");\r\n \r\n if (tipoitem != null){\r\n tipoitem.setDescricao(\"TesteAtualizarTipoItemAlterado\");\r\n rn.salvar(tipoitem);\r\n tipoitem=null;\r\n }\r\n tipoitem = rn.pesquisarDescricaEq(\"TesteAtualizarTipoItemAlterado\");\r\n \r\n assertEquals(\"TesteAtualizarTipoItemAlterado\", tipoitem.getDescricao());\r\n \r\n rn.remover(tipoitem);\r\n }", "protected void clearRangeTest() {\n\tneedRangeTest = false;\n }", "@Test\n public void testItem_Ordering() {\n OasisList<Integer> baseList = new SegmentedOasisList<>(2, 2);\n\n List<Integer> expResult = Arrays.asList(1, 2, 6, 8);\n baseList.addAll(expResult);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), baseList.get(i));\n }\n }", "@Test\n public void testAdd_After_Remove() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n ;\n\n instance.remove();\n instance.add(9);\n int expResult = 1;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "public void clearListSelection() {\n/* 494 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n range_Builder0.copy();\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n range_Builder0.shift(265L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n range0.complementFrom(linkedList0);\n Range range1 = Range.of((-3234L));\n range0.isSubRangeOf(range1);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Consumer<Long> consumer0 = (Consumer<Long>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range1.forEach(consumer0);\n range_CoordinateSystem0.toString();\n range1.equals(\"Residue Based\");\n String string0 = range_CoordinateSystem0.toString();\n assertEquals(\"Residue Based\", string0);\n }", "@Override\n public boolean use(CanTakeItem o){\n return false; \n }", "private void validCheck ()\n\t{\n\t\tassert allButLast != null || cachedFlatListOrMore != null;\n\t}", "@Test\n void load() {\n Assert.assertEquals(r1,arrayStorage.load(r1.getUuid()));\n Assert.assertEquals(r2,arrayStorage.load(r2.getUuid()));\n\n }", "private void assertAll() {\n\t\t\n\t}", "@Test\n public void testNewEntity_3args() throws DataBaseNotReadyException {\n // Verify that our test database is set-up as expected.\n // Access test-person , test-event and test-job.\n // Verify that such items exist in the database\n // and that the test-person has yet no allocations.\n Person p = Manager.getPersonCollection().findEntity(2);\n assertNotNull(\"Bad test data?\", p);\n Event e = Manager.getEventCollection().findEntity(2);\n assertNotNull(\"Bad test data?\", e);\n Job j = Manager.getJobCollection().findEntity(2);\n assertNotNull(\"Bad test data?\", j);\n List<Allocation> allocationListBefore = p.getAllocationList();\n assertNotNull(allocationListBefore);\n assertTrue(\"Bad test data?\", allocationListBefore.isEmpty());\n\n // Here is the statement that we want to test:\n Allocation testItem = allocationCollection.newEntity(p, e, j, \"USER\");\n\n // Verify that the result is as expected.\n assertNotNull(testItem);\n assertNotNull(testItem.getAllocationId());\n assertTrue(testItem.getAllocationId() > 0);\n\n assertEquals(p, testItem.getPerson());\n assertEquals(e, testItem.getEvent());\n assertEquals(j, testItem.getJob());\n\n List<Allocation> allocationListAfter = p.getAllocationList();\n assertTrue(allocationListAfter.contains(testItem));\n }", "public final void mo51373a() {\n }", "public void setRangeInfo(RangeInfo rangeInfo) {\n/* 1147 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void ar() {\n Object object = this.li;\n synchronized (object) {\n if (this.ly) {\n this.av();\n this.aq();\n try {\n this.a(this.ax());\n }\n catch (JSONException var2_2) {\n dw.b(\"JSON Failure while processing active view data.\", var2_2);\n }\n this.ly = false;\n this.as();\n dw.x(\"Untracked ad unit: \" + this.lo.ao());\n }\n return;\n }\n }", "public void test_4() throws Exception {\n\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\ttry {\n\t\t\ttheBSQ.add(null); // null is not an accepted value\n\t\t\tfail(\"should throw an IllegalArgumentException\");\n\t\t}\n\t\tcatch(IllegalArgumentException ex) {\n\t\t\t// OK\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\r\n private Void receiveObjectsAnswerFootprint()\r\n {\r\n List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1];\r\n List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2];\r\n\r\n assertTrue(removes.isEmpty());\r\n assertEquals(1, adds.size());\r\n assertTrue(adds.get(0) instanceof PolygonGeometry);\r\n\r\n return null;\r\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Range.CoordinateSystem.values();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range.Builder range_Builder0 = new Range.Builder(range_CoordinateSystem0, 0L, 0L);\n Range range0 = Range.ofLength(0L);\n range0.getBegin(range_CoordinateSystem0);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.spliterator();\n range0.complementFrom(linkedList0);\n range_Builder0.contractBegin(0L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n // Undeclared exception!\n try { \n Range.parseRange(\"\", range_CoordinateSystem1);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "public void testAddAll2() {\n try {\n SynchronousQueue q = new SynchronousQueue();\n Integer[] ints = new Integer[1];\n q.addAll(Arrays.asList(ints));\n shouldThrow();\n }\n catch (NullPointerException success) {}\n }", "@org.junit.jupiter.api.Test\r\n void toArray() {\n mll.add(\"A\");\r\n Object [] backDoor = mll.toArray();\r\n backDoor[0] = \"HAHHA\";\r\n\r\n assertEquals(\"A\", mll.get(0));\r\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Test(timeout = 4000)\n public void test015() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 2147483647L, 2147483647L);\n Object object0 = new Object();\n range0.getBegin();\n // Undeclared exception!\n try { \n range0.startsBefore((Range) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Null Range used in range comparison operation.\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "public DirtyRegionQueue() {\r\n\t\tsuper();\r\n\t}", "@Test(expected = IllegalStateException.class)\n public void testSet_After_Add() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.add(3);\n\n instance.set(2);\n\n }", "public void extendSelection(int index) {\n/* 107 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@SuppressWarnings(\"unchecked\")\r\n private Void receiveObjectsAnswerVehicle()\r\n {\r\n List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1];\r\n List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2];\r\n\r\n assertTrue(removes.isEmpty());\r\n // 119\n assertEquals(138, adds.size());\r\n boolean containsMeshes = false;\r\n boolean containsLines = false;\r\n\r\n for (Geometry geom : adds)\r\n {\r\n if (geom instanceof PolygonMeshGeometry)\r\n {\r\n containsMeshes = true;\r\n }\r\n else if (geom instanceof PolylineGeometry)\r\n {\r\n containsLines = true;\r\n }\r\n }\r\n\r\n assertTrue(containsMeshes);\r\n assertTrue(containsLines);\r\n\r\n return null;\r\n }", "public void testRemoveAddresses() throws Exception {\r\n try {\r\n this.dao.removeAddresses(new long[]{-1}, false);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "@Test\n\tpublic void testGetQuantityAwaitingAllocation() {\n\t\tfinal List<OrderSku> listSkus = new ArrayList<OrderSku>();\n\t\tfinal OrderSku orderSku1 = new OrderSkuImpl();\n\t\torderSku1.setPrice(1, null);\n\t\torderSku1.setAllocatedQuantity(1);\n\t\tfinal OrderSku orderSku2 = new OrderSkuImpl();\n\t\torderSku2.setPrice(1, null);\n\t\torderSku2.setAllocatedQuantity(0);\n\t\tlistSkus.add(orderSku1);\n\t\tlistSkus.add(orderSku2);\n\n\t\tfinal InventoryDtoImpl inventoryDto = new InventoryDtoImpl();\n\t\tinventoryDto.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tinventoryDto.setWarehouseUid(WAREHOUSE_UID);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tinventoryDto.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal PersistenceSession persistanceSession = context.mock(PersistenceSession.class);\n\t\tfinal Query query = context.mock(Query.class);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(persistenceEngine).getPersistenceSession(); will(returnValue(persistanceSession));\n\t\t\t\tallowing(persistanceSession).createNamedQuery(ORDER_SKU_SELECT_BY_CODE_AND_STATUS); will(returnValue(query));\n\t\t\t\tallowing(persistenceEngine).retrieveByNamedQuery(with(equal(ORDER_SKU_SELECT_BY_CODE_AND_STATUS)), with(any(Object[].class)));\n\t\t\t\twill(returnValue(Arrays.asList(orderSku1, orderSku2)));\n\t\t\t\tignoring(query).setParameter(with(any(int.class)), with(any(Object.class)));\n\t\t\t\tallowing(query).list(); will(returnValue(listSkus));\n\t\t\t}\n\t\t});\n\n\t\tassertEquals(\n\t\t\t\torderSku2.getQuantity() - orderSku2.getAllocatedQuantity(),\n\t\t\t\tallocationService.getQuantityAwaitingAllocation(productSku\n\t\t\t\t\t\t.getSkuCode(), WAREHOUSE_UID));\n\n\t}", "@Override\n public void ensureCapacity(int index) {\n\n }", "void unableToListContents();", "public void verifyBugerList()\n\t{\n\t\t\n\t}", "public void verifyNoMatching(AcBatchFlight e)\n {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "abstract public E addEmpty();", "@Test(timeout = 4000)\n public void test17() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n range_Builder0.copy();\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n long long0 = 265L;\n range_Builder0.shift(265L);\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range0.forEach(consumer0);\n Range range1 = Range.of(0L);\n List<Range> list0 = range0.complement(range1);\n List<Range> list1 = range0.complementFrom(list0);\n List<Range> list2 = range0.complementFrom(list1);\n List<Range> list3 = range0.complementFrom(list2);\n range0.complementFrom(list3);\n Range.of((-1147L), 0L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range2 = Range.of(range_CoordinateSystem0, 0L, 0L);\n Range range3 = range2.intersection(range0);\n range0.getEnd();\n range3.intersects(range0);\n // Undeclared exception!\n try { \n Range.parseRange(\"q)fxUX9s]Tp\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse q)fxUX9s]Tp into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "void checkReconstructible() throws InvalidObjectException {\n // subclasses can override\n }", "void fulfill( AvailabilityRequirement requirement );", "public void testAddAll4() {\n try {\n SynchronousQueue q = new SynchronousQueue();\n Integer[] ints = new Integer[1];\n for (int i = 0; i < 1; ++i)\n ints[i] = new Integer(i);\n q.addAll(Arrays.asList(ints));\n shouldThrow();\n }\n catch (IllegalStateException success) {}\n }", "@Test\n @Tag(NON_PR)\n void testAddressOrdering() throws Exception {\n Address ab = new AddressBuilder()\n .withNewMetadata()\n .withNamespace(getSharedAddressSpace().getMetadata().getNamespace())\n .withName(AddressUtils.generateAddressMetadataName(getSharedAddressSpace(), \"ab\"))\n .endMetadata()\n .withNewSpec()\n .withType(\"queue\")\n .withAddress(\"AB\")\n .withPlan(getDefaultPlan(AddressType.QUEUE))\n .endSpec()\n .build();\n\n resourcesManager.setAddresses(ab);\n\n Address aa = new AddressBuilder()\n .withNewMetadata()\n .withNamespace(getSharedAddressSpace().getMetadata().getNamespace())\n .withName(AddressUtils.generateAddressMetadataName(getSharedAddressSpace(), \"aa\"))\n .endMetadata()\n .withNewSpec()\n .withType(\"queue\")\n .withAddress(\"aa\")\n .withPlan(getDefaultPlan(AddressType.QUEUE))\n .endSpec()\n .build();\n\n // For this bug, 'ab' will end up in the bad state\n resourcesManager.setAddresses(TimeoutBudget.ofDuration(Duration.ofMinutes(2)), aa, ab);\n }", "public void remove()\n/* */ {\n/* 99 */ throw new UnsupportedOperationException();\n/* */ }", "@Test(timeout = 4000)\n public void test33() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n XAConnectionFactory xAConnectionFactory0 = new XAConnectionFactory();\n try { \n connectionFactories0.addXAConnectionFactory((-1543), xAConnectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: -1543, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "public void swrap() throws NoUnusedObjectExeption;", "private void assertReflexive(UMLMessageArgument msgArg) throws Exception\r\n\t{\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertTrue(msgArg.equals(msgArg));\r\n\t}", "@Test(timeout = 4000)\n public void test33() throws Throwable {\n Range range0 = Range.of((-1259L), (-1259L));\n range0.spliterator();\n Range.Builder range_Builder0 = new Range.Builder(range0);\n Object object0 = new Object();\n Long long0 = new Long((-1259L));\n range0.equals(long0);\n range0.toString();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.equals((Object) null);\n String string0 = null;\n // Undeclared exception!\n try { \n Range.CoordinateSystem.valueOf(\"unable to delete \");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.CoordinateSystem.unable to delete \n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "@Test\n public void testFindEntity_Person_TimeSlot() throws Exception {\n // check whether the database is set-up as expected.\n Person p = Manager.getPersonCollection().findEntity(1);\n assertNotNull(\"Bad test data?\", p);\n List<Allocation> pa = p.getAllocationList();\n assertFalse(\"Bad test data?\", pa.isEmpty());\n Allocation a = pa.get(0);\n Event e = a.getEvent();\n assertNotNull(\"Bad test data?\", e);\n TimeSlot t = e.getTimeSlot();\n assertNotNull(\"Bad test data?\", t);\n\n // Here is the statement that we want to test:\n Allocation result = Manager.getAllocationCollection().findEntity(p, t);\n assertNotNull(result);\n assertTrue(Objects.equals(result, a));\n\n }", "protected void beforeTimeSlices()\n\t\tthrows DbCompException\n\t{\n dates = new ArrayList<Date>();\n\t}", "@Test\n public void reentrantCallAfterPut() {\n byte[] data = ABIUtil.encodeMethodArguments(\"resetStorage\");\n byte[] txDataMethodArguments = ABIUtil.encodeMethodArguments(\"reentrantCallAfterPut\", dappAddr, data);\n AvmRule.ResultWrapper resultWrapper = avmRule.call(from, dappAddr, BigInteger.ZERO, txDataMethodArguments, energyLimit, energyPrice);\n Assert.assertTrue(resultWrapper.getReceiptStatus().isSuccess());\n long costWithoutResettingStorage = 164702;\n long executionCost = costWithoutResettingStorage + 29 * 5 +\n 5 * RuntimeMethodFeeSchedule.BlockchainRuntime_avm_resetStorage;\n Assert.assertEquals(executionCost - 5 * RuntimeMethodFeeSchedule.BlockchainRuntime_avm_deleteStorage_refund, energyLimit - resultWrapper.getTransactionResult().getEnergyRemaining());\n\n byte[] key = new byte[32];\n key[0] = 0x1;\n txDataMethodArguments = ABIUtil.encodeMethodArguments(\"getStorage\", key);\n resultWrapper = avmRule.call(from, dappAddr, BigInteger.ZERO, txDataMethodArguments, energyLimit, energyPrice);\n Assert.assertTrue(resultWrapper.getReceiptStatus().isSuccess());\n Assert.assertArrayEquals(null, (byte[]) resultWrapper.getDecodedReturnData());\n }", "@Test\n\tpublic void testSetSliceWithoutUpdate() {\n\t}", "public abstract void markUsable();", "@Test\n public void t3shouldReturnNull() {\n Invoice actual;\n when(mock.getInvoices()).thenReturn(newInvoices());\n try {\n actual = new InvoiceBook(mock, emailServiceMock)\n .getInvoiceById(mock.getInvoices().get(50).getId());\n } catch (IndexOutOfBoundsException e) {\n actual = null;\n }\n //then\n assertNull(actual);\n\n }", "@Test(timeout = 4000)\n public void test69() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n XAQueueConnectionFactory xAQueueConnectionFactory0 = new XAQueueConnectionFactory();\n try { \n connectionFactories0.setXAQueueConnectionFactory(0, xAQueueConnectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: 0, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "int insertSelective(AlertQueue record);", "@Test\n\tpublic void test1() {\n\t\t// toArray()\n\t\tDoubleLinkedList dll = new DoubleLinkedList(getList(10));\n\t\tObject[] a = new Object[] {21, 22, 23, 24, 25};\n\t\tassertArrayEquals(dll.toArray(a), getList(10).toArray());\n\t\t\n\t\tdll = new DoubleLinkedList(getList(4));\n\t\tassertEquals(dll.toArray(a)[4], null);\n\t\t\n\t\t// addBefore()\n\t\tdll.addBefore(101, dll.header);\n\t\t\n\t\t// remove()\n\t\ttry{\n\t\t\tdll.remove(dll.header);\n\t\t}catch(NoSuchElementException e){\n\t\t\tassertEquals(e.getMessage(), null);\n\t\t}\n\t\t\n\t\tdll.remove(dll.header.next);\n\t\t\n\t\t\n\t}", "public void testRemoveObj() {\r\n list.add(\"A\");\r\n list.add(\"B\");\r\n assertTrue(list.remove(\"A\"));\r\n assertEquals( \"B\", list.get(0));\r\n assertEquals( 1, list.size());\r\n list.add(\"C\");\r\n assertTrue(list.remove(\"C\"));\r\n assertEquals(\"B\", list.get(0));\r\n }", "@Override\n void undo() {\n assert false;\n }", "public void testRemoveFromEmpty() {\r\n list.add(\"dance\");\r\n list.add(0, \"safety\");\r\n list.clear();\r\n assertFalse(list.remove(\"safety\"));\r\n Exception exception;\r\n exception = null;\r\n try {\r\n list.remove(0);\r\n } \r\n catch (IndexOutOfBoundsException e) {\r\n exception = e;\r\n }\r\n assertTrue( exception instanceof IndexOutOfBoundsException);\r\n\r\n DLList<String> emptyList = new DLList<String>();\r\n exception = null;\r\n try {\r\n emptyList.remove(0);\r\n } \r\n catch (IndexOutOfBoundsException e) {\r\n exception = e;\r\n }\r\n assertTrue( exception instanceof IndexOutOfBoundsException);\r\n }", "public void testRemove() {\n TaskSeriesCollection c = new TaskSeriesCollection();\n TaskSeries s1 = new TaskSeries(\"S1\");\n c.add(s1);\n c.remove(0);\n c.add(s1);\n boolean pass = false;\n try {\n c.remove(-1);\n } catch (IllegalArgumentException e) {\n pass = true;\n }\n pass = false;\n try {\n c.remove(1);\n } catch (IllegalArgumentException e) {\n pass = true;\n }\n }", "private void testAclConstraints005() {\n\t\tDmtSession session = null;\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints005\");\n\t\t\tsession = tbc.getDmtAdmin().getSession(\".\",\n\t\t\t\t\tDmtSession.LOCK_TYPE_EXCLUSIVE);\n\n\t\t\tsession.setNodeAcl(TestExecPluginActivator.INTERIOR_NODE,\n\t\t\t\t\tnew org.osgi.service.dmt.Acl(\"Replace=*\"));\n\n\t\t\tsession.deleteNode(TestExecPluginActivator.INTERIOR_NODE);\n\n\t\t\tTestCase.assertNull(\"This test asserts that the Dmt Admin service synchronizes the ACLs with any change \"\n\t\t\t\t\t\t\t+ \"in the DMT that is made through its service interface\",\n\t\t\t\t\t\t\tsession.getNodeAcl(TestExecPluginActivator.INTERIOR_NODE));\n\t\t} catch (Exception e) {\n\t\t\ttbc.failUnexpectedException(e);\n\t\t} finally {\n\t\t\ttbc.closeSession(session);\n\t\t}\n\t}", "public void testIteratorRemove() {\n SynchronousQueue q = new SynchronousQueue();\n\tIterator it = q.iterator();\n try {\n it.remove();\n shouldThrow();\n }\n catch (IllegalStateException success) {}\n }", "@Test(timeout = 4000)\n public void test58() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n connectionFactories0.getXAQueueConnectionFactory();\n XAConnectionFactory xAConnectionFactory0 = new XAConnectionFactory();\n try { \n connectionFactories0.setXAConnectionFactory(0, xAConnectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: 0, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "public void testRemoveAddress() throws Exception {\r\n try {\r\n this.dao.removeAddress(-1, false);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "public void testRemoveOrder() {\n }", "private void ensureCapacity() {\n\t\n\t\tif (elements.length == size) {\n\t\t\tT[] oldElements = elements;\n\t\t\t\n\t\t\telements = (T[]) new Object[2 * elements.length + 1];\n\t\t\t\n\t\t\tSystem.arraycopy(oldElements, 0, elements, 0, size);\n\t\t\n\t\t}\n\t\n\t}", "protected void setUsedRange(int _start, int _end) throws Exception {\n if (_start < 0 || _end >= size || _start > _end) {\n throw new Exception(\"Invalid range! Start must be 0 or larger, end must be \" + \"inside allowed memory range.\");\n }\n\n start = _start;\n end = _end;\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Range range0 = Range.of((-1259L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n range1.getEnd();\n range1.getEnd();\n Range range2 = range0.intersection(range1);\n List<Range> list0 = range2.split(255L);\n range2.complementFrom(list0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range3 = Range.of(range_CoordinateSystem1, (-1259L), 0L);\n range3.endsBefore(range0);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range3);\n List<Range> list1 = range2.complementFrom(list0);\n Range range4 = Range.of(1207L);\n assertFalse(range4.isEmpty());\n \n boolean boolean0 = range2.isSubRangeOf(range3);\n assertTrue(boolean0);\n \n Range.CoordinateSystem range_CoordinateSystem2 = Range.CoordinateSystem.RESIDUE_BASED;\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range2.forEach(consumer0);\n Range.CoordinateSystem range_CoordinateSystem3 = Range.CoordinateSystem.ZERO_BASED;\n range_CoordinateSystem3.toString();\n range0.equals(list1);\n assertSame(range2, range1);\n assertEquals(0, list1.size());\n \n range_CoordinateSystem1.toString();\n long long0 = range0.getEnd();\n assertEquals(255L, long0);\n }", "@Test(timeout = 4000)\n public void test25() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n range_Builder0.copy();\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n range_Builder0.shift(265L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n range0.complementFrom(linkedList0);\n Range range1 = Range.of((-3234L));\n range0.isSubRangeOf(range1);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.complementFrom(linkedList0);\n range1.intersects(range0);\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"TGa_,[\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.TGa_,[\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "@Test\n public void invalidDeletionTimesHandlingTest()\n {\n DeletionTime dt = DeletionTime.build(1, -1);\n assertFalse(dt.validate());\n\n // use the invalid deletion time for a range tombstone and aggregate it\n RangeTombstoneList rtl = new RangeTombstoneList(null, 1);\n rtl.add(new RangeTombstone(Slice.ALL, dt));\n\n // undo the aggregation and see if the deletion time is still invalid\n dt = rtl.iterator().next().deletionTime();\n assertNotNull(dt);\n assertFalse(dt.validate());\n }", "public void offerBack(E elem);", "public void doRemove() throws VisADException, RemoteException {\n rangeRings = null;\n super.doRemove();\n }", "private void chk() {\n if (clist != null)\n throw new UnsupportedOperationException();\n }", "public void remove(){throw new RuntimeException(\"Removing() is not implemented\");\r\n\t\t}", "@Test\n public void testAddToWaitList() throws Exception {\n }", "private void t3() {\n // write to a super region, read from a subregion: only keep write\n writeProtected();\n readDefault();\n }" ]
[ "0.5310607", "0.5306089", "0.52628917", "0.52598757", "0.5228672", "0.5226012", "0.5221519", "0.5190882", "0.5182993", "0.51598305", "0.5115175", "0.5107411", "0.5097164", "0.50773436", "0.5071172", "0.5068732", "0.50578123", "0.50355816", "0.5025367", "0.50249267", "0.5016242", "0.50009114", "0.49870142", "0.49829584", "0.49754083", "0.4969409", "0.49545372", "0.4952135", "0.49514154", "0.49442357", "0.4933485", "0.49130234", "0.49125364", "0.49042818", "0.4903094", "0.48975417", "0.489662", "0.48944393", "0.4892866", "0.48915064", "0.48896694", "0.48894855", "0.48866192", "0.48849216", "0.4884915", "0.48829478", "0.48825818", "0.48727956", "0.4869711", "0.4867223", "0.4866242", "0.4864696", "0.4864304", "0.486367", "0.48615915", "0.4860274", "0.48571265", "0.48544556", "0.48515913", "0.48486602", "0.4848456", "0.48434296", "0.4842307", "0.48386255", "0.4836394", "0.48349226", "0.48271862", "0.48224774", "0.48192757", "0.48192447", "0.48189127", "0.48121184", "0.48105896", "0.48084688", "0.48029447", "0.47944754", "0.47941643", "0.47935572", "0.47929984", "0.478945", "0.47875094", "0.47803333", "0.477209", "0.4771904", "0.47696164", "0.47693294", "0.4767207", "0.47655404", "0.4756792", "0.4755276", "0.47542903", "0.4754197", "0.4753059", "0.47506106", "0.47497597", "0.47490567", "0.47449726", "0.47446978", "0.4744171", "0.4744137", "0.47437373" ]
0.0
-1
/ ARRANGE Nothing to arrange here. / ACT & ASSERT
@Test public void extractRequestedArtifact_null_throwIllegalArgumentException() { assertThrows(IllegalArgumentException.class, () -> MessageUtils.extractRequestedElement(null)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void ensureBufferSpace(int expectedAdditions)\n {\n\t\tthrow new UnsupportedOperationException(lengthChangeError);\n }", "@Override\n void invokeOperation() {\n\n AcquiredAccount from, to;\n if (fromIndex < toIndex) {\n from = acquire(fromIndex, this);\n to = acquire(toIndex, this);\n } else {\n to = acquire(toIndex, this);\n from = acquire(fromIndex, this);\n }\n\n if (from != null && to != null) {\n if (amount > from.amount)\n errorMessage = \"Underflow\";\n else if (to.amount + amount > MAX_AMOUNT)\n errorMessage = \"Overflow\";\n else {\n from.newAmount = from.amount - amount;\n to.newAmount = to.amount + amount;\n }\n this.completed = true;\n }\n\n if (fromIndex < toIndex) {\n release(toIndex, this);\n release(fromIndex, this);\n } else {\n release(fromIndex, this);\n release(toIndex, this);\n }\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void inorder() {\n\n\t}", "@Test\r\n @Override\r\n @ConditionalIgnore(condition = IgnoreTreeDeferredIssue.class)\r\n public void testSortedAddDiscontinous() {\r\n super.testSortedAddDiscontinous();\r\n }", "@Test\n public void testRemoveEntity_Allocation() throws DataBaseNotReadyException {\n // we assume that the test database contains at least one record\n // and that this allocation has some members attached.\n Allocation a = allocationCollection.findEntity(1L);\n assertNotNull(\"Bad test data?\", a);\n Person p = a.getPerson();\n assertNotNull(\"Bad test data?\", p);\n\n allocationCollection.removeEntity(a);\n\n assertNull(allocationCollection.findEntity(1L));\n for (Allocation pa : p.getAllocationList()) {\n assertFalse(Objects.equals(a, pa));\n }\n }", "protected final void _verifyAlloc(Object buffer)\n/* */ {\n/* 269 */ if (buffer != null) throw new IllegalStateException(\"Trying to call same allocXxx() method second time\");\n/* */ }", "@SuppressWarnings(\"unchecked\")\r\n private Void receiveObjectsAnswerImageryRemoves()\r\n {\r\n List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1];\r\n List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2];\r\n\r\n assertEquals(1, removes.size());\r\n assertEquals(1, adds.size());\r\n assertTrue(adds.get(0) instanceof TileGeometry);\r\n\r\n return null;\r\n }", "default void assertAppendPermittedUnsafe(long address, LogData newEntry) throws DataOutrankedException, ValueAdoptedException {\n LogData oldEntry = read(address);\n if (oldEntry.getType()==DataType.EMPTY) {\n return;\n }\n if (newEntry.getRank().getRank()==0) {\n // data consistency in danger\n throw new OverwriteException();\n }\n int compare = newEntry.getRank().compareTo(oldEntry.getRank());\n if (compare<0) {\n throw new DataOutrankedException();\n }\n if (compare>0) {\n if (newEntry.getType()==DataType.RANK_ONLY && oldEntry.getType() != DataType.RANK_ONLY) {\n // the new data is a proposal, the other data is not, so the old value should be adopted\n ReadResponse resp = new ReadResponse();\n resp.put(address, oldEntry);\n throw new ValueAdoptedException(resp);\n } else {\n return;\n }\n }\n }", "@Test(expected = VendingMachineException.class)\r\n\tpublic void testAddItem_already_occupied() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"A\");\r\n\t\tVendingMachineItem test2 = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test2, \"A\");\r\n\r\n\t}", "private void assertImmutableList() {\n\t\tassertImmutableList(wc);\n\t}", "@Override public void action() {\n //Do Nothing\n assert(checkRep());\n }", "private void ensureCap(){\n T[] temp = (T[])new Object[arr.length * 2];\n for(int i = 0; i < numItems; i++){\n temp[i] = this.arr[i];\n }\n this.arr = temp;\n }", "@SuppressWarnings(\"unchecked\")\r\n private Void receiveObjectsAnswerImagery()\r\n {\r\n List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1];\r\n List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2];\r\n\r\n assertTrue(removes.isEmpty());\r\n assertEquals(1, adds.size());\r\n assertTrue(adds.get(0) instanceof TileGeometry);\r\n\r\n return null;\r\n }", "@Test(expected = IllegalStateException.class)\n public void testRemove_After_Add() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.add(2);\n\n instance.remove();\n\n }", "@Test\r\n\tpublic void testAddItem_not_occupied() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"A\");\r\n\t\tassertEquals(test, vendMachine.getItem(\"A\"));\r\n\t}", "@Test(expected = IllegalStateException.class)\n public void testRemove_After_Set() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.set(2);\n\n instance.remove();\n\n }", "public void testAdd() {\n\ttry {\n SynchronousQueue q = new SynchronousQueue();\n assertEquals(0, q.remainingCapacity());\n q.add(one);\n shouldThrow();\n } catch (IllegalStateException success){\n\t}\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 }", "@Test\n public void testAfterOffer() {\n pool.beforeOffer(controller1, CommInfrastructure.UEB, TOPIC1, EVENT1);\n\n // this should clear them\n assertFalse(pool.afterOffer(controller1, CommInfrastructure.UEB, TOPIC2, EVENT2, true));\n\n assertFalse(pool.beforeInsert(drools1, OBJECT1));\n verify(mgr1, never()).beforeInsert(any(), any());\n\n\n assertFalse(pool.beforeInsert(droolsDisabled, OBJECT1));\n }", "@Test(expected = IllegalStateException.class)\n public void testSet_After_Remove() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.remove();\n\n instance.set(2);\n\n }", "@Test\r\n\tpublic void testRemoveObject() {\r\n\t\tAssert.assertFalse(list.remove(null));\r\n\t\tAssert.assertTrue(list.remove(new Munitions(2, 3, \"iron\")));\r\n\t\tAssert.assertEquals(14, list.size());\r\n\t}", "public void _release() {\n throw new NO_IMPLEMENT(reason);\n }", "private void offer() {\n\t\t\t\n\t\t}", "@Test\n @SuppressWarnings({\"unchecked\"})\n public void moveUp() {\n exQ.moveUp(JobIdFactory.newId());\n Mockito.verify(queue, Mockito.times(0)).swap( Mockito.any(PrioritizableRunnable.class),Mockito.any(PrioritizableRunnable.class));\n //the first shouldent be moved\n exQ.moveUp(this.ids.get(0));\n Mockito.verify(queue, Mockito.times(0)).swap( Mockito.any(PrioritizableRunnable.class),Mockito.any(PrioritizableRunnable.class));\n //otherwise move it up\n exQ.moveUp(this.ids.get(1));\n Mockito.verify(queue, Mockito.times(1)).swap(this.runnables.get(1),this.runnables.get(0));\n }", "@Override\n\tpublic boolean reserve() {\n\t\treturn false;\n\t}", "@Test(expected = IllegalStateException.class)\n public void testRemove_After_Remove() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.remove();\n\n instance.remove();\n\n }", "void vaildate() {\n final int n = snapshotRootIndex >= 0? snapshotRootIndex + 1: numNonNull; \r\n int i = 0;\r\n if (inodes[i] != null) {\r\n for(i++; i < n && inodes[i] != null; i++) {\r\n final INodeDirectory parent_i = inodes[i].getParent();\r\n final INodeDirectory parent_i_1 = inodes[i-1].getParent();\r\n if (parent_i != inodes[i-1] &&\r\n (parent_i_1 == null || !parent_i_1.isSnapshottable()\r\n || parent_i != parent_i_1)) {\r\n throw new AssertionError(\r\n \"inodes[\" + i + \"].getParent() != inodes[\" + (i-1)\r\n + \"]\\n inodes[\" + i + \"]=\" + inodes[i].toDetailString()\r\n + \"\\n inodes[\" + (i-1) + \"]=\" + inodes[i-1].toDetailString()\r\n + \"\\n this=\" + toString(false));\r\n }\r\n }\r\n }\r\n if (i != n) {\r\n throw new AssertionError(\"i = \" + i + \" != \" + n\r\n + \", this=\" + toString(false));\r\n }\r\n }", "protected abstract void checkRemoved();", "@Test\r\n public void testAtualizar() {\r\n TipoItemRN rn = new TipoItemRN();\r\n TipoItem tipoitem = new TipoItem();\r\n \r\n tipoitem.setDescricao(\"TesteAtualizarTipoItem\");\r\n rn.salvar(tipoitem);\r\n \r\n tipoitem=null;\r\n \r\n tipoitem = rn.pesquisarDescricaEq(\"TesteAtualizarTipoItem\");\r\n \r\n if (tipoitem != null){\r\n tipoitem.setDescricao(\"TesteAtualizarTipoItemAlterado\");\r\n rn.salvar(tipoitem);\r\n tipoitem=null;\r\n }\r\n tipoitem = rn.pesquisarDescricaEq(\"TesteAtualizarTipoItemAlterado\");\r\n \r\n assertEquals(\"TesteAtualizarTipoItemAlterado\", tipoitem.getDescricao());\r\n \r\n rn.remover(tipoitem);\r\n }", "protected void clearRangeTest() {\n\tneedRangeTest = false;\n }", "@Test\n public void testItem_Ordering() {\n OasisList<Integer> baseList = new SegmentedOasisList<>(2, 2);\n\n List<Integer> expResult = Arrays.asList(1, 2, 6, 8);\n baseList.addAll(expResult);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), baseList.get(i));\n }\n }", "@Test\n public void testAdd_After_Remove() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n ;\n\n instance.remove();\n instance.add(9);\n int expResult = 1;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n range_Builder0.copy();\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n range_Builder0.shift(265L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n range0.complementFrom(linkedList0);\n Range range1 = Range.of((-3234L));\n range0.isSubRangeOf(range1);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Consumer<Long> consumer0 = (Consumer<Long>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range1.forEach(consumer0);\n range_CoordinateSystem0.toString();\n range1.equals(\"Residue Based\");\n String string0 = range_CoordinateSystem0.toString();\n assertEquals(\"Residue Based\", string0);\n }", "public void clearListSelection() {\n/* 494 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n public boolean use(CanTakeItem o){\n return false; \n }", "private void validCheck ()\n\t{\n\t\tassert allButLast != null || cachedFlatListOrMore != null;\n\t}", "@Test\n void load() {\n Assert.assertEquals(r1,arrayStorage.load(r1.getUuid()));\n Assert.assertEquals(r2,arrayStorage.load(r2.getUuid()));\n\n }", "private void assertAll() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Test\n public void testNewEntity_3args() throws DataBaseNotReadyException {\n // Verify that our test database is set-up as expected.\n // Access test-person , test-event and test-job.\n // Verify that such items exist in the database\n // and that the test-person has yet no allocations.\n Person p = Manager.getPersonCollection().findEntity(2);\n assertNotNull(\"Bad test data?\", p);\n Event e = Manager.getEventCollection().findEntity(2);\n assertNotNull(\"Bad test data?\", e);\n Job j = Manager.getJobCollection().findEntity(2);\n assertNotNull(\"Bad test data?\", j);\n List<Allocation> allocationListBefore = p.getAllocationList();\n assertNotNull(allocationListBefore);\n assertTrue(\"Bad test data?\", allocationListBefore.isEmpty());\n\n // Here is the statement that we want to test:\n Allocation testItem = allocationCollection.newEntity(p, e, j, \"USER\");\n\n // Verify that the result is as expected.\n assertNotNull(testItem);\n assertNotNull(testItem.getAllocationId());\n assertTrue(testItem.getAllocationId() > 0);\n\n assertEquals(p, testItem.getPerson());\n assertEquals(e, testItem.getEvent());\n assertEquals(j, testItem.getJob());\n\n List<Allocation> allocationListAfter = p.getAllocationList();\n assertTrue(allocationListAfter.contains(testItem));\n }", "public void setRangeInfo(RangeInfo rangeInfo) {\n/* 1147 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void ar() {\n Object object = this.li;\n synchronized (object) {\n if (this.ly) {\n this.av();\n this.aq();\n try {\n this.a(this.ax());\n }\n catch (JSONException var2_2) {\n dw.b(\"JSON Failure while processing active view data.\", var2_2);\n }\n this.ly = false;\n this.as();\n dw.x(\"Untracked ad unit: \" + this.lo.ao());\n }\n return;\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n private Void receiveObjectsAnswerFootprint()\r\n {\r\n List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1];\r\n List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2];\r\n\r\n assertTrue(removes.isEmpty());\r\n assertEquals(1, adds.size());\r\n assertTrue(adds.get(0) instanceof PolygonGeometry);\r\n\r\n return null;\r\n }", "public void test_4() throws Exception {\n\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\ttry {\n\t\t\ttheBSQ.add(null); // null is not an accepted value\n\t\t\tfail(\"should throw an IllegalArgumentException\");\n\t\t}\n\t\tcatch(IllegalArgumentException ex) {\n\t\t\t// OK\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Range.CoordinateSystem.values();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range.Builder range_Builder0 = new Range.Builder(range_CoordinateSystem0, 0L, 0L);\n Range range0 = Range.ofLength(0L);\n range0.getBegin(range_CoordinateSystem0);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.spliterator();\n range0.complementFrom(linkedList0);\n range_Builder0.contractBegin(0L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n // Undeclared exception!\n try { \n Range.parseRange(\"\", range_CoordinateSystem1);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "public void testAddAll2() {\n try {\n SynchronousQueue q = new SynchronousQueue();\n Integer[] ints = new Integer[1];\n q.addAll(Arrays.asList(ints));\n shouldThrow();\n }\n catch (NullPointerException success) {}\n }", "@org.junit.jupiter.api.Test\r\n void toArray() {\n mll.add(\"A\");\r\n Object [] backDoor = mll.toArray();\r\n backDoor[0] = \"HAHHA\";\r\n\r\n assertEquals(\"A\", mll.get(0));\r\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Test(timeout = 4000)\n public void test015() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 2147483647L, 2147483647L);\n Object object0 = new Object();\n range0.getBegin();\n // Undeclared exception!\n try { \n range0.startsBefore((Range) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Null Range used in range comparison operation.\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "public DirtyRegionQueue() {\r\n\t\tsuper();\r\n\t}", "@Test(expected = IllegalStateException.class)\n public void testSet_After_Add() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.add(3);\n\n instance.set(2);\n\n }", "@SuppressWarnings(\"unchecked\")\r\n private Void receiveObjectsAnswerVehicle()\r\n {\r\n List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1];\r\n List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2];\r\n\r\n assertTrue(removes.isEmpty());\r\n // 119\n assertEquals(138, adds.size());\r\n boolean containsMeshes = false;\r\n boolean containsLines = false;\r\n\r\n for (Geometry geom : adds)\r\n {\r\n if (geom instanceof PolygonMeshGeometry)\r\n {\r\n containsMeshes = true;\r\n }\r\n else if (geom instanceof PolylineGeometry)\r\n {\r\n containsLines = true;\r\n }\r\n }\r\n\r\n assertTrue(containsMeshes);\r\n assertTrue(containsLines);\r\n\r\n return null;\r\n }", "public void extendSelection(int index) {\n/* 107 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n\tpublic void testGetQuantityAwaitingAllocation() {\n\t\tfinal List<OrderSku> listSkus = new ArrayList<OrderSku>();\n\t\tfinal OrderSku orderSku1 = new OrderSkuImpl();\n\t\torderSku1.setPrice(1, null);\n\t\torderSku1.setAllocatedQuantity(1);\n\t\tfinal OrderSku orderSku2 = new OrderSkuImpl();\n\t\torderSku2.setPrice(1, null);\n\t\torderSku2.setAllocatedQuantity(0);\n\t\tlistSkus.add(orderSku1);\n\t\tlistSkus.add(orderSku2);\n\n\t\tfinal InventoryDtoImpl inventoryDto = new InventoryDtoImpl();\n\t\tinventoryDto.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tinventoryDto.setWarehouseUid(WAREHOUSE_UID);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tinventoryDto.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal PersistenceSession persistanceSession = context.mock(PersistenceSession.class);\n\t\tfinal Query query = context.mock(Query.class);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(persistenceEngine).getPersistenceSession(); will(returnValue(persistanceSession));\n\t\t\t\tallowing(persistanceSession).createNamedQuery(ORDER_SKU_SELECT_BY_CODE_AND_STATUS); will(returnValue(query));\n\t\t\t\tallowing(persistenceEngine).retrieveByNamedQuery(with(equal(ORDER_SKU_SELECT_BY_CODE_AND_STATUS)), with(any(Object[].class)));\n\t\t\t\twill(returnValue(Arrays.asList(orderSku1, orderSku2)));\n\t\t\t\tignoring(query).setParameter(with(any(int.class)), with(any(Object.class)));\n\t\t\t\tallowing(query).list(); will(returnValue(listSkus));\n\t\t\t}\n\t\t});\n\n\t\tassertEquals(\n\t\t\t\torderSku2.getQuantity() - orderSku2.getAllocatedQuantity(),\n\t\t\t\tallocationService.getQuantityAwaitingAllocation(productSku\n\t\t\t\t\t\t.getSkuCode(), WAREHOUSE_UID));\n\n\t}", "public void testRemoveAddresses() throws Exception {\r\n try {\r\n this.dao.removeAddresses(new long[]{-1}, false);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "@Override\n public void ensureCapacity(int index) {\n\n }", "void unableToListContents();", "public void verifyBugerList()\n\t{\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void verifyNoMatching(AcBatchFlight e)\n {\n }", "abstract public E addEmpty();", "@Test(timeout = 4000)\n public void test17() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n range_Builder0.copy();\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n long long0 = 265L;\n range_Builder0.shift(265L);\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range0.forEach(consumer0);\n Range range1 = Range.of(0L);\n List<Range> list0 = range0.complement(range1);\n List<Range> list1 = range0.complementFrom(list0);\n List<Range> list2 = range0.complementFrom(list1);\n List<Range> list3 = range0.complementFrom(list2);\n range0.complementFrom(list3);\n Range.of((-1147L), 0L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range2 = Range.of(range_CoordinateSystem0, 0L, 0L);\n Range range3 = range2.intersection(range0);\n range0.getEnd();\n range3.intersects(range0);\n // Undeclared exception!\n try { \n Range.parseRange(\"q)fxUX9s]Tp\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse q)fxUX9s]Tp into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "void checkReconstructible() throws InvalidObjectException {\n // subclasses can override\n }", "void fulfill( AvailabilityRequirement requirement );", "public void testAddAll4() {\n try {\n SynchronousQueue q = new SynchronousQueue();\n Integer[] ints = new Integer[1];\n for (int i = 0; i < 1; ++i)\n ints[i] = new Integer(i);\n q.addAll(Arrays.asList(ints));\n shouldThrow();\n }\n catch (IllegalStateException success) {}\n }", "@Test\n @Tag(NON_PR)\n void testAddressOrdering() throws Exception {\n Address ab = new AddressBuilder()\n .withNewMetadata()\n .withNamespace(getSharedAddressSpace().getMetadata().getNamespace())\n .withName(AddressUtils.generateAddressMetadataName(getSharedAddressSpace(), \"ab\"))\n .endMetadata()\n .withNewSpec()\n .withType(\"queue\")\n .withAddress(\"AB\")\n .withPlan(getDefaultPlan(AddressType.QUEUE))\n .endSpec()\n .build();\n\n resourcesManager.setAddresses(ab);\n\n Address aa = new AddressBuilder()\n .withNewMetadata()\n .withNamespace(getSharedAddressSpace().getMetadata().getNamespace())\n .withName(AddressUtils.generateAddressMetadataName(getSharedAddressSpace(), \"aa\"))\n .endMetadata()\n .withNewSpec()\n .withType(\"queue\")\n .withAddress(\"aa\")\n .withPlan(getDefaultPlan(AddressType.QUEUE))\n .endSpec()\n .build();\n\n // For this bug, 'ab' will end up in the bad state\n resourcesManager.setAddresses(TimeoutBudget.ofDuration(Duration.ofMinutes(2)), aa, ab);\n }", "public void remove()\n/* */ {\n/* 99 */ throw new UnsupportedOperationException();\n/* */ }", "public void swrap() throws NoUnusedObjectExeption;", "private void assertReflexive(UMLMessageArgument msgArg) throws Exception\r\n\t{\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertTrue(msgArg.equals(msgArg));\r\n\t}", "@Test(timeout = 4000)\n public void test33() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n XAConnectionFactory xAConnectionFactory0 = new XAConnectionFactory();\n try { \n connectionFactories0.addXAConnectionFactory((-1543), xAConnectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: -1543, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "@Test(timeout = 4000)\n public void test33() throws Throwable {\n Range range0 = Range.of((-1259L), (-1259L));\n range0.spliterator();\n Range.Builder range_Builder0 = new Range.Builder(range0);\n Object object0 = new Object();\n Long long0 = new Long((-1259L));\n range0.equals(long0);\n range0.toString();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.equals((Object) null);\n String string0 = null;\n // Undeclared exception!\n try { \n Range.CoordinateSystem.valueOf(\"unable to delete \");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.CoordinateSystem.unable to delete \n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "@Test\n public void testFindEntity_Person_TimeSlot() throws Exception {\n // check whether the database is set-up as expected.\n Person p = Manager.getPersonCollection().findEntity(1);\n assertNotNull(\"Bad test data?\", p);\n List<Allocation> pa = p.getAllocationList();\n assertFalse(\"Bad test data?\", pa.isEmpty());\n Allocation a = pa.get(0);\n Event e = a.getEvent();\n assertNotNull(\"Bad test data?\", e);\n TimeSlot t = e.getTimeSlot();\n assertNotNull(\"Bad test data?\", t);\n\n // Here is the statement that we want to test:\n Allocation result = Manager.getAllocationCollection().findEntity(p, t);\n assertNotNull(result);\n assertTrue(Objects.equals(result, a));\n\n }", "protected void beforeTimeSlices()\n\t\tthrows DbCompException\n\t{\n dates = new ArrayList<Date>();\n\t}", "@Test\n public void reentrantCallAfterPut() {\n byte[] data = ABIUtil.encodeMethodArguments(\"resetStorage\");\n byte[] txDataMethodArguments = ABIUtil.encodeMethodArguments(\"reentrantCallAfterPut\", dappAddr, data);\n AvmRule.ResultWrapper resultWrapper = avmRule.call(from, dappAddr, BigInteger.ZERO, txDataMethodArguments, energyLimit, energyPrice);\n Assert.assertTrue(resultWrapper.getReceiptStatus().isSuccess());\n long costWithoutResettingStorage = 164702;\n long executionCost = costWithoutResettingStorage + 29 * 5 +\n 5 * RuntimeMethodFeeSchedule.BlockchainRuntime_avm_resetStorage;\n Assert.assertEquals(executionCost - 5 * RuntimeMethodFeeSchedule.BlockchainRuntime_avm_deleteStorage_refund, energyLimit - resultWrapper.getTransactionResult().getEnergyRemaining());\n\n byte[] key = new byte[32];\n key[0] = 0x1;\n txDataMethodArguments = ABIUtil.encodeMethodArguments(\"getStorage\", key);\n resultWrapper = avmRule.call(from, dappAddr, BigInteger.ZERO, txDataMethodArguments, energyLimit, energyPrice);\n Assert.assertTrue(resultWrapper.getReceiptStatus().isSuccess());\n Assert.assertArrayEquals(null, (byte[]) resultWrapper.getDecodedReturnData());\n }", "public abstract void markUsable();", "@Test\n public void t3shouldReturnNull() {\n Invoice actual;\n when(mock.getInvoices()).thenReturn(newInvoices());\n try {\n actual = new InvoiceBook(mock, emailServiceMock)\n .getInvoiceById(mock.getInvoices().get(50).getId());\n } catch (IndexOutOfBoundsException e) {\n actual = null;\n }\n //then\n assertNull(actual);\n\n }", "@Test\n\tpublic void testSetSliceWithoutUpdate() {\n\t}", "@Test(timeout = 4000)\n public void test69() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n XAQueueConnectionFactory xAQueueConnectionFactory0 = new XAQueueConnectionFactory();\n try { \n connectionFactories0.setXAQueueConnectionFactory(0, xAQueueConnectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: 0, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "int insertSelective(AlertQueue record);", "@Test\n\tpublic void test1() {\n\t\t// toArray()\n\t\tDoubleLinkedList dll = new DoubleLinkedList(getList(10));\n\t\tObject[] a = new Object[] {21, 22, 23, 24, 25};\n\t\tassertArrayEquals(dll.toArray(a), getList(10).toArray());\n\t\t\n\t\tdll = new DoubleLinkedList(getList(4));\n\t\tassertEquals(dll.toArray(a)[4], null);\n\t\t\n\t\t// addBefore()\n\t\tdll.addBefore(101, dll.header);\n\t\t\n\t\t// remove()\n\t\ttry{\n\t\t\tdll.remove(dll.header);\n\t\t}catch(NoSuchElementException e){\n\t\t\tassertEquals(e.getMessage(), null);\n\t\t}\n\t\t\n\t\tdll.remove(dll.header.next);\n\t\t\n\t\t\n\t}", "public void testRemoveObj() {\r\n list.add(\"A\");\r\n list.add(\"B\");\r\n assertTrue(list.remove(\"A\"));\r\n assertEquals( \"B\", list.get(0));\r\n assertEquals( 1, list.size());\r\n list.add(\"C\");\r\n assertTrue(list.remove(\"C\"));\r\n assertEquals(\"B\", list.get(0));\r\n }", "@Override\n void undo() {\n assert false;\n }", "public void testRemoveFromEmpty() {\r\n list.add(\"dance\");\r\n list.add(0, \"safety\");\r\n list.clear();\r\n assertFalse(list.remove(\"safety\"));\r\n Exception exception;\r\n exception = null;\r\n try {\r\n list.remove(0);\r\n } \r\n catch (IndexOutOfBoundsException e) {\r\n exception = e;\r\n }\r\n assertTrue( exception instanceof IndexOutOfBoundsException);\r\n\r\n DLList<String> emptyList = new DLList<String>();\r\n exception = null;\r\n try {\r\n emptyList.remove(0);\r\n } \r\n catch (IndexOutOfBoundsException e) {\r\n exception = e;\r\n }\r\n assertTrue( exception instanceof IndexOutOfBoundsException);\r\n }", "private void testAclConstraints005() {\n\t\tDmtSession session = null;\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints005\");\n\t\t\tsession = tbc.getDmtAdmin().getSession(\".\",\n\t\t\t\t\tDmtSession.LOCK_TYPE_EXCLUSIVE);\n\n\t\t\tsession.setNodeAcl(TestExecPluginActivator.INTERIOR_NODE,\n\t\t\t\t\tnew org.osgi.service.dmt.Acl(\"Replace=*\"));\n\n\t\t\tsession.deleteNode(TestExecPluginActivator.INTERIOR_NODE);\n\n\t\t\tTestCase.assertNull(\"This test asserts that the Dmt Admin service synchronizes the ACLs with any change \"\n\t\t\t\t\t\t\t+ \"in the DMT that is made through its service interface\",\n\t\t\t\t\t\t\tsession.getNodeAcl(TestExecPluginActivator.INTERIOR_NODE));\n\t\t} catch (Exception e) {\n\t\t\ttbc.failUnexpectedException(e);\n\t\t} finally {\n\t\t\ttbc.closeSession(session);\n\t\t}\n\t}", "public void testRemove() {\n TaskSeriesCollection c = new TaskSeriesCollection();\n TaskSeries s1 = new TaskSeries(\"S1\");\n c.add(s1);\n c.remove(0);\n c.add(s1);\n boolean pass = false;\n try {\n c.remove(-1);\n } catch (IllegalArgumentException e) {\n pass = true;\n }\n pass = false;\n try {\n c.remove(1);\n } catch (IllegalArgumentException e) {\n pass = true;\n }\n }", "@Test(timeout = 4000)\n public void test58() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n connectionFactories0.getXAQueueConnectionFactory();\n XAConnectionFactory xAConnectionFactory0 = new XAConnectionFactory();\n try { \n connectionFactories0.setXAConnectionFactory(0, xAConnectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: 0, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "public void testIteratorRemove() {\n SynchronousQueue q = new SynchronousQueue();\n\tIterator it = q.iterator();\n try {\n it.remove();\n shouldThrow();\n }\n catch (IllegalStateException success) {}\n }", "public void testRemoveAddress() throws Exception {\r\n try {\r\n this.dao.removeAddress(-1, false);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "private void ensureCapacity() {\n\t\n\t\tif (elements.length == size) {\n\t\t\tT[] oldElements = elements;\n\t\t\t\n\t\t\telements = (T[]) new Object[2 * elements.length + 1];\n\t\t\t\n\t\t\tSystem.arraycopy(oldElements, 0, elements, 0, size);\n\t\t\n\t\t}\n\t\n\t}", "protected void setUsedRange(int _start, int _end) throws Exception {\n if (_start < 0 || _end >= size || _start > _end) {\n throw new Exception(\"Invalid range! Start must be 0 or larger, end must be \" + \"inside allowed memory range.\");\n }\n\n start = _start;\n end = _end;\n }", "public void testRemoveOrder() {\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Range range0 = Range.of((-1259L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n range1.getEnd();\n range1.getEnd();\n Range range2 = range0.intersection(range1);\n List<Range> list0 = range2.split(255L);\n range2.complementFrom(list0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range3 = Range.of(range_CoordinateSystem1, (-1259L), 0L);\n range3.endsBefore(range0);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range3);\n List<Range> list1 = range2.complementFrom(list0);\n Range range4 = Range.of(1207L);\n assertFalse(range4.isEmpty());\n \n boolean boolean0 = range2.isSubRangeOf(range3);\n assertTrue(boolean0);\n \n Range.CoordinateSystem range_CoordinateSystem2 = Range.CoordinateSystem.RESIDUE_BASED;\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range2.forEach(consumer0);\n Range.CoordinateSystem range_CoordinateSystem3 = Range.CoordinateSystem.ZERO_BASED;\n range_CoordinateSystem3.toString();\n range0.equals(list1);\n assertSame(range2, range1);\n assertEquals(0, list1.size());\n \n range_CoordinateSystem1.toString();\n long long0 = range0.getEnd();\n assertEquals(255L, long0);\n }", "@Test(timeout = 4000)\n public void test25() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n range_Builder0.copy();\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n range_Builder0.shift(265L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n range0.complementFrom(linkedList0);\n Range range1 = Range.of((-3234L));\n range0.isSubRangeOf(range1);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.complementFrom(linkedList0);\n range1.intersects(range0);\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"TGa_,[\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.TGa_,[\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "public void offerBack(E elem);", "@Test\n public void invalidDeletionTimesHandlingTest()\n {\n DeletionTime dt = DeletionTime.build(1, -1);\n assertFalse(dt.validate());\n\n // use the invalid deletion time for a range tombstone and aggregate it\n RangeTombstoneList rtl = new RangeTombstoneList(null, 1);\n rtl.add(new RangeTombstone(Slice.ALL, dt));\n\n // undo the aggregation and see if the deletion time is still invalid\n dt = rtl.iterator().next().deletionTime();\n assertNotNull(dt);\n assertFalse(dt.validate());\n }", "private void chk() {\n if (clist != null)\n throw new UnsupportedOperationException();\n }", "private void t3() {\n // write to a super region, read from a subregion: only keep write\n writeProtected();\n readDefault();\n }", "public void doRemove() throws VisADException, RemoteException {\n rangeRings = null;\n super.doRemove();\n }", "public void remove(){throw new RuntimeException(\"Removing() is not implemented\");\r\n\t\t}", "public Item a(Block parambec, Random paramRandom, int paramInt)\r\n/* 46: */ {\r\n/* 47:62 */ return ItemList.ap;\r\n/* 48: */ }" ]
[ "0.5310402", "0.5307975", "0.5265414", "0.5261048", "0.5227728", "0.52238125", "0.52219373", "0.51905525", "0.51829267", "0.5159131", "0.51160336", "0.51081", "0.5097817", "0.50779533", "0.5069075", "0.5068207", "0.505554", "0.50348914", "0.5024662", "0.5024629", "0.5014548", "0.49989763", "0.49884185", "0.49842408", "0.49743548", "0.4970651", "0.49523738", "0.49508914", "0.49507555", "0.49444577", "0.49332318", "0.4913195", "0.49110872", "0.49031964", "0.49031228", "0.48981428", "0.4897502", "0.489537", "0.48944792", "0.48913473", "0.48905414", "0.48902822", "0.4888323", "0.4885266", "0.48845834", "0.48828915", "0.48823956", "0.48740196", "0.48729643", "0.48670265", "0.48669448", "0.4863963", "0.48632956", "0.48628193", "0.48602247", "0.48600617", "0.48582938", "0.48547992", "0.48511603", "0.48502943", "0.48481935", "0.48441634", "0.48418888", "0.48395813", "0.48373148", "0.483471", "0.48277166", "0.48212028", "0.48203588", "0.48194328", "0.48188668", "0.4811985", "0.4810213", "0.48084652", "0.4803199", "0.47946012", "0.47943717", "0.47938424", "0.47931483", "0.47892314", "0.4786754", "0.4778292", "0.47717756", "0.47706082", "0.4768572", "0.4767199", "0.47657517", "0.47656113", "0.47550997", "0.47550628", "0.47543913", "0.47537303", "0.47528818", "0.47501346", "0.47495908", "0.4748584", "0.4745617", "0.47449082", "0.47437054", "0.47430387", "0.4743024" ]
0.0
-1
/ ARRANGE Nothing to arrange here. / ACT & ASSERT
@Test public void extractTransferContract_null_throwIllegalArgumentException() { assertThrows(IllegalArgumentException.class, () -> MessageUtils.extractTransferContract(null)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void ensureBufferSpace(int expectedAdditions)\n {\n\t\tthrow new UnsupportedOperationException(lengthChangeError);\n }", "@Override\n void invokeOperation() {\n\n AcquiredAccount from, to;\n if (fromIndex < toIndex) {\n from = acquire(fromIndex, this);\n to = acquire(toIndex, this);\n } else {\n to = acquire(toIndex, this);\n from = acquire(fromIndex, this);\n }\n\n if (from != null && to != null) {\n if (amount > from.amount)\n errorMessage = \"Underflow\";\n else if (to.amount + amount > MAX_AMOUNT)\n errorMessage = \"Overflow\";\n else {\n from.newAmount = from.amount - amount;\n to.newAmount = to.amount + amount;\n }\n this.completed = true;\n }\n\n if (fromIndex < toIndex) {\n release(toIndex, this);\n release(fromIndex, this);\n } else {\n release(fromIndex, this);\n release(toIndex, this);\n }\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void inorder() {\n\n\t}", "@Test\r\n @Override\r\n @ConditionalIgnore(condition = IgnoreTreeDeferredIssue.class)\r\n public void testSortedAddDiscontinous() {\r\n super.testSortedAddDiscontinous();\r\n }", "@Test\n public void testRemoveEntity_Allocation() throws DataBaseNotReadyException {\n // we assume that the test database contains at least one record\n // and that this allocation has some members attached.\n Allocation a = allocationCollection.findEntity(1L);\n assertNotNull(\"Bad test data?\", a);\n Person p = a.getPerson();\n assertNotNull(\"Bad test data?\", p);\n\n allocationCollection.removeEntity(a);\n\n assertNull(allocationCollection.findEntity(1L));\n for (Allocation pa : p.getAllocationList()) {\n assertFalse(Objects.equals(a, pa));\n }\n }", "protected final void _verifyAlloc(Object buffer)\n/* */ {\n/* 269 */ if (buffer != null) throw new IllegalStateException(\"Trying to call same allocXxx() method second time\");\n/* */ }", "@SuppressWarnings(\"unchecked\")\r\n private Void receiveObjectsAnswerImageryRemoves()\r\n {\r\n List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1];\r\n List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2];\r\n\r\n assertEquals(1, removes.size());\r\n assertEquals(1, adds.size());\r\n assertTrue(adds.get(0) instanceof TileGeometry);\r\n\r\n return null;\r\n }", "default void assertAppendPermittedUnsafe(long address, LogData newEntry) throws DataOutrankedException, ValueAdoptedException {\n LogData oldEntry = read(address);\n if (oldEntry.getType()==DataType.EMPTY) {\n return;\n }\n if (newEntry.getRank().getRank()==0) {\n // data consistency in danger\n throw new OverwriteException();\n }\n int compare = newEntry.getRank().compareTo(oldEntry.getRank());\n if (compare<0) {\n throw new DataOutrankedException();\n }\n if (compare>0) {\n if (newEntry.getType()==DataType.RANK_ONLY && oldEntry.getType() != DataType.RANK_ONLY) {\n // the new data is a proposal, the other data is not, so the old value should be adopted\n ReadResponse resp = new ReadResponse();\n resp.put(address, oldEntry);\n throw new ValueAdoptedException(resp);\n } else {\n return;\n }\n }\n }", "@Test(expected = VendingMachineException.class)\r\n\tpublic void testAddItem_already_occupied() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"A\");\r\n\t\tVendingMachineItem test2 = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test2, \"A\");\r\n\r\n\t}", "private void assertImmutableList() {\n\t\tassertImmutableList(wc);\n\t}", "@Override public void action() {\n //Do Nothing\n assert(checkRep());\n }", "private void ensureCap(){\n T[] temp = (T[])new Object[arr.length * 2];\n for(int i = 0; i < numItems; i++){\n temp[i] = this.arr[i];\n }\n this.arr = temp;\n }", "@SuppressWarnings(\"unchecked\")\r\n private Void receiveObjectsAnswerImagery()\r\n {\r\n List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1];\r\n List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2];\r\n\r\n assertTrue(removes.isEmpty());\r\n assertEquals(1, adds.size());\r\n assertTrue(adds.get(0) instanceof TileGeometry);\r\n\r\n return null;\r\n }", "@Test(expected = IllegalStateException.class)\n public void testRemove_After_Add() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.add(2);\n\n instance.remove();\n\n }", "@Test\r\n\tpublic void testAddItem_not_occupied() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"A\");\r\n\t\tassertEquals(test, vendMachine.getItem(\"A\"));\r\n\t}", "@Test(expected = IllegalStateException.class)\n public void testRemove_After_Set() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.set(2);\n\n instance.remove();\n\n }", "public void testAdd() {\n\ttry {\n SynchronousQueue q = new SynchronousQueue();\n assertEquals(0, q.remainingCapacity());\n q.add(one);\n shouldThrow();\n } catch (IllegalStateException success){\n\t}\n }", "@Test\n public void testAfterOffer() {\n pool.beforeOffer(controller1, CommInfrastructure.UEB, TOPIC1, EVENT1);\n\n // this should clear them\n assertFalse(pool.afterOffer(controller1, CommInfrastructure.UEB, TOPIC2, EVENT2, true));\n\n assertFalse(pool.beforeInsert(drools1, OBJECT1));\n verify(mgr1, never()).beforeInsert(any(), any());\n\n\n assertFalse(pool.beforeInsert(droolsDisabled, OBJECT1));\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 }", "@Test(expected = IllegalStateException.class)\n public void testSet_After_Remove() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.remove();\n\n instance.set(2);\n\n }", "@Test\r\n\tpublic void testRemoveObject() {\r\n\t\tAssert.assertFalse(list.remove(null));\r\n\t\tAssert.assertTrue(list.remove(new Munitions(2, 3, \"iron\")));\r\n\t\tAssert.assertEquals(14, list.size());\r\n\t}", "public void _release() {\n throw new NO_IMPLEMENT(reason);\n }", "private void offer() {\n\t\t\t\n\t\t}", "@Test\n @SuppressWarnings({\"unchecked\"})\n public void moveUp() {\n exQ.moveUp(JobIdFactory.newId());\n Mockito.verify(queue, Mockito.times(0)).swap( Mockito.any(PrioritizableRunnable.class),Mockito.any(PrioritizableRunnable.class));\n //the first shouldent be moved\n exQ.moveUp(this.ids.get(0));\n Mockito.verify(queue, Mockito.times(0)).swap( Mockito.any(PrioritizableRunnable.class),Mockito.any(PrioritizableRunnable.class));\n //otherwise move it up\n exQ.moveUp(this.ids.get(1));\n Mockito.verify(queue, Mockito.times(1)).swap(this.runnables.get(1),this.runnables.get(0));\n }", "@Override\n\tpublic boolean reserve() {\n\t\treturn false;\n\t}", "@Test(expected = IllegalStateException.class)\n public void testRemove_After_Remove() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.remove();\n\n instance.remove();\n\n }", "protected abstract void checkRemoved();", "void vaildate() {\n final int n = snapshotRootIndex >= 0? snapshotRootIndex + 1: numNonNull; \r\n int i = 0;\r\n if (inodes[i] != null) {\r\n for(i++; i < n && inodes[i] != null; i++) {\r\n final INodeDirectory parent_i = inodes[i].getParent();\r\n final INodeDirectory parent_i_1 = inodes[i-1].getParent();\r\n if (parent_i != inodes[i-1] &&\r\n (parent_i_1 == null || !parent_i_1.isSnapshottable()\r\n || parent_i != parent_i_1)) {\r\n throw new AssertionError(\r\n \"inodes[\" + i + \"].getParent() != inodes[\" + (i-1)\r\n + \"]\\n inodes[\" + i + \"]=\" + inodes[i].toDetailString()\r\n + \"\\n inodes[\" + (i-1) + \"]=\" + inodes[i-1].toDetailString()\r\n + \"\\n this=\" + toString(false));\r\n }\r\n }\r\n }\r\n if (i != n) {\r\n throw new AssertionError(\"i = \" + i + \" != \" + n\r\n + \", this=\" + toString(false));\r\n }\r\n }", "@Test\r\n public void testAtualizar() {\r\n TipoItemRN rn = new TipoItemRN();\r\n TipoItem tipoitem = new TipoItem();\r\n \r\n tipoitem.setDescricao(\"TesteAtualizarTipoItem\");\r\n rn.salvar(tipoitem);\r\n \r\n tipoitem=null;\r\n \r\n tipoitem = rn.pesquisarDescricaEq(\"TesteAtualizarTipoItem\");\r\n \r\n if (tipoitem != null){\r\n tipoitem.setDescricao(\"TesteAtualizarTipoItemAlterado\");\r\n rn.salvar(tipoitem);\r\n tipoitem=null;\r\n }\r\n tipoitem = rn.pesquisarDescricaEq(\"TesteAtualizarTipoItemAlterado\");\r\n \r\n assertEquals(\"TesteAtualizarTipoItemAlterado\", tipoitem.getDescricao());\r\n \r\n rn.remover(tipoitem);\r\n }", "protected void clearRangeTest() {\n\tneedRangeTest = false;\n }", "@Test\n public void testItem_Ordering() {\n OasisList<Integer> baseList = new SegmentedOasisList<>(2, 2);\n\n List<Integer> expResult = Arrays.asList(1, 2, 6, 8);\n baseList.addAll(expResult);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), baseList.get(i));\n }\n }", "@Test\n public void testAdd_After_Remove() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n ;\n\n instance.remove();\n instance.add(9);\n int expResult = 1;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "public void clearListSelection() {\n/* 494 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n range_Builder0.copy();\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n range_Builder0.shift(265L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n range0.complementFrom(linkedList0);\n Range range1 = Range.of((-3234L));\n range0.isSubRangeOf(range1);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Consumer<Long> consumer0 = (Consumer<Long>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range1.forEach(consumer0);\n range_CoordinateSystem0.toString();\n range1.equals(\"Residue Based\");\n String string0 = range_CoordinateSystem0.toString();\n assertEquals(\"Residue Based\", string0);\n }", "private void validCheck ()\n\t{\n\t\tassert allButLast != null || cachedFlatListOrMore != null;\n\t}", "@Override\n public boolean use(CanTakeItem o){\n return false; \n }", "private void assertAll() {\n\t\t\n\t}", "@Test\n void load() {\n Assert.assertEquals(r1,arrayStorage.load(r1.getUuid()));\n Assert.assertEquals(r2,arrayStorage.load(r2.getUuid()));\n\n }", "public final void mo51373a() {\n }", "public void setRangeInfo(RangeInfo rangeInfo) {\n/* 1147 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void testNewEntity_3args() throws DataBaseNotReadyException {\n // Verify that our test database is set-up as expected.\n // Access test-person , test-event and test-job.\n // Verify that such items exist in the database\n // and that the test-person has yet no allocations.\n Person p = Manager.getPersonCollection().findEntity(2);\n assertNotNull(\"Bad test data?\", p);\n Event e = Manager.getEventCollection().findEntity(2);\n assertNotNull(\"Bad test data?\", e);\n Job j = Manager.getJobCollection().findEntity(2);\n assertNotNull(\"Bad test data?\", j);\n List<Allocation> allocationListBefore = p.getAllocationList();\n assertNotNull(allocationListBefore);\n assertTrue(\"Bad test data?\", allocationListBefore.isEmpty());\n\n // Here is the statement that we want to test:\n Allocation testItem = allocationCollection.newEntity(p, e, j, \"USER\");\n\n // Verify that the result is as expected.\n assertNotNull(testItem);\n assertNotNull(testItem.getAllocationId());\n assertTrue(testItem.getAllocationId() > 0);\n\n assertEquals(p, testItem.getPerson());\n assertEquals(e, testItem.getEvent());\n assertEquals(j, testItem.getJob());\n\n List<Allocation> allocationListAfter = p.getAllocationList();\n assertTrue(allocationListAfter.contains(testItem));\n }", "public void ar() {\n Object object = this.li;\n synchronized (object) {\n if (this.ly) {\n this.av();\n this.aq();\n try {\n this.a(this.ax());\n }\n catch (JSONException var2_2) {\n dw.b(\"JSON Failure while processing active view data.\", var2_2);\n }\n this.ly = false;\n this.as();\n dw.x(\"Untracked ad unit: \" + this.lo.ao());\n }\n return;\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n private Void receiveObjectsAnswerFootprint()\r\n {\r\n List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1];\r\n List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2];\r\n\r\n assertTrue(removes.isEmpty());\r\n assertEquals(1, adds.size());\r\n assertTrue(adds.get(0) instanceof PolygonGeometry);\r\n\r\n return null;\r\n }", "public void test_4() throws Exception {\n\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\ttry {\n\t\t\ttheBSQ.add(null); // null is not an accepted value\n\t\t\tfail(\"should throw an IllegalArgumentException\");\n\t\t}\n\t\tcatch(IllegalArgumentException ex) {\n\t\t\t// OK\n\t\t}\n\t}", "public void testAddAll2() {\n try {\n SynchronousQueue q = new SynchronousQueue();\n Integer[] ints = new Integer[1];\n q.addAll(Arrays.asList(ints));\n shouldThrow();\n }\n catch (NullPointerException success) {}\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Range.CoordinateSystem.values();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range.Builder range_Builder0 = new Range.Builder(range_CoordinateSystem0, 0L, 0L);\n Range range0 = Range.ofLength(0L);\n range0.getBegin(range_CoordinateSystem0);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.spliterator();\n range0.complementFrom(linkedList0);\n range_Builder0.contractBegin(0L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n // Undeclared exception!\n try { \n Range.parseRange(\"\", range_CoordinateSystem1);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@org.junit.jupiter.api.Test\r\n void toArray() {\n mll.add(\"A\");\r\n Object [] backDoor = mll.toArray();\r\n backDoor[0] = \"HAHHA\";\r\n\r\n assertEquals(\"A\", mll.get(0));\r\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Test(timeout = 4000)\n public void test015() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 2147483647L, 2147483647L);\n Object object0 = new Object();\n range0.getBegin();\n // Undeclared exception!\n try { \n range0.startsBefore((Range) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Null Range used in range comparison operation.\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "public DirtyRegionQueue() {\r\n\t\tsuper();\r\n\t}", "public void extendSelection(int index) {\n/* 107 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(expected = IllegalStateException.class)\n public void testSet_After_Add() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.add(3);\n\n instance.set(2);\n\n }", "@SuppressWarnings(\"unchecked\")\r\n private Void receiveObjectsAnswerVehicle()\r\n {\r\n List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1];\r\n List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2];\r\n\r\n assertTrue(removes.isEmpty());\r\n // 119\n assertEquals(138, adds.size());\r\n boolean containsMeshes = false;\r\n boolean containsLines = false;\r\n\r\n for (Geometry geom : adds)\r\n {\r\n if (geom instanceof PolygonMeshGeometry)\r\n {\r\n containsMeshes = true;\r\n }\r\n else if (geom instanceof PolylineGeometry)\r\n {\r\n containsLines = true;\r\n }\r\n }\r\n\r\n assertTrue(containsMeshes);\r\n assertTrue(containsLines);\r\n\r\n return null;\r\n }", "public void testRemoveAddresses() throws Exception {\r\n try {\r\n this.dao.removeAddresses(new long[]{-1}, false);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "@Test\n\tpublic void testGetQuantityAwaitingAllocation() {\n\t\tfinal List<OrderSku> listSkus = new ArrayList<OrderSku>();\n\t\tfinal OrderSku orderSku1 = new OrderSkuImpl();\n\t\torderSku1.setPrice(1, null);\n\t\torderSku1.setAllocatedQuantity(1);\n\t\tfinal OrderSku orderSku2 = new OrderSkuImpl();\n\t\torderSku2.setPrice(1, null);\n\t\torderSku2.setAllocatedQuantity(0);\n\t\tlistSkus.add(orderSku1);\n\t\tlistSkus.add(orderSku2);\n\n\t\tfinal InventoryDtoImpl inventoryDto = new InventoryDtoImpl();\n\t\tinventoryDto.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tinventoryDto.setWarehouseUid(WAREHOUSE_UID);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tinventoryDto.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal PersistenceSession persistanceSession = context.mock(PersistenceSession.class);\n\t\tfinal Query query = context.mock(Query.class);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(persistenceEngine).getPersistenceSession(); will(returnValue(persistanceSession));\n\t\t\t\tallowing(persistanceSession).createNamedQuery(ORDER_SKU_SELECT_BY_CODE_AND_STATUS); will(returnValue(query));\n\t\t\t\tallowing(persistenceEngine).retrieveByNamedQuery(with(equal(ORDER_SKU_SELECT_BY_CODE_AND_STATUS)), with(any(Object[].class)));\n\t\t\t\twill(returnValue(Arrays.asList(orderSku1, orderSku2)));\n\t\t\t\tignoring(query).setParameter(with(any(int.class)), with(any(Object.class)));\n\t\t\t\tallowing(query).list(); will(returnValue(listSkus));\n\t\t\t}\n\t\t});\n\n\t\tassertEquals(\n\t\t\t\torderSku2.getQuantity() - orderSku2.getAllocatedQuantity(),\n\t\t\t\tallocationService.getQuantityAwaitingAllocation(productSku\n\t\t\t\t\t\t.getSkuCode(), WAREHOUSE_UID));\n\n\t}", "@Override\n public void ensureCapacity(int index) {\n\n }", "void unableToListContents();", "public void verifyBugerList()\n\t{\n\t\t\n\t}", "public void verifyNoMatching(AcBatchFlight e)\n {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "abstract public E addEmpty();", "@Test(timeout = 4000)\n public void test17() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n range_Builder0.copy();\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n long long0 = 265L;\n range_Builder0.shift(265L);\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range0.forEach(consumer0);\n Range range1 = Range.of(0L);\n List<Range> list0 = range0.complement(range1);\n List<Range> list1 = range0.complementFrom(list0);\n List<Range> list2 = range0.complementFrom(list1);\n List<Range> list3 = range0.complementFrom(list2);\n range0.complementFrom(list3);\n Range.of((-1147L), 0L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range2 = Range.of(range_CoordinateSystem0, 0L, 0L);\n Range range3 = range2.intersection(range0);\n range0.getEnd();\n range3.intersects(range0);\n // Undeclared exception!\n try { \n Range.parseRange(\"q)fxUX9s]Tp\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse q)fxUX9s]Tp into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "void checkReconstructible() throws InvalidObjectException {\n // subclasses can override\n }", "void fulfill( AvailabilityRequirement requirement );", "public void testAddAll4() {\n try {\n SynchronousQueue q = new SynchronousQueue();\n Integer[] ints = new Integer[1];\n for (int i = 0; i < 1; ++i)\n ints[i] = new Integer(i);\n q.addAll(Arrays.asList(ints));\n shouldThrow();\n }\n catch (IllegalStateException success) {}\n }", "@Test\n @Tag(NON_PR)\n void testAddressOrdering() throws Exception {\n Address ab = new AddressBuilder()\n .withNewMetadata()\n .withNamespace(getSharedAddressSpace().getMetadata().getNamespace())\n .withName(AddressUtils.generateAddressMetadataName(getSharedAddressSpace(), \"ab\"))\n .endMetadata()\n .withNewSpec()\n .withType(\"queue\")\n .withAddress(\"AB\")\n .withPlan(getDefaultPlan(AddressType.QUEUE))\n .endSpec()\n .build();\n\n resourcesManager.setAddresses(ab);\n\n Address aa = new AddressBuilder()\n .withNewMetadata()\n .withNamespace(getSharedAddressSpace().getMetadata().getNamespace())\n .withName(AddressUtils.generateAddressMetadataName(getSharedAddressSpace(), \"aa\"))\n .endMetadata()\n .withNewSpec()\n .withType(\"queue\")\n .withAddress(\"aa\")\n .withPlan(getDefaultPlan(AddressType.QUEUE))\n .endSpec()\n .build();\n\n // For this bug, 'ab' will end up in the bad state\n resourcesManager.setAddresses(TimeoutBudget.ofDuration(Duration.ofMinutes(2)), aa, ab);\n }", "public void remove()\n/* */ {\n/* 99 */ throw new UnsupportedOperationException();\n/* */ }", "private void assertReflexive(UMLMessageArgument msgArg) throws Exception\r\n\t{\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertTrue(msgArg.equals(msgArg));\r\n\t}", "public void swrap() throws NoUnusedObjectExeption;", "@Test(timeout = 4000)\n public void test33() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n XAConnectionFactory xAConnectionFactory0 = new XAConnectionFactory();\n try { \n connectionFactories0.addXAConnectionFactory((-1543), xAConnectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: -1543, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "@Test(timeout = 4000)\n public void test33() throws Throwable {\n Range range0 = Range.of((-1259L), (-1259L));\n range0.spliterator();\n Range.Builder range_Builder0 = new Range.Builder(range0);\n Object object0 = new Object();\n Long long0 = new Long((-1259L));\n range0.equals(long0);\n range0.toString();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.equals((Object) null);\n String string0 = null;\n // Undeclared exception!\n try { \n Range.CoordinateSystem.valueOf(\"unable to delete \");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.CoordinateSystem.unable to delete \n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "@Test\n public void testFindEntity_Person_TimeSlot() throws Exception {\n // check whether the database is set-up as expected.\n Person p = Manager.getPersonCollection().findEntity(1);\n assertNotNull(\"Bad test data?\", p);\n List<Allocation> pa = p.getAllocationList();\n assertFalse(\"Bad test data?\", pa.isEmpty());\n Allocation a = pa.get(0);\n Event e = a.getEvent();\n assertNotNull(\"Bad test data?\", e);\n TimeSlot t = e.getTimeSlot();\n assertNotNull(\"Bad test data?\", t);\n\n // Here is the statement that we want to test:\n Allocation result = Manager.getAllocationCollection().findEntity(p, t);\n assertNotNull(result);\n assertTrue(Objects.equals(result, a));\n\n }", "protected void beforeTimeSlices()\n\t\tthrows DbCompException\n\t{\n dates = new ArrayList<Date>();\n\t}", "@Test\n public void reentrantCallAfterPut() {\n byte[] data = ABIUtil.encodeMethodArguments(\"resetStorage\");\n byte[] txDataMethodArguments = ABIUtil.encodeMethodArguments(\"reentrantCallAfterPut\", dappAddr, data);\n AvmRule.ResultWrapper resultWrapper = avmRule.call(from, dappAddr, BigInteger.ZERO, txDataMethodArguments, energyLimit, energyPrice);\n Assert.assertTrue(resultWrapper.getReceiptStatus().isSuccess());\n long costWithoutResettingStorage = 164702;\n long executionCost = costWithoutResettingStorage + 29 * 5 +\n 5 * RuntimeMethodFeeSchedule.BlockchainRuntime_avm_resetStorage;\n Assert.assertEquals(executionCost - 5 * RuntimeMethodFeeSchedule.BlockchainRuntime_avm_deleteStorage_refund, energyLimit - resultWrapper.getTransactionResult().getEnergyRemaining());\n\n byte[] key = new byte[32];\n key[0] = 0x1;\n txDataMethodArguments = ABIUtil.encodeMethodArguments(\"getStorage\", key);\n resultWrapper = avmRule.call(from, dappAddr, BigInteger.ZERO, txDataMethodArguments, energyLimit, energyPrice);\n Assert.assertTrue(resultWrapper.getReceiptStatus().isSuccess());\n Assert.assertArrayEquals(null, (byte[]) resultWrapper.getDecodedReturnData());\n }", "@Test\n\tpublic void testSetSliceWithoutUpdate() {\n\t}", "public abstract void markUsable();", "@Test(timeout = 4000)\n public void test69() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n XAQueueConnectionFactory xAQueueConnectionFactory0 = new XAQueueConnectionFactory();\n try { \n connectionFactories0.setXAQueueConnectionFactory(0, xAQueueConnectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: 0, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "@Test\n public void t3shouldReturnNull() {\n Invoice actual;\n when(mock.getInvoices()).thenReturn(newInvoices());\n try {\n actual = new InvoiceBook(mock, emailServiceMock)\n .getInvoiceById(mock.getInvoices().get(50).getId());\n } catch (IndexOutOfBoundsException e) {\n actual = null;\n }\n //then\n assertNull(actual);\n\n }", "int insertSelective(AlertQueue record);", "@Test\n\tpublic void test1() {\n\t\t// toArray()\n\t\tDoubleLinkedList dll = new DoubleLinkedList(getList(10));\n\t\tObject[] a = new Object[] {21, 22, 23, 24, 25};\n\t\tassertArrayEquals(dll.toArray(a), getList(10).toArray());\n\t\t\n\t\tdll = new DoubleLinkedList(getList(4));\n\t\tassertEquals(dll.toArray(a)[4], null);\n\t\t\n\t\t// addBefore()\n\t\tdll.addBefore(101, dll.header);\n\t\t\n\t\t// remove()\n\t\ttry{\n\t\t\tdll.remove(dll.header);\n\t\t}catch(NoSuchElementException e){\n\t\t\tassertEquals(e.getMessage(), null);\n\t\t}\n\t\t\n\t\tdll.remove(dll.header.next);\n\t\t\n\t\t\n\t}", "public void testRemoveObj() {\r\n list.add(\"A\");\r\n list.add(\"B\");\r\n assertTrue(list.remove(\"A\"));\r\n assertEquals( \"B\", list.get(0));\r\n assertEquals( 1, list.size());\r\n list.add(\"C\");\r\n assertTrue(list.remove(\"C\"));\r\n assertEquals(\"B\", list.get(0));\r\n }", "@Override\n void undo() {\n assert false;\n }", "public void testRemoveFromEmpty() {\r\n list.add(\"dance\");\r\n list.add(0, \"safety\");\r\n list.clear();\r\n assertFalse(list.remove(\"safety\"));\r\n Exception exception;\r\n exception = null;\r\n try {\r\n list.remove(0);\r\n } \r\n catch (IndexOutOfBoundsException e) {\r\n exception = e;\r\n }\r\n assertTrue( exception instanceof IndexOutOfBoundsException);\r\n\r\n DLList<String> emptyList = new DLList<String>();\r\n exception = null;\r\n try {\r\n emptyList.remove(0);\r\n } \r\n catch (IndexOutOfBoundsException e) {\r\n exception = e;\r\n }\r\n assertTrue( exception instanceof IndexOutOfBoundsException);\r\n }", "private void testAclConstraints005() {\n\t\tDmtSession session = null;\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints005\");\n\t\t\tsession = tbc.getDmtAdmin().getSession(\".\",\n\t\t\t\t\tDmtSession.LOCK_TYPE_EXCLUSIVE);\n\n\t\t\tsession.setNodeAcl(TestExecPluginActivator.INTERIOR_NODE,\n\t\t\t\t\tnew org.osgi.service.dmt.Acl(\"Replace=*\"));\n\n\t\t\tsession.deleteNode(TestExecPluginActivator.INTERIOR_NODE);\n\n\t\t\tTestCase.assertNull(\"This test asserts that the Dmt Admin service synchronizes the ACLs with any change \"\n\t\t\t\t\t\t\t+ \"in the DMT that is made through its service interface\",\n\t\t\t\t\t\t\tsession.getNodeAcl(TestExecPluginActivator.INTERIOR_NODE));\n\t\t} catch (Exception e) {\n\t\t\ttbc.failUnexpectedException(e);\n\t\t} finally {\n\t\t\ttbc.closeSession(session);\n\t\t}\n\t}", "public void testRemove() {\n TaskSeriesCollection c = new TaskSeriesCollection();\n TaskSeries s1 = new TaskSeries(\"S1\");\n c.add(s1);\n c.remove(0);\n c.add(s1);\n boolean pass = false;\n try {\n c.remove(-1);\n } catch (IllegalArgumentException e) {\n pass = true;\n }\n pass = false;\n try {\n c.remove(1);\n } catch (IllegalArgumentException e) {\n pass = true;\n }\n }", "public void testIteratorRemove() {\n SynchronousQueue q = new SynchronousQueue();\n\tIterator it = q.iterator();\n try {\n it.remove();\n shouldThrow();\n }\n catch (IllegalStateException success) {}\n }", "@Test(timeout = 4000)\n public void test58() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n connectionFactories0.getXAQueueConnectionFactory();\n XAConnectionFactory xAConnectionFactory0 = new XAConnectionFactory();\n try { \n connectionFactories0.setXAConnectionFactory(0, xAConnectionFactory0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: 0, Size: 0\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "public void testRemoveAddress() throws Exception {\r\n try {\r\n this.dao.removeAddress(-1, false);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "public void testRemoveOrder() {\n }", "private void ensureCapacity() {\n\t\n\t\tif (elements.length == size) {\n\t\t\tT[] oldElements = elements;\n\t\t\t\n\t\t\telements = (T[]) new Object[2 * elements.length + 1];\n\t\t\t\n\t\t\tSystem.arraycopy(oldElements, 0, elements, 0, size);\n\t\t\n\t\t}\n\t\n\t}", "protected void setUsedRange(int _start, int _end) throws Exception {\n if (_start < 0 || _end >= size || _start > _end) {\n throw new Exception(\"Invalid range! Start must be 0 or larger, end must be \" + \"inside allowed memory range.\");\n }\n\n start = _start;\n end = _end;\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Range range0 = Range.of((-1259L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n range1.getEnd();\n range1.getEnd();\n Range range2 = range0.intersection(range1);\n List<Range> list0 = range2.split(255L);\n range2.complementFrom(list0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range3 = Range.of(range_CoordinateSystem1, (-1259L), 0L);\n range3.endsBefore(range0);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range3);\n List<Range> list1 = range2.complementFrom(list0);\n Range range4 = Range.of(1207L);\n assertFalse(range4.isEmpty());\n \n boolean boolean0 = range2.isSubRangeOf(range3);\n assertTrue(boolean0);\n \n Range.CoordinateSystem range_CoordinateSystem2 = Range.CoordinateSystem.RESIDUE_BASED;\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range2.forEach(consumer0);\n Range.CoordinateSystem range_CoordinateSystem3 = Range.CoordinateSystem.ZERO_BASED;\n range_CoordinateSystem3.toString();\n range0.equals(list1);\n assertSame(range2, range1);\n assertEquals(0, list1.size());\n \n range_CoordinateSystem1.toString();\n long long0 = range0.getEnd();\n assertEquals(255L, long0);\n }", "@Test(timeout = 4000)\n public void test25() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n range_Builder0.copy();\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n range_Builder0.shift(265L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n range0.complementFrom(linkedList0);\n Range range1 = Range.of((-3234L));\n range0.isSubRangeOf(range1);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.complementFrom(linkedList0);\n range1.intersects(range0);\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"TGa_,[\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.TGa_,[\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "public void offerBack(E elem);", "@Test\n public void invalidDeletionTimesHandlingTest()\n {\n DeletionTime dt = DeletionTime.build(1, -1);\n assertFalse(dt.validate());\n\n // use the invalid deletion time for a range tombstone and aggregate it\n RangeTombstoneList rtl = new RangeTombstoneList(null, 1);\n rtl.add(new RangeTombstone(Slice.ALL, dt));\n\n // undo the aggregation and see if the deletion time is still invalid\n dt = rtl.iterator().next().deletionTime();\n assertNotNull(dt);\n assertFalse(dt.validate());\n }", "private void chk() {\n if (clist != null)\n throw new UnsupportedOperationException();\n }", "public void remove(){throw new RuntimeException(\"Removing() is not implemented\");\r\n\t\t}", "private void t3() {\n // write to a super region, read from a subregion: only keep write\n writeProtected();\n readDefault();\n }", "@Test\n public void testAddToWaitList() throws Exception {\n }", "public void doRemove() throws VisADException, RemoteException {\n rangeRings = null;\n super.doRemove();\n }" ]
[ "0.53121024", "0.5306639", "0.5264639", "0.5262026", "0.522958", "0.5223873", "0.52227324", "0.5191627", "0.51833826", "0.51594484", "0.511816", "0.5108623", "0.50976366", "0.50782937", "0.50708306", "0.506787", "0.5056936", "0.5036031", "0.50245416", "0.50239813", "0.50159043", "0.50004923", "0.4986966", "0.49837524", "0.49757275", "0.49709645", "0.4954335", "0.49533263", "0.49533126", "0.49444067", "0.49339193", "0.4914463", "0.49132535", "0.49054456", "0.49044418", "0.48990718", "0.489771", "0.48963314", "0.4895989", "0.48921868", "0.4891099", "0.48905665", "0.4887397", "0.48863834", "0.48861033", "0.48845264", "0.48837668", "0.48739558", "0.4872164", "0.48682746", "0.48663014", "0.48655438", "0.48649606", "0.48649278", "0.48624754", "0.48601687", "0.4858622", "0.48574227", "0.4853303", "0.48500574", "0.48499575", "0.4844598", "0.48435834", "0.48398316", "0.4836875", "0.48367155", "0.48279697", "0.4823145", "0.4820885", "0.4820755", "0.48203105", "0.48127165", "0.48103374", "0.48095426", "0.4803606", "0.47955763", "0.4795293", "0.47943947", "0.47943056", "0.47901365", "0.47896716", "0.478017", "0.47728616", "0.47722897", "0.4769427", "0.47693294", "0.47674042", "0.4766673", "0.47571996", "0.47559088", "0.47553745", "0.47547728", "0.47543007", "0.47517377", "0.47503605", "0.47491765", "0.47472325", "0.4745323", "0.47450158", "0.47447857", "0.47444585" ]
0.0
-1