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
Called when a drawer has settled in a completely open state.
public void onDrawerOpened(View drawerView) { super.onDrawerOpened(drawerView); // Do whatever you want here String name = null; if (((Application) getApplication()).getAuthUser() != null && (name = ((Application) getApplication()).getAuthUser().getName()) != null) { // textViewHeader = (TextView) binding.navigationView.getHeaderView(0).findViewById(R.id.welcome_textview); // textViewHeader = (TextView) binding.welcomeTextview; if (name.contains(" ")) { name = name.substring(0, name.indexOf(" ")); } binding.welcomeTextview.setText(getString(R.string.welcome_user, name)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void onDrawerOpened() {\n\t\t\t\tshowDown();\n\t\t\t}", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n handleEvent_onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerStateChanged(int newState) {\n }", "@Override\n public void onDrawerStateChanged(int newState) {\n }", "@Override\n public void onDrawerStateChanged(int newState) {\n }", "@Override\n public void onDrawerStateChanged(int newState) {\n }", "@Override\n public void onDrawerStateChanged(int newState) {\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n\t\t\tpublic void onDrawerClosed() {\n\t\t\t\tshowUp();\n\t\t\t}", "public void onDrawerClosed(View view) {\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n Log.d(\"Apps Main\", \"Open drawer \");\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerOpened(View drawerView) {\n\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n\n super.onDrawerOpened(drawerView);\n }", "public void onDrawerOpened(View drawerView) {\n\t\t\t\tLog.d(TAG, \"nav drawer opened state\");\n\t\t\t\tgetActionBar().setTitle(drawerTitle);\n\t\t\t\tinvalidateOptionsMenu();// goes to onPrepareOptionsMenu()\n\t\t\t}", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n getActionBar().setTitle(R.string.drawer_open);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "@Override\n\tpublic void onSidebarOpened() {\n\t\tLog.d(TAG, \"opened\");\n\n\t}", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n //getActionBar().setTitle(mDrawerTitle);\n //invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n //getActionBar().setTitle(mDrawerTitle);\n //invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n // getSupportActionBar().setTitle(mDrawerTitle);\n //invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerOpened(View drawerView) {\r\n super.onDrawerOpened(drawerView);\r\n if(!mUserLearnedDrawer){\r\n\r\n mUserLearnedDrawer=true;\r\n Utility utility=new Utility();\r\n utility.writeToSharedPref(getApplicationContext(),KEY_USER_LEARNED_DRAWER,mUserLearnedDrawer+\"\");\r\n }\r\n invalidateOptionsMenu();\r\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n // Do whatever you want here\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n }", "@Override\n boolean onBeforePopDir() {\n int size = mState.stack.size();\n\n if (mDrawer.isPresent()\n && (System.currentTimeMillis() - mDrawerLastFiddled) > DRAWER_NO_FIDDLE_DELAY) {\n // Close drawer if it is open.\n if (mDrawer.isOpen()) {\n mDrawer.setOpen(false);\n mDrawerLastFiddled = System.currentTimeMillis();\n return true;\n }\n\n final Intent intent = getIntent();\n final boolean launchedExternally = intent != null && intent.getData() != null\n && mState.action == State.ACTION_BROWSE;\n\n // Open the Close drawer if it is closed and we're at the top of a root, but only when\n // not launched by another app.\n if (size <= 1 && !launchedExternally) {\n mDrawer.setOpen(true);\n // Remember so we don't just close it again if back is pressed again.\n mDrawerLastFiddled = System.currentTimeMillis();\n return true;\n }\n }\n\n return false;\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n Log.d(TAG, \"onDrawerClosed\");\n }", "public void onTrackingStarted() {\n this.mFalsingManager.onTrackingStarted(!this.mKeyguardStateController.canDismissLockScreen());\n super.onTrackingStarted();\n if (this.mQsFullyExpanded) {\n this.mQsExpandImmediate = true;\n this.mNotificationStackScroller.setShouldShowShelfOnly(true);\n }\n int i = this.mBarState;\n if (i == 1 || i == 2) {\n this.mAffordanceHelper.animateHideLeftRightIcon();\n }\n this.mNotificationStackScroller.onPanelTrackingStarted();\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n\n\n }", "@Override\n public void onDrawerOpened(@NonNull View drawerView) {\n drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);\n }", "@Override\n\tpublic void onSidebarClosed() {\n\t\tLog.d(TAG, \"opened\");\n\t}", "public void onDrawerOpened(View drawerView) {\n\t\t\t\tsuper.onDrawerOpened(drawerView);\n\t\t\t\tgetSupportActionBar().setTitle(\"Munchies\");\n\t\t\t\tinvalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n\t\t\t}", "private void notifyOnOpen() {\n synchronized (globalLock) {\n if (isRunning) {\n onOpen();\n }\n }\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n\n }", "public void onDrawerOpened(View drawerView) {\n if (Build.VERSION.SDK_INT >= 11) {\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n } else {\n //Call it directly on gingerbread.\n onPrepareOptionsMenu(mMenu);\n }\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n invalidateOptionsMenu();\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n getSupportActionBar().setTitle(\"Timesheet\");\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "@Override\n public void onPourWaterRaised() {\n if (theFSM.getCupPlaced()) {\n pouringState = true;\n }\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n getSupportActionBar().setTitle(mDrawerTitle);\n //updateView(5, 99, true);\n }", "public void onDrawerClosed(View drawerView) {\n\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n resumeLocationUpdates();\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n if (actionBar != null) actionBar.setTitle(R.string.choose_to_do_list);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n getSupportActionBar().setTitle(mDrawerTitle);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n getSupportActionBar().setTitle(mDrawerTitle);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "@Override\n\t\t\tpublic void onDrawerClosed() {\n\t\t\t\tlayoutParams = new FrameLayout.LayoutParams(\n\t\t\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);\n\t\t\t\tslidingDrawer.setLayoutParams(layoutParams);\n\t\t\t\tbottomLayout.setVisibility(View.VISIBLE);\n\t\t\t}", "public void onDrawerClosed(View view) {\n getActionBar().setTitle(\"Closed Drawer\");\n }", "private boolean isDrawerOpen() {\n return mDrawerLayout != null && mDrawerLayout.isDrawerOpen(Gravity.LEFT);\n }", "public void onDrawerOpened(View drawerView) {\n supportInvalidateOptionsMenu();\n }", "public void setOnDrawerOpenListener(OnDrawerOpenListener onDrawerOpenListener) {\n/* 201 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void onDrawerOpened(View drawerView) {\n\n super.onDrawerOpened(drawerView);\n\n //change toolbar title to 'Add a feed'\n toolbar.setTitle(getResources().getString(R.string.feedmenu));\n\n //show the add feed menu option\n showAddFeed();\n\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n getSupportActionBar().setTitle(\"Navigation!\");\n //invalidateOptionsMenu();\n //creates call to onPrepareOptionsMenu()\n }", "private void setUpNavigationDrawer() {\n navigationView.setNavigationItemSelectedListener(item -> {\n Fragment nextFragment = findNextFragment(item.getItemId());\n\n if (nextFragment instanceof WalkFragment && areLocationServicesDisabled()) {\n MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this);\n builder.setTitle(R.string.location_services_not_enabled_title);\n builder.setMessage(R.string.location_services_not_enabled_message);\n builder.setPositiveButton(R.string.ok, null);\n\n builder.show();\n } else {\n changeFragment(nextFragment);\n\n item.setChecked(true);\n drawerLayout.closeDrawers();\n setUpNewFragment(item.getTitle(), item.getItemId());\n }\n\n return true;\n });\n }", "public void onDrawerOpened(View drawerView) {\n getActionBar().setTitle(\"Opened Drawer\");\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n getSupportActionBar().setTitle(\"Navigation!\");\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n getSupportActionBar().setTitle(mTitle);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public boolean isOpened(){\n return chestProgressLevel==1;\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n //getActionBar().setTitle(mTitle);\n //invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n //getActionBar().setTitle(mTitle);\n //invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n getSupportActionBar().setTitle(\"Options\");\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "@Override\n\tprotected void on_door_change_state(String door_name, boolean is_open) {\n\n\t}", "public void onDrawerClosed(View view) {\n \tactivity.getSupportActionBar().setTitle(\"Txootx!\");\n \tactivity.invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }" ]
[ "0.70568234", "0.6900242", "0.67305696", "0.67305696", "0.67305696", "0.67305696", "0.6724078", "0.6709021", "0.6709021", "0.6709021", "0.6709021", "0.6584182", "0.6453902", "0.64493465", "0.64493465", "0.64493465", "0.64493465", "0.64493465", "0.64493465", "0.64493465", "0.64493465", "0.64493465", "0.64493465", "0.64493465", "0.6444382", "0.6430915", "0.6397182", "0.63882244", "0.63882244", "0.63882244", "0.63882244", "0.6382032", "0.63776225", "0.63776225", "0.63776225", "0.63672405", "0.63030326", "0.6244085", "0.61973155", "0.61973155", "0.61527634", "0.6143983", "0.6143983", "0.6143495", "0.6143378", "0.6132647", "0.6131298", "0.6131298", "0.6098999", "0.60962284", "0.6088521", "0.60883254", "0.6082044", "0.60579664", "0.6045394", "0.6034715", "0.60335094", "0.60335094", "0.60335094", "0.60335094", "0.60335094", "0.60335094", "0.60335094", "0.60335094", "0.60335094", "0.60335094", "0.60335094", "0.60335094", "0.60335094", "0.60335094", "0.6028434", "0.6019228", "0.60166353", "0.60155725", "0.6011086", "0.59883994", "0.5982353", "0.5974858", "0.59745777", "0.5963618", "0.5963618", "0.59470475", "0.5940289", "0.5932193", "0.59199244", "0.5887101", "0.58663356", "0.58621013", "0.5856579", "0.58498424", "0.58198756", "0.58198756", "0.58198756", "0.5808019", "0.57964367", "0.5782165", "0.5776611", "0.5776611", "0.5749949", "0.5746529", "0.5741598" ]
0.0
-1
Use this to tint the screen
@Override public void onSearchEditOpened() { binding.includeDashboard.viewSearchTint.setVisibility(View.VISIBLE); binding.includeDashboard.viewSearchTint .animate() .alpha(1.0f) .setDuration(300) .setListener(new SimpleAnimationListener()) .start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Color tint(Color c, int tint) {\n int r = c.getRed();\n int g = c.getGreen();\n int b = c.getBlue();\n\n float ftint = tint / 100.0f;\n\n int red = Math.round(ftint * r + (1 - ftint) * 255);\n int green = Math.round(ftint * g + (1 - ftint) * 255);\n int blue = Math.round(ftint * b + (1 - ftint) * 255);\n\n return new Color(red, green, blue);\n }", "private void changeTint(Bitmap bmp, int tint) {\n int outH = bmp.getHeight();\n int outW = bmp.getWidth();\n\n int pixels[] = new int[outW*outH];\n bmp.getPixels(pixels, 0, outW, 0, 0, outW, outH);\n for (int i = 0; i < outW*outH; i++) {\n float[] hsv = new float[3];\n Color.colorToHSV(pixels[i], hsv);\n hsv[0] = tint;\n pixels[i] = Color.HSVToColor(hsv);\n }\n bmp.setPixels(pixels, 0, outW, 0, 0, outW, outH);\n }", "private void tintEffect(int color) {\n EffectFactory factory = effectContext.getFactory();\n effect = factory.createEffect(EffectFactory.EFFECT_TINT);\n effect.setParameter(\"tint\", color);\n effect.apply(textures[0], photoWidth, photoHeight, textures[1]);\n }", "public void renderBitmap(Bitmap bitmap, int x, int y, int tintColor)\n {\n renderBitmap(bitmap, x, y, 1.0f, tintColor);\n }", "protected void doDark() {\r\n\t\talpha = 0.5f;\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}", "@Override\n public void excute() {\n drawable.setColor(color);\n }", "public final void mo39711K() {\n setBackgroundColor(0);\n }", "public void renderBitmap(Bitmap bitmap, int x, int y, float alpha, int tintColor)\n {\n renderBitmap(bitmap, x, y, alpha, 1.0f, tintColor);\n }", "public void Color() {\n\t\t\r\n\t}", "protected void setLightBoxBackground() { Console.setBackground(Console.BLUE); }", "private void grayAndTint(Bitmap bmp, int tint) {\n int outH = bmp.getHeight();\n int outW = bmp.getWidth();\n\n int pixels[] = new int[outW*outH];\n bmp.getPixels(pixels, 0, outW, 0, 0, outW, outH);\n for (int i = 0; i < outW*outH; i++) {\n float[] hsv = new float[3];\n Color.colorToHSV(pixels[i], hsv);\n if (!(hsv[0] < Math.min(360, tint + 30) && hsv[0] > Math.max(0, tint - 30))) {\n int gray = (int) (0.11 * Color.blue(pixels[i]) + 0.3 * Color.red(pixels[i]) + 0.59 * Color.green(pixels[i]));\n pixels[i] = Color.rgb(gray, gray, gray);\n }\n }\n bmp.setPixels(pixels, 0, outW, 0, 0, outW, outH);\n }", "private void applyBackgroundColor() {\r\n\t\tthis.control.setBackground(PromptSupport.getBackground(this.control));\r\n\t}", "private void updateColor() {\n int redShift = red << 16; // red: 0xRR0000 <- 0xRR\n int greenShift = green << 8; // red: 0xGG00 <- 0xGG\n int blueShift = blue; // blue: 0xBB <- 0xBB\n int alphaShift = 0xff << 24; // alpha 0xff000000 <- 0xff // we don't want our color to be transparent.\n int color = alphaShift | redShift | greenShift | blueShift;\n viewColor.setBackgroundColor(color);\n }", "public TicTacToeView(Context context, @Nullable AttributeSet attrs) {\n super(context, attrs);\n\n paintBackground = new Paint();\n paintBackground.setColor(Color.BLACK);\n paintBackground.setStyle(Paint.Style.FILL);\n\n paintLine = new Paint();\n paintLine.setColor(Color.WHITE);\n paintLine.setStyle(Paint.Style.STROKE);\n paintLine.setStrokeWidth(5);\n\n\n paintFont = new Paint();\n paintFont.setColor(Color.WHITE);\n paintFont.setTextSize(60);\n\n bitmapBg = BitmapFactory.decodeResource(getResources(), R.drawable.pretty);\n }", "protected void setPlayerBackground() { Console.setBackground(Console.YELLOW); }", "@Override\r\n\tpublic void howToColor() {\n\t\t\r\n\t}", "protected void setBoxBackground() { Console.setBackground(Console.RED); }", "private void assignTileColor() {\n boolean isLightTile = ((tileCoordinate + tileCoordinate / 8) % 2 == 0);\n setBackground(isLightTile ? LIGHT_TILE_COLOR : DARK_TILE_COLOR);\n }", "private void setUpConfetti() {\n Timber.d(\"setUpConfetti\");\n final Resources res = getResources();\n goldDark = res.getColor(R.color.gold_dark);\n goldMed = res.getColor(R.color.gold_med);\n gold = res.getColor(R.color.gold);\n goldLight = res.getColor(R.color.gold_light);\n colors = new int[]{goldDark, goldMed, gold, goldLight};\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tif(isRecognition) {\n\t\t\t\t\t\t\talpha *= 0.95f;\n//\t\t\t\t\t\t\tsetBackgroundColor((int) (255 * (1 - label) * alpha));\n\t\t\t\t\t\t\ttxtHandParts.setTextColor(Color.argb((int) (alpha * 255), 255,\n\t\t\t\t\t\t\t\t\t255, 255));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(alpha > 0.1f) {\n\t\t\t\t\t\t\t\tLog.d(LOGTAG, (int) (255 * (1 - label) * alpha)+\"\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}", "public void applyTheme(){\n\t\tColor backgroundColour = new Color(255,255,255);\n\t\tColor buttonText = new Color(255,255,255);\n\t\tColor normalText = new Color(0,0,0);\n\t\tColor buttonColour = new Color(15,169,249);\n\n\t\tfirstAttemptResult.setForeground(new Color(255,0,110));\n\t\tsecondAttemptResult.setForeground(new Color(255,0,0));\n\t\t\n\t\t// background color\n\t\tthis.setBackground(backgroundColour);\n\t\t\n\t\t// normal text\n\t\tspellQuery.setForeground(normalText);\n\t\tdefinitionArea.setForeground(normalText);\n\t\tlblstAttempt.setForeground(normalText);\n\t\tlblndAttempt.setForeground(normalText);\n\t\tfirstAttempt.setForeground(normalText);\n\t\tsecondAttempt.setForeground(normalText);\n\t\tcurrentQuiz.setForeground(normalText);\n\t\tcurrentStreak.setForeground(normalText);\n\t\tlongestStreak.setForeground(normalText);\n\t\tnoOfCorrectSpellings.setForeground(normalText);\n\t\tquizAccuracy.setForeground(normalText);\n\t\tlblNewLabel.setForeground(normalText);\n\t\tlblYouOnlyHave.setForeground(normalText);\n\t\tlblCurrentQuiz.setForeground(normalText);\n\t\tlblCurrentStreak.setForeground(normalText);\n\t\tlblLongeststreak.setForeground(normalText);\n\t\tlblSpelledCorrectly.setForeground(normalText);\n\t\tlblQuizAccuracy.setForeground(normalText);\n\t\t\n\t\t// button text\n\t\tbtnConfirmOrNext.setForeground(buttonText);\n\t\tbtnStop.setForeground(buttonText);\n\t\tbtnListenAgain.setForeground(buttonText);\n\t\t// normal button color\n\t\tbtnConfirmOrNext.setBackground(buttonColour);\n\t\tbtnStop.setBackground(buttonColour);\n\t\tbtnListenAgain.setBackground(buttonColour);\n\t}", "@Override \n\tpublic void setNormalColor(){\n\t\tthis.setColor(Color.PINK);\n\t}", "SettingsScreenClass(){\r\n cursorRow=0;\r\n counter=0;\r\n endPart=false;\r\n initSprites();\r\n setImage(512,500);\r\n fadeAmount=12;\r\n for(int i=0;i<12;i++){\r\n fadeColors[i]=new Color(0,0,0,(i)*20);\r\n }\r\n }", "private void m76755g() {\n this.f61635e = new Paint();\n this.f61635e.setAntiAlias(true);\n this.f61635e.setColor(this.f61636f);\n this.f61635e.setStyle(Style.FILL);\n this.f61635e.setStrokeWidth(2.0f);\n }", "void updateTouchPoint(Canvas c) {\n \t c.drawColor(0xff000000); \n }", "public void setColor()\n {\n String PREF_FILE_NAME = \"PrefFile\";\n final SharedPreferences preferences = getSharedPreferences(PREF_FILE_NAME, MODE_PRIVATE);\n\n if(preferences.getBoolean(\"ColorBlind\", false)) {\n View box1 = this.findViewById(R.id.username);\n box1.setBackgroundColor(0xffffffff);\n\n View box2 = this.findViewById(R.id.password);\n box2.setBackgroundColor(0xffffffff);\n\n View box3 = this.findViewById(R.id.Login);\n box3.setBackgroundColor(0xffffffff);\n\n }\n }", "private void tintIcons(BackupAdapter.BackupViewHolder holder) {\n final Context context = holder.deleteButton.getContext();\n final int color;\n\n if (Prefs.INST(context).isLightTheme()) {\n color = R.color.deep_teal_500;\n } else {\n color = R.color.deep_teal_200;\n }\n\n DrawableHelper\n .withContext(context)\n .withColor(color)\n .withDrawable(R.drawable.ic_cloud_download)\n .tint()\n .applyTo(holder.restoreButton);\n\n DrawableHelper\n .withContext(context)\n .withColor(color)\n .withDrawable(R.drawable.ic_cloud_sync)\n .tint()\n .applyTo(holder.syncButton);\n\n DrawableHelper\n .withContext(context)\n .withColor(color)\n .withDrawable(R.drawable.ic_delete_black_24dp)\n .tint()\n .applyTo(holder.deleteButton);\n\n }", "private void applyKitKatTranslucency() {\n\n // KitKat translucent navigation/status bar.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n setTranslucentStatus(true);\n SystemBarTintManager mTintManager = new SystemBarTintManager(this);\n mTintManager.setStatusBarTintEnabled(true);\n mTintManager.setNavigationBarTintEnabled(true);\n // mTintManager.setTintColor(0xF00099CC);\n\n mTintManager.setTintDrawable(UIElementsHelper\n .getGeneralActionBarBackground(this));\n\n getActionBar().setBackgroundDrawable(\n UIElementsHelper.getGeneralActionBarBackground(this));\n\n }\n\n }", "void setColor(){\n this.objectColour = new Color(rValue,gValue,bValue,timeToLive).brighter();\n }", "public void applyColor() {\n\t\tSystem.out.println(\"Yellow\");\n\n\t}", "public void lightPause() {\n stopPawn.setStyle(\"-fx-background-color: RED;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n buildPawn.setStyle(\"-fx-background-color: null\");\n }", "@Override\n public void touchAction() {\n if (!isDisabled()) {\n if (colorAction != null)\n opponentLabel.removeAction(colorAction);\n colorAction = MyActions.getTouchAction(LightBlocksGame.COLOR_FOCUSSED_ACTOR, getColor());\n opponentLabel.addAction(colorAction);\n }\n }", "@Override\n public void drawScreen(int n, int n2) {\n void mouseY;\n void mouseX;\n super.drawScreen((int)mouseX, (int)mouseY);\n float[] hsb = Color.RGBtoHSB(this.setting.getValue().getRed(), this.setting.getValue().getGreen(), this.setting.getValue().getBlue(), null);\n Color color = Color.getHSBColor(hsb[0], Float.intBitsToFloat(Float.floatToIntBits(6.4887953f) ^ 0x7F4FA436), Float.intBitsToFloat(Float.floatToIntBits(4.629535f) ^ 0x7F142527));\n Gui.drawRect((int)this.getX(), (int)this.getY(), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 14), (int)new Color(40, 40, 40).getRGB());\n Gui.drawRect((int)(this.getX() + this.getWidth() - 12), (int)(this.getY() + 2), (int)(this.getX() + this.getWidth() - 2), (int)(this.getY() + 12), (int)this.setting.getValue().getRGB());\n RenderUtils.drawOutline(this.getX() + this.getWidth() - 12, this.getY() + 2, this.getX() + this.getWidth() - 2, this.getY() + 12, Float.intBitsToFloat(Float.floatToIntBits(2.7144578f) ^ 0x7F2DB9AD), new Color(20, 20, 20).getRGB());\n if (this.open) {\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 14), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 28), (int)new Color(40, 40, 40).getRGB());\n float i = Float.intBitsToFloat(Float.floatToIntBits(1.3378998E38f) ^ 0x7EC94E07);\n while (i + Float.intBitsToFloat(Float.floatToIntBits(13.8331995f) ^ 0x7EDD54C9) < Float.intBitsToFloat(Float.floatToIntBits(0.07128618f) ^ 0x7F51FE7D)) {\n RenderUtils.drawRecta((float)(this.getX() + 2) + i, this.getY() + 16, Float.intBitsToFloat(Float.floatToIntBits(7.249331f) ^ 0x7F67FA85), Float.intBitsToFloat(Float.floatToIntBits(1.7045807f) ^ 0x7EEA2FB3), Color.getHSBColor(i / Float.intBitsToFloat(Float.floatToIntBits(0.115068644f) ^ 0x7F2BA91C), Float.intBitsToFloat(Float.floatToIntBits(4.3161592f) ^ 0x7F0A1DFA), Float.intBitsToFloat(Float.floatToIntBits(21.075346f) ^ 0x7E289A4F)).getRGB());\n i += Float.intBitsToFloat(Float.floatToIntBits(3.807338f) ^ 0x7E95CD0B);\n }\n RenderUtils.drawOutline(this.getX() + 2, this.getY() + 16, this.getX() + 2 + this.getWidth() - 4, this.getY() + 27, Float.intBitsToFloat(Float.floatToIntBits(2.7503529f) ^ 0x7F3005C8), new Color(0, 0, 0).getRGB());\n RenderUtils.drawRecta((float)(this.getX() + 2) + this.hueWidth, this.getY() + 16, Float.intBitsToFloat(Float.floatToIntBits(5.200255f) ^ 0x7F26687D), Float.intBitsToFloat(Float.floatToIntBits(1.2665411f) ^ 0x7E921E05), new Color(255, 255, 255).getRGB());\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 28), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 42), (int)new Color(40, 40, 40).getRGB());\n RenderUtils.drawSidewaysGradient(this.getX() + 2, this.getY() + 29, this.getWidth() - 4, Float.intBitsToFloat(Float.floatToIntBits(0.19645536f) ^ 0x7F792B98), new Color(255, 255, 255), color, 255, 255);\n RenderUtils.drawOutline(this.getX() + 2, this.getY() + 29, this.getX() + 2 + this.getWidth() - 4, this.getY() + 40, Float.intBitsToFloat(Float.floatToIntBits(103.69628f) ^ 0x7DCF647F), new Color(0, 0, 0).getRGB());\n RenderUtils.drawRecta((float)(this.getX() + 2) + this.satWidth, this.getY() + 29, Float.intBitsToFloat(Float.floatToIntBits(7.3489017f) ^ 0x7F6B2A34), Float.intBitsToFloat(Float.floatToIntBits(0.1948352f) ^ 0x7F7782E1), new Color(255, 255, 255).getRGB());\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 42), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 56), (int)new Color(40, 40, 40).getRGB());\n RenderUtils.drawSidewaysGradient(this.getX() + 2, this.getY() + 42, this.getWidth() - 4, Float.intBitsToFloat(Float.floatToIntBits(1.5246161f) ^ 0x7EF3269F), new Color(0, 0, 0), color, 255, 255);\n RenderUtils.drawOutline(this.getX() + 2, this.getY() + 42, this.getX() + 2 + this.getWidth() - 4, this.getY() + 53, Float.intBitsToFloat(Float.floatToIntBits(3.7803736f) ^ 0x7F71F1A4), new Color(0, 0, 0).getRGB());\n RenderUtils.drawRecta((float)(this.getX() + 2) + this.briWidth, this.getY() + 42, Float.intBitsToFloat(Float.floatToIntBits(8.346171f) ^ 0x7E8589EB), Float.intBitsToFloat(Float.floatToIntBits(0.08925866f) ^ 0x7C86CD3F), new Color(255, 255, 255).getRGB());\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 56), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 70), (int)new Color(40, 40, 40).getRGB());\n this.renderAlphaBG(this.getX() + 2, this.getY() + 55, this.alphaBG);\n RenderUtils.drawSidewaysGradient(this.getX() + 2, this.getY() + 55, this.getWidth() - 4, Float.intBitsToFloat(Float.floatToIntBits(0.13166903f) ^ 0x7F36D43F), new Color(0, 0, 0), color, 0, 255);\n RenderUtils.drawOutline(this.getX() + 2, this.getY() + 55, this.getX() + 2 + this.getWidth() - 4, this.getY() + 66, Float.intBitsToFloat(Float.floatToIntBits(19.69502f) ^ 0x7E9D8F67), new Color(0, 0, 0).getRGB());\n RenderUtils.drawRecta((float)(this.getX() + 2) + this.alphaWidth, this.getY() + 55, Float.intBitsToFloat(Float.floatToIntBits(6.702013f) ^ 0x7F5676E4), Float.intBitsToFloat(Float.floatToIntBits(0.13652846f) ^ 0x7F3BCE1E), new Color(255, 255, 255).getRGB());\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 70), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 84), (int)new Color(40, 40, 40).getRGB());\n Europa.FONT_MANAGER.drawString(\"Rainbow\", this.getX() + 3, (float)(this.getY() + 78) - Europa.FONT_MANAGER.getHeight() / Float.intBitsToFloat(Float.floatToIntBits(0.8730777f) ^ 0x7F5F8205), Color.WHITE);\n Gui.drawRect((int)(this.getX() + this.getWidth() - 12), (int)(this.getY() + 72), (int)(this.getX() + this.getWidth() - 2), (int)(this.getY() + 82), (int)new Color(30, 30, 30).getRGB());\n if (this.setting.getRainbow().booleanValue()) {\n RenderUtils.prepareGL();\n GL11.glShadeModel((int)7425);\n GL11.glEnable((int)2848);\n GL11.glLineWidth((float)Float.intBitsToFloat(Float.floatToIntBits(0.2713932f) ^ 0x7EAAF40D));\n GL11.glBegin((int)1);\n GL11.glColor3f((float)((float)ModuleColor.getActualColor().getRed() / Float.intBitsToFloat(Float.floatToIntBits(0.015137452f) ^ 0x7F070313)), (float)((float)ModuleColor.getActualColor().getGreen() / Float.intBitsToFloat(Float.floatToIntBits(1.1948546f) ^ 0x7CE7F0FF)), (float)((float)ModuleColor.getActualColor().getBlue() / Float.intBitsToFloat(Float.floatToIntBits(0.36357376f) ^ 0x7DC52657)));\n GL11.glVertex2d((double)(this.getX() + this.getWidth() - 8), (double)(this.getY() + 80));\n GL11.glColor3f((float)((float)ModuleColor.getActualColor().getRed() / Float.intBitsToFloat(Float.floatToIntBits(0.015521388f) ^ 0x7F014D6B)), (float)((float)ModuleColor.getActualColor().getGreen() / Float.intBitsToFloat(Float.floatToIntBits(0.01025841f) ^ 0x7F5712E4)), (float)((float)ModuleColor.getActualColor().getBlue() / Float.intBitsToFloat(Float.floatToIntBits(0.10675689f) ^ 0x7EA5A35B)));\n GL11.glVertex2d((double)(this.getX() + this.getWidth() - 8 + 4), (double)(this.getY() + 74));\n GL11.glEnd();\n GL11.glBegin((int)1);\n GL11.glColor3f((float)((float)ModuleColor.getActualColor().getRed() / Float.intBitsToFloat(Float.floatToIntBits(0.009417259f) ^ 0x7F654AD9)), (float)((float)ModuleColor.getActualColor().getGreen() / Float.intBitsToFloat(Float.floatToIntBits(0.07014828f) ^ 0x7EF0A9E7)), (float)((float)ModuleColor.getActualColor().getBlue() / Float.intBitsToFloat(Float.floatToIntBits(0.013465701f) ^ 0x7F239F3E)));\n GL11.glVertex2d((double)(this.getX() + this.getWidth() - 8), (double)(this.getY() + 80));\n GL11.glColor3f((float)((float)ModuleColor.getActualColor().getRed() / Float.intBitsToFloat(Float.floatToIntBits(0.0155056f) ^ 0x7F010B33)), (float)((float)ModuleColor.getActualColor().getGreen() / Float.intBitsToFloat(Float.floatToIntBits(0.011914493f) ^ 0x7F3C3501)), (float)((float)ModuleColor.getActualColor().getBlue() / Float.intBitsToFloat(Float.floatToIntBits(0.012230922f) ^ 0x7F376434)));\n GL11.glVertex2d((double)(this.getX() + this.getWidth() - 10), (double)(this.getY() + 77));\n GL11.glEnd();\n RenderUtils.releaseGL();\n }\n }\n Gui.drawRect((int)(this.getX() - 1), (int)this.getY(), (int)this.getX(), (int)(this.getY() + 84), (int)new Color(30, 30, 30).getRGB());\n Gui.drawRect((int)(this.getX() + this.getWidth()), (int)this.getY(), (int)(this.getX() + this.getWidth() + 1), (int)(this.getY() + 84), (int)new Color(30, 30, 30).getRGB());\n Europa.FONT_MANAGER.drawString(this.setting.getName(), this.getX() + 3, this.getY() + 3, Color.WHITE);\n }", "public TetrisColors() {\n\t\treset();\t\n\t}", "public void setBg(){\n this.setBackground(color);\n }", "private void setIncognito()\n\t{\n\t\t\teToPower.setBackground (black);\n\t\t\ttwoPower.setBackground (black);\n\t\t\tln.setBackground (black);\n\t\t\txCube.setBackground (black);\n\t\t\txSquare.setBackground (black);\n\t\t\tdel.setBackground (black);\n\t\t\tcubeRoot.setBackground (black);\n\t\t\tC.setBackground (black);\n\t\t\tnegate.setBackground (black);\n\t\t\tsquareRoot.setBackground (black);\n\t\t\tnine.setBackground (black);\n\t\t\teight.setBackground (black);\n\t\t\tseven.setBackground (black);\n\t\t\tsix.setBackground (black);\n\t\t\tfive.setBackground (black);\n\t\t\tfour.setBackground (black);\n\t\t\tthree.setBackground (black);\n\t\t\ttwo.setBackground (black);\n\t\t\tone.setBackground (black);\n\t\t\tzero.setBackground (black);\n\t\t\tdivide.setBackground (black);\n\t\t\tpercent.setBackground (black);\n\t\t\tmultiply.setBackground (black);\n\t\t\treciprocal.setBackground (black);\n\t\t\tadd.setBackground (black);\n\t\t\tsubtract.setBackground (black);\n\t\t\tdecimalPoint.setBackground (black);\n\t\t\tequals.setBackground (black);\n\t\t\te.setBackground (black);\n\t\t\tPI.setBackground (black);\n\t\t\t\n\t\t\teToPower.setForeground (white);\n\t\t\ttwoPower.setForeground (white);\n\t\t\tln.setForeground (white);\n\t\t\txCube.setForeground (white);\n\t\t\txSquare.setForeground (white);\n\t\t\tdel.setForeground (white);\n\t\t\tcubeRoot.setForeground (white);\n\t\t\tC.setForeground (white);\n\t\t\tnegate.setForeground (white);\n\t\t\tsquareRoot.setForeground (white);\n\t\t\tnine.setForeground (white);\n\t\t\teight.setForeground (white);\n\t\t\tseven.setForeground (white);\n\t\t\tsix.setForeground (white);\n\t\t\tfive.setForeground (white);\n\t\t\tfour.setForeground (white);\n\t\t\tthree.setForeground (white);\n\t\t\ttwo.setForeground (white);\n\t\t\tone.setForeground (white);\n\t\t\tzero.setForeground (white);\n\t\t\tdivide.setForeground (white);\n\t\t\tpercent.setForeground (white);\n\t\t\tmultiply.setForeground (white);\n\t\t\treciprocal.setForeground (white);\n\t\t\tadd.setForeground (white);\n\t\t\tsubtract.setForeground (white);\n\t\t\tdecimalPoint.setForeground (white);\n\t\t\tequals.setForeground (white);\n\t\t\te.setForeground (white);\n\t\t\tPI.setForeground (white);\n\t\t\t\t\t\n\t\t\tentry.setBackground (black);\n\t\t\tentry.setForeground(white);\n\n\t\t\tmenuBar.setBackground(black);\n\t\t\tmenuBar.setForeground(white);\n\t\t\tfileMenu.setForeground(white);\n\t\t\thelpMenu.setForeground (white);\n\t\t\ttoolsMenu.setForeground(white);\n\t\t\t\n\t\t\texit.setBackground(black);\n\t\t\tsettings.setBackground(black);\n\t\t\treadme.setBackground(black);\n\t\t\tabout.setBackground(black);\n\t\t\t\t\t\t\n\t\t\texit.setForeground(white);\n\t\t\tsettings.setForeground(white);\n\t\t\treadme.setForeground(white);\n\t\t\tabout.setForeground(white);\n\t}", "int getTint(){\n return getPercentageValue(\"tint\");\n }", "static void changeRed( Tile x ) {\n tiles.get(start).setBackground(white);\n x.setBackground(red);\n start = tiles.indexOf(x);\n }", "public void draw() {\n background(0);\n}", "@Override\n\tpublic void drawForeground(Canvas canvas, int width, int height) {\n\t\t\n\t}", "private void RedWin() {\n for (int row = 0; row < 8; row++) {\n for (int col = 0; col < 9; col++) {\n buttons[row][col].setClickable(false);\n }\n }\n redPoints++;\n Toast redWins = Toast.makeText(this, \"Red Wins!\", Toast.LENGTH_SHORT);\n redWins.setGravity(Gravity.TOP, 0, 200);\n redWins.show();\n updatePoints();\n reset();\n }", "public void setActivingColor(){\n this.setBackground(new Color( 213, 228, 242));\n this.forceupdateUI();\n }", "private void changeUIToDessert() {\n changeHeaderIcon(false);\n ColorHelper.changeViewColor(mScrimView, ContextCompat.getColor(getActivity(), R.color.colorPrimary), ContextCompat.getColor(getActivity(), R.color.secondaryColor));\n mBottomBar.setBackgroundTint(ContextCompat.getColorStateList(getActivity(), R.color.secondaryColor));\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n getActivity().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);\n getActivity().getWindow().setStatusBarColor(ContextCompat.getColor(getActivity(), R.color.secondaryDarkColor));\n }\n }", "private void m1940b(int i) {\n int red = Color.red(i);\n int green = Color.green(i);\n int blue = Color.blue(i);\n this.f2431h.setBackgroundColor(Color.rgb(red, 0, 0));\n this.f2432i.setBackgroundColor(Color.rgb(0, green, 0));\n this.f2433j.setBackgroundColor(Color.rgb(0, 0, blue));\n this.f2431h.setText(String.valueOf(red));\n this.f2432i.setText(String.valueOf(green));\n this.f2433j.setText(String.valueOf(blue));\n }", "private void highlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.RED, new TicksTiming(0), new TicksTiming(0));\r\n\t }", "public Wuziqi(Context context, AttributeSet attrs) {\n super(context, attrs);\n setBackgroundColor(0x44ff0000);\n initPaint();\n }", "void color(){\n Activity.setColor(borderColor);\n ViewAnimator.color(backCircularColorView, \"circularColor\", 0, 500, backCircularColorView.getCircularColor(), textColor);\n ViewAnimator.color(leftCircularColorView, \"circularColor\", 100, 500, leftCircularColorView.getCircularColor(), textColor);\n ViewAnimator.color(rightCircularColorView, \"circularColor\", 200, 500, rightCircularColorView.getCircularColor(), textColor);\n ViewAnimator.color(backCircularColorView, \"borderColor\", 0, 500, backCircularColorView.getCircularColor(), borderColor);\n ViewAnimator.color(leftCircularColorView, \"borderColor\", 100, 500, leftCircularColorView.getCircularColor(), borderColor);\n ViewAnimator.color(rightCircularColorView, \"borderColor\", 200, 500, rightCircularColorView.getCircularColor(), borderColor);\n }", "protected void doBright() {\r\n\t\talpha = 1.0f;\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}", "void invalidatePalette();", "SettingsScreenClass(Dimension dim){\r\n cursorRow=0;\r\n counter=0;\r\n endPart=false;\r\n initSprites();\r\n setImage(dim.width,dim.height);\r\n fadeAmount=12;\r\n for(int i=0;i<12;i++){\r\n fadeColors[i]=new Color(0,0,0,(i)*20);\r\n }\r\n }", "void effacer() {\r\n Graphics g = this.zoneDessin.getGraphics();\r\n g.setColor(Color.gray);\r\n g.fillRect(0, 0, this.getWidth(), this.getHeight());\r\n }", "private void applyForegroundColor() {\r\n\t\tthis.control.setForeground(PromptSupport.getForeground(this.control));\r\n\t}", "public void highlightTile() {\n\t\tclearHighlightTile();\n\t\trectangle.setStrokeType(StrokeType.INSIDE);\n\t\trectangle.setStrokeWidth(2.0);\n\t\trectangle.setStroke(Color.RED);\n\t}", "public Color getScreenBackgroundColor();", "public TankBlue(){\n this.setTankColor(TANK_COLORS.blue);\n this.initializeSoundsFilesMap();\n }", "public void RGB_Change(View view) {\r\n int [] color= {0,0,0};\r\n\r\n adb= new AlertDialog.Builder(this);\r\n adb.setCancelable(false);\r\n adb.setTitle(\"Core Colors Change\");\r\n adb.setItems(colors, new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n color[which]=255;\r\n lL.setBackgroundColor(Color.rgb(color[0],color[1],color[2]));\r\n }\r\n });\r\n adb.setPositiveButton(\"Exit\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n\r\n }\r\n });\r\n AlertDialog ad=adb.create();\r\n ad.show();\r\n }", "private void assignColors() {\n soundQuickStatus.setBackground(drawables[noise]);\n comfortQuickStatus.setBackground(drawables[comfort]);\n lightQuickStatus.setBackground(drawables[light]);\n convenienceQuickStatus.setBackground(drawables[convenience]);\n }", "private void resetIncognito()\n\t{\n\t\teToPower.setBackground (defaultButtonBackground);\n\t\ttwoPower.setBackground (defaultButtonBackground);\n\t\tln.setBackground (defaultButtonBackground);\n\t\txCube.setBackground (defaultButtonBackground);\n\t\txSquare.setBackground (defaultButtonBackground);\n\t\tdel.setBackground (defaultButtonBackground);\n\t\tcubeRoot.setBackground (defaultButtonBackground);\n\t\tC.setBackground (defaultButtonBackground);\n\t\tnegate.setBackground (defaultButtonBackground);\n\t\tsquareRoot.setBackground (defaultButtonBackground);\n\t\tnine.setBackground (defaultButtonBackground);\n\t\teight.setBackground (defaultButtonBackground);\n\t\tseven.setBackground (defaultButtonBackground);\n\t\tsix.setBackground (defaultButtonBackground);\n\t\tfive.setBackground (defaultButtonBackground);\n\t\tfour.setBackground (defaultButtonBackground);\n\t\tthree.setBackground (defaultButtonBackground);\n\t\ttwo.setBackground (defaultButtonBackground);\n\t\tone.setBackground (defaultButtonBackground);\n\t\tzero.setBackground (defaultButtonBackground);\n\t\tdivide.setBackground (defaultButtonBackground);\n\t\tpercent.setBackground (defaultButtonBackground);\n\t\tmultiply.setBackground (defaultButtonBackground);\n\t\treciprocal.setBackground (defaultButtonBackground);\n\t\tadd.setBackground (defaultButtonBackground);\n\t\tsubtract.setBackground (defaultButtonBackground);\n\t\tdecimalPoint.setBackground (defaultButtonBackground);\n\t\tequals.setBackground (defaultButtonBackground);\n\t\te.setBackground (defaultButtonBackground);\n\t\tPI.setBackground (defaultButtonBackground);\n\t\t\n\t\teToPower.setForeground (defaultButtonForeground);\n\t\ttwoPower.setForeground (defaultButtonForeground);\n\t\tln.setForeground (defaultButtonForeground);\n\t\txCube.setForeground (defaultButtonForeground);\n\t\txSquare.setForeground (defaultButtonForeground);\n\t\tdel.setForeground (defaultButtonForeground);\n\t\tcubeRoot.setForeground (defaultButtonForeground);\n\t\tC.setForeground (defaultButtonForeground);\n\t\tnegate.setForeground (defaultButtonForeground);\n\t\tsquareRoot.setForeground (defaultButtonForeground);\n\t\tnine.setForeground (defaultButtonForeground);\n\t\teight.setForeground (defaultButtonForeground);\n\t\tseven.setForeground (defaultButtonForeground);\n\t\tsix.setForeground (defaultButtonForeground);\n\t\tfive.setForeground (defaultButtonForeground);\n\t\tfour.setForeground (defaultButtonForeground);\n\t\tthree.setForeground (defaultButtonForeground);\n\t\ttwo.setForeground (defaultButtonForeground);\n\t\tone.setForeground (defaultButtonForeground);\n\t\tzero.setForeground (defaultButtonForeground);\n\t\tdivide.setForeground (defaultButtonForeground);\n\t\tpercent.setForeground (defaultButtonForeground);\n\t\tmultiply.setForeground (defaultButtonForeground);\n\t\treciprocal.setForeground (defaultButtonForeground);\n\t\tadd.setForeground (defaultButtonForeground);\n\t\tsubtract.setForeground (defaultButtonForeground);\n\t\tdecimalPoint.setForeground (defaultButtonForeground);\n\t\tequals.setForeground (defaultButtonForeground);\n\t\te.setForeground (defaultButtonForeground);\n\t\tPI.setForeground (defaultButtonForeground);\n\t\t\t\t\n\t\tentry.setBackground (white);\n\t\tentry.setForeground(black);\n\n\t\tmenuBar.setBackground(defaultMenuBackground);\n\t\tmenuBar.setForeground(defaultMenuForeground);\n\t\tfileMenu.setForeground(defaultMenuForeground);\n\t\thelpMenu.setForeground (defaultMenuForeground);\n\t\ttoolsMenu.setForeground(defaultMenuForeground);\n\t\t\t\t\n\t\texit.setBackground(defaultButtonBackground);\n\t\tsettings.setBackground(defaultButtonBackground);\n\t\treadme.setBackground(defaultButtonBackground);\n\t\tabout.setBackground(defaultButtonBackground);\n\t\t\t\t\n\t\texit.setForeground(defaultMenuForeground);\n\t\tsettings.setForeground(defaultMenuForeground);\n\t\treadme.setForeground(defaultMenuForeground);\n\t\tabout.setForeground(defaultMenuForeground);\n\t}", "public void draw(Batch batch, float parentAlpha) \n {\n // create a drop shadow effect:\n // set tint color to translucent black\n batch.setColor(0,0,0, 0.5f);\n \n // ranges from 1.00 to 1.25\n float scale = this.getScaleX();\n \n // ranges from 0 to 1\n float percent = 4 * scale - 4;\n \n batch.draw(animation.getKeyFrame(elapsedTime), \n getX() + 10 * percent, getY() - 10 * percent, getOriginX(), getOriginY(),\n getWidth(), getHeight(), getScaleX(), getScaleY(), getRotation());\n \n super.draw(batch, parentAlpha);\n \n /*\n Color c = getColor(); // used to apply tint color effect\n \n batch.setColor(c.r, c.g, c.b, c.a);\n \n if (animation != null && isVisible())\n batch.draw(animation.getKeyFrame(elapsedTime), \n getX(), getY(), getOriginX(), getOriginY(),\n getWidth(), getHeight(), getScaleX(), getScaleY(), getRotation());\n */\n }", "void rainbow(int width);", "public void update(){\n y -= 1; // Making the text float up\n // Making the text more transparent\n color = new Color(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha() - 2);\n }", "public void resetColor(){\n myRectangle.setFill(PADDLE_COLOR);\n }", "public abstract View getBlackBackground();", "private void setType(int t) {\n\t\ttype = t;\n\t\tfloat f;\n\t\tswitch (t) {\n\t\t\tcase 21:\n\t\t\t\tf = 18F;\n\t\t\t\tthis.setForeground(Color.white);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tf = 24F;\n\t\t\t\tbreak;\n\t\t}\n\t\tfont = font.deriveFont(f);\n\t\tthis.setFont(font);\n\t}", "public void screenShot() {\n\n\t}", "public void modeColor(Graphics2D g2d) { g2d.setColor(RTColorManager.getColor(\"label\", \"default\")); }", "private void m116772S() {\n if (isViewValid() && this.f94525K != null && this.f94531Q != null) {\n if (!this.f94531Q.isSecret() && this.f94531Q.nicknameUpdateReminder()) {\n String str = \" T\";\n SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();\n spannableStringBuilder.append(this.f94525K.getText());\n spannableStringBuilder.append(str);\n spannableStringBuilder.setSpan(new C36728am(getContext(), R.drawable.a6w, 1), (spannableStringBuilder.length() - str.length()) + 1, spannableStringBuilder.length(), 17);\n this.f94525K.setText(spannableStringBuilder);\n if (ProfileNewStyleExperiment.INSTANCE.getUSE_T_NEW()) {\n this.f94525K.setTextColor(getResources().getColor(R.color.ab0));\n } else {\n this.f94525K.setTextColor(getResources().getColor(R.color.ac9));\n }\n } else if (ProfileNewStyleExperiment.INSTANCE.getUSE_T_NEW()) {\n this.f94525K.setTextColor(getResources().getColor(R.color.ab0));\n } else {\n this.f94525K.setTextColor(getResources().getColor(R.color.ac8));\n }\n }\n }", "private void updateBackground() {\n \t\t\t\ttextRed.setText(\"\" + redBar.getProgress());\n \t\t\t\ttextGreen.setText(\"\" + greenBar.getProgress());\n \t\t\t\ttextBlue.setText(\"\" + blueBar.getProgress());\n \t\t\t\ttextAlpha.setText(\"\" + alphaBar.getProgress());\n \t\t\t\tcolorTest.setBackgroundColor(Color.argb(alphaBar.getProgress(), redBar.getProgress(), greenBar.getProgress(), blueBar.getProgress()));\n \t\t\t}", "public void wipe(){\n\t \tg2d.setColor(Color.yellow);\n g2d.fillRect(0,0, width, height);\n\t\t\n\n\t }", "@Override\n\tpublic void Red() {\n\t\tSystem.out.println(\"Red Light\");\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制五角形\");\n\t}", "private void yellow(){\n\t\tthis.arretes_fY();\n\t\tthis.coins_fY();\n\t\tthis.coins_a1Y();\n\t\tthis.coins_a2Y();\n\t\tthis.aretes_aY();\n\t\tthis.cube[49] = \"Y\";\n\t}", "public void magenta() {\n g2.setPaint(Color.magenta);\r\n }", "public void setFrameBackgroundColor(int i2) {\n this.n.setColor(i2);\n }", "void paintViews() {\n\n //Paint the back button in white\n int paintColour = android.graphics.Color.rgb(253, 195, 204);\n Drawable d = VectorDrawableCompat.create(getResources(), R.drawable.kids_ui_back_anim, null);\n d = DrawableCompat.wrap(d);\n DrawableCompat.setTint(d, paintColour);\n back.setImageDrawable(d);\n }", "public static void makeBackgroundGray(){\r\n\t\tStdDraw.clear(StdDraw.LIGHT_GRAY);\r\n\t}", "public void setColor( int c ){//1 means black, 0 means white\r\n\t\tif(c==1)\r\n\t\t\tthis.setBackground(Color.BLACK);\r\n\t\telse\r\n\t\t\tthis.setBackground(Color.WHITE);\r\n\t}", "@Override\n\tpublic void init() {\n this.setColor(Color.PINK);\n \n\t}", "@Override\r\n\tpublic void renderBackground() {\n\r\n\t}", "static void reset() {\n for( Tile x : tiles ) {\n x.setBackground(white);\n }\n tiles.get(0).setBackground(red);\n start = 0;\n flag = 0;\n }", "protected void doMoreLight() {\r\n\t\talpha = Math.min(1f, alpha + 0.05f);;\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}", "public abstract void setCurBackground(Color colr);", "private void unhighlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.BLACK, new TicksTiming(0), new TicksTiming(0));\r\n\r\n\t }", "public void modCasella(Tauler t){\n if(valor != -1){\n this.setBackground(Color.RED);\n valor = -1;\n t.subMov();\n }\n else{\n valor = 0;\n this.setBackground(color);\n t.addMov();\n }\n }", "public void onColorsRotate() {\n if (this.screenType == 2) {\n this.backgroundRotation += 45;\n while (true) {\n int i = this.backgroundRotation;\n if (i >= 360) {\n this.backgroundRotation = i - 360;\n } else {\n setBackgroundColor(this.backgroundColor, 0, true, true);\n return;\n }\n }\n } else {\n this.accent.backgroundRotation += 45;\n while (true) {\n Theme.ThemeAccent themeAccent = this.accent;\n int i2 = themeAccent.backgroundRotation;\n if (i2 >= 360) {\n themeAccent.backgroundRotation = i2 - 360;\n } else {\n Theme.refreshThemeColors();\n return;\n }\n }\n }\n }", "public native int[] tintImage(\n int[] image, int length, int rTint, int gTint, int bTint )\n throws ImageSizeException;", "private void m119425d() {\n this.mSystemBar.setBackgroundColor(0);\n setSystemBarDisplayHomeAsUp();\n setSystemBarElevation(0.0f);\n setSystemBarTitleColor(ContextCompat.getColor(getActivity(), 17170445));\n setSystemBarIconColor(ContextCompat.getColor(getContext(), R.color.white));\n }", "@Override\r\n\tpublic void paintComponent(Graphics g)\r\n {\r\n\t\tsuper.paintComponent(g);\r\n\t\tg.setColor(getForeground());\r\n\t\tg.fillOval(0,0, this.getWidth(),this.getHeight());\r\n }", "@Override\n\t\tpublic void render()\n\t\t{\n\t\t\tif(color.alpha() > 0)\n\t\t\t{\n\t\t\t\tbind();\n\t\t\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, 0);\n\t\t\t\tGL11.glBegin(GL11.GL_TRIANGLE_STRIP);\n\t\t\t\t\tfloat screenWidth = WindowManager.controller().width();\n\t\t\t\t\tfloat screenHeight = WindowManager.controller().height();\n\t\t\t\t\tGL11.glVertex2f(0, 0);\n\t\t\t\t\tGL11.glVertex2f(screenWidth, 0);\n\t\t\t\t\tGL11.glVertex2f(0, screenHeight);\n\t\t\t\t\tGL11.glVertex2f(screenWidth, screenHeight);\n\t\t\t\tGL11.glEnd();\n\t\t\t\trelease();\n\t\t\t}\n\t\t}", "public void render() {\n\t\tscreen.background(255);\n\t\thandler.render();\n\t}", "protected void setTranslucentStatus(boolean on) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n Window win = getWindow();\n WindowManager.LayoutParams winParams = win.getAttributes();\n final int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;\n if (on) {\n winParams.flags |= bits;\n } else {\n winParams.flags &= ~bits;\n }\n win.setAttributes(winParams);\n }\n }", "public void battleMode() {\n\t\tif (!inBattle) {\n\t\t\tinBattle = true;\n\t\t\tJPanel thisPanel = this;\n\n\t\t\tnew Timer(3, new ActionListener() {\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tred -= 1;\n\t\t\t\t\tgreen -= 1;\n\t\t\t\t\tblue -= 1;\n\n\t\t\t\t\tthisPanel.setBackground(new Color(red, green, blue));\n\n\t\t\t\t\tif (red == 0) {\n\t\t\t\t\t\t((Timer) e.getSource()).stop();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}).start();\n\n\t\t}\n\t}", "private void red(){\n\t\tthis.arretes_fR();\n\t\tthis.coins_fR();\n\t\tthis.coins_a1R();\n\t\tthis.coins_a2R();\n\t\tthis.aretes_aR();\n\t\tthis.cube[13] = \"R\";\n\t}", "@Override\n public void draw(Canvas canvas) {\n System.out.println(\"TintedDrawable.draw state=\" + Arrays.toString(getState()));\n patternDrawable.draw(canvas);\n }", "public void black() {\n g2.setPaint(Color.black);\r\n }", "private void setBrushSettings(){\n touchArea.setRadius(brushSize);\n touchArea.setColor(brushColor);\n touchArea.setBackgroundColor(backgroundColor);\n }", "public void red() {\n g2.setPaint(Color.red);\r\n }", "private void setBgColor(Color c)\n\t{\n\t\teToPower.setBackground (c);\n\t\ttwoPower.setBackground (c);\n\t\tln.setBackground (c);\n\t\txCube.setBackground (c);\n\t\txSquare.setBackground (c);\n\t\tdel.setBackground (c);\n\t\tcubeRoot.setBackground (c);\n\t\tC.setBackground (c);\n\t\tnegate.setBackground (c);\n\t\tsquareRoot.setBackground (c);\n\t\tnine.setBackground (c);\n\t\teight.setBackground (c);\n\t\tseven.setBackground (c);\n\t\tsix.setBackground (c);\n\t\tfive.setBackground (c);\n\t\tfour.setBackground (c);\n\t\tthree.setBackground (c);\n\t\ttwo.setBackground (c);\n\t\tone.setBackground (c);\n\t\tzero.setBackground (c);\n\t\tdivide.setBackground (c);\n\t\tpercent.setBackground (c);\n\t\tmultiply.setBackground (c);\n\t\treciprocal.setBackground (c);\n\t\tadd.setBackground (c);\n\t\tsubtract.setBackground (c);\n\t\tdecimalPoint.setBackground (c);\n\t\tequals.setBackground (c);\n\t\te.setBackground (c);\n\t\tPI.setBackground (c);\n\t\tentry.setBackground (c);\n\t\t\n\t\tmenuBar.setBackground (c);\n\t\tfileMenu.setBackground (c);\n\t\ttoolsMenu.setBackground (c);\n\t\thelpMenu.setBackground (c);\n\t\t\n\t\texit.setBackground (c);\n\t\tsettings.setBackground (c);\n\t\tabout.setBackground (c);\n\t\treadme.setBackground (c);\n\t}", "public abstract void setBackgroundPressed(final int rgba);", "@Override\r\n\tpublic void howToColor() {\r\n\t\tSystem.out.println(\"Color all sides of the rectangle.\");\r\n\t}", "public abstract void setForegroundPressed(final int rgba);" ]
[ "0.6406383", "0.6318677", "0.6304598", "0.5925799", "0.58522534", "0.5837569", "0.57964355", "0.5753808", "0.57455254", "0.5712632", "0.5691065", "0.5687301", "0.56519973", "0.5577173", "0.5537383", "0.5510196", "0.5441591", "0.5434048", "0.5416712", "0.53796506", "0.5355329", "0.53537303", "0.53437907", "0.5343282", "0.53403676", "0.5339569", "0.533953", "0.5338477", "0.52627474", "0.52612287", "0.52427524", "0.52269673", "0.5225659", "0.5218916", "0.52178395", "0.5211448", "0.5204608", "0.52044123", "0.52010626", "0.52007073", "0.51889795", "0.51798594", "0.51710767", "0.5169164", "0.51614004", "0.5160832", "0.5158545", "0.5154365", "0.5152168", "0.5148655", "0.51403475", "0.51306987", "0.5123966", "0.5120532", "0.51159024", "0.51153374", "0.5105678", "0.51041853", "0.50881875", "0.50863206", "0.50809985", "0.50681525", "0.50562197", "0.50425255", "0.5041809", "0.5041497", "0.50392735", "0.5029301", "0.50277525", "0.5026018", "0.5024259", "0.50220793", "0.501856", "0.5012215", "0.50094986", "0.5009288", "0.49995822", "0.49947774", "0.49931508", "0.49843445", "0.49841607", "0.49836078", "0.49826777", "0.4981678", "0.4976067", "0.49730742", "0.4971299", "0.49687928", "0.4959987", "0.49585053", "0.49535865", "0.49500233", "0.49486786", "0.49393058", "0.49388027", "0.4937373", "0.49370852", "0.49323758", "0.492432", "0.49235553", "0.49233872" ]
0.0
-1
System.out.println("sdkbvhasaassdhbv " + currentSongTime);
@Override public void onSuccess(Object result, List params) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPlayTime();", "public int getPlayStartTime() { return _playStartTime; }", "@Override\n\tpublic long getPlaytime() {\n\t\treturn this.playTime;\n\t}", "Double currentTime() {\n return execute(\"player.currentTime\");\n }", "public String toString() { \r\n\t return \"{Song = Title: \" + title + \", Artist: \" + artist + \", Song length: \" + minutes + \":\" + seconds + \"}\";\r\n\t}", "void currentTime(double timeInSeconds) {\n execute(\"player.currentTime = \" + timeInSeconds);\n }", "public void play() { \r\n\t System.out.printf(\"Playing Song: artist=%-20s title=%s\\n\", artist, title);\r\n\t}", "public double getCurrentTime() {\n if (music == null) {\n return -1;\n }\n \n double currentTime = music.getCurrentTime();\n \n // Returns the next start time so that even if music isn't playing, the line still renders\n if (currentTime == -1) {\n return nextStartTime;\n }\n \n return currentTime;\n }", "public long getCurrentPlayTime() {\n/* 284 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\tpublic void play() {\n\t\tSystem.out.println(\"We played Snokker today\");\n\t\t\n\t\t\n\t}", "public int getTime() { return _time; }", "public String startTime(){\r\n\t\treturn startTime;\r\n\t}", "public String getCurrentTime() {\n return currentTime;\n }", "public double getTime() {return _time;}", "public String getTime(){\n return time;\n }", "private long now() {\n\treturn System.currentTimeMillis();\n }", "int getTimesPlayed (String song_id);", "private String getPlayTimeString() {\n double fltPlayPositionInFrames = (fltPlayPercent/100.0f) * lngTimelineDataAmountInRmsFrames;\n double fltTime = (double)(fltPlayPositionInFrames * fltRmsFramePeriodInMs)/1000.0f;\n return new DecimalFormat(\"000.00\").format(fltTime); // String.format(\"%3.1f\", fltTime);\n }", "public java.lang.String getTimeStamp(){\r\n return localTimeStamp;\r\n }", "@Override\r\n\tprotected String play() \r\n\t{\r\n\t\treturn \"The \" + this.getClass().getSimpleName() + \" Class.\" + \"\\n\" + this.getName() + \" is up!\";\r\n//\t\tSystem.out.println( \"The \" + this.getClass().getSimpleName() + \" Class.\");\r\n//\t\tSystem.out.println( this.getName() + \" is up!\" );\t\r\n\t}", "@Override\n\tpublic String getTime() {\n\t\treturn time;\n\t}", "private int getCurrentSong() {\n return currentSong;\n }", "public String printSongInOneLine(){\n\t\tString str = aTitle +\n\t\t\t\t\" - \" +\n\t\t\t\taArtist +\n\t\t\t\t\" - \" +\n\t\t\t\taTime;\n\t\tSet<String> customTagKeys = aCustomTags.keySet();\n\t\tif(customTagKeys.size()!=0){\n\t\t\tfor(String key:customTagKeys){\n\t\t\t\tstr += \" - \" + key + \":\"+ aCustomTags.get(key);\n\t\t\t}\n\t\t}\n\t\treturn str;\n\t}", "public void printClock() {\n\t\tSystem.out.println(this);\n\t}", "public String getBeginTime() {\n/* 28 */ return this.beginTime;\n/* */ }", "@Override\r\n\tpublic void showDoTimeMessage(Player player) {\n\t}", "int time()\n\t{\n\t\treturn totalTick;\n\t}", "public double getTime() { return time; }", "private void showTime()\n {\n showText(\"Time: \" + time, 700, 25);\n }", "public String getTime() {\n String show = time;\n return show;\n }", "private void UpdateTimeSong()\n {\n final Handler handler= new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n SimpleDateFormat dinhdanggio= new SimpleDateFormat(\"mm:ss\");\n txtTimeSong.setText(dinhdanggio.format(mediaPlayer.getCurrentPosition()));\n skSong.setProgress(mediaPlayer.getCurrentPosition());\n handler.postDelayed(this,500);\n }\n },100);\n }", "private void printTimer() {\n\t\tif (_verbose) {\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"-- \" + getTimeString() + \" --\");\n\t\t}\n\t}", "public long getLastTimePlayed()\n {\n return lastTimePlayed;\n }", "public static void main(String[] args) {\n\n String time =\"16:49:40\".substring(0,2);\n System.out.println(time);\n\n }", "public double getCurrentTime() {\n\t\treturn currentTime;\n\t}", "private static double pythonTime() {\n return System.currentTimeMillis() / 1000;\n }", "String getCurTime();", "long time() {\r\n\t\treturn System.currentTimeMillis();\r\n\t}", "public void play() {\n\t\tSystem.out.println(\"playing \"+title+\" by \" +artist);\n\t}", "public String getTime() {\n return time;\n }", "public long getTime(){\n return this.time;\n }", "public String getBeginTime(){return beginTime;}", "public String toString() {\n return songLine;\n }", "public void play() {\n\t\tSystem.out.println(\"playing \"+title);\r\n\t}", "@Override\n public long getTime() {\n return time;\n }", "public String toString() {\n String songOutput =\n \"Song name: \" + name + \"; Artist: \" + artist.getName() + \"; Time played: \" +\n timesPlayed + \"; Running time: \" + runningTime;\n return songOutput;\n }", "public String getTime() {\r\n\t\treturn time;\r\n\t}", "public void displaySongInfo() {\n\t\tSystem.out.println(\"Track number: \" + this.trackNumber + \"\\n\");\n\t\tSystem.out.println(\"Title: \" + this.songTitle + \"\\n\");\n\t\tSystem.out.println(\"Composer_Name: \" + this.composerName + \"\\n\");\n\t\tSystem.out.println(\"Voices: \" + this.voiceMap.keySet() + \"\\n\");\n\t\tSystem.out.println(\"Meter: \" + this.meter + \"\\n\");\n\t\tSystem.out.println(\"Default note length: \" + this.Length_Default + \"\\n\");\n\t\tSystem.out.println(\"Tempo: \" + this.tempo + \"\\n\");\n\t\tSystem.out.println(\"Key signature: \" + this.key + \"\\n\");\n\t}", "private static String currentTimestamp()\r\n {\n \r\n long currentTime = System.currentTimeMillis();\r\n sCalendar.setTime(new Date(currentTime));\r\n \r\n String str = \"\";\r\n str += sCalendar.get(Calendar.YEAR) + \"-\";\r\n \r\n final int month = sCalendar.get(Calendar.MONTH) + 1;\r\n if (month < 10)\r\n {\r\n str += 0;\r\n }\r\n str += month + \"-\";\r\n \r\n final int day = sCalendar.get(Calendar.DAY_OF_MONTH);\r\n if (day < 10)\r\n {\r\n str += 0;\r\n }\r\n str += day;\r\n \r\n str += \"T\";\r\n \r\n final int hour = sCalendar.get(Calendar.HOUR_OF_DAY);\r\n if (hour < 10)\r\n {\r\n str += 0;\r\n }\r\n str += hour + \":\";\r\n \r\n final int minute = sCalendar.get(Calendar.MINUTE);\r\n if (minute < 10)\r\n {\r\n str += 0;\r\n }\r\n str += minute + \":\";\r\n \r\n final int second = sCalendar.get(Calendar.SECOND);\r\n if (second < 10)\r\n {\r\n str += 0;\r\n }\r\n str += second + \".\";\r\n \r\n final int milli = sCalendar.get(Calendar.MILLISECOND);\r\n str += milli;\r\n \r\n str += \"Z\";\r\n \r\n return str;\r\n }", "public String getEndTime() {\n/* 34 */ return this.endTime;\n/* */ }", "private void showTime(){\r\n System.out.println(df.format(getHours()) + \":\" + df.format(getMinutes()+ \"\\n\"));\r\n }", "public String getTime() {\n\t\treturn time;\n\t}", "public double showHarvestTime(){\r\n\t\tSystem.out.println(\"The average harvest time is \" + averageHarvestTime + \" \" + timeUnit);\r\n\t\treturn averageHarvestTime;}", "@Override\n\tpublic void nowPlaying() {\n\t}", "public long getTime() {\r\n \treturn time;\r\n }", "public long getTotalTime() {\n/* 73 */ return this.totalTime;\n/* */ }", "public String getTime_start() {\n return time_start;\n }", "public String getTime() {\n return this.time;\n }", "public synchronized String getTime() {\n\t\treturn time;\n\t}", "public float getCurrentTime()\n\t{\n\t\treturn currentTime;\n\t}", "public void trackTime()\n {\n frames += 1;\n\n // Every second (roughly) reduce the time left\n if (frames % 60 == 0)\n {\n time += 1;\n showTime();\n }\n }", "public int getTime() {\r\n return time;\r\n }", "public long getStartTime ()\r\n {\r\n return startTime;\r\n }", "public String getTime(){\r\n String time = \"\";\r\n return time;\r\n }", "@Override\n\tpublic long currentTimeMillis() {\n\t\treturn this.currentTime;\n\t}", "public String getTime() {\n\t}", "private String msg3() {\n return(\"[\" + (System.currentTimeMillis() - system_start_time) + \"] \");\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "long getCurrentTimeMs() {\n return System.currentTimeMillis();\n }", "@Override\n public void printDetails() {\n super.printDetails(); // uses its superclass version of the method to print the basic attributes\n System.out.print(\"Time: \" + this.getTime()); // printing the time of the event\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "long getCurrentTimeMs();", "public java.lang.String getTime () {\n\t\treturn time;\n\t}", "public void showInfo() {\n System.out.println(\"Showtime ID \" + showtimeID + \", Movie title: \" + movieTitle + \", Datetime: \" + dateTime.get(Calendar.YEAR) + \" \" + (dateTime.get(Calendar.MONTH) + 1) + \" \" + dateTime.get(Calendar.DATE) + \" \" + dateTime.get(Calendar.HOUR_OF_DAY) + \" \" + dateTime.get(Calendar.MINUTE));\n }", "public java.lang.String getPlayTime() {\n java.lang.Object ref = playTime_;\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 playTime_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public void play() {\n\t\tSystem.out.println(\"ting.. ting...\");\n\t}", "public String getLastPlayed() {\n\t\treturn levelRunning;\n\t}", "private String currentTime()\t{\n\t\tCalendar c = Calendar.getInstance(); \n\n\t\tString seconds;\n\t\tif(c.get(Calendar.SECOND) < 10)\t{\n\t\t\tseconds = \"0\"+Integer.toString(c.get(Calendar.SECOND));\n\t\t} else {\n\t\t\tseconds = Integer.toString(c.get(Calendar.SECOND));\n\t\t}\n\n\t\tString minutes;\n\t\tif(c.get(Calendar.MINUTE) < 10)\t{\n\t\t\tminutes = \"0\"+Integer.toString(c.get(Calendar.MINUTE));\n\t\t} else {\n\t\t\tminutes = Integer.toString(c.get(Calendar.MINUTE));\n\t\t}\n\n\t\tString hours;\n\t\tif(c.get(Calendar.HOUR_OF_DAY) < 10)\t{\n\t\t\thours = \"0\"+Integer.toString(c.get(Calendar.HOUR_OF_DAY));\n\t\t} else {\n\t\t\thours = Integer.toString(c.get(Calendar.HOUR_OF_DAY));\n\t\t}\n\n\t\tString day;\n\t\tif(c.get(Calendar.DATE) < 10)\t{\n\t\t\tday = \"0\"+Integer.toString(c.get(Calendar.DATE));\n\t\t} else {\n\t\t\tday = Integer.toString(c.get(Calendar.DATE));\n\t\t}\n\n\t\tString month;\n\t\tif((c.get(Calendar.MONTH)+1) < 10)\t{\n\t\t\tmonth = \"0\"+Integer.toString(c.get(Calendar.MONTH)+1);\n\t\t} else {\n\t\t\tmonth = Integer.toString(c.get(Calendar.MONTH)+1);\n\t\t}\n\n\t\tString year;\n\t\tif(c.get(Calendar.YEAR) < 10)\t{\n\t\t\tyear = \"0\"+Integer.toString(c.get(Calendar.YEAR));\n\t\t} else {\n\t\t\tyear = Integer.toString(c.get(Calendar.YEAR));\n\t\t}\n\n\t\treturn day+\"/\"+month+\"/\"+year + \" \"+hours+\":\"+minutes+\":\"+seconds;\t\n\t}", "@Override\r\n public String speak() {\r\n String word = \"\";\r\n Time.getInstance().time += 1;\r\n if (Time.getInstance().time == 1) {\r\n word = \"One day Neznaika decided to become an artist.\";\r\n }\r\n if (Time.getInstance().time == 101) {\r\n word = \"This story happened once day with Neznaika.\";\r\n }\r\n if (Time.getInstance().time == 201) {\r\n word = \"One day Neznaika wanted to become a musician.\";\r\n }\r\n if (Time.getInstance().time == 401) {\r\n word = \"One day Neznaika wanted to become a poet.\";\r\n }\r\n System.out.println(word);\r\n return word;\r\n }", "private long CurrentTime(){\n return (TotalRunTime + System.nanoTime() - StartTime)/1000000;\n }", "public long getCurrentTime() {\n return currentTime;\n }", "public void time(){\n\t\tif(paused){\n\t\t\tpaused = false;\n\t\t\tmusic.play();\n\t\t\tstart = System.nanoTime();\n\t\t} else {\n\t\t\telasped += System.nanoTime() - start;\n\t\t\tstart = System.nanoTime();\n\t\t}\n\t\ttime = (double) elasped/ (double) 1000000000l;\n\t\t//System.out.println(time);\n\t}", "protected void rememberCurTime(String varName)\n\t{\n\t\ttext(\"long \").text(varName).text(\" = System.currentTimeMillis()\").endCodeLine();\n\t}", "public long getTimeGameStarted() {\n \t\treturn timeGameStarted;\n \t}", "@SimpleFunction(description = \"Gets the current time.\"\n + \"It is formatted correctly for iSENSE\")\n public String GetTime() {\n Calendar cal = Calendar.getInstance();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZ\");\n return sdf.format(cal.getTime()).toString();\n }", "double getClientTime();", "public void printDetails() {\r\n\t\tSystem.out.println(\" \");\r\n\t\tSystem.out.println(showtimeId + \" \" + movie.getTitle() + \" starts at \" + startTime.toString());\r\n\t}", "public static String getTimeStamp() {\r\n\r\n\t\tlong now = (System.currentTimeMillis() - startTime) / 1000;\r\n\r\n\t\tlong hours = (now / (60 * 60)) % 24;\r\n\t\tnow -= (hours / (60 * 60)) % 24;\r\n\r\n\t\tlong minutes = (now / 60) % 60;\r\n\t\tnow -= (minutes / 60) % 60;\r\n\r\n\t\tlong seconds = now % 60;\r\n\r\n\t return String.format(\"%02d:%02d:%02d\", hours, minutes, seconds);\r\n\t}", "long getStartTime() {\n return startTime;\n }", "int getTime();", "int getTime();", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public double getTime() {\n return this.time;\n }", "public java.lang.String getPlayTime() {\n java.lang.Object ref = playTime_;\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 playTime_ = s;\n return s;\n }\n }", "private void printTimer(){\n\t\tFrame++;\n\t\tif(isFrame()){\n\t\t\tSystem.out.println(Frame + \" updates/frames in the \" + second + \"th second\");\n\t\t\tsecond++;\n\t\t\tFrame=1;\n\t\t}\n\t}", "public double time()\n\t{\n\t\treturn _dblTime;\n\t}" ]
[ "0.7309105", "0.69430566", "0.68240047", "0.6718005", "0.66617775", "0.64811844", "0.64745647", "0.64311427", "0.63357264", "0.6326765", "0.63150334", "0.6295408", "0.6275911", "0.6256394", "0.62456036", "0.62436676", "0.6222838", "0.62178695", "0.62006974", "0.6187166", "0.61797005", "0.6175482", "0.61591446", "0.61569625", "0.61519", "0.611453", "0.6112363", "0.6109115", "0.6101297", "0.6073707", "0.6070697", "0.60535973", "0.6021403", "0.6014371", "0.60141987", "0.6011377", "0.600165", "0.59980834", "0.5994265", "0.59891176", "0.5978068", "0.5965481", "0.5954108", "0.595203", "0.59319574", "0.5928967", "0.59284675", "0.5923065", "0.5919388", "0.5918327", "0.5917955", "0.59102917", "0.59090793", "0.5907835", "0.5899253", "0.58990324", "0.58974904", "0.5883004", "0.5881775", "0.58758634", "0.5873688", "0.5868406", "0.58626384", "0.58575743", "0.5856725", "0.5856547", "0.5852117", "0.58432543", "0.58432543", "0.58432543", "0.58424187", "0.5832717", "0.58315796", "0.58315796", "0.58315796", "0.58234113", "0.58182", "0.58173007", "0.5811895", "0.58097184", "0.58069646", "0.5802252", "0.58007777", "0.57936555", "0.5792644", "0.5779213", "0.5773213", "0.577294", "0.57720804", "0.57711554", "0.57686853", "0.5764712", "0.57502735", "0.57390445", "0.57390445", "0.5731308", "0.5731308", "0.57158166", "0.5712916", "0.5702326", "0.5696762" ]
0.0
-1
This method determines equality for DOMItems.
@Override public boolean equals(final Object o) { if (o instanceof DomItemXml) { return this.getJsObject() == ((DomItemXml) o).getJsObject(); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean areContentsTheSame(Item one,\n Item two) {\n return one.equals(two);\n }", "@Override\n public boolean isSame(Item other) {\n return this.equals(other);\n }", "public void testEquals() {\n XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n XIntervalDataItem item2 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.0, 3.0, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.0, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.0, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.4);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.4);\n }", "@Test\n\tpublic void isChildOrSameTest3()\n\t{\n\t\tNodeList n1=xmlDocument.getElementsByTagName(\"b\");\n\t\tNodeList n2=xmlDocument.getElementsByTagName(\"p\");\n\t\tassertEquals(false,Manipulator.isChildOrSame(n1.item(0),n2.item(0)));\n\t}", "private static <F> /*@ pure @*/ boolean elem_equals(F item1,\n F item2) {\n return (item1 != null && item1.equals(item2))\n\t || (item1 == null && item2 == null);\n }", "@Test\n\tpublic void isChildOrSameTest1()\n\t{\n\t\tNodeList n1=xmlDocument.getElementsByTagName(\"b\");\n\t\tNodeList n2=xmlDocument.getElementsByTagName(\"p\");\n\t\tassertEquals(true,Manipulator.isChildOrSame(n2.item(0),n1.item(0)));\n\t}", "@Test\n\tpublic void isChildOrSameTest2()\n\t{\n\t\tNodeList n1=xmlDocument.getElementsByTagName(\"b\");\n\t\tassertEquals(true,Manipulator.isChildOrSame(n1.item(0),n1.item(0)));\n\t}", "public boolean equals(Object object)\n/* */ {\n/* 1350 */ if (!(object instanceof XMLElement)) {\n/* 1351 */ return false;\n/* */ }\n/* 1353 */ XMLElement rawElement = (XMLElement)object;\n/* */ \n/* 1355 */ if (!this.name.equals(rawElement.getLocalName())) {\n/* 1356 */ return false;\n/* */ }\n/* 1358 */ if (this.attributes.size() != rawElement.getAttributeCount()) {\n/* 1359 */ return false;\n/* */ }\n/* 1361 */ Enumeration<XMLAttribute> en = this.attributes.elements();\n/* 1362 */ while (en.hasMoreElements()) {\n/* 1363 */ XMLAttribute attr = (XMLAttribute)en.nextElement();\n/* */ \n/* 1365 */ if (!rawElement.hasAttribute(attr.getName())) {\n/* 1366 */ return false;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 1371 */ String value = rawElement.getString(attr.getName(), null);\n/* 1372 */ if (!attr.getValue().equals(value)) {\n/* 1373 */ return false;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1381 */ if (this.children.size() != rawElement.getChildCount()) {\n/* 1382 */ return false;\n/* */ }\n/* 1384 */ for (int i = 0; i < this.children.size(); i++) {\n/* 1385 */ XMLElement child1 = getChild(i);\n/* 1386 */ XMLElement child2 = rawElement.getChild(i);\n/* */ \n/* 1388 */ if (!child1.equals(child2)) {\n/* 1389 */ return false;\n/* */ }\n/* */ }\n/* 1392 */ return true;\n/* */ }", "@Override\r\n\tpublic boolean isEqual(Node node) {\n\t\treturn false;\r\n\t}", "protected abstract void compareItem(Item expected, Item actual);", "@Override\n\tpublic boolean equal() {\n\t\treturn false;\n\t}", "@Override\n public boolean areContentsTheSame(HomeSubCategoryData oldItem,\n HomeSubCategoryData newItem) {\n return false;\n }", "@Override\n public boolean areItemsTheSame(@NonNull EntityBook oldItem, @NonNull EntityBook newItem) {\n return oldItem.getChecksum().equals(newItem.getChecksum());\n }", "private Comparison checkEquality(SimpleNode node1, SimpleNode node2) {\n // Compare the classes.\n Comparison comparison = compareClasses(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the values.\n comparison = compareValues(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the images.\n comparison = compareImages(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the children.\n return compareChildren(node1, node2);\n }", "@Test\n public void equal() {\n assertTrue(commandItem.equals(commandItemCopy));\n assertTrue(commandItem.isSameCommand(commandItemCopy));\n //not commanditem return false\n assertFalse(commandItem.equals(commandWord));\n }", "public final void assertIdentical(Document expected, Document actual) {\n\n expected.getDocumentElement().normalize();\n actual.getDocumentElement().normalize();\n\n Diff diff = compareXML(expected, actual);\n\n assertEquals(\"Test if the assertion document is equal, \" + diff.toString(), true, diff.identical());\n }", "private Boolean equalWebItemImages(WebItemImage webItemImageOne, WebItemImage webItemImageTwo) {\n\t\tif (webItemImageOne==null && webItemImageTwo==null) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tif (webItemImageOne==null || webItemImageTwo==null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (webItemImageOne.getSourceURL() == webItemImageTwo.getSourceURL()) {\r\n\t\t\treturn true;\r\n\t\t } else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isSameNodeInfo(NodeInfo other) {\n if (!(other instanceof DocumentWrapper)) {\n return false;\n }\n return node == ((DocumentWrapper)other).node;\n }", "@Override\n public boolean equals(Object o)\n {\n if (this == o)\n {\n return true;\n }\n if (o == null || getClass() != o.getClass())\n {\n return false;\n }\n\n Item item = (Item) o;\n\n if (getId() != item.getId())\n {\n return false;\n }\n if (getUserId() != item.getUserId())\n {\n return false;\n }\n if (getListId() != item.getListId())\n {\n return false;\n }\n if (getPositionIndex() != item.getPositionIndex())\n {\n return false;\n }\n if (!getTitle().equals(item.getTitle()))\n {\n return false;\n }\n return getBody().equals(item.getBody());\n }", "public final void assertEqual(Document expected, Document actual) {\n\n expected.getDocumentElement().normalize();\n actual.getDocumentElement().normalize();\n\n Diff diff = compareXML(expected, actual);\n\n assertEquals(\"Test if the assertion document is equal, \" + diff.toString(), true, diff.similar());\n }", "@Override\n public boolean areContentsTheSame(int oldItemPosition, int newItemPosition) {\n return DiffRecyclerAdapter.this.areContentsTheSame(backupList.get(oldItemPosition), displayList.get(newItemPosition));\n }", "@Override\n public boolean areItemsTheSame(Concert oldConcert, Concert newConcert) {\n return oldConcert.getId() == newConcert.getId();\n }", "@Override\r\n\tpublic boolean equals(Object ob){\n\t\tItem itemob=(Item)ob;\t//transfer object type to Item type\r\n\t\tif(this.UID==itemob.UID && this.TITLE==itemob.TITLE && this.NOOFCOPIES==itemob.NOOFCOPIES) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n public boolean areItemsTheSame(@NonNull Note oldItem, @NonNull Note newItem) {\n // Two Note item are same if there ID are same - uniquely identify each entry\n return oldItem.getId() == newItem.getId();\n }", "public final void testSameObjectEquals() {\n final Transaction copy = testTransaction1;\n assertTrue(testTransaction1.equals(copy)); // pmd doesn't like either\n // way\n\n }", "@Test\n\tpublic void equalsAndHashcode() {\n\t\tCollisionItemAdapter<Body, BodyFixture> item1 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\tCollisionItemAdapter<Body, BodyFixture> item2 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\t\n\t\tBody b1 = new Body();\n\t\tBody b2 = new Body();\n\t\tBodyFixture b1f1 = b1.addFixture(Geometry.createCircle(0.5));\n\t\tBodyFixture b2f1 = b2.addFixture(Geometry.createCircle(0.5));\n\t\t\n\t\titem1.set(b1, b1f1);\n\t\titem2.set(b1, b1f1);\n\t\t\n\t\tTestCase.assertTrue(item1.equals(item2));\n\t\tTestCase.assertEquals(item1.hashCode(), item2.hashCode());\n\t\t\n\t\titem2.set(b2, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t\t\n\t\titem2.set(b1, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t}", "protected boolean areItemsTheSame(T old, T news) {\n if (old == null)\n return news == null;\n return old.sameItems(news);\n }", "@Override\n public boolean areContentsTheSame(@NonNull Note oldItem, @NonNull Note newItem) {\n return oldItem.getTitle().equals(newItem.getTitle()) &&\n oldItem.getDescription().equals(newItem.getDescription()) &&\n oldItem.getPriority() == newItem.getPriority();\n }", "@Override\r\n\t\tpublic boolean isEqualNode(Node arg)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}", "@Override\n public boolean areItemsTheSame(int oldItemPosition, int newItemPosition) {\n return DiffRecyclerAdapter.this.areItemsTheSame(backupList.get(oldItemPosition), displayList.get(newItemPosition));\n }", "@Test\r\n public void testObjectPropertyWithEqualOrSameList() {\r\n ObservableList<String> list = createObservableList(true);\r\n ObjectProperty<ObservableList<String>> property = new SimpleObjectProperty<>(list);\r\n ObjectProperty<ObservableList<String>> otherPropertySameList = new SimpleObjectProperty<>(list);\r\n assertFalse(\"sanity: two properties with same list are not equal\", \r\n property.equals(otherPropertySameList));\r\n ObjectProperty<ObservableList<String>> otherPropertyEqualList =\r\n new SimpleObjectProperty(createObservableList(true));\r\n assertFalse(\"sanity: two properties with equal list are not equal\", \r\n property.equals(otherPropertyEqualList));\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Item)) {\n return false;\n }\n Item other = (Item) object;\n if ((this.itemid == null && other.itemid != null) || (this.itemid != null && !this.itemid.equals(other.itemid))) {\n return false;\n }\n return true;\n }", "@Override\r\n public boolean equals(Object obj) {\r\n if (this == obj)\r\n return true;\r\n if (obj == null)\r\n return false;\r\n if (getClass() != obj.getClass())\r\n return false;\r\n ItemImpl other = (ItemImpl) obj;\r\n if (id != other.id)\r\n return false;\r\n return true;\r\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n Item item = (Item) o;\n return ID == item.ID;\n }", "@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return a.equals(b);\n }", "public boolean equals(XObject obj2) {\n/* */ try {\n/* 262 */ if (4 == obj2.getType())\n/* */ {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 268 */ return obj2.equals(this);\n/* */ }\n/* 270 */ if (1 == obj2.getType())\n/* */ {\n/* 272 */ return (bool() == obj2.bool());\n/* */ }\n/* 274 */ if (2 == obj2.getType())\n/* */ {\n/* 276 */ return (num() == obj2.num());\n/* */ }\n/* 278 */ if (4 == obj2.getType())\n/* */ {\n/* 280 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* 282 */ if (3 == obj2.getType())\n/* */ {\n/* 284 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* 286 */ if (5 == obj2.getType())\n/* */ {\n/* */ \n/* */ \n/* 290 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* */ \n/* */ \n/* 294 */ return super.equals(obj2);\n/* */ \n/* */ }\n/* 297 */ catch (TransformerException te) {\n/* */ \n/* 299 */ throw new WrappedRuntimeException(te);\n/* */ } \n/* */ }", "@Override\n public boolean compareResults(Object expected, Object result)\n {\n if (expected instanceof Document)\n {\n expected = new DOMReader().read((Document)expected).asXML();\n result = new DOMReader().read((Document)result).asXML();\n }\n\n return super.compareResults(expected, result);\n }", "public boolean equals(Object ob)\n {\n if (this == ob) return true;\n\n if (!(ob instanceof DTD)) return false;\n\n DTD otherDTD = (DTD) ob;\n\n return items.equals(otherDTD.items);\n }", "public boolean equals(XObject obj2){\n if(obj2.getType()==XObject.CLASS_NODESET)\n return obj2.equals(this);\n if(null!=m_obj){\n return m_obj.equals(obj2.m_obj);\n }else{\n return obj2.m_obj==null;\n }\n }", "@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return false;\n }", "public boolean compareElements(Object element1, Object element2, AbstractSession session) {\n if (element1.getClass() != element2.getClass()) {\n return false;\n }\n return this.getObjectBuilder(element1, session).compareObjects(element1, element2, session);\n }", "@Override\n public boolean equals(Object obj){\n boolean isEqual = false;\n if (this.getClass() == obj.getClass())\n {\n ItemID itemID = (ItemID) obj;\n if (itemID.id.equals(this.id))\n isEqual = true;\n }\n \n return isEqual;\n }", "@Override\r\n\t\tpublic boolean isSameNode(Node other)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}", "private boolean isEqual(Iterator<?> instance, OasisList<?> baseList) {\n\n boolean equal = true;\n int i = 0;\n while (instance.hasNext()) {\n if (!baseList.get(i++).equals(instance.next())) {\n equal = false;\n break;\n }\n }\n\n return equal;\n }", "public boolean notEquals(XObject obj2)\n throws javax.xml.transform.TransformerException{\n if(obj2.getType()==XObject.CLASS_NODESET)\n return obj2.notEquals(this);\n return !equals(obj2);\n }", "@Override\n public boolean areItemsTheSame(int oldItemPosition, int newItemPosition) {\n Station oldStation = mOldStations.get(oldItemPosition);\n Station newStation = mNewStations.get(newItemPosition);\n return oldStation.getStreamUri().equals(newStation.getStreamUri());\n }", "@Test\n public void testEquals_2() {\n LOGGER.info(\"testEquals_2\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = new AtomString(\"Hej\");\n final boolean actual = atomString.equals(atom);\n assertFalse(actual);\n }", "@Test\r\n public void testEquals() throws Exception\r\n {\r\n Object expectedValueToEqual = new Object();\r\n ValueEquals sut = new ValueEquals(\"MyReplaceId\", expectedValueToEqual);\r\n assertEquals(sut.compareDataSetElementTo(expectedValueToEqual), 0);\r\n ;\r\n }", "@Override\r\n public boolean equals(Object o)\r\n {\r\n items oo = (items)o;\r\n if(this.loc_index==oo.loc_index && this.rule_number==oo.rule_number)\r\n return true;\r\n return false;\r\n }", "@Override\n public boolean areContentsTheSame(int oldItemPosition, int newItemPosition) {\n Station oldStation = mOldStations.get(oldItemPosition);\n Station newStation = mNewStations.get(newItemPosition);\n if (oldStation.getStationName().equals(newStation.getStationName()) &&\n oldStation.getPlaybackState() == newStation.getPlaybackState() &&\n oldStation.getStationImageSize() == newStation.getStationImageSize()) {\n return true;\n } else {\n return false;\n }\n }", "private void assertEqual(Iterator expected, Iterator actual) {\n\t\t\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Item)) {\n return false;\n }\n Item other = (Item) object;\n if ((this.itemPK == null && other.itemPK != null) || (this.itemPK != null && !this.itemPK.equals(other.itemPK))) {\n return false;\n }\n return true;\n }", "@Override\n\tpublic boolean equals(Object other) {\n\t\tif (this == null || other == null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!(other instanceof TextNode)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (!(this.toString().equals(other.toString()))) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof SysItem)) {\r\n return false;\r\n }\r\n SysItem other = (SysItem) object;\r\n if ((this.itemId == null && other.itemId != null) || (this.itemId != null && !this.itemId.equals(other.itemId))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Test\n public void equalsTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0, entity1);\n }", "@Test\r\n\tpublic void testEquality(){\n\t\t assertEquals(object1, object2);\r\n\t}", "public boolean areEqual(Element element1, Element element2, HashMap<String, Integer> lengthMap, GUIState state, GUIState currentState) throws MultipleListOrGridException {\n if (!isAttributeEqual(element1, element2)) {\n return false;\n }\n\n for (int i = 0; i < max(element1.elements().size(), element2.elements().size()); i++) {\n if (i == ((Element) element1).elements().size() || i == ((Element) element2).elements().size())\n return false;\n if (element1.attributeValue(NodeAttribute.Class) != null && element2.attributeValue(NodeAttribute.Class) != null &&\n (element1.attributeValue(NodeAttribute.Class).equals(NodeAttribute.ListView) && element2.attributeValue(NodeAttribute.Class).equals(NodeAttribute.ListView)\n || element1.attributeValue(NodeAttribute.Class).equals(NodeAttribute.GridView) && element2.attributeValue(NodeAttribute.Class).equals(NodeAttribute.GridView))) {\n\n if (state.getListSize() != currentState.getListSize() && state.getGridSize() != currentState.getGridSize()) {\n currentState.setIsDynamicListAndGrid(true);\n }\n if (currentState.isDynamicListAndGrid()) {\n if (lengthMap.get(getCurrentXpath(element1, getStringList(element1))) == null)\n lengthMap.put(getCurrentXpath(element1, getStringList(element1)), 0);\n\n if (!areEqual((Element) element1.elements().get(i), (Element) element2.elements().get(i), lengthMap, state, currentState)) {\n return false;\n } else {\n int lengthValue = lengthMap.get(getCurrentXpath(element1, getStringList(element1))) + 1;\n lengthMap.put(getCurrentXpath(element1, getStringList(element1)), lengthValue);\n if (lengthMap.get(getCurrentXpath(element1, getStringList(element1))) >= maxListGridSizeThreshold) {\n this.totalListGridEquivalentStateCount++;\n state.setIsEquivalentState(true);\n if (!state.getImagelist().contains(currentState.getImagelist().get(0)))\n state.addImage(currentState.getImagelist().get(0));\n state.increaseEquivalentStateCount();\n state.setIsListAndGrid(true);\n return true;\n }\n }\n } else {\n return false;\n }\n\n } else {\n if (!areEqual((Element) element1.elements().get(i), (Element) element2.elements().get(i), lengthMap, state, currentState)) {\n return false;\n }\n }\n }\n return true;\n }", "@Test\n\tpublic void createItemEqual() {\n\t\tItem item = new Item().createItemFromItemName(\"lamp\");\n\t\tSystem.out.println(item);\n\t\tassertEquals(new Item(), item);\n\t}", "@Test\r\n public void testNotificationSetEqualElement() {\r\n ObservableList first = FXCollections.observableArrayList(getPerson1());\r\n ObservableList second = FXCollections.observableArrayList(getPerson2());\r\n int index = 0;\r\n assertEquals(\"sanity: \", first.get(index), second.get(index));\r\n ListChangeReport report = new ListChangeReport(first);\r\n first.set(index, second.get(index));\r\n assertEquals(\"list must have fired on setting equal item\", 1, report.getEventCount());\r\n \r\n }", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof RegistrationItems)) {\n return false;\n }\n RegistrationItems that = (RegistrationItems) other;\n Object myRegItemUid = this.getRegItemUid();\n Object yourRegItemUid = that.getRegItemUid();\n if (myRegItemUid==null ? yourRegItemUid!=null : !myRegItemUid.equals(yourRegItemUid)) {\n return false;\n }\n return true;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }", "public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }" ]
[ "0.71522063", "0.6878771", "0.67650807", "0.65685815", "0.6479011", "0.646767", "0.6465103", "0.64091223", "0.6387412", "0.621888", "0.6153655", "0.615266", "0.61458915", "0.6142193", "0.61243445", "0.6114946", "0.6106713", "0.6073858", "0.6060568", "0.6051559", "0.60397804", "0.60375637", "0.60250515", "0.5998429", "0.5983593", "0.5964312", "0.5952028", "0.5950171", "0.59485924", "0.59469044", "0.59410065", "0.59269124", "0.5886672", "0.58834785", "0.58831394", "0.588023", "0.5851257", "0.5830442", "0.5826918", "0.5826733", "0.5786935", "0.57814056", "0.5780273", "0.5757576", "0.575585", "0.575444", "0.5748482", "0.57415766", "0.57242155", "0.57155764", "0.5715426", "0.57149065", "0.57088774", "0.5694372", "0.56865495", "0.5683252", "0.56807625", "0.56778103", "0.5670253", "0.566568", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.5658861", "0.56587964", "0.56587964", "0.56587964", "0.56587964", "0.56587964", "0.56587964", "0.56587964", "0.56587964", "0.56587964", "0.56587964", "0.56587964", "0.56587964", "0.56587964", "0.56587964", "0.56587964", "0.56587964" ]
0.73215246
0
Returns the hash code for this DOMItem.
@Override public int hashCode() { return jsObject.hashCode(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getHash() {\n return hash_;\n }", "public int getHash() {\n return hash_;\n }", "public String getHash()\n {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n\t\treturn _hash;\n\t}", "public String getHash() {\n\t\treturn hash;\n\t}", "public int hashCode() {\n\t\treturn BeanTools.createHashcode(id, consultContent, consultTime);\r\n\t}", "public int hash(String item);", "public byte[] getHash() {\n\t\treturn _hash.getDataID();\n\t}", "public int hashCode() {\n return (int) position;\n }", "@Override\n public int hashCode() {\n int i;\n int result = 17;\n if (getRegItemUid() == null) {\n i = 0;\n } else {\n i = getRegItemUid().hashCode();\n }\n result = 37*result + i;\n return result;\n }", "public int hashCode() {\n\t\treturn this.eid + 25;\n\t}", "public int hashCode()\n {\n return hash;\n }", "public abstract int getHash();", "public int hashCode() {\r\n\t\treturn this.iD;\r\n\t}", "public int hashCode() {\n if (size == 0) {\n return 0;\n } else {\n int hash = 0xffff;\n JMLListObjectNode<E> walker = the_list;\n while (walker != null) {\n E wv = walker.val;\n if (wv != null) {\n hash ^= wv.hashCode();\n }\n walker = walker.next;\n } \n return hash;\n }\n }", "int getHash();", "public String getHash()\n\t{\n\t\tif(isModified) generateHash();\n\t\treturn hash;\n\t}", "public int getHashCode(){\n return hashCode();\n }", "public String getHashCode();", "public String getHashValue() {\n return hashValue;\n }", "public int hashcode();", "public int hashcode(){\r\n\t\t\r\n\t\treturn last_Name.hashcode();\r\n\t}", "@ApiModelProperty(value = \"The unique identifier for this entity. Guaranteed to be unique for the type of entity, but not globally. When entities refer to each other in Destiny content, it is this hash that they are referring to.\")\n public Long getHash() {\n return hash;\n }", "public int hashCode() {\n return hash.hashCode();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "public int hashCode()\n {\n if (this.hashValue == 0)\n {\n int result = 17;\n int wsidValue = this.getWsid() == null ? 0 : this.getWsid().hashCode();\n result = result * 37 + wsidValue;\n this.hashValue = result;\n }\n return this.hashValue;\n }", "@Override\n\tpublic int hash(String item) {\n\t\tlong hashCode = 0l;\n\t\tchar[] c = item.toCharArray();\n\t\tfor (int i = 0; i < c.length; i++) {\n\t\t\thashCode += c[i] * Math.pow(31, c.length - (i + 1));\n\t\t}\n\t\tint i = (int) hashCode % 2147483647;\n\n\t\n\t\treturn Math.abs(i);\n\t\t\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "public int hashCode() {\n\t\treturn 14356 + historyIndex * 373 + dimension; \n\t\t// return some arbitrary number related to historyIndex and dimension\n\t}", "public int hashCode() {\n return this.trieNode.hashCode();\n }", "public int hashCode() {\n if (myhash == -1) {\n myhash = timestamp.hashCode() + signerCertPath.hashCode();\n }\n return myhash;\n }", "public String identityHash() {\n return Integer.toHexString(System.identityHashCode(this));\n }", "public int hashCode()\n {\n int i = 0;\n if ( hasHashKey() )\n i ^= getHashKey().hashCode();\n return i;\n }", "@Override\n\t\tpublic int hashCode() {\n\t\t\treturn (int) (this.sum * 100 + this.index);\n\t\t}", "@Override\n public int hashCode ()\n {\n int hash = 7;\n hash = 53 * hash + Arrays.hashCode (this.bytes);\n return hash;\n }", "String getHash();", "String getHash();", "public int hashCode() {\n int hash = 0;\n JMLListEqualsNode<E> ptr = this;\n while (ptr != null) {\n E v = ptr.val;\n if (v != null) {\n hash += v.hashCode();\n }\n ptr = ptr.next;\n }\n return hash;\n }", "public int hashCode() {\n try {\n int res = 0;\n byte[] array = getEncoded();\n for (int i=0; i<array.length; i++) {\n res += array[i] & 0xFF;\n }\n return res;\n } catch (CRLException e) {\n return 0;\n }\n }", "public byte[] getHash() {\n\t\treturn generatedHash;\n\t}", "public int hashCode() {\n return Objects.hashCode(this);\n }", "public int hashCode()\n {\n return 37 * 17 + this.EAS_event_ID;\n }", "public int hashCode()\n {\n int hash = 7;\n hash = 83 * hash + (counter != null ? counter.hashCode() : 0);\n return hash;\n }", "public int hashCode() {\n return _ordinal;\n }", "@Override\r\n\tpublic int hashCode() {\n\t\treturn this.id;\r\n\t}", "public int hashCode() {\n if (hash == -1) {\n hash = 0;\n byte b[] = packet.getData();\n int len = b.length;\n for (int ix = 0; ix < len; ix++) {\n\thash = 31 * hash + b[ix];\n }\n hash ^= (packet.getAddress().hashCode() ^\n\t (packet.getPort() << 15) ^\n\t (packet.getLength() << 3) ^\n\t (packet.getOffset() << 8));\n }\n return hash;\n }", "public int getHashCode(int key){\n return key;\n }", "public int hashCode() {\n return (name.ordinal() + 5) * 51;\n }", "public int hashCode() {\n\t\treturn toString().hashCode();\n\t}", "public int hashCode()\r\n/* */ {\r\n/* 89 */ int hash = 3;\r\n/* 90 */ hash = 19 * hash + Objects.hashCode(this.id);\r\n/* 91 */ return hash;\r\n/* */ }", "public int hashCode() {\n int result = 17;\n result = 37 * result + column;\n result = 37 * result + sortOrder.hashCode();\n return result;\n }", "@Override\n public int hashCode() {\n return new HashCodeBuilder(17, 31).\n append(title).hashCode();\n }", "@Override\n public int hashCode()\n {\n if ( h == 0 )\n {\n rehash();\n }\n\n return h;\n }", "@Override\r\n\tpublic int hashCode() {\n\t\tint result = 17;\r\n\t\tresult = 37*result+(int) (id ^ (id>>>32));\r\n\t\t//result = 37*result+(name==null?0:name.hashCode());\r\n\t\t//result = 37*result+displayOrder;\r\n\t\t//result = 37*result+(this.url==null?0:url.hashCode());\r\n\t\treturn result;\r\n\t}", "public int hashCode() {\r\n\t\treturn this.value().hashCode();\r\n\t}", "public int hashCode() {\n return this.asn;\n }", "@Override\n public int hashCode() {\n int hash = 7;\n hash = 43 * hash + this.id;\n hash = 43 * hash + this.size;\n hash = 43 * hash + Objects.hashCode(this.orientation);\n hash = 43 * hash + Objects.hashCode(this.currentPosition);\n return hash;\n }", "@Override\n public int hashCode()\n {\n return new HashCodeBuilder(17, 31).\n append(_name).\n toHashCode();\n }", "public int hashCode()\r\n/* 124: */ {\r\n/* 125:126 */ return this.id;\r\n/* 126: */ }", "public int hashCode() {\n if (hashCode != 0){\n return hashCode;\n }\n return hashCode = computeHash();\n }", "public int hashCode() {\n final int HASH_MULTIPLIER = 29;\n int h = HASH_MULTIPLIER * FName.hashCode() + LName.hashCode();\n h = HASH_MULTIPLIER * h + ((Integer)ID).hashCode();\n return h;\n }", "@Override\r\n public int hashCode() {\r\n return this.number;\r\n }", "public final int hashCode() {\r\n return _value;\r\n }", "@Override\n public int hashCode() {\n return Objects.hash(this.getValue());\n }", "public int hashCode()\n {\n int i = 0;\n if ( hasCode() )\n i ^= getCode().hashCode();\n return i;\n }", "public int hashCode() {\n return 37 * 17;\n }", "@Override\n\tpublic int hashCode() {\n\t\treturn new HashCodeBuilder(17, 37).append(id).append(code).append(nom).append(prix).toHashCode();\n\t}", "@Override\n public int hashCode() {\n int hash = 7;\n hash = 29 * hash + Objects.hashCode(this.id);\n hash = 29 * hash + Objects.hashCode(this.name);\n return hash;\n }", "@Override\n public int hashCode() {\n return System.identityHashCode(this);\n }", "@Override\n public int hashCode() {\n return this.id;\n }", "@Override\n public int hashCode() {\n return System.identityHashCode(this);\n }", "public int hashCode() {\n return getId();\n }", "public int hashCode() {\n\t\treturn hashString.hashCode();\n\t}", "@Override\n public int hashCode() {\n if (hash == 0)\n hash = MD5.getHash(owner.getLogin() + description).hashCode();\n return hash;\n }", "public int hashCode() {\n\t\treturn new HashCodeBuilder().append(obox).append(wordOffsets).append(occlusions).toHashCode();\n\t}", "@Override\n public int hashCode() {\n return ASNID;\n }", "public int hashCode() {\n if (getInternalValue() == null) {\n return -3;\n }\n else {\n return super.hashCode();\n }\n }", "@Override\n public int hashCode() {\n return txHash.hashCode()^txIndex;\n }", "public int hashCode() {\n return getId();\n }", "public int hashCode()\r\n {\r\n if (this.hashValue == 0)\r\n {\r\n int result = 17;\r\n int purSubcateIdValue = this.getId() == null ? 0 : this.getId().hashCode();\r\n result = result * 37 + purSubcateIdValue;\r\n this.hashValue = result;\r\n }\r\n return this.hashValue;\r\n }", "@Override\n public int hashCode() {\n return hashcode;\n }", "public String getHashValue() {\n\t\tif(hash == null || hash.equals(\"\")){\n\t\t\tthis.calculateHashValue();\n\t\t}\n\t\treturn hash;\n\t}", "public int hashCode() {\n int hash = 104473;\n if (token_ != null) {\n // Obtain unencrypted form as common base for comparison\n byte[] tkn = getToken();\n for (int i=0; i<tkn.length; i++)\n hash ^= (int)tkn[i];\n }\n hash ^= (type_ ^ 14401);\n hash ^= (timeoutInterval_ ^ 21327);\n hash ^= (isPrivate() ? 15501 : 12003);\n if (getPrincipal() != null)\n hash ^= getPrincipal().hashCode();\n if (getSystem() != null)\n hash ^= getSystem().getSystemName().hashCode();\n return hash;\n }", "public String getHash() {\n byte[] bArr = new byte[21];\n bArr[0] = (byte) getCTxDestinationType().getValue();\n System.arraycopy(this.mData, 0, bArr, 1, 20);\n return StringToolkit.bytesToString(bArr);\n }", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "@Override\r\n public int hashCode() {\r\n int hash = 0;\r\n hash += (this.id != null ? this.id.hashCode() : 0);\r\n return hash;\r\n }", "@Override public int hashCode() {\n return _ordinal;\n }", "public synchronized int hashCode() {\n\t\treturn super.hashCode();\n\t}", "public int hashCode(){\n return this.id; // this.hashCode()\n }", "@Override\n public int hashCode() {\n int i;\n int result = 17;\n if (getBtrAudUid() == null) {\n i = 0;\n } else {\n i = getBtrAudUid().hashCode();\n }\n result = 37*result + i;\n return result;\n }", "public int generateHash(StudentClass item)\n {\n \t return item.hashCode() % tableSize;\n }", "public int hashCode() {\n return m_value;\n }", "public int hashCode() {\n int result = 17;\n\n if (_address != null) {\n result = 37 * result + _address.hashCode();\n }\n\n return result;\n }", "@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = 1;\n\t\tresult = prime * result + itemCode;\n\t\tresult = prime * result + ((itemName == null) ? 0 : itemName.hashCode());\n\t\tresult = prime * result + ((material == null) ? 0 : material.hashCode());\n\t\tresult = prime * result + quantity;\n\t\tresult = prime * result + ((size == null) ? 0 : size.hashCode());\n\t\tresult = prime * result + unitPrice;\n\t\treturn result;\n\t}" ]
[ "0.75502336", "0.7545502", "0.71502095", "0.7126738", "0.7126738", "0.7126738", "0.71261704", "0.71074414", "0.7098543", "0.7067353", "0.7025075", "0.69583094", "0.695497", "0.69221", "0.6900251", "0.6865767", "0.6835729", "0.6813995", "0.6808732", "0.6781317", "0.67731214", "0.673987", "0.67082024", "0.66958576", "0.666587", "0.6663283", "0.6634106", "0.6632239", "0.6623686", "0.6623686", "0.6622168", "0.65718967", "0.6564182", "0.6564182", "0.6539319", "0.65234566", "0.65216357", "0.6514882", "0.65135485", "0.6513044", "0.6506743", "0.65043473", "0.65043473", "0.6503708", "0.6495954", "0.6489593", "0.6479335", "0.64781606", "0.6477298", "0.646907", "0.6464275", "0.64607054", "0.64582556", "0.6446321", "0.64417666", "0.6432796", "0.6425321", "0.6422267", "0.6419197", "0.64072454", "0.63984025", "0.6384529", "0.63837", "0.6383304", "0.63706344", "0.63670623", "0.6365257", "0.63629043", "0.63529927", "0.6352324", "0.63493335", "0.6347041", "0.6341974", "0.6341228", "0.63338655", "0.6332605", "0.63317966", "0.6330566", "0.63228685", "0.6322382", "0.6322226", "0.63150674", "0.6313879", "0.63107216", "0.6310138", "0.62961113", "0.62624794", "0.6261302", "0.6260009", "0.6250195", "0.6249535", "0.6249535", "0.6249049", "0.6245835", "0.6228415", "0.6213644", "0.621234", "0.6212215", "0.62106335", "0.62055284", "0.62006384" ]
0.0
-1
This will open the browser
public void openBrowser() { ResourceBundle config = ResourceBundle.getBundle("config"); config.getString("browser").equalsIgnoreCase("Chrome"); System.setProperty("webdriver.chrome.driver", "src/Drivers/chromedriver_76.0.exe"); driver = new ChromeDriver(); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); // driver.get(config.getString("URL")); driver.manage().window().maximize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void openBrowser()\n\t{\n\t\tdriver = DriverSetup.getWebDriver(ReadPropertiesFile.getBrowser());\n\t\tdriver.get(ReadPropertiesFile.getURL());\n\t\tlog.info(\"Opening Browser\");\n\t\tlog.info(\"Practo website is launched \");\n\t}", "private static void openWebpage(String url) {\n try {\n new ProcessBuilder(\"x-www-browser\", url).start();\n } catch (IOException e) {\n log.error(e.getMessage(), e);\n }\n }", "public void Open_Browser() \r\n\t{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"drivers\\\\chromedriver.exe\");\r\n\t\t//Brower initiation\r\n\t\tdriver=new ChromeDriver();\r\n\t\t//maximize browser window\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\r\n\t}", "private void openUrl() throws IOException, URISyntaxException{\r\n if(Desktop.isDesktopSupported()){\r\n Desktop desktop = Desktop.getDesktop();\r\n desktop.browse(new URI(url));\r\n } else {\r\n Runtime runtime = Runtime.getRuntime();\r\n runtime.exec(\"xdg-open \" + url);\r\n }\r\n }", "private void launchBrowser(URI uri) throws IOException\r\n {\r\n getDesktop().browse(uri);\r\n }", "public void openUrlInBrowser(String URL) {}", "private void openBrowser() {\r\n //http://必须有\r\n String url = urlText.getText().toString();\r\n if (!\"http\".equals(url.substring(0, 4))) {\r\n url = \"http://\" + url;\r\n }\r\n Uri uri = Uri.parse(url);//获取网址,并转换成URI\r\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);//打开浏览器\r\n startActivity(intent);\r\n }", "public static void openBrowser() {\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n // === Google Chrome Browsers === //\n CHOSEN_BROWSER = CHROME;\n driver.manage().window().maximize();\n }", "private boolean openBrowser(IProgressMonitor monitor) {\n\n monitor.subTask(\"Open index page\");\n // FIXME: port should come from the config files\n Display.getDefault().syncExec(new Runnable() {\n public void run() {\n URL url;\n try {\n url = new URL(\"http://localhost:8888\");\n IWorkbenchBrowserSupport browserSupport = WebBrowserUIPlugin\n .getInstance().getWorkbench().getBrowserSupport();\n IWebBrowser browser = browserSupport.createBrowser(\n IWorkbenchBrowserSupport.LOCATION_BAR\n | IWorkbenchBrowserSupport.NAVIGATION_BAR,\n null, null, null);\n browser.openURL(url);\n } catch (Exception e) {\n Trace.trace(Trace.SEVERE, \"Error opening browser\", e);\n }\n }\n });\n\n monitor.worked(3);\n return true;\n }", "private void openBrowser(String Url) {\n \tif (Url != null && Url.trim().length()>0) {\n \t\tUri uri = Uri.parse(Url);\n \tIntent i = new Intent(Intent.ACTION_VIEW, uri);\n \tstartActivity(i);\n \t} \t\n }", "public void openBrowser(View view){\n String url = (String)view.getTag();\n\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_VIEW);\n intent.addCategory(Intent.CATEGORY_BROWSABLE);\n\n //pass the url to intent data\n intent.setData(Uri.parse(url));\n\n startActivity(intent);\n }", "public void openBrowser(Context context, String url) {\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n context.startActivity(i);\n }", "public void open() {\n setWebDriver();\n }", "private void openUri() {\n try {\n Desktop.getDesktop().browse(new URI(\"http://localhost:\" + Constants.DEFAULT_PORT));\n } catch (URISyntaxException | IOException e) {\n logger.error(\"MainService error [openUri]: \" + e);\n }\n }", "@Given(\"^user should launch the browser$\")\n\tpublic void user_should_launch_the_browser() throws Throwable {\n\t\tgetUrl(\"https://adactin.com/HotelAppBuild2/\");\n\t \n\t}", "@Given(\"^Open URL in chrome browser$\")\r\n\tpublic void open_URL_in_chrome_browser() {\n\t nop.Launch(\"chrome\", \"http://automationpractice.com/index.php\");\r\n\t}", "private void openURL() {\n webview.loadUrl(\"http://192.168.0.116/webvitool/view/webvitool.php\");\n webview.requestFocus();\n }", "public static void openBrowser() {\r\n\t\tString browser = prop.getProperty(\"browserType\").toLowerCase();\r\n\r\n\t\ttry {\r\n\t\t\tif (browser.equals(\"chrome\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"chromeName\"), prop.getProperty(\"chromePath\"));\r\n\t\t\t\tdriver = new ChromeDriver();\r\n\r\n\t\t\t} else if (browser.equals(\"ff\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"FFName\"), prop.getProperty(\"FFPath\"));\r\n\t\t\t\tdriver = new FirefoxDriver();\r\n\r\n\t\t\t} else if (browser.equals(\"ie\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"IEName\"), prop.getProperty(\"IEPath\"));\r\n\t\t\t\tdriver = new InternetExplorerDriver();\r\n\r\n\t\t\t} else {\r\n\t\t\t\tAssert.fail(\"Unable to find browser, Check EnvrionrmentData.properties file\");\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tAssert.fail(\"Unable to find browser, Check EnvrionrmentData.properties file\");\r\n\t\t}\r\n\t}", "public static void launchingBrowser() throws Exception {\n\n\t\tString applicationURL = merchEnv.getProtocol() + \"://\"\n\t\t\t\t+ merchEnv.getHost() + \":\" + merchEnv.getPort() + \"/\";\n\t\tselectedBrowser = merchEnv.getBrowser();\n\t\ttry {\n\t\t\tbaseScreen = new BaseScreen(selectedBrowser, applicationURL,\n\t\t\t\t\tmerchEnv.getContext(), merchEnv, merchUserInfo, merchUI);\n\t\t} catch (ScreenException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private void toUrl(String url){\n Uri uriUrl = Uri.parse(url);\n Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);\n startActivity(launchBrowser);\n }", "public void openURL(String url) {\r\n\t\t\r\n\t\tfinal String errMsg = \"Error attempting to launch web browser\";\r\n\t\tString osName = System.getProperty(\"os.name\");\r\n\t\ttry {\r\n\t\t\tif (osName.startsWith(\"Mac OS\")) {\r\n\t\t\t\tClass fileMgr = Class.forName(\"com.apple.eio.FileManager\");\r\n\t\t\t\tMethod openURL = fileMgr.getDeclaredMethod(\"openURL\",\r\n\t\t\t\t\t\tnew Class[] {String.class});\r\n\t\t\t\topenURL.invoke(null, new Object[] {url});\r\n\t\t\t}\r\n\t\t\telse if (osName.startsWith(\"Windows\"))\r\n\t\t\t\tRuntime.getRuntime().exec(\"rundll32 url.dll,FileProtocolHandler \" + url);\r\n\t\t\telse { //assume Unix or Linux\r\n\t\t\t\tString[] browsers = {\r\n\t\t\t\t\t\t\"firefox\", \"opera\", \"konqueror\", \"epiphany\", \"mozilla\", \"netscape\" };\r\n\t\t\t\tString browser = null;\r\n\t\t\t\tfor (int count = 0; count < browsers.length && browser == null; count++)\r\n\t\t\t\t\tif (Runtime.getRuntime().exec(\r\n\t\t\t\t\t\t\tnew String[] {\"which\", browsers[count]}).waitFor() == 0)\r\n\t\t\t\t\t\tbrowser = browsers[count];\r\n\t\t\t\tif (browser == null)\r\n\t\t\t\t\tthrow new Exception(\"Could not find web browser\");\r\n\t\t\t\telse\r\n\t\t\t\t\tRuntime.getRuntime().exec(new String[] {browser, url});\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n//\t\t\tJOptionPane.showMessageDialog(null, errMsg + \":\\n\" + e.getLocalizedMessage());\r\n\t\t\tAboutDialog dlgSupport = new AboutDialog(actController.getUIInstance(), \"Support\", \t\"<html> Couldn't find web browser!\"+ \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"<br> Please start your browser and type in the following URL:\"+\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"<br> www.battleship.bymaxe.de</html>\");\r\n\t\t}\r\n\t}", "private void openUrlInBrowser(String url) {\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n url = \"http://\" + url;\n }\n // Open the browser and point it to the given url\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n startActivity(intent);\n }", "@Override\r\n protected URLConnection openConnection(URL url) throws IOException {\n Runtime.getRuntime().exec(\"cmd.exe /c start \" + url.toExternalForm());\r\n //Once the command has called we don't need to diasplay anything so we load a blank page.\r\n return new URL(\"about:blank\").openConnection();\r\n }", "public void openApp(String Url) {\n\t\tfd = new FirefoxDriver();\r\n\t\tfd.get(Url);\r\n\t\tfd.manage().window().maximize();\r\n\t}", "@Given(\"^launch the browser \\\"([^\\\"]*)\\\"$\")\n\tpublic void launch_the_browser(String url) throws Throwable {\n\t\tdriver = getDriver();\n\t\tdriver.get(url);\n\n\t}", "void openUrl (String url);", "public void showLink(String url)\n {\n try\n {\n jalview.util.BrowserLauncher.openURL(url);\n } catch (Exception ex)\n {\n JOptionPane\n .showInternalMessageDialog(\n Desktop.desktop,\n \"Unixers: Couldn't find default web browser.\"\n + \"\\nAdd the full path to your browser in Preferences.\",\n \"Web browser not found\", JOptionPane.WARNING_MESSAGE);\n\n ex.printStackTrace();\n }\n }", "public static void executeBrowser() throws Exception{\n\t\tinvokeMyBrowser();\n\t}", "public static void openBrowser(Context context, String url) {\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\"))\n url = \"http://\" + url;\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n context.startActivity(intent);\n }", "private void openWebPage(String url) {\n Uri webpage = Uri.parse(\"http://\" + url);\n Intent intent = new Intent(Intent.ACTION_VIEW, webpage);\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }", "public void openUrl(String url) {\n driver.get(url);\n }", "private void openPage(String address)\n {\n String os = System.getProperty(\"os.name\").toLowerCase();\n \n if(os.contains(\"win\"))\n {\n if(Desktop.isDesktopSupported())\n {\n Desktop desktop = Desktop.getDesktop();\n if(desktop.isSupported(Desktop.Action.BROWSE))\n {\n try { desktop.browse(new URI(address)); }\n\n catch(IOException | URISyntaxException e)\n {\n JOptionPane.showMessageDialog(null, \"Could not open page\");\n }\n }\n }\n }\n \n else \n JOptionPane.showMessageDialog(null, \"Cannot open page, system is not supported\");\n }", "protected void openInNewBrowser(SelectEvent event, String url)\n {\n try\n {\n BrowserOpener.browse(new URL(url));\n event.consume();\n }\n catch (Exception e)\n {\n String message = Logging.getMessage(\"generic.ExceptionAttemptingToInvokeWebBrower\", url);\n Logging.logger().warning(message);\n }\n }", "public void openBrowser(String url) {\n System.setProperty(\"webdriver.chrome.driver\", \"c:\\\\webdriver\\\\chromedriver.exe\");\n driver = new ChromeDriver();\n driver.manage().window().maximize();\n// int timeout = Integer.parseInt(ApplicationConfig.readConfigProperties(\"config-week17project.properties\", \"timeout\"));\n int timeout = Integer.parseInt(testData.timeout);\n driver.manage().timeouts().pageLoadTimeout(timeout, TimeUnit.SECONDS);\n driver.get(url);\n }", "@Given(\"I open a browser and launch the application\")\n public void open_a_browser_and_launch_the_application() throws MalformedURLException\n {\n try {\n if(System.getProperty(\"exemode\").equals(\"remote\")) {\n if(System.getProperty(\"browser\").equals(\"firefox\")){\n System.setProperty(\"webdriver.gecko.driver\", \"./drivers/geckodriver\");\n DesiredCapabilities dc = DesiredCapabilities.firefox();\n dc.setBrowserName(\"firefox\");\n dc.setPlatform(Platform.LINUX);\n driver = new RemoteWebDriver(new URL(UtilConstants.ENDPOINT_SELENIUM_HUB), dc);\n }\n else if(System.getProperty(\"browser\").equals(\"chrome\")){\n System.setProperty(\"webdriver.chrome.driver\", \"./drivers/chromedriver\");\n DesiredCapabilities dc = DesiredCapabilities.chrome();\n dc.setBrowserName(\"chrome\");\n dc.setPlatform(Platform.LINUX);\n driver = new RemoteWebDriver(new URL(UtilConstants.ENDPOINT_SELENIUM_HUB), dc);\n }\n }\n else{\n if(System.getProperty(\"browser\").equals(\"firefox\")){\n System.setProperty(\"webdriver.gecko.driver\", \"./drivers/geckodriver\");\n driver = new FirefoxDriver();\n }\n else if(System.getProperty(\"browser\").equals(\"chrome\")){\n System.setProperty(\"webdriver.chrome.driver\", \"./drivers/chromedriver\");\n driver = new ChromeDriver();\n }\n }\n\n if(driver!=null){\n driver.manage().window().maximize();\n driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n //driver.manage().timeouts().pageLoadTimeout(5, TimeUnit.SECONDS);\n driver.get(ENDPOINT_PHPTRAVELS);\n }\n }\n catch(Exception e){\n e.printStackTrace();\n// System.exit(1);\n }\n }", "void openLinkInSystemBrowser(String url, int errorMsg);", "void openInAppBrowser(String url, String title, String subtitle, int errorMsg);", "private void openWebPage(String url) {\n Uri webpage = Uri.parse(url);\n Intent intent = new Intent(Intent.ACTION_VIEW, webpage);\n if (intent.resolveActivity(getActivity().getPackageManager()) != null) {\n startActivity(intent);\n }\n }", "@Override\n\tpublic boolean openURL(final String url) {\n\t\ttry {\n\t\t\tURI uri = new URI(url);\n\t\t\tif(Desktop.isDesktopSupported()) {\n\t\t\t\tfinal Desktop desktop = Desktop.getDesktop();\n\t\t\t\tdesktop.browse(uri);\n\t\t\t}\n\t\t\telse { //fallback if desktop API not supported\n\t\t\t\tfor (final String browser : BROWSERS) {\n\t\t\t\t\tString cmd = browser + \" \" + url;\n\t\t\t\t\tfinal Process p = Runtime.getRuntime().exec(cmd);\n\t\t\t\t\tif(p.waitFor() == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\tJOptionPane.showInputDialog(null, \"There was an error while attempting to open the system browser. \"\n\t\t\t\t\t+ \"\\nPlease copy and paste the following URL into your browser:\", url);\n\t\t\tlogger.info(\"Error opening system browser; displaying copyable link instead\");\n\t\t} catch (URISyntaxException e) {\n\t\t\tlogger.warn(\"This URI is invalid: \" + url, e);\n\t\t\treturn false;\n\t\t} catch (InterruptedException e) {\n\t\t\tlogger.warn(\"Browser process thread interrupted\");\n\t\t}\n\t\treturn true;\n\t}", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tif(desktop == null) return ;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdesktop.browse(uri);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}", "public FirefoxDriver openBrowser(String site){\n System.setProperty(\"webdriver.gecko.driver\", \"c:\\\\Utils\\\\geckodriver.exe\");\n FirefoxDriver browser = new FirefoxDriver();\n browser.get(site);\n return browser;\n }", "@Given(\"browser is open\")\n\tpublic void browser_is_open() {\n\t\tSystem.out.println(\"browseris open\");\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"/home/rahul/Desktop\");\n\t\tdriver=new ChromeDriver();\n\t\tdriver.manage().timeouts().implicitlyWait(40,TimeUnit.SECONDS);\n\t\t\n\t}", "public static WebDriver startBrowser() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedriver.exe\");\n\t\t\n\t\t// Create ChromeDriver object, launch Chrome browser\n\t\t WebDriver driver = new ChromeDriver();\n\t\t \n\t\t// Create ChromeDriver object, launch Chrome browser\n\t\tdriver.get(\"http://techfios.com/test/107/\");\n\t\treturn driver;\n\t}", "public ICurrentPage openNewWindow(String url);", "@Override\n public void execute () {\n if (Desktop.isDesktopSupported()) {\n try {\n Desktop.getDesktop().browse(new URI(HELP_URL));\n }\n catch (Exception e) {\n\n }\n }\n }", "public void openWebPage(String url) {\n Intent intent= new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n startActivity(intent);\n }", "@Given(\"^launch an chrome browser$\")\r\n\tpublic void launch_an_chrome_browser() throws Throwable {\n\t sign.url();\r\n\t\t\r\n\t}", "public void openWebBrowser(String stringURL) {\r\n\t\tWebBrowser.openBrowser(stringURL);\r\n\t}", "public static final void openWebpage(URI uri) {\n Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\r\n if ((desktop != null) && (desktop.isSupported(Desktop.Action.BROWSE))) {\r\n try {\r\n desktop.browse(uri);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "public void open(){\n driver.get(\"https://demoqa.com/slider\");\n }", "@Given(\"^Launch the page$\")\r\n\tpublic void launch_the_page() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedrivernew.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"http://realestate.upskills.in\");\r\n\t \t}", "public static void launchSite(String browser) throws AWTException, IOException, InterruptedException\n\t{\n\t\topenBrowserAndSite(browser);\n\t}", "public static void goTo() {\n Browser.driver.get(\"https://www.abv.bg/\");\n Browser.driver.manage().window().maximize();\n }", "@BeforeTest //special type of testng method which alway run before.\r\n\t\t\tpublic void openBrowser() {\r\n\t\t\t\tWebDriverManager.chromedriver().setup();\r\n\t\t\t\tdriver = new ChromeDriver();\r\n\t\t\t\tdriver.get(\"https://locator.chase.com/\");\r\n\t\t\t}", "public static void InvokeBrowser() {\n\t\tString currentDir = System.getProperty(\"user.dir\");\n\t\tSystem.out.println(\"Current Directory \"+currentDir);\n\t\tDesiredCapabilities capabilities = DesiredCapabilities.chrome();\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--incognito\");\n\t\tcapabilities.setCapability(ChromeOptions.CAPABILITY, options);\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\tcurrentDir+\"/lib/chromedriver/36/chromedriver.exe\");\n\t\tdriver = new ChromeDriver(capabilities);\n\t\tdriver.manage().window().maximize();\n\t\t//driver.navigate().to(URL);\n\t\t//logger.info(\"URL to proceed with transaction --> \"+URL);\n\t\t/*BestBuyAddCart.addToCart();\n\t\tdriver.close();\n\t\tdriver.quit();*/\n\t}", "public void Open() {\r\n\t click();\r\n\t }", "public static void main(String[] args) {\n\t\t System.setProperty(\"webdriver.chrome.driver\", \"D:/workspace/chromedriver\");\r\n\t\t //System.setProperty(\"webdriver.chrome.driver\", ...);\r\n\t\t \r\n\t\t System.setProperty(\"selenide.browser\", \"Chrome\");\r\n\t\t Configuration.browser=\"chrome\";\r\n\t\t open(\"http://google.com\");\r\n\t\t //$(By.id(\"registerLink\")).pressEnter();\r\n\t\t }", "public void openIe(){\n\n }", "public static void main(String[] args) {\n WebDriverManager.chromedriver().setup();\n\n // create object for using selenium driver;\n WebDriver driver=new ChromeDriver();\n\n //open browser\n driver.get(\"http://amazon.com\");// bumu exlaydu\n //driver.get(\"http://google.com\");\n // open website\n System.out.println(driver.getTitle());\n\n\n\n\n }", "public void goTo() { // Navigate to home page\n\t\tBrowser.goTo(url);\n\t}", "@Given(\"^I go to \\\"([^\\\"]*)\\\" on \\\"([^\\\"]*)\\\"$\") \n\tpublic void openWebPage(String url, String browser){\n\t\tString result = selenium.openBrowser(browser);\n\t\tAssert.assertEquals(selenium.result_pass, result);\n\t\tString result2 = selenium.navigate(url);\n\t\tAssert.assertEquals(selenium.result_pass, result2);\n\t}", "public void openURL() throws Exception{\r\n\r\n\t try{\r\n\t driverUtil.trigger();\r\n\t reporter.reportTestStep(\"App Launch\", \"ok\", \"ok\", \"PASS\", false);\r\n\t }\r\n\t\t\r\n\tcatch(Exception e){\r\n\t\te.printStackTrace();\r\n\t}\r\n}", "public void openSite(View view) {\n Intent toView = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://www.google.com\"));\n startActivity(toView);\n }", "@Override\r\n public void doAction(ActionEvent e)\r\n {\n NetworkUtil.openURL(NetworkUtil.WEBSITE_URL);\r\n }", "public static void main(String[] args) {\n\n BrowserService browser = null;\n switch (args[0].toLowerCase()) {\n case \"chrome\":\n browser = new Chrome();\n break;\n case \"safari\":\n browser = new Safari();\n break;\n default:\n System.err.println(\"Unsupported browser\");\n System.exit(1);\n }\n\n System.out.println(\"Opened \" + args[0]);\n //polymorphism is an ability to take different shapes\n //in Java interface data types can be initialized with Objects that implement the interface.\n //and this a runtime process. Dynamic binding.\n browser.navigate(args[1]);\n System.out.println(args[0] + \" navigated to \" + args[1]);\n getUrl(browser);\n }", "public void openURL(Activity ctx, String url)\n {\n if (isConnected(ctx)) {\n try {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n ctx.startActivity(browserIntent);\n } catch (Exception e) {\n\n }\n } else {\n Dialogs.getInstance().simpleNoInternet(ctx);\n }\n }", "public void execute() {\n try {\n final DemoManagerWindow window = new DemoManagerWindow();\n window.setResizable(false);\n window.setDemoManager(this);\n window.setDemoProvider(this);\n window.setVisibleAndWait();\n } catch (final Throwable t) {\n throw new BrowserException(\"\", t);\n }\n }", "void browserMethod();", "@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 static void openBrowser(String browserType) {\n\t\t\tif (\"chrome\".equals(browserType.toLowerCase())) {\n\t\t\t\tsetChromeDriverProperty();\n\t\t\t\tChromeOptions options = setChromeOptions();\n\t\t\t\twebdriver = new ChromeDriver(options);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Browser type \" + browserType + \" hasn't been handled yet.\");\n\t\t\t\tReports.logAMessage(LogStatus.ERROR, \"Browser type \" + browserType + \" hasn't been handled yet.\");\n\t\t\t}\n\t\t}", "@Override\n\tpublic void actionPerformed (ActionEvent e)\n\t{\n\t\n\t\ttry\n\t\t{\n\t\t\t//Browser.init();\n\t\t\t//Browser.displayURL(mUrl);\n\t\t\tDesktop.getDesktop().browse(new URI(mUrl));\n\n\t\t}\n\t\tcatch (IOException exc)\n\t\t{\n\t\t\texc.printStackTrace();\n\t\t} catch (URISyntaxException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\n\t\n\t}", "public static void displayURL(String url) {\n\t\tboolean windows = isWindowsPlatform();\n\t\tString cmd = null;\n\t\ttry {\n\t\t\tif (windows) {\n\t\t\t\t// cmd = 'rundll32 url.dll,FileProtocolHandler http://...'\n\t\t\t\tcmd = WIN_PATH + \" \" + WIN_FLAG + \" \" + url;\n\t\t\t\tRuntime.getRuntime().exec(cmd);\n\t\t\t} else {\n\t\t\t\t// Under Unix, Netscape has to be running for the \"-remote\"\n\t\t\t\t// command to work. So, we try sending the command and\n\t\t\t\t// check for an exit value. If the exit command is 0,\n\t\t\t\t// it worked, otherwise we need to start the browser.\n\t\t\t\t// cmd = 'netscape -remote openURL(http://www.javaworld.com)'\n\t\t\t/*\tcmd = UNIX_PATH + \" \" + UNIX_FLAG + \"(\" + url + \")\";\n\t\t\t\tProcess p = Runtime.getRuntime().exec(cmd);\n\t\t\t\ttry {\n\t\t\t\t\t// wait for exit code -- if it's 0, command worked,\n\t\t\t\t\t// otherwise we need to start the browser up.\n\t\t\t\t\tint exitCode = p.waitFor();\n\t\t\t\t\tif (exitCode != 0) {\n\t\t\t\t\t\t// Command failed, start up the browser\n\t\t\t\t\t\t// cmd = 'netscape http://www.javaworld.com'\n\t\t\t\t\t\tcmd = UNIX_PATH + \" \" + url;\n\t\t\t\t\t\tp = Runtime.getRuntime().exec(cmd);\n\t\t\t\t\t}\n\t\t\t\t} catch (InterruptedException x) {\n\t\t\t\t\tSystem.err.println(\n\t\t\t\t\t\t\"Error bringing up browser, cmd='\" + cmd + \"'\");\n\t\t\t\t\tSystem.err.println(\"Caught: \" + x);\n\t\t\t\t} */\n\t\t\t}\n\t\t} catch (IOException ex) {\n\t\t\t// couldn't exec browser\n\t\t\tlogObj.debug(\"Could not invoke browser, command=\" + cmd, ex);\n\t\t}\n\t}", "private void jMenuItem142ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem142ActionPerformed\n URI uri = null;\n try {\n uri = new URI(\"http://manual.audacityteam.org\");\n }\n catch (URISyntaxException ex) {\n Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);\n }\n Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\n if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {\n try {\n desktop.browse(uri);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "@Parameters({\"browserName\"})\n\t@BeforeMethod\n\tpublic void openBrowser(String browserName) {\n\t\tString currentProjectPath = System.getProperty(\"user.dir\");\n\t\tSystem.out.println(\"Current project path is = \" + currentProjectPath);\n\t\t\n\t\tString currentOSname = System.getProperty(\"os.name\");\n\t\tSystem.out.println(\"Current OS name is = \" + currentOSname);\n\t\t\n\t\tif(browserName.equalsIgnoreCase(\"chrome\")) {\n\t\t\t//Open Chrome\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", currentProjectPath + \"\\\\browserDriverEXE\\\\chromedriver.exe\"); \n\t\t\tdriver = new ChromeDriver();\n\t\t}\n\t\t\n\t\telse if(browserName.equalsIgnoreCase(\"firefox\")) {\n\t\t\t//Open FF\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", currentProjectPath + \"\\\\browserDriverEXE\\\\geckodriver.exe\"); \n\t\t\tdriver = new FirefoxDriver();\n\t\t}\n\t\t\n\t\telse {\n\t\t\t//Open IE\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", currentProjectPath + \"\\\\browserDriverEXE\\\\IEDriverServer.exe\"); \n\t\t\tdriver = new InternetExplorerDriver();\n\t\t}\n\t\tdriver.manage().window().maximize();\n\t\t\n\t\t//refresh\n\t\t//driver.navigate().refresh();\n\t\t\n\t\t//driver.navigate().forward();\n\t\t\n\t\t//driver.navigate().back();\n\t\t\n\t\t//driver.manage().deleteAllCookies();\n\t\t\n\t\t//imp wait\n\t\t//driver.manage().timeouts().setScriptTimeout(10, TimeUnit.MINUTES);\n\t\t//driver.manage().timeouts().pageLoadTimeout(5, TimeUnit.SECONDS);\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t}", "@Override\n\tprotected void openPage(PageLocator locator, Object... args) {\n\t\tget(\"/\");\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t}", "@Test\r\n\tpublic void launch_browser()\r\n\t{ \r\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C://TESTING TOOLS - SOFTWARES/chromedriver.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"https://www.javatpoint.com/\");\r\n\t\t// remove all cookies\r\n\t\t//driver.manage().deleteAllCookies();\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\t\r\n\t}", "@BeforeTest\r\n\tpublic void launch()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Yogini\\\\chromedriver\\\\chromedriver.exe\"); //location of browser in local drive\r\n\t\tWebDriver driver = new ChromeDriver(); \r\n\t\tdriver.get(tobj.url);\r\n\t\tSystem.out.println(\"Before test, browser is launched\");\r\n\t}", "@BeforeTest\n\tpublic void OpenBrowser() throws InterruptedException {\n\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\PSQA\\\\Desktop\\\\driver\\\\chromedriver.exe\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.get(\"https://www.booking.com/\");\n\t\n\t\t\n\t\tdriver.manage().window().maximize();\n\t\tThread.sleep(100);\n\t\t\n}", "public void initiateBrowser(String browser) {\n\t\tString os = System.getProperty(\"os.name\").toLowerCase();\n\t\tString current_dir = System.getProperty(\"user.dir\");\n\t\tSystem.out.println(os);\n\t\tSystem.out.println(current_dir);\n\t\tswitch (browser) {\n\t\tcase \"ie\":\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", current_dir + \"/drivers/IEDriverServer.exe\");\n\t\t\tdriver = new InternetExplorerDriver();\n\t\t\tbreak;\n\t\tcase \"chrome\":\n\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\tif (os.contains(\"linux\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", current_dir + \"/drivers/linuxdrivers/chromedriver\");\n\t\t\t\tDesiredCapabilities caps = DesiredCapabilities.chrome();\n\t\t\t\tLoggingPreferences logPrefs = new LoggingPreferences();\n\t\t\t\tlogPrefs.enable(LogType.BROWSER, Level.ALL);\n\t\t\t\tcaps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);\n\n\t\t\t\toptions.setBinary(\"/usr/bin/google-chrome\");\n\t\t\t\toptions.addArguments(\"--headless\");\n\t\t\t} else if (os.contains(\"windows\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", current_dir + \"/drivers/chromedriver.exe\");\n\t\t\t\tDesiredCapabilities caps = DesiredCapabilities.chrome();\n\t\t\t\tLoggingPreferences logPrefs = new LoggingPreferences();\n\t\t\t\tlogPrefs.enable(LogType.BROWSER, Level.ALL);\n\t\t\t\tcaps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);\n\t\t\t}\n\t\t\toptions.addArguments(\"test-type\");\n\t\t\toptions.addArguments(\"disable-popup-blocking\");\n\t\t\tdriver = new ChromeDriver(options);\n\n\t\t\tdriver.manage().window().maximize();\n\t\t\tbreak;\n\t\tcase \"firefox\":\n\t\t\tdriver = new FirefoxDriver();\n\t\t\tbreak;\n\t\t}\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n\t}", "@Test\n\t@BeforeSuite\n\tpublic void OpenBrowser() throws InterruptedException {\n\t\t\n\t\tdriver = new FirefoxDriver();\n\t\tdriver.get(\"https://www.gmail.com\");\n\t\tmanageInit();\n\t\n\t}", "public void openMuseumWebsite(String url){\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n startActivity(intent);\n }", "void displayBrowser(Context context, String urlString) {\n displayBrowser(context, urlString, true);\n }", "public void openHomePage() {\n\t\tlogger.info(\"Opening Home Page\");\n\t\tdriver.get(ReadPropertyFile.getConfigPropertyVal(\"homePageURL\"));\n\t\t\n\t}", "@Given(\"^open new browser and go to \\\"([^\\\"]*)\\\"$\")\r\n\tpublic void open_new_browser_and_go_to_url(String url) {\r\n\t\tSelenium_Functions.openNewBrowserAndgotoNewUrl(driver,\r\n\t\t\t\tEnvironmentConfig.baseUrlTescoItp);\r\n\t\tlog.info(\"The user is on Tesco ITP Login page\"\r\n\t\t\t\t+ EnvironmentConfig.baseUrlTescoItp);\r\n\t\tSystem.out.println(\"The user is on Tesco ITP Login page\");\r\n\r\n\t}", "private void execURL(String link) {\n Uri webLink = Uri.parse(link);\n Intent openLink = new Intent(Intent.ACTION_VIEW, webLink);\n PackageManager pm = getPackageManager();\n List<ResolveInfo> handlers = pm.queryIntentActivities(openLink, 0);\n if (handlers.size() > 0)\n startActivity(openLink);\n }", "protected void openWebPage() {\n\t\tEseoTest.driver.get(Configuration.getString(\"website_address\"));\n\t\t//Assert.assertEquals(\"Web page title does not appear correct.\", Configuration.getString(\"login_title\"),\n\t\t\t//\tEseoTest.driver.getTitle());\t\t\n\t\tAssert.assertEquals(\"Browser title bar does not appear correct.\",Configuration.getString(\"homepage_title\"),EseoTest.driver.getTitle());\n\t\tAssert.assertEquals(\"Site title does not appear correct.\",Configuration.getString(\"blog_title\"),EseoTest.driver.findElement(By.tagName(\"h1\")).getText());\n\t\tAssert.assertEquals(\"Site description does not appear correct.\",Configuration.getString(\"blog_description\"),EseoTest.driver.findElement(By.tagName(\"p\")).getText());\n\t\tAssert.assertTrue(\"Log in item does not appear correct.\",EseoTest.driver.findElement(By.linkText(Configuration.getString(\"mainmenu_login_item\"))).isDisplayed());\n\t}", "public static boolean openBrowser(final String url) {\n URI uri = null;\n \n try {\n uri = new URI(url);\n } catch (URISyntaxException e) {\n throw new IllegalArgumentException(\"URL has an incorrect format: \" + url);\n }\n\n return openBrowser(uri);\n\t}", "public static void openURL(String url) {\n try { //attempt to use Desktop library from JDK 1.6+\n Class<?> d = Class.forName(\"java.awt.Desktop\");\n d.getDeclaredMethod(\"browse\", new Class[] {java.net.URI.class}).invoke(\n d.getDeclaredMethod(\"getDesktop\").invoke(null),\n new Object[] {java.net.URI.create(url)});\n //above code mimicks: java.awt.Desktop.getDesktop().browse()\n }\n catch (Exception ignore) { //library not available or failed\n String osName = System.getProperty(\"os.name\");\n try {\n if (osName.startsWith(\"Mac OS\")) {\n Class.forName(\"com.apple.eio.FileManager\").getDeclaredMethod(\n \"openURL\", new Class[] {String.class}).invoke(null,\n new Object[] {url});\n }\n else if (osName.startsWith(\"Windows\"))\n Runtime.getRuntime().exec(\n \"rundll32 url.dll,FileProtocolHandler \" + url);\n else { //assume Unix or Linux\n String browser = null;\n for (String b : browsers)\n if (browser == null && Runtime.getRuntime().exec(new String[]\n {\"which\", b}).getInputStream().read() != -1)\n Runtime.getRuntime().exec(new String[] {browser = b, url});\n if (browser == null)\n throw new Exception(Arrays.toString(browsers));\n }\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(null, errMsg + \"\\n\" + e.toString());\n }\n }\n }", "public static void openURL(final String url) {\n Intent intent = new Intent(Intent.ACTION_VIEW).setData(Uri.parse(url));\n _instance.startActivity(Intent.createChooser(intent, \"\"));\n }", "public String openPHPTravels() {\r\n\t\tString URL = CommonProperty.getProperty(\"url\" + PropertyManager.getProperty(\"zone\").toUpperCase());\r\n\t\tLog.info(\"\");\r\n\t\tLog.info(\"Opening URL : \" + URL);\r\n\t\tdriver.navigate().to(URL);\r\n\t\tString title = driver.getTitle();\r\n\t\tLog.info(title);\r\n\t\treturn URL;\r\n\t}", "public void chromeLaunch() {\n\t\tSystem.setProperty(key, value);\n\t\ts=new ChromeDriver();\n\t\ts.manage().window().maximize();\n\t\ts.navigate().to(url);\n\t}", "@Test\r\n\t\tpublic static void LaunchUrl()\r\n\t\t{\r\n\t\t\tdriver.manage().deleteAllCookies();\r\n\t\t\tdriver.get(prop.getProperty(\"url\"));\r\n\t\t\tdriver.manage().window().maximize();\t\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\t\r\n\t\t\r\n\t\t}", "@Test\n\tpublic void launchSite()\t{\n\t\t\n\t\tSystem.setProperty(EdgeDriverService.EDGE_DRIVER_EXE_PROPERTY, \"D:\\\\Selenium Drivers\\\\MicrosoftWebDriver.exe\");\n\t\tEdgeDriver driver = new EdgeDriver();\n\t\tdriver.get(\"http://google.com\");\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tinvokeFirefoxBrowser();\n\t\t\n\t\t//Enter the URL\n\t\tenterURL(\"https://demoqa.com/buttons\");\n\t\t\n\t}", "public WebDriver launchBrowser(String browserName) {\n\n\t\tif (browserName.equals(\"chrome\")) {\n\t\t\t//System.setProperty(\"webdriver.chrome.driver\", \"/Users/naveenautomationlabs/Downloads/chromedriver\");\n\t\t\tWebDriverManager.chromedriver().setup();\n\t\t\tdriver = new ChromeDriver();\n\t\t} else if (browserName.equals(\"firefox\")) {\n\t\t\t//System.setProperty(\"webdriver.gecko.driver\", \"/Users/naveenautomationlabs/Downloads/geckodriver\");\n\t\t\tWebDriverManager.firefoxdriver().setup();\n\t\t\tdriver = new FirefoxDriver();\n\t\t} else if (browserName.equals(\"safari\")) {\n\t\t\tdriver = new SafariDriver();\n\t\t} else {\n\t\t\tSystem.out.println(\"please pass the correct browser....\");\n\t\t}\n\n\t\treturn driver;\n\t}", "public void open();", "public void open();", "@Before\n public synchronized static WebDriver openBrowser() {\n String browser = System.getProperty(\"BROWSER\");\n\n\n if (driver == null) {\n try {\n //Kiem tra BROWSER = null -> gan = chrome\n if (browser == null) {\n browser = System.getenv(\"BROWSER\");\n if (browser == null) {\n browser = \"chrome\";\n }\n }\n switch (browser) {\n case \"chrome\":\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n case \"firefox\":\n WebDriverManager.firefoxdriver().setup();\n driver = new FirefoxDriver();\n break;\n case \"chrome_headless\":\n WebDriverManager.chromedriver().setup();\n ChromeOptions options = new ChromeOptions();\n options.addArguments(\"headless\");\n options.addArguments(\"window-size=1366x768\");\n driver = new ChromeDriver(options);\n break;\n default:\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n }\n } catch (UnreachableBrowserException e) {\n driver = new ChromeDriver();\n } catch (WebDriverException e) {\n driver = new ChromeDriver();\n } finally {\n Runtime.getRuntime().addShutdownHook(new Thread(new BrowserCleanup()));\n }\n driver.get(\"http://demo.guru99.com/v4/\");\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n driver.manage().window().maximize();\n log.info(\"----------- START BRWOSER -----------\");\n\n }\n return driver;\n }", "@Override\r\n public void run() {\n ax.browserPane.setTitleAt(0,ax.browser.getTitle());\r\n String stringToken1 = null; \r\n try {\r\n stringToken1 = (\"<Navigate Home>::\" + getHome());\r\n } catch (IOException ex) {\r\n Logger.getLogger(AxBrowser.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n ax.consoleTextArea.setText(stringToken1);\r\n //Put the current html address in the addressbar\r\n ax.addressBar.setText(ax.browser.getCurrentLocation());\r\n \r\n }", "@Test\n\tpublic void start() {\n\t\t\n\t\tSeleniumUtil.startDriverFirefox(\"DEV_ROBO\");\n\t\t\n\t\tSeleniumUtil.openURL(\"https://www.cadesp.fazenda.sp.gov.br/(S(aljupn5501cd5jefroucepm3))/Pages/Cadastro/Consultas/ConsultaPublica/ConsultaPublica.aspx\");\n\n\t}" ]
[ "0.7944181", "0.7852537", "0.7688671", "0.7678371", "0.7652908", "0.7652619", "0.76521796", "0.7374432", "0.73332006", "0.7304134", "0.72882944", "0.72413325", "0.7235239", "0.723461", "0.7225777", "0.722195", "0.71848166", "0.7100043", "0.7070772", "0.7046309", "0.7031809", "0.70311856", "0.7018413", "0.70109975", "0.7002201", "0.6974719", "0.69746476", "0.6969309", "0.6961924", "0.6955022", "0.6918705", "0.69131374", "0.6906012", "0.68799555", "0.6842127", "0.68351364", "0.6829531", "0.6827427", "0.68254536", "0.68133944", "0.68125844", "0.6782525", "0.67736095", "0.67710465", "0.6766274", "0.67566746", "0.6739722", "0.67366296", "0.67209166", "0.66917735", "0.6689982", "0.66776025", "0.66771966", "0.66723895", "0.6667985", "0.66590965", "0.66414475", "0.6640817", "0.6611486", "0.6603293", "0.659561", "0.65950155", "0.65859663", "0.65647143", "0.6533572", "0.6514277", "0.6499647", "0.64956343", "0.64949024", "0.6466125", "0.64629436", "0.64625365", "0.64588726", "0.6455865", "0.643237", "0.6416908", "0.64034224", "0.6397591", "0.63958955", "0.6386878", "0.6385425", "0.6376754", "0.63564086", "0.63563645", "0.6349777", "0.6343073", "0.6342429", "0.63341427", "0.6331631", "0.6320909", "0.63186723", "0.631678", "0.62952876", "0.62840694", "0.6283667", "0.62828493", "0.62828493", "0.62814355", "0.627771", "0.627573" ]
0.7901265
1
This will close browser
public void closeBrowser(){ driver.quit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void closeBrowser() {\n System.out.println(\"Browser closed\");}", "public void closeBrowser(){\n\t driver.close();\n\t \t }", "public static void CloseBrowser() {\n\t\tBrowser.Driver.quit();\n\t}", "public void closeBrowserSession() {\n\t\tdriver.quit();\n\t}", "public static void closeBrowser(){\n if(CHOSEN_BROWSER.equals(FIREFOX)) {\n if(driver != null) {\n driver.quit();\n return;\n }\n return;\n }\n if (driver != null){\n driver.close();\n driver.quit();\n }\n }", "public static void browserClose() {\r\n\t// Make sure we shut everything down to avoid memory leaks\r\n\tdriver.close();\r\n\tdriver.quit();\r\n\tdriver = null;\r\n}", "public static void closeBrowser() {\n\t\tLOG.info(\"Closing current browser window.\");\n\t\tConstants.driver.close();\n\t\tLOG.info(\"Closed current browser window.\");\n\n\t}", "public void closeAllBrowser(){\r\n\tdriver.quit();\t\r\n\t}", "@Test (priority = 5)\n\t@Then(\"^Close browser$\")\n\tpublic void close_browser() throws Throwable {\n\t\t\n\t\tobjDriver.close();\n\t\tobjDriver.quit();\n\t\t\n\t}", "public void close() {\r\n driver.quit();\r\n }", "private void close() throws Exception {\n browser.getDriver().close();\n }", "@After\n public void closeBrowser(){\n\n browserManager.setcloseBrowser();// calling browser method to close the browser\n }", "public void quitBrowser(){\n\t\t driver.quit();\n\t }", "public void BrowserQuit() {\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- The Browser should be closed\");\r\n\t\ttry{\r\n\t\t\tdriver.manage().deleteAllCookies();\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\r\n\t\t\tdriver.quit();\r\n\t\t\tSystem.out.println(\"Browser Closed\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:-The Browser is closed\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- No Browser is opened currently\");\r\n\r\n\t\t}\r\n\r\n\t}", "@AfterTest\n\tpublic void closeBrowser() {\n\t\tdriver.close();\n\t}", "public static void quitBrowser() {\r\n\t\ttry {\r\n\t\t\t// Thread.sleep(3000);\r\n\t\t\tdriver.quit();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Driver instance does not exist \" + e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void closeAllBrowsers() {\n\n driver.quit();\n\n\n }", "public static void closeBrowser()\n\t{\n\t\t\tdriver.quit();\n\t\t\tBaseUI.logger.log(Status.INFO,ReadPropertiesFile.getBrowser()+\" is closed Successfully \");\n\t\t\treport.flush();\n\t\t\tlog.info(\"Closing Browser \\n\");\n\t}", "public void close() {\n if (driver.get() != null) {\n driver.get().quit();\n driver.set(null);\n }\n }", "public void close() {\n getCloseButton().click();\n }", "@When(\"^user should close the browsers$\")\n\tpublic void user_should_close_the_browsers() throws Throwable {\n\t\tdriver.quit();\n\t}", "public void close(){\r\n \tStage stage = (Stage) exit.getScene().getWindow();\r\n\t stage.close();\r\n\t main.browserInteraction.close();\r\n }", "@AfterClass\n\tpublic void closeBrowser(){\n\t\tdriver.quit();\n\t}", "@AfterMethod\n\tpublic void quitBrowser(){\n\t\tbrowser.closeBrowser(driver);\n\t}", "@AfterClass\n public void closeBrowser() throws IOException {\n driver.quit();\n }", "public void closeDriver() {\n driver.quit();\n }", "protected void closeWeb() {\n closeWeb(currentWeb());\n }", "public static void closeMe() {\n window.close();\n }", "public void closeWindow() {\n\t\tgetDriver().close();\n\n\t}", "public static void closeBrowser(WebDriver driver)\r\n\t{\r\n\t\tdriver.close();\r\n\t}", "public void close() {\n seleniumDriver.close();\n }", "public void closeAllBrowsers() {\r\n\t\ttry {\r\n\t\t\tif (driver != null) {\r\n\t\t\t\tdriver.quit();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void closeWindow() throws Exception {\n\t\t\tthis.driver.close();\r\n\t\t}", "public void quitBrowsers() {\n\n\t\tgetDriver().quit();\n\t}", "private static void Close () {\n frame.setVisible (false);\n frame.dispose();\n System.exit(0);\n }", "public static void closeAllBrowser() {\n\t\tLOG.info(\"Closing all browser window.\");\n\t\tConstants.driver.quit();\n\t\tLOG.info(\"Closed all browser window.\");\n\t}", "private void closeFrame()\n\t{\n\t\tSystem.exit(0);\n\t}", "public static void quit() throws Exception\r\n\t{\r\n\t\t//Close IronWasp Connection\r\n\t\tString browser = FilesAndFolders.getPropValue(\"driverName\");\r\n\t\tif (browser.contentEquals(\"firefoxIronWasp\"))\r\n\t\t{\r\n\t\t\tIronWasp.workflowEnd();\t\t\t\r\n\t\t}\r\n\r\n\t\t// Closing Browser instance\r\n\t\tdriver.quit(); \r\n\t}", "void close() {\n\t\t\n\t\tthis.frame.setVisible(false);\n\t\tthis.frame.dispose();\n\t\t\n\t}", "@AfterSuite (alwaysRun = true)\n public static void closeBrowser() {\n report.endTest(test);\n //line below will flush the report\n report.flush();\n\n\n //line below will open the report\n driver.get(\"C:\\\\Users\\\\zakir\\\\Documents\\\\MyMavenProject\\\\\" + reportPath);\n\n //line below will close the report\n //report.close();\n\n\n // driver.quit();\n }", "public void quitDriver() {\n webDriver.quit();\n webDriver = null;\n }", "@AfterSuite\n\tpublic void closeBrowser(){\n\t\t\n\t\ttry{\n\t\t\tdriver.close();\n\t\t\tThread.sleep(5000);\n\t\t\t//MailService_API.zip(System.getProperty(\"user.dir\")+\"\\\\test-output\\\\Hybrid Security Telepath Test Suite\");\n\t\t\t//MailService_API.Email(config.getProperty(\"sendTo\"), config.getProperty(\"sendCC\"), config.getProperty(\"sendBCC\"), config.getProperty(\"sendMailFrom\"), config.getProperty(\"sendMailPassword\"));\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public void closeWindow() {\n\t\tdriver.close();\n\t\tdriver.switchTo().window(winHandleBefore);\n\t}", "@AfterClass(description = \"After class: closing browser\")\n public void quitBrowser()\n {\n HTMLReport htmlReport = new HTMLReport();\n htmlReport.log(\"STARTING AfterClass\");\n htmlReport.logINFO(\"The browser is quit\");\n driver.quit();\n htmlReport.logINFO(\"The end of test reporting\");\n reports.endTest(test);\n htmlReport.logINFO(\"Saving all logs to file\");\n reports.flush();\n }", "public void quit()\r\n {\r\n brokerage.logout(this);\r\n myWindow = null;\r\n }", "private void closeProgram()\n {\n window.close();\n }", "public void exit()\r\n\t{\r\n\t\tmainFrame.exit();\r\n\t}", "public void close()\n {\n driver.close();\n }", "public void closeKiosk() {\n\t\tdriver.close();\n\t}", "public void close()\n {\n\n window.close();\n try\n {\n screen.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }", "public void close() {\n System.exit(0);\n }", "void forceClose();", "@AfterMethod\r\n\tpublic void closeapp()\r\n\t{\n\t\tdriver.quit();\r\n\t}", "public void close() {\n\t\tSystem.out.println(\"Scraper terminated\");\n\t}", "public void close() {\n\t\tgetFrame().dispatchEvent(new WindowEvent(getFrame(), WindowEvent.WINDOW_CLOSING));\n\t\t\n\t}", "public void closeClick() {\n timeline.stop();\n threadWorker.shutDownExecutor();\n Platform.exit();\n }", "public void close() {\n\t\tframe.setVisible(false);\n\t}", "@Override\n\t\t\tpublic void windowClosing(WebBrowserEvent arg0) {\n\t\t\t}", "@AfterTest\n\tpublic void CloseWindow() {\n\t\t//driver.close();\n\t}", "public boolean requestCloseWindow() \n {\n return true; \n }", "public static void close() {\n\t\tfindWindow();\n\t\t\n\t\tuser32.SendMessageA(handle, CLOSE_COMMAND, 0x00000000, 0x00000000);\n\t}", "public void close() {\n closePopup();\n }", "public void close() {\r\n dispatchEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));\r\n }", "public void closeDriver(){\n\t\tdriver.quit();\n\t\tlogger.info(\"End of Execution\");\n\t}", "public void closeWindow() {\n\t\tframeUnableToBuyPopup.dispose();\n\t}", "public void closeDown() {\n\t\tdispose();\n\n\t}", "private void exitApp()\n {\n if(spider.isCrawling())\n {\n stopCrawler();\n showTransition(1000);\n Timer task = new Timer(1000, (ActionEvent e)->\n {\n System.exit(0);\n });\n\n task.setRepeats(false);\n task.start();\n }\n \n else System.exit(0);\n }", "private void close() {\n WindowEvent winClose = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);\n Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClose);\n \n }", "@Override\n @Test\n public void closeWindow_selected() {\n // open a second page\n guiTestUIMap.testLink().click();\n checkLastStepStatus(TestStatus.PASSED);\n // close the main page\n aludraWebGUI.perform().closeWindows(\"el\", \"op\", GUITestUIMap.TEST_PAGE_TITLE);\n checkLastStepStatus(TestStatus.PASSED);\n // try to select the main page\n aludraWebGUI.perform().selectWindow(GUITestUIMap.TEST_PAGE_TITLE);\n // The following check fails for Google Chrome due to a Selenium RC issue which is not expected to be fixed\n // checkLastStepStatus(TestStatus.FAILEDAUTOMATION);\n }", "public final boolean close(boolean force)\n {\n return getBrowser().close(force);\n }", "public void Exit(){\n\t\t\t\tclose();\n\t\t\t}", "@AfterMethod\n\tpublic void close(){\n\t\tquit();\n\t}", "private void close() {\n WindowEvent winClosingEvent = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);\n Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);\n }", "public HomePage close() {\n\n click(btn_Close);\n driver.switchTo().defaultContent();\n if (verifyElementPresent(btn_genericYes)) {\n\n click(btn_genericYes);\n }\n return new HomePage(driver, dataFileName);\n }", "private void closeProgram(){\n boolean answer = ConfirmBox.display(\"Title\", \"Sure you want to exit?\");\n if(answer==true){\n window.close();\n }\n }", "public static void quitDriver() {\t\n\t\t//Quitting all instace of webdriver\n\t\tappDriver.quit();\n\t\t}", "public void close() {\t\t\n\t}", "private void close() {\n WindowEvent winClosingEvent = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);\nToolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);\n }", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void closeDriver() {\r\n\t\tdriver.close();\r\n\t\tdriver.quit();\r\n\t\tlogger.info(\"Closing Selenium initiallised browser.\");\r\n\t}", "private void close() {\n\t\t\t\t// name.getScene().getWindow().hide();\n\t\t\t\tdialogStage.fireEvent(new WindowEvent(dialogStage,WindowEvent.WINDOW_CLOSE_REQUEST));\n\t\t\t}", "public void close()\n {\n setVisible (false);\n dispose();\n }", "public void close() {}", "public String closeBrowser(String object, String data) {\n\t\tlogger.debug(\"Checking existance of browser\");\n\t\ttry {\n\t\t\tdriver.close();\n\t\t} catch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Object doest not exist\";\n\t\t}\n\t\treturn Constants.KEYWORD_PASS;\n\t}", "private void close() {\n WindowEvent winClosingEvent = new WindowEvent(this, WindowEvent.WINDOW_CLOSING);\n Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);\n }", "public void close() {\r\n\t\t\r\n\t\tWindowEvent winClosingEvent = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);\r\n\t\tToolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);\r\n\t}" ]
[ "0.8499674", "0.83181995", "0.8186501", "0.8119145", "0.80446345", "0.79779965", "0.7971495", "0.7828199", "0.77556586", "0.774003", "0.77377015", "0.77109355", "0.76993597", "0.769058", "0.7668796", "0.76311475", "0.75997984", "0.75604403", "0.7544507", "0.749894", "0.7408145", "0.7365734", "0.73656964", "0.7337792", "0.7273666", "0.72644174", "0.7250023", "0.72129047", "0.71891993", "0.71519053", "0.7138429", "0.7124654", "0.71225387", "0.71033496", "0.71029335", "0.70833045", "0.7083145", "0.7075087", "0.70582145", "0.7054851", "0.7052811", "0.703991", "0.70253557", "0.7019288", "0.701203", "0.7006104", "0.6991648", "0.6989164", "0.69713336", "0.696157", "0.69459295", "0.69380325", "0.6911768", "0.6911396", "0.6911006", "0.6910414", "0.68719196", "0.6858538", "0.68471533", "0.6835901", "0.683", "0.6824826", "0.682154", "0.6817528", "0.6816759", "0.6806455", "0.68004435", "0.6787296", "0.67816025", "0.673961", "0.6719247", "0.6694467", "0.66876835", "0.668059", "0.66797274", "0.66719127", "0.6660202", "0.6656676", "0.66320163", "0.66320163", "0.66320163", "0.66320163", "0.66320163", "0.66320163", "0.66320163", "0.66320163", "0.66320163", "0.66320163", "0.66320163", "0.66320163", "0.66320163", "0.66320163", "0.66320163", "0.66307473", "0.66277725", "0.6625728", "0.6625417", "0.662443", "0.6618706", "0.661143" ]
0.83878714
1
== OverLoading Function ==//
private MerchantRecipe createMerchantRecipe(ItemStack item, ItemStack sellingItem, ItemStack item2) { MerchantRecipe recipe = new MerchantRecipe(sellingItem, 10000); recipe.setExperienceReward(false); recipe.addIngredient(item); recipe.addIngredient(item2); return recipe; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void SelfCallForLoading() {\n\t}", "private static void load(){\n }", "@Override\r\n\tprotected void initLoad() {\n\r\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\r\n\tprotected void load() {\n\t\t\r\n\t}", "@Override\n\tprotected void load() {\n\n\t}", "@Override\n\tprotected void load() {\n\n\t}", "@Override\r\n\tpublic void load() {\n\r\n\t}", "@Override\r\n\tpublic void load() {\n\t}", "@Override\n public void load() {\n }", "@Override\n public void load() {\n }", "public void load() {\n\t}", "public abstract void loaded();", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "@Override\n\tpublic void onLoad() {\n\t\t\n\t}", "public void load() ;", "public void load() {\n }", "@Override\n\t\t\t\t\t\t\t\t\tpublic void downLoadBegin() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}", "public static void load() {\n }", "@Override\n\tprotected void lazyLoad() {\n\t}", "public abstract void load();", "protected void loadData()\n {\n }", "@Override\r\n\tpublic void load() {\n\t\ts.load();\r\n\r\n\t}", "public void onLoad() {\n\t}", "void load();", "void load();", "public void load();", "public void load();", "private void LoadContent()\n {\n \n }", "protected abstract void loadData();", "@Override\n\tpublic boolean isLoad() {\n\t\treturn false;\n\t}", "public abstract void loadData();", "public abstract void loadData();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "protected void onStartLoading() { forceLoad();}", "@Override\r\n\tpublic void initialLoad() throws IOException {\n\t\t\r\n\t}", "@Override\n\t\t\t\t\tpublic void beginLoad(int type) {\n\n\t\t\t\t\t}", "@Override\n public void onLoadResources() {\n }", "@Override\n\tprotected void isLoaded() throws Error \n\t{\n\t\t\n\t}", "@Override\r\n public void loadResources() {\n\r\n }", "protected void additionalProcessing() {\n\t}", "private void load(Object o) {\n \n }", "public void load (){\n load(MAX_PREZ);\n }", "boolean isForceLoaded();", "@Override\n\tprotected void interr() {\n\t}", "public boolean isLoaded(){return true;}", "@Override\n\tprotected void isLoaded() throws Error {\n\t\t\n\t}", "@Override\n\tprotected void isLoaded() throws Error {\n\t\t\n\t}", "public void loadStatus (){\n\t}", "public void loadData ( ) {\n\t\tinvokeSafe ( \"loadData\" );\n\t}", "@Override\n public void loadGame() {\n\n }", "@Override\n protected void onStartLoading() {\n forceLoad();\n\n }", "void loadData();", "void loadData();", "private static void loadMemo() {\n\t\t\n\t}", "void loadNext();", "private void loadLists() {\n }", "protected abstract void onLoad() throws IOException, ConfigInvalidException;", "public void LoadContent(){\n }", "protected abstract void loader() throws IOException;", "private void loadGameFiles(){\n\t}", "private void initDataLoader() {\n\t}", "@Override\n protected void onStartLoading() {\n\n forceLoad();\n }", "public void libraryLoaded();", "public void loaded(){\n\t\tloaded=true;\n\t}", "@Override\n protected int getLoaderId() {\n return 1;\n }", "public abstract boolean Load();", "@Override\n public void load() throws IOException, ClassNotFoundException {\n \n }", "private void init() {\n\n\t}", "public void beginLoad(int libraryCount);", "private void initialize() {\n\t\t\n\t}", "private Container Load() {\n return null;\r\n }", "public void load() {\n handleLoad(false, false);\n }", "void massiveModeLoading( File dataPath );", "private void initSharedPre() {\n\t}", "@Override\n public void setLoadOnStartup(int los) {\n }", "private ClinicFileLoader() {\n\t}", "@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}", "@Override\r\n\tprotected void processInit() {\n\r\n\t}", "@Override\r\n\tpublic void loadHeader() {\n\r\n\t}", "protected boolean func_70814_o() { return true; }", "public static void load() {\n load(false);\n }", "void onLoaderLoading();", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private void Initialized_Data() {\n\t\t\r\n\t}", "@Override\n public void onLoad(String url) {\n \n }", "private void init() {\n\n\n\n }", "@Override\r\n \tpublic File getLoadPath() {\n \t\treturn null;\r\n \t}", "@Override\n public void onLowMemory() {\n \tsuper.onLowMemory();\n }", "public static void main(String[] args) {\n\t\tint i=88;\r\n\t\toverLoadDemo obj=new overLoadDemo();\r\n\t\tobj.overLoad();\r\n\t\t//obj.overLoad(5);\r\n\t\tobj.overLoad(10, 10);\r\n\t\tobj.overLoad(i);\r\n\t\tdouble a = obj.overLoad(12.5);\r\n\t\tSystem.out.print(\"Thereturned value from the DOUBLE overLoadmethod is \"+a);\r\n\t}", "File getLoadLocation();", "private void InitData() {\n\t}", "@Override\n\tpublic void onPrepareLoad(Drawable arg0) {\n\t\t\n\t}", "void updateLoad(){\n\t\tdouble aloadFactor = elements/Table.length;\r\n\t\tif(aloadFactor==1){\r\n\t\t\tRehash();\r\n\t\t}\r\n\t\tloadFactor = ((double)elements)/Table.length;\r\n\t}", "protected void _init(){}", "@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}", "public abstract void load() throws IOException;", "@Override\r\n\tprotected void init2() throws Exception {\n\r\n\t}", "protected void init() {\n // to override and use this method\n }" ]
[ "0.72066814", "0.7120243", "0.6993174", "0.6979727", "0.6979727", "0.6979727", "0.6936549", "0.68384355", "0.68384355", "0.6759246", "0.667194", "0.66435224", "0.6590988", "0.65536094", "0.6550412", "0.6540198", "0.6512877", "0.6493577", "0.64438987", "0.6419393", "0.6385422", "0.63066065", "0.62927777", "0.62550294", "0.62010765", "0.61970013", "0.61872387", "0.61872387", "0.6093438", "0.6093438", "0.6057893", "0.6031793", "0.59986293", "0.5970976", "0.5970976", "0.5958208", "0.5934849", "0.5930428", "0.5927609", "0.5922044", "0.58930844", "0.5890589", "0.5881445", "0.58553576", "0.58393615", "0.58174396", "0.5812372", "0.5785024", "0.5780523", "0.5780523", "0.5775322", "0.5762396", "0.5762147", "0.5759033", "0.5756149", "0.5756149", "0.5744316", "0.57427555", "0.57379633", "0.5737408", "0.5727812", "0.57171077", "0.5704974", "0.5704103", "0.5701015", "0.5700687", "0.5691197", "0.5685433", "0.568437", "0.5681024", "0.5667646", "0.5664754", "0.5662498", "0.5654702", "0.5637925", "0.5634532", "0.56226784", "0.56215954", "0.56201684", "0.5605784", "0.55979735", "0.5597493", "0.5588088", "0.55738217", "0.5562736", "0.55599034", "0.5554303", "0.55523133", "0.5551965", "0.55414045", "0.5528132", "0.5527686", "0.5519558", "0.5507755", "0.5506889", "0.5506143", "0.5503428", "0.54998815", "0.54984814", "0.5494543", "0.54930246" ]
0.0
-1
TODO Autogenerated method stub
@Override @Nullable public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { if (mView == null) { initView(inflater, container); } if (getArguments() != null) { uId = getArguments().getString("uId"); } initData(); return mView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
Intent intent = new Intent(); intent.setAction("homeShoppingMallForMerchant.GoodsDetail"); String pid = dataBeanList.get(position).getPId(); intent.putExtra("pid", pid); startActivity(intent);
@Override public void onItemClick(View view, RecyclerView.ViewHolder holder, int position) { Intent intent = new Intent(); intent.setAction(Constants.RIGHTMENU_ITEM_CLICK_ACTION); intent.setComponent(new ComponentName("app.cn.extra.mall.merchant", "app.cn.extra.mall.merchant.broadcast.MovingTrajectoryReceiver")); String pid = dataBeanList.get(position).getPId(); intent.putExtra("pid", pid); P2PMessageActivity.context.sendBroadcast(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n Intent intent = new Intent(mContext, DemandDetailActivity.class);\n //intent.putExtra(\"id\",String.valueOf(item.getPid()));\n intent.putExtra(\"pid\", String.valueOf(item.getPid()));\n intent.putExtra(\"uid\", String.valueOf(item.getUid()));\n mContext.startActivity(intent);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n PatientProvider obj = (PatientProvider)parent.getItemAtPosition(position);\n int pid=obj.getId();\n Intent i =new Intent(getApplicationContext(),PatientDetails.class);\n i.putExtra(\"pid\",String.valueOf(pid));\n startActivity(i);\n }", "@Override\n public void onClick(View v) {\n String item = list.get(position).toString();\n Intent intent = new Intent(holder.pname.getContext(),Add_Updatelead__bankresult_Activity.class);\n intent.putExtra(\"itemName\",item);\n intent.putExtra(\"invoice\", pveo);\n holder.pname.getContext().startActivity(intent);\n\n }", "public void onClick(View v) {\n switch (v.getId()) {\n case R.id.pss:\n\n // getting values from selected ListItem\n\n // Starting new intent\n Intent in = new Intent(getActivity().getApplicationContext(),\n EditData.class);\n // je récupère le PID de la donnée cliquée\n in.putExtra(TAG_PID, id_pss);\n\n\n // starting new activity and expecting some response back\n startActivityForResult(in, 100);\n\n break;\n case R.id.pab:\n\n // getting values from selected ListItem\n\n // Starting new intent\n Intent in2 = new Intent(getActivity().getApplicationContext(),\n EditData.class);\n // sending pid to next activity\n in2.putExtra(TAG_PID, id_pab);\n\n\n // starting new activity and expecting some response back\n startActivityForResult(in2, 100);\n\n break;\n case R.id.tpr:\n\n // getting values from selected ListItem\n\n // Starting new intent\n Intent in3 = new Intent(getActivity().getApplicationContext(),\n EditData.class);\n // sending pid to next activity\n in3.putExtra(TAG_PID, id_tpr);\n\n\n // starting new activity and expecting some response back\n startActivityForResult(in3, 100);\n\n break;\n }\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent(v.getContext(), DetailsDepto.class);\n Bundle extras = new Bundle();\n extras.putString(\"EXTRA_IdDepto\", listItemsInmueble.getIDDepto());\n extras.putBoolean(\"logedState\", logedIn);\n extras.putString(\"idDepto\",hasDepto);\n extras.putString(\"idUser\",idUser);\n extras.putString(\"user\", user);\n intent.putExtras(extras);\n v.getContext().startActivity(intent);\n\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n ApproveIttekaafModel approveIttekaafModel;\n approveIttekaafModel= IttekaafLists.get(position);\n\n\n\n Intent myIntent = new Intent(IttekaafListActivity.this, IttekaafAcceptedRejected.class);\n myIntent.putExtra(\"userName\", approveIttekaafModel.getName());\n myIntent.putExtra(\"userPhoneNo\", approveIttekaafModel.getPhoneNo());\n\n\n myIntent.putExtra(\"mosqueId\",myphone);//mosqueid\n startActivity(myIntent);\n\n }", "public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Intent nextScreen = new Intent(getApplicationContext(), ListActivity.class);\r\n nextScreen.putExtra(\"complaint_id\",mProductList.get(position).getCredits());\r\n startActivity(nextScreen);\r\n\r\n }", "public void onClick(View v) {\n switch (v.getId()) {\n case R.id.hsmic:\n\n // getting values from selected ListItem\n\n // Starting new intent\n Intent in = new Intent(getActivity().getApplicationContext(),\n EditData.class);\n // je récupère le PID de la donnée cliquée\n in.putExtra(TAG_PID, id_hsmic);\n\n\n // starting new activity and expecting some response back\n startActivityForResult(in, 100);\n\n break;\n case R.id.msmic:\n\n // getting values from selected ListItem\n\n // Starting new intent\n Intent in2 = new Intent(getActivity().getApplicationContext(),\n EditData.class);\n // sending pid to next activity\n in2.putExtra(TAG_PID, id_msmic);\n\n\n // starting new activity and expecting some response back\n startActivityForResult(in2, 100);\n\n break;\n case R.id.ming:\n\n // getting values from selected ListItem\n\n // Starting new intent\n Intent in3 = new Intent(getActivity().getApplicationContext(),\n EditData.class);\n // sending pid to next activity\n in3.putExtra(TAG_PID, id_ming);\n\n\n // starting new activity and expecting some response back\n startActivityForResult(in3, 100);\n\n break;\n }\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(context, Detail_Product_Normal.class);\n intent.putExtra(Param_Collection.EXTRA_POST_ID, item.getContent().getPostId().toString());\n intent.putExtra(Param_Collection.EXTRA_POST_PRODUCT_TITLE, item.getActivity());\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(intent);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n DonationData donationData = list.get(position);\n Intent intent = new Intent(getContext(), DonationDetailsActivity.class);\n intent.putExtra(\"donationData\",donationData);\n startActivity(intent);\n\n }", "@Override\n public void onClick(View v) {\n\n\n Intent in = new Intent(mContext, SingleItemActivity.class);\n in.putExtra(\"titleMain\", itemSubModel.getName());\n in.putExtra(\"wishListStatus\", itemSubModel.getStatusWishList());\n in.putExtra(\"productId\", itemSubModel.getId());\n mContext.startActivity(in);\n//\n\n }", "@Override\n\t\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View v,int position, long id) {\n\t\t\t\t\t\tintent = new Intent(ListPromoActivity.this,DetailPromoActivity.class);\n\t\t\t\t\t\tintent.putExtra(\"promo\", listPromo.get(position));\n\t\t\t\t\t\tstartActivity(intent);\n\n\t\t\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int pos, long id) {\n Intent intent = new Intent(getApplicationContext(), Detail.class);\n // intent.putExtra(\"i\",listAlarm.i);\n startActivity(intent);\n\n\n\n }", "@Override\n public void onClick(View v) {\n\n Intent in = new Intent(mContext, SingleItemActivity.class);\n in.putExtra(\"titleMain\", itemSubModel.getName());\n in.putExtra(\"wishListStatus\", itemSubModel.getStatusWishList());\n in.putExtra(\"productId\", itemSubModel.getId());\n\n mContext.startActivity(in);\n//\n }", "@Override\n public void OnItemClick(View view, int postion) {\n Intent intent = new Intent(MyPubishActivity.this, IndexDetailActivity.class);\n String entryId = String.valueOf(publishList.get(postion).getItem_id());\n intent.putExtra(\"entryId\", entryId);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(context,DetailsActivity.class);\n intent.putExtra(\"commodityId\", commodityListBeanXX.getCommodityId());\n context.startActivity(intent);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Cursor cursor = ResolverHelper.getData((int) id, MainListaActivity.this.getContentResolver());\n Bundle bundle = new Bundle();\n while(cursor.moveToNext()){\n bundle.putString(Constants._ID,cursor.getString(0));\n bundle.putString(Constants.PRODUCENT,cursor.getString(1));\n bundle.putString(Constants.MODEL_NAME,cursor.getString(2));\n bundle.putString(Constants.ANDR_VER,cursor.getString(3));\n bundle.putString(Constants.WWW,cursor.getString(4));\n }\n cursor.close();\n Intent intent = new Intent(MainListaActivity.this,PhoneActivity.class);\n intent.putExtras(bundle);\n startActivity(intent);\n }", "@Override\r\n public void onClick(View view) {\n Intent intent = new Intent(context, DetailActivity.class);\r\n intent.putExtra(\"item\", itemList.get(position));\r\n context.startActivity(intent);\r\n }", "protected void onListItemClick(ListView l, View v, int position, long id) {\n String pName = arrName.get(position);\n String pPrice = arrPrice.get(position);\n String pUsefor = arrUsefor.get(position);\n String pHowtouse = arrHowtouse.get(position);\n String pSeriousAdverse = arrSeriousAdverse.get(position);\n String pCommonAdverse = arrCommonAdverse.get(position);\n String pRegis = arrRegis.get(position);\n\n// Class ourClass = null;\n Intent pillDetailIntent = new Intent(this, PillDetail.class);\n pillDetailIntent.putExtra(\"pName\", pName);\n pillDetailIntent.putExtra(\"pPrice\", pPrice);\n pillDetailIntent.putExtra(\"pUsefor\", pUsefor);\n pillDetailIntent.putExtra(\"pHowtouse\", pHowtouse);\n pillDetailIntent.putExtra(\"pSeriousAdverse\", pSeriousAdverse);\n pillDetailIntent.putExtra(\"pCommonAdverse\", pCommonAdverse);\n pillDetailIntent.putExtra(\"pRegis\", pRegis);\n startActivity(pillDetailIntent);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(mContext, BuyChildActivty1.class);\n intent.putExtra(\"id\", list.get(position).getTid());\n intent.putExtra(\"title\", list.get(position).getName());\n RUser.id = list.get(position).getTid();\n mContext.startActivity(intent);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n Intent producto = new Intent(context, CargaProducto.class);\n producto.putExtra(\"idF\", productoArrayList.get(position).getFarmacia().getId());\n producto.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n context.startActivity(producto);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(mContext, ItemDetailsActivity.class);\n\n intent.putExtra(\"name\", modellist.get(postition).getTitle());\n intent.putExtra(\"picture\", modellist.get(postition).getType() + postition);\n intent.putExtra(\"cost\", modellist.get(postition).getCost());\n intent.putExtra(\"id\", modellist.get(postition).getId());\n intent.putExtra(\"description\", modellist.get(postition).getDescription());\n intent.putExtra(\"extra\", modellist.get(postition).getExtra());\n\n mContext.startActivity(intent);\n// Toast.makeText(mContext, \"Make the user see the details of the item\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onclick(View view, int position, boolean islongclick) {\n Intent fooddetails=new Intent(FoodList.this,FoodDetails.class);\n\n // send food id to food details activity\n fooddetails.putExtra(\"FoodId\",adapter.getRef(position).getKey());\n startActivity(fooddetails);\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent,View view,int position,long id){\n\t\t\t\tGoods goods = list.get(position - 1);\n\t\t\t\tIntent intent = new Intent(SaleActivity.this, PayActivity.class);\n\t\t\t\tintent.putExtra(\"tradeName\", goods.getTableName());\n\t\t\t\tintent.putExtra(\"price\", goods.getPrice());\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.putExtra(\"actid\", actid);\n\t\t\t\tintent.setClass(Activity_detail.this, BaoMing.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long id) {\n\n Intent detailsIntent = new Intent(ExhibitorActivity.this, ExhibitorDetailsActivity.class);\n detailsIntent.putExtra(ExhibitorDetailsActivity.FROM_DB, true);\n detailsIntent.putExtra(ExhibitorDetailsActivity.ID_KEY, id);\n Log.e(\"from list\", id + \"\");\n startActivity(detailsIntent);\n }", "public void callAddcartPage(MenuItem item) {\n\n // declare Intent ojbect to call another activity\n Intent calladdCartPage = new Intent(this,Order_Details.class);\n // startActivity by calling intent object\n startActivity(calladdCartPage);\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tIntent intent=new Intent();\r\n\t\t\t\tintent.putExtra(\"goods_id\", goods_id);\r\n\t\t\t\tintent.setClass(GoodsActivity.this, LoadurlActivity.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}", "@Override\n public void onClick(View view, final int position) {\n positionSeleced=position;\n FamilyDetails familyMemberDetail=familyDetailsList.get(position);\n Toast.makeText(getApplicationContext(), \"Selected: \" + familyMemberDetail.getName() + \", \" + familyMemberDetail.getUbaindid().toString(), Toast.LENGTH_LONG).show();\n Intent i = new Intent(FamilyInfoActivity.this, FamilyDetailsActivity.class);\n i.putExtra(\"familyrecord\",familyRecord[position]);\n startActivity(i);\n \n }", "@Override\n public void onItemClick(BaseQuickAdapter adapter, View view, int position) {\n\n Intent intent = new Intent(this, SpeechAssessmentActivity.class);\n// intent.putExtra(\"id\", id);\n startActivity(intent);\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n Intent intent = new Intent(this, RedyListproducts.class);\n intent.putExtra(\"LIST_NAME\",alSavedLists.get(position));\n startActivity(intent);\n\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tIntent intent=new Intent(getActivity(),Productdetailactivity.class);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tintent.putExtra(\"productid\", jobject1.getString(\"Ipro_id\"));\n\t\t\t\t\t\t\tintent.putExtra(\"productname\", jobject1.getString(\"Ipro_name\"));\n\t\t\t\t\t\t\tintent.putExtra(\"buynum\",\"30天购买人数 \"+jobject1.getString(\"purchaseNum\"));\n\t\t\t\t\t\t\tintent.putExtra(\"day\", \"期限(天)\"+jobject1.getString(\"dayDiff\"));\n\t\t\t\t\t\t\tintent.putExtra(\"shouyi\", String.format(\"%.2f\", jobject1.getDouble(\"pctInterest\"))+\"%\");\n\t\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(context, SingleVacancyActivity.class);\n intent.putExtra(\"vacancyid\",vacancy.getId());\n context.startActivity(intent);\n Log.i(\"VacancyAdapter\", \"onClick: \"+ vacancy.getId());\n\n }", "@Override\n\t\t\t\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\t\t\t\t\t\t\t\tInSpTaskBean bean = mylist.get(position);\n\t\t\t\t\t\t\t\tString device_id = bean.getTaskId();\n\t\t\t\t\t\t\t\tIntent intent = new Intent(RealTimeDataActivity.this, RealtimeleveldataActivity.class);\n\t\t\t\t\t\t\t\tintent.putExtra(\"device_id\", device_id);\n\t\t\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\t\t}", "@Override\n public void onClick(View view) {\n\n Intent intent = new Intent(context, DetailActivity.class);\n intent.putExtra(\"YourValueKey\", array_detailview.get(position));\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(intent);\n\n// view.getContext().startActivity(new Intent(view.getContext(), DetailActivity.class));\n// context.startActivity(new Intent(context, DetailActivity.class));\n\n\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {\n Intent intent = new Intent(MainActivity.this, ChampionProfileActivity.class);\n\n //Using bundle to pass variable to the next activity\n Bundle bundle = new Bundle();\n bundle.putInt(\"position\", position);\n\n intent.putExtras(bundle);\n\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n\n Intent intent1=new Intent(mContext,ProfileActivity.class);\n intent1.putExtra(\"uid\",String.valueOf(item.getUid()));\n mContext.startActivity(intent1);\n\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long rowId) {\n\n Log.d(\"ROWSELECT\", \"\" + rowId);\n //Toast.makeText(this,\"Elemento Clicado\" + position,Toast.LENGTH_SHORT).show();\n Intent intent= new Intent(getApplicationContext(),productDetailActivity.class);\n intent.putExtra(\"producto\",mAdapter.getItem(position).getProducto());\n intent.putExtra(\"precio\",String.valueOf(mAdapter.getItem(position).getPrecio()));\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(context, DetailActivity.class);\n intent.putExtra(\"nb\", nama[position]);\n intent.putExtra(\"gb\", gambar[position]);\n intent.putExtra(\"dt\", detail[position]);\n context.startActivity(intent);\n\n\n\n\n }", "@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tMyShareEntity MF1= list.get(i);\n\t\t\t\t\t\tIntent it = new Intent(mContext,SharingCenterDetail.class);\n\t\t\t\t\t\t\n\t\t\t\t\t\tit.putExtra(\"sid\", MF1.getId());\n\t\t\t\t\t\tit.putExtra(\"pid\", MF1.getPERSONID());\n\t\t\t\t\t\tit.putExtra(\"pname\", MF1.getName());\n\t\t\t\t\t\t\n\t\t\t\t\t\tmContext.startActivity(it);\n\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n\n\n Intent intent=new Intent(Product_cart.this,checkOut.class);\n\n intent.putExtra(\"total\",totalamount);\n intent.putExtra(\"grosstotal\",grosstotal.getText());\n intent.putExtra(\"patientname\",patient.getFullName());\n intent.putExtra(\"patientmobi\",patient.getMobile());\n intent.putExtra(\"patientemail\",patient.getEmail());\n intent.putExtra(\"cusID\",cusID);\n intent.putExtra(\"buttonID\",\"cart\");\n\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n startActivity(intent);\n\n\n\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {\n Intent intent = new Intent(getContext(), ResultActivity.class);\n String namefood = (String) lv_foodList.getItemAtPosition(position);\n intent.putExtra(\"namefood\", namefood);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Intent i=new Intent(mContext,DetailAnnonceCovoitureur.class);\n Intent intent=((Activity) mContext).getIntent();\n String s=intent.getStringExtra(\"action\");\n i.putExtra(\"action\",s);\n Bundle b = new Bundle();\n b.putSerializable(\"annonce\",annonceCovoitureurs.get(position));\n i.putExtras(b);\n mContext.startActivity(i);\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(getActivity(), String.valueOf(CusId),Toast.LENGTH_LONG).show();\n //Intent edit = new Intent(getActivity(),CustomerEdit.class);\n //edit.putExtra(\"CUSID\", String.valueOf(CusIds.get(getPosition())));\n //Log.d(\"view11\", String.valueOf(CusIds.get(getPosition())));\n\n // startActivity(edit);\n\n\n\n\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n dicId = tabList.get(position).getDicId();\n dicName = tabList.get(position).getDicName();\n fatherId = tabList.get(position).getFatherId();\n startActivityForResult(new Intent(Act_CheckTabList.this,Act_CheckGroupItem.class)\n .putExtra(\"projectID\",projectID)\n .putExtra(\"dicId\",dicId)\n .putExtra(\"fatherId\",fatherId)\n //.putParcelableArrayListExtra(\"list\", (ArrayList<? extends Parcelable>) tabList)\n ,Act_CheckGroupItem.RESQUST_CODE_SELECT_CONTENT);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n String settingid = ((TextView) view.findViewById(R.id.txtsettingid)).getText().toString();\n\n Bundle dataBundle = new Bundle();\n dataBundle.putString(\"settingid\", settingid);\n\n // Starting new intent\n Intent intent = new Intent(getApplicationContext(),\n editsettingactivity.class);\n // sending settingid to next activity\n intent.putExtras(dataBundle);\n\n // starting new activity\n startActivity(intent);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int i, long id) {\n Intent intent = new Intent(getActivity(), DetailActivity.class);\n startActivity(intent);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n final candidato cand = candidatoList.get(position);\n // intent.putExtra(\"name\", cand.getId());\n test(Integer.toString(cand.getId()));\n\n // startActivity(intent);\n }", "@Override\n public void onClick(View v) { Intent intent = new Intent(v.getContext(), ItemDescriptionActivity.class);\n// intent.putExtra(\"title\", data.get(position).getItems().get(position).getTitle());\n// intent.putExtra(\"description\", data.get(position).getItems().get(position).getDescription());\n// v.getContext().startActivity(intent);\n//\n Intent intent = new Intent(v.getContext(), ItemListActivity.class);\n intent.putExtra(\"id\", data.get(position).getId());\n activityContext.startActivity(intent);\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {\n MovieItem movieItem = arrayAdapter.getItem(position);\n Intent i = new Intent(getActivity(), DetailActivity.class);\n i.putExtra(\"myData\", movieItem);\n startActivity(i);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Building theSelectedBuilding = buildingList.get(position);\n\n Intent intent = new Intent(getApplicationContext(), DetailsActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n intent.putExtra(\"building_name\", theSelectedBuilding.getName());\n intent.putExtra(\"building_description\", theSelectedBuilding.getDescription());\n intent.putExtra(\"building_address\", theSelectedBuilding.getAddress());\n intent.putExtra(\"building_hours\", theSelectedBuilding.getDate());\n intent.putExtra(\"building_id\", theSelectedBuilding.getBuildingId());\n intent.putExtra(\"building_image\", theSelectedBuilding.getImage());\n startActivity(intent);\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View v, int i, long id) {\n MemberBean member = (MemberBean) lv_memberlist.getItemAtPosition(i);\n// selectedId[0] = member.getID();\n selectedId = member.getID();\n Toast.makeText(MemberListActivity.this\n , \"선택한 이름:\" + member.getName()\n , Toast.LENGTH_SHORT)\n .show();\n Intent intent = new Intent(MemberListActivity.this, DetailActivity.class);\n intent.putExtra(\"id\", member.getID());\n startActivity(intent);\n }", "@Override\n public void onClick(View view, int position) {\n\n Intent intent =new Intent(getContext(), EditFoodItme.class);\n // intent.putExtra(\"shopid\", id.getText());\n startActivity(intent);\n\n //Detail.navigate(appCompatActivity, view.findViewById(R.id.iv_recipe));\n\n }", "public void onListItemClick(ListView list, View v, int position, long id)\n {\n Intent intent = new Intent(MainActivity.this, EventActivities.class);\n intent.putExtra(\"c\", position);\n startActivity(intent);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n if (view.getId()== position){\n Intent intent = new Intent(MainActivity.this, Details.class);\n intent.putExtra(\"name\", \"bangladesh\");\n startActivity(intent);\n }\n }", "@Override\n public void onItemClick(AdapterView<?> av, View v, int pos,\n long id) {\n Toast.makeText(getActivity(), data.get(pos).get(\"Desc\"), Toast.LENGTH_SHORT).show();\n Intent i = new Intent(getActivity(), DetailActivity.class);\n i.putExtra(\"Play\",data.get(pos).get(\"Desc\"));\n i.putExtra(\"Detail\",data.get(pos).get(\"Player\"));\n i.putExtra(\"Category\",\"Diversity\");\n i.putExtra(\"Img\",data.get(pos).get(\"Imagemain\"));\n startActivity(i);\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n MovieDetails movieDetails = movieDetailsAdapter.getItem(i);\n Intent intent = new Intent(MainActivity.this,MovieDetailActivity.class);\n intent.putExtra(\"movieDetails\",movieDetails);\n startActivity(intent);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n intent = new Intent(MainActivity.this, ViewContact.class);\n //it also sends along the ID, like ya do\n intent.putExtra(\"_id\", id);\n //and actually runs the intent\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent(chitietsanpham.this, thanhtoandathang.class);\n // Intent intent = new Intent(mContext,chitietsanpham.class);\n intent.putExtra(\"name\",name);\n // intent.putExtra(\"image\",mData.get(position).getPhoto());\n intent.putExtra(\"gia\",gia1);\n startActivity(intent);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n TextView mTextViewId = view.findViewById(R.id.hidden_nearby_id);\n TextView mTextViewName = view.findViewById(R.id.text_nearby_name);\n TextView mTextViewAddress = view.findViewById(R.id.text_nearby_address);\n\n Intent intent = new Intent(LocateDoctorActivity.this, DoctorInfoActivity.class);\n\n //pass intent extra(doctorID)\n intent.putExtra(\"doctorId\", mTextViewId.getText().toString());\n intent.putExtra(\"doctorName\", mTextViewName.getText().toString());\n intent.putExtra(\"doctorAddress\", mTextViewAddress.getText().toString());\n startActivity(intent);\n\n }", "@Override\n public void onClick(View view) {\n\n Intent intent = new Intent(context, PostDetailActivity.class);\n intent.putExtra(\"postId\",pId);\n context.startActivity(intent);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View v, int position, long id) {\n intent.putExtra(\"path_MP\",mangaList.get(position).path);\n intent.putExtra(\"imagaUrl_MP\",mangaList.get(position).imageUrl);\n intent.putExtra(\"name_MP\",mangaList.get(position).name);\n startActivity(intent);\n }", "public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n Restaurants item =(Restaurants)list.getItemAtPosition(position);\n Intent intent = new Intent(getBaseContext(),listItem.class);\n if(item != null) {\n String res_key = item.getKey();\n intent.putExtra(\"restaurant_key\", res_key);\n }\n startActivity(intent);\n\n }", "public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n Restaurants item =(Restaurants)list.getItemAtPosition(position);\n Intent intent = new Intent(getBaseContext(),listItem.class);\n if(item != null) {\n String res_key = item.getKey();\n intent.putExtra(\"restaurant_key\", res_key);\n }\n startActivity(intent);\n\n }", "@Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {\n Intent intent = new Intent(getActivity(), DetailsActivity.class);\n intent.putExtra(\"info\", mContactList.get(position));\n startActivity(intent);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Intent newIntent = new Intent(this,UserNavigation.class);\n newIntent.putExtra(\"Job\",jobList.get(position));\n startActivity(newIntent);\n\n }", "@Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n long id_To_Search = arg3;\n Bundle dataBundle = new Bundle();\n dataBundle.putLong(\"id\", id_To_Search);\n Intent intent = new Intent(getApplicationContext(), DisplayContactActivity.class);\n intent.putExtras(dataBundle);\n startActivity(intent);\n }", "@Override\n public void onItemClick(Dj dj) {\n Vibrator vibrator = (Vibrator)getSystemService(Context.VIBRATOR_SERVICE);\n if (vibrator != null){\n vibrator.vibrate(60);//numero de ms que queremos que vibre.\n }\n int id = dj.getId();//enviamos en el intent el id del dj para que la siguiente Activity sepa que dj mostrar.\n Intent intent = new Intent(DjsActivity.this, InfoDjsActivity.class);\n intent.putExtra(\"id\", id);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(getApplicationContext(), String.valueOf(CusIds.get(getPosition())), Toast.LENGTH_LONG).show();\n Intent edit = new Intent(getApplicationContext(),CustomerEdit.class);\n edit.putExtra(\"CUSID\", String.valueOf(CusIds.get(getPosition())));\n Log.d(\"view11\", String.valueOf(CusIds.get(getPosition())));\n\n startActivity(edit);\n\n\n }", "@Override\n public void onClick(View v) {\n Movie movieItem = (Movie) containerView.getTag (); // getting the current movie item from setTag(movieItem)\n int position = getAdapterPosition (); //getting the position index i.e. it start from 0\n Log.d(\"Position\", \"\"+position + movieItem.getTitle ());\n Intent intent = new Intent (v.getContext (), DetailActivity.class);\n\n // intent.putParcelableArrayListExtra(\"ALLMOVIELIST\", (ArrayList<? extends Parcelable>) allList);\n intent.putExtra (\"movieTitle\", movieItem.getTitle ());\n intent.putExtra (\"movieImage\", movieItem.getImage());\n\n v.getContext ().startActivity (intent);\n }", "@Override\n public void onClick(View view)\n {\n String PostKey = getSnapshots().getSnapshot(position).getKey();\n String ustazName = getSnapshots().get(position).getName();\n\n\n /* Intent click_post = new Intent(getActivity(),Agency_Details.class);\n click_post.putExtra(\"PostKey\", PostKey);\n //click_post.putExtra(\"Agencyname\", Agencyname);\n startActivity(click_post);*/\n\n\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(mContext,EditItemActivity.class);\n intent.putExtra(\"position\",position);\n intent.putExtra(\"Edit_item\",1);\n intent.putExtra(\"price\",mItemsList.get(position).getPrice());\n intent.putExtra(\"description\",mItemsList.get(position).getDescription());\n intent.putExtra(\"imageURL\",mItemsList.get(position).getImageURL());\n mContext.startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n int mPosition = getLayoutPosition();\n // Use that to access the affected item in cryptoList.\n double idClicked = cryptoList.get(mPosition).market_cap_rank; //[mPosition].market_cap_rank; //get(mPosition);\n\n Intent i = new Intent(v.getContext(), Detail.class);\n i.putExtra(\"rank\", idClicked);\n v.getContext().startActivity(i);\n\n\n }", "@Override\n public void onClick(View v)\n {\n Log.d(TAG, \"onItemClick | position = \" + position);\n Intent intent = new Intent(mContext, OrderDetailActivity.class);\n intent.putExtra(StoreConstant.ORDER_TYPE, StoreConstant.ORDER_SHOW);\n Bundle bundle = new Bundle();\n bundle.putSerializable(StoreConstant.ORDER_DETAIL, item);\n intent.putExtras(bundle);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n mContext.startActivity(intent);\n }", "@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\r\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\n\t\t\t\tIntent intent = new Intent(OilHistoryRecordActivity.this,AddOilHistoryActivity.class);\r\n\t\t\t\tintent.putExtra(\"type\", 2);\r\n\t\t\t\tintent.putExtra(\"bean\", datas.get(position));\r\n\t\t\t startActivity(intent);\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(DoctorTodaysAppointment.this,DoctorTodaysAppointmentsForPatient.class);\n intent.putExtra(\"mobile\",doctorMobile);\n intent.putExtra(\"userId\",doctorId);\n startActivity(intent);\n\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(context.getApplicationContext(), UpdateTreeDetails.class);\n intent.putExtra(\"treeName\",treeNameList.get(position));\n intent.putExtra(\"treeAddress\",treeAddressList.get(position));\n intent.putExtra(\"plantDate\",plantDateList.get(position));\n intent.putExtra(\"updatedDate\",updatedDateList.get(position));\n intent.putExtra(\"updateStatus\",updateStatusList.get(position));\n intent.putExtra(\"treeImage\",treeImageList.get(position));\n intent.putExtra(\"treeId\",treeIdList.get(position));\n intent.putExtra(\"treeRelation\",treeRelationList.get(position));\n intent.putExtra(\"treeCount\",treeCountList.get(position));\n context.startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n int position = getAdapterPosition();\n Review reviewsarapan = this.list.get(position);\n\n Intent intent = new Intent(ctx, ReviewDetails.class);\n intent.putExtra(\"detail_id\", reviewsarapan.getId_review());\n intent.putExtra(\"detail_gambar\", \"http://192.168.1.36/Pampo/gambar_detail/\"+reviewsarapan.getGambar_detail());\n System.out.println(\"Gambar : \"+ reviewsarapan.getGambar_detail());\n intent.putExtra(\"detail_judul\", reviewsarapan.getJudul_review());\n intent.putExtra(\"detail_deskripsi\", reviewsarapan.getDeskripsi_review());\n this.ctx.startActivity(intent);\n }", "public void onItemClick(AdapterView <? > arg0, View view, int position, long id) {\n Intent i=new Intent(Intent.ACTION_VIEW, Uri.parse( youtublist.get(position)));\n startActivity(i);\n }", "@Override\n public void onItemClick(AdapterView<?> arg0, View arg1,int position, long arg3)\n {\n Student stud = null;\n stud = (Student) listView.getAdapter().getItem(position);\n Intent data = new Intent(MainActivity.this, DetailActivity.class);\n data.putExtra(\"student\",stud);\n startActivity(data);\n }", "@Override\n public void onStart() {\n super.onStart();\n getListView().setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> av, View v, int pos,\n long id) {\n\n // TODO Auto-generated method stub\n Toast.makeText(getActivity(), data.get(pos).get(\"Desc\"), Toast.LENGTH_SHORT).show();\n Intent i = new Intent(getActivity(), DetailActivity.class);\n i.putExtra(\"Play\",data.get(pos).get(\"Desc\"));\n i.putExtra(\"Detail\",data.get(pos).get(\"Player\"));\n i.putExtra(\"Category\",\"Diversity\");\n i.putExtra(\"Img\",data.get(pos).get(\"Imagemain\"));\n startActivity(i);\n }\n });\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.putExtra(\"status\", \"2\");\n\t\t\t\tintent.putExtra(\"detail\", list.get(arg2));\n\t\t\t\tintent.setClass(MySave.this, JobDetail.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tIntent i=new Intent(context,ApproveTraveldata.class);\n\t\t\t\t\t//Create the bundle\n\t\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\t\t//Add your data from getFactualResults method to bundle\n\t\t\t\t\tbundle.putString(\"EmpEmail\", arraylistdata.get(position).getEmail());\n\t\t\t\t\tbundle.putString(\"EmpName\", arraylistdata.get(position).getEmpName());\n\t\t\t\t\tbundle.putString(\"EmpId\", arraylistdata.get(position).getEmpId());\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t//Add the bundle to the intent\n\t\t\t\t\ti.putExtras(bundle);\n\t\t\t\t\tcontext.startActivity(i);\n\t\t\t\t\tcontext.finish();\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void onItemClick(View view, int postion) {\n //// TODO: 2017/2/21\n Intent intent = new Intent(this,StudentInfoActivity.class);\n intent.putExtra(\"uid\",\"s\"+students.get(postion).getId());\n startActivity(intent);\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n Intent i = new Intent(\"com.example.cabshare.PROFILE\");\n i.putExtra(\"position\", position);\n startActivity(i);\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\t\tIntent intent = new Intent(this, DetailFragmentActvity.class);\n\t\tintent.putExtra(\"countNum\", countNum);\n\t\tstartActivity(intent);\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t Intent intent=new Intent(ActMore.this,ActRecommend.class);\n//\t\t\t\t \n//\t\t\t\t Bundle bundle=new Bundle();\n//\t\t\t\t bundle.putInt(\"id\", 1);\n//\t\t\t\t intent.putExtras(bundle);\n\t\t ActMore.this.startActivity(intent);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(MainActivity.this, PartNoList.class);\n\t\t\t\tintent.putExtra(\"motortype\", \"ddrmpartno\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(mContext, PlayListClass.class);\n intent.putExtra(\"PlayListname\" , playlistname.get(position));\n intent.putExtra(\"number\" , usernumber);\n intent.putExtra(\"status\" , status.get(position));\n mContext.startActivity(intent);\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {\n Cursor cursor = (Cursor) listView.getItemAtPosition(position);\n\n // Get the record's ID from this row in the database.\n int rowID = cursor.getInt(cursor.getColumnIndexOrThrow(\"_id\"));\n Log.w(TAG, \"RowID to pass to RecordScreen activity is \" + rowID);\n //Toast.makeText(getApplicationContext(), rowID, Toast.LENGTH_SHORT).show();\n\n //Starting a new Intent with Bundle\n Intent intent = new Intent(getApplicationContext(), RecordActivity.class);\n //Send the rowId to recordScreen\n intent.putExtra(\"rowID\", rowID);\n intent.putExtra(\"fromBarcode\", false);\n Log.w(TAG, \"Row ID \" + rowID + \" being sent to RECORD SCREEN activity...\");\n //Sending data to another Activity\n startActivity(intent);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n Intent intent = new Intent(CuisineActivity.this,BookActivity.class);\n // Intent intent = new Intent(mContext,BookActivity.class);\n intent.putExtra(\"res_id\",restDetails.get(position).getRestId());\n intent.putExtra(\"Title\",restDetails.get(position).getRestName());\n intent.putExtra(\"Email\",restDetails.get(position).getRestEmail());\n intent.putExtra(\"Details\",restDetails.get(position).getRestAddress());\n intent.putExtra(\"thumbnail\",restDetails.get(position).getRestImage());\n intent.putExtra(\"phoneNumber\",restDetails.get(position).getRestPhone());\n intent.putExtra(\"restStatus\",restDetails.get(position).getRestStatus());\n intent.putExtra(\"openingTime\",restDetails.get(position).getRestOpeningTime());\n intent.putExtra(\"closingTime\",restDetails.get(position).getRestClosingTime());\n intent.putExtra(\"Badge\",restDetails.get(position).getRestRating());\n //intent.putExtra(\"thumbnail\",image);\n startActivity(intent);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Intent openCauseFullDetailViewPage = new Intent(NeedyProfile.this, CauseFullDetailView.class);\n startActivity(openCauseFullDetailViewPage);\n\n\n }", "@Override\n public void onClick(View view) {\n // Create a new intent\n Intent new_release_intent = new Intent(VietPopActivity.this, MainActivity.class);\n new_release_intent.putExtra(\"uniqueid\",\"from_viet\");\n // Start the new activity\n startActivity(new_release_intent);\n }", "@Override\n\tpublic void dinDanqpjduoDate(ArrayList<AllDinDanGoodsBean> list,\n\t\t\tString order_id) {\n\t\tIntent intent = new Intent(getActivity(), XSQuPingJiaActivity.class);\n\t\tintent.putParcelableArrayListExtra(\"list\",list);\n\t\tintent.putExtra(\"order_id\", order_id);\n\t\tstartActivityForResult(intent, 500);\n\t}", "public void onItemClick(AdapterView<?> a, View v, int position, long id) {\n Intent myIntent = new Intent(MainActivity.this, DetailActivity.class);\n myIntent.putExtra(getResources().getString(R.string.pasoDatosGasolinera), presenterGasolineras.getGasolineras().get(position));\n MainActivity.this.startActivity(myIntent);\n\n }", "@Override\n public void ViewOnItemClick(int position) {\n\n int movieID = this.movie_populars.get(position).getId();\n\n Intent intent = new Intent(MainActivity.this, Movie_Profile.class);\n intent.putExtra(\"MovieID\", movieID);\n startActivity(intent);\n\n }", "@Override public void onItemClick(View view, int position) {\n Details d = productList.get(position);\n Intent intent = new Intent(Dec_Col.this, Col_Description.class);\n intent.putExtra(\"Title\", d.getTitle());\n intent.putExtra(\"Desc\", d.getDesc());\n intent.putExtra(\"Long_desc\", d.getLong_desc());\n intent.putExtra(\"date\",d.getDate());\n intent.putExtra(\"img\", d.getImage());\n startActivity(intent);\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n long idPoss = parent.getItemIdAtPosition(position);\n\n CourseDTO resultCourse = (CourseDTO)getIntent().getExtras().getSerializable(RESULT);\n UserDTO CURRENT_USER_result = (UserDTO)getIntent().getExtras().getSerializable(CURRENT_USER);\n\n StudentDTO selectedStudent = listStudentAdapter.getItem(position);\n Intent intent = new Intent(getBaseContext(), FaultFormActivity.class);\n //Bundle bundle = new Bundle();\n //bundle.putSerializable(DetailsElementActivity.RESULT, jobPost);\n intent.putExtra(FaultFormActivity.RESULT, resultCourse);\n intent.putExtra(FaultFormActivity.CURRENT_USER, CURRENT_USER_result);\n intent.putExtra(FaultFormActivity.CURRENT_STUDENT_result, selectedStudent);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(mContext, viewUpdateDeleteAMedicine.class);\n\n int mID= medData.get(position).getMedID();\n String medid = String.valueOf(mID);\n\n int uID= medData.get(position).getMedID();\n String userid = String.valueOf(uID);\n\n intent.putExtra(\"MedID\", medid);\n intent.putExtra(\"UserID\",medData.get(position).getUserID());\n intent.putExtra(\"MedName\", medData.get(position).getMedName());\n intent.putExtra(\"MedType\",medData.get(position).getMedType());\n intent.putExtra(\"MedFrequency\", medData.get(position).getMedFreq());\n intent.putExtra(\"MedDose\", medData.get(position).getMedDose());\n intent.putExtra(\"MedTime\", medData.get(position).getMedTime());\n intent.putExtra(\"MedDuration\", medData.get(position).getMedDuration());\n intent.putExtra(\"MedStart\", medData.get(position).getMedStartdate());\n intent.putExtra(\"MedDescript\", medData.get(position).getMedDescrip());\n\n mContext.startActivity(intent);\n\n }", "private void startBookingDetails() {\n\t\t\n\t\n\t Intent launchBookingDetails = new Intent(this, BookingDetails.class);\n\t launchBookingDetails.putExtra(\"obj\", obj);\n\t startActivity(launchBookingDetails);\n\n\t }" ]
[ "0.8295877", "0.79887456", "0.7781448", "0.7433942", "0.7394153", "0.7393552", "0.7391307", "0.7366399", "0.7328655", "0.73229223", "0.73212695", "0.7302145", "0.72964966", "0.7260162", "0.7254199", "0.72106385", "0.7209644", "0.71600306", "0.7150523", "0.71437216", "0.71153903", "0.7080762", "0.7080038", "0.70614654", "0.70479035", "0.7041916", "0.70267415", "0.70253706", "0.7023535", "0.69966274", "0.69891524", "0.6984543", "0.6981557", "0.6965764", "0.6963259", "0.69580597", "0.6945816", "0.6938701", "0.69334054", "0.6928916", "0.69145846", "0.69014984", "0.6890799", "0.68818766", "0.6878829", "0.68547237", "0.6843016", "0.6837465", "0.68343455", "0.68298537", "0.6829118", "0.68102664", "0.6804722", "0.6804532", "0.6800383", "0.67915934", "0.67912334", "0.6777159", "0.67768717", "0.67703897", "0.6766685", "0.67511225", "0.67497516", "0.67497516", "0.67430156", "0.6740983", "0.67374", "0.6726832", "0.6724535", "0.6711189", "0.67024463", "0.67011106", "0.669798", "0.6697621", "0.6692098", "0.6689862", "0.6688354", "0.6684917", "0.66841495", "0.66803265", "0.667095", "0.6670773", "0.66705686", "0.6667348", "0.66627115", "0.6661738", "0.6654571", "0.6653816", "0.6640622", "0.66352713", "0.6632207", "0.66199267", "0.6614652", "0.66137874", "0.66085917", "0.6601265", "0.65945184", "0.6593934", "0.6592731", "0.6584852", "0.6577855" ]
0.0
-1
throw new UnsupportedOperationException("Function not yet implemented.");
public void onMarketUpdate(MarketUpdate marketUpdate) { theLastPrice = (marketUpdate.getAsk().getBestPrice() + marketUpdate.getBid().getBestPrice()) / 2.0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void habilitar() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public int zzef() {\n throw new UnsupportedOperationException();\n }", "void unavailable();", "void unavailable();", "@Override\r\n\t\tpublic void action()\r\n\t\t{\r\n// throw new UnsupportedOperationException(\"Not supported yet.\");\r\n\t\t}", "public void remove()\n/* */ {\n/* 99 */ throw new UnsupportedOperationException();\n/* */ }", "public void remove()\n/* */ {\n/* 110 */ throw new UnsupportedOperationException();\n/* */ }", "public boolean mo1266f() {\n throw new UnsupportedOperationException(getClass().getSimpleName());\n }", "private static UnsupportedOperationException getModificationUnsupportedException()\n {\n throw new UnsupportedOperationException(\"Illegal operation. Specified list is unmodifiable.\");\n }", "Boolean mo1305n() {\n throw new UnsupportedOperationException(getClass().getSimpleName());\n }", "public boolean isEnabled() {\n/* 945 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\r\n public void remove() throws UnsupportedOperationException {\r\n throw new UnsupportedOperationException(\"Me ei poisteta\");\r\n }", "@Override\r\n\tpublic Object visitClosureExpression(ClosureExpression closureExpression,\r\n\t\t\tObject arg) throws Exception {\n\t\tthrow new UnsupportedOperationException(\"not yet implemented\");\r\n\t}", "@Override\n public String translate(Function function) {\n throw new UnsupportedOperationException();\n }", "@Override\n\tpublic void remove() {\n\t\tthrow new UnsupportedOperationException();\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\tthrow new UnsupportedOperationException();\t\t\n\t}", "@Override\n public void remove() {\n throw new UnsupportedOperationException(); \n }", "public void _reportUnsupportedOperation() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Operation not supported by parser of type \");\n sb.append(getClass().getName());\n throw new UnsupportedOperationException(sb.toString());\n }", "public void remove() throws UnsupportedOperationException {\n\t\t\tthrow new UnsupportedOperationException(\"Myö ei poisteta\");\n\t\t}", "@Override\n\tpublic void remove() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "private void cargartabla() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\r\n\t\tpublic void remove() {\r\n\t\t\tthrow new UnsupportedOperationException();\r\n\t\t}", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "public void remove() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public void remove() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public void remove() {\r\n \r\n throw new UnsupportedOperationException();\r\n }", "public int mo1265e() {\n throw new UnsupportedOperationException(getClass().getSimpleName());\n }", "public void remove(){\r\n\t\t\tthrow new UnsupportedOperationException();\r\n\t\t}", "@Override\r\n\t\t\tpublic void remove() {\r\n\t\t\t\tthrow new UnsupportedOperationException();\r\n\t\t\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@SuppressWarnings(\"static-method\")\n\tpublic void open() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "static void m6826d() {\n throw new NoSuchMethodError();\n }", "public boolean isImportantForAccessibility() {\n/* 1302 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void doTheFaultyThing();", "public void remove() {\n throw new UnsupportedOperationException();\n }", "public void remove() {\n throw new UnsupportedOperationException();\n }", "@Override // g.b.f.i.m\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public boolean i(g.b.f.i.r r10) {\n /*\n // Method dump skipped, instructions count: 121\n */\n throw new UnsupportedOperationException(\"Method not decompiled: g.b.f.i.q.i(g.b.f.i.r):boolean\");\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public void remove() {\n throw new UnsupportedOperationException();\r\n }", "public void remove() {\r\n throw new UnsupportedOperationException();\r\n }", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "@Override\n\t\t\tpublic void remove() {\n\t\t\t\tthrow new UnsupportedOperationException();\n\t\t\t}", "public void remove() throws UnsupportedOperationException {\n\t\t\tthrow new UnsupportedOperationException( \"remove() Not implemented.\" );\n\t\t}", "void m5769c() throws C0841b;", "@Override\n public final void remove() {\n throw new UnsupportedOperationException();\n }", "public void remove() {\n throw new UnsupportedOperationException();\n }", "public void remove() {\n throw new UnsupportedOperationException();\n }", "void notSupported(String errorcode);", "default T handleNull() {\n throw new UnsupportedOperationException();\n }", "public void remove() {\n\t\t\tthrow new UnsupportedOperationException();\n\t\t}", "public abstract void mo56925d();", "public void remove() {\n throw new UnsupportedOperationException();\n }", "default boolean isDeprecated() {\n return false;\n }", "@Override\n public boolean isSupported() {\n return true;\n }", "private void HargaKamera() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\n\tpublic boolean isImplemented() {\n\t\treturn false;\n\t}", "protected void input_back(){\n throw new UnsupportedOperationException();\n }", "private void chk() {\n if (clist != null)\n throw new UnsupportedOperationException();\n }", "public static void forward()\n {\n throw new UnsupportedOperationException();\n }", "void m5770d() throws C0841b;", "@Override\n public boolean isSupported() {\n return true;\n }", "public Boolean isProhibited() {\n throw new NotImplementedException();\n }", "public final java.lang.Void call() {\n /*\n // Method dump skipped, instructions count: 303\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.oculus.durableiap.DurableIAPStorage.AnonymousClass2.call():java.lang.Object\");\n }", "@Override\n public String writeToString() {\n throw new UnsupportedOperationException();\n }", "@Override\n public void visitFunction(Function function) {\n }", "private static void notPossible () {\r\n\t\tSystem.out.println(\"This operation is not possible\");\r\n\t}", "@Override\n public String toString() {\n throw new UnsupportedOperationException(\"implement me!\");\n }", "public boolean method_218() {\r\n return false;\r\n }", "@Override\n\t/**\n\t * feature is not supported\n\t */\n\tpublic void remove() {\n\t}", "public double aire() throws UnsupportedOperationException {\n throw new UnsupportedOperationException(\"Not implemented\");\n }", "public int getListSelection() {\n/* 515 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "void m5768b() throws C0841b;", "@Override\n public ListIterator<T> listIterator() {\n throw new UnsupportedOperationException();\n }", "@Override\n public void makeVisible() {\n throw new UnsupportedOperationException(\"operation not supported\");\n }", "@Override\n public void refresh() {\n throw new UnsupportedOperationException(\"operation not supported\");\n }", "public UnsupportedCycOperationException() {\n super();\n }", "public final java.lang.Void call() {\n /*\n // Method dump skipped, instructions count: 303\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.oculus.durableiap.DurableIAPStorage.AnonymousClass2.call():java.lang.Object\");\n }", "public abstract void m15813a();", "public abstract void mo6549b();", "@Override\n public boolean getObsolete()\n {\n return false;\n }", "void m5771e() throws C0841b;", "private String printStackTrace() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public abstract void mo30696a();", "public final void mo309a() {\n throw new NoSuchMethodError();\n }", "public abstract int mo9742g();", "@Deprecated\n/* */ public int getActions() {\n/* 289 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "public abstract void mo27386d();", "private void m50366E() {\n }", "@Override\n public V remove(Object obj) {\n throw new UnsupportedOperationException();\n }", "public abstract void mo70713b();", "public abstract void mo27464a();", "public final java.lang.Void call() {\n /*\n // Method dump skipped, instructions count: 303\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.oculus.durableiap.DurableIAPStorage.AnonymousClass2.call():java.lang.Object\");\n }", "public void remove() {\n throw new UnsupportedOperationException(\"not supported optional operation.\");\n }" ]
[ "0.71127796", "0.7099085", "0.7008539", "0.7008539", "0.69972396", "0.6977566", "0.6802485", "0.67712206", "0.67374307", "0.67138517", "0.66925323", "0.6675141", "0.6643197", "0.66066253", "0.6604705", "0.6604705", "0.65972286", "0.64934206", "0.6463626", "0.64606214", "0.6445741", "0.6445741", "0.6432008", "0.6408586", "0.639545", "0.639545", "0.639545", "0.6392989", "0.6392989", "0.6379728", "0.63790935", "0.637855", "0.635964", "0.6352403", "0.6352403", "0.63385904", "0.6332363", "0.6316081", "0.6313866", "0.63057965", "0.63057965", "0.6305289", "0.6305084", "0.6305084", "0.63008994", "0.62920827", "0.6285113", "0.6280176", "0.6266333", "0.6265149", "0.62629366", "0.6228245", "0.62036", "0.62036", "0.61954004", "0.61758095", "0.61711526", "0.61590403", "0.61569357", "0.6156832", "0.6140992", "0.61235017", "0.61156833", "0.6102065", "0.60970235", "0.60786444", "0.6072522", "0.60453176", "0.6041476", "0.60384476", "0.6038365", "0.60318565", "0.6030242", "0.6023245", "0.6021324", "0.60201055", "0.6016703", "0.60155016", "0.6004591", "0.6001575", "0.60007256", "0.59906507", "0.59897834", "0.59833807", "0.5981922", "0.5979543", "0.59761477", "0.5968299", "0.5964977", "0.5964848", "0.5960139", "0.5959329", "0.5952843", "0.59431267", "0.5939121", "0.59325296", "0.59323806", "0.5927848", "0.5927235", "0.5919528", "0.59174573" ]
0.0
-1
throw new UnsupportedOperationException("Function not yet implemented.");
public void onTrade(Trade trade) { thePosition += trade.getVolume(); theCashBalance += -1 * trade.getPrice() * trade.getVolume(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void habilitar() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public int zzef() {\n throw new UnsupportedOperationException();\n }", "void unavailable();", "void unavailable();", "@Override\r\n\t\tpublic void action()\r\n\t\t{\r\n// throw new UnsupportedOperationException(\"Not supported yet.\");\r\n\t\t}", "public void remove()\n/* */ {\n/* 99 */ throw new UnsupportedOperationException();\n/* */ }", "public void remove()\n/* */ {\n/* 110 */ throw new UnsupportedOperationException();\n/* */ }", "public boolean mo1266f() {\n throw new UnsupportedOperationException(getClass().getSimpleName());\n }", "private static UnsupportedOperationException getModificationUnsupportedException()\n {\n throw new UnsupportedOperationException(\"Illegal operation. Specified list is unmodifiable.\");\n }", "Boolean mo1305n() {\n throw new UnsupportedOperationException(getClass().getSimpleName());\n }", "public boolean isEnabled() {\n/* 945 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\r\n public void remove() throws UnsupportedOperationException {\r\n throw new UnsupportedOperationException(\"Me ei poisteta\");\r\n }", "@Override\r\n\tpublic Object visitClosureExpression(ClosureExpression closureExpression,\r\n\t\t\tObject arg) throws Exception {\n\t\tthrow new UnsupportedOperationException(\"not yet implemented\");\r\n\t}", "@Override\n public String translate(Function function) {\n throw new UnsupportedOperationException();\n }", "@Override\n\tpublic void remove() {\n\t\tthrow new UnsupportedOperationException();\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\tthrow new UnsupportedOperationException();\t\t\n\t}", "@Override\n public void remove() {\n throw new UnsupportedOperationException(); \n }", "public void _reportUnsupportedOperation() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Operation not supported by parser of type \");\n sb.append(getClass().getName());\n throw new UnsupportedOperationException(sb.toString());\n }", "public void remove() throws UnsupportedOperationException {\n\t\t\tthrow new UnsupportedOperationException(\"Myö ei poisteta\");\n\t\t}", "@Override\n\tpublic void remove() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "private void cargartabla() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\r\n\t\tpublic void remove() {\r\n\t\t\tthrow new UnsupportedOperationException();\r\n\t\t}", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "public void remove() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public void remove() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public void remove() {\r\n \r\n throw new UnsupportedOperationException();\r\n }", "public int mo1265e() {\n throw new UnsupportedOperationException(getClass().getSimpleName());\n }", "public void remove(){\r\n\t\t\tthrow new UnsupportedOperationException();\r\n\t\t}", "@Override\r\n\t\t\tpublic void remove() {\r\n\t\t\t\tthrow new UnsupportedOperationException();\r\n\t\t\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@SuppressWarnings(\"static-method\")\n\tpublic void open() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "static void m6826d() {\n throw new NoSuchMethodError();\n }", "public boolean isImportantForAccessibility() {\n/* 1302 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void doTheFaultyThing();", "public void remove() {\n throw new UnsupportedOperationException();\n }", "public void remove() {\n throw new UnsupportedOperationException();\n }", "@Override // g.b.f.i.m\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public boolean i(g.b.f.i.r r10) {\n /*\n // Method dump skipped, instructions count: 121\n */\n throw new UnsupportedOperationException(\"Method not decompiled: g.b.f.i.q.i(g.b.f.i.r):boolean\");\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public void remove() {\n throw new UnsupportedOperationException();\r\n }", "public void remove() {\r\n throw new UnsupportedOperationException();\r\n }", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "@Override\n\t\t\tpublic void remove() {\n\t\t\t\tthrow new UnsupportedOperationException();\n\t\t\t}", "public void remove() throws UnsupportedOperationException {\n\t\t\tthrow new UnsupportedOperationException( \"remove() Not implemented.\" );\n\t\t}", "void m5769c() throws C0841b;", "@Override\n public final void remove() {\n throw new UnsupportedOperationException();\n }", "public void remove() {\n throw new UnsupportedOperationException();\n }", "public void remove() {\n throw new UnsupportedOperationException();\n }", "void notSupported(String errorcode);", "default T handleNull() {\n throw new UnsupportedOperationException();\n }", "public void remove() {\n\t\t\tthrow new UnsupportedOperationException();\n\t\t}", "public abstract void mo56925d();", "public void remove() {\n throw new UnsupportedOperationException();\n }", "default boolean isDeprecated() {\n return false;\n }", "@Override\n public boolean isSupported() {\n return true;\n }", "private void HargaKamera() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\n\tpublic boolean isImplemented() {\n\t\treturn false;\n\t}", "protected void input_back(){\n throw new UnsupportedOperationException();\n }", "private void chk() {\n if (clist != null)\n throw new UnsupportedOperationException();\n }", "public static void forward()\n {\n throw new UnsupportedOperationException();\n }", "void m5770d() throws C0841b;", "@Override\n public boolean isSupported() {\n return true;\n }", "public Boolean isProhibited() {\n throw new NotImplementedException();\n }", "public final java.lang.Void call() {\n /*\n // Method dump skipped, instructions count: 303\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.oculus.durableiap.DurableIAPStorage.AnonymousClass2.call():java.lang.Object\");\n }", "@Override\n public String writeToString() {\n throw new UnsupportedOperationException();\n }", "@Override\n public void visitFunction(Function function) {\n }", "private static void notPossible () {\r\n\t\tSystem.out.println(\"This operation is not possible\");\r\n\t}", "@Override\n public String toString() {\n throw new UnsupportedOperationException(\"implement me!\");\n }", "public boolean method_218() {\r\n return false;\r\n }", "@Override\n\t/**\n\t * feature is not supported\n\t */\n\tpublic void remove() {\n\t}", "public double aire() throws UnsupportedOperationException {\n throw new UnsupportedOperationException(\"Not implemented\");\n }", "public int getListSelection() {\n/* 515 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "void m5768b() throws C0841b;", "@Override\n public ListIterator<T> listIterator() {\n throw new UnsupportedOperationException();\n }", "@Override\n public void makeVisible() {\n throw new UnsupportedOperationException(\"operation not supported\");\n }", "@Override\n public void refresh() {\n throw new UnsupportedOperationException(\"operation not supported\");\n }", "public UnsupportedCycOperationException() {\n super();\n }", "public final java.lang.Void call() {\n /*\n // Method dump skipped, instructions count: 303\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.oculus.durableiap.DurableIAPStorage.AnonymousClass2.call():java.lang.Object\");\n }", "public abstract void m15813a();", "public abstract void mo6549b();", "@Override\n public boolean getObsolete()\n {\n return false;\n }", "void m5771e() throws C0841b;", "private String printStackTrace() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public abstract void mo30696a();", "public final void mo309a() {\n throw new NoSuchMethodError();\n }", "public abstract int mo9742g();", "@Deprecated\n/* */ public int getActions() {\n/* 289 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "public abstract void mo27386d();", "private void m50366E() {\n }", "@Override\n public V remove(Object obj) {\n throw new UnsupportedOperationException();\n }", "public abstract void mo70713b();", "public abstract void mo27464a();", "public final java.lang.Void call() {\n /*\n // Method dump skipped, instructions count: 303\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.oculus.durableiap.DurableIAPStorage.AnonymousClass2.call():java.lang.Object\");\n }", "public void remove() {\n throw new UnsupportedOperationException(\"not supported optional operation.\");\n }" ]
[ "0.71127796", "0.7099085", "0.7008539", "0.7008539", "0.69972396", "0.6977566", "0.6802485", "0.67712206", "0.67374307", "0.67138517", "0.66925323", "0.6675141", "0.6643197", "0.66066253", "0.6604705", "0.6604705", "0.65972286", "0.64934206", "0.6463626", "0.64606214", "0.6445741", "0.6445741", "0.6432008", "0.6408586", "0.639545", "0.639545", "0.639545", "0.6392989", "0.6392989", "0.6379728", "0.63790935", "0.637855", "0.635964", "0.6352403", "0.6352403", "0.63385904", "0.6332363", "0.6316081", "0.6313866", "0.63057965", "0.63057965", "0.6305289", "0.6305084", "0.6305084", "0.63008994", "0.62920827", "0.6285113", "0.6280176", "0.6266333", "0.6265149", "0.62629366", "0.6228245", "0.62036", "0.62036", "0.61954004", "0.61758095", "0.61711526", "0.61590403", "0.61569357", "0.6156832", "0.6140992", "0.61235017", "0.61156833", "0.6102065", "0.60970235", "0.60786444", "0.6072522", "0.60453176", "0.6041476", "0.60384476", "0.6038365", "0.60318565", "0.6030242", "0.6023245", "0.6021324", "0.60201055", "0.6016703", "0.60155016", "0.6004591", "0.6001575", "0.60007256", "0.59906507", "0.59897834", "0.59833807", "0.5981922", "0.5979543", "0.59761477", "0.5968299", "0.5964977", "0.5964848", "0.5960139", "0.5959329", "0.5952843", "0.59431267", "0.5939121", "0.59325296", "0.59323806", "0.5927848", "0.5927235", "0.5919528", "0.59174573" ]
0.0
-1
s = "catsanddog" wordDict = ["cat", "cats", "and", "sand", "dog"]
public static void main(String[] args) { String s = "catsanddog"; Set<String> dict = new HashSet<>(); dict.add("cat"); dict.add("cats"); dict.add("and"); dict.add("sand"); dict.add("dog"); WordBreak solution = new WordBreak(); List<String> result = solution.wordBreak(s, dict); System.out.println(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean wordBreak(String s, List<String> wordDict) {\n boolean[] dp = new boolean[s.length()]; \n for (int i = 0; i <s.length(); i++) {\n if (wordDict.contains(s.substring(0, i+1))) {\n dp[i] = true;\n continue;\n }\n for (int k = 0; k < i; k++) {\n if (dp[k] && wordDict.contains(s.substring(k+1, i+1))) {\n dp[i] = true;\n System.out.println(i + \" \" +dp[i]);\n break;\n }\n }\n \n }\n return dp[s.length()-1];\n }", "public static void main(String[] args) {\n String s = \"applepenapple\";\n List<String> wordDict = new ArrayList<>();\n wordDict.add(\"apple\");\n wordDict.add(\"pen\");\n// String s = \"catsandog\";\n// List<String> wordDict = new ArrayList<>();\n// wordDict.add(\"cats\");\n// wordDict.add(\"dog\");\n// wordDict.add(\"sand\");\n// wordDict.add(\"cat\");\n\n System.out.println(wordBreak2(s, wordDict));\n }", "public static boolean wordBreak(String s, List<String> wordDict) {\r\n\t \r\n\t char[] ch = s.toCharArray();\r\n\t int left = 0;\r\n\t boolean canSegemented = false;\r\n\t StringBuffer sb = new StringBuffer();\r\n\t while(left<ch.length){\r\n\t sb.append(ch[left]);\r\n\t if(wordDict.contains(sb.toString())){\r\n\t canSegemented = true;\r\n\t sb = new StringBuffer();\r\n\t }\r\n\t else{\r\n\t canSegemented = false;\r\n\t }\r\n\t left++;\r\n\t }\r\n\t return canSegemented;\r\n\t }", "private List<String> help(String s, Set<String> wordDict) {\n\t\tList<String> ret = new ArrayList<>();\n\n\t\tif (wordDict.contains(s))\n\t\t\tret.add(s);\n\t\telse\n\t\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\t\tif (wordDict.contains(s.substring(0, i + 1))) {\n\n//\t\t\t\t\tSystem.out.println(s.substring(0, i + 1));\n\n\t\t\t\t\tList<String> tmp = help(s.substring(i + 1), wordDict);\n\t\t\t\t\tif (tmp.size() > 0) {\n\t\t\t\t\t\tret.add(s.substring(0, i + 1));\n\t\t\t\t\t\tret.addAll(tmp);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\treturn ret;\n\t}", "public boolean wordBreak(String s, List<String> wordDict) {\n boolean[] dp = new boolean[s.length() + 1];\n\n dp[0] = true;\n\n // Maintaining dp array for all lengths from 1 to n\n for(int i = 1; i <= s.length(); i++) {\n // Checking for all characters till i if earlier sub array is true and if the\n // substring is a dictionary word\n for(int j = 0; j < i; j++) {\n if(dp[j] && wordDict.contains(s.substring(j, i))) {\n dp[i] = true;\n }\n }\n }\n\n return dp[s.length()];\n }", "public static boolean wordBreak(String s, String[] dict) {\n boolean[] memo = new boolean[s.length() + 1];\n memo[0] = true; //set first to be true because we need initial state\n for (int i = 0; i < s.length(); i++) {\n if (!memo[i])\n continue;\n for (String current : dict) {\n int end = i + current.length();\n if (end > s.length())\n continue;\n if (memo[end])\n continue;\n if (s.substring(i, end).equals(current)) {\n memo[end] = true;\n }\n }\n }\n return memo[s.length()];\n }", "public String function(HashSet<String> Dictionary, String inputString) {\n\n int[] step = new int[inputString.length() + 1];\n\n step[0] = 0;\n\n for (int i = 1; i <= inputString.length(); i++)\n {\n step[i] = -1;\n\n for ( int j = 0 ; j < i ; j++ )\n {\n if ( Dictionary.contains( inputString.substring(j, i) ) && step[j] != -1 )\n {\n step[i] = j;\n break;\n }\n }\n }\n\n // if text can not be made from the whole inputString, return an empty string\n if (step[inputString.length()] == -1)\n return \"\";\n\n // Moving backwards from the end, the words contain words in the reverse order\n ArrayList<String> words = new ArrayList<String>();\n\n for (int x = inputString.length(); x > 0; x = step[x])\n words.add(inputString.substring(step[x], x));\n\n // Create a string using a StringBuilder that contains words in the normal order\n StringBuilder sb = new StringBuilder();\n\n for (int i = words.size()-1; i >= 0; i--)\n sb.append( i > 0 ? words.get(i) + \" \" : words.get(i) );\n\n return sb.toString();\n }", "public List<String> wordBreak(String s, List<String> wordDict){\n\t\tList<String> res = new LinkedList<>();\n\t\tif(wordDict == null || wordDict.size() == 0){\n\t\t\treturn res;\n\t\t}\n\t\tbacktracking(res, s, wordDict, new StringBuilder(), 0);\n\t\treturn res;\n\t}", "public static boolean dp(String s, List<String> wordDict) {\n Set<String> dic = new HashSet(wordDict);\n\n // BUG: firstly try i inclusive, but it's harder.\n //start from 0, end at i(exclusive), is that available\n boolean [] board = new boolean [s.length() + 1];\n Arrays.fill(board, false);\n\n board[0] = true;\n for(int i=1; i<=s.length(); i++) {\n boolean flag = false;\n for(int j=0; j<i; j++) {\n\n // BUG: confuse = and ==\n // BUG: confuse substring(j, i) and substring(j+1, i), because define exclusive above\n if(board[j] == true && dic.contains(s.substring(j, i))) {\n flag = true;\n break;\n }\n }\n board[i] = flag;\n }\n\n return board[s.length()];\n }", "static List<String> DFS(String s, Set<String> wordDict, HashMap<String, LinkedList<String>>map) {\n if (map.containsKey(s))\n return map.get(s);\n\n LinkedList<String>res = new LinkedList<String>();\n if (s.length() == 0) {\n res.add(\"\");\n return res;\n }\n for (String word : wordDict) {\n if (s.startsWith(word)) {\n List<String>sublist = DFS(s.substring(word.length()), wordDict, map);\n for (String sub : sublist)\n res.add(word + (sub.isEmpty() ? \"\" : \" \") + sub);\n }\n }\n map.put(s, res);\n return res;\n }", "public boolean wordBreak(String s, List<String> wordDict) {\n int iIndex = 0;\n int jIndex = 0;\n int sLength = s.length();\n boolean dp[][] = new boolean[sLength][sLength];\n int i = 0;\n int j = 0;\n System.out.println(s.substring(0,0));\n System.out.println(s.substring(0,1));\n while (jIndex < sLength) {\n \ti = iIndex; \n \tj = jIndex;\n \twhile (j < sLength) {\n \t\tif (wordDict.contains(s.substring(i, j + 1))) {\n \t\t\tdp[i][j] = true;\n \t\t} else {\n \t\t\tint firstStart = 0;\n \t\t\tint firstEnd = 0;\n \t\t\tint secondStart = firstEnd + 1;\n \t\t\tint secondEnd = j;\n \t\t\twhile (secondStart <= secondEnd) {\n \t\t\t\tdp[i][j] = dp[firstStart][firstEnd] && dp[secondStart][secondEnd];\n \t\t\t\tif (dp[i][j]) {\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\tfirstEnd++;\n \t\t\t\tsecondStart = firstEnd + 1;\n \t\t\t}\n \t\t}\n \t\ti++;\n \t\tj++;\n \t}\n \tiIndex = 0;\n \tjIndex++;\n }\n\n // for (int x = 0; x < dp.length; x++) {\n // \tfor (int y = 0; y < dp[0].length; y++) {\n // \t\tSystem.out.print(dp[x][y] + \" \");\n // \t}\n // \tSystem.out.println();\n // }\n\n return dp[0][sLength - 1];\n }", "public static List<String> DFS(String s, Set<String> wordDict, HashMap<String, LinkedList<String>>map) {\n\t if (map.containsKey(s)) \n\t return map.get(s);\n\t \n\t LinkedList<String>res = new LinkedList<String>(); \n\t if (s.length() == 0) {\n\t res.add(\"\");\n\t return res;\n\t } \n\t for (String word : wordDict) {\n\t if (s.startsWith(word)) {\n\t List<String>sublist = DFS(s.substring(word.length()), wordDict, map);\n\t for (String sub : sublist) \n\t res.add(word + (sub.isEmpty() ? \"\" : \" \") + sub); \n\t }\n\t } \n\t map.put(s, res);\n\t return res;\n\t}", "public static boolean wordBreakHelper(String s, Set<String> dict, int start) {\r\n if (start == s.length()) {\r\n return true;\r\n }\r\n for (String word : dict) {\r\n int len = word.length();\r\n int end = start + len;\r\n\r\n if (end > s.length()) {\r\n continue;\r\n }\r\n\r\n if (s.substring(start, start + len).equals(word)) {\r\n if (wordBreakHelper(s, dict, start + len)) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }", "public boolean isWordBreak(String s, List<String> wordDict){\n\n\t\tint[] ind = new int[s.length()+1];\n\t\tArrays.fill(ind,-1);\n\t\tind[0]=0;\n\t\t\n\t\tfor (int i = 0; i<s.length(); i++){\n\t\t\tif (ind[i]!=-1){\n\t\t\t\tfor (int j=i+1; j<=s.length(); j++){\n\t\t\t\t\tString word = s.substring(i,j);\n\t\t\t\t\tif (wordDict.contains(word)){\n\t\t\t\t\t\tind[j]=i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (ind[s.length()] == -1) return false;\n\t\t\n\t\treturn true;\n\n\t\n\t}", "public String replaceWords(List<String> dict, String sentence) {\n for(String s : dict){\n insert(s);\n }\n //builder to append strings\n StringBuilder sb = new StringBuilder();\n //to get word of the sentence, split it into words\n //and to distinguish, add spaces\n for(String word : sentence.split(\"\\\\s+\")){\n if(sb.length() > 0)\n sb.append(\" \");\n \n TrieNode curr = root;\n //now for each word till its length\n for(int i=0; i<word.length(); i++){\n //get character, compare character with children\n char c = word.charAt(i);\n //if no children found or curr.word is null\n if(curr.children[c-'a'] == null || curr.word != null){\n break;\n }\n //curr++\n curr = curr.children[c-'a'];\n }\n //replacement found or not?\n String replacement = curr.word;\n if(replacement == null){\n sb.append(word);\n }else{\n sb.append(replacement);\n }\n }\n return sb.toString();\n }", "public boolean[][] isWord(List<String> wordDict, String s) {\n int n = s.length();\n boolean[][] isWord = new boolean[n][n];\n \n for (int i = 0; i < n; i++) {\n for (int j = i; j < n; j++) {\n isWord[i][j] = wordDict.contains(s.substring(i, j + 1));\n }\n }\n return isWord;\n }", "public static void main(String[] args) { String s = \"catsanddog\";\n// List<String> wordDict = new ArrayList<>(Arrays.asList(\"cat\", \"cats\", \"and\", \"sand\", \"dog\"));\n//\n String s = \"pineapplepenappl\";\n List<String> wordDict = new ArrayList<>(Arrays.asList(\"apple\", \"pen\", \"applepen\", \"pine\", \"pineapple\"));\n\n WordBreak140 tmp = new WordBreak140();\n tmp.wordBreak(s, wordDict);\n }", "public static void findDuplicateWords(String inputString)\r\n\t{\r\n\t\t// split the words in words array \r\n\t\tString words[]= inputString.split(\" \");\r\n\t\t\r\n\t\t//Create HashMap for count the words \r\n\t\tHashMap<String, Integer> wordcount = new HashMap<String, Integer>();\r\n\t\t\r\n\t\t// to check each word in given array \r\n\t\t\r\n\t\tfor(String word: words )\r\n\t\t{\r\n\t\t\t//if word is present \r\n\t\t\tif(wordcount.containsKey(word)) {\r\n\t\t\t\twordcount.put(word.toLowerCase(), wordcount.get(word)+1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\twordcount.put(word,1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//extracting all the keys of map : wordcount\r\n\t\tSet<String> wordInString = wordcount.keySet();\r\n\t\t\r\n\t\t// iterate the loop through all the wors in wordCount \r\n\t\tfor(String word : wordInString)\r\n\t\t{\r\n\t\t\tif(wordcount.get(word)>1)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(word+ \" : \" + wordcount.get(word));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public boolean wordBreak(String s, List<String> wordDict) {\n Set<String> dic = new HashSet(wordDict);\n return dfs(s, dic);\n }", "public boolean wordBreak2(String s, List<String> wordDict) {\n int maxL =0;\n Set<String> wordSet = new HashSet<>(wordDict);\n for (String word : wordDict) {\n maxL = Math.max(maxL, word.length());\n }\n boolean[] dp = new boolean[s.length() + 1];\n dp[0] = true;\n for (int i = 1; i <= s.length(); i++) {\n for (int j = i-1; j >=0 && j >= i - maxL; j--) {\n if (dp[j] && wordSet.contains(s.substring(j, i))) {\n dp[i] = true;\n break;\n }\n }\n }\n return dp[s.length()];\n }", "public boolean wordBreak(String s, List<String> wordDict) {\n\n if (s == null || s.length() == 0) {\n return false;\n }\n\n Set<String> set = new HashSet<>(wordDict);\n\n return wordBreakUtil(s,set);\n }", "List<String> DFS(String s, List<String> wordDict, HashMap<String, LinkedList<String>>map) {\n\t if (map.containsKey(s)) \n\t return map.get(s);\n\t \n\t LinkedList<String> res = new LinkedList<String>(); \n\t if (s.length() == 0) { //递归结束条件\n\t res.add(\"\");\n\t return res;\n\t }\n\t for (String word : wordDict) {\n\t if (s.startsWith(word)) {\n\t List<String>sublist = DFS(s.substring(word.length()), wordDict, map);\n\t for (String sub : sublist) \n\t res.add(word + (sub.isEmpty() ? \"\" : \" \") + sub); \n\t }\n\t } \n\t map.put(s, res);\n\t \n\t return res;\n\t}", "public KeyWordList extractKeyWords(String input);", "public int minWordBreak(String s, Set<String> dict) {\n Map<String, List<String>> map = new HashMap<String, List<String>>();\n List<String> possibles = wordBreakHelper(s,dict,map);\n int minCut = s.length();\n for (String possible: possibles) {\n int cut = possible.split(\" \").length;\n if (minCut > cut)\n minCut = cut;\n }\n return minCut;\n}", "public boolean wordBreak(String s, List<String> wordDict) {\n Map<Integer, Boolean> breakable = new HashMap<>();\n return wordBreakHelper(s, wordDict, s.length() - 1, breakable);\n }", "public void buildDict(String[] dict) {\n for (String word : dict) {\n for (int i = 0; i < word.length(); i++) {\n String key = word.substring(0, i) + word.substring(i+1);\n int[] indexAndChar = new int[2];\n indexAndChar[0] = i;\n indexAndChar[1] = word.charAt(i) - 'a';\n List<int[]> indexAndCharList = dictonary.getOrDefault(key, new ArrayList<>());\n indexAndCharList.add(indexAndChar);\n\n dictonary.put(key, indexAndCharList);\n }\n }\n }", "public boolean wordBreak(String s, Set<String> wordDict) {\n return false;\n }", "public static HashMap<String,String> nextWord(){\r\n\t\t \r\n\t\tString q1 = \"paple\";\r\n\t\tString a1 = \"apple\";\r\n\t\tString q2 = \"roange\";\r\n\t\tString a2 = \"orange\";\r\n\t\t\r\n\t\tHashMap<String, String> hm = new HashMap<>();\r\n\t\thm.put(q1, a1);\r\n\t\thm.put(q2,a2);\r\n\t\treturn hm;\r\n\t}", "public String replaceWords(List<String> dict, String sentence) {\n TrieNode root = buildTrie(dict);\n \n // extract words from the given sentence\n String[] arr = sentence.split(\" \");\n StringBuilder sb = new StringBuilder();\n \n //search root for each word, if found repleace it otherwise keep it as it is.\n for(int i=0; i<arr.length; i++){\n String s = dfs(root,arr[i]);\n if(s != null){\n sb.append(s+\" \"); \n } \n else{\n sb.append(arr[i]+ \" \");\n } \n }\n return sb.toString().trim();\n }", "public Map<String, Integer> wordCount(String[] strings) {\n Map <String, Integer> map = new HashMap();\n int counter = 1;\n for (String s: strings){\n if (map.containsKey(s)){\n counter = map.get(s);\n map.put(s, counter + 1);\n }else{\n counter = 1;\n map.put(s, counter);\n }\n }\n return map;\n}", "public static List<Integer> findSubstringWordConcatenation(String str, String[] words) {\n assert str != null;\n assert words != null;\n List<String> wordList = new ArrayList<>();\n List<Integer> wordIndex = new ArrayList<>();\n int noOfWords = words.length, wordLength = words[0].length();\n Map<String,Integer> wordFrequencyMap = new HashMap<>();\n for(String word: words) {\n wordFrequencyMap.put(word,wordFrequencyMap.getOrDefault(word,0)+1);\n }\n\n for(int windowStart=0; windowStart <= (str.length() - (wordLength * noOfWords)); windowStart++) {\n HashMap<String, Integer> wordsSeen = new HashMap<>();\n /*now look for words*/\n for(int wrd=0; wrd<noOfWords; wrd++) {\n int wordStartIndex = windowStart + (wrd * wordLength);\n String word = str.substring(wordStartIndex, wordStartIndex+wordLength);\n if(wordFrequencyMap.containsKey(word)) {\n wordsSeen.put(word, wordsSeen.getOrDefault(word,0)+1);\n } else {\n break;// break for loop\n }\n if(wordsSeen.get(word) > wordFrequencyMap.getOrDefault(word,0)) {\n break;// frequency is more then required\n }\n if(wordsSeen.size() == wordFrequencyMap.size()) {\n wordList.add(str.substring(windowStart, wordStartIndex+wordLength));\n wordIndex.add(windowStart);\n }\n }\n }\n return wordIndex;\n }", "public boolean wordBreakMemo(String s, List<String> wordDict) {\n Set<String> set = new HashSet<>(wordDict);\n Boolean[] memo = new Boolean[s.length()];\n return wordBreakHelper(s, set, memo, 0);\n }", "public boolean wordBreak(String s, List<String> wordDict) {\n return dpMethod(s, wordDict);\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 Set<String> replacementHelper(String word) {\n\t\tSet<String> replacementWords = new HashSet<String>();\n\t\tfor (char letter : LETTERS) {\n\t\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\t\treplacementWords.add(word.substring(0, i) + letter + word.substring(i + 1));\n\t\t\t}\n\t\t}\n\t\treturn replacementWords;\n\t}", "public void countWordsWithoutSplit(String str){\n\t\t\n\t\tMap<String, Integer> map = new HashMap<String, Integer>();\n\t\tint value = 0;\n\t\t//char[] charArray = str.toCharArray();\n\t\tList<String> list = new ArrayList<String>();\n\t\tStringBuffer sb = new StringBuffer();\n\t\tfor(int i=0;i<str.length();i++){\n\t\t\tif(str.trim().charAt(i)!=' '){\n\t\t\t\tsb.append(str.charAt(i));\n\t\t\t}\n\t\t\telse if(sb.length()>0 || i==str.length()){\n\t\t\t\tlist.add(sb.toString());\n\t\t\t\tsb.setLength(0);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(list);\n\t\t\n\t\tfor(String s:list){\n\t\t\tif(map.containsKey(s)){\n\t\t\t\tvalue = map.get(s);\n\t\t\t\tmap.put(s, ++value);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tmap.put(s, 1);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(map);\n\t\t\n\t}", "private static Map<Character, Set<Character>> genLessMap(String[] words) throws Exception {\n Map<Character, Set<Character>> map = new HashMap<>();\n for (int i = 1; i < words.length; i ++) {\n String a = words[i - 1];\n String b = words[i];\n boolean allEqual = true;\n for (int j = 0; j < a.length() && j < b.length(); j ++) {\n if (a.charAt(j) == b.charAt(j))\n continue;\n allEqual = false;\n Set<Character> sb = map.get(a.charAt(j));\n if (sb == null) {\n sb = new HashSet<Character>();\n map.put(a.charAt(j), sb);\n }\n sb.add(b.charAt(j));\n break;\n }\n if (allEqual && a.length() > b.length())\n throw new Exception(\"Invalid.\");\n }\n return map;\n }", "public static String swapWords(String phrase, String [][]wordMap) {\n\t\tif( wordMap == null )\n\t\t\treturn phrase;\n\t\tint lend1 = wordMap.length;\n\t\t\n\t\tString[] wordList = phrase.split(\" \");\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\t\n\t\tfor( String str : wordList )\n\t\t{\n\t\t\tboolean found = false;\n\t\t\t//compareLoop:\n\t\t\tfor( int i = 0 ; i < lend1 ; i++ )\n\t\t\t{\n\t\t\t\tif( str.equals( wordMap[i][0] ) )\n\t\t\t\t{\n\t\t\t\t\tresult.add( wordMap[i][1] );\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( !found )\n\t\t\t\tresult.add( str );\n\t\t}\n\t\tString resultS = \" \";\n\t\tfor( String str : result )\n\t\t\tresultS = resultS + str + \" \";\n\t\tresultS = resultS.trim();\n\t\t\t\n return resultS;\n }", "@Test \r\n public void shouldFindOneWordAtTheEnd() {\r\n \r\n String inputWord = \"bxxxxxxxe\";\r\n String[] dictionary =\r\n new String[] {\"able\", \"be\", \"ale\", \"apple\", \"bale\", \"kangaroo\"};\r\n \r\n assertEquals(\"be\", wordSeeker.lookFor(inputWord, dictionary));\r\n }", "public static HashMap<String, String> simplifiedTags(List<List<TaggedWord>> taggedList) {\n HashMap<String, String> simplePOSTagged = new HashMap<>();\n for (List<TaggedWord> tags : taggedList) { // iterate over list\n for (TaggedWord taggedWord : tags) {//for each word in the sentence\n String word = taggedWord.toString().replaceFirst(\"/\\\\w+\", \"\");\n if (taggedWord.tag().equals(\"NN\") | taggedWord.tag().equals(\"NNS\") |\n taggedWord.tag().equals(\"NNP\") | taggedWord.tag().equals(\"NNPS\")) {\n simplePOSTagged.put(word, \"noun\");\n } else if (taggedWord.tag().equals(\"MD\") | taggedWord.tag().equals(\"VB\") |\n taggedWord.tag().equals(\"VBD\") | taggedWord.tag().equals(\"VBG\") |\n taggedWord.tag().equals(\"VBN\") | taggedWord.tag().equals(\"VBP\")\n | taggedWord.tag().equals(\"VBZ\")) {\n simplePOSTagged.put(word, \"verb\");\n } else if (taggedWord.tag().equals(\"JJ\") | taggedWord.tag().equals(\"JJR\") |\n taggedWord.tag().equals(\"JJS\")) {\n simplePOSTagged.put(word, \"adj\");\n } else if (taggedWord.tag().equals(\"PRP\") | taggedWord.tag().equals(\"PRP$\")) {\n simplePOSTagged.put(word, \"pron\");\n } else if (taggedWord.tag().equals(\"RB\") | taggedWord.tag().equals(\"RBR\") |\n taggedWord.tag().equals(\"RBS\")) {\n simplePOSTagged.put(word, \"adv\");\n } else if (taggedWord.tag().equals(\"CD\") | taggedWord.tag().equals(\"LS\")) {\n simplePOSTagged.put(word, \"num\");\n } else if (taggedWord.tag().equals(\"WDT\") | taggedWord.tag().equals(\"WP\") |\n taggedWord.tag().equals(\"WP$\") | taggedWord.tag().equals(\"WRB\")) {\n simplePOSTagged.put(word, \"wh\");\n } else if (taggedWord.tag().equals(\"DT\") | taggedWord.tag().equals(\"PDT\")) {\n simplePOSTagged.put(word, \"det\");\n } else if (taggedWord.tag().equals(\"CC\") | taggedWord.tag().equals(\"IN\")) {\n simplePOSTagged.put(word, \"prepconj\");\n } else {\n simplePOSTagged.put(word, \"other\");\n }\n }\n }\n return simplePOSTagged;\n }", "private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }", "boolean break_word (ArrayList<String> strings, int index, String word) {\n boolean withWord = false;\n if (dictionary.contains(word)) {\n strings.add(word);\n if (index == sentence.length()) {\n System.out.println (strings);\n return true;\n }\n withWord = break_word(new ArrayList<String>(strings), index, \"\");\n strings.remove(strings.size() - 1);\n }\n if (index == sentence.length())\n return false;\n word += sentence.charAt(index);\n return break_word(new ArrayList<String>(strings), index+1, word) || withWord;\n }", "public boolean wordBreakUtil(String s,Set<String> set){\n\n if (s.length() == 0){\n return true;\n }\n\n for (int i=1; i <= s.length(); i++){\n\n // consider all prefixes of the current string\n String prefix = s.substring(0,i);\n\n // return true if the prefix is present in the dictionary and the\n // remaining string also forms a space-separated sequence of one or\n // more dictionary words\n if (set.contains(prefix) && wordBreakUtil(s.substring(i),set)){\n return true;\n }\n }\n\n return false;\n }", "public boolean wordBreak_1(String s, Set<String> wordDict) {\r\n if(s==null || s.length()==0 || wordDict==null || wordDict.size()==0) return false;\r\n Set<String> wordDelete = new HashSet<String>();\r\n boolean r = divide_1(s,wordDict,wordDelete);\r\n return r;\r\n }", "public static int countWords(String word, ArrayList<String> s){\n\t\tint n = 0;\n\t\tfor(String w : s){\n\t\t\tif(w.equals(word)){\n\t\t\t\tn++;\n\t\t\t}\n\t\t}\n\t\treturn n;\n\t}", "public boolean wordBreakDP(String s, List<String> wordDict) {\n int[] memo = new int[s.length()];\n Arrays.fill(memo, -1);\n return dp(s, wordDict, memo, s.length() - 1);\n }", "void convertWordToMorse(String word) {\n StringBuilder sb = new StringBuilder();\n for (char letter: word.toCharArray()) {\n String strLetter = Character.toString(letter);\n sb.append(morseMap.get(strLetter));\n }\n String morse = sb.toString();\n if (dictionary.get(morse)==null) {\n dictionary.put(morse, new ArrayList<>());\n }\n dictionary.get(morse).add(word);\n }", "public Map<String, Integer> wordCount(String string) {\n\t\t//Split the input string by into individual words. Takes out the spaces, commas, apostrophes\n\t\tString[] splitWords = string.split(\"[\\\\s',]\");\n\t\t//Initiate the hashmap to store unique words as keys and incrementing values with repeated keys\n\t\tMap<String, Integer> wordCount = new HashMap<>();\n\t\tfor(int i = 0; i < splitWords.length; i++ ) {\n\t\t\t//increment word count if the word is already in the hashmap. Make a new entry if word is unique to the map.\n\t\t\tif (wordCount.containsKey(splitWords[i])) {\n\t\t\t\twordCount.put(splitWords[i], wordCount.get(splitWords[i])+1);\n\t\t\t}else {\n\t\t\t\twordCount.put(splitWords[i], 1);\n\t\t\t}\t\t\n\t\t}\n\t\t//Remove the empty spaces from the map (to satisfy a test case)\n\t\twordCount.remove(\"\");\n\t\treturn wordCount;\n\t}", "private boolean checkDict(String word, String[] dict){\n int a = 0;\n int b = dict.length-1;\n while (a<=b) {\n int m = (a+b)/2;\n if (word.compareTo(dict[m]) == 0) return true;\n else if (word.compareTo(dict[m])>0) a = m+1;\n else b = m-1;\n }\n return false;\n }", "public String addBoldTag(String s, String[] dict) {\n // Get rid of invalid inputs\n if (s == null || dict == null) return \"\";\n if (s.length() == 0 || dict.length == 0) return s;\n \n StringBuilder str = new StringBuilder(s);\n Map<Character, List<Integer>> charMap = new HashMap<>();\n boolean[] bold = new boolean[str.length()];\n \n // Prepossessing s in order to make the substring finding process efficient\n for (int i = 0; i < str.length(); i++) {\n if (charMap.get(str.charAt(i)) == null) {\n charMap.put(str.charAt(i), new ArrayList<>());\n }\n charMap.get(str.charAt(i)).add(i);\n }\n \n for (String substr : dict) {\n findAndBoldSubstring(str, charMap, substr, bold);\n }\n \n return mergeBoldTags(str, bold);\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 static List<Integer> findWordConcatenation(String str, String[] words) {\n List<Integer> resultIndices = new ArrayList<Integer>();\n if (str == null || str.isEmpty() || words == null || words.length == 0)\n return resultIndices;\n\n int len = words[0].length();\n Map<String, Integer> freqMap = new HashMap();\n\n for (String word : words)\n freqMap.put(word, freqMap.getOrDefault(word, 0) + 1);\n\n Map<String, Integer> curMap = new HashMap();\n int l = 0, cc = 0;\n int i = 0;\n while (i < str.length() - len + 1) {\n String cur = str.substring(i, i + len);\n if (!freqMap.containsKey(cur)) {\n curMap.clear();\n ++i; l = i;\n continue;\n }\n\n curMap.put(cur, curMap.getOrDefault(cur, 0) + 1);\n if (curMap.get(cur) == freqMap.get(cur))\n cc++;\n\n while(curMap.get(cur) > freqMap.get(cur)) {\n String word1 = str.substring(l, l + len);\n curMap.put(word1, curMap.get(word1) - 1);\n if (curMap.get(word1) < freqMap.get(word1))\n --cc;\n l+=len;\n }\n\n if (cc == freqMap.size())\n resultIndices.add(l);\n i+=len;\n }\n return resultIndices;\n }", "private void splitWord(String wordField) {\n wordsArray = new String[wordField.length()];\n wordsArray = wordField.split(\", *\");\n System.out.println(\"chk1: wordsArray: \" + Arrays.toString(wordsArray));\n //wordMap(words);\n for (int i = 0; i < wordsArray.length; i++) {\n wordsArray[i] = wordsArray[i].toUpperCase();\n wordMap.put(\"word\" + i, new Word(wordsArray[i]));//convert each word to upperCase and add it to wordMap\n }\n\n }", "public String[][] findSuggestions(String w) {\n ArrayList<String> suggestions = new ArrayList<>();\n String word = w.toLowerCase();\n // parse through the word - changing one letter in the word\n for (int i = 0; i < word.length(); i++) {\n // go through each possible character difference\n for (int j = 0; j < Node.NUM_VALID_CHARS; j++) {\n // get the character that will change in the word\n Character c = (char) ((j < 26) ? j + 'a' : '\\'');\n \n // if the selected character is not the same as the character to change - avoids getting the same word as a suggestion\n if (c != word.charAt(i)) {\n // change the character in the word\n String check = word.substring(0, i) + c.toString() + ((i + 1 < word.length()) ? word.substring(i + 1, word.length()) : \"\");\n\n // if the chenged word is in the dictionary, add it to the list of suggestions\n if (this.checkDictionary(check)) {\n suggestions.add(check);\n }\n }\n }\n }\n \n // parse through the word - adding one letter to the word\n for (int i = 0; i < word.length(); i++) {\n // if the loop is not on the last charcater\n if (i < word.length() - 1) {\n // check words with one character added between current element and next element\n for (int j = 0; j < Node.NUM_VALID_CHARS; j++) {\n Character c = (char) ((j < 26) ? j + 'a' : '\\'');\n\n // add the character to the word\n String check = word.substring(0, i) + c.toString() + ((i < word.length()) ? word.substring(i, word.length()) : \"\");\n\n // if the new word is in the dictionary, add it to the list of suggestions\n if (this.checkDictionary(check)) {\n suggestions.add(check);\n }\n }\n }\n // if the loop is on the last character\n else {\n // check the words with one character added to the end of the word\n for (int j = 0; j < Node.NUM_VALID_CHARS; j++) {\n Character c = (char) ((j < 26) ? j + 'a' : '\\'');\n\n // add the character to the word\n String check = word + c;\n\n // if the new word is in the dictionary, add it to the list of suggestions\n if (this.checkDictionary(check)) {\n suggestions.add(check);\n }\n }\n }\n }\n \n // parse through the word - removing one letter from the word\n for (int i = 0; i < word.length(); i++) {\n // remove the chracter at the selected index from the word\n String check = word.substring(0, i) + ((i + 1 < word.length()) ? word.substring(i + 1, word.length()) : \"\");\n\n // if the chenged word is in the dictionary, add it to the list of suggestions\n if (this.checkDictionary(check)) {\n suggestions.add(check);\n }\n }\n \n String[][] rtn = new String[suggestions.size()][1];\n for (int i = 0, n = suggestions.size(); i < n; i++) {\n rtn[i][0] = suggestions.get(i);\n }\n \n return rtn;\n }", "public static void wordsToGuess(String [] myWords){\n myWords[0] = \"tesseract\";\n myWords[1] = \"vibranium\";\n myWords[2] = \"mjolnir\";\n myWords[3] = \"jarvis\";\n myWords[4] = \"avengers\";\n myWords[5] = \"wakanda\";\n myWords[6] = \"mixtape\";\n myWords[7] = \"assemble\";\n myWords[8] = \"queens\";\n myWords[9] = \"inevitable\";\n }", "public void addWord(String word) {\n if (word == null || word.equals(\"\")) return;\n char[] str = word.toCharArray();\n WordDictionary cur = this;\n for (char c: str) {\n if (cur.letters[c - 'a'] == null) cur.letters[c - 'a'] = new WordDictionary();\n cur = cur.letters[c - 'a'];\n }\n cur.end = true;\n }", "public boolean wordBreakBottomUp(String s, List<String> wordDict) {\n\n if (s == null || s.length() == 0) {\n return false;\n }\n\n Set<String> set = new HashSet<>(wordDict);\n\n return wordBreakUtilBottomUp(s,set);\n }", "public static void main(String[] args) {\n\r\n\t\tString str = \"Learning is a a this automation this is a fun\";\r\n\t\t\r\n\t\tString words[] = str.split(\" \");\r\n\t\tHashMap<String,Integer> hmap = new HashMap<String,Integer>();\r\n\t\t\r\n\t\tfor(String i : words) {\r\n\t\t\tif(hmap.containsKey(i)) {\r\n\t\t\t\thmap.put(i, hmap.get(i)+1);\r\n\t\t\t}\r\n\t\t\telse hmap.put(i, 1);\r\n\t\t}\r\n\t\tSystem.out.println(hmap);\r\n\t}", "public static void main(String args[])\n {\n // Let the given dictionary be following\n String dictionary[] = {\"hit\", \"hits\", \"kilts\", \"pEg\",\"peN\",\"pentAgon\",\"slit\",\"slits\",\"sTilts\"};\n\n\n\n char boggle[][] = {{'P','W','Y','R'},\n {'E','N','T','H'},\n {'G','S','I','Q'},\n {'O','L','S','A'}\n };\n\n String[] val=findWords(boggle,dictionary);\n\n System.out.println(Arrays.toString(val));\n\n\n }", "public Map<String, Integer> wordCount(String string) {\n\t\tMap<String, Integer> map = new HashMap<String, Integer>();\n\t\tString[] p = string.split(\"[\\\\W\\\\s]\");\n\t\tfor (String s : p) {\n\t\t\tif (!s.equals(\"\")) {\n\t\t\t\tif (map == null || !map.containsKey(s))\n\t\t\t\t\tmap.put(s, 1);\n\t\t\t\telse\n\t\t\t\t\tmap.replace(s, map.get(s) + 1);\n\t\t\t}\n\t\t}\n\t\treturn map;\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}", "public Map<String, Integer> wordCount(String string) {\n\t\t// TODO Write an implementation for this method declaration\n\t\tString foundword = \"\";\n\t\tstring = string.replaceAll(\"\\n\",\"\");\n\t\tMap<String, Integer> WordCountMap = new HashMap<>();\n\t\tList<String> stringList = new ArrayList<String>();\n\t\tfor(int i = 0; i < string.length(); i++) {\n\t\t\t//System.out.println(string.charAt(i));\n\t\t\t\n\t\t\tif(string.charAt(i) == ' ') {\n\t\t\t\tstringList.add(foundword);\n\t\t\t\tfoundword = \"\";\n\t\t\t}\n\t\t\telse if(string.charAt(i) == ',') {\n\t\t\t\tstringList.add(foundword);\n\t\t\t\tfoundword = \"\";\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\tfoundword = foundword + string.charAt(i);\n\t\t\t}\n\n\t\t}\n\t\t\n\t\tstringList.add(foundword);\n\t\t\n\t\tfor(String name: stringList) {\n\t\t\tif(WordCountMap.containsKey(name)) {\n\t\t\t\t//The frequencyMap already contains the count for this name;\n\t\t\t\t//So we want to increase that count by 1\n\t\t\t\tint currentCount = WordCountMap.get(name);\n\t\t\t\tWordCountMap.put(name, currentCount+1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tWordCountMap.put(name, 1); //Track the name with a count of 1 if we haven't seen it before\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\treturn WordCountMap;\n\t}", "static ArrayList<String> split_words(String s){\n ArrayList<String> words = new ArrayList<>();\n\n Pattern p = Pattern.compile(\"\\\\w+\");\n Matcher match = p.matcher(s);\n while (match.find()) {\n words.add(match.group());\n }\n return words;\n }", "public static List<String> validWords(List<String> words)\n\t{\n\t\tStemmer stemmer = new Stemmer();\n\t\tList<String> goodWords = new ArrayList<String>();\n\t\tfor (String word : words)\n\t\t{\n\t\t\tString stem = stemmer.stem(word);\n\t\t\tif (dictUtils.dict.containsKey(stem))\n\t\t\t{\n\t\t\t\tgoodWords.add(dictUtils.dict.get(stem));\n\t\t\t}\n\t\t}\n\t\treturn goodWords;\n\t}", "private void populateDictionaryBySynonyms() {\n\n Enumeration e = dictionaryTerms.keys();\n while (e.hasMoreElements()) {\n String word = (String) e.nextElement();\n String tag = dictionaryTerms.get(word);\n\n ArrayList<String> synonyms = PyDictionary.findSynonyms(word);\n\n for (int i = 0; i < synonyms.size(); i++) {\n if (!dictionaryTerms.containsKey(synonyms.get(i))) {\n dictionaryTerms.put(synonyms.get(i), tag);\n }\n }\n }\n }", "private void loadDictWords(String dictFile) {\n try {\n BufferedReader reader = new BufferedReader(new FileReader(dictFile));\n\n String word = reader.readLine();\n while (word != null) {\n word = word.trim().toLowerCase();\n wordsList.add(word);\n\n word = reader.readLine();\n }\n reader.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"Error: Cannot find dictionary file at location: \" + dictFile);\n } catch (IOException e) {\n System.out.println(\"Error: Failed to open and read dictionary file at location: \" + dictFile);\n }\n }", "public void fillMap(Map<String, List<String>> map){\n \tfor(String word : dictionary.words){ //Iterate over the ArrayList in the Dictionary object\n \t\tList<String> list = new ArrayList<String>();\n \t\tfor(String w : dictionary.words){ //iterate through all words in dictionary to find all one letter off from word\n \t\t\tif(isOneLetterOff(w, word))\n \t\t\t\tlist.add(w);\n \t\t\t//if w isn't off from word by one letter, check next w\n \t\t}\n \t\tmap.put(word, list);\n \t}\n }", "public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}", "private boolean checkWord(String str)\n\t{\n\t\tfor (int i = 0; i < words.length(); i++)\n\t\t{\n\t\t\tif (equals(words.get(i), str))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\treturn true;\n\t}", "private static HashMap<String, Integer> makeMap(String[] words) {\n HashMap<String, Integer> map = new HashMap();\n for (int i = 0; i < words.length; i++) {\n map.merge(words[i], 1, Integer::sum);\n }\n return map;\n}", "private HashMap<Character, Integer> countAllLetters(String word) {\n WordToolbox otherWord = new WordToolbox(word.toLowerCase());\r\n HashMap<Character, Integer> mapOfWord = new HashMap<>();\r\n for (int i = 0; i < word.length(); i++) {\r\n mapOfWord.put(word.toLowerCase().charAt(i), otherWord.countHowMany(word.toLowerCase().charAt(i)));\r\n }\r\n return mapOfWord;\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}", "SList evenWords();", "public static String findReplacements(TreeSet<String> dictionary, \n\t\t\t\t\t String word)\n\t{\n\t String replacements = \"\";\n\t String leftHalf, rightHalf, newWord;\n\t int deleteAtThisIndex, insertBeforeThisIndex;\n\t char index;\n\t TreeSet<String> alreadyDoneNewWords = new TreeSet<String>();\n\t /* The above TreeSet<String> will hold words that the spell checker\n\t suggests as replacements. By keeping track of what has already\n\t been suggested, the method can make sure not to output the\n\t same recommended word twice. For instance, the word \n\t \"mispelled\" would ordinarily result in two of the same suggested\n\t replacements: \"misspelled\" (where the additional \"s\" is added to \n\t different locations.) */\n\t \n\t // First, we'll look for words to make by subtracting one letter\n\t // from the misspelled word.\n\t for(deleteAtThisIndex = 0; deleteAtThisIndex < word.length();\n\t\tdeleteAtThisIndex ++)\n\t\t{\n\t\t if(deleteAtThisIndex == 0)\n\t\t\t{\n\t\t\t leftHalf = \"\";\n\t\t\t rightHalf = word;\n\t\t\t}\n\t\t else\n\t\t\t{\n\t\t\t leftHalf = word.substring(0, deleteAtThisIndex);\n\t\t\t rightHalf = word.substring(deleteAtThisIndex+1,\n\t\t\t\t\t\t word.length());\n\t\t\t}\n\n\t\t newWord = \"\";\n\t\t newWord = newWord.concat(leftHalf);\n\t\t newWord = newWord.concat(rightHalf);\n\t\t if(dictionary.contains(newWord) &&\n\t\t !alreadyDoneNewWords.contains(newWord))\n\t\t\t{\n\t\t\t replacements = replacements.concat(newWord + \"\\n\");\n\t\t\t alreadyDoneNewWords.add(newWord);\n\t\t\t}\n\t\t}\n\n\t // The rest of this method looks for words to make by adding a \n\t // new letter to the misspelled word.\n\t for(insertBeforeThisIndex = 0; \n\t\tinsertBeforeThisIndex <= word.length();\n\t\tinsertBeforeThisIndex ++)\n\t\t{\n\t\t if(insertBeforeThisIndex == word.length())\n\t\t\t{\n\t\t\t leftHalf = word;\n\t\t\t rightHalf = \"\";\n\t\t\t}\n\t\t else\n\t\t\t{\n\t\t\t leftHalf = word.substring(0,insertBeforeThisIndex);\n\t\t\t rightHalf = word.substring(insertBeforeThisIndex,\n\t\t\t\t\t\t word.length());\n\t\t\t}\n\t\t \n\t\t for(index = 'a'; index <= 'z'; index ++)\n\t\t\t{\n\t\t\t newWord = \"\";\n\t\t\t newWord = newWord.concat(leftHalf);\n\t\t\t newWord = newWord.concat(\"\" + index + \"\");\n\t\t\t newWord = newWord.concat(rightHalf);\n\t\t\t \n\t\t\t if(dictionary.contains(newWord) &&\n\t\t\t !alreadyDoneNewWords.contains(newWord))\n\t\t\t\t{\n\t\t\t\t replacements \n\t\t\t\t\t= replacements.concat(newWord + \"\\n\");\n\t\t\t\t alreadyDoneNewWords.add(newWord);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t return replacements;\n\t}", "public static List<String> missingWords(String s, String t) {\n String[] a = s.split(\" \");\n String[] b = t.split(\" \");\n int sz = a.length - b.length;\n String [] missing = new String[sz];\n int c = 0;\n for(int i=0;i<a.length;i++){\n int flag=0;\n for(int j=0;j<b.length;j++){\n if(a[i].equals(b[j]))\n flag=1;\n }\n if(flag==0){\n missing[c++]=a[i];\n\n }\n }\n\n List<String> missingWords = new ArrayList<>();\n for(String str: missing){\n missingWords.add(str);\n }\n System.out.println(missingWords);\n return missingWords;\n }", "private boolean isWord(String word) {\n\t\treturn dict.isWord(word);\n\t}", "public Map<String, Integer> wordLen(String[] str) {\n\t\t\n\t\tMap<String, Integer> map = new HashMap<String, Integer>();\n\t\t\n\t\tfor (int i = 0; i < str.length; i++) {\n\t\t\tmap.put(str[i], str[i].length());\n\t\t}\n\t\t\n\t\treturn map;\n\t\t\n\t}", "SList oddWords();", "private void wordSearch(String word, HashMap<String, SearchResult> resultMap, ArrayList<SearchResult> words) {\n\t\tfor (String path : index.get(word).keySet()) {\n\t\t\tint frequency = index.get(word).get(path).size();\n\t\t\tint initialPosition = index.get(word).get(path).first();\n\t\t\t\n\t\t\tif (!resultMap.containsKey(path)) {\n\t\t\t\tresultMap.put(path, new SearchResult(frequency, initialPosition, path));\n\t\t\t\twords.add(resultMap.get(path));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSearchResult searchResult = resultMap.get(path);\n\t\t\t\tsearchResult.addToFrequency(frequency);\n\t\t\t\tsearchResult.updateInitialPosition(initialPosition);\n\t\t\t}\n\t\t}\n\t}", "public static Set<String> getUniqueWords(String input) {\r\n HashSet<String> hSet = new HashSet<String>();\r\n ArrayList<String> words = getWords(input);\r\n for(String word: words) {\r\n if(!hSet.contains(word)) {\r\n hSet.add(word);\r\n }\r\n }\r\n return hSet;\r\n }", "public int ladderLength(String beginWord, String endWord, List<String> wordList) {\r\n\t\tSet<String> dict = new HashSet<String>();\r\n for (String word : wordList) {\r\n dict.add(word);\r\n }\r\n\r\n Set<String> wordsReached = new HashSet<String>();\r\n // start not in dict, need to have some initial point to start BFS\r\n wordsReached.add(beginWord);\r\n\r\n int distance = 1;\r\n while (!wordsReached.contains(endWord)) {\r\n Set<String> wordsToReach = new HashSet<String>();\r\n for (String wordReached : wordsReached) {\r\n for (int i = 0; i < wordReached.length(); i++) {\r\n // where to toCharArray is crucial\r\n // 每个位置有26个可能性\r\n char[] chars = wordReached.toCharArray();\r\n for (char c = 'a'; c <= 'z'; c++) {\r\n chars[i] = c;\r\n String next = new String(chars);\r\n if (dict.contains(next)) {\r\n wordsToReach.add(next);\r\n dict.remove(next);\r\n }\r\n }\r\n }\r\n }\r\n // no new words can be reached, early return\r\n if (wordsToReach.size() == 0) {\r\n return 0;\r\n }\r\n\r\n distance++;\r\n wordsReached = wordsToReach;\r\n }\r\n \r\n return distance;\r\n\t}", "public void buildDict(String[] dict) {\n for (String s:dict){\n insert(s);\n }\n }", "public ArrayList<String> FindAllCombinationWord(String str) {\r\n\r\n ArrayList<String> wordList = new ArrayList<String>();\r\n\r\n int n = str.length();\r\n ArrayList<String> combinationWord = permute(str, 0, n - 1);\r\n\r\n for (String item : combinationWord) {\r\n int j = 0;\r\n for (int i = n; i >= 2; i--) {\r\n String finalString = item.substring(j);\r\n\r\n if (!wordList.contains(finalString)) {\r\n wordList.add(finalString);\r\n }\r\n j++;\r\n }\r\n }\r\n return wordList;\r\n }", "public static boolean areWords(Set<String> toBeChecked)\n\t{\n\t\tfor (String word : toBeChecked)\n\t\t{\n\t\t\tif (! dictionary.contains(word))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}", "public int ladderLength(String beginWord, String endWord, List<String> wordList) {\n\t\tif (!wordList.contains(endWord)) {\n\t\t\treturn 0;\n\t\t}\n\t\tSet<String> dict = new HashSet<>(wordList);\n\t\tSet<String> beginSet = new HashSet<>();\n\t\tSet<String> endSet = new HashSet<>();\n\t\tbeginSet.add(beginWord);\n\t\tendSet.add(endWord);\n\n\t\tint step = 1;\n\t\tSet<String> visited = new HashSet<>();\n\t\twhile (!beginSet.isEmpty() && !endSet.isEmpty()) {\n\t\t\tif (beginSet.size() > endSet.size()) {\n\t\t\t\tSet<String> set = beginSet;\n\t\t\t\tbeginSet = endSet;\n\t\t\t\tendSet = set;\n\t\t\t}\n\t\t\tSet<String> temp = new HashSet<>();\n\t\t\tfor (String word : beginSet) {\n\t\t\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\t\t\tchar[] chs = word.toCharArray();\n\t\t\t\t\tfor (char c = 'a'; c <= 'z'; c++) {\n\t\t\t\t\t\tchs[i] = c;\n\t\t\t\t\t\tString target = String.valueOf(chs);\n\t\t\t\t\t\tif (endSet.contains(target)) {\n\t\t\t\t\t\t\treturn step + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!visited.contains(target) && dict.contains(target)) {\n\t\t\t\t\t\t\ttemp.add(target);\n\t\t\t\t\t\t\tvisited.add(target);\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\tbeginSet = temp;\n\t\t\tstep++;\n\t\t}\n\t\treturn 0;\n\t}", "private static List<String> getCandidates(String w, Set<String> words) {\n List<String> result = new LinkedList<>();\n for (int i = 0; i < w.length(); i++) {\n char[] chars = w.toCharArray();\n for (char ch = 'A'; ch <= 'Z'; ch++) {\n chars[i] = ch;\n String candidate = new String(chars);\n if (words.contains(candidate)) {\n result.add(candidate);\n }\n }\n }\n return result;\n }", "public static void addKeyWord(String word)\r\n\t{\r\n\t\tkeywords.add(word);\r\n\t}", "public static int ladderLength3(String beginWord, String endWord, Set<String> wordList) {\r\n Set<String> beginSet = new HashSet<String>(), endSet = new HashSet<String>();\r\n\r\n int len = 1;\r\n int strLen = beginWord.length();\r\n HashSet<String> visited = new HashSet<String>();\r\n\r\n beginSet.add(beginWord);\r\n endSet.add(endWord);\r\n while (!beginSet.isEmpty() && !endSet.isEmpty()) {\r\n if (beginSet.size() > endSet.size()) {\r\n Set<String> set = beginSet;\r\n beginSet = endSet;\r\n endSet = set;\r\n }\r\n\r\n Set<String> temp = new HashSet<String>();\r\n for (String word : beginSet) {\r\n char[] chs = word.toCharArray();\r\n\r\n for (int i = 0; i < chs.length; i++) {\r\n for (char c = 'a'; c <= 'z'; c++) {\r\n char old = chs[i];\r\n chs[i] = c;\r\n String target = String.valueOf(chs);\r\n\r\n if (endSet.contains(target)) {\r\n return len + 1;\r\n }\r\n\r\n if (!visited.contains(target) && wordList.contains(target)) {\r\n temp.add(target);\r\n visited.add(target);\r\n }\r\n chs[i] = old;\r\n }\r\n }\r\n }\r\n\r\n beginSet = temp;\r\n len++;\r\n }\r\n\r\n //solution 3: using graph\r\n //https://www.youtube.com/watch?v=h9iTnkgv05E&ab_channel=NeetCode\r\n\r\n return 0;\r\n }", "public void buildDict(String[] dict) {\n\t\tfor (String word : dict) {\n\t\t\tTrieNode node = root;\n\t\t\tfor (Character c : word.toCharArray()) {\n\t\t\t\tif (node.list[c - 'a'] == null) {\n\t\t\t\t\tnode.list[c - 'a'] = new TrieNode();\n\t\t\t\t}\n\t\t\t\tnode = node.list[c - 'a'];\n\t\t\t}\n\t\t\tnode.isLeaf = true;\n\t\t}\n\t}", "public static HashMap<String, HashMap<TemplateString, Double>> createStringWeightMapByWord(HashMap<TemplateString, HashMap<String, Double>> stringMap) {\r\n\t\tHashMap<String, HashMap<TemplateString, Double>> out = new HashMap<>();\r\n\t\t\r\n\t\tfor(Entry<TemplateString, HashMap<String, Double>> entry : stringMap.entrySet()) {\r\n\t\t\tTemplateString template = entry.getKey();\r\n\t\t\tHashMap<String, Double> wordMap = entry.getValue();\r\n\t\t\tfor(Entry<String, Double> wordEntry : wordMap.entrySet()) {\r\n\t\t\t\tString word = wordEntry.getKey();\r\n\t\t\t\tDouble weight = wordEntry.getValue();\r\n\t\t\t\t// If doesn't already have word, put in an empty map\r\n\t\t\t\tif(!out.containsKey(word)) out.put(word, new HashMap<TemplateString, Double>());\r\n\t\t\t\tout.get(word).put(template, weight);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn out;\r\n\t}", "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 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 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 }", "private Set<String> deletionHelper(String word) {\n\t\tSet<String> deletionWords = new HashSet<String>();\n\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\tdeletionWords.add(word.substring(0, i) + word.substring(i + 1));\n\t\t}\n\t\treturn deletionWords;\n\t}", "public boolean wordPattern2(String pattern, String str) {\n\t\tString[] stra = str.split(\" \");\n if (pattern.length() != stra.length){\n return false;\n }\n HashMap<Character, String> map = new HashMap<Character, String>();\n \n for (int i = 0; i < stra.length; i++){\n Character c = pattern.charAt(i);\n String temp = stra[i];\n if (map.containsKey(c)){\n if (!temp.equals(map.get(c))){\n return false;\n }\n }\n else{\n if (map.containsValue(temp)){\n return false;\n }\n map.put(c, temp);\n }\n }\n return true;\n\t\t\n\t}", "List<WdWordDict> selectByExample(WdWordDictExample example);", "void howManyStartsWithPrefix(String str) {\n dictionary.add(str);\n int count = 0;\n for (String word : words) {\n if (word.length() >= str.length()) {\n boolean isPrefix = true;\n for (int i = 0; i < str.length(); i++) {\n if (word.charAt(i) != str.charAt(i)) {\n isPrefix = false;\n break;\n }\n }\n if (isPrefix) {\n count++;\n }\n\n }\n }\n assertEquals(count, trie.howManyStartsWithPrefix(str));\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 List<Integer> findSubstring(String s, String[] words) {\n if (s == null || s.isEmpty() || words == null || words.length == 0) {\n return new ArrayList<>();\n }\n\n List<Integer> res = new ArrayList<>();\n int size = words.length;\n int length = words[0].length();\n\n if (s.length() < size * length) {\n return new ArrayList<>();\n }\n\n Map<String,Integer> covered = new HashMap<>();\n\n for (int j=0; j<size; j++) {\n if (s.indexOf(words[j]) < 0) {\n return res;\n }\n\n covered.compute(words[j], (k, v) -> v != null ? covered.get(k)+1 : 1);\n }\n\n int i=0;\n int sLength = s.length();\n while(sLength -i >= size * length){\n Map<String, Integer> temp = new HashMap<>(covered);\n\n for (int j=0; j<words.length; j++){\n String testStr = s.substring(i + j*length, i + (j+1)*length);\n\n if (temp.containsKey(testStr)){\n if (temp.get(testStr) == 1)\n temp.remove(testStr);\n else\n temp.put(testStr, temp.get(testStr)-1);\n }\n else {\n break;\n }\n }\n\n if (temp.size() == 0) {\n res.add(i);\n }\n\n i++;\n }\n return res;\n }" ]
[ "0.68041116", "0.67317754", "0.6713716", "0.66724473", "0.65898573", "0.6562531", "0.64495814", "0.6412607", "0.6339565", "0.6338467", "0.6320581", "0.63178843", "0.62913704", "0.6279998", "0.62509704", "0.6236236", "0.62319696", "0.6231486", "0.61917365", "0.61797917", "0.61360705", "0.6117082", "0.61133003", "0.6104513", "0.60257745", "0.6002264", "0.596389", "0.5946163", "0.59038675", "0.5892637", "0.58905524", "0.5875182", "0.5868479", "0.5864449", "0.5810646", "0.580791", "0.57934123", "0.5762364", "0.57594234", "0.5746319", "0.5715521", "0.5704476", "0.569371", "0.56892115", "0.5684948", "0.56657803", "0.56342864", "0.56302315", "0.5630158", "0.561274", "0.56098187", "0.55764437", "0.557064", "0.5559485", "0.5556404", "0.55534875", "0.5550672", "0.55475765", "0.5531707", "0.5530288", "0.5525234", "0.55163", "0.55094105", "0.5493548", "0.54920596", "0.54760426", "0.5475601", "0.5451415", "0.5450249", "0.5444686", "0.5441713", "0.543032", "0.541283", "0.5411507", "0.54037046", "0.5401635", "0.5398673", "0.53842133", "0.53819054", "0.53785306", "0.5376126", "0.53733957", "0.53729296", "0.5356318", "0.5348572", "0.5347239", "0.53445125", "0.5343174", "0.53365046", "0.5334337", "0.53240836", "0.53221226", "0.5317798", "0.5316957", "0.5303972", "0.5288624", "0.52822065", "0.5281449", "0.5279482", "0.5274691" ]
0.62832963
13
Convenience Method. Deals with exceptions. This method will close a given result set.
private void closeResultSet(ResultSet rs) { try { if (rs != null) { rs.close(); } } catch (SQLException ex) {} // nothing we can do! }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void closeResultSet() {\n\t\tif (rs != null) {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch (SQLException se2) {\n\t\t\t\tse2.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void closeResultSet(ResultSet rs) {\n if(rs!=null){\n try {\n rs.close();\n logger.info(\"Closing Result Set\");\n } catch (SQLException e) {\n logger.error(\"Error while closing result set\",e);\n }\n }\n }", "public void dispose() {\r\n try {\r\n rowSet.close();\r\n } catch (SQLException sqlex) {\r\n sqlex.printStackTrace();\r\n }\r\n }", "private static void closeResults(ResultSet results) throws ProfileKeyManagerPersistenceException {\n try {\n results.close();\n } catch (SQLException ex) {\n throw new ProfileKeyManagerPersistenceException(\"error closing result set: \" + ex.getMessage(), ex);\n }\n }", "@Override\n\t\tpublic void close(ResultSet res, com.mysql.jdbc.Statement stm,\n\t\t\t\tConnection conn) {\n\t\t\t\n\t\t}", "public static void closeResultSet (ResultSet rs) {\n\t\ttry { \n\t\t\tif (rs != null)\n\t\t\t\trs.close(); \n\t\t} catch (SQLException e) {\t\t\n\t\t}\n\t}", "public static void close()\n\t{\n\t\t\n\t\ttry \n\t\t{\t\t\t\n\t\t\t\n\t\t\tif (RESULT_SET != null)\n\t\t\t{\n\t\t\t\tRESULT_SET.close();\n\t\t\t}\n\t\t\t\n\t\t\tSTATEMENT.close();\n\t\t\tCONNECTION.close();\t\t\n\t\t\n\t\t} catch (Exception e)\n\t\t{\t\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void closeResultSet(String databasename) {\n DataBaseConnection.closeResultSet(databasename);\n }", "public static void close( ResultSet rs ) {\n closeResultSet( rs );\n }", "public void close(ResultSet rs) {\n if (rs!=null){\n try {\n rs.close();\n } catch (SQLException ignore) {\n }\n }\n }", "public void close() {\n\t\ttry {\n\t\t\tif (resultSet != null)\n\t\t\t\tresultSet.close();\n\t\t\tif (connect != null)\n\t\t\t\tconnect.close();\n\t\t} catch (Exception e) {\n\t\t}\n\t}", "public static void close(ResultSet rs) {\n\t\tif(rs!=null){\r\n\t\t\ttry {\r\n\t\t\t\trs.close();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void close(ResultSet rs) {\n\t\tif (rs != null) {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch (SQLException ex) {\n\t\t\t\tSystem.out.println(ex.getMessage());\n\t\t\t}\n\t\t}\n\t}", "public void close() {\r\n\t\ttry {\r\n\t\t\tif (resultSet != null) {\r\n\t\t\t\tresultSet.close();\r\n\t\t\t}\r\n\r\n\t\t\tif (statement != null) {\r\n\t\t\t\tstatement.close();\r\n\t\t\t}\r\n\r\n\t\t\tif (connect != null) {\r\n\t\t\t\tconnect.close();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\t}", "public void close() {\r\n\t\ttry {\r\n\t\t\tif (resultSet != null) {\r\n\t\t\t\tresultSet.close();\r\n\t\t\t}\r\n\r\n\t\t\tif (statement != null) {\r\n\t\t\t\tstatement.close();\r\n\t\t\t}\r\n\r\n\t\t\tif (connect != null) {\r\n\t\t\t\tconnect.close();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\t}", "public static void close(ResultSet rs) {\n\t\ttry {\n\t\t\trs.close();\n\t\t} catch(SQLException e){\n\t\t\te.printStackTrace(System.out);\n\t\t}\n\t}", "public void close() {\n\t\tcloseConnection();\n\t\tcloseStatement();\n\t\tcloseResultSet();\n\t}", "public void close() {\n\t\ttry {\n\t\t\tif (resultSet != null) {\n\t\t\t\tresultSet.close();\n\t\t\t}\n\n\t\t\tif (statement != null) {\n\t\t\t\tstatement.close();\n\t\t\t}\n\n\t\t\tif (connect != null) {\n\t\t\t\tconnect.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}", "public void close()\n throws SQLException\n {\n m_rs.close();\n }", "public static void closeResult(ResultSet result) throws SQLException {\n\tif (null != result) {\n\t result.close();\n\t}\n }", "private void close() {\n\t\t try {\n\t\t\tresultSet.close();\n\t\t\tstatement.close();\n\t\t\t connect.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t \n\t }", "private static void closeResource(ResultSet resource) {\r\n if (resource != null) {\r\n try {\r\n resource.close();\r\n } catch (SQLException e) { /* do nothing */ }\r\n }\r\n }", "public final void dispose() {\n\ttry { if (resultSet != null) resultSet.close(); }\n\tcatch(SQLException e) { e.printStackTrace(); }\n\tresultSet = null;\n\n\ttry { if (stmt != null) stmt.close(); }\n\tcatch(SQLException e) { e.printStackTrace(); }\n\tstmt = null;\n }", "public static void attemptClose(ResultSet o)\n {\n try\n { ls.debug(\"Closing \"+o); if (o != null) o.close();}\n catch (Exception e)\n { ls.fatal(e);}\n }", "public static void closeQuietly(ResultSet rs) {\r\n try {\r\n close(rs);\r\n } catch (SQLException e) {\r\n // quiet\r\n }\r\n }", "public void close() {\r\n\t\ttry {\r\n\t\t\trs.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}\r\n\t\ttry {\r\n\t\t\tst.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}\r\n\t\ttry {\r\n\t\t\tconn.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}\r\n\t}", "public void close(ResultSet rs, PreparedStatement pst) throws BusinessException {\n\t\tclose(rs);\n\t\tclose(pst);\n\t}", "private static void close() {\n try {\n if (songResultSet != null) {\n songResultSet.close();\n }\n if (artistResultSet != null) {\n artistResultSet.close();\n }\n if (albumResultSet != null) {\n albumResultSet.close();\n }\n if (genreResultSet != null) {\n genreResultSet.close();\n }\n\n if (songStatement != null) {\n songStatement.close();\n }\n\n if (albumStatement != null) {\n albumStatement.close();\n }\n\n if (artistStatement != null) {\n artistStatement.close();\n }\n if (genreStatement != null) {\n genreStatement.close();\n }\n\n if (conn != null) {\n conn.close();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void close() {\n\t\t\tDB.close(m_rs, m_pstmt);\n\t\t\tm_rs = null;\n\t\t\tm_pstmt = null;\n\t\t}", "public static void close(ResultSet rs) throws SQLException {\r\n if (rs != null) {\r\n rs.close();\r\n }\r\n }", "public void close() throws SQLException;", "public void close(ResultSet rs, PreparedStatement pst, Connection c) throws BusinessException {\n\t\tclose(rs, pst);\n\t\tclose(c);\n\t}", "ResultSet executeQuery() throws SQLException;", "void closeInternal() throws SQLException {\n\n if (result != null) {\n try {\n result.close();\n if (closeStatement && stat != null) {\n stat.close();\n }\n }\n finally {\n columnCount = 0;\n result = null;\n stat = null;\n conn = null;\n insertRow = null;\n updateRow = null;\n }\n }\n }", "public static void closeJDBCResultSet(ResultSet rs)\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(rs != null)\n\t\t\t{\n\t\t\t\trs.close();\n\t\t\t\trs = null;\t\n\t\t\t}\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{ \n\t\t\tSystem.out.println(\"DBManager.java > closeJDBCResultSet() - ERROR closing JDBC ResultSet: \" + e.getMessage()); \n\t\t}\n\t}", "private void checkClosedResultSet() {\n if(closed) {\n throw new IllegalStateException(\"Resultset is already closed\");\n }\n }", "@Override\n public ResultSet getResultSet() throws SQLException {\n\n ResultSet r;\n\n r = result; // save the existing result set\n result = null; // null out the existing result set\n return r; // return the previously extant result set\n }", "void close() throws SQLException;", "public static void DestroyResult(ResultSet r) {\r\n\t\tif (r==null) return;\r\n\t\ttry {\r\n\t\t\tStatement s = r.getStatement();\r\n\t\t\tr.close();\r\n\t\t\tif(s != null){\r\n\t\t\t\ts.close();\r\n\t\t\t\ts=null;\r\n\t\t\t}\r\n\t\t} catch (SQLException ex) {\r\n\t\t\t// ignore errors on attempting to reelase resource\r\n\t\t}\r\n\t}", "private void flush() {\n\t\ttry {\n\t\t\tif (mResultSet != null) {\n\t\t\t\tmResultSet.close();\n\t\t\t}\n\n\t\t\tif (mStatement != null) {\n\t\t\t\tmStatement.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}", "public static void close(ResultSet resultSetDb) {\n if (resultSetDb != null) {\n try {\n resultSetDb.close();\n } catch (SQLException e) {\n LOGGER.log(Level.WARNING, \"Eroare inchidere rezultat interogare!\");\n }\n }\n }", "private void close() {\n/* */ try {\n/* 253 */ if (this.dataReader != null) {\n/* 254 */ this.dataReader.close();\n/* 255 */ this.dataReader = null;\n/* */ } \n/* 257 */ } catch (SQLException e) {\n/* 258 */ logger.log(Level.SEVERE, (String)null, e);\n/* */ } \n/* */ try {\n/* 261 */ if (this.pstmt != null) {\n/* 262 */ this.pstmt.close();\n/* 263 */ this.pstmt = null;\n/* */ } \n/* 265 */ } catch (SQLException e) {\n/* 266 */ logger.log(Level.SEVERE, (String)null, e);\n/* */ } \n/* */ }", "public void close() throws SQLException {\n\t}", "public static boolean close(final ILogger aLogger, final ResultSet aResultSet){\r\n if (aResultSet==null) return true;\r\n try {\r\n aResultSet.close();\r\n return true;\r\n }\r\n catch (SQLException ex) {\r\n error(aLogger, \"close\", \"ResultSet Failed.\", ex);\r\n return false;\r\n }\r\n }", "public static boolean closeAll(final ILogger aLogger, final ResultSet aResultSet){\r\n if (aResultSet==null) return true;\r\n try {\r\n Statement stm = aResultSet.getStatement();\r\n Connection con = stm.getConnection();\r\n aResultSet.close();\r\n stm.close();\r\n con.close();\r\n return true;\r\n }\r\n catch (SQLException ex) {\r\n error(aLogger, \"closeAll\", \"ResultSet, Statement, and Connection failed.\", ex);\r\n return false;\r\n }\r\n }", "private void closeResources(final ResultSet resultSet, final PreparedStatement preparedStatement,\n\t\t\tfinal Connection connection, String methodName) throws DaoException {\n\t\ttry {\n\t\t\tif (resultSet != null) {\n\t\t\t\tresultSet.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(\"DaoAdminImpl: \" + methodName + \" resultSetError: \", e);\n\t\t}\n\t\ttry {\n\t\t\tif (preparedStatement != null) {\n\t\t\t\tpreparedStatement.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(\"DaoAdminImpl: \" + methodName + \" preparedStatementError: \", e);\n\t\t}\n\t\ttry {\n\t\t\tif (connection != null) {\n\t\t\t\tconnection.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(\"DaoAdminImpl: \" + methodName + \" connectionError: \", e);\n\t\t\tthrow new DaoException(e);\n\t\t}\n\t}", "@Override\n public void close() throws SQLException {\n }", "public void addResult(CloseableIteration<T, QueryEvaluationException> res);", "public ResultSet executeSQL() {\t\t\n\t\tif (rs != null) {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch(SQLException se) {\n\t\t\t} finally {\n\t\t\t\trs = null;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\trs = pstmt.executeQuery();\n\t\t} catch (SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t}\n\t\treturn rs;\n\t}", "@Override\n\tpublic boolean autoCommitFailureClosesAllResultSets() throws SQLException {\n\t\treturn false;\n\t}", "@Test(timeout = 4000)\n public void test042() throws Throwable {\n DBUtil.close((ResultSet) null);\n }", "public ResultSet executeQuery(String sql) throws Exception {\n\n\t\tResultSet rs = stmt.executeQuery(sql);\n\t\t// stmt.close();\n\t\treturn rs;\n\t}", "public static void close(ResultSet rs, Statement st, Connection con) {\n\t\ttry {\n\t\t\tif (rs != null) {\n\t\t\t\trs.close();\n\t\t\t}\n\t\t\tif (st != null) {\n\t\t\t\tst.close();\n\t\t\t}\n\t\t\tif (con != null) {\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tLogger.println(e);\n\t\t}\n\t}", "private static void close(Connection myConnection, Statement myStatment, ResultSet myResultSet) throws SQLException{\n\t\tif (myResultSet != null) {\n\t\t\tmyResultSet.close();\n\t\t}\n\t\t\n\t\tif (myStatment != null) {\n\t\t\tmyStatment.close();\n\t\t}\n\t\t\n\t\tif (myConnection != null) {\n\t\t\tmyConnection.close();\n\t\t}\n\t}", "public abstract void close() throws SQLException;", "public void close() throws SQLException {\n\r\n }", "private void closeResources(Connection connection, PreparedStatement statement, ResultSet resultSet) {\n JdbcClose.close(resultSet);\n JdbcClose.close(statement);\n JdbcClose.close(connection);\n }", "public void Disconnect() {\n\n\t\ttry {\n\t\t\tconn.close();\n\t\t\tps.close(); // cerrar el statement tb cierra el resultset.\n\t\t} catch (SQLException e) {\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tconn.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\t/* no hago nada */}\n\t\t\ttry {\n\t\t\t\tps.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\t/* no hago nada */}\n\t\t}\n\t}", "public static boolean closeRsAndStatement(final ILogger aLogger, final ResultSet aResultSet){\r\n if (aResultSet==null) return true;\r\n try {\r\n Statement stm = aResultSet.getStatement();\r\n aResultSet.close();\r\n stm.close();\r\n return true;\r\n }\r\n catch (SQLException ex) {\r\n error(aLogger, \"closeRsAndStatement\", \"Failed.\", ex);\r\n return false;\r\n }\r\n }", "protected abstract void streamData(ResultSet paramResultSet)\r\n/* 51: */ throws SQLException, IOException, DataAccessException;", "public void closeSourse()\r\n/* 44: */ {\r\n/* 45: */ try\r\n/* 46: */ {\r\n/* 47: 41 */ if (this.rs != null)\r\n/* 48: */ {\r\n/* 49: 42 */ this.rs.close();\r\n/* 50: 43 */ this.rs = null;\r\n/* 51: */ }\r\n/* 52: 45 */ if (this.ps != null)\r\n/* 53: */ {\r\n/* 54: 46 */ this.ps.close();\r\n/* 55: 47 */ this.ps = null;\r\n/* 56: */ }\r\n/* 57: 49 */ if (this.ct != null)\r\n/* 58: */ {\r\n/* 59: 50 */ this.ct.close();\r\n/* 60: 51 */ this.ct = null;\r\n/* 61: */ }\r\n/* 62: */ }\r\n/* 63: */ catch (SQLException e)\r\n/* 64: */ {\r\n/* 65: 55 */ e.printStackTrace();\r\n/* 66: */ }\r\n/* 67: */ }", "@Override\n public synchronized ResultSet executeQuery(String sql)\n throws SQLException {\n\n // tinySQL only supports one result set at a time, so\n // don't let them get another one, just in case it's\n // hanging out.\n //\n tinySQLResultSet trs;\n result = null; \n statementString = sql;\n\n // create a new tinySQLResultSet with the tsResultSet\n // returned from connection.executetinySQL()\n //\n if ( debug ) {\n System.out.println(\"executeQuery conn is \" + connection.toString());\n }\n trs = new tinySQLResultSet(connection.executetinySQL(this), this);\n return trs; \n }", "public void close() {\n\t\tDbHelper.closeDbObjects(this.con, this.itemRangeStatement,\n\t\t\t\tthis.itemRangeResultSet);\n\t}", "@Override\npublic void close() throws IOException, JoinsException, SortException, IndexException {\n\t\n}", "public ResultSet executeSQL(String sql) {\t\t\t\t\t\n\t\tif (rs != null) {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch(SQLException se) {\n\t\t\t} finally {\n\t\t\t\trs = null;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\trs = stmt.executeQuery(sql);\n\t\t} catch(SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t}\n\t\treturn rs;\t\t\t\t\t\t\t\t\t\t\t\t\t// Note that result can be null if something fail.\n\t}", "public void Cerrarproceresul(CallableStatement cstm, ResultSet resul) {\n try {\n if (resul != null) {\n resul.close();\n }\n if (cstm != null) {\n cstm.close();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void close() throws SQLException {\n\n try {\n debugCodeCall(\"close\");\n closeInternal();\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "void close() throws CatalogException;", "private void close(Connection myConn, Statement mystmt, ResultSet myRs) {\n\t\ttry {\n\t\t\tif(myRs!=null)\n\t\t\t\tmyRs.close();\n\t\t\tif(mystmt!=null)\n\t\t\t\tmystmt.close();\n\t\t\tif(myConn!=null)\n\t\t\t\tmyConn.close();\n\t\t\t\n\t\t}\n\t\t\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void close(PreparedStatement ps, ResultSet rs) {\r\n\t\ttry {\r\n\t\t\tif(rs != null && !rs.isClosed()) {\r\n\t\t\t\trs.close();\r\n\t\t\t}\r\n\t\t\tif(ps != null && !ps.isClosed()) {\r\n\t\t\t\tps.close();\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t}", "public void closeRequest(){\n try {\n res.close();\n stmt.close();\n } catch(SQLException e){\n e.printStackTrace();\n }\n }", "public ResultSetRow next() throws SQLException {\n/* 338 */ if (this.fetchedRows == null && this.currentPositionInEntireResult != -1) {\n/* 339 */ throw SQLError.createSQLException(Messages.getString(\"ResultSet.Operation_not_allowed_after_ResultSet_closed_144\"), \"S1000\", this.mysql.getExceptionInterceptor());\n/* */ }\n/* */ \n/* */ \n/* 343 */ if (!hasNext()) {\n/* 344 */ return null;\n/* */ }\n/* */ \n/* 347 */ this.currentPositionInEntireResult++;\n/* 348 */ this.currentPositionInFetchedRows++;\n/* */ \n/* */ \n/* 351 */ if (this.fetchedRows != null && this.fetchedRows.size() == 0) {\n/* 352 */ return null;\n/* */ }\n/* */ \n/* 355 */ if (this.fetchedRows == null || this.currentPositionInFetchedRows > this.fetchedRows.size() - 1) {\n/* 356 */ fetchMoreRows();\n/* 357 */ this.currentPositionInFetchedRows = 0;\n/* */ } \n/* */ \n/* 360 */ ResultSetRow row = this.fetchedRows.get(this.currentPositionInFetchedRows);\n/* */ \n/* 362 */ row.setMetadata(this.metadata);\n/* */ \n/* 364 */ return row;\n/* */ }", "@Override\n\tprotected void doClose() throws Exception {\n\t\tinitialized = false;\n\t\tJdbcUtils.closeResultSet(this.rs);\n\t\trs = null;\n\t\tcleanupOnClose();\n\n\t\tif(this.con != null) {\n\t\t\tthis.con.setAutoCommit(this.initialConnectionAutoCommit);\n\t\t}\n\n\t\tif (useSharedExtendedConnection && dataSource instanceof ExtendedConnectionDataSourceProxy) {\n\t\t\t((ExtendedConnectionDataSourceProxy)dataSource).stopCloseSuppression(this.con);\n\t\t\tif (!TransactionSynchronizationManager.isActualTransactionActive()) {\n\t\t\t\tDataSourceUtils.releaseConnection(con, dataSource);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tJdbcUtils.closeConnection(this.con);\n\t\t}\n\t}", "@Override\n public void close() {\n CloserUtil.close(iterator);\n }", "public void close() throws SQLException {\n enable_stmt.close();\n disable_stmt.close();\n show_stmt.close();\n }", "public void resultSetCollected(ResultSetCollector resultSetCollector);", "@Override\n public ResultSet getResultSet() throws SQLException {\n if (isClosed()) {\n throw new SQLException(\"Statement was closed\");\n }\n if (stmt_ref == null) {\n throw new SQLException(\"Prepare something first\");\n }\n\n if (!returnsResultSet) {\n return null;\n }\n\n // getResultSet can only be called once per result\n ResultSet to_return = select_result;\n this.select_result = null;\n return to_return;\n }", "@Override\r\n\tpublic void close() throws SQLException {\n\t\tsuper.getNested().close();\r\n\t}", "@Override\r\n\tpublic ResultSet call() throws Exception {\n\t\tif (statement.execute()) {\r\n\t\t\tpool.checkIn(conn);\r\n\t\t\treturn statement.getResultSet();\r\n\t\t}\r\n\t\tpool.checkIn(conn); // Release the connection back to the pool\r\n\t\treturn null;\r\n\t}", "@Override public void close() throws SQLException {\n try {\n inner.close();\n }\n finally {\n m.finish();\n }\n }", "private ResultSet execute_statement(String sql, boolean returns_rs) {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n\n try {\n connection = this.connect(); //connect to database\n statement = connection.createStatement();\n if (returns_rs) {\n resultSet = statement.executeQuery(sql); //calculate resultSet\n } else {\n statement.execute(sql); //execute statement\n }\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n if (!returns_rs) {\n try {\n this.disconnect(null, statement, connection); //disconnect from database\n } catch (SQLException ignored) {\n\n }\n }\n }\n return resultSet;\n }", "public QueryCore destroy()\n {\n try\n {\n if(rs != null && !rs.isClosed())\n {\n rs.close();\n }\n if(prepStm != null && !prepStm.isClosed())\n {\n prepStm.close();\n }\n } \n catch (SQLException ex)\n {\n ex.printStackTrace();\n }\n \n return this;\n }", "public int execute() throws LuaException\n {\n ResultSet rs = (ResultSet) L.getObjectFromUserdata(2);\n \n L.pushJavaObject(new LuaSQLCursor(L, rs));\n \n return 1;\n }", "@Test(timeout = 4000)\n public void test079() throws Throwable {\n SimpleResultSet simpleResultSet0 = new SimpleResultSet();\n DBUtil.closeResultSetAndStatement(simpleResultSet0);\n assertTrue(simpleResultSet0.isClosed());\n }", "public void Cleanup(Statement stat, ResultSet rs) {\r\n\tif (stat != null) {\r\n\t try {\r\n\t\tstat.close();\r\n\t } catch (Exception e) {\r\n\t\t// nothing todo here\r\n\t }\r\n\t}\r\n\tif (rs != null) {\r\n\t try {\r\n\t\trs.close();\r\n\t } catch (Exception e) {\r\n\t\t// nothing todo here\r\n\t }\r\n\t}\r\n }", "@Override\r\n\t\t\tpublic Integer handle(ResultSet set) throws SQLException {\n\t\t\t\tint count = 0;\r\n\t\t\t\twhile(set.next()){\r\n\t\t\t\t\tcount = set.getInt(1);\r\n\t\t\t\t}\r\n\t\t\t\treturn count;\r\n\t\t\t}", "public void close()\n throws DataOrderingException;", "public void close() {\n\t\tif(ds!= null){\n\t\t\tds.close() ;\n\t\t}\n\t}", "public ResultSet execute(FarragoSessionRuntimeContext runtimeContext)\n {\n try {\n runtimeContext.setStatementClassLoader(stmtClassLoader);\n\n if (xmiFennelPlan != null) {\n runtimeContext.loadFennelPlan(xmiFennelPlan);\n }\n\n // NOTE jvs 1-May-2004: This sequence is subtle. We can't open all\n // Fennel tuple streams yet, since some may take Java streams as\n // input, and the Java streams are created by stmtMethod.invoke\n // below (which calls the generated execute stmtMethod to obtain an\n // iterator). This means that the generated execute must NOT try to\n // prefetch any data, since the Fennel streams aren't open yet. In\n // particular, Java iterator implementations must not do prefetch in\n // the constructor (always wait for hasNext/next).\n TupleIter iter =\n (TupleIter) stmtMethod.invoke(\n null,\n new Object[] { runtimeContext });\n\n FarragoTupleIterResultSet resultSet =\n new FarragoTupleIterResultSet(\n iter,\n rowClass,\n rowType,\n fieldOrigins,\n runtimeContext,\n null);\n\n // instantiate and initialize all generated FarragoTransforms.\n for (FarragoTransformDef tdef : transformDefs) {\n tdef.init(runtimeContext);\n }\n\n if (xmiFennelPlan != null) {\n // Finally, it's safe to open all streams.\n runtimeContext.openStreams();\n }\n\n runtimeContext = null;\n resultSet.setOpened();\n\n return resultSet;\n } catch (IllegalAccessException e) {\n throw Util.newInternal(e);\n } catch (InvocationTargetException e) {\n throw Util.newInternal(e);\n } finally {\n if (runtimeContext != null) {\n runtimeContext.closeAllocation();\n }\n }\n }", "public ResultSet getResultSet() throws SQLException {\n return null;\r\n }", "public void closeResources(Connection conn, Statement stmt, ResultSet res) {\n\t\ttry {\n\t\t\tif (res != null) {\n\t\t\t\tres.close();\n\t\t\t}\n\t\t\tif (stmt != null) {\n\t\t\t\tstmt.close();\n\t\t\t}\n\t\t\tif (conn != null) {\n\t\t\t\tconn.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}", "private void closeCursor() {\n if (cursor != null) {\n cursor.close();\n }\n if (refreshedCursor != null) {\n refreshedCursor.close();\n }\n }", "@Override\n public void close()\n {\n if (closed) {\n return;\n }\n closed = true;\n\n try {\n stats.addMaxCombinedBytesPerRow(recordReader.getMaxCombinedBytesPerRow());\n recordReader.close();\n }\n catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n }", "public interface LocalResultSet {\n\n public boolean next();\n public int getInt(String fldname);\n public String getString(String fldname);\n public LocalMetaData getMetaData();\n public void close();\n}", "public void close() {\n if (stmt == null) {\n return;\n }\n\n try {\n commit();\n } catch (HandledException ex) {\n Exceptions.ignore(ex);\n }\n\n safeClose();\n context.unregister(this);\n }", "public void close() throws SQLException {\n currentPreparedStatement.close();\n }", "private void closeConnections(ResultSet rs, Statement stmt, Connection con) {\n try {\n if (rs != null) {\n rs.close();\n }\n if (stmt != null) {\n stmt.close();\n }\n if (con != null) {\n con.close();\n }\n } catch (Exception exp) {\n exp.printStackTrace();\n }\n }", "public void close() {\n try {\n con.close();\n } catch (SQLException se) { /*can't do anything */ }\n try {\n stmt.close();\n } catch (SQLException se) { /*can't do anything */ }\n }", "@Test(timeout = 4000)\n public void test043() throws Throwable {\n Csv csv0 = Csv.getInstance();\n SimpleResultSet simpleResultSet0 = new SimpleResultSet(csv0);\n DBUtil.close((ResultSet) simpleResultSet0);\n assertEquals(1000, simpleResultSet0.getFetchDirection());\n }", "public void close () throws SQLException {\r\n\t\tconn.close();\r\n\t}" ]
[ "0.73532367", "0.6873722", "0.68206406", "0.67848694", "0.6768822", "0.67105734", "0.6650776", "0.6636819", "0.65666467", "0.6534117", "0.65219283", "0.64998144", "0.64577746", "0.6415962", "0.6415962", "0.64126873", "0.6409518", "0.6392759", "0.6364826", "0.6361386", "0.6354052", "0.62923765", "0.62874097", "0.6244661", "0.6243296", "0.62202966", "0.62195176", "0.62165946", "0.6166019", "0.6149405", "0.6099654", "0.6083522", "0.6068123", "0.6042043", "0.6037064", "0.5999454", "0.59909993", "0.59580773", "0.5909192", "0.5906051", "0.59045446", "0.5893344", "0.5857959", "0.5838432", "0.5837453", "0.58327943", "0.5811734", "0.5810469", "0.5803944", "0.5798996", "0.5773606", "0.5771455", "0.57622826", "0.57277495", "0.5720775", "0.56992364", "0.56771475", "0.5644269", "0.5610681", "0.5603992", "0.5593569", "0.55775136", "0.5565491", "0.5550772", "0.5530691", "0.55210346", "0.5492518", "0.54794186", "0.54550517", "0.5454468", "0.54521966", "0.5395083", "0.5393492", "0.5376032", "0.5344777", "0.53380287", "0.5327999", "0.5323241", "0.53064686", "0.530629", "0.529002", "0.5284831", "0.5284733", "0.52716875", "0.52706736", "0.5265415", "0.5258058", "0.52567893", "0.52547973", "0.52445436", "0.5238352", "0.52366", "0.52364594", "0.5234053", "0.521404", "0.5202071", "0.51988435", "0.51874715", "0.5179396", "0.5178628" ]
0.6697834
6
This returns the Link Property specified by the passed in parameter. For instance, if there is a sortKey specifying how to sort the association, calling getLinkProperty("sortKey") would return the sortKey for the given Association.
public Object getLinkProperty(String name) { if (!hasLinkAttributes()) { return null; } return get("link." + name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getProperty(String property);", "Property getProperty();", "Property getProperty();", "public String getProperty(Object obj, String key);", "java.lang.String getProperty();", "@objid (\"780bebb2-6884-4789-bdef-ca10444ad5fb\")\n Link getLink();", "public String getProperty(String propertyName) {\n PropertyHelper ph = PropertyHelper.getPropertyHelper(this);\n return (String) ph.getProperty(null, propertyName);\n }", "public Object getProperty(String propertyName){\n return properties.get(propertyName);\n }", "String getProperty(String key);", "String getProperty(String key);", "String getProperty(String key);", "public Object getProperty(Object key) {\r\n\t\treturn properties.get(key);\r\n\t}", "String getProperty();", "String getProperty();", "String getProperty();", "public AlertApi.AlertObject getProperty(String prop) \n throws AlertException {\n AlertApi.AlertObject obj = null;\n AlertTreeNodeLeaf leaf = null;\n synchronized(AlertCorrelationEngine.class) {\n leaf = (AlertTreeNodeLeaf) propertiesMap.get(prop);\n }\n if (leaf != null) {\n String [] pathElements = leaf.parsePath();\n try {\n int nodeid = Integer.parseInt(pathElements[0]);\n int index = getIndexFromNodeId(nodeid);\n AlertNode curNode = getNodeFromIndex(index);\n if (curNode != null && curNode.isValid()) {\n obj = leaf.getAlertObject();\n return obj;\n }\n } catch (NumberFormatException nb) {\n logger.severe(\"invalid leaf, nodeid = \" + pathElements[0]);\n }\n }\n if (obj == null) {\n throw (new AlertException(\"property \" + prop + \" does not exist\"));\n }\n // To please compiler.\n return null;\n }", "Property findProperty(String propertyName);", "public Object getProperty(String attName);", "public String getProperty();", "Object getProperty(String requestedProperty) {\n return properties.getProperty(requestedProperty);\n }", "Object getProperty(String key);", "String getProperty(String name);", "public java.lang.String getProperty(java.lang.String propertyName) {\n return properties.getProperty(propertyName);\n }", "public String get(String propertyName);", "public String getProperty(final String propertyName) {\n\t\treturn properties.getProperty(propertyName);\n\t}", "public String getStringProperty(String propertyName) ;", "Object getProperty(String name);", "public static String getProperty(String key) {\n if (prop == null) {\n return null;\n }\n return prop.getProperty(key);\n }", "Link findLinkById(String linkId);", "public String getProperty(String name);", "public String getPropertyId() {\n return propertyId;\n }", "public String getProp(String key) {\n\t\treturn prop.getProperty(key);\n\t}", "public Object getProperty( Property propertyId ) {\n return nodeProperties != null ? nodeProperties.get(propertyId) : null;\n }", "public Object getProperty(String name) {\n return properties.get(name);\n }", "String fetchProperty(String property)\n\t{\n\t\tif(configProp==null)\n\t\t\tloadPropertiesFile();\n\t\t\n\t\treturn(configProp.getProperty(property));\n\t}", "public Property getProperty() {\n\t\treturn _property;\n\t}", "String getLinkName();", "public String getProperty(String key) {\n String value = properties.getProperty(key);\n return value;\n }", "public String getProperty(Class type, String key);", "public String getProperty( String key )\n {\n List<Props.Entry> props = this.props.getEntry();\n Props.Entry keyObj = new Props.Entry();\n keyObj.setKey( key );\n\n String value = null;\n int indx = props.indexOf( keyObj );\n if ( indx != -1 )\n {\n Props.Entry entry = props.get( props.indexOf( keyObj ) );\n value = entry.getValue();\n }\n\n return value;\n }", "public String getProperty(String name){\r\n\t\treturn properties.getProperty(name);\r\n\t}", "public static String getProperty(String aKey) {\n checkArgument(!isNullOrEmpty(aKey), \"aKey cannot be null or empty\");\n \n loadPropertiesFile();\n String propValue = \"\";\n propValue = props.getProperty(aKey);\n return propValue;\n }", "public static String getProperty(String property) {\n if (properties == null) {\n loadProperties();\n }\n return properties.getProperty(property);\n }", "String getObjectByPropertyQuery(String subject, String property);", "protected String getProperty(String prop) {\n\t\tLogManager mgr = LogManager.getLogManager();\n\t\tif (name.length() > 0) {\n\t\t\tString key = String.format(\"%s(\\\"%s\\\").%s\", getClass().getName(), name, prop);\t\t\t\n\t\t\tString val = mgr.getProperty(key);\n\t\t\tif (val != null)\n\t\t\t\treturn val;\t\t\t\n\t\t}\t\t\n\t\treturn mgr.getProperty(getClass().getName() + \".\" + prop);\t\t\t\n\t}", "public String getProperty(String key) {\n\t\treturn this.properties.get(key);\n\t}", "public static String getProperty(String key) {\r\n\t\treturn prop.getProperty(key);\r\n\t}", "public String getPropValue(String propertyName){\n\n return pro.getProperty(propertyName);\n\n }", "public static String getProperty( Object object, String property )\r\n {\r\n try\r\n {\r\n property = property.substring( 0, 1 ).toUpperCase() + property.substring( 1, property.length() );\r\n\r\n Method method = object.getClass().getMethod( \"get\" + property );\r\n\r\n return (String) method.invoke( object );\r\n }\r\n catch ( NoSuchMethodException ex )\r\n {\r\n return null;\r\n }\r\n catch ( InvocationTargetException ex )\r\n {\r\n return null;\r\n }\r\n catch ( IllegalAccessException ex )\r\n {\r\n return null;\r\n }\r\n }", "public String getProperty(String key) {\n\t\treturn this.properties.getProperty(key);\n\t}", "public String getSpecificProperty() {\n\t\treturn specificProperty;\n\t}", "public PropertyObject getProperty(String name) {\n return this.properties.get(name);\n }", "public Object get(String propertyId)\n {\n return properties.get(propertyId);\n }", "public String getProperty(String propertyName) {\n\t\tSystem.out.println(propertyName + \" - \" + oAuthProperties.getProperty(propertyName));\n\t\treturn oAuthProperties.getProperty(propertyName);\n\t}", "protected abstract String getFactPropertyType(Object property);", "public int getPropertyId() {\n\t\treturn propertyId;\n\t}", "public int getPropertyId() {\n\t\treturn propertyId;\n\t}", "String get(String kind, String name, String property);", "public static String getMSJProperty(String prop){\n\t\tif(propiedades.containsKey(prop)){\n\t\t\treturn propiedades.getString(prop);\t\n\t\t}else{\n\t\t\treturn \"\";\n\t\t}\t\t\t\t\n\t}", "public String getLinkName();", "public static String getPropertyAccessMethodName(String property) {\r\n if (\"this\".equals(property))\r\n return \"this\";\r\n return \"get\" + property.substring(0, 1).toUpperCase(Locale.ENGLISH) + property.substring(1);\r\n }", "public static MailboxProperty PropertyGet(MAILBOX_TAG tag) {\n return new MailboxProperty(_PropertyGet(tag.getId()));\n }", "@DOMSupport(DomLevel.ONE)\r\n @Property String getLinkColor();", "public String getPropertyValue(String propertyName){\n\t\treturn (String) properties.get(propertyName);\n\t}", "String getLink();", "private PropertyPagePropertyDescriptor getPropertyDescriptor() {\n \t\treturn propertyDescriptor;\n \t}", "public String getProperty(String name) {\n return this.getProperty(name, null);\n }", "public Object getProperty(String name) {\n if (properties != null) {\n return properties.get(name);\n }\n return null;\n }", "Object getProperty(Long id, String name) throws RemoteException;", "private String getProperty(\n String name\n ) {\n return properties.getProperty(\n String.format(\"%s%s\", propertiesPrefix, name)\n );\n }", "public String getPropertyKey() {\n\t\treturn propertyKey;\n\t}", "public static String getProperty(String key) {\n\t\treturn properties.getProperty(key);\n\t}", "public static String getProperty(String name) {\r\n return properties.getProperty(name);\r\n }", "public Object getProperty(String name)\n {\n return m_props.get(name);\n }", "public String getProperty(final String iName) {\n return getProperty(iName, null);\n }", "@JSProperty(\"linkedTo\")\n double getLinkedTo();", "public DatatypeProp getProperty() {\n return property;\n }", "public String getProperty( String name )\n {\n return getProperty( name, false );\n }", "public static String getProperty(String alias, String def)\r\n\t{\r\n\t\talias = processalias(alias);\r\n\r\n\t\tif(dynoption != null && dynoption.containsKey(alias))\r\n\t\t{\t\r\n\t\t\tString val = dynoption.get(alias);\r\n\t\t\t\r\n\t\t\tif(val == null && def != null)\r\n\t\t\t\treturn def;\r\n\t\t\telse\r\n\t\t\t\treturn val;\r\n\t\t}\r\n\t\t\r\n\r\n\t\tif(cmd != null && cmd.hasOption(alias))\r\n\t\t{\r\n\t\t\treturn cmd.getOptionValue(alias);\r\n\t\t}\r\n\t\telse if(config != null)\r\n\t\t{\r\n\t\t\treturn config.getString(alias, def);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn def;\r\n\t\t}\r\n\t}", "@Override\n public Object getProperty(String property) {\n for (Map.Entry<String, RequiredFunctionalExtension> requiredBehaviorEntry : myRequiredBehaviorById.entrySet()) {\n Object prop = requiredBehaviorEntry.getValue().getProperty(property);\n if (prop != null) {\n return prop;\n }\n }\n return null;\n }", "public ObjectProp getRelationship() {\n return relationship;\n }", "@DOMSupport(DomLevel.ONE)\r\n @Property String getAlinkColor();", "public native String getPropertyValue(final String propertyName)\n /*-{\n var j = [email protected]::rules.length;\n for(var i=0; i<j; i++) {\n // $entry not needed as function is not exported\n var value = [email protected]::rules[i].style[propertyName];\n if(value)\n return value;\n }\n return null;\n }-*/;", "public java.lang.String getLink()\n {\n return this.link;\n }", "public String getProperty() {\n Object ref = property_;\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 property_ = s;\n return s;\n }\n }", "public Object getProperty(Object object, String property) {\n if (object == null) {\n throw new NullPointerException(\"Cannot get property: \" + property + \" on null object\");\n }\n else if (object instanceof GroovyObject) {\n GroovyObject pogo = (GroovyObject) object;\n return pogo.getProperty(property);\n }\n else if (object instanceof Map) {\n Map map = (Map) object;\n return map.get(property);\n }\n else {\n return metaRegistry.getMetaClass(object.getClass()).getProperty(object, property);\n }\n }", "public String getProperty(String name) {\r\n if (name == null) {\r\n throw new IllegalArgumentException(Msg.get(\"Property name == null\", \"portal.illegalargumentexception.property.name.null\"));\r\n }\r\n\r\n return properties.get(name);\r\n }", "org.apache.calcite.avatica.proto.Common.DatabaseProperty getKey();", "@SuppressWarnings( \"unchecked\" )\n public static <T> PropertyFunction<T> property( Property<T> property )\n {\n return ( (PropertyReferenceHandler<T>) Proxy.getInvocationHandler( property ) ).property();\n }", "public List<Object> getPropertyNameOrXlinkPropertyNameOrFunction() {\n if (propertyNameOrXlinkPropertyNameOrFunction == null) {\n propertyNameOrXlinkPropertyNameOrFunction = new ArrayList<Object>();\n }\n return this.propertyNameOrXlinkPropertyNameOrFunction;\n }", "public static String getProperty(String name) {\n return propertyMap.getProperty(name);\n }", "public String getProperty(String name)\n {\n return _propertyEntries.get(name);\n }", "public Link getLink() {\r\n return link;\r\n }", "public String getProperty() {\n Object ref = property_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n property_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "protected String getRelatedTextKey(String propertyName) {\n return propertyName + \"::\" + RELATEDTEXT_ID_SUFFIX;\n }", "public String getPropertyPart() {\n return this.PROPERTY_PART;\n }", "public String getProperty(String propertyName) throws CoreException;", "@Override\n public Object getProperty(String name) {\n name = name.toLowerCase();\n return this.properties.get(name);\n }", "public static String getPROPERTY_ID() {\n\t\treturn PROPERTY_ID;\n\t}" ]
[ "0.5736762", "0.5605966", "0.5605966", "0.5448658", "0.5445205", "0.5383599", "0.5370614", "0.5316547", "0.5225633", "0.5225633", "0.5225633", "0.5194947", "0.51839644", "0.51839644", "0.51839644", "0.5165003", "0.5158041", "0.5155098", "0.5149068", "0.512659", "0.5115608", "0.5101994", "0.50984186", "0.509392", "0.5093911", "0.5052784", "0.5045316", "0.504108", "0.5038309", "0.50086373", "0.5006024", "0.500193", "0.49838892", "0.4977049", "0.4970217", "0.49491027", "0.49268585", "0.49202427", "0.4909227", "0.49008724", "0.48969516", "0.4894954", "0.48919034", "0.48915452", "0.48865455", "0.48856467", "0.48834977", "0.4883078", "0.4859332", "0.48458943", "0.48410776", "0.4839739", "0.48390606", "0.4828556", "0.48041016", "0.47930175", "0.47930175", "0.47928286", "0.47788832", "0.47761223", "0.47752428", "0.47709298", "0.4764554", "0.47547707", "0.47424695", "0.47421175", "0.47335196", "0.47320908", "0.4724269", "0.47187442", "0.47177708", "0.47066045", "0.4702895", "0.47001234", "0.46985343", "0.46966216", "0.4693624", "0.4691924", "0.46912482", "0.46747798", "0.46687403", "0.46598953", "0.4654754", "0.46514496", "0.4647748", "0.46443993", "0.46404663", "0.4638655", "0.46246135", "0.46236265", "0.46215668", "0.46202046", "0.46161425", "0.46148503", "0.4611161", "0.46025336", "0.46024612", "0.46013328", "0.4588654" ]
0.66751295
0
Para editar uma anotacao:
public void altera(Anotacao anotacao) { //Referencia um bd pra escrever: SQLiteDatabase db = getWritableDatabase(); //Cria o conteúdo com os dados setados no método que preenche: ContentValues dados = pegaDadosAnotacao(anotacao); //Pra entrar nos parametros (?) do db.update: String [] params = {anotacao.getId().toString()}; //Faz um update (Tabela, dados, where): db.update("Anotacoes", dados, "id = ?", params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}", "@Override\n\tpublic void editar(Contato contato) {\n\t\tthis.dao.editar(contato);\n\t\t\n\t}", "public void editarAlimento(int id_alimento, String nombre, String estado, float caloria, float proteinas,float grasas ,float hidratos_de_carbono, float H20, float NE, float vitamina_a, float vitamina_B1, float vitamina_B2, float vitamina_C, float Niac, float sodio, float potasio, float calcio, float magnesio, float cobre, float hierro, float fosforo, float azufre, float cloro, float Fen, float Ileu, float Leu, float Lis, float Met, float Tre, float Tri, float Val, float Acid, float AlCAL);", "public String editar()\r\n/* 59: */ {\r\n/* 60: 74 */ if ((getMotivoLlamadoAtencion() != null) && (getMotivoLlamadoAtencion().getIdMotivoLlamadoAtencion() != 0)) {\r\n/* 61: 75 */ setEditado(true);\r\n/* 62: */ } else {\r\n/* 63: 77 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_seleccionar\"));\r\n/* 64: */ }\r\n/* 65: 79 */ return \"\";\r\n/* 66: */ }", "public void editar() {\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Atualizar(cliente);\n\n JSFUtil.AdicionarMensagemSucesso(\"Cliente editado com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n }", "public void editar(AplicacionOferta aplicacionOferta){\n try{\n aplicacionOfertaDao.edit(aplicacionOferta);\n }catch(Exception e){\n Logger.getLogger(AplicacionOfertaServicio.class.getName()).log(Level.SEVERE, null, e);\n }\n }", "private void edit() {\n\n\t}", "public String editar()\r\n/* 86: */ {\r\n/* 87:112 */ if (getDimensionContable().getId() != 0)\r\n/* 88: */ {\r\n/* 89:113 */ this.dimensionContable = this.servicioDimensionContable.cargarDetalle(this.dimensionContable.getId());\r\n/* 90:114 */ String[] filtro = { \"indicadorValidarDimension\" + getDimension(), \"true\" };\r\n/* 91:115 */ this.listaCuentaContableBean.agregarFiltro(filtro);\r\n/* 92:116 */ this.listaCuentaContableBean.setIndicadorSeleccionarTodo(true);\r\n/* 93:117 */ verificaDimension();\r\n/* 94:118 */ setEditado(true);\r\n/* 95: */ }\r\n/* 96: */ else\r\n/* 97: */ {\r\n/* 98:120 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_seleccionar\"));\r\n/* 99: */ }\r\n/* 100:123 */ return \"\";\r\n/* 101: */ }", "@Override\n\tpublic void editar(Cliente cliente) throws ExceptionUtil {\n\t\t\n\t}", "public void editOperation() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void edit() {\n\t\t\r\n\t}", "public void editar(ParadaUtil paradaUtil) {\n\t\tiniciarTransacao();\r\n\t\ttry {\r\n\t\t\ts.update(paradaUtil);\r\n\t\t\ttx.commit();\r\n\t\t} catch (Exception e) {\r\n\t\t} finally {\r\n\t\t\ts.close();\r\n\t\t}\r\n\t}", "public abstract void edit();", "public EditarVenda() {\n initComponents();\n URL caminhoIcone = getClass().getResource(\"/mklivre/icone/icone2.png\");\n Image iconeTitulo = Toolkit.getDefaultToolkit().getImage(caminhoIcone);\n this.setIconImage(iconeTitulo);\n conexao = ModuloConexao.conector();\n codigoCliente.setEnabled(false);\n lucro.setEnabled(false);\n valorLiquidoML.setEnabled(false);\n }", "public void editarTbagendamento() {\n\n if (tbagendamento.getTmdataagendamento().after(TimeControl.getDateIni())) {\n if (agendamentoLogic.editTbagendamento(tbagendamento)) {\n AbstractFacesContextUtils.redirectPage(PagesUrl.URL_AGENDAMENTO_LIST);\n AbstractFacesContextUtils.addMessageInfo(\"Agendamento editado com sucesso.\");\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falhar ao realizado ediçãos do agendamento.\");\n }\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"verifique se a data de agendamento esta correta.\");\n }\n\n }", "private void modi() { \n try {\n cvo.getId_cliente();\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.actualizar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Modificado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para Modificar registro!\");\n }\n }", "@Override\n public void editar(EntidadeBase entidade) throws EditarEntidadeException, ValidacaoEntidadeException, Exception {\n setOperacao(OPERACAO_EDITAR);\n // validar se os campos vêm todos bem preenchidos\n boolean isValido = validarCampos(entidade);\n\n // se estiver bem preenchido,\n // avança para a edição\n if (isValido) {\n\n lista.put(entidade.getCodigo(), entidade);\n } else {\n // senão, retorna erro\n throw new EditarEntidadeException();\n }\n }", "void alterar(Entidade entidade);", "void editAdvert(String aid, Advert advert);", "@Override\r\n\tpublic Loja editar(String nomeResponsavel, int telefoneEmpresa, String rua, String cidade, String estado, String pais,\r\n\t\t\tint cep, int cnpj, String razaoSocial, String email, String nomeEmpresa, String senha) {\n\t\treturn null;\r\n\t}", "public void editPrioritaet(int prioID, String bezeichnung) throws Exception;", "public void editar(Empleado empleado) {\n\t\tentityManager.getTransaction().begin();\n\t\tentityManager.merge(empleado);\n\t\tentityManager.getTransaction().commit();\n\t\t//JPAUtil.shutdown();\n\t}", "public String editarRutina(Rutina tp) {\n\t\t//newRutina = ts;\n\t\tvEditing = true;\n\t\tvTitulo = \"EDITAR\";\n\t\treturn \"nueva-rutina?faces-redirect=true&id=\"+tp.getIdRutina();\n\t}", "void onEditClicked();", "public Equipamento editar(Equipamento eq) {\r\n\t\t\tthis.conexao.abrirConexao();\r\n\t\t\tString sqlUpdate = \"UPDATE equipamentos SET nome=?,descricao=?, id_usuario=? WHERE id_equipamentos=?\";\r\n\t\t\ttry {\r\n\t\t\t\tPreparedStatement statement = (PreparedStatement) this.conexao.getConexao().prepareStatement(sqlUpdate);\r\n\t\t\t\tstatement.setString(1, eq.getNome());\r\n\t\t\t\tstatement.setString(2, eq.getDescricao());\r\n\t\t\t\tstatement.setLong(3, eq.getUsuario().getId());\r\n\t\t\t\tstatement.setLong(4, eq.getId());\r\n\t\t\t\t/*int linhasAfetadas = */statement.executeUpdate();\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} finally {\r\n\t\t\t\tthis.conexao.fecharConexao();\r\n\t\t\t}\r\n\t\t\treturn eq;\r\n\t\t}", "public static void editarEstudiante(Estudiante estudiante) {\r\n //metimos este método a la base de datos\r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.print(\"Conexion establecida!\");\r\n Statement sentencia = conexion.createStatement();\r\n int insert = sentencia.executeUpdate(\"update docente set \"\r\n + \"Nro_de_ID='\" + estudiante.getNro_de_ID()\r\n + \"',Nombres='\" + estudiante.getNombres()\r\n + \"',Apellidos='\" + estudiante.getApellidos()\r\n + \"',Laboratorio='\" + estudiante.getLaboratorio()\r\n + \"',Carrera='\" + estudiante.getCarrera()\r\n + \"',Modulo='\" + estudiante.getModulo()\r\n + \"',Materia='\" + estudiante.getMateria()\r\n + \"',Fecha='\" + estudiante.getFecha()\r\n + \"',Hora_Ingreso='\" + estudiante.getHora_Ingreso()\r\n + \"',Hora_salida='\" + estudiante.getHora_Salida()\r\n + \"'where Nro_de_ID='\" + estudiante.getNro_de_ID() + \"';\");\r\n\r\n sentencia.close();\r\n conexion.close();\r\n\r\n } catch (Exception ex) {\r\n System.out.print(\"Error en la conexion\" + ex);\r\n }\r\n }", "public void editarPrograma(Programa prog) throws Exception {\r\n\t\tEntityManager em = AdministradorEntityManager.getEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\tem.merge(prog);\r\n\t\tem.getTransaction().commit();\t\t\r\n\t}", "void setEditore(String editore);", "public void alterar() {\n //metodo para alterar\n String sql = \"UPDATE empresa SET empresa = ?, cnpj = ?, \"\n + \"endereco = ?, telefone = ?, email = ? WHERE (id = ?)\";\n try {\n pst = conexao.prepareStatement(sql);\n pst.setString(1, txtEmpNome.getText());\n pst.setString(2, txtEmpCNPJ.getText());\n pst.setString(3, txtEmpEnd.getText());\n pst.setString(4, txtEmpTel.getText());\n pst.setString(5, txtEmpEmail.getText());\n pst.setString(6, txtEmpId.getText());\n if ((txtEmpNome.getText().isEmpty()) || (txtEmpCNPJ.getText().isEmpty())) {\n JOptionPane.showMessageDialog(null, \"Preencha todos os campos obrigatórios\");\n } else {\n //a linha abaixo atualiza a tabela usuarios com os dados do formulario\n // a esttrutura abaixo confirma a ALTERACAO dos dados na tabela\n int adicionado = pst.executeUpdate();\n if (adicionado > 0) {\n JOptionPane.showMessageDialog(null, \"Dados do cliente alterado com sucesso\");\n txtEmpNome.setText(null);\n txtEmpEnd.setText(null);\n txtEmpTel.setText(null);\n txtEmpEmail.setText(null);\n txtEmpId.setText(null);\n txtEmpCNPJ.setText(null);\n btnAdicionar.setEnabled(true);\n }\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "private void editar(){\n String codigo = getIntent().getStringExtra(\"codigo\");\n Intent otra = new Intent(this, MainActivity.class);\n otra.putExtra(\"codigo\", codigo);\n otra.putExtra(\"nombre\", nombre.getText().toString());\n otra.putExtra(\"raza\", raza.getText().toString());\n otra.putExtra(\"clase\", clase.getText().toString());\n otra.putExtra(\"nv\", nv.getText().toString());\n otra.putExtra(\"exp\", exp.getText().toString());\n otra.putExtra(\"pg\", String.valueOf(pgValue));\n otra.putExtra(\"pgMax\", String.valueOf(pgMaxValue));\n otra.putExtra(\"ca\", ca.getText().toString());\n otra.putExtra(\"vel\", vel.getText().toString());\n\n String[] statsValue = new String[stats.length];\n for(int i = 0; i < statsValue.length; i++){\n statsValue[i] = stats[i].getText().toString();\n }\n otra.putExtra(\"stats\", statsValue);\n\n otra.putExtra(\"salvBonus\", String.valueOf(salvBonus));\n\n otra.putExtra(\"statsSalv\", salvacionCb);\n\n otra.putExtra(\"habBonus\", String.valueOf(habBonus));\n\n otra.putExtra(\"habilidadesCb\", habilidadesCb);\n\n startActivity(otra);\n }", "public void editarArtista() {\n\t\tArrayList<String> listString = new ArrayList<>();\r\n\t\tArrayList<ArtistaMdl> listArtista = new ArrayList<>();\r\n\t\tString[] possibilities = pAController.getArtista();\r\n\t\tfor (String s : possibilities) {\r\n\t\t\tString text = s.replaceAll(\".*:\", \"\");\r\n\t\t\tlistString.add(text);\r\n\t\t\tif (s.contains(\"---\")) {\r\n\t\t\t\tArtistaMdl artista = new ArtistaMdl();\r\n\t\t\t\tartista.setNome(listString.get(1));\r\n\t\t\t\tlistArtista.add(artista);\r\n\t\t\t\tlistString.clear();\r\n\t\t\t}\r\n\t\t}\r\n\t\tString[] possibilities2 = new String[listArtista.size()];\r\n\t\tfor (int i = 0; i < listArtista.size(); i++) {\r\n\t\t\tpossibilities2[i] = listArtista.get(i).getNome();\r\n\t\t}\r\n\t}", "protected void editarContato(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t\tSystem.out.println(request.getParameter(\"id\"));\n\t\tSystem.out.println(request.getParameter(\"nome\"));\n\t\tSystem.out.println(request.getParameter(\"telefone\"));\n\t\tSystem.out.println(request.getParameter(\"email\"));\n\t\t\n\n\t\t// fim do teste//\n\n\t\tcontato.setId(request.getParameter(\"id\"));\n\t\tcontato.setNome(request.getParameter(\"nome\"));\n\t\tcontato.setFone(request.getParameter(\"telefone\"));\n\t\tcontato.setEmail(request.getParameter(\"email\"));\n\t\t// executar o metodo alterarContato - execute method alterarContato\n\t\tdao.alterarContato(contato);\n\t\t// redirecionar para agenda.jsp - redirect to agenda.jsp\n\t\tresponse.sendRedirect(\"main\");\n\n\t}", "@Override\n\tpublic void editar(ProdutoPedido produtoPedido) {\n\t\tdao.update(produtoPedido);\n\t}", "@Override\n\tpublic void editAction(int id) {\n\t\t\n\t}", "@FXML\r\n private void editar(ActionEvent event) {\n selecionado = tabelaCliente.getSelectionModel()\r\n .getSelectedItem();\r\n\r\n //Se tem algum cliente selecionado\r\n if (selecionado != null) { //tem clienteonado\r\n //Pegar os dados do cliente e jogar nos campos do\r\n //formulario\r\n textFieldNumeroCliente.setText(\r\n String.valueOf( selecionado.getIdCliente() ) );\r\n textfieldNome.setText( selecionado.getNome() ); \r\n textFieldEmail.setText(selecionado.getEmail());\r\n textFieldCpf.setText(selecionado.getCpf());\r\n textFieldRg.setText(selecionado.getRg());\r\n textFieldRua.setText(selecionado.getRua());\r\n textFieldCidade.setText(selecionado.getCidade());\r\n textFieldBairro.setText(selecionado.getBairro());\r\n textFieldNumeroCasa.setText(selecionado.getNumeroCasa());\r\n textFieldDataDeNascimento.setValue(selecionado.getDataNascimemto());\r\n textFieldTelefone1.setText(selecionado.getTelefone1());\r\n textFieldTelefone2.setText(selecionado.getTelefone2());\r\n textFieldCep.setText(selecionado.getCep());\r\n \r\n \r\n \r\n }else{ //não tem cliente selecionado na tabela\r\n mensagemErro(\"Selecione um cliente.\");\r\n }\r\n\r\n }", "@Override\n\tpublic void alterar(Parcela entidade) {\n\n\t}", "@POST\n @Path(\"Editar\")\n @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})\n public String Editar (@FormParam(\"codigo\") Integer codigo, @FormParam(\"nif\") String nif , @FormParam(\"nombre\") String nombre , \n @FormParam(\"apellido1\") String apellido1 , @FormParam(\"apellido2\") String apellido2){\n Empleado objeto = super.find(codigo);\n \n objeto.setNif(nif);\n objeto.setNombre(nombre);\n objeto.setApellido1(apellido1);\n objeto.setApellido2(apellido2);\n \n super.edit(objeto);\n return \"Se edito con exito\";\n \n }", "@Override\r\n\tprotected void editarObjeto() throws ClassNotFoundException {\n\t\tif (tbJustificaciones.getSelectedRow() != -1\r\n\t\t\t\t&& tbJustificaciones.getValueAt(tbJustificaciones.getSelectedRow(), 0) != null) {\r\n\t\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (MODIFICANDO)\");\r\n\t\t\tthis.opcion = 2;\r\n\t\t\tactivarFormulario();\r\n\t\t\tcargarDatosModificar();\r\n\t\t\ttxtCedula.setEnabled(false);\r\n\t\t\tlimpiarTabla();\r\n\t\t\tthis.panelBotones.habilitar();\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(null, GlobalUtil.MSG_ITEM_NO_SELECCIONADO, \"ATENCION\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\t}", "void actualizar(Prestamo prestamo);", "private void edit() {\n if (String.valueOf(tgl_pengobatanField.getText()).equals(null)\n || String.valueOf(waktu_pengobatanField.getText()).equals(null)) {\n Toast.makeText(getApplicationContext(),\n \"Ada Yang Belum Terisi\", Toast.LENGTH_SHORT).show();\n } else {\n SQLite.update(Integer.parseInt(idField.getText().toString().trim()),nama_pasien2,nama_dokter2, tgl_pengobatanField.getText().toString().trim(),waktu_pengobatanField.getText().toString(),\n keluhan_pasienField.getText().toString().trim(),hasil_diagnosaField.getText().toString().trim(),\n biayaField.getText().toString().trim());\n blank();\n finish();\n }\n }", "abstract void trataAltera();", "@Override\r\n public void editarCliente(Cliente cliente) throws Exception {\r\n entity.getTransaction().begin();//inicia la edicion\r\n entity.merge(cliente);//realiza la edicion.\r\n entity.getTransaction().commit();//finaliza la edicion\r\n }", "public void alterar(Edicao edicao) {\n\t\t\tconn = Conexao.getConexao();//conecta ao banco de dados\n\t\t\tsql = \"update edicao set edicaonumero = ?\";\n\t\t\t\n\t\t\ttry {\n\t\t\t\tps = conn.prepareStatement(sql);\n\t\t\t\t\n\t\t\t\tps.setInt(1, edicao.getEdicaonumero());\n\t\t\t\t\t\t\t\t\n\t\t\t\tps.execute(); //executa a acao\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Alterado com Sucesso !\");\t\t\t\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"erro no alterar\"+e.getMessage());\n\t\t\t}\n\t\t}", "protected abstract void editItem();", "@Override\n\tpublic Usuario edit(Usuario obj) {\n\t\treturn null;\n\t}", "public void editarHospede() {\n int i;\n if (hospedesCadastrados.isEmpty()) {\n System.err.println(\"Nao existe hospedes cadastrados\\n\");\n } else {\n listarHospedes();\n int cpf = verifica();\n for (i = 0; i < hospedesCadastrados.size(); i++) {\n if (hospedesCadastrados.get(i).getCpf() == cpf) {//hospede\n System.err.println(\"O que deseja editar:\\n Nome(1)\\n\"\n + \"Cpf(2)\\nE-MAIL(3)\");\n int a = verifica();\n switch (a) {\n case 1:\n System.err.println(\"Digite o novo nome do hospede:\\n\");\n String nome = ler.next();\n hospedesCadastrados.get(i).setNome(nome);\n System.err.println(\"Atualzacao concluida!\\n\");\n break;\n case 2:\n System.err.println(\"Digite o novo CPF do hospede:\\n\");\n int cpf1 = verifica();\n hospedesCadastrados.get(i).setCpf(cpf1);\n System.err.println(\"Atualzacao concluida!\\n\");\n break;\n case 3:\n System.err.println(\"Digite o novo E-MAIL do hospede:\\n\");\n String email = ler.next();\n hospedesCadastrados.get(i).setEmail(email);\n System.err.println(\"Atualzacao concluida!\\n\");\n break;\n }\n\n } else if (hospedesCadastrados.size() == i) {\n System.err.println(\"Nao existem hospedes com esse cpf cadastrados!\\n\");\n }\n }\n }\n }", "T edit(long id, T obj);", "public void editarEmpresa (Empresa empresa) throws Exception{\r\n\t\tEmpresa emp = daoEmpresa.buscarEmpresa(empresa.getId());\r\n\t\t\r\n\t\tif(emp != null){\r\n\t\t\tdaoEmpresa.editarEmpresa(empresa);\r\n\t\t}else{\r\n\t\t\tthrow new ExcepcionNegocio(\"No hay empresa registrada con este ID\");\r\n\t\t}\r\n\t}", "public void editarProveedor() {\n try {\n proveedorFacadeLocal.edit(proTemporal);\n this.proveedor = new Proveedor();\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Proveedor editado\", \"Proveedor editado\"));\n } catch (Exception e) {\n \n }\n\n }", "private void editarResidencia(Residencias residencia, Residenciasobservaciones obs) {\n\t\t\n\t\t\n\t\tif(obs==null) {\t\t\t\t\n\t\t\thibernateController.updateResidencia(residencia);\t\t\t\n\t\t\t\n\t\t}else {\t\t\t\n\t\t\thibernateController.updateResidenciaObservacion(residencia, obs);\n\t\t}\n\t\t\n\t\tupdateContent();\t\n\t\t\n\t}", "public String edit(Entidades entidade) {\n\t\tif(verificaPermissao()) {\n\t\t\tEntidadesDAO.saveOrUpdate(entidade);\n\t\t\tthis.entidades = new Entidades();\n\t\t}\n\t\treturn \"/Consulta/consulta_entidades\";\n\t}", "public void modifica(DTOAcreditacionGafetes acreGafete) throws Exception ;", "public void editAss() throws IOException {\r\n\t\tif (listview.getSelectionModel().getSelectedItem() != null) {\r\n\t\t\tassToChoose = listview.getSelectionModel().getSelectedItem();\r\n\t\t\tfor (int i = 0; i < b.size(); i++) {\r\n\t\t\t\tif (b.get(i).getAssname().equals(assToChoose)) {\r\n\t\t\t\t\tassId = b.get(i).getAssId();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tconnectionmain.showTeacherEditAssGUI();\r\n\t\t}\r\n\t}", "private void jb_modificarActionPerformed(java.awt.event.ActionEvent evt) {\n String Arch = JOptionPane.showInputDialog(\"INGRESE LA CARPETA A MODIFICAR\");\n String NEWArch = JOptionPane.showInputDialog(\"INGRESE EL NUEVO NOMBRE DE LA CARPETA\");\n ini.ListaGen.modificarCAR(ListaGen.head, NombreUs, Arch, NEWArch);\n }", "private void cambiarEstadoCamposInfoMedica(boolean editar) {\n\t\tif (editar) {\n\t\t\ttituloInfoMedica.setEditable(true);\n\t\t\t\n\t\t\tfechaInfoMedica.setVisible(false);\n\t\t\tfechaElegirInfoMedica.setVisible(true);\n\t\t\t\n\t\t\ttextDescripcion.setEditable(true);\n\t\t\ttextTratamiento.setEditable(true);\n\t\t\t\n\t\t\tbtnGuardarInfoMedica.setVisible(true);\n\t\t} else {\n\t\t\ttituloInfoMedica.setEditable(false);\n\t\t\t\n\t\t\tfechaInfoMedica.setVisible(true);\n\t\t\tfechaElegirInfoMedica.setVisible(false);\n\t\t\t\n\t\t\ttextDescripcion.setEditable(false);\n\t\t\ttextTratamiento.setEditable(false);\n\t\t\t\n\t\t\tbtnGuardarInfoMedica.setVisible(false);\n\t\t}\n\t}", "public static void editar(Pessoa p) throws Exception\n {\n PreparedStatement stmt = Banco.query(\"UPDATE pessoa SET nome = ?, telefone = ?, email = ? WHERE id = ?\");\n\n stmt.setString(1, p.getNome());\n stmt.setString(2, p.getTelefone());\n stmt.setString(3, p.getEmail());\n stmt.setInt(4, p.getId());\n Banco.executar(stmt);\n }", "@Override\n public void edit(User user) {\n }", "public static void atualizar(int id, String nome){\n System.out.println(\"Dados atualizados!\");\n }", "@Override\n public void edit(ReporteAccidente rep) {\n repr.save(rep);\n }", "public void editar(String update){\n try {\n Statement stm = Conexion.getInstancia().createStatement();\n stm.executeUpdate(update);\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }", "public EditarDados(Produto dados) {\n \tthis.dados = dados;\n initComponents();\n setLocationRelativeTo(null);\n }", "public void saveORUpdateObra(Obra obra) throws Exception;", "public boolean getEditando() {\n return this.aluno.getId() != null;\n }", "private void editAlarm(Alarm affectedAlarm) {\n \t\t//TODO: Launch AddAlarmActivity with this alarm as base so the user can edit it.\n \t}", "@Override\r\n\tpublic void atualizar(Tipo tipo) {\n String sql = \"update tipos_servicos set nome = ? \"\r\n + \"where id = ?\";\r\n try {\r\n stmt = conn.prepareStatement(sql);\r\n \r\n stmt.setString(1, tipo.getNome());\r\n \r\n \r\n stmt.setInt(3, tipo.getId());\r\n \r\n stmt.executeUpdate();\r\n \r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n }\r\n\t}", "public static void editarAlumno(AlumnoVO alumno) throws SQLException, ClassNotFoundException {\n\t\tConnection con = Constante.getConexion();\n\t\tStatement sentencia = con.createStatement();\n\t\tsentencia.executeUpdate(\"UPDATE alumno SET nombre='\" + alumno.getNombre() + \"', apellido1='\"\n\t\t\t\t+ alumno.getApellido1() + \"', apellido2='\" + alumno.getApellido2() + \"', telefono=\" + alumno.getTelefono()\n\t\t\t\t+ \", fechanacimiento='\" + new Date(alumno.getFechaNacimiento().getTime()) + \"' WHERE dni='\" + alumno.getDni()+\"'\");\n\t\tsentencia.close();\n\t\tcon.close();\n\t}", "public void controlaMenuEditaFuncionario(Funcionario funcionario) {\n int opcao = this.telaFuncionario.pedeOpcao();\n\n switch (opcao) {\n case 1:\n String nome = this.telaFuncionario.pedeNome();\n funcionario.setNome(nome);\n this.telaFuncionario.mensagemNomeEditadoSucesso();\n menuEditaFuncionario(funcionario);\n break;\n case 2:\n int matricula = verificaMatriculaInserida();\n funcionario.setMatricula(matricula);\n this.telaFuncionario.mensagemMatriculaEditadaSucesso();\n menuEditaFuncionario(funcionario);\n break;\n case 3:\n String dataNascimento = cadastraDataNascimento();\n funcionario.setDataNascimento(dataNascimento);\n this.telaFuncionario.mensagemDataNascimentoEditadaSucesso();\n menuEditaFuncionario(funcionario);\n break;\n case 4:\n int telefone = this.telaFuncionario.pedeTelefone();\n funcionario.setTelefone(telefone);\n this.telaFuncionario.mensagemTelefoneEditadoSucesso();\n menuEditaFuncionario(funcionario);\n break;\n case 5:\n int salario = this.telaFuncionario.pedeSalario();\n funcionario.setSalario(salario);\n this.telaFuncionario.mensagemSalarioEditadoSucesso();\n menuEditaFuncionario(funcionario);\n break;\n\n case 6:\n this.telaFuncionario.exibeOpcaoCargoFuncionario();\n Cargo cargo = atribuiCargoAoFuncionario();\n funcionario.setCargo(cargo);\n this.telaFuncionario.mensagemCargoEditadoSucesso();\n menuEditaFuncionario(funcionario);\n break;\n\n case 7:\n exibeMenuFuncionario();\n break;\n default:\n this.telaFuncionario.opcaoInexistente();\n editaFuncionario();\n break;\n }\n }", "public void editTransactionAgent(Agent agent);", "void actualizar(Espacio espacio);", "public void editCommissionAccounts(CommissionAccount commissionAccount);", "@Override\n\t\tpublic void update(Metodologia metodologia,String name) {\n\t\t\t\n\t\t}", "public void edit() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"editButton\").click();\n\t}", "@Override\n\tpublic int edita(Solicitud bean) throws Exception {\n\t\treturn 0;\n\t}", "public static void editar(Categoria editarCategoria) {\n em.getTransaction().begin();\n em.merge(editarCategoria);\n em.getTransaction().commit();\n Tipo tipo = editarCategoria.getPerteneceTipo();\n tipo.getAgrupaCategorias().add(editarCategoria);\n// em.refresh(tipoOriginal);\n }", "public void actualizar();", "void actionEdit(int position);", "boolean setDadosAlteracao(Object dados);", "public void editaLivro(Livro livro) {\n itemLivroDAOBD.editarLivro(livro);\n }", "public void alterarLeituristaMovimentoRoteiroEmpresa( Integer idRota, Integer anoMes, Integer idLeituristaNovo ) throws ErroRepositorioException;", "public void beforeEdit(Librerias.ZafTblUti.ZafTblEvt.ZafTableEvent evt) {\n// strEstCncDia=tblDat.getValueAt(tblDat.getSelectedRow(), INT_TBL_DAT_EST_CON)==null?\"\":tblDat.getValueAt(tblDat.getSelectedRow(), INT_TBL_DAT_EST_CON).toString();\n// if(strEstCncDia.equals(\"S\")){\n// mostrarMsgInf(\"<HTML>La cuenta ya fue conciliada.<BR>Desconcilie la cuenta en el documento a modificar y vuelva a intentarlo.</HTML>\");\n//// fireAsiDiaListener(new ZafAsiDiaEvent(this), INT_BEF_EDI_CEL);\n// objTblCelEdiTxtVcoCta.setCancelarEdicion(true);\n// }\n// else if(strEstCncDia.equals(\"B\")){\n// mostrarMsgInf(\"<HTML>No se puede cambiar el valor de la cuenta<BR>Este valor proviene de la transferencia ingresada.</HTML>\");\n// objTblCelEdiTxtVcoCta.setCancelarEdicion(true);\n// }\n// else{\n// //Permitir de manera predeterminada la operaci�n.\n// blnCanOpe=false;\n// //Generar evento \"beforeEditarCelda()\".\n// fireAsiDiaListener(new ZafAsiDiaEvent(this), INT_BEF_EDI_CEL);\n// //Permitir/Cancelar la edici�n de acuerdo a \"cancelarOperacion\".\n// if (blnCanOpe)\n// {\n// objTblCelEdiTxtVcoCta.setCancelarEdicion(true);\n// }\n// }\n }", "T edit(T obj);", "public void editarImovel_Detalhes(String titulo, String novoDetalhes) {\n\t\tString sql = \"UPDATE imovel SET detalhes='\"+novoDetalhes+\"' WHERE titulo ='\" +titulo+\"'\";\n\t\tboolean imovelEncontrado = buscaImovel_BD(titulo);\n\t\tif(imovelEncontrado==false) {\n\t\t\ttry{\n\t\t\t\tPreparedStatement stmt = conexaoBD.prepareStatement(sql); \n\t\t\t\tstmt.execute();\n\t\t\t\tstmt.close();\n\t\t\t}catch(Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage()); \n\t\t\t}\n\t\t}else {\n\t\t\tJOptionPane.showMessageDialog(null, \"Verifique o título do imóvel.\");\n\t\t}\n\t}", "@FXML\n\tpublic void handleEditar(MouseEvent event) {\n\t\tif(colNome.getCellData(jtvIngredienteTable.getSelectionModel().getSelectedIndex()) != null){\n\t\t\tingredienteService = new IngredienteService();\n\t\t\tIngrediente ingrediente = jtvIngredienteTable.getSelectionModel().getSelectedItem();\n\t\t\tScreenUtils.abrirNovaJanela(\"fxml/Compras/NovoIngrediente.fxml\", ingrediente);\n\t\t}else{\n\t\t\tScreenUtils.janelaInformação(spDialog, Internationalization.getMessage(\"header_erro3\"), Internationalization.getMessage(\"item_nao_selecionado\"), Internationalization.getMessage(\"erro_button2\"));\n//\t\t\tScreenUtils.janelaInformação(spDialog, \"Ops\", \"Por favor, selecione um item.\", \"Sem problemas\");\n\t\t}\n\t}", "@PostMapping(\"/update\")\n public ModelAndView editSocio(Persona persona) {\n personaService.editSocio(persona);\n return new ModelAndView(\"redirect:/admin/socios\");\n }", "public void editarMateria() {\n materia.setIdDepartamento(departamento);\n ejbFacade.edit(materia);\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaEditDialog').hide()\");\n ejbFacade.limpiarCache();\n items = ejbFacade.findAll();\n departamento = new Departamento();\n materia = new Materia();\n// FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se editó con éxito\"));\n// requestContext.execute(\"PF('mensajeRegistroExitoso').show()\");\n\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se editó con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n\n requestContext.update(\"msg\");//Actualiza la etiqueta growl para que el mensaje pueda ser mostrado\n\n requestContext.update(\"MateriaListForm\");\n requestContext.update(\"MateriaCreateForm\");\n\n }", "void edit(Price Price);", "public void onEditAgendaItem() {\n AgendaItem agendaItem = outputAgendaItemsPreparation.getSelectionModel().getSelectedItem();\n\n if (agendaItem == null) {\n AlertHelper.showError(LanguageKey.ERROR_AGENDAITEM_NULL, null);\n return;\n }\n\n AgendaItemDialog agendaItemDialog = AgendaItemDialog.getNewInstance(agendaItem);\n if (agendaItemDialog == null) {\n // Exception already handled\n return;\n }\n Optional<AgendaItem> result = agendaItemDialog.showAndWait();\n if (!result.isPresent()) {\n return;\n }\n\n if (controller.editAgendaItem(result.get())) {\n return;\n }\n\n AlertHelper.showError(LanguageKey.ERROR_AGENDAITEM_EDIT, null);\n }", "@GetMapping(\"/editar/{id_persona}\")\n public String editar(Persona persona, Model model){\n persona = personaService.encontrarPersona(persona);\n model.addAttribute(\"persona\", persona);\n return \"modificar\";\n }", "abstract void botonEditar_actionPerformed(ActionEvent e);", "@Override\r\n\tpublic void funcionalidad(boolean aceptado) {\r\n\t\tif (aceptado) {\r\n\t\t\tbtn_guardar.removeAll();\r\n\t\t\tbtn_cancelar.removeAll();\r\n\t\t\tbtn_cancelar.setVisible(false);\r\n\t\t\tbtn_guardar.setVisible(false);\r\n\t\t\tbtnEliminar.setVisible(true);\r\n\t\t\tbutton_Editar.setVisible(true);\r\n\t\t\tbtnRetirar.setVisible(true);\r\n\t\t\tbtn_crear.setVisible(true);\r\n\r\n\t\t\tif (validarDatos()) {\r\n\t\t\t\t// Actualizar miOferta\r\n\t\t\t\tmiOferta.setDescripcion(txArea_descripcion.getText());\r\n\t\t\t\tmiOferta.setLugar(txField_lugar.getText());\r\n\t\t\t\tmiOferta.setExperiencia(Float.parseFloat(txField_experiencia.getText()));\r\n\t\t\t\tmiOferta.setContrato(((Contrato) combo_contrato.getSelectedItem()));\r\n\t\t\t\tmiOferta.setSalarioMax(Integer.parseInt(txField_sueldoMax.getText()));\r\n\t\t\t\tmiOferta.setSalarioMin(Integer.parseInt(txField_sueldoMin.getText()));\r\n\t\t\t\tmiOferta.setAspectosImprescindibles(txArea_aspectosImpres.getText());\r\n\t\t\t\tmiOferta.setAspectosAValorar(txArea_aspectosValorar.getText());\r\n\t\t\t\tmiOferta.setConocimientos(pa_conocimientos.getConocimientosAnadidos());\r\n\t\t\t}\r\n\r\n\t\t\ttry {\r\n\t\t\t\tUtilidadesBD.actualizarOferta(miOferta);\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}", "boolean edit(InvoiceDTO invoiceDTO);", "String getEditore();", "public AreaInteres editarArea(AreaInteres a) throws Exception {\r\n\t\treturn boAreaInt.editarAreaInteres(a);\r\n\t}", "private void iniFormEditar()\r\n\t{\r\n\t\tthis.operacion = Variables.OPERACION_EDITAR;\r\n\t\t\r\n\t\t/*Verificamos que tenga permisos*/\r\n\t\tboolean permisoNuevoEditar = this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_CONCILIACION, VariablesPermisos.OPERACION_NUEVO_EDITAR);\r\n\t\t\r\n\t\tif(permisoNuevoEditar){\r\n\t\t\t\r\n\t\t\tthis.btnEditar.setVisible(false);\r\n\t\t\tthis.conciliar.setVisible(true);\r\n\t\t\tthis.btnEliminar.setVisible(false);\r\n\t\t\tthis.conciliar.setCaption(\"Guardar\");\r\n\t\t\t\r\n\t\t\tthis.nroDocum.setEnabled(false);\r\n\t\t\tthis.fecDoc.setEnabled(true);\r\n\t\t\tthis.observaciones.setEnabled(true);\r\n\t\t\t\r\n\t\t\tthis.botones.setWidth(\"187\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\t\r\n\t\t\t/*Mostramos mensaje Sin permisos para operacion*/\r\n\t\t\tMensajes.mostrarMensajeError(Variables.USUSARIO_SIN_PERMISOS);\r\n\t\t}\r\n\t}", "public static void actualizarRegistro(){\n int idActulizar = Integer.parseInt(JOptionPane.showInputDialog(\"Ingrese el ID a Actualizar\"));\n Scanner teclado = new Scanner(System.in); \n \n System.out.println(\"Actualizando.... \");\n //String anombre = teclado.nextLine();\n persona pa = new persona();\n pa.setNombre(teclado.nextLine());\n pa.setAp_paterno(teclado.nextLine());\n pa.setAp_materno(teclado.nextLine());\n pa.setDireccion(teclado.nextLine());\n pa.setSexo(teclado.nextLine());\n \n pd.actualizarPerosna(idActulizar, pa);\n // mostras los actualizados\n for (persona ps: pd.listaPersonas()){\n System.out.println(ps.getId()+ \" \"+\n ps.getNombre()+ \" \"+\n ps.getAp_paterno()+ \" \"+ \n ps.getAp_materno());\n }\n }", "public Boolean getEditar() {\r\n\t\treturn editar;\r\n\t}", "public void editaFornecedor(String nome, String atributo, String novoValor) {\n\t\tUtil.testaNull(nome, \"Erro na edicao do fornecedor: nome nao pode ser vazio ou nulo.\");\n\t\tUtil.testaVazio(nome, \"Erro na edicao do fornecedor: nome nao pode ser vazio ou nulo.\");\n\n\t\tUtil.testaNull(atributo, \"Erro na edicao do fornecedor: atributo nao pode ser vazio ou nulo.\");\n\t\tUtil.testaVazio(atributo, \"Erro na edicao do fornecedor: atributo nao pode ser vazio ou nulo.\");\n\n\t\tUtil.testaNull(novoValor, \"Erro na edicao do fornecedor: novo valor nao pode ser vazio ou nulo.\");\n\t\tUtil.testaVazio(novoValor, \"Erro na edicao do fornecedor: novo valor nao pode ser vazio ou nulo.\");\n\n\t\tif (atributo.equals(\"nome\")) {\n\t\t\tthrow new IllegalArgumentException(\"Erro na edicao do fornecedor: nome nao pode ser editado.\");\n\t\t}\n\n\t\tif (!atributo.equals(\"email\") && !atributo.equals(\"telefone\")) {\n\t\t\tthrow new IllegalArgumentException(\"Erro na edicao do fornecedor: atributo nao existe.\");\n\t\t}\n\n\t\tif (!this.fornecedores.containsKey(nome)) {\n\t\t\tthrow new IllegalArgumentException(\"Erro na edicao do fornecedor: fornecedor nao existe.\");\n\t\t}\n\n\t\tif (atributo.equals(\"email\")) {\n\t\t\tthis.fornecedores.get(nome).setEmail(novoValor);\n\t\t}\n\n\t\tif (atributo.equals(\"telefone\")) {\n\t\t\tthis.fornecedores.get(nome).setTelefone(novoValor);\n\t\t}\n\t}", "public void editarCliente(Cliente clienteUsuario) {\n setTitle(\"Editar Cliente\");\n\n cliente = clienteUsuario;\n\n nome.setText(clienteUsuario.getNome());\n rua.setText(clienteUsuario.getRua());\n numero.setText(String.valueOf(clienteUsuario.getCasa()));\n telefone.setText(String.valueOf(clienteUsuario.getTelefone()));\n observacao.setText(clienteUsuario.getObservacao());\n bairro.setText(clienteUsuario.getBairro());\n\n novoCliente = false;\n }", "public void updateEmpresa() {\n Empresa empresa = empresaDAO.load(config.getApplicationEmpresaId());\n this.textTitle.setText(MessageFormat.format(resource.getString(\"main.title\"), empresa.getNome()));\n }", "public String editarFuncionario() throws ClassNotFoundException, SQLException{\n\t\tInteger id = Integer.parseInt((String)FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"idfuncionario\"));\n\t\tString retorno =\"Usuário alterado com sucesso\";\n\t\t//funcionario = retornarFuncionario(id);\n\n\t\tFuncionarioDAOImpl daoFuncionario = new FuncionarioDAOImpl();\n\t\tdaoFuncionario.save(funcionario);\t\t\t\n\n\t\treturn retorno;\n\t}" ]
[ "0.7691938", "0.76717025", "0.7549773", "0.75035715", "0.7376799", "0.72915936", "0.7286699", "0.71030635", "0.7075", "0.70511144", "0.69293195", "0.6906283", "0.686917", "0.68374187", "0.67611635", "0.67495865", "0.6742252", "0.6716327", "0.66978294", "0.66823345", "0.6674268", "0.6668423", "0.6665497", "0.6664285", "0.6637365", "0.662709", "0.66264236", "0.66244304", "0.6605079", "0.6604116", "0.6602407", "0.6588719", "0.65476", "0.654334", "0.6535528", "0.6494749", "0.64525706", "0.64394706", "0.6418474", "0.6417068", "0.64044887", "0.6398973", "0.63923436", "0.6388236", "0.63686717", "0.63670444", "0.63590246", "0.63565373", "0.6345162", "0.63427085", "0.631917", "0.6312702", "0.6299034", "0.6293582", "0.62915224", "0.62905973", "0.62789893", "0.6275828", "0.62664104", "0.62641644", "0.62628186", "0.6253967", "0.62472785", "0.62411976", "0.6239656", "0.62383395", "0.62346995", "0.6234311", "0.62321866", "0.6231367", "0.62280875", "0.62269324", "0.62246233", "0.6224121", "0.6220704", "0.6220267", "0.62192655", "0.61879456", "0.61874676", "0.6184102", "0.6177849", "0.6172987", "0.6164399", "0.6160883", "0.6153379", "0.61525", "0.6150362", "0.61471355", "0.6134055", "0.6125308", "0.61250985", "0.6124087", "0.61238617", "0.6123057", "0.6115649", "0.6112434", "0.61110556", "0.6105651", "0.6103059", "0.6102175" ]
0.7425184
4
Constructor for the Bridge class.
public Bridge() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public OntoBridge()\r\n\t{ \r\n\t}", "protected GaConnector() {\n }", "public Link() {\n }", "Constructor() {\r\n\t\t \r\n\t }", "public Connection() {\n\t\t\n\t}", "private LinkLayer() {\r\n }", "public Boop() {\n\t\tsuper();\n\t}", "private AWTBridge() {\n\t}", "public LinkBuilder() {\n }", "public Bridge(String name, String bridgePrefix, String numberDivider) {\r\n this.name = name;\r\n this.bridgePrefix = bridgePrefix;\r\n this.numberDivider = numberDivider;\r\n }", "private Connection() {\n \n }", "public Libro() {\r\n }", "public AbstractConnection() {\n }", "public AbstractBinaryInteraction() {\n\n\t}", "public Links() {\n }", "public LpsClient() {\n super();\n }", "private Connection () {}", "public PhysicalLink() {\n\n }", "private Link() {\n }", "public HGDClient() {\n \n \t}", "public Communicator() {\n\t}", "public ServerConnecter() {\r\n\r\n\t}", "protected LibReference() {\n\t}", "private Connection(){\n\n }", "public BrokerAlgo() {}", "private VerbBridge() {\r\n\t\tvB = null;\r\n\t}", "public Communicator() {\n }", "public Communicator() {\n }", "private HYCOM() {\n }", "public NetworkAdapter() {\n }", "public MapperBase() {\r\n }", "public UConnecte() {\n\t\tsuper();\n\t}", "public AvaliacaoRisco() {\n }", "protected abstract void construct();", "public DoublyLink() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "private Converter()\n\t{\n\t\tsuper();\n\t}", "public Bus() {\n\t}", "public Chick() {\n\t}", "public Constructor(){\n\t\t\n\t}", "protected Betaling()\r\n\t{\r\n\t\t\r\n\t}", "public IPConnection() {\n\t\tbrickd = new BrickDaemon(\"2\", this);\n\t}", "public TTL_CIL_Communicator()\n {\n }", "BoundObject(){}", "public Implementor(){}", "public GameClient() {\r\n super(new Client(Config.WRITE_BUFFER_SIZE, Config.OBJECT_BUFFER_SIZE), null, null);\r\n }", "public LinkQueue(){\n }", "public ItsNatImpl()\r\n {\r\n }", "public HVConnect () {\n super();\n // TODO Auto-generated constructor stub\n }", "public Billfold()\n {\n \n }", "public NetworkSource() {\n }", "@Override\n public void init() {}", "public EmoticonBO()\n {}", "public Curso() {\r\n }", "private Connection() {\n\t\tSystem.out.println(\">> Connection Object Constructed at \"+this);\n\t}", "NodeBridge(Object impl) {\n\t\t//this.impl = impl;\n\t\tsetImpl(impl);\n\t}", "public Gateway() {\n genClient = new GenericClient<Gateway>(this);\n }", "public TurnoVOClient() {\r\n }", "protected IPCGCallDetailCreator()\r\n {\r\n // empty\r\n }", "public LinksResource() {\n }", "private TbusRoadGraph() {}", "public Client() {\n }", "public ServerConnection()\n {\n //Initializing of the variables used in the constructor\n this.hostAddress = \"http://localhost\";\n this.port = 8882;\n }", "public BaseJourney() {\n this.driver = DriverWrapper.getDriver();\n this.initElements();\n // load properties here\n this.isIOS = driver instanceof IOSDriver;\n this.isAndroid = driver instanceof AndroidDriver;\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n void init() {\n }", "public Bike(){\n\t}", "private PluginAPI() {\r\n\t\tsuper();\r\n\t}", "protected CommunicationsHandler(){}", "public Barrier() {\n }", "@Override public void init()\n\t\t{\n\t\t}", "public Telefone() {\n\t}", "public ConverterComponent() {\n\t}", "public LinkElement() { }", "private ClientLoader() {\r\n }", "protected BusinessObjectMapper() {\n }", "public JsonpConnectionInfo() {\n }", "public SgaexpedbultoImpl()\n {\n }", "public BaseLogic()\n {\n this(new EventBus());\n }", "public OBOMapper() {\n this(true);\n }", "@Override\n public void init() {\n }", "@Override\n protected void init() {\n }", "private ServerConnectionParser() {\n }", "private Composite() {\n }", "@Override\n public void init() {\n }", "public LinksBean() {\n }", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\r\n\tpublic void init() {}", "public BaseParameters(){\r\n\t}", "protected GraphNode() {\n }", "protected GraphNode() {\n }", "public Network () {\n buildNetwork();\n }", "public _355() {\n\n }", "public Cohete() {\n\n\t}" ]
[ "0.7712172", "0.6709995", "0.6562159", "0.6496901", "0.6496726", "0.6475564", "0.6462141", "0.6455936", "0.6281319", "0.62794054", "0.62783873", "0.6272875", "0.6242651", "0.6224107", "0.62222344", "0.6221221", "0.62004906", "0.62003464", "0.6190258", "0.6176103", "0.61736715", "0.6165789", "0.6158801", "0.61107093", "0.61065143", "0.60814047", "0.60718405", "0.60718405", "0.6069301", "0.60673743", "0.60632277", "0.60603905", "0.60580975", "0.6048562", "0.6045885", "0.60431546", "0.6041524", "0.60357624", "0.6025608", "0.60206723", "0.6018044", "0.6000264", "0.59969026", "0.5995533", "0.5984938", "0.597757", "0.59666455", "0.59623206", "0.59570014", "0.5954993", "0.59547657", "0.59483016", "0.5947839", "0.59460634", "0.5929142", "0.592607", "0.5910582", "0.590808", "0.5904373", "0.5895079", "0.58911926", "0.5888732", "0.5883197", "0.58825856", "0.58825856", "0.58825856", "0.58825856", "0.58825856", "0.58825856", "0.5880217", "0.5875627", "0.5874197", "0.5865106", "0.5864198", "0.58641136", "0.5861648", "0.5853867", "0.58536345", "0.5850613", "0.58484447", "0.58472604", "0.584241", "0.5838519", "0.58353895", "0.5829234", "0.5828873", "0.58263355", "0.5826128", "0.5824784", "0.5824532", "0.5823403", "0.5823403", "0.5823403", "0.582243", "0.5817754", "0.5816839", "0.5816839", "0.58148193", "0.58135474", "0.58061814" ]
0.8658055
0
Request permission to enter the bridge.
public void enterBridge() { lock.lock(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void askForPermissions();", "void permissionGranted(int requestCode);", "void requestNeededPermissions(int requestCode);", "private void requestPermission() {\n\n ActivityCompat.requestPermissions(CalltoVendor.this, new String[]\n {\n CALL_PHONE\n }, RequestPermissionCode);\n }", "@Override\n public void onGranted() {\n }", "@Override\n public void onGranted() {\n }", "@Override\n public void onGranted() {\n }", "private void requestPermissions(){\n Intent intent = new Intent(this.getApplication(), MainActivity.class);\r\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n startActivity(intent);\r\n }", "@Override\n public void onRequestAllow(String permissionName) {\n }", "@Override\n public void onPermissionGranted() {\n }", "@Override\n public void onPermissionGranted() {\n }", "private void requestPermissions() {\n mWaiting4Permission = Boolean.TRUE;\n\n ActivityCompat.requestPermissions(this, permissionsToAsk(), PERMISSIONS_REQUEST_CODE);\n }", "private void requestCameraPermission(){\n requestPermissions(cameraPermissions, CAMERA_REQUESTED_CODE);\n }", "public void OnConfHostRequest(BoUserInfoBase user, int permission);", "public void requestAccessToPcc()\n {\n \tstate = State.CONNECTING;\n\t releaseHandle = AntPlusBikePowerPcc.requestAccess(this.context, deviceNumber, 0, this, this);\n }", "public void onPermissionGranted() {\n\n }", "private void authorize() {\r\n\r\n\t}", "@Test\n public void testRequestGrantedPermission() throws Exception {\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.WRITE_CONTACTS));\n\n String[] permissions = new String[] {Manifest.permission.WRITE_CONTACTS};\n\n // Request the permission and allow it\n BasePermissionActivity.Result firstResult = requestPermissions(permissions,\n REQUEST_CODE_PERMISSIONS,\n BasePermissionActivity.class, () -> {\n try {\n clickAllowButton();\n getUiDevice().waitForIdle();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n });\n\n // Expect the permission is granted\n assertPermissionRequestResult(firstResult, REQUEST_CODE_PERMISSIONS,\n permissions, new boolean[] {true});\n\n // Request the permission and do nothing\n BasePermissionActivity.Result secondResult = requestPermissions(new String[] {\n Manifest.permission.WRITE_CONTACTS}, REQUEST_CODE_PERMISSIONS + 1,\n BasePermissionActivity.class, null);\n\n // Expect the permission is granted\n assertPermissionRequestResult(secondResult, REQUEST_CODE_PERMISSIONS + 1,\n permissions, new boolean[] {true});\n }", "public static Access granted() {\n return new Access() {\n @Override\n void exec(BeforeEnterEvent enterEvent) {\n }\n };\n }", "@Override\n public void notifyPrivilege() {\n try {\n if (getClientInterface() != null)\n getClientInterface().notifyPrivilege();\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending privilege error\");\n }\n }", "void requestStoragePermission();", "@Override\n public void onClick(View view) {\n String platform = checkPlatform();\n if (platform.equals(\"Marshmallow\")) {\n Log.d(TAG, \"Runtime permission required\");\n //Step 2. check the permission\n boolean permissionStatus = checkPermission();\n if (permissionStatus) {\n //Permission already granted\n Log.d(TAG, \"Permission already granted\");\n } else {\n //Permission not granted\n //Step 3. Explain permission i.e show an explanation\n Log.d(TAG, \"Explain permission\");\n explainPermission();\n //Step 4. Request Permissions\n Log.d(TAG, \"Request Permission\");\n requestPermission();\n }\n\n } else {\n Log.d(TAG, \"onClick: Runtime permission not required\");\n }\n\n\n }", "private void checkAndRequestPermissions() {\n missingPermission = new ArrayList<>();\n // Check for permissions\n for (String eachPermission : REQUIRED_PERMISSION_LIST) {\n if (ContextCompat.checkSelfPermission(this, eachPermission) != PackageManager.PERMISSION_GRANTED) {\n missingPermission.add(eachPermission);\n }\n }\n // Request for missing permissions\n if (missingPermission.isEmpty()) {\n DroneModel.getInstance(this).setDjiProductStateCallBack(this);\n DroneModel.getInstance(this).startSDKRegistration();\n } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n ActivityCompat.requestPermissions(this,\n missingPermission.toArray(new String[missingPermission.size()]),\n REQUEST_PERMISSION_CODE);\n }\n }", "private void requestStoragePermission(){\n requestPermissions(storagePermissions, STORAGE_REQUESTED_CODE);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(AddressBook_add.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "public void requestPermission() {\n ActivityCompat.requestPermissions(MainActivity.this, new String[]{\n Manifest.permission.CAMERA,\n Manifest.permission.READ_CONTACTS\n }, RequestPermissionCode);\n }", "public void requestPermissions(ArrayList<String> needPermissions) {\n\n String packageName = getApplicationContext().getPackageName();\n Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION, Uri.parse(\"package:\" + packageName) );\n startActivityForResult(intent, REQ_CODE_REQUEST_SETTING);\n }", "private void checkAndRequestDNDAccess() {\n NotificationManager n = (NotificationManager) getApplicationContext().getSystemService(Context.NOTIFICATION_SERVICE);\n if(!n.isNotificationPolicyAccessGranted()) {\n startDNDPermissionActivity();\n }\n }", "@Override\n\tpublic boolean isCommandAuthorized(){\n\t\treturn true;\n\t}", "private void requestPermissions() {\r\n ActivityCompat.requestPermissions(ContactActivity.this,new String[]{Manifest.permission.CALL_PHONE},1);\r\n }", "private void requestPermission() {\n boolean shouldProvideRationale = ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION);\n\n if (shouldProvideRationale) {\n Log.i(TAG, \"requestPermission: \" + \"Displaying the permission rationale\");\n // provide a way so that user can grant permission\n\n showSnackbar(R.string.warning_txt, android.R.string.ok, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startLocationPermissionRequest();\n }\n });\n\n } else {\n startLocationPermissionRequest();\n }\n }", "public void connectToAccessory() {\n\t\tif (mConnection != null)\n\t\t\treturn;\n\n\t\tif (getIntent().hasExtra(BTDeviceListActivity.EXTRA_DEVICE_ADDRESS)) {\n\t\t\tString address = getIntent().getStringExtra(\n\t\t\t\t\tBTDeviceListActivity.EXTRA_DEVICE_ADDRESS);\n\t\t\tLog.i(ADK.TAG, \"want to connect to \" + address);\n\t\t\tmConnection = new BTConnection(address);\n\t\t\tperformPostConnectionTasks();\n\t\t} else {\n\t\t\t// assume only one accessory (currently safe assumption)\n\t\t\tUsbAccessory[] accessories = mUSBManager.getAccessoryList();\n\t\t\tUsbAccessory accessory = (accessories == null ? null\n\t\t\t\t\t: accessories[0]);\n\t\t\tif (accessory != null) {\n\t\t\t\tif (mUSBManager.hasPermission(accessory)) {\n\t\t\t\t\topenAccessory(accessory);\n\t\t\t\t} else {\n\t\t\t\t\t// synchronized (mUsbReceiver) {\n\t\t\t\t\t// if (!mPermissionRequestPending) {\n\t\t\t\t\t// mUsbManager.requestPermission(accessory,\n\t\t\t\t\t// mPermissionIntent);\n\t\t\t\t\t// mPermissionRequestPending = true;\n\t\t\t\t\t// }\n\t\t\t\t\t// }\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Log.d(TAG, \"mAccessory is null\");\n\t\t\t}\n\t\t}\n\n\t}", "boolean requestIfNeeded(Activity activity, Permission permission);", "private void requestPermissions() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Permission is not granted\n // Should we show an explanation?\n if (!ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.CAMERA)) {\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n } else {\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.CAMERA},\n 1);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n } else {\n // Permission has already been granted\n }\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n public void requestPermissionLlamada() {\n //shouldShowRequestPermissionRationale es verdadero solamente si ya se había mostrado\n //anteriormente el dialogo de permisos y el usuario lo negó\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.CALL_PHONE)) {\n } else {\n //si es la primera vez se solicita el permiso directamente\n requestPermissions(new String[]{Manifest.permission.CALL_PHONE},\n MY_WRITE_EXTERNAL_STORAGE);\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_PERMISSION_SETTING) {\n checkPermission();\n }\n }", "private void requestPermission() {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) !=\n PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this, new String[]{\n Manifest.permission.CAMERA}, 1);\n //if not permitted by the user ,send a message to the user to get the right\n } else {\n opencamera();\n //if permitted by the user already ,then start open the camera directly\n }\n }", "@Override\n\tpublic void execute() {\n\t\tsecurity.on();\n\t}", "private void requestInternetPermission() {\n if (ActivityCompat.shouldShowRequestPermissionRationale((Activity) mLayout.getContext(),\n Manifest.permission.INTERNET)) {\n // Provide an additional rationale to the user if the permission was not granted\n // and the user would benefit from additional context for the use of the permission.\n // Display a SnackBar with cda button to request the missing permission.\n Snackbar.make(mLayout, R.string.internet_access_required,\n Snackbar.LENGTH_INDEFINITE).setAction(R.string.ok, new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n // Request the permission\n ActivityCompat.requestPermissions((Activity) mLayout.getContext(),\n new String[]{Manifest.permission.INTERNET},\n PERMISSION_REQUEST_INTERNET);\n }\n }).show();\n\n } else {\n Snackbar.make(mLayout, R.string.internet_unavailable, Snackbar.LENGTH_SHORT).show();\n // Request the permission. The result will be received in onRequestPermissionResult().\n ActivityCompat.requestPermissions((Activity) mLayout.getContext(),\n new String[]{Manifest.permission.INTERNET}, PERMISSION_REQUEST_INTERNET);\n }\n }", "public void doAuthorize() {\n authorizeBehavior.authorizd();\n }", "@Override\n public void onClick(View v) {\n requestPermissions((SireController) view.getContext(),false);\n }", "private void askPermission() {\n if (ContextCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n Parameters.MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "@Override\n public void onPermissionsGranted(int requestCode, List<String> perms) {\n }", "@Override\n public void onPermissionsGranted(int requestCode, List<String> perms) {\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(a,\n new String[]{permission},\n b);\n }", "public interface IPermissionCommunicator {\n public void onRequestForPermission();\n}", "@Override\n public void askPermission() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Uff\");\n builder.setMessage(\"This device does not support Bluetooth LE. Buy another phone.\");\n builder.setPositiveButton(android.R.string.ok, null);\n finish();\n }\n\n //Checking if the Bluetooth is on/off\n BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Uff\");\n builder.setMessage(\"This device does not support Bluetooth.\");\n builder.setPositiveButton(android.R.string.ok, null);\n } else {\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 2);\n }\n }\n\n }", "private void requestPermission(){\r\n ActivityCompat.requestPermissions(activity,new String[]{Manifest.permission.ACCESS_FINE_LOCATION},1);\r\n }", "public boolean enterBridge(BridgeEntity bridge);", "@UpnpAction(out = {@UpnpOutputArgument(name = \"Result\", stateVariable = \"A_ARG_TYPE_Result\")})\n/* */ public int isAuthorized(@UpnpInputArgument(name = \"DeviceID\", stateVariable = \"A_ARG_TYPE_DeviceID\") String deviceID) {\n/* 118 */ return 1;\n/* */ }", "@NeedsPermission(Manifest.permission.CAMERA)\n void canGo() {\n }", "private void checkAndRequestForPermission() {\n if(ContextCompat.checkSelfPermission(RegisterActivity.this, Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED){\n if(ActivityCompat.shouldShowRequestPermissionRationale(RegisterActivity.this,\n Manifest.permission.READ_EXTERNAL_STORAGE)){\n Toast.makeText(RegisterActivity.this, \"Please accept for required permission\",\n Toast.LENGTH_SHORT).show();\n }\n else{\n ActivityCompat.requestPermissions(RegisterActivity.this,\n new String []{Manifest.permission.READ_EXTERNAL_STORAGE},PReqCode);\n }\n }\n else{\n openGallery();\n }\n }", "public void permission_check() {\n //Usage Permission\n if (!isAccessGranted()) {\n new LovelyStandardDialog(MainActivity.this)\n .setTopColorRes(R.color.colorPrimaryDark)\n .setIcon(R.drawable.ic_perm_device_information_white_48dp)\n .setTitle(getString(R.string.permission_check_title))\n .setMessage(getString(R.string.permission_check_message))\n .setPositiveButton(android.R.string.ok, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(android.provider.Settings.ACTION_USAGE_ACCESS_SETTINGS);\n startActivity(intent);\n }\n })\n .setNegativeButton(android.R.string.no, null)\n .show();\n }\n }", "private void requestCameraPermission() {\n Log.w(TAG, \"Camera permission is not granted. Requesting permission\");\n\n final String[] permissions = new String[]{Manifest.permission.CAMERA};\n\n if (!mPermissionRequestor\n .shouldShowRequestPermissionRationale(this, Manifest.permission.CAMERA)) {\n mPermissionRequestor.requestPermissions(this, permissions, RC_HANDLE_CAMERA_PERM);\n return;\n }\n\n View.OnClickListener listener = new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mPermissionRequestor\n .requestPermissions(BarcodeCaptureActivity.this, permissions, RC_HANDLE_CAMERA_PERM);\n }\n };\n\n Snackbar.make(mGraphicOverlay, R.string.permission_camera_rationale,\n Snackbar.LENGTH_INDEFINITE)\n .setAction(R.string.ok, listener)\n .show();\n }", "@Override\n protected String requiredGetPermission() {\n return \"user\";\n }", "private void requestReadPhoneStatePermission() {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.READ_PHONE_STATE)) {\n // Provide an additional rationale to the user if the permission was not granted\n // and the user would benefit from additional context for the use of the permission.\n // For example if the user has previously denied the permission.\n new AlertDialog.Builder(AddAssetActivity.this)\n .setTitle(\"Permission Request\")\n .setMessage(\"Allow Cover app to read phone state\")\n .setCancelable(false)\n .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n //re-request\n ActivityCompat.requestPermissions(AddAssetActivity.this,\n new String[]{Manifest.permission.READ_PHONE_STATE},\n MY_PERMISSIONS_REQUEST_READ_PHONE_STATE);\n }\n })\n //.setIcon(R.drawable.onlinlinew_warning_sign)\n .show();\n } else {\n // READ_PHONE_STATE permission has not been granted yet. Request it directly.\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_PHONE_STATE},\n MY_PERMISSIONS_REQUEST_READ_PHONE_STATE);\n }\n }", "public void askPermission() {\n try {\n if (Build.VERSION.SDK_INT >= 23) {\n //call the function to ask for permission\n try {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(new String[]{Manifest.permission.READ_CONTACTS}, 100);\n return;\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "private void requestPermission() {\r\n\r\n if (ActivityCompat.shouldShowRequestPermissionRationale(UniformDrawer.this, android.Manifest.permission.WRITE_EXTERNAL_STORAGE)) {\r\n Toast.makeText(UniformDrawer.this, \"Write External Storage permission allows us to do store images. Please allow this permission in App Settings.\", Toast.LENGTH_LONG).show();\r\n } else {\r\n ActivityCompat.requestPermissions(UniformDrawer.this, new String[]{android.Manifest.permission.WRITE_EXTERNAL_STORAGE}, PERMISSION_REQUEST_CODE);\r\n }\r\n }", "public void provideAccess() {\n\t\tint choice = View.NO_CHOICE;\n\t\twhile (choice != View.EXIT) {\n\t\t\tview.displayMenu();\n\t\t\tchoice = view.readIntWithPrompt(\"Enter choice: \");\n\t\t\texecuteChoice(choice);\n\t\t}\n\t}", "protected void requestPermission() {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE)) {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},\n PERMISSION_REQUEST_WRITE_EXTERNAL_STORATE);\n\n } else {\n // Request the permission. The result will be received in onRequestPermissionResult().\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},\n PERMISSION_REQUEST_WRITE_EXTERNAL_STORATE);\n }\n }", "@Override\n public void onPermissionGranted(PermissionGrantedResponse permissionGrantedResponse) {\n\n }", "@TargetApi(Build.VERSION_CODES.M)\n @Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == RESULT_MANAGE_OVERLAY_PERMISSION) {\n if (Settings.canDrawOverlays(this))\n requestPermissions(PermissionInfo.getList(getApplicationContext()), RESULT_PERMISSION);\n else\n close(false);\n }\n }", "public void askForPermissionsGrant(){\n int res =ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION);\n int res2 =ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION);\n if (res!= PackageManager.PERMISSION_GRANTED || res2!= PackageManager.PERMISSION_GRANTED) {\n // Permission is not granted\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"We need to access your location\")\n .setMessage(\"We want to track every breath you take\")\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.READ_CONTACTS},\n MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n });\n builder.create().show();\n }\n else {\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n } else {\n // Permission has already been granted\n publishLastLocation();\n }\n\n }", "private void requestCameraPermission() {\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.CALL_PHONE},\n REQUEST_CALL);\n }", "@OnShowRationale({Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_WIFI_STATE, Manifest.permission.CHANGE_WIFI_STATE})\n void showrequirepermission(final PermissionRequest request) {\n\n new AlertDialog.Builder(this)\n .setMessage(\"this app want to access Wifi\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n request.proceed();\n }\n })\n .setNegativeButton(\"Cancle\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n request.cancel();\n }\n })\n .show();\n\n }", "public void requestPermissions(int requestCode)\n {\n PermissionHelper.requestPermissions(this, requestCode, permissions);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(OwnerMapActivity.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "public void getPermissiontoAccessInternet() {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.INTERNET)\n != PackageManager.PERMISSION_GRANTED) {\n\n // The permission is NOT already granted.\n // Check if the user has been asked about this permission already and denied\n // it. If so, we want to give more explanation about why the permission is needed.\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.INTERNET)) {\n // Show our own UI to explain to the user why we need to read the contacts\n // before actually requesting the permission and showing the default UI\n }\n\n // Fire off an async request to actually get the permission\n // This will show the standard permission request dialog UI\n ActivityCompat.requestPermissions(this,new String[]{Manifest.permission.INTERNET},\n INTERNET_PERMISSIONS_REQUEST);\n }\n }", "private void fineLocationPermissionGranted() {\n UtilityService.addGeofences(this);\n UtilityService.requestLocation(this);\n }", "public void checkRequestPermission(){\n\n\n hasPermission = (ActivityCompat.checkSelfPermission(this, Manifest.permission.VIBRATE)\n == PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA)\n == PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)\n == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE)\n == PackageManager.PERMISSION_GRANTED );\n//check group permissons\n if (!hasPermission){\n ActivityCompat.requestPermissions(this,\n new String[]{\n Manifest.permission.VIBRATE,\n Manifest.permission.CAMERA,\n Manifest.permission.WRITE_EXTERNAL_STORAGE,\n Manifest.permission.READ_EXTERNAL_STORAGE\n\n },\n REQUEST_NETWORK_ACCESS);\n }\n }", "private void checkIfPermissionGranted() {\n\n //if user already allowed the permission, this condition will be true\n if (ContextCompat.checkSelfPermission(this, PERMISSION_CODE)\n == PackageManager.PERMISSION_GRANTED) {\n Intent launchIntent = getPackageManager().getLaunchIntentForPackage(\"com.example.a3\");\n if (launchIntent != null) {\n startActivity(launchIntent);//null pointer check in case package name was not found\n }\n }\n //if user didn't allow the permission yet, then ask for permission\n else {\n ActivityCompat.requestPermissions(this, new String[]{PERMISSION_CODE}, 0);\n }\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(ActivityLivetrackingRest.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n\tprotected void doIsPermitted(String arg0, Handler<AsyncResult<Boolean>> arg1) {\n\t\t\n\t}", "private void openPermissions(){\n WebDriverHelper.clickElement(seePermissionLvlButton);\n }", "@Override\n public void onClick(View v) {\n if (Build.VERSION.SDK_INT >= 23)\n {\n if (permissionUtils.checkPermissions())\n {\n Log.e(TAG, \"Permission Is Not Granted. Request For Permission\");\n permissionUtils.askPermission();\n }\n else\n {\n Log.e(TAG, \"Permission Already Granted\");\n Intent intent = new Intent(RuntimePermissionActivity.this, PermissionGrantedActivity.class);\n startActivity(intent);\n finish();\n }\n }\n else\n {\n /*\n * Pre-Marshmallow\n * If build version is less than or 23, then all permission is\n * granted at install time in google play store.\n */\n Intent intent = new Intent(RuntimePermissionActivity.this, PermissionGrantedActivity.class);\n startActivity(intent);\n finish();\n }\n }", "private void requestPermissions() {\n ActivityCompat.requestPermissions(this, new String[]{\n Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION}, PERMISSION_ID);\n }", "private void requestPermissions() {\n ActivityCompat.requestPermissions(this, new String[]{\n Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION}, PERMISSION_ID);\n }", "@Override\r\n public void onClick() {\r\n if (!permissionsGranted()) {\r\n if (isNull(MainActivity.active) || !MainActivity.active) {\r\n requestPermissions();\r\n }\r\n }\r\n else{\r\n toggleLTE();\r\n }\r\n }", "@PermissionSuccess(requestCode = 100)\n public void onPermissionSuccess(){\n }", "abstract public void getPermission();", "public GrantPermissionSystemResponse grantPermissionSystem(GrantPermissionSystemRequest request) throws GPUdbException {\n GrantPermissionSystemResponse actualResponse_ = new GrantPermissionSystemResponse();\n submitRequest(\"/grant/permission/system\", request, actualResponse_, false);\n return actualResponse_;\n }", "private void requestPermission() {\n if (shouldShowRequestPermissionRationale(android.Manifest.permission.ACCESS_FINE_LOCATION)) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder.setMessage(this.getResources().getString(R.string.request_location_permission_message))\n .setPositiveButton(this.getResources().getString(R.string.OK), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION},\n REQUEST_LOCATION);\n }\n });\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n } else {\n ActivityCompat.requestPermissions((Activity) mContext,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION},\n REQUEST_LOCATION);\n }\n }", "private void permissionLocationRequest() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n int hasLocationPermission = checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION);\n if (hasLocationPermission != PackageManager.PERMISSION_GRANTED) {\n if (!shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_FINE_LOCATION)) {\n showMessageOKCancel(\"You need to allow access to Location\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n REQUEST_CODE_ASK_PERMISSIONS);\n }\n });\n }\n }\n\n }\n }", "@Override\n public boolean hasPermission(Permission permission) {\n // FacesContext context = FacesContext.getCurrentInstance();\n String imp = (String)ADFContext.getCurrent().getSessionScope().get(\"isImpersonationOn\");\n// String imp = (String)context.getExternalContext().getSessionMap().get(\"isImpersonationOn\");\n if(imp == null || !imp.equals(\"Y\")){\n return super.hasPermission(permission);\n }\n else{\n return true;\n \n }\n \n }", "@Override\n public void permissionsGranted() {\n showScanner();\n }", "private void requestCameraPermission() {\n\t\tLog.d(TAG, \"Requesting CAMERA permission\");\n\t\tActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, PERMISSION_REQUEST_CAMERA);\n\t}", "private void requestCameraPermission() {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.CAMERA)) {\n // Provide an additional rationale to the user if the permission was not granted\n // and the user would benefit from additional context for the use of the permission.\n // Display a SnackBar with a button to request the missing permission.\n Snackbar.make(mLayoutMap, \"Location access is required to display restaurants near you.\",\n Snackbar.LENGTH_INDEFINITE).setAction(\"OK\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n // Request the permission\n ActivityCompat.requestPermissions(MapsActivity.this,\n new String[]{Manifest.permission.CAMERA},\n PERMISSION_REQUEST_CAMERA);\n }\n }).show();\n\n } else {\n Snackbar.make(mLayoutMap,\n \"Permission is not available. Requesting location permission.\",\n Snackbar.LENGTH_SHORT).show();\n // Request the permission. The result will be received in onRequestPermissionResult().\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA},\n PERMISSION_REQUEST_CAMERA);\n }\n }", "private void askForPermission(){\n if (ContextCompat.checkSelfPermission(MainActivity.this,\n Manifest.permission.ACCESS_NOTIFICATION_POLICY)\n != PackageManager.PERMISSION_GRANTED) {\n Log.i(TAG,\"don't have permission\");\n // Permission is not granted\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(MainActivity.this,\n Manifest.permission.ACCESS_NOTIFICATION_POLICY)) {\n Log.i(TAG,\"Asking for permission with explanation\");\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_NOTIFICATION_POLICY},\n MY_PERMISSIONS_MODIFY_AUDIO_SETTINGS);\n\n } else {\n Log.i(TAG,\"Asking for permission without explanation\");\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_NOTIFICATION_POLICY},\n MY_PERMISSIONS_MODIFY_AUDIO_SETTINGS);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n } else {\n // Permission has already been granted\n Log.i(TAG,\"Already had permission\");\n }\n\n }", "private void promptForBT() {\n Intent enableBTIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n mcordova.getActivity().startActivity(enableBTIntent);\n }", "void configure_button(){\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.INTERNET}\n ,10);\n }\n return;\n }\n // this code won't execute IF permissions are not allowed, because in the line above there is return statement.\n locButton.setOnClickListener(new View.OnClickListener() {\n @SuppressLint(\"MissingPermission\")\n @Override\n public void onClick(View view) {\n //noinspection MissingPermission\n switcher = true;\n locManager.requestLocationUpdates(\"gps\", 5000, 0, locListener);\n }\n });\n }", "public abstract boolean authorize(int requestCode, int resultCode, @Nullable Intent intent);", "private void requestPermissionAccessLocation() {\n int permissionCheck = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\n\n Log.d(TAG, \"permissionCheck: \" + permissionCheck);\n\n if (permissionCheck == PackageManager.PERMISSION_GRANTED) {\n updateFragmentOnLocationSuccess();\n } else {\n ActivityCompat\n .requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n REQUEST_CODE_PERMISSION_LOCATION);\n }\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n private void requestCameraPermission() {\n requestPermissions(cameraPermissions, CAMERA_REQUEST_CODE);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(activity,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION );\n }", "private void requestPermissions(Activity activity, int requestCode) {\n String[] permissions = getRequiredAndroidPermissions();\n handler.requestPermissions(activity, permissions, requestCode);\n }", "@Override\n\tpublic void grant(User subject, Permission permission)\n\t{\n\t\t//TODO figure out how to implement since we're using role based permissions\n\t}", "public void requestPermissionsIfNeeded() {\n ArrayList<String> requiredPermissions = new ArrayList<String>();\n checkIfPermissionGranted(requiredPermissions, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n checkIfPermissionGranted(requiredPermissions, Manifest.permission.CAMERA);\n\n if(requiredPermissions.size() > 0) {\n // Request Permissions Now\n ActivityCompat.requestPermissions(activity,\n requiredPermissions.toArray(new String[requiredPermissions.size()]),\n Constants.REQUEST_PERMISSIONS);\n }\n }", "public void requestPhoneStatePermission() {\n if (ContextCompat.checkSelfPermission(mContext,\n Manifest.permission.READ_PHONE_STATE)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.READ_PHONE_STATE)) {\n // Show an expanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n } else {\n // No explanation needed, we can request the permission.\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.READ_PHONE_STATE},\n Constants.COOPER_PERMISSIONS_REQUEST_READ_PHONE_STATE);\n\n // MY_PERMISSIONS_REQUEST_READ_PHONE_STATE is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE) {\n /** if so check once again if we have permission */\n if (Settings.canDrawOverlays(this)) {\n // continue here - permission was granted\n }\n }\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(AdminMap.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }" ]
[ "0.6542844", "0.63958853", "0.6298582", "0.5925389", "0.5908191", "0.59067523", "0.59067523", "0.5857515", "0.5834687", "0.57576555", "0.5742063", "0.5693524", "0.5681061", "0.56776047", "0.56435776", "0.5632556", "0.56064963", "0.5579149", "0.5573091", "0.5557299", "0.5526036", "0.55074704", "0.5473362", "0.54439914", "0.54260623", "0.5416257", "0.5352453", "0.5342318", "0.5333305", "0.5316418", "0.53121847", "0.53109926", "0.5308691", "0.5303726", "0.53003895", "0.52977216", "0.529661", "0.52897865", "0.52715653", "0.5264826", "0.5260113", "0.5259829", "0.52551216", "0.52551216", "0.5252552", "0.5235551", "0.52326435", "0.5210736", "0.52004147", "0.5194749", "0.5192506", "0.51874477", "0.51873064", "0.51735824", "0.51647335", "0.51599824", "0.5150764", "0.5122277", "0.51165575", "0.51129794", "0.5109089", "0.51019794", "0.51012677", "0.5097559", "0.50843686", "0.50839186", "0.5082855", "0.5076858", "0.50757736", "0.5067873", "0.5058218", "0.5055759", "0.50494313", "0.50464714", "0.5037161", "0.5036141", "0.5036141", "0.5034917", "0.5034594", "0.5032473", "0.502953", "0.50221235", "0.50140184", "0.50017637", "0.49719524", "0.49711004", "0.4964126", "0.49618325", "0.49576017", "0.4952766", "0.49525726", "0.49479404", "0.49409834", "0.4940057", "0.49337038", "0.4926205", "0.49228173", "0.49225596", "0.49207896", "0.4920589" ]
0.5255921
42
Notify the bridge troll that a Woolie is leaving the bridge.
public void leaveBridge() { lock.unlock(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onLeave()\n\t{\n\t}", "public void notifySwitchAway() { }", "@Override\r\n\tpublic void leave() {\n\t\t\r\n\t}", "@Override\n public void leave() {\n LeaveReq leaveReq = new LeaveReq(node.getCred());\n String msg = leaveReq.getMessageAsString(Constant.Action.LEAVE);\n for (Cred neighbourCred : node.getRoutingTable()) {\n String uri = Constant.HTTP + neighbourCred.getNodeIp() + \":\" + neighbourCred.getNodePort() + Constant.EndPoint.LEAVE;\n try {\n String result = restTemplate.postForObject(uri, new Gson().toJson(leaveReq), String.class);\n if (result.equals(\"200\")) {\n logMe(\"Neighbor left successfully at \" + getCurrentTime());\n }\n } catch (ResourceAccessException exception) {\n //connection refused to the api end point\n } catch (HttpServerErrorException exception){\n //\n }\n }\n }", "void leave();", "void leave();", "void leave();", "@Override\n\tpublic void onLeaveLobbyDone(LobbyEvent arg0) {\n\t\tMain.log(getClass(), \"onLeaveLobbyDone\");\n\t}", "void leave(Client client);", "@Override\n public void leaveThePlane(int passengerId) {\n this.lock.lock();\n try {\n // wake up pilot\n this.pilotWaitForDeboarding.signal();\n } finally {\n this.lock.unlock();\n }\n }", "public void leaveTheBus(int pid, int seat);", "private void onLost() {\n // TODO: broadcast\n }", "@EventHandler\n public void onBedwarsPlayerLeave(BedwarsPlayerLeaveEvent event) {\n if(BedwarsRelCloudNetAddon.getInstance().getPluginConfig().isResourceVotingEnabled()) BedwarsRelCloudNetAddon.getInstance().getResourceVotingManager().manageLeave(event.getPlayer().getUniqueId());\n /*\n * Remove BedwarsPlayer from storage\n */\n BedwarsRelCloudNetAddon.getInstance().getBedwarsRelPlayerManager().removeBedwarsRelPlayer(event.getPlayer().getUniqueId());\n }", "public void interactWhenLeaving() {\r\n\t\t\r\n\t}", "private void handleLeaveStubEvent(LeaveStubEvent event) throws AppiaEventException {\n \t\tevent.loadMessage();\n \n \t\t//See if I can have now leave events\n \t\tacquireClientsViewUpdateLock();\n \n \t\tSystem.out.println(\"Removing client: \" + event.getEndpoint() + \" from group: \" + event.getGroupId());\n \n \t\t//Lets get the neccessary arguments\n \t\tString groupId = event.getGroupId();\n \t\tVsClient vsClient = VsClientManagement.getVsGroup(groupId).getVsClient(event.getEndpoint());\n \n \t\t//Let's warn everybody that a client wishes to leave\n \t\tLeaveClientProxyEvent leaveProxyEvent = new LeaveClientProxyEvent(vsClient, groupId);\n \t\tsendToOtherServers(leaveProxyEvent);\n \t\tsendToMyself(leaveProxyEvent);\n \t}", "public void leaveGame() {\n if (gameId != null) {\n logger.info(\"Left game: \" + gameId.toString());\n if (connectionHandler != null) connectionHandler.getMessageEmitter().sendLeaveGameMessage(gameId);\n else logger.warn(\"MessageEmitter is null in leaveGame()!\");\n } else logger.warn(\"GameId is null in leaveGame()!\");\n reset();\n }", "@Override\n public void clientCompanyLeve(Messages.MarketClientCompanyQuit msg) {\n isLeaving = true;\n }", "public int onLeave( int dir )\n {\n return OK;\n }", "void leave(User user);", "abstract protected void onDisconnection();", "public void leave(Object out);", "@Override\n \tpublic void notifyDeath() {\n \t\tGame.GAME_STATE = Game.GAME_STATE_DEAD;\n \t\t\n \t}", "protected void end() {\n \tif (waitForMovement) Robot.intake.setHopperTracker(deploy ? Status.deployed : Status.stowed);\n }", "@Override\r\n\tpublic void onLeaveApplication(Ad arg0) {\n\t\t\r\n\t}", "private void goAway() {\n CollaborationConnection connection = CollaborationConnection\n .getConnection();\n Presence presence = connection.getPresence();\n if (presence.getMode().equals(Mode.available)) {\n previousPresence = presence;\n Presence newPresence = new Presence(presence.getType(),\n presence.getStatus(), presence.getPriority(), Mode.away);\n Tools.copyProperties(presence, newPresence);\n timerSetAway = sendPresence(connection, newPresence);\n }\n }", "private void onLeaveChannel(int reason) {\r\n\t\tfor (RecordingEventHandler oberserver : recordingEventHandlers) {\r\n\t\t\toberserver.onLeaveChannel(reason);\r\n\t\t}\r\n\t}", "public void youWinByAbandonment() {\n try {\n if (getClientInterface() != null)\n getClientInterface().gameEndedByAbandonment(\"YOU WON BECAUSE YOUR OPPONENTS HAVE ABANDONED!!\");\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending ended by abandonment error\");\n }\n }", "public void leave() {\n OffRequestManager.instance().removeOffRequestListener(instance);\n OnRequestManager.instance().removeOnRequestListener(instance);\n ParkRequestManager.instance().removeParkListener(instance);\n }", "public void leave()\n {\n if (chatRoomSession != null)\n { // manually close the chat room session\n // and set the chat room session to null.\n chatRoomSession.close();\n chatRoomSession = null;\n }\n\n Iterator<Entry<String, Contact>> membersSet =\n participants.entrySet().iterator();\n\n while (membersSet.hasNext())\n {\n Map.Entry<String, Contact> memberEntry = membersSet.next();\n\n Contact participant = memberEntry.getValue();\n\n fireParticipantPresenceEvent(participant,\n AdHocChatRoomParticipantPresenceChangeEvent.CONTACT_LEFT,\n \"Local user has left the chat room.\");\n }\n\n // Delete the list of members\n participants.clear();\n }", "public void leaveConference();", "public void onLeave(Team t) {\n \t\tPerformTransition.transition(this, MatchState.ONCANCEL, t, false);\n \t\tteams.remove(t);\n \t\tTeamController.removeTeam(t, this);\n \t}", "public boolean leaveVehicle ( ) {\n\t\treturn invokeSafe ( \"leaveVehicle\" );\n\t}", "@Override\n public void notifyEndMove() {\n try {\n if (getClientInterface() != null)\n getClientInterface().notifyEndMove();\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending end move error\");\n }\n }", "@EventHandler\r\n\tpublic void Playerleave(PlayerQuitEvent e) {\r\n\t\tPlayer p = e.getPlayer();\r\n\t\tString pname = p.getName();\r\n\t\tp.getInventory().clear();\r\n\t\t Bukkit.broadcastMessage(\"\" + ChatColor.RED + ChatColor.WHITE + \"BMT | \" + pname + ChatColor.RESET + \"Heeft de server verlaten!\" + \"\");\r\n\t}", "private void endTurn(){\r\n String currentPlayer = cantStop.getGameBoard().getCurrentPlayer().getName();\r\n\t\tgameOver = cantStop.getGameBoard().endTurn(didBust);\r\n\t\t\r\n\t\tif(gameOver){\r\n\t\t\tstatusLabel.setText(currentPlayer + \r\n\t\t\t\t\t\" wins! Go again?\");\r\n\t\t\tupdate();\r\n\t\t} else {\r\n\t\t\tcantStop.getGameBoard().startNewTurn();\r\n\t\t\tallowNewRoll();\r\n\t\t}\r\n\t}", "public void lifeLost() {\n\n\t\tif (invincipleTimer <= currentTickCount) {\n\t\t\tSystem.out.println(\"Life Lost!\");\n\n\t\t\thealth--;\n\t\t\tinvincipleTimer = currentTickCount + invicibleLength;\n\t\t}\n\t}", "void leave(Vehicle v) {\n\t\t\tcurrentVehicle = null;\n\t\t}", "public void lobbyExitButton(MouseEvent event){\n event.consume();\n Client.sendMessageToServer(new Disconnection());\n Platform.exit();\n System.exit(APP_CLOSED_BY_LOBBY_EXIT_BUTTON);\n }", "@Override\n\t\t\t\t\tpublic void onDisconnected(Robot arg0) {\n\t\t\t\t\t\tmRobot = null;\n\t\t\t\t\t}", "public void endOfWork() {\n\t\tClientCom clientCom = new ClientCom(RunParameters.ArrivalQuayHostName, RunParameters.ArrivalQuayPort);\n\t\twhile (!clientCom.open()) {\n\t\t\tSystem.out.println(\"Arrival Quay not active yet, sleeping for 1 seccond\");\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t\t;\n\t\tPassenger passenger = (Passenger) Thread.currentThread();\n\t\tMessage pkt = new Message();\n\t\tpkt.setType(MessageType.SIM_ENDED);\n\t\tpkt.setId(passenger.getPassengerId());\n\n\t\tclientCom.writeObject(pkt);\n\t\tpkt = (Message) clientCom.readObject();\n\n\t\tpassenger.setCurrentState(pkt.getState());\n\t\tclientCom.close();\n\t}", "public abstract void leaveRoom();", "public void onTurnEnd() {\n\n\t}", "public void end(boolean tie) {\n\t\tif (tie) {\n\t\t\tfor (Player p : CastleWars.game_participants) {\n\t\t\t\tif (p != null) {\n\t\t\t\t\tp.send(new SendMessage(\"The game was a tie! You have recieved 2 tickets!\"));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\n\t\t}\n\t\tCastleWarsConstants.GAME_ACTIVE = false;\n\n\t\tCastleWars.game_participants.clear();\n\t}", "public void lostLife(){\r\n\t\tthis.lives--;\r\n\t}", "void notifyCreatorDisconnected();", "public void gameEnd(String winner, String reason) {\r\n if (game != null) {\r\n Transpositions.resetTrans();\r\n game.gameEnd();\r\n Logging.log(winner + \" has won!\");\r\n board = null;\r\n game = null;\r\n connection.requestLeaderboard();\r\n }\r\n }", "public boolean quit(TBGPProtocolCallback callback) {\n\t\tif(!isActive()) {\n\t\t\tString removedPlayer = players.remove(callback);\n\t\t\tlogger.info(removedPlayer + \" left the room\");\n\t\t\tbroadcast(removedPlayer + \" left room \"+this.thisRoomName, TBGPCommand.SYSMSG);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tlogger.info(\"Unable to leave room in a middle of a game\");\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tsuper.windowClosing(e);\r\n\t//\t\t\tdispose();\r\n\t\t\t\tChatLeave();\r\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tprotected void on_boss_death() {\n\n\t}", "protected void end() {\n \tRobot.vision_.stopGearLiftTracker();\n }", "private void notifyNeighbourOfDead(NodeInfo deadNodeInfo, CommunicationLink neighbour,\n CommunicationLink potentialNewNeighbour)\n {\n if (neighbour != null)\n {\n NodeInfo newNeighbourId = potentialNewNeighbour == null ? myInfo : potentialNewNeighbour.getInfo();\n\n neighbour.sendMessage(new Message(neighbour.serializeId(deadNodeInfo) + \" \" + neighbour.serializeId(newNeighbourId),\n neighbour.getInfo(), myInfo, MessageType.TOPOLOGY_CHANGED));\n }\n }", "public void leaveRoom(Person x) {\n\t\toccupant = null;\n\t}", "public void onDisconnected() {\n\t\t\r\n\t}", "void onDisconnected();", "@Override\n public void exit() {\n player.steeringBehaviorsManager.removeBehavior(ballPursuit);\n }", "private void ChatLeave() {\n\t\t\r\n\t\tClose();\r\n\t}", "@Override\r\n\tpublic void processLeave(SimulationData simData, RunDataClient client) {\r\n\t}", "public void onTurnOver() {}", "@Override\n \tpublic boolean leave(ArenaPlayer p) {\n \t\treturn true;\n \t}", "public void atExitOfWorker(Worker w, Model model)\n {\n w.setDistLastPheroDrop(w.getPheromonePolicy().getDropDistance()+1);\n //remove all the pheromones that were detected and visited in the way towards\n w.removeAllDetectedPhero();\n w.removeAllVisitedPhero();\n\n model.findPheromones(w);\n w.setMoving(true);\n }", "@FXML\n private void ConfirmLeaveLobby(ActionEvent actionEvent) throws InterruptedException, ExecutionException, LobbyException {\n PlayerController playerController = (PlayerController) ControllerRegistry.get(PlayerController.class);\n FireStoreController fireStoreController = (FireStoreController) ControllerRegistry.get(FireStoreController.class);\n\n fireStoreController.removePlayer(token, playerController.getPlayerByPlayersEnum(playerController.getClientPlayersEnum())\n .orElseThrow(() -> new LobbyException(\"PLAYERS NOT HERE HELP\", null)));\n returnToMainMenu(actionEvent);\n }", "public void onBoardGameOver(ObjPuyoBoard board) {\n\t\t\t\n\t\t}", "void notifyPlayerDisconnected(String username);", "void notify(HorseFeverEvent e);", "@Override\n\tpublic void onUnSubscribeLobbyDone(LobbyEvent arg0) {\n\t\tMain.log(getClass(), \"onUnSubscribeLobbyDone\");\n\t}", "public void leave(NameClassNsName visitable) {\n }", "@Override\n\tpublic void onSmartWallAdClosed() {\n\t\t\n\t}", "public void windowClosed(WindowEvent wE) {\n\t\t\t}", "public void dealerOut() {\n\t\tview.writeLog(\"Dealer: \"+PointCounter.countPoint(dealer.clientCards)+\", DEALER OUT!\");\n\t\tint dealerLosingStack = 0;\n\t\tfor(ClientThread player:players) {\n\t\t\tif(player != dealer) {\n\t\t\t\tplayer.send(new Package(\"MESSAGE\",\"The dealer's points is over 21. You win a stack!\"));\n\t\t\t\tplayer.send(new Package(\"END\",1));\n\t\t\t\tdealerLosingStack++;\n\t\t\t}\n\t\t}\n\t\tint dealerStackChange = losers - dealerLosingStack;\n\t\tdealer.send(new Package(\"MESSAGE\",\"Over 21! You lose \"+dealerLosingStack+\" stacks. \"));\t\n\t\tdealer.send(new Package(\"END\",dealerStackChange+1));\t\n\t\tendGame();\n\t}", "protected void leaveArena(ArenaPlayer p){\n \t\tinsideArena.remove(p.getName());\n \t\tinsideWaitRoom.remove(p.getName());\n \t\tstopTracking(p);\n \t\tTeam t = getTeam(p);\n \t\tPerformTransition.transition(this, MatchState.ONLEAVE, p, t, false);\n \t\tarenaInterface.onLeave(p,t);\n \t\tnotifyListeners(new PlayerLeftEvent(p));\n \t\tif (woolTeams)\n \t\t\tPlayerStoreController.removeItem(p, TeamUtil.getTeamHead(getTeamIndex(t)));\n \t}", "@OnClose\n public void end() {\n listener.connectionTerminated();\n Logger.getGlobal().info(\"Connection with \" \n + nickname + \" terminated.\\n\"); //$NON-NLS-1$ //$NON-NLS-2$\n }", "@Override\n public void endTurn() {\n battle.setState(new EnemyTurn(battle));\n battle.continueBattle();\n }", "@Override\n\tpublic void informEnd(List<String> winners) {\n\t}", "@EventHandler\n public void onJoin(PlayerJoinEvent event) {\n Player player = event.getPlayer();\n\n if (plugin.getCheckManager().isCheckEnabled(Check.SMALLFIX_LEAVEVEHICLEONJOIN)) {\n if (player.getVehicle() != null) {\n player.leaveVehicle();\n }\n }\n }", "public void lifeLost() {\n\t\t--lives;\n\t\tif (lives == 0) {\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "@EventHandler(priority = EventPriority.HIGHEST)\r\n\tprivate void onDeath(PlayerDeathEvent event) {\n\t\tif(!event.getEntity().hasPermission(\"karanteenials.player.death.back\"))\r\n\t\t\treturn;\r\n\t\t\r\n\t\tLocation deathLocation = event.getEntity().getLocation();\r\n\t\tBack back = new Back(event.getEntity());\r\n\t\tback.setBackLocation(deathLocation);\r\n\t\t\r\n\t\t// instruct player to use /back to return to death position\r\n\t\tKaranteenials.getMessager().sendMessage(event.getEntity(), Sounds.NONE.get(), \r\n\t\t\t\tPrefix.NEUTRAL + ModuleFactory.getInstance().getTranslator().getTranslation(Karanteenials.getPlugin(Karanteenials.class), \r\n\t\t\t\t\t\tevent.getEntity(), \r\n\t\t\t\t\t\t\"death-return-with-back\"));\r\n\t}", "protected void end() {\n \tRobot.gearIntake.setIsDown(false);\n \tRobot.gearIntake.setGearRollerSpeed(0);\n }", "public void leave(Agent agent) throws RemoteException {\n\t\tObject obj = agents.get(agent.getName());\n\t\tPoint point = (Point) obj;\n\t\tif (agent.getRow() != point.x || agent.getColumn() != point.y) {\n\t\t\tSystem.out.println(\"Incompativeis!!!\");\n\t\t\treturn;\n\t\t}\n\t}", "public void leaveChannel() {\n mRtcEngine.leaveChannel();\n appointment.removeOfCall(new DatabaseUser(MainUser.getMainUser().getId()));\n }", "public void flightDisappear();", "public void endHold();", "public void playerLost()\r\n {\r\n \r\n }", "public void notifyGameOver() {\n\t\tgameOver = true;\n\t}", "public abstract void onLostGame();", "public void connectionLost(String channelID);", "protected void end() {\n \tRobotMap.gearIntakeRoller.set(0);\n }", "public void sayGoodbye(){\n Waiter w = (Waiter) Thread.currentThread();\n CommunicationChannel com = new CommunicationChannel(serverHostName, serverPortNumb);\n Object[] params = new Object[0];\n \tObject[] state_fields = new Object[3];\n state_fields[0] = w.getWaiterID();\n \tstate_fields[1] = w.getWaiterState();\n\n Message m_toServer = new Message(5, params, 0, state_fields, 2, null); \n Message m_fromServer;\n\n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n }\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n\n w.setState((int) m_fromServer.getStateFields()[1]);\n w.setCanGoHome();\n com.close ();\n }", "public void notify(IGameEvent event)\n {\n switch (event.getType())\n {\n case GameEvent.GAME_LOST_EVENT:\n GameLostEvent gameLostEvent = (GameLostEvent)event;\n\n destroy();\n //TODO:Show \"You lose\" message here\n\n //redirect to main menu on loser\n Intent youLoseIntent = new Intent(this,YouLoseActivity.class);\n Bundle bundle = new Bundle();\n bundle.putInt(\"gameScore\",gameLostEvent.getScore() );\n youLoseIntent.putExtras(bundle);\n startActivityForResult(youLoseIntent, 0);\n break;\n }\n }", "private void onEcologyDisconnected() {\n for (Room room : rooms.values()) {\n room.onEcologyDisconnected();\n }\n }", "@Override\r\n public void onAgentExit(Event event, Agent agent, Cell cell, Direction dir) {\r\n }", "public void onIceDisconnected();", "private void leaveChannel() {\n // Leave the current channel\n mRtcEngine.leaveChannel();\n }", "public void leave(BtrExpEnd visitable) {\n }", "@Override\n public void onLeave(int index, int totalCount, float leavePercent, boolean leftToRight) {\n }", "@Override\n public void endOfTournament(boolean hasWonTournament) {\n JSONArray wonTournamentJSON = booleanToJSON(hasWonTournament);\n JSONArray message = createMessage(\"end-of-tournament\", wonTournamentJSON);\n sendJSONArray(message);\n readVoidMessage();\n gracefullyShutdown();\n }", "@Override\n\tpublic void playerDisconnected(String playerID, DisconnectReason reason) {\n\t}", "void disconnectedPlayerMessage(String name);", "@Override\n public void windowClosed(WindowEvent we) {\n }", "void onConnectionLost();", "public void end() {\n \t\ttry {\n \t\t\tnameServerClient.leave();\n \t\t} catch (Exception e) {\n \t\t\t__.fwdAbort__(e);\n \t\t}\n \t}" ]
[ "0.65533185", "0.64943963", "0.64330554", "0.62832487", "0.62400335", "0.62400335", "0.62400335", "0.6149186", "0.6122109", "0.6074501", "0.6022214", "0.6004586", "0.5986761", "0.596021", "0.58527356", "0.58426046", "0.58379483", "0.5816058", "0.58144325", "0.5791685", "0.5790027", "0.57839483", "0.5776767", "0.5768305", "0.57672876", "0.5764923", "0.5714862", "0.5712868", "0.5710721", "0.56807476", "0.567126", "0.5658057", "0.5640151", "0.5640041", "0.56289697", "0.56130606", "0.559899", "0.5598755", "0.55959517", "0.55867666", "0.5581565", "0.5577883", "0.5577308", "0.55726033", "0.5566303", "0.55651605", "0.55614525", "0.5555249", "0.5554764", "0.55460316", "0.5538804", "0.5529971", "0.55287147", "0.55202174", "0.5513512", "0.5502557", "0.55022526", "0.5494545", "0.5493769", "0.54915375", "0.5485665", "0.5475647", "0.5474679", "0.54705554", "0.5470024", "0.54648256", "0.5464316", "0.544986", "0.5449516", "0.54462653", "0.5444435", "0.5442611", "0.54359984", "0.5435392", "0.5429168", "0.5426917", "0.5423025", "0.54035074", "0.54029036", "0.53988934", "0.53898877", "0.5382063", "0.5371148", "0.53698856", "0.53693795", "0.5368708", "0.53647214", "0.53627217", "0.5358929", "0.53582966", "0.53542596", "0.53535837", "0.53485817", "0.5346088", "0.5339032", "0.5338795", "0.5337426", "0.53346676", "0.5334462", "0.53307444" ]
0.6870447
0
Creates a new instance of ItemmatlBean
public ItemmatlBean() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EnterpriseBeansItem() {\n super();\n }", "protected BeanItem<M> createItem(M obj)\r\n\t{\r\n\t\tif (obj != null)\r\n\t\t{\r\n\t\t\tif (getContext() != null)\r\n\t\t\t{\r\n\t\t\t\tSession session = getContext().getSession();\r\n\t\t\t\t\r\n\t\t\t\tif (session != null)\r\n\t\t\t\t{\r\n\t\t\t\t\treturn new DataItem<M>(obj, session.getBaseManager());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn new BeanItem<M>(obj);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public Item(){}", "public NewItems() {\n super();\n }", "private void addItem() {\n\n ItemBean bean2 = new ItemBean();\n int drawableId2 = getResources().getIdentifier(\"ic_swrl\", \"drawable\", this.getPackageName());\n bean2.setAddress(drawableId2);\n bean2.setName(getResources().getString(R.string.swrl));\n itemList.add(bean2);\n\n ItemBean bean3 = new ItemBean();\n int drawableId3 = getResources().getIdentifier(\"ic_bianmin\", \"drawable\", this.getPackageName());\n bean3.setAddress(drawableId3);\n bean3.setName(getResources().getString(R.string.bianmin));\n itemList.add(bean3);\n\n ItemBean bean4 = new ItemBean();\n int drawableId4 = getResources().getIdentifier(\"ic_shenghuo\", \"drawable\", this.getPackageName());\n bean4.setAddress(drawableId4);\n bean4.setName(getResources().getString(R.string.shenghuo));\n itemList.add(bean4);\n\n ItemBean bean5 = new ItemBean();\n int drawableId5 = getResources().getIdentifier(\"ic_nxwd\", \"drawable\", this.getPackageName());\n bean5.setAddress(drawableId5);\n bean5.setName(getResources().getString(R.string.nxwd));\n// itemList.add(bean5);\n\n }", "public Item() {}", "public Item() {\r\n this.name = \"\";\r\n this.description = \"\";\r\n this.price = 0F;\r\n this.type = \"\";\r\n this.available = 0;\r\n this.wholesaler = new Wholesaler();\r\n this.wholesalerId = 0;\r\n this.category = new Category();\r\n this.categoryId = 0; \r\n }", "@Override\r\n\tpublic Item constructItem() {\r\n try {\r\n @SuppressWarnings(\"unchecked\")\r\n T entity = (T) entityClass.newInstance();\r\n BeanInfo info = Introspector.getBeanInfo(entityClass);\r\n for (PropertyDescriptor pd : info.getPropertyDescriptors()) {\r\n for (Object propertyId : queryDefinition.getPropertyIds()) {\r\n if (pd.getName().equals(propertyId)) {\r\n Method writeMethod = pd.getWriteMethod();\r\n Object propertyDefaultValue = queryDefinition.getPropertyDefaultValue(propertyId);\r\n writeMethod.invoke(entity, propertyDefaultValue);\r\n }\r\n }\r\n }\r\n return toItem(entity);\r\n } catch (Exception e) {\r\n throw new RuntimeException(\"Error in bean construction or property population with default values.\", e);\r\n }\r\n }", "private Item(){}", "public Item() {\n }", "public Item() {\n }", "public @NotNull Item newItem();", "public Item() {\n\t}", "public Item() {\n\t}", "ListItem createListItem();", "public Item()\n {\n super();\n }", "public ItemRecord() {\n super(Item.ITEM);\n }", "public Item()\r\n {\r\n // Initialize instance variables\r\n \r\n }", "public static Item create(long itemId) {\n\t\treturn getPersistence().create(itemId);\n\t}", "public Item newItem() {\n\t\tItem page = new Item();\r\n\t\tpage.setWpPublished(DateUtils.now());\r\n\t\tpage.setWpWeight(0);\r\n\t\treturn page;\r\n\t}", "@Override\n\tpublic Item create() {\n\t\tLOGGER.info(\"Shoe Name\");\n\t\tString item_name = util.getString();\n\t\tLOGGER.info(\"Shoe Size\");\n\t\tdouble size = util.getDouble();\n\t\tLOGGER.info(\"Set Price\");\n\t\tdouble price = util.getDouble();\n\t\tLOGGER.info(\"Number in Stock\");\n\t\tlong stock = util.getLong();\n\t\tItem newItem = itemDAO.create(new Item(item_name, size, price, stock));\n\t\tLOGGER.info(\"\\n\");\n\t\treturn newItem;\n\t}", "public ShoppingListItem() {}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\r\n protected Item toItem(final T entity) {\r\n BeanItem<T> beanItem = new NestedBeanItem<T>(entity);\r\n\r\n for (Object propertyId : queryDefinition.getPropertyIds()) {\r\n if (beanItem.getItemProperty(propertyId) == null) {\r\n beanItem.addItemProperty(\r\n propertyId,\r\n new ObjectProperty(queryDefinition.getPropertyDefaultValue(propertyId), \r\n queryDefinition.getPropertyType(propertyId),\r\n queryDefinition.isPropertyReadOnly(propertyId)));\r\n }\r\n }\r\n\r\n return beanItem;\r\n }", "public ProductoListarBean() {\r\n }", "public Item getItem() {\n Item item = new Item();\n item.setQuantidade(Integer.parseInt(txtQuantidade.getText()));\n item.setValor(Float.parseFloat(txtValor.getText()));\n item.setProduto((Produto)cmbProduto.getSelectedItem());\n \n return item;\n }", "public Item(String itemName, String itemDescription){\n this.itemName = itemName;\n this.itemDescription = itemDescription;\n}", "public SellItem() {\n initComponents();\n }", "public ModuleObjectAttributeItem() {}", "public Item_Record() {\n super(Item_.ITEM_);\n }", "@JsonIgnore\n @Override\n public Item createDynamoDbItem() {\n return new Item()\n .withPrimaryKey(\"widgetId\", this.getWidgetId())\n .with(\"widgetJSONString\", WidgetSerializer.serialize(this));\n }", "@Override\r\n\tprotected void criarNovoBean() {\r\n\t\tcurrentBean = new MarcaOsEntity();\r\n\t}", "public ItemInfo () {}", "public POJOCompteItem() {\n compte = new TreeMap<Date, Integer>();\n items = new ArrayList<Item>();\n }", "public Item createItem() {\n if(pickUpImplementation == null)\n {\n pickUpImplementation = new DefaultPickUp();\n }\n\n if(lookImplementation == null)\n {\n lookImplementation = new DefaultLook(R.string.default_look);\n }\n\n if(defaultItemInteraction == null)\n {\n throw new IllegalArgumentException(\"No default interaction specified!\");\n }\n\n\n return new Item(\n id,\n name,\n pickUpImplementation,\n lookImplementation,\n useImplementation,\n defaultItemInteraction\n );\n }", "public void doCreateItem() {\r\n\t\tlogger.info(\"Se procede a crear el book \" + newItem.getDescription());\r\n\t\tBook entity = newItem.getEntity();\r\n\t\tentity.setUser(Global.activeUser());\r\n\t\tentity.setBookBalance(BigDecimal.ZERO);\r\n\t\tentity.setTotalBudget(BigDecimal.ZERO);\r\n\t\tentity.setTotalIncome(BigDecimal.ZERO);\r\n\t\tentity.setTotalExpenses(BigDecimal.ZERO);\r\n\t\tentity = bookService.create(entity);\r\n\r\n\t\t// Actualizar el mapa de books\r\n\t\tGlobalBook.instance().put(new BookData(entity));\r\n\r\n\t\tlogger.info(\"Se ha creado el book \" + newItem.getDescription());\r\n\t\tnewItem = new BookData(new Book());\r\n\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO, \"Libro creado\", \"Libro creado correctamente\"));\r\n\t}", "public Item createFromParcel(Parcel source) {\n Item item = new Item();\n item.name = source.readString(); \n item.description = source.readString(); \n item.type = source.readString(); \n item.value = source.readString(); \n return item; \n }", "public Item(Item item) {\n setId(item.getId());\n setName(item.getName());\n setPrice(item.getPrice());\n setWasPurchased(item.wasPurchased());\n setOrder(item.getOrder());\n setStoreName(item.getStoreName());\n }", "public ItemPro() {\n initComponents();\n comboFill();\n }", "public CartBean() {\n }", "public ModifyItem() {\n initComponents();\n }", "public Item(String itemName, String itemList, String itemNote, int itemNumStocks, String itemExpireDate, int itemID) {\n this.itemName = itemName;\n this.itemList = itemList;\n this.itemNote = itemNote;\n this.itemNumStocks = itemNumStocks;\n this.itemExpireDate = itemExpireDate;\n this.itemID = itemID;\n }", "public ShopList(MainForm mf) {\n super(mf);\n ItemList = recordSeeker.getShopList();\n setTable();\n }", "public CartItem() {\n }", "public ItemRecord(String itemid, String productid, BigDecimal listprice, BigDecimal unitcost, Integer supplier, String status, String attr1, String attr2, String attr3, String attr4, String attr5) {\n super(Item.ITEM);\n\n set(0, itemid);\n set(1, productid);\n set(2, listprice);\n set(3, unitcost);\n set(4, supplier);\n set(5, status);\n set(6, attr1);\n set(7, attr2);\n set(8, attr3);\n set(9, attr4);\n set(10, attr5);\n }", "Items(){\n}", "@SuppressWarnings(\"unused\")\n public Item() {\n }", "Item(int i, String n, String c, double p) {\n this.id = i;\n this.name = n;\n this.category = c;\n this.price = p;\n }", "private Item initItem() {\n String name = inputName.getText().toString();\n int quantityToBuy = -1;\n if (!inputQuantityToBuy.getText().toString().equals(\"\"))\n quantityToBuy = Integer.parseInt(inputQuantityToBuy.getText().toString());\n String units = inputUnits.getText().toString();\n double price = 0;\n if (!inputPrice.getText().toString().equals(\"\"))\n price = Double.parseDouble(inputPrice.getText().toString());\n int calories = 0;\n if (!inputCalories.getText().toString().equals(\"\"))\n calories = Integer.parseInt(inputCalories.getText().toString());\n ArrayList<String> allergies = allergyActions.getAllergies();\n return new Item(name, 0, units, quantityToBuy, 0, allergies, calories, price);\n }", "public ItemsLM(String fld, boolean single) { super(fld); this.single = single;}", "public ItemManager() {\n itemMap = new HashMap<>();\n importantItemList = new ArrayList<>();\n\n }", "public DroitBean() {\n formdroit=new ProfilMenuItem();\n selectdroit=new ProfilMenuItem();\n dataListdroit=new ArrayList<>();\n }", "public ProductosBean() {\r\n }", "public ReservaBean() {\r\n nrohabitacion=1;\r\n createLista(nrohabitacion);\r\n editable=true;\r\n sino=\"\";\r\n \r\n reserva = new TReserva();\r\n }", "public CustomerCartItem() {\n }", "public void inicializarItemInvoice() {\r\n\t\ttry {\r\n\t\t\teditarItem = false;\r\n\t\t\trequired = true;\r\n\t\t\tpo = new PO();\r\n\t\t\tlistPos = new ArrayList<PO>();\r\n\t\t\titemInvoice = null;\r\n\t\t\titemPO = null;\r\n\t\t\tpartNumber = null;\r\n\t\t\tBasicFiltroPO filtroPO = new BasicFiltroPO();\r\n\r\n\t\t\tCarga c = facade.getCargaById(invoice.getCarga().getId());\r\n\t\t\tfiltroPO.setFilial(c.getFilial());\r\n\t\t\tlistPos = facade.listarPO(filtroPO);\r\n\t\t\tpoConverter = new ConverterUtil<PO>(listPos);\r\n\r\n\t\t} catch (BusinessException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "protected abstract IModalView<BeanItem<M>> showAddForm(BeanItem<M> item);", "public Bean_article() {\n }", "protected Item() {\n }", "public InventoryItem(){\r\n this.itemName = \"TBD\";\r\n this.sku = 0;\r\n this.price = 0.0;\r\n this.quantity = 0;\r\n nItems++;\r\n }", "public RecentItem() {\n }", "public ProductBeans() {\n \n services = BeanHelper.getService();\n list = services.listOfProducts();\n\n }", "public OrderItem() {}", "public ItemSummeryLVUI() {\n super();\n List<PTableColumn> tblCols = new ArrayList();\n// tblCols.add(new PTableColumn(String.class, \"empty\"));\n tblCols.add(new PTableColumn(String.class, \"SKU\"));\n tblCols.add(new PTableColumn(String.class, \"UOM\"));\n tblCols.add(new PTableColumn(String.class, \"QTY\"));\n\n getTable().init(InventoryJournalLine.class, tblCols);\n \n }", "public RestaurantItem() {\n }", "public ListItems() {\n itemList = new ArrayList();\n }", "@Override\n public Item createItem(int itemNum, Item item) throws VendingMachinePersistenceException {\n loadItemFile();\n Item newItem = itemMap.put(itemNum, item);\n writeItemFile();\n return newItem;\n }", "public Item() \r\n\t{\r\n\t\tname = \"AbstractItem\";\r\n\t\tdescription = \"Example Item Generated\";\r\n\t\tprice = 0;\r\n\t}", "public EntityPropertyBean() {}", "@Override\r\n\tpublic ItemInstance createItemInstance() {\n\t\treturn new HpInstance();\r\n\t}", "public Item(ResultSet rs, Supplier supp) {\r\n try {\r\n this.toolId = rs.getInt(1);\r\n this.toolName = rs.getString(2);\r\n this.toolQuantity = rs.getInt(3);\r\n this.toolPrice = rs.getDouble(4);\r\n this.toolSupplier = supp;\r\n } catch (SQLException e){\r\n System.out.println(\"Supplier creation error (ResultSet)\");\r\n e.printStackTrace();\r\n }\r\n }", "public Item(\n int itemId ,\n int currentQty ,\n int minQty ,\n int maxQty ,\n BufferedImage icon ,\n String label, \n String desc ,\n String attr)\n {\n this.itemId = itemId ;\n this.currentQty=currentQty;\n this.minQty=minQty;\n this.maxQty=maxQty;\n this.icon=icon;\n this.label=label;\n }", "Item(){\r\n\t\tthis(0, new Weight(5), new DukatAmount(0));\r\n\t}", "private void makeObject() {\n\t\t\n\t\tItem I1= new Item(1,\"Cap\",10.0f,\"to protect from sun\");\n\t\tItemMap.put(1, I1);\n\t\t\n\t\tItem I2= new Item(2,\"phone\",100.0f,\"Conversation\");\n\t\tItemMap.put(2, I2);\n\t\t\n\t\tSystem.out.println(\"Objects Inserted\");\n\t}", "public Inventory(){\n this.items = new ArrayList<InventoryItem>(); \n }", "public CustomerCartItem(Long itemId, int quantity) {\n this.id = itemId;\n this.quantity = quantity;\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n try {\n // TODO\n QueryBO queryBO = (QueryBO) BOFactory.getBOFactory().getSuperBO(BOFactory.BOTypes.QUERY);\n ArrayList<ItemFormTM> allItemDetail = queryBO.allItemDetail();\n\n itemDetailTable.setItems(FXCollections.observableArrayList(allItemDetail));\n \n \n itemDetailTable.getColumns().get(0).setCellValueFactory(new PropertyValueFactory<>(\"batchId\"));\n itemDetailTable.getColumns().get(1).setCellValueFactory(new PropertyValueFactory<>(\"itemCode\"));\n itemDetailTable.getColumns().get(2).setCellValueFactory(new PropertyValueFactory<>(\"brand\"));\n itemDetailTable.getColumns().get(3).setCellValueFactory(new PropertyValueFactory<>(\"discription\"));\n itemDetailTable.getColumns().get(4).setCellValueFactory(new PropertyValueFactory<>(\"qtyOnHand\"));\n itemDetailTable.getColumns().get(5).setCellValueFactory(new PropertyValueFactory<>(\"unitPrice\"));\n } catch (Exception ex) {\n Logger.getLogger(ItemFormController.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }", "public Item(String name, ItemType type)\n {\n\tthis.name = name;\n\tthis.type = type;\n }", "public Item(){\n description = \"No description avaible for this item\";\n weight = 0;\n }", "public AddItem() {\n initComponents();\n }", "public Item createNew(int count) {\r\n Item i = new Item(name, id);\r\n i.setPickedUp(true);\r\n i.setCount(count);\r\n return i;\r\n }", "public ItemFragment() {\n }", "public GItem(Item i) {\n this.mGItem = i.getId();\n this.title = i.getTitle();\n\n if (!i.getAddress().equals(\"\")){\n this.address = i.getAddress();\n }\n\n if (i instanceof OfficerItem){\n this.type = 1;\n\n } else if (i instanceof CompanyItem){\n this.type = 0;\n }\n\n }", "public DessertItem() {\n this(\"\");\n }", "public itemDBContract(){}", "public PapelBean() {\n }", "public Item(String id, int index) {\n this.id = id;\n this.itemIndex = index;\n this.dataBank = new DataBank();\n this.usersRatings = new SortedRatingList();\n }", "public BasketItemBuilder() {\n generateRandomId();\n }", "private IntroductionBean createBean(Cursor cur) {\n String title = cur.getString(cur.getColumnIndexOrThrow(IntroductionBean.Table.FIELD_TITLE));\n String content = cur.getString(cur.getColumnIndexOrThrow(IntroductionBean.Table.FIELD_CONTENT));\n return new IntroductionBean(title, content);\n }", "public QuestionPoolItemData(){\n }", "@Override\n\tprotected BaseItemsGrid createItemsGrid() {\n\t\treturn new AdminItemGrid(this);\n\t}", "AdapterItems(int ID, String product)\n {\n this.ID=ID;\n this.product=product;\n //this. Description=Description;\n }", "public Item_Record(Integer _Id_, String name_, String description_, String code_, Double price_, Double retailPrice_, Double costPrice_, Object _Search_, String[] _Types_, String _LastModified_, Integer _Version_) {\n super(Item_.ITEM_);\n\n set(0, _Id_);\n set(1, name_);\n set(2, description_);\n set(3, code_);\n set(4, price_);\n set(5, retailPrice_);\n set(6, costPrice_);\n set(7, _Search_);\n set(8, _Types_);\n set(9, _LastModified_);\n set(10, _Version_);\n }", "Items(int quantidade,Produto produto){\n\t\tqntd = quantidade;\n\t\tthis.produto = produto;\n\t\t\n\t}", "public void addItemElementsFromBillOfMaterials(Item item) throws CdbException {\n List<InventoryBillOfMaterialItem> bomItems = item.getInventoryDomainBillOfMaterialList();\n\n if (bomItems != null) {\n for (InventoryBillOfMaterialItem bomItem : bomItems) {\n if (bomItem.getState().equals(InventoryBillOfMaterialItemStates.unspecifiedOptional.getValue())) {\n continue;\n }\n\n // Check if current catalog item element already has an item element defined. \n ItemElement catalogItemElement = bomItem.getCatalogItemElement();\n ItemElement currentInventoryItemElement = null;\n for (ItemElement inventoryItemElement : item.getFullItemElementList()) {\n if (inventoryItemElement.getDerivedFromItemElement() == catalogItemElement) {\n currentInventoryItemElement = inventoryItemElement;\n logger.debug(\"Updating element \" + currentInventoryItemElement + \" to item \" + item);\n break;\n }\n }\n\n if (currentInventoryItemElement == null) {\n currentInventoryItemElement = new ItemElement();\n currentInventoryItemElement.init(item, bomItem.getCatalogItemElement());\n item.getFullItemElementList().add(currentInventoryItemElement);\n logger.debug(\"Creating instance adding element \" + currentInventoryItemElement + \" to item \" + item);\n }\n\n // User has specified to create a new item for this bill of materials item. \n String currentBomState = bomItem.getState();\n if (currentBomState.equals(InventoryBillOfMaterialItemStates.newItem.getValue())\n || currentBomState.equals(InventoryBillOfMaterialItemStates.existingItem.getValue())) {\n if (bomItem.getInventoryItem() == null) {\n\n String actionWord = \"defined\";\n if (currentBomState.equals(InventoryBillOfMaterialItemStates.existingItem.getValue())) {\n actionWord = \"selected\";\n }\n\n throw new CdbException(\"An item for: \" + bomItem.getCatalogItemElement().getName() + \" is not \" + actionWord + \".\");\n }\n\n Item inventoryItem = bomItem.getInventoryItem();\n\n // No need to do that for existing items. \n if (currentBomState.equals(InventoryBillOfMaterialItemStates.newItem.getValue())) {\n addItemElementsFromBillOfMaterials(inventoryItem);\n currentInventoryItemElement.setContainedItem(inventoryItem);\n\n } else if (currentBomState.equals(InventoryBillOfMaterialItemStates.existingItem.getValue())) {\n if (currentInventoryItemElement.getContainedItem() == inventoryItem == false) {\n currentInventoryItemElement.setContainedItem(itemFacade.find(inventoryItem.getId()));\n }\n }\n } else if (currentBomState.equals(InventoryBillOfMaterialItemStates.placeholder.getValue())) {\n currentInventoryItemElement.setContainedItem(null);\n }\n\n // Use permissions defined in parent of the item for the item element. \n updateItemElementPermissionsToItem(currentInventoryItemElement, bomItem.getParentItemInstance());\n }\n }\n\n }", "public UseCaseItem() {\n delegate = new MyModel.Builder().build();\n }", "Item getItem(int index) {\r\n return new Item(this, index);\r\n }", "public Item createNew(int xpos, int ypos) {\r\n Item i = new Item(name, id);\r\n i.setPosition(xpos, ypos);\r\n return i;\r\n }", "public ShoppingCartBean(){\n super();\n }", "public T prepareCreate(ActionEvent event) {\n T newItem;\n try {\n newItem = itemClass.newInstance();\n this.selected = newItem;\n initializeEmbeddableKey();\n return newItem;\n } catch (InstantiationException ex) {\n Logger.getLogger(AbstractController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n Logger.getLogger(AbstractController.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "public FinalMysteryItem() {\n int randomIndex = new Random().nextInt(7);\n item = new Item(listOfPossibleNames[randomIndex], PRICE_TO_BUY);\n }" ]
[ "0.7035587", "0.6952088", "0.6351669", "0.6263647", "0.6259854", "0.61895734", "0.61503994", "0.60701746", "0.60394275", "0.60198355", "0.60198355", "0.6005144", "0.5972023", "0.5972023", "0.5918779", "0.5914484", "0.589593", "0.58827275", "0.5867468", "0.58640456", "0.5859041", "0.58393234", "0.5836263", "0.5819953", "0.5813037", "0.58115804", "0.5796928", "0.5796219", "0.5789834", "0.57802916", "0.57688284", "0.5756387", "0.5725287", "0.57219994", "0.5708521", "0.5707625", "0.56991005", "0.5675589", "0.56708246", "0.5667831", "0.56614906", "0.5656782", "0.56489724", "0.56316406", "0.56274986", "0.5623816", "0.5611222", "0.5608203", "0.5607598", "0.5601148", "0.5586142", "0.55749255", "0.5548357", "0.5520902", "0.55031395", "0.55023926", "0.5501523", "0.5498482", "0.54941285", "0.5493706", "0.54930574", "0.5492416", "0.5489944", "0.5483906", "0.5465076", "0.54613423", "0.5455974", "0.54531074", "0.5452961", "0.5450514", "0.5449671", "0.54316956", "0.5400975", "0.53955984", "0.53944737", "0.5391396", "0.5390447", "0.5385822", "0.53784585", "0.5364326", "0.5363587", "0.535638", "0.53532535", "0.53523827", "0.5342277", "0.5341778", "0.53402567", "0.5324712", "0.532413", "0.5323495", "0.53205025", "0.5317566", "0.53169715", "0.53157246", "0.53082097", "0.5290256", "0.5288477", "0.5287709", "0.52859825", "0.52837497" ]
0.819678
0
let user edit existing value?
@Override public void onClick(DialogInterface dialog, int which) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void edit() {\n\n\t}", "void edit(Price Price);", "@Override\n public void edit(User user) {\n }", "@Override\r\n\tpublic void edit() {\n\t\t\r\n\t}", "public void editUser(User user) {\n\t\t\n\t}", "public abstract void edit();", "User editUser(User user);", "public void editOperation() {\n\t\t\r\n\t}", "boolean editEntry(String id, String val, String colName) throws Exception;", "protected abstract void editItem();", "public void editButtonClicked(){\n String first = this.firstNameInputField.getText();\n String last = this.lastNameInputField.getText();\n String email = this.emailInputField.getText();\n String dep = \"\";\n String role=\"\";\n if(this.departmentDropdown.getSelectionModel().getSelectedItem() == null){\n dep= this.departmentDropdown.promptTextProperty().get();\n //this means that the user did not change the dropdown\n \n }else{\n dep = this.departmentDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.roleDropdown.getSelectionModel().getSelectedItem()== null){\n role = this.roleDropdown.promptTextProperty().get();\n }else{\n role = this.roleDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.isDefaultValue(first) && \n this.isDefaultValue(last) && \n this.isDefaultValue(email) && \n this.isDefaultValue(role) && \n this.isDefaultValue(dep)){\n //this is where we alert the user that no need for update is needed\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setContentText(\"User information has not changed...no update performed\");\n alert.showAndWait();\n \n }else{\n \n if(this.userNameLabel.getText().equals(\"User\")){\n System.out.println(\"This is empty\");\n }else{\n //create a new instance of the connection class\n this.dbConnection = new Connectivity();\n //this is where we do database operations\n if(this.dbConnection.ConnectDB()){\n //we connected to the database \n \n boolean update= this.dbConnection.updateUser(first, last, email, dep,role , this.userNameLabel.getText());\n \n \n }else{\n System.out.println(\"Could not connect to the database\");\n }\n \n }\n }\n }", "private void setToEdit(String input){\n ToEdit = input;\n }", "void editUser(String uid, User newUser);", "Product editProduct(Product product);", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tif (!edited) {\n\t\t\t\t\t\topenEdit();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcloseEdit();\n\t\t\t\t\t\tif (newly) {\n\t\t\t\t\t\t\tnewly = false;\n\t\t\t\t\t\t\tvo = getUserVO();\n\t\t\t\t\t\t\tUserController.add(vo);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tUserController.modify(vo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "public void tryEdit() throws SQLException, DataStoreException, Exception {\r\n\t\tif (isDataModified()) {\r\n\t\t\tscrollToMe();\r\n if (getValidator().getUseAlertsForErrors()) {\r\n addConfirmScript(_okToEditQuestion, _okToEditValue);\r\n }\r\n else {\r\n _validator.setErrorMessage(_okToEditQuestion, null, -1, _okToEdit);\r\n }\r\n\t\t}\r\n else {\r\n\t\t\tdoEdit();\r\n }\r\n\t}", "void editAssetValue(int newVal);", "public String edit() {\r\n\t\tuserEdit = (User) users.getRowData();\r\n\t\treturn \"edit\";\r\n\t}", "@Override\n\tpublic void edit(User user){\n\t\tuserRepo.save(user);\n\t}", "public void edit(RequestBean request) {\n\t\t\r\n\t}", "public void editTheirProfile() {\n\t\t\n\t}", "private void commitEdit (int validValue)\r\n\t{\r\n\t\tm_value = validValue;\r\n\t}", "T edit(long id, T obj);", "boolean isEdit();", "private void edit() {\n if (String.valueOf(tgl_pengobatanField.getText()).equals(null)\n || String.valueOf(waktu_pengobatanField.getText()).equals(null)) {\n Toast.makeText(getApplicationContext(),\n \"Ada Yang Belum Terisi\", Toast.LENGTH_SHORT).show();\n } else {\n SQLite.update(Integer.parseInt(idField.getText().toString().trim()),nama_pasien2,nama_dokter2, tgl_pengobatanField.getText().toString().trim(),waktu_pengobatanField.getText().toString(),\n keluhan_pasienField.getText().toString().trim(),hasil_diagnosaField.getText().toString().trim(),\n biayaField.getText().toString().trim());\n blank();\n finish();\n }\n }", "@Override\r\n\tpublic boolean edit(Board1 b) {\n\t\treturn dao.update(b);\r\n\t}", "public Boolean editRecord(String recordID, String fieldName, String newValue, String managerID);", "@Override\n\tpublic int edita(Solicitud bean) throws Exception {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void edit(HttpServletRequest request,HttpServletResponse response) {\n\t\tint id=Integer.parseInt(request.getParameter(\"id\"));\n\t\tQuestionVo qv=new QuestionVo().getInstance(id);\n\t\tcd.edit(qv);\n\t\ttry{\n\t\t\tresponse.sendRedirect(\"Admin/question.jsp\");\n\t\t\t}\n\t\t\tcatch(Exception e){}\n\t}", "public void editDisplayedItem(String key, String fieldToChange, Object newValue){}", "@Override\r\n\t\tpublic boolean editItem() {\n\t\t\treturn false;\r\n\t\t}", "public void editEnabled(boolean enabled){\n }", "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 }", "@Override\n\tpublic Rol edit(Rol p) {\n\t\treturn dao.save(p);\n\t}", "public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "@Override\n\tpublic void editAction(int id) {\n\t\t\n\t}", "private static void editStudent () {\n System.out.println(\"Here is a list of Students..\");\n showStudentDB();\n System.out.println(\"Enter Id of student you want to edit: \");\n int studentId = input.nextInt();\n input.nextLine();\n Student student = null;\n\n for(Student s: studentDB) {\n if(s.getID() == studentId) {\n student = s;\n }\n }\n\n if(student != null) {\n System.out.println(\"Enter New Name\");\n String str = input.nextLine();\n student.setName(str);\n System.out.println(\"Name is changed!\");\n System.out.println(\"Id: \" + student.getID() + \"\\n\" + \"Name: \" + student.getName() );\n } else {\n System.out.println(\"Invalid Person!\");\n }\n }", "@Override\r\n\tpublic User editdata(User usr) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Usuario edit(Usuario obj) {\n\t\treturn null;\n\t}", "static void setNotEdit(){isEditing=false;}", "private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }", "void actionEdit(int position);", "@Override\n\tpublic boolean edit(User u) {\n\t\ttry {\n\t\t\tuserDao.edit(u);\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "ApiResponse editState(ID id, Kiruvchi kiruvchi);", "T edit(T obj);", "public void edit() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"editButton\").click();\n\t}", "public void setEditUser(User editUser)\r\n/* */ {\r\n/* 179 */ this.editUser = editUser;\r\n/* */ }", "void setUserIsActiveEditable(boolean b);", "public User editUser(User user) {\n\t\treturn null;\r\n\t}", "void onEditClicked();", "void setEditore(String editore);", "@Override\n\tpublic boolean editUtente(String username) {\n\t\tUtente user = (Utente)getUtente(username);\n\t\tif(userExists(user)) {\n\t\t\tuser.setGiudice(true);\n\t\t\tDB db = getDB();\n\t\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\t\tlong hash = (long) user.getUsername().hashCode();\n\t\t\tusers.put(hash, user);\n\t\t\tdb.commit();\n\t\t\treturn true;\n\t\t} else\n\t\t\treturn false;\n\t}", "@Override\n\tpublic int edit(Zongjie zongjie) {\n\t\treturn zongjieDao.edit(zongjie);\n\t}", "public void DoEdit() {\n \n int Row[] = tb_User.getSelectedRows();\n if (Row.length > 1) {\n JOptionPane.showMessageDialog(null, \"You can choose only one user edit at same time!\");\n return;\n }\n if (tb_User.getSelectedRow() >= 0) {\n EditUser eu = new EditUser(this);\n eu.setVisible(true);\n\n } else {\n JOptionPane.showMessageDialog(null, \"You have not choose any User to edit\");\n }\n }", "public void setEdit(boolean bool){\r\n edit = bool;\r\n }", "public void editUser(User tmpUser, User user) {\n\t\t\n\t}", "private void editProduct() {\n\t\tif (!CartController.getInstance().isCartEmpty()) {\n\t\t\tSystem.out.println(\"Enter Product Id - \");\n\t\t\tint productId = getValidInteger(\"Enter Product Id -\");\n\t\t\twhile (!CartController.getInstance().isProductPresentInCart(\n\t\t\t\t\tproductId)) {\n\t\t\t\tSystem.out.println(\"Enter Valid Product Id - \");\n\t\t\t\tproductId = getValidInteger(\"Enter Product Id -\");\n\t\t\t}\n\t\t\tSystem.out.println(\"Enter new Quantity of Product\");\n\t\t\tint quantity = getValidInteger(\"Enter new Quantity of Product\");\n\t\t\tCartController.getInstance().editProductFromCart(productId,\n\t\t\t\t\tquantity);\n\t\t} else {\n\t\t\tDisplayOutput.getInstance().displayOutput(\n\t\t\t\t\t\"\\n-----Cart Is Empty----\\n\");\n\t\t}\n\t}", "@Override\n public void checkEditing() {\n }", "public boolean shouldEditButtonBePresent();", "@FXML\n private void selectedBtnEdit(ActionEvent event){\n try {\n query=\"SELECT * FROM category WHERE category_id = '\"+ txtCategoryNo.getText() +\"'\";\n rset = connection.prepareStatement(query).executeQuery();\n isNewRecord = !rset.next(); //set a flag to the record retrieved as existing record and used to determine if an SQL for insert or update should be done\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n TextFieldEditableProperty(true,1.00);\n }", "public void setCValueEditable(boolean status);", "public void setEditedItem(Object item) {editedItem = item;}", "public abstract void checkEditing();", "public void editar() {\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Atualizar(cliente);\n\n JSFUtil.AdicionarMensagemSucesso(\"Cliente editado com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n }", "public boolean isCValueEditable();", "private void editAccountType() throws Exception, EditUserException {\n String userChange = userIDInput.getText();\n String accountTypeInput = accountTypeValueEdit;\n try {\n Admin.editAccountType(userChange, accountTypeInput);\n String msg = \"Change user \" + userChange + \" to \" + accountTypeInput + \" success!\";\n JOptionPane.showMessageDialog(null, msg);\n\n // Reset values\n userIDInput.setText(\"\");\n } catch (NullPointerException e) {\n String msg = \"Edit User Error: Empty values. Please try again.\";\n JOptionPane.showMessageDialog(null, msg);\n throw new NullPointerException(msg);\n } catch (SQLException e) {\n String msg = \"Edit User SQL Error: Could not add to database.\";\n JOptionPane.showMessageDialog(null, msg);\n throw new Exception(msg);\n } catch (EditUserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "public String edit() {\n return \"edit\";\n }", "public void edit(Person person) {\n\t\tpersonRepository.edit(person);\n\t}", "void editMyPost(Post post);", "public void saveProfileEditData() {\r\n\r\n }", "@Override\n\t\t\t\tpublic String isValid(Object value) {\n\t\t\t\t\treturn \"Editing not allowed!\";\n\t\t\t\t}", "public String editar()\r\n/* 59: */ {\r\n/* 60: 74 */ if ((getMotivoLlamadoAtencion() != null) && (getMotivoLlamadoAtencion().getIdMotivoLlamadoAtencion() != 0)) {\r\n/* 61: 75 */ setEditado(true);\r\n/* 62: */ } else {\r\n/* 63: 77 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_seleccionar\"));\r\n/* 64: */ }\r\n/* 65: 79 */ return \"\";\r\n/* 66: */ }", "@FXML\n private void editSelected() {\n if (selectedAccount == null) {\n // Warn user if no account was selected.\n noAccountSelectedAlert(\"Edit DonorReceiver\");\n } else {\n EditPaneController.setAccount(selectedAccount);\n PageNav.loadNewPage(PageNav.EDIT);\n }\n }", "protected boolean isEdit(){\n\t\treturn getArguments().getBoolean(ARG_KEY_IS_EDIT);\n\t}", "@FXML\r\n\tvoid enableEdit(ActionEvent event) {\r\n\t\tupdateUser.setText(\"Update\");\r\n\t\tboxFn.setDisable(false);\r\n\t\tboxLn.setDisable(false);\r\n\t\tdatePicker.setDisable(false);\r\n\t\tcalorieCount.setDisable(false);\r\n \t}", "@Override\n\tpublic Integer edit(SocialInsuranceRecord insuranceRecord, Integer id) {\n\t\treturn dao.updateByPrimaryKey(insuranceRecord, id);\n\t}", "private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }", "@Override\n\tpublic void editUser(ERSUser user) {\n\t\tuserDao.updateUser(user);\n\t}", "public default boolean isEditable(){ return false; }", "private void btnEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditActionPerformed\n boolean flag = this.cutiController.save(txtCutiID.getText(), (txtTglAwal.getText()), (txtTglAkhir.getText()),\n txtKet.getText(), cmbCutiKhususID.getSelectedIndex());\n String message = \"Failed to edit data\";\n if (flag){\n message = \"Success to edit data\";\n }\n JOptionPane.showMessageDialog(this, message, \"Notification\", JOptionPane.INFORMATION_MESSAGE);\n bindingTable();\n reset();\n }", "@FXML\n void handleEdit(ActionEvent event) {\n if (checkFields()) {\n\n try {\n //create a pseudo new environment with the changes but same id\n Environment newEnvironment = new Environment(oldEnvironment.getId(), editTxtName.getText(), editTxtDesc.getText(), editClrColor.getValue());\n\n //edit the oldenvironment\n Environment.edit(oldEnvironment, newEnvironment);\n } catch (SQLException exception) {\n //failed to save a environment, IO with database failed\n Manager.alertException(\n resources.getString(\"error\"),\n resources.getString(\"error.10\"),\n this.dialogStage,\n exception\n );\n }\n //close the stage\n dialogStage.close();\n } else {\n //fields are not filled valid\n Manager.alertWarning(\n resources.getString(\"add.invalid\"),\n resources.getString(\"add.invalid\"),\n resources.getString(\"add.invalid.content\"),\n this.dialogStage);\n }\n Bookmark.refreshBookmarksResultsProperty();\n }", "@Override\n\tpublic int editBook(bookInfo bookinfo) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic HomeModel edit(IKeyBuilder<String> keyBuilder, HomeModel model) {\n\t\treturn null;\n\t}", "@Override\n\tpublic String editUser(Map<String, Object> reqs) {\n\t\treturn null;\n\t}", "private void editUserCard() {\n getUserCard();\n }", "boolean isEditable();", "BaseRecord editRecord(String id, String fieldName, String newValue, String clientId) throws Exception;", "boolean editInvitation(Invitation invitation);", "private void showThatEditable() {\n\t\tTextView tv = new TextView(this);\n\t\ttv.setText(\"You may now edit this recipe!\");\n\t\tAlertDialog.Builder alert = new AlertDialog.Builder(this);\n\t\talert.setTitle(\"Edit Mode\");\n\t\talert.setView(tv);\n\t\talert.setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialog, int whichButton) {\n\t\t\t}\n\t\t});\n\t\talert.show();\n\t}", "@Override\n\tpublic void editar(Contato contato) {\n\t\tthis.dao.editar(contato);\n\t\t\n\t}", "public void saveValue() {\n String[] idCol = assignedDataObject.getIdentifyTemplate().getIdentifyColumnNames();\n if (!(idCol.length == 1 && name.equals(idCol[0]))) { // method \"copy\" must not change unique key name! For any other methods it is not needed to save from frame.\n if (this.getText().equals(\"\")) {\n assignedDataObject.setInt(name, 0);\n } else {\n assignedDataObject.setInt(name, this.getIntValue());\n }\n }\n }", "private void edit() {\r\n if (String.valueOf(txt_name.getText()).equals(\"\") || String.valueOf(txt_bagian.getText()).equals(\"\")|| String.valueOf(txt_address.getText()).equals(\"\")|| String.valueOf(txt_telp.getText()).equals(\"\")) {\r\n Toast.makeText(getApplicationContext(),\r\n \"Anda belum memasukan Nama atau ALamat ...\", Toast.LENGTH_SHORT).show();\r\n } else {\r\n SQLite.update(Integer.parseInt(txt_id.getText().toString().trim()),txt_name.getText().toString().trim(),\r\n txt_bagian.getText().toString().trim(),\r\n txt_address.getText().toString().trim(),\r\n txt_telp.getText().toString().trim());\r\n Toast.makeText(getApplicationContext(),\"Data berhasil di Ubah\",Toast.LENGTH_SHORT).show();\r\n blank();\r\n finish();\r\n }\r\n }", "@Override\r\n\tpublic Loja editar(String nomeResponsavel, int telefoneEmpresa, String rua, String cidade, String estado, String pais,\r\n\t\t\tint cep, int cnpj, String razaoSocial, String email, String nomeEmpresa, String senha) {\n\t\treturn null;\r\n\t}", "void editAddressUser(String uid, Address address);", "void editProperty(String requestedProperty, Object newValue) {\n properties.editProperty(requestedProperty, newValue); // <-- The replace() method automatically checks for null\n }", "@Override\r\n protected boolean canEdit(Object element) {\n return true;\r\n }", "@Override\n\tpublic String editPriyom(String priyom) {\n\t\treturn null;\n\t}", "SrInwardTruckQualityCheck edit(SrInwardTruckQualityCheck srInwardTruckQualityCheck);", "public void editarProveedor() {\n try {\n proveedorFacadeLocal.edit(proTemporal);\n this.proveedor = new Proveedor();\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Proveedor editado\", \"Proveedor editado\"));\n } catch (Exception e) {\n \n }\n\n }", "public void setEdit(java.lang.Boolean edit) {\n this.edit = edit;\n }", "public boolean edit(String id, String name, String age) {\n boolean isEdit = false;\n User user = this.findById(id);\n if (!user.isNull()) {\n if (user.getName() != null && !user.getName().isEmpty() && (user.getName().equals(name) || this.isNameUnique(name))) {\n user.edit(name, age);\n isEdit = true;\n }\n }\n return isEdit;\n }" ]
[ "0.72881025", "0.71269625", "0.71152854", "0.705468", "0.6917585", "0.68989646", "0.67715466", "0.67506796", "0.6703534", "0.65438235", "0.6526872", "0.6466766", "0.6461225", "0.64508474", "0.6450235", "0.6431599", "0.64285743", "0.6426826", "0.6416015", "0.6406371", "0.63490444", "0.63228804", "0.6315804", "0.6305539", "0.62999046", "0.6298619", "0.62736017", "0.625605", "0.6250797", "0.6248774", "0.62433296", "0.62402874", "0.62039995", "0.61930925", "0.61871475", "0.6167253", "0.615255", "0.6138558", "0.61280024", "0.6121679", "0.6117093", "0.6115933", "0.6099937", "0.6099363", "0.6098382", "0.60980856", "0.6089442", "0.6087188", "0.6078516", "0.60772717", "0.6058116", "0.60547066", "0.6042652", "0.6042138", "0.60329086", "0.60257804", "0.6023949", "0.6023159", "0.6022891", "0.60196984", "0.60159904", "0.60132957", "0.6007083", "0.60043645", "0.5998495", "0.5995488", "0.59946793", "0.5989682", "0.5988972", "0.5980505", "0.59711856", "0.5966817", "0.5954505", "0.59390795", "0.5931901", "0.5927953", "0.59273267", "0.5924364", "0.59233785", "0.5915883", "0.5911414", "0.5903996", "0.5901991", "0.589671", "0.5895501", "0.5894757", "0.58882153", "0.5881099", "0.58802116", "0.58798933", "0.587422", "0.5871911", "0.58634526", "0.5847967", "0.584011", "0.5839917", "0.5837894", "0.58360595", "0.58341193", "0.58320737", "0.5829887" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_currency_converter, 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\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7249559", "0.7204226", "0.71981144", "0.7180145", "0.7110589", "0.70431244", "0.7041351", "0.70150685", "0.70118093", "0.69832", "0.6947845", "0.69419056", "0.6937257", "0.6920975", "0.6920975", "0.68938893", "0.68867826", "0.6878929", "0.6877472", "0.68656766", "0.68656766", "0.68656766", "0.68656766", "0.68553543", "0.6850232", "0.6822862", "0.68201447", "0.68163574", "0.68163574", "0.6816304", "0.6809227", "0.6803687", "0.6801118", "0.67946446", "0.67919034", "0.67913854", "0.6786644", "0.67618436", "0.6760987", "0.67516655", "0.67475504", "0.67475504", "0.6744612", "0.67433023", "0.6729379", "0.67267543", "0.67261547", "0.67261547", "0.6724336", "0.6714574", "0.67084044", "0.670811", "0.67026806", "0.6701955", "0.670018", "0.6697785", "0.66899645", "0.6687168", "0.6687168", "0.66860044", "0.66835976", "0.6682339", "0.668104", "0.6671387", "0.66706777", "0.6665407", "0.6659777", "0.6659777", "0.6659777", "0.6659032", "0.6658105", "0.6658105", "0.6658105", "0.66553104", "0.6654278", "0.6654054", "0.66521645", "0.6650613", "0.66495895", "0.6649238", "0.66490036", "0.6648245", "0.66481483", "0.6646514", "0.6646321", "0.6645122", "0.66418123", "0.6638334", "0.6636035", "0.6635416", "0.6635416", "0.6635416", "0.6635411", "0.66325295", "0.6631742", "0.66299105", "0.6629049", "0.6627932", "0.66237384", "0.662195", "0.662195" ]
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(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { 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\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\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.79041183", "0.7805934", "0.77659106", "0.7727251", "0.7631684", "0.7621701", "0.75839096", "0.75300384", "0.74873656", "0.7458051", "0.7458051", "0.7438486", "0.742157", "0.7403794", "0.7391802", "0.73870087", "0.7379108", "0.7370295", "0.7362194", "0.7355759", "0.73454577", "0.734109", "0.73295504", "0.7327726", "0.73259085", "0.73188347", "0.731648", "0.73134047", "0.7303978", "0.7303978", "0.7301588", "0.7298084", "0.72932935", "0.7286338", "0.7283324", "0.72808945", "0.72785115", "0.72597474", "0.72597474", "0.72597474", "0.725962", "0.7259136", "0.7249966", "0.7224023", "0.721937", "0.7216621", "0.72045326", "0.7200649", "0.71991026", "0.71923256", "0.71851367", "0.7176769", "0.7168457", "0.71675026", "0.7153402", "0.71533287", "0.71352696", "0.71350807", "0.71350807", "0.7129153", "0.7128639", "0.7124181", "0.7123387", "0.7122983", "0.71220255", "0.711715", "0.711715", "0.711715", "0.711715", "0.7117043", "0.71169263", "0.7116624", "0.71149373", "0.71123946", "0.7109806", "0.7108778", "0.710536", "0.7098968", "0.70981944", "0.7095771", "0.7093572", "0.7093572", "0.70862055", "0.7082207", "0.70808214", "0.7080366", "0.7073644", "0.7068183", "0.706161", "0.7060019", "0.70598614", "0.7051272", "0.70374316", "0.70374316", "0.7035865", "0.70352185", "0.70352185", "0.7031749", "0.703084", "0.7029517", "0.7018633" ]
0.0
-1
Methods // Set // //
public void setPosition(Position position) { this.position = position; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setdat()\n {\n }", "protected abstract Set method_1559();", "private void set(){\n resetBuffer();\n }", "@Test\n\tpublic void testSet() {\n\t}", "void setParameters() {\n\t\t\n\t}", "private void setData() {\n\n }", "@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}", "@Override\n\tpublic void set() {\n\t\tSystem.out.println(\"A==========set\");\n\t}", "@Override\npublic void setAttributes() {\n\t\n}", "String setValue();", "public Setparam() {\r\n super();\r\n }", "private void assignment() {\n\n\t\t\t}", "@Override\n\tpublic void set(T e) {\n\t\t\n\t}", "@Override\r\n\t\tpublic void set(E arg0) {\n\r\n\t\t}", "@Override\n\tpublic void setData() {\n\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void setX(int x) { this.x=x; }", "void setValue(T value)\n\t\t{\n\t\t\tthis.value = value;\n\t\t}", "@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}", "public void set() {\r\n\t\tage = 19;\r\n\t\tname = \"ΎΛ·»\";\r\n\t\theight = 161;\r\n\t\tsetWeight(50);\r\n\t\tSystem.out.println(getWeight());\r\n\t}", "@Override\n\tprotected void setValueOnUi() {\n\n\t}", "private void setUserData(){\n }", "void set(Model model);", "public void setRes(){\r\n \r\n }", "public SetSet() {\n\t}", "@Override\n public void onSetSuccess() {\n }", "@Override\n public void onSetSuccess() {\n }", "@Override\n\tpublic void setValue(Object object) {\n\t\t\n\t}", "@Override\n public void setX(int x) {\n this.x=x;\n }", "protected abstract void setSpl();", "void set(T t);", "@Override\n\tpublic void setValue(Object object) {\n\n\t}", "protected void initialize() {\n \tsetSetpoint(0.0);\n }", "public void setEmpresa(Empresa empresa)\r\n/* 89: */ {\r\n/* 90:141 */ this.empresa = empresa;\r\n/* 91: */ }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void setValue(String arg0, String arg1) {\n\t\t\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "public void setName(String name){this.name=name;}", "protected void setValue(T value) {\r\n this.value = value;\r\n }", "public void set(String name, Object value) {\n }", "@Override\n public void setObject(Object arg0)\n {\n \n }", "@Override\r\n\tpublic void setProperties(Properties arg0) {\n\r\n\t}", "protected void setToDefault(){\n\n\t}", "private SetProperty(Builder builder) {\n super(builder);\n }", "public void set(int pos);", "Constructor() {\r\n\t\t \r\n\t }", "public void setItems(){\n }", "@Override\n\tpublic void setTest() {\n\t}", "@Override\n\tpublic void initValue() {\n\t\t\n\t}", "public abstract void set(DataType x, DataType y, DataType z);", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void setX(int x) {\n\t\t\n\t}", "public void set(boolean bol);", "protected void setupParameters() {\n \n \n\n }", "public void set(String s);", "public void setValue(Object value) { this.value = value; }", "public abstract void set(M newValue);", "public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void setData(Object data) {\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void set(int x, int y)\r\n\t{\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}", "protected void set(int start, int end) {\n \t\t\tfStart= start;\n \t\t\tfEnd= end;\n \t\t\tfText= null;\n \t\t\tfPreservedText= null;\n \t\t}", "public void setNew();", "public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }", "@Override\n\tpublic void initializeValues() {\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}", "public void set(int i) {\n }", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void setX(int x) {\n\n\t}", "private void set(String sEmailTag, String sFirstNameTag, String sIdTag, String sLastNameTag)\r\n\t{\r\n\t\tthis.sEmailTag = sEmailTag;\r\n\t\tthis.sFirstNameTag = sFirstNameTag;\r\n\t\tthis.sIdTag = sIdTag;\r\n\t\tthis.sLastNameTag = sLastNameTag;\r\n\t\t\r\n\t}", "public\tvoid setobject(object obj) {\r\n\t\t oop.value=obj.value;\r\n\t\t oop.size=obj.size;\r\n\t\t \r\n\t}", "@Override\r\n\tpublic void set(final Player t) {\n\r\n\t}", "private void setUIFields(){\n setImage();\n setTitle();\n setLocation();\n setRatingBar();\n setDate();\n setISBN();\n setDescription();\n setPageCount();\n setNumRatings();\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void setX(int x);", "public void setName(String name){this.name = name;}", "private void setSet(int[] set){\n this.set = set;\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void setProperties(Properties properties) \r\n\t{\n\t}", "private void setFile() {\n\t}", "@Override\n\tpublic void setDataSet(IDataSet ds) {\n\t\t\n\t}", "void set(String text);", "@Override\n protected void init() {\n }", "public abstract void setNodes();", "@Override\n\tpublic void setProperties(Properties p) {\n\t\t\n\t}", "public T set(T obj);", "public void setNombre(String nombre)\r\n/* 65: */ {\r\n/* 66: 76 */ this.nombre = nombre;\r\n/* 67: */ }" ]
[ "0.70363975", "0.69720316", "0.6667395", "0.6604412", "0.6591151", "0.6548154", "0.65340143", "0.6530934", "0.6492413", "0.6472429", "0.6438458", "0.6429826", "0.63563234", "0.6327421", "0.6325007", "0.6255079", "0.62292314", "0.6207949", "0.62041754", "0.6191674", "0.6190759", "0.6178164", "0.6174777", "0.61600554", "0.6158867", "0.61417365", "0.61417365", "0.61164486", "0.6109717", "0.61063045", "0.60907143", "0.60895157", "0.60673076", "0.60653013", "0.6050371", "0.6046287", "0.6044328", "0.6040642", "0.6038507", "0.60320854", "0.6025908", "0.601606", "0.6007934", "0.60064906", "0.6003537", "0.59970033", "0.5992609", "0.5985702", "0.59845185", "0.59844995", "0.59735477", "0.59701335", "0.59687746", "0.59652305", "0.59649247", "0.59627193", "0.59582573", "0.59578055", "0.5957441", "0.59570533", "0.59565073", "0.59565073", "0.59565073", "0.59565073", "0.59565073", "0.59565073", "0.59545916", "0.5948615", "0.59471536", "0.5945501", "0.5937834", "0.5933293", "0.59285045", "0.5920615", "0.5909743", "0.5909743", "0.5909743", "0.59073186", "0.59072685", "0.59056795", "0.59056795", "0.59030634", "0.5892671", "0.588589", "0.58785236", "0.5868195", "0.5867572", "0.58657587", "0.5864716", "0.58644956", "0.58611184", "0.58608127", "0.58567655", "0.58563346", "0.5854634", "0.5846366", "0.5843167", "0.5840737", "0.5831597", "0.58312166", "0.5830669" ]
0.0
-1
// Get // //
@Override public Position getPosition() { return position; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String get();", "String get();", "public void get() {\n }", "T get();", "T get();", "T get();", "T get();", "public String get();", "public Result get(Get get) throws IOException;", "@Override\n public void get() {}", "public java.lang.String getGet() {\n return instance.getGet();\n }", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "private Get() {}", "private Get() {}", "@Override\n String get();", "public abstract String get();", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "@Override\r\n\tpublic <T> T get() {\n\t\treturn null;\r\n\t}", "public THING get() {\n return directlyGet();\n }", "Object get(ID id) throws Exception;", "public Value get(Key key) ;", "public T get() {\n return value;\n }", "T get(ID id);", "public DResult get(Get get, long startId) throws IOException;", "@Override\r\n\tpublic T get() {\n\t\treturn null;\r\n\t}", "public boolean isGet();", "Object get(Object key);", "T get(String key);", "public abstract T get(String key);", "@Override\n\tpublic void get() {\n\t\tSystem.out.println(\"this is get\");\n\t}", "public void doGet( )\n {\n \n }", "default Object get(String path) {\n return get(path, null);\n }", "T get(String key) throws IOException;", "public EntityType2 get() throws ClientException {\n return send(HttpMethod.GET, null);\n }", "public Result get(Get get, Integer lockId) throws IOException;", "Object get(String key);", "Object get(String key);", "public Value get(Key key);", "public Object get(String key);", "long get();", "public T get(K key);", "protected abstract Object _get(String key);", "public native T get();", "public GetBuilder get() {\n return new GetBuilder(this);\n }", "boolean get();", "public Object get(String key) {\n \t\treturn this.get(null, key);\n \t}", "@Override\n public T get(Object key) {\n return get(key, null);\n }", "T get(int i);", "Object get(int i);", "@Override\n\tpublic V retrieve(K key) {\n\t\tcheckNullKey(key);\n\t\treadLock.lock();\n\t\ttry {\n\t\t\treturn cache.get(key);\n\t\t} finally {\n\t\t\treadLock.unlock();\n\t\t}\n\t}", "public final Object get() {\n return getValue();\n }", "String get(String id);", "public K get()\n {\n\treturn current.data(); \n }", "public interface Getter {\r\n\tObject get();\r\n}", "@Override\n\tpublic Optional<T> get() {\n\t\treturn null;\n\t}", "T get(int position);", "public ContainerHttpGet httpGet() {\n return this.httpGet;\n }", "double get();", "public a get() {\n return c();\n }", "private void get(String key){\n KeyValueObj obj = this.handler.getObj(key);\n if (obj == null){\n System.out.println(\"[User] value with key \" + key + \" was not found\");\n return;\n }\n System.out.println(obj.toString());\n }", "V get(K key);", "V get(K key);", "V get(K key);", "V get(K key);", "V get(K key);", "V get(K key);", "V get(K key);", "public String get() {\n return getImpl(this.url);\n }", "T get(int index);", "T get(int index);", "T get(int index);", "T get(int index);", "T get(int index);", "@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}", "abstract Function get(Object arg);", "public Object get(String key){ \r\n\t\treturn this.context.getValue(key);\r\n\t}", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}", "@Test\n\tpublic void get_test()\n\t{\n\t\tb.set(1,2,'x');\n\t\tassertEquals(b.get(1,2),'x');\n\t}", "default T getOrCreate() {\n if(!isPresent()) {\n return create();\n }\n else {\n return get();\n }\n }", "public Object get()\n {\n return m_internalValue;\n }", "public T get() {\n return object;\n }", "V get(K id);", "public Object get (int i)\r\n {\r\n }", "T get(Integer id);", "@Override\n Derived get();", "public abstract V get(K key);", "@Override\n\tpublic T get(S key) throws Exception {\n\t\treturn null;\n\t}", "protected abstract V get(K key);", "@Override\r\n\tpublic String get() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic V get(Object key) {\n\t\treturn map.get(key);\n\t}", "T get(@NonNull String key);", "V get(Object key);", "public V get(String key);", "@Override\n\tpublic String get() {\n\t\treturn null;\n\t}", "public T get(int aIndex);", "public Object get(String chave);", "public T get() {\n return cache.getUnchecked(clazz);\n }", "@Override\n public V get(K key){\n CacheObject<K, V> cacheObject = this.cache.get(key);\n\n if (cacheObject != null){\n return cacheObject.getObject();\n }\n\n return null;\n }", "public V get(Object key) { return _map.get(key); }", "public PersonName get() throws ClientException {\n return send(HttpMethod.GET, null);\n }" ]
[ "0.757242", "0.757242", "0.7513582", "0.75101554", "0.75101554", "0.75101554", "0.75101554", "0.7451334", "0.7385493", "0.7375238", "0.73573875", "0.73068106", "0.7162052", "0.7162052", "0.7135711", "0.7003554", "0.68301576", "0.68301576", "0.6818269", "0.678418", "0.67700326", "0.6766078", "0.67572117", "0.66889566", "0.66870636", "0.6662414", "0.6650183", "0.6648898", "0.664113", "0.66258496", "0.661805", "0.6602588", "0.6600839", "0.65964067", "0.6587158", "0.65779066", "0.6575137", "0.6575137", "0.6560043", "0.65592897", "0.6542048", "0.65377396", "0.65310794", "0.6524998", "0.64872307", "0.648497", "0.6472818", "0.6458449", "0.6437965", "0.6430789", "0.64279395", "0.6417875", "0.64110965", "0.64073396", "0.6375781", "0.6370776", "0.6363545", "0.6347283", "0.63352865", "0.6327052", "0.63070047", "0.6300313", "0.6300313", "0.6300313", "0.6300313", "0.6300313", "0.6300313", "0.6300313", "0.62984794", "0.6295475", "0.6295475", "0.6295475", "0.6295475", "0.6295475", "0.6293542", "0.62884873", "0.628686", "0.6285699", "0.6282675", "0.6279218", "0.6263952", "0.6263435", "0.62628037", "0.62625325", "0.62546104", "0.62501925", "0.62453014", "0.6222541", "0.6202759", "0.6199417", "0.6194451", "0.61872303", "0.618448", "0.6178053", "0.61732876", "0.6173146", "0.6172285", "0.6162943", "0.6152406", "0.61452615", "0.6128812" ]
0.0
-1
TODO Autogenerated method stub
@Override public String toString() { return "Chiclete Vendido: " + maquinaDeChiclete.quantidadeDeChicletes + " chicletes"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void walk() { System.out.println("Can Walk"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void move() { System.out.println("Can Move"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void laugh() { System.out.println("Can laugh"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
public interface for crossover operators. Title: popt4jlib Description: A Parallel MetaHeuristic Optimization Library in Java Copyright: Copyright (c) 20112016 Company:
public interface XoverOpIntf { /** * the operation accepts 2 chromosomes (not DGAIndividual objects, not * FunctionIntf() arguments), and combines them so as to produce two new * such chromosomes that are returned in a Pair object. The operation may * throw if any of the produced children are infeasible, assuming the operator * has enough knowledge of that fact. * @param chromosome1 Object * @param chromosome2 Object * @param params HashMap * @throws OptimizerException * @return Pair */ public Pair doXover(Object chromosome1, Object chromosome2, HashMap params) throws OptimizerException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract int[] crossOver();", "public Population doCrossover(Population p) {\n\t\t// TODO Auto-generated method stub\n\t\tSystem.out.println(\"Performing 1 point crossover for config1's selection population.\");\n\t\tSystem.out.println(\"Selecting bits to crossover.\");\n\t\tSystem.out.println(\"Completed.\");\n\t\treturn p;\n\t }", "public abstract Individual doCrossover(Individual ind1, Individual ind2, MOEAD init);", "@Test\n\tpublic void testCrossover() {\n\t\tint pivot = 5;\n\t\tint size = g10.getUnits().size();\n\t\tArrayList<GenomeDouble> expectedWeights1;\n\t\tArrayList<GenomeDouble> expectedWeights2;\n\t\t\n\t\texpectedWeights1 = new ArrayList<GenomeDouble>(g10.getUnits().size());\n\t\texpectedWeights2 = new ArrayList<GenomeDouble>(g10_2.getUnits().size());\n\t\t\n\t\texpectedWeights1.addAll(g10.getUnits().subList(0, pivot));\n\t\texpectedWeights1.addAll(g10_2.getUnits().subList(pivot, size));\n\t\texpectedWeights2.addAll(g10_2.getUnits().subList(0, pivot));\n\t\texpectedWeights2.addAll(g10.getUnits().subList(pivot, size));\n\t\t\n\t\tList<Genome<GenomeDouble>> results = Genome.crossover(g10, g10_2, 0.7, 10);\n\t\tassertEquals(expectedWeights1, results.get(0).getUnits());\n\t\tassertEquals(expectedWeights2, results.get(1).getUnits());\n\t}", "public Pair doXover(Object chromosome1, Object chromosome2, HashMap params) throws OptimizerException;", "public interface ISpecimenCrossover {\n\n StrategySpecimen doCrossover(StrategySpecimen specimen1, StrategySpecimen specimen2);\n}", "public OnePointCrossoverOne(Population p) {\n\t\tdoCrossover(p);\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic void crossover() {\r\n\t\tfinal double CROSSOVER_PROB = 0.5;\r\n\t\tfor (int i=0; i<this.nChromosomes-(this.nChromosomes%2); i=i+2) {\r\n\t\t\tif (Math.random() < CROSSOVER_PROB) {\r\n\t\t\t\tArrayList<Integer> chr1 = (ArrayList<Integer>) this.chromosomes.get(i);\r\n\t\t\t\tArrayList<Integer> chr2 = (ArrayList<Integer>) this.chromosomes.get(i+1);\r\n\t\t\t\t// Uniform crossover\r\n\t\t\t\tif (!chr1.equals(chr2)) {\r\n\t\t\t\t\tfor (int j=0; j<this.nViaPoints; j=j+2) {\r\n\t\t\t\t\t\t// swap via points between 2 chromosomes\r\n\t\t\t\t\t\tInteger tmp = chr2.get(j);\r\n\t\t\t\t\t\tchr2.remove(j);\r\n\t\t\t\t\t\tchr2.add(j, chr1.get(j));\r\n\t\t\t\t\t\tchr1.remove(j);\r\n\t\t\t\t\t\tchr1.add(j, tmp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.printChromosomes(\"After crossover\");\r\n\t}", "@SuppressWarnings({ \"unchecked\", \"deprecation\" })\n\tprivate static NeuralNetwork crossover(NeuralNetwork cross, NeuralNetwork over, Singleton s1) throws IOException, ClassNotFoundException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException {\n\t\tEvolveSingleton s = (EvolveSingleton) s1;\n\t\t//determines which of the two networks was more fit and less fit\n\t\tClass<? extends NeuralNetwork> networkClass = (Class<? extends NeuralNetwork>) Class.forName(\"BackEvolution.\"+s.getType()+\".\"+s.getType()+\"Network\");\n\t\tClass<? extends Layer> layerClass = (Class<? extends Layer>) Class.forName(\"BackEvolution.\"+s.getType()+\".\"+s.getType()+\"Layer\");\n\t\tClass<? extends Neuron> neuronClass = (Class<? extends Neuron>) Class.forName(\"BackEvolution.\"+s.getType()+\".\"+s.getType()+\"Neuron\");\n\t\tNeuralNetwork newnn = null;\n\t\tNeuralNetwork lessfit = null;\n\t\tNeuralNetwork morefit = null;\n\t\tif (cross.getFitness() > over.getFitness()){\n\t\t\tmorefit = cross;\n\t\t\tlessfit = over;\n\t\t}\n\t\telse{\n\t\t\tmorefit = over;\n\t\t\tlessfit = cross;\n\t\t}\n\t\t//creates the structure for the new network\n\t\tLayer[] puts = NetworkCreator.creator(s);\n\t\tClass<?>[] types2 = {Class.forName(\"BackEvolution.Layer\"),Class.forName(\"BackEvolution.Layer\")};\n\t\tConstructor<? extends NeuralNetwork> con2 = networkClass.getConstructor(types2);\n\t\tClass<? extends SpecialCreator> managerClass = (Class<? extends SpecialCreator>) Class.forName(\"BackEvolution.\"+s.getType()+\".\"+s.getType()+\"Creator\");\n\t\tSpecialCreator manager = managerClass.newInstance();\n\t\tmanager.InputOutputcreator(puts);\n\t\tnewnn = con2.newInstance(puts[0],puts[1]);\n\t\tNetworkCreator.Neuraltracker(newnn);\n\t\t//pretty sure this is obsolete from when i tried to breed different layered networks but not sure if I can delete.\n\t\tArrayList<Layer> lesslayers = lessfit.getLayers();\n\t\tArrayList<Layer> morelayers = morefit.getLayers();\n\t\tint maxlayers = 1;\n\t\tif (lesslayers.size() > morelayers.size()){\n\t\t\tmaxlayers = lesslayers.size();\n\t\t}\n\t\telse { \n\t\t\tmaxlayers = morelayers.size();\n\t\t}\n\t\t//adds the neuron to each layer based on which network had the most neurons in that layer\n\t\tfor (int i = 1; i < maxlayers-1; i++){\n\t\t\tLayer lesslayer = null;\n\t\t\tLayer morelayer = null;\n\t\t\tint lessnum = 0;\n\t\t\tint morenum = 0;\n\t\t\ttry{\n\t\t\tlesslayer = lesslayers.get(i);\n\t\t\tlessnum = lesslayer.getNeurons().size();\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tmorelayer = morelayers.get(i);\n\t\t\t\tmorenum = morelayer.getNeurons().size();\n\t\t\t}\n\t\t\ttry{\n\t\t\tmorelayer = morelayers.get(i);\n\t\t\tmorenum = morelayer.getNeurons().size();\n\t\t\t}\n\t\t\tcatch (Exception e){\n\t\t\t}\n\t\t\tif (morelayer == null) morenum = 0;\n\t\t\telse if (morelayer.isOutput()){\n\t\t\t\tmorenum = 0;\n\t\t\t}\n\t\t\tif (lesslayer == null) lessnum = 0;\n\t\t\telse if (lesslayer.isOutput()){\n\t\t\t\tlessnum = 0;\n\t\t\t}\n\t\t\tClass<?>[] types = {boolean.class,boolean.class};\n\t\t\tConstructor<? extends Layer> con = layerClass.getConstructor(types);\n\t\t\tLayer newl = con.newInstance(false, false);\n\t\t\tnewnn.addLayer(newl);\n\t\t\tnewl.setNumber(newnn.getLayers().size()-1);\n\t\t\tfor (int j = 0; j < morenum || j < lessnum; j++){\n\t\t\t\tNeuron newn = neuronClass.newInstance();\n\t\t\t\tnewl.addNeuron(newn);\n\t\t\t\tnewn.setLayernumber(newl.getNumber());\n\t\t\t\tnewn.setNumber(newl.getNeurons().size()-1);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 1; i <=lesslayers.size(); i++){\n\t\t\tLayer l = lesslayers.get(i-1);\n\t\t\tfor (Neuron n : l.getNeurons()){\n\t\t\t\tn.setLayernumber(i);\n\t\t\t\t\n\t\t\t}\n\t\t\tl.setNumber(i);\n\t\t}\n\t\tfor (int i = 1; i <=morelayers.size(); i++){\n\t\t\tLayer l = lesslayers.get(i-1);\n\t\t\tfor (Neuron n : l.getNeurons()){\n\t\t\t\tn.setLayernumber(i);\n\t\t\t\t\n\t\t\t}\n\t\t\tl.setNumber(i);\t\n\t\t}\n\t\t//adds genes to the structure. if the same conection exists in the more fit network, it gets preference over the less fit network. if one or the other does not have this gene at all it gets added. currently more fit is always selected may add random chance that the less fit networks gene is selected.\n\t\t//gets all the data from the more fit layer.\n\t\tArrayList<double[]> geneIdentities = new ArrayList<double[]>();\n\t\tfor(Layer l : morelayers){\t\t\n\t\t\t\tfor (Neuron n : l.getNeurons()){\n\t\t\t\t\tfor(Gene g : n.getGenes()){\n\t\t\t\t\t\tdouble data[] = new double[5];\n\t\t\t\t\t\tdata[0] = l.getNumber();\n\t\t\t\t\t\tdata[1] = n.getNumber();\n\t\t\t\t\t\tdata[2] = g.getConnection().getNumber();\n\t\t\t\t\t\tif (morelayers.get(g.getConnection().getLayernumber()-1).isOutput()) data[3] = maxlayers;\n\t\t\t\t\t\telse data[3] = g.getConnection().getLayernumber();\n\t\t\t\t\t\tdata[4] = g.getWeight();\n\t\t\t\t\t\tgeneIdentities.add(data);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t}\n\t\t//gets all the gene data from the less fit layer.\n\t\tArrayList<double[]> geneIdentities2 = new ArrayList<double[]>();\n\t\tfor(Layer l : lesslayers){\n\t\t\t\tfor (Neuron n : l.getNeurons()){\n\t\t\t\t\tfor(Gene g : n.getGenes()){\n\t\t\t\t\t\tdouble data[] = new double[5];\n\t\t\t\t\t\tdata[0] = l.getNumber();\n\t\t\t\t\t\tdata[1] = n.getNumber();\n\t\t\t\t\t\tdata[2] = g.getConnection().getNumber();\n\t\t\t\t\t\tif (lesslayers.get(g.getConnection().getLayernumber()-1).isOutput()) data[3] = maxlayers;\n\t\t\t\t\t\telse data[3] = g.getConnection().getLayernumber();\n\t\t\t\t\t\tdata[4] = g.getWeight();\n\t\t\t\t\t\tgeneIdentities2.add(data);\n\t\t\t\t\t}\n\t\t\t\t}\t\t\n\t\t}\n\t\t//if two genes connect the same neuron, it averages the weights of them and removes one leaving the other with the average weight\n\t\tfor (double[] nums : geneIdentities){\n\t\t\tfor (int i = 0; i < geneIdentities2.size(); i++){\n\t\t\t\tdouble[] nums2 = geneIdentities2.get(i);\n\t\t\t\tif (nums[0] == nums2[0] && nums[1] == nums2[1] && nums[2] == nums2[2] && nums[3] == nums2[3]){\n\t\t\t\t\tnums[4] = (nums[4] + nums2[4])/2;\n\t\t\t\t\tgeneIdentities2.remove(nums2);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//adds the new genes to the new neural network based on the gene data.\n\t\tfor(double[] nums : geneIdentities){\t\t\n\t\t\tGene newGene = new Gene(newnn.getLayers().get((int) nums[3]-1).getNeurons().get((int) nums[2]-1), nums[4]);\n\t\t\tNeuron newNeuron = newnn.getLayers().get((int) (nums[0]-1)).getNeurons().get((int) nums[1]-1);\n\t\t\tnewNeuron.AddGenes(newGene);\n\t\t\tnewGene.setInput(newNeuron);\t\t\t\n\t\t}\n\t\tfor(double[] nums : geneIdentities2){\t\t\t\n\t\t\tGene newGene = new Gene(newnn.getLayers().get((int) nums[3]-1).getNeurons().get((int) nums[2]-1), nums[4]);\n\t\t\tNeuron newNeuron = newnn.getLayers().get((int) (nums[0]-1)).getNeurons().get((int) nums[1]-1);\n\t\t\tnewNeuron.AddGenes(newGene);\n\t\t\tnewGene.setInput(newNeuron);\n\t\t}\n\t\t//returns mutated bred network\n\t\treturn mutate(newnn,s);\n\t}", "public Chromosome crossover(Chromosome firstParent, Chromosome secondParent);", "public void origCrossover() {\n\n ArrayList<Integer> crossPoints;\n\n // Perform crossover with probability Defines.PROB_CROSSOVER\n if (Defines.probCrossover > Math.random()) {\n // Choose random crossover points within the chromosome\n // [TODO: consider usefulness of a crossover point that coincides with\n // group boundary. If both crossovers are group boundaries, the crossover does nothing.]\n crossPoints = new ArrayList<Integer>();\n for (int i = 0; i < Defines.crossoverPoints; i++) {\n crossPoints.add(Defines.randNum(0, Defines.chromosomeSize - 1));\n }\n } else {\n // Parents are used without crossover - no crossover points; \n crossPoints = null;\n }\n\n ChromosomeGenerator chromoGen = new ChromosomeGenerator(this.pool);\n this.offspring = new ArrayList<Chromosome>(Arrays.asList(chromoGen.generateOffspring(this.parents, crossPoints)));\n }", "public void MultipointCrossoverCAN (TableVar Variables) {\r\n int i, mom, dad, xpoint1, xpoint2;\r\n \r\n // We cross the two better individuals (the first ones)\r\n mom = 0; // Better individual\r\n dad = 1; // Second individual\r\n \r\n // Copy the individuals to cross\r\n for (i=0; i<Variables.getNVars(); i++) {\r\n Des.setCromElem (0, i, Inter.getCromElem(mom,i));\r\n Des.setCromElem (1, i, Inter.getCromElem(dad,i));\r\n }\r\n\r\n // Generation of the two points for the crossover\r\n xpoint1 = Randomize.Randint (0,(Variables.getNVars()-1));\r\n if (xpoint1!=Variables.getNVars()-1)\r\n xpoint2 = Randomize.Randint ((xpoint1+1),(Variables.getNVars()-1));\r\n else\r\n xpoint2 = Variables.getNVars()-1;\r\n\r\n // Cross the parts between both points\r\n for (i=xpoint1;i<=xpoint2;i++) {\r\n Des.setCromElem(mom, i, Inter.getCromElem(dad,i));\r\n Des.setCromElem(dad, i, Inter.getCromElem(mom,i));\r\n }\r\n\r\n // New individuals are not evaluated\r\n Des.setIndivEvaluated (mom, false);\r\n Des.setIndivEvaluated (dad, false);\r\n \r\n }", "private void crossover() {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < pop_size; i++) { // go through population\r\n\r\n int a = new Random().nextInt(this.pop_size);\r\n int b = new Random().nextInt(this.pop_size);\r\n\r\n int split_point = new Random().nextInt(this.gene_size);\r\n\r\n float[] p1_genes = this.parent_population.getPopulation()[a].getGenes();\r\n float[] p2_genes = this.parent_population.getPopulation()[b].getGenes();\r\n\r\n float[] c1_genes = new float[gene_size];\r\n float[] c2_genes = new float[gene_size];\r\n\r\n for (int j = 0; j < gene_size; j++) {\r\n\r\n if (j < split_point) {\r\n c1_genes[j] = p1_genes[j];\r\n c2_genes[j] = p2_genes[j];\r\n } else {\r\n c2_genes[j] = p1_genes[j];\r\n c1_genes[j] = p2_genes[j];\r\n }\r\n }\r\n individual child1 = new individual(c1_genes, solutions, output);\r\n individual child2 = new individual(c2_genes, solutions, output);\r\n\r\n if (child1.getFitness() > child2.getFitness()) {\r\n temp_pop[i] = child1;\r\n } else {\r\n temp_pop[i] = child2;\r\n }\r\n }\r\n this.offspring_population.setPopulation(temp_pop);\r\n this.offspring_population.update_population();\r\n }", "public interface WedgeProcessor {\n /**\n * A wedge processor's test method accepts two edge chains A=(a0,a1,a2) and B=(b0,b1,b2) where\n * a1==b1, and returns either -1, 0, or 1 to indicate the relationship between the region to the\n * left of A and the region to the left of B.\n */\n int test(S2Point a0, S2Point ab1, S2Point a2, S2Point b0, S2Point b2);\n }", "public void crossoverOX() {\n\n // [TODO: consider usefulness of a crossover point that coincides with\n // group boundary. If both crossovers are group boundaries, the crossover does nothing.]\n ArrayList<Integer> crossPoints = getCrossoverPoints(Defines.cpMode);\n\n Collections.sort(crossPoints);\n\n ChromosomeGenerator chromoGen = new ChromosomeGenerator(this.pool);\n\n this.offspring = new ArrayList<Chromosome>(Arrays.asList(chromoGen.generateOffspringOX(this.parents, crossPoints)));\n\n }", "public void doMutation(double probability, Solution offsbring) throws JMException {\r\n\t\r\n\t\r\n\t\t \r\n\t\t try {\r\n\t\t \t//System.out.println(offsbring.get);\r\n\t\t int chrmosomesize= offsbring.getCompositionService().size();\r\n\t\t //int random = PseudoRandom.randInt()%chrmosomesize;\r\n\t\t int random = PseudoRandom.randInt()%chrmosomesize;\r\n\t\t if (random<probability){\r\n\t\t \t System.out.println(\" classs \"+offsbring.getCompositionService().get(random).getServiceClass());//getSeviceClass();\r\n\t\t\t \r\n\t\t \t String Sclass=(String) offsbring.getCompositionService().get(random).getServiceClass();//getSeviceClass();\r\n\t\t \r\n\t\t for (int i=0; i<z.ServicePool.size();i++){\r\n\t// if (z.ServicePool.get(i).getServiceFunctionality().equalsIgnoreCase(Sclass))\r\n\t\t \t if (z.ServicePool.get(i).getServiceClass().equalsIgnoreCase(Sclass))\r\n\t\t\tRequiredClass.add(z.ServicePool.get(i));\r\n\t\t }\r\n\t\t // z.ServicePool.get(9).\r\n\t\tint random2 = (PseudoRandom.randInt())%(RequiredClass.size());\r\n\t\toffsbring.getCompositionService().set(random,RequiredClass.get(random2));\r\n\t\t \t\t\r\n\t\t\r\n\t\toffsbring.getCompositionService().set(random,RequiredClass.get(random2));\t\t \t \r\n\t\t \r\n\t\t }\r\n\t\t } catch (ClassCastException e1) {\r\n\t\t Configuration.logger_.severe(\"SinglePointCrossover.doCrossover: Cannot perfom \" +\r\n\t\t \"SinglePointCrossover\");\r\n\t\t Class cls = java.lang.String.class;\r\n\t\t String name = cls.getName();\r\n\t\t throw new JMException(\"Exception in \" + name + \".doCrossover()\");\r\n\t\t }\r\n\t\t \r\n\t\t \r\n\t\t }", "public void MultipointCrossoverDNF (TableVar Variables) {\r\n int i, j, mom, dad, xpoint1, xpoint2;\r\n\r\n // We cross the two better individuals (the first ones)\r\n mom = 0; // Better individual\r\n dad = 1; // Second individual\r\n\r\n // Copy the individuals to cross\r\n for (i=0; i<Variables.getNVars(); i++) {\r\n for (j=0; j<=Variables.getNLabelVar(i); j++) {\r\n Des.setCromElemGene(0, i, j, Inter.getCromElemGene(mom,i, j));\r\n Des.setCromElemGene (1, i, j, Inter.getCromElemGene(dad,i, j));\r\n }\r\n }\r\n\r\n // Generation of the two points for the crossover\r\n xpoint1 = Randomize.Randint (0,(Variables.getNVars()-1));\r\n if (xpoint1!=Variables.getNVars()-1)\r\n xpoint2 = Randomize.Randint ((xpoint1+1),(Variables.getNVars()-1));\r\n else\r\n xpoint2 = Variables.getNVars()-1;\r\n\r\n // Cross the parts between both points\r\n for (i=xpoint1;i<=xpoint2;i++) {\r\n for (j=0; j<=Variables.getNLabelVar(i); j++) {\r\n Des.setCromElemGene(mom, i, j, Inter.getCromElemGene(dad,i,j));\r\n Des.setCromElemGene(dad, i, j, Inter.getCromElemGene(mom,i,j));\r\n }\r\n }\r\n\r\n // New individuals are not evaluated\r\n Des.setIndivEvaluated (mom, false);\r\n Des.setIndivEvaluated (dad, false);\r\n\r\n }", "public Object execute(Object object) throws JMException {\n\t\tSolution[] parents = (Solution[]) object;\n\n\t\tif (!(VALID_TYPES.contains(parents[0].getType().getClass()) && VALID_TYPES\n\t\t\t\t.contains(parents[1].getType().getClass()))) {\n\n\t\t\tConfiguration.logger_\n\t\t\t\t\t.severe(\"SinglePointCrossover.execute: the solutions \"\n\t\t\t\t\t\t\t+ \"are not of the right type. The type should be 'Binary' or 'Int', but \"\n\t\t\t\t\t\t\t+ parents[0].getType() + \" and \"\n\t\t\t\t\t\t\t+ parents[1].getType() + \" are obtained\");\n\n\t\t\tClass cls = java.lang.String.class;\n\t\t\tString name = cls.getName();\n\t\t\tthrow new JMException(\"Exception in \" + name + \".execute()\");\n\t\t} // if\n\n\t\tif (parents.length < 2) {\n\t\t\tConfiguration.logger_\n\t\t\t\t\t.severe(\"SinglePointCrossover.execute: operator \"\n\t\t\t\t\t\t\t+ \"needs two parents\");\n\t\t\tClass cls = java.lang.String.class;\n\t\t\tString name = cls.getName();\n\t\t\tthrow new JMException(\"Exception in \" + name + \".execute()\");\n\t\t}\n\n\t\tSolution[] offSpring;\n\t\toffSpring = doCrossover(singlePointCrossoverProbability_, parents[0], parents[1]);\n\n\t\t// -> Update the offSpring solutions\n\t\tfor (int i = 0; i < offSpring.length; i++) {\n\t\t\toffSpring[i].setCrowdingDistance(0.0);\n\t\t\toffSpring[i].setRank(0);\n\t\t}\n\t\treturn offSpring;\n\t}", "public void crossover(){\n \t\n \t//int cut2 = ((NODELENGTH * 3 + 1) / 3) + cut;\n \tfor (int g = 0; g < (wallpapers.size() - 1); g += 2){\n \t\tint cut = getCutPoint();\n \t\tint[] parent1 = wallpapers.get(g);\n \t\tint[] parent2 = wallpapers.get(g + 1);\n \t\t\n \t\tint[] child1 = new int[parent1.length];\n \t\tint[] child2 = new int[parent2.length];\n \t\tfor (int i = 0; i < (cut); i++){\n \t\t\tchild1[i] = parent1[i];\n \t\t\tchild2[i] = parent2[i];\n \t\t}\n \t\tfor (int j = cut; j < parent1.length; j++){\n \t\t\tchild1[j] = parent2[j];\n \t\t\tchild2[j] = parent1[j];\n \t\t}\n \t\t\n \t\t\n \t\twallpapers.set(g, child1);\n \t\twallpapers.set(g + 1, child2);\n \t}\n \tfor (int d = 0; d < (wallpapers.size() * 2); d++){\n \t\tif (d < wallpapers.size()){\n \t\t\ttemp_wallpapers.add(wallpapers.get(d));\n \t\t}\n \t\telse {\n \t\t\ttemp_wallpapers.add(node());\n \t\t}\n \t}\n \twallpapers.clear();\n \tfor (int u = 0; u < temp_wallpapers.size(); u++){\n\t\t\twallpapers.add(u, temp_wallpapers.get(u));\n\t\t}\n \ttemp_wallpapers.clear();\n }", "public abstract void crossoverWith(LevelRepresentation levelRepresentation);", "public interface MonogamousCrossover {\r\n\r\n\tpublic Embryo mate(Individual mother, Individual father);\r\n}", "private void crossover(Chromosome c1, Chromosome c2){\n int split = (int)(Math.random()*c1.getNumWeights());\n \n double[][] m1 = c1.getGeneData();\n double[][] m2 = c2.getGeneData();\n double store;\n \n //Begin the switch\n for(int r=0; r<m1.length; r++){\n //Stop spliting\n if(split <= 0){\n break;\n }\n for(int c=0; c<m1[r].length;c++){\n store = m1[r][c];\n m1[r][c] = m2[r][c];\n m2[r][c] = store;\n split--;\n //Stop spliting\n if(split <= 0){\n break;\n }\n }\n }\n }", "private void crossProduct() {\n BaseCandidateElement[] it = o.inputObject.firstStageCandidates.values().toArray(new BaseCandidateElement[0]);\n // logger.info(Arrays.toString(it));\n for (int i = 0; i < it.length; i++) {\n for (int j = i + 1; j < it.length; j++) {\n if (PrecisConfigProperties.HIERARCHY_DIMS_ENABLED && hierarchyDimsNegation.checkIfBelongToSameHierarchyGroup(it[i], it[j]))\n continue;\n if (it[i].xor(it[j]).cardinality() == 4) {\n BitSet b = it[i].or(it[j]);\n o.inputObject.addCandidate(b);\n }\n }\n }\n }", "IVec3 cross(IVec3 v);", "public void setCrossoverMethod(Crossover c){\n crossType = c;\n }", "public List<Chromosome> doCrossover(Chromosome other, String crossoverType){\n int geneSize = this.knapsackSelection.size();\n\n ArrayList<Chromosome> children = new ArrayList<>();\n\n //Allow for multiple crossover attempts to better the chance of a valid crossover.\n //Note that this can be disabled by setting GAConfiguration.CONCEPTION_ATTEMPTS = 1.\n for(int i = 0; i < PopulationConfiguration.CONCEPTION_ATTEMPTS; i++){\n\n //Set first crossover point to 0 if 1PX Crossover.\n int crossPoint1 = crossoverType.equals(\"1PX\") ? 0 : Configuration.RANDOM_GENERATOR.nextInt(geneSize);\n int crossPoint2 = Configuration.RANDOM_GENERATOR.nextInt(geneSize - crossPoint1) + crossPoint1;\n\n ArrayList<Boolean> c1 = new ArrayList<>();\n ArrayList<Boolean> c2 = new ArrayList<>();\n\n c1.addAll(this.knapsackSelection.subList(0, crossPoint1));\n c1.addAll(other.getKnapsackSelection().subList(crossPoint1, crossPoint2));\n c1.addAll(this.knapsackSelection.subList(crossPoint2, geneSize));\n Chromosome child1 = new Chromosome(c1).withFitnessCalculated();\n\n c2.addAll(other.getKnapsackSelection().subList(0, crossPoint1));\n c2.addAll(this.knapsackSelection.subList(crossPoint1, crossPoint2));\n c2.addAll(other.getKnapsackSelection().subList(crossPoint2, geneSize));\n Chromosome child2 = new Chromosome(c2).withFitnessCalculated();\n \n if(child1.isValid() && children.size() < 2){\n children.add(child1);\n }\n if(child2.isValid() && children.size() < 2){\n children.add(child2);\n }\n if(children.size() == 2){\n break;\n }\n }\n //If the crossover failed to generate a valid child, return the parents.\n if(children.size() == 0){\n children.add(other);\n children.add(this);\n }\n else if(children.size() == 1){\n children.add(this);\n }\n return children;\n }", "public void WorkloadBasedOnlineCostOptimizationWithDoubleCopy() {\n\t\t\n\t \tinitialParameters();\n\t\tint inputObjectsNumber=0;\n\t\tint indexJ=0;\n\t\t\n\t\tint keepTime=0;// This variable indicates how long an object is stayed in the hot-tier\n\t\tint currentTime=0; // This variable indicates the passing time in the simulation\n\t\t\n\t for (int slot = 0; slot < workloadGenerator.numberObjectsPerSlot.length; slot++) {\n\t\tinputObjectsNumber=inputObjectsNumber+workloadGenerator.numberObjectsPerSlot[slot];\n\t\t\n\t\tfor (int j = indexJ; j < inputObjectsNumber; j++) {\n\t\t\t\n\t\t\tfor (int t=0; t<T; t++ ){\n\t\t\t\t\n\t\t\t\tcurrentTime=t;\n\t\t\t\tif(existRequest(j, t)){\n\t\t\t\t\tbreakPointEvaluation(j, t);\n\t\t\t\t\talphaCalculation();\n\t\t\t\t\t\n\t\t\t\t\tif(finalLocation[j][t]==1){\n\t\t\t\t\t\n\t\t\t\t\t for (keepTime = currentTime; keepTime < currentTime+alpha*(breakPoint); keepTime++) {\n\t\t\t\t\t\t finalLocation[j][t]=1;\n\t\t\t\t\t }\n\t\t\t\t\t}else if(residentialLatencyCost(j, t, 0).compareTo(residentialLatencyCost(j, t,1).add(totalCostCalculation.btotalMigrationCost[t][j][0][1]))==1){\n\t\t\t\t\t\tfinalLocation[j][t]=1;\n\t\t\t\t\t}\n\t\t\t\t}// FIRST IF\n\t\t\t} \t\n\t\t}//For t\n\t\tindexJ=inputObjectsNumber;\n\t }//slot\n\t \n\t /*\n\t for (int obj = 0; obj < finalLocation.length; obj++) {\n\t\t for (int time = 0; time < finalLocation[obj].length; time++) {\n\t\t System.out.print(finalLocation[obj][time]+\" \");\n\t\t \n\t\t \n\t\t }\n\t }\n\t */\n\t \n}", "public interface InterTripleCut {\n\tvoid tripleCut();\n}", "public void solveUsingVogelApproximationMethod() {\n this.solution = new Solution();\n\n Source[] proxySources = Arrays.copyOf(sources, sources.length);\n Destination[] proxyDestinations = Arrays.copyOf(destinations, destinations.length);\n int[][] matrix = new int[costs.length][costs[0].length];\n\n List<Integer> rows = new ArrayList<Integer>();\n List<Integer> columns = new ArrayList<Integer>();\n\n while ( rows.size() != proxySources.length && columns.size() != proxyDestinations.length ) {\n int[] penaltyRow = new int[proxyDestinations.length];\n int[] penaltyColumn = new int[proxySources.length];\n\n int firstTwo = 2;\n int firstValue = 0, secondValue = 0;\n for (int i = 0; i < proxySources.length; i++) {\n if (!rows.contains(i)) {\n for (int j = 0; j < proxyDestinations.length; j++) {\n if (!columns.contains(j)) {\n if (firstTwo == 2) {\n firstValue = costs[i][j];\n firstTwo--;\n } else if (firstTwo == 1) {\n secondValue = costs[i][j];\n firstTwo--;\n } else if (firstTwo == 0) {\n if (costs[i][j] < firstValue || costs[i][j] < secondValue) {\n if (firstValue < secondValue) secondValue = costs[i][j];\n else firstValue = costs[i][j];\n }\n }\n }\n }\n penaltyColumn[i] = Math.abs(firstValue - secondValue);\n firstTwo = 2;\n }\n }\n\n firstTwo = 2;\n\n for (int j = 0; j < proxySources.length; j++) {\n if (!columns.contains(j)) {\n for (int i = 0; i < proxyDestinations.length; i++) {\n if (!rows.contains(i)) {\n if (firstTwo == 2) {\n firstValue = costs[i][j];\n firstTwo--;\n } else if (firstTwo == 1) {\n secondValue = costs[i][j];\n firstTwo--;\n } else if (firstTwo == 0) {\n if (costs[i][j] < firstValue || costs[i][j] < secondValue) {\n if (firstValue < secondValue) secondValue = costs[i][j];\n else firstValue = costs[i][j];\n }\n }\n }\n\n }\n penaltyRow[j] = Math.abs(firstValue - secondValue);\n firstTwo = 2;\n }\n }\n\n int maxI = 0;\n for(int j=0;j<proxyDestinations.length;j++) {\n if(penaltyRow[j] > penaltyRow[maxI]) maxI = j;\n }\n\n int maxJ = 0;\n for(int i=0;i<proxySources.length;i++) {\n if(penaltyColumn[i] > penaltyColumn[maxJ]) maxJ = i;\n }\n\n if( penaltyRow[maxI] > penaltyColumn[maxJ] )\n {\n int indexJ = maxI;\n\n int finalIndexI = 0;\n int finalIndexJ = 0;\n int value = 100000;\n for(int i=0;i<proxySources.length;i++) {\n if(!rows.contains(i)) {\n if(costs[i][indexJ] < value) {\n value = costs[i][indexJ];\n finalIndexI = i;\n finalIndexJ = indexJ;\n }\n else if( costs[i][indexJ] == value ) {\n if( Math.min(proxySources[i].getSupply(),proxyDestinations[indexJ].getDemand()) > Math.min(proxySources[finalIndexI].getSupply(),proxyDestinations[finalIndexJ].getDemand()) ) {\n value = costs[i][indexJ];\n finalIndexI = i;\n finalIndexJ = indexJ;\n }\n }\n }\n }\n\n int supply = proxySources[finalIndexI].getSupply();\n int demand = proxyDestinations[finalIndexJ].getDemand();\n\n\n this.solution.add(sources[finalIndexI], destinations[finalIndexJ], Math.min(supply,demand), costs[finalIndexI][finalIndexJ]);\n\n if ( supply < demand ) {\n proxySources[finalIndexI].setSupply(0);\n proxyDestinations[finalIndexJ].setDemand(demand - supply);\n rows.add(finalIndexI);\n }\n else if( supply > demand ) {\n proxySources[finalIndexI].setSupply(supply-demand);\n proxyDestinations[finalIndexJ].setDemand(0);\n columns.add(finalIndexJ);\n }\n else {\n proxySources[finalIndexI].setSupply(0);\n proxyDestinations[finalIndexJ].setDemand(0);\n rows.add(finalIndexI);\n columns.add(finalIndexJ);\n }\n }\n else {\n int indexI = maxJ;\n\n int finalIndexI = 0;\n int finalIndexJ = 0;\n int value = 100000;\n for(int j=0;j<proxyDestinations.length;j++) {\n if(!columns.contains(j)) {\n if(costs[indexI][j] < value) {\n value = costs[indexI][j];\n finalIndexI = indexI;\n finalIndexJ = j;\n }\n else if( costs[indexI][j] == value ) {\n if( Math.min(proxySources[indexI].getSupply(),proxyDestinations[j].getDemand()) > Math.min(proxySources[finalIndexI].getSupply(),proxyDestinations[finalIndexJ].getDemand()) ) {\n value = costs[indexI][j];\n finalIndexI = indexI;\n finalIndexJ = j;\n }\n }\n }\n }\n\n int supply = proxySources[finalIndexI].getSupply();\n int demand = proxyDestinations[finalIndexJ].getDemand();\n\n\n this.solution.add(sources[finalIndexI], destinations[finalIndexJ], Math.min(supply,demand), costs[finalIndexI][finalIndexJ]);\n\n if ( supply < demand ) {\n proxySources[finalIndexI].setSupply(0);\n proxyDestinations[finalIndexJ].setDemand(demand - supply);\n rows.add(finalIndexI);\n }\n else if( supply > demand ) {\n proxySources[finalIndexI].setSupply(supply-demand);\n proxyDestinations[finalIndexJ].setDemand(0);\n columns.add(finalIndexJ);\n }\n else {\n proxySources[finalIndexI].setSupply(0);\n proxyDestinations[finalIndexJ].setDemand(0);\n rows.add(finalIndexI);\n columns.add(finalIndexJ);\n }\n }\n }\n this.solution.showSolution();\n }", "public void crossover() {\n\n // Perform crossover with probability Defines.PROB_CROSSOVER\n if (Defines.probCrossover > Math.random()) {\n this.crossoverOX();\n } else {\n // randomly select one of the parents to copy without crossover\n int idx = Defines.randNum(0, this.parents.size() - 1);\n Chromosome newChild = this.parents.get(idx);\n this.offspring = new ArrayList<Chromosome>();\n this.offspring.add(newChild);\n }\n }", "Tour crossOver(Tour p2, int x1, int x2) {\r\n\t\t// make an empty tour and then fill it in\r\n\t\tTour child = new Tour();\r\n\r\n\t\t// copy the 1st segment of (this) to the child\r\n\t\tfor (int i = 0; i < x1; i++) {\r\n\t\t child.index[i] = this.index[i];\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i = x1; i <= x2; i++) {\r\n\t\t child.index[i] = p2.index[i];\r\n\t\t}\r\n\t\t// copy the cross-over portion of p2 to the child\r\n\t\t\r\n for (int i = x2 + 1; i < index.length; i++) {\r\n child.index[i] = this.index[i];\r\n }\t\t\r\n\t\t// copy the last segment of (this) to the child\r\n\r\n\t\t// Now we need to correct the child for any duplicate cities\r\n\t\t\r\n\t\t// First find out the unique elements of the cross-over segment\r\n\t\t// i.e., those elements of the cross-over segment of\r\n\t\t// p1 that are not in p2\r\n\t\tint[] uniq = new int[x2 - x1 + 1];\r\n\t\tint k = 0;\r\n\t\tboolean found = false;\r\n for (int i = x1; i <= x2; i++) {\r\n for (int j = x1; j <= x2; j++) {\r\n if (this.index[i] == p2.index[j]) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n if (found) {\r\n found = false;\r\n continue;\r\n }\r\n uniq[k] = this.index[i];\r\n k++;\r\n }\r\n System.out.println();\r\n\t\t// *** TODO ***\r\n \r\n k--;\r\n found = false;\r\n for (int i = x1; i <= x2; i++) {\r\n for (int j = 0; j < x1; j++) {\r\n if (child.index[i] == child.index[j]) {\r\n child.index[i] = uniq[k];\r\n k--;\r\n found = true;\r\n break;\r\n }\r\n }\r\n \r\n if (found) {\r\n found = false;\r\n continue;\r\n }\r\n \r\n for (int j = x2 + 1; j < index.length; j++) {\r\n if (child.index[i] == child.index[j]) {\r\n child.index[i] = uniq[k];\r\n k--;\r\n break;\r\n }\r\n }\r\n }\r\n\t\t// scan the two portions of p1 that have been crossed into the\r\n\t\t// the child for any duplicates in the crossed-over \r\n\t\t// segment and if so replace with an element from the uniq list\r\n\t\t\r\n\t\tchild.distance = child.distance();\r\n\t\treturn child;\r\n\t}", "public void generateOffspringPopulation() throws JMException{\n\n offspringPopulation_ = new SolutionSet[problemSet_.size()];\n\n for (int task = 0; task < problemSet_.size(); task++){\n offspringPopulation_[task] = new SolutionSet(populationSize_);\n if (crossover_.getClass() == SBXCrossover.class){\n Solution[] parents = new Solution[2];\n for (int i = 0; i < (populationSize_); i++) {\n // obtain parents\n parents = (Solution[]) selection_.execute(population_[task]);\n\n Solution[] offSpring = (Solution[]) crossover_\n .execute(parents);\n mutation_.execute(offSpring[0]);\n problemSet_.get(task).evaluate(offSpring[0]);\n problemSet_.get(task).evaluateConstraints(offSpring[0]);\n offspringPopulation_[task].add(offSpring[0]);\n } // for\n }\n else if (crossover_.getClass() == EGG.class){\n\n int[] permutation = new int[populationSize_];\n Utils.randomPermutation(permutation, populationSize_);\n etmo.util.Ranking ranking = new etmo.util.Ranking(population_[task]);\n SolutionSet front = ranking.getSubfront(0);\n\n front.Suppress();\n SolutionSet KP = null;\n if(front.size()> problemSet_.get(task).getNumberOfObjectives())\n KP = findingKneePoint(front, task);\n if(KP == null){\n KP = population_[task];\n }\n\n for (int i = 0; i < (populationSize_); i++) {\n // obtain parents\n int n = permutation[i];\n // STEP 2.1. Mating selection\n int r1,r2;\n r1 = PseudoRandom.randInt(0, KP.size() - 1);\n do {\n r2 = PseudoRandom.randInt(0, KP.size() - 1);\n } while (r2==r1);\n // STEP 2.2. Reproduction\n Solution child;\n Solution[] parents = new Solution[3];\n\n// 加入迁移:\n double tranRand = PseudoRandom.randDouble();\n if (tranRand <= 0.1){\n parents[1] = population_[PseudoRandom.randInt(0, problemSet_.size() - 1)].get(PseudoRandom.randInt(0, populationSize_ - 1));\n parents[2] = population_[PseudoRandom.randInt(0, problemSet_.size() - 1)].get(PseudoRandom.randInt(0, populationSize_ - 1));\n parents[0] = population_[task].get(n);\n child = (Solution) crossover_.execute(parents);\n\n mutation_.execute(child);\n\n problemSet_.get(task).evaluate(child);\n problemSet_.get(task).evaluateConstraints(child);\n offspringPopulation_[task].add(child);\n }\n\n\n\n else {\n parents[1] = KP.get(r1);\n parents[2] = KP.get(r2);\n parents[0] = population_[task].get(n);\n child = (Solution) crossover_.execute(parents);\n\n mutation_.execute(child);\n\n problemSet_.get(task).evaluate(child);\n problemSet_.get(task).evaluateConstraints(child);\n offspringPopulation_[task].add(child);\n }\n\n\n } // for\n }\n\n }\n\n\n\n\n }", "public List<Individual> crossover2Point2(Individual parent1, Individual parent2) {\n List <Individual> listOffsprings = new ArrayList<Individual>();\n Individual offspring1 = new Individual(parent1.getChromosomeLength());\n Individual offspring2 = new Individual(parent1.getChromosomeLength());\n int crossoverPoint1 = Service.rand(0, parent1.getChromosomeLength()-1);\n int crossoverPoint2 = Service.rand(crossoverPoint1 + 1, crossoverPoint1 + parent1.getChromosomeLength() - 1);\n\n for(int geneIndex = 0; geneIndex < parent1.getChromosomeLength(); geneIndex++) {\n if (crossoverPoint2 >= parent1.getChromosomeLength()) {\n if(geneIndex >= crossoverPoint1 || geneIndex < (crossoverPoint2 - parent1.getChromosomeLength())) {\n offspring1.setGene(geneIndex, parent2.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent1.getGene(geneIndex ));\n } else {\n offspring1.setGene(geneIndex, parent1.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent2.getGene(geneIndex ));\n }\n }else {\n if(geneIndex >= crossoverPoint1 && geneIndex < crossoverPoint2) {\n offspring1.setGene(geneIndex, parent2.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent1.getGene(geneIndex ));\n } else {\n offspring1.setGene(geneIndex, parent1.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent2.getGene(geneIndex ));\n }\n }\n }\n listOffsprings.add(offspring1);\n listOffsprings.add(offspring2);\n return listOffsprings;\n }", "public int getCrossoverPoints() {\n\t\treturn 1;\r\n\t}", "public static void setCrossoverProbability(double value) { crossoverProbability = value; }", "public void simulatedBinaryCrossover(MersenneTwisterFast random, TraceableFloatVectorIndividual other, float eta_c)\n {\n final double EPS = FloatVectorSpecies.SIMULATED_BINARY_CROSSOVER_EPS;\n FloatVectorSpecies s = (FloatVectorSpecies) species;\n TraceableFloat[] parent1 = genome;\n TraceableFloat[] parent2 = other.genome;\n // double[] min_realvar = s.minGenes;\n // double[] max_realvar = s.maxGenes;\n \n \n double y1, y2, yl, yu;\n double c1, c2;\n double alpha, beta, betaq;\n double rand;\n \n for(int i = 0; i < parent1.length; i++)\n {\n if (random.nextBoolean()) // 0.5f\n {\n if (Math.abs(parent1[i].getValue() - parent2[i].getValue()) > EPS)\n {\n if (parent1[i].getValue() < parent2[i].getValue())\n {\n y1 = parent1[i].getValue();\n y2 = parent2[i].getValue();\n }\n else\n {\n y1 = parent2[i].getValue();\n y2 = parent1[i].getValue();\n }\n yl = s.minGene(i); //min_realvar[i];\n yu = s.maxGene(i); //max_realvar[i]; \n rand = random.nextFloat();\n beta = 1.0 + (2.0*(y1-yl)/(y2-y1));\n alpha = 2.0 - Math.pow(beta,-(eta_c+1.0));\n if (rand <= (1.0/alpha))\n {\n betaq = Math.pow((rand*alpha),(1.0/(eta_c+1.0)));\n }\n else\n {\n betaq = Math.pow((1.0/(2.0 - rand*alpha)),(1.0/(eta_c+1.0)));\n }\n c1 = 0.5*((y1+y2)-betaq*(y2-y1));\n beta = 1.0 + (2.0*(yu-y2)/(y2-y1));\n alpha = 2.0 - Math.pow(beta,-(eta_c+1.0));\n if (rand <= (1.0/alpha))\n {\n betaq = Math.pow((rand*alpha),(1.0/(eta_c+1.0)));\n }\n else\n {\n betaq = Math.pow((1.0/(2.0 - rand*alpha)),(1.0/(eta_c+1.0)));\n }\n c2 = 0.5*((y1+y2)+betaq*(y2-y1));\n if (c1<yl)\n c1=yl;\n if (c2<yl)\n c2=yl;\n if (c1>yu)\n c1=yu;\n if (c2>yu)\n c2=yu;\n if (random.nextBoolean())\n {\n parent1[i] = this.recombineGenes(parent1[i], parent2[i], (float) c2);\n parent2[i] = this.recombineGenes(parent2[i], parent1[i], (float) c1);\n }\n else\n {\n parent1[i] = this.recombineGenes(parent1[i], parent2[i], (float) c2);\n parent2[i] = this.recombineGenes(parent2[i], parent1[i], (float) c1);\n }\n }\n else\n {\n // do nothing\n }\n }\n else\n {\n // do nothing\n }\n }\n }", "public static double getCrossoverProbability() { return crossoverProbability; }", "public void crossEdge(Edge e) {}", "private void mate(NeuralPlayer org1, NeuralPlayer org2, NeuralPlayer offspring)\n\t{\n\t\tBasicNetwork newGuy = (BasicNetwork)org1.net.clone();\n\t\tRandom g = new Random();\n\t\tdouble[] genome1 = NetworkCODEC.networkToArray(org1.net);\n\t\tdouble[] genome2 = NetworkCODEC.networkToArray(org2.net);\n\t\t\n\t\tint numCrosses = 1;//g.nextInt(20)+2;//g.nextInt(genome1.length/4)+1;\n\t\tfor (int j = 0; j< numCrosses; j++)\n\t\t{\n\t\t\tint crossIndex = g.nextInt(genome1.length);\n\t\t\t//int crossLength = g.nextInt(genome1.length)+1;//g.nextInt(50);\n\t\t\t//int stop = Math.min(crossIndex+crossLength,genome1.length);\n\t\t\tfor (int i = crossIndex; i<genome1.length; i++)\n\t\t\t\tgenome2[i] = genome1[i]; // 1 point crossover\n\t\t}\n\t\tNetworkCODEC.arrayToNetwork(genome2, newGuy);\n\t\toffspring.net = newGuy;\n\t}", "@Test\n public void tr2()\n {\n Graph graph = new Graph(2);\n Set<Integer> sources = new TreeSet<Integer>();\n Set<Integer> targets = new TreeSet<Integer>();\n sources.add(0);\n targets.add(1);\n graph.addEdge(0,1);\n assertTrue(graph.reachable(sources, targets));\n\n\n }", "@Test\n\tpublic void testResourcesForChainedOperators() throws Exception {\n\t\tResourceSpec resource1 = new ResourceSpec(0.1, 100);\n\t\tResourceSpec resource2 = new ResourceSpec(0.2, 200);\n\t\tResourceSpec resource3 = new ResourceSpec(0.3, 300);\n\t\tResourceSpec resource4 = new ResourceSpec(0.4, 400);\n\t\tResourceSpec resource5 = new ResourceSpec(0.5, 500);\n\t\tResourceSpec resource6 = new ResourceSpec(0.6, 600);\n\t\tResourceSpec resource7 = new ResourceSpec(0.7, 700);\n\n\t\tMethod opMethod = Operator.class.getDeclaredMethod(\"setResources\", ResourceSpec.class);\n\t\topMethod.setAccessible(true);\n\n\t\tMethod sinkMethod = DataSink.class.getDeclaredMethod(\"setResources\", ResourceSpec.class);\n\t\tsinkMethod.setAccessible(true);\n\n\t\tMapFunction<Long, Long> mapFunction = new MapFunction<Long, Long>() {\n\t\t\t@Override\n\t\t\tpublic Long map(Long value) throws Exception {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t};\n\n\t\tFilterFunction<Long> filterFunction = new FilterFunction<Long>() {\n\t\t\t@Override\n\t\t\tpublic boolean filter(Long value) throws Exception {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\n\t\tExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n\n\t\tDataSet<Long> input = env.fromElements(1L, 2L, 3L);\n\t\topMethod.invoke(input, resource1);\n\n\t\tDataSet<Long> map1 = input.map(mapFunction);\n\t\topMethod.invoke(map1, resource2);\n\n\t\t// CHAIN(Source -> Map -> Filter)\n\t\tDataSet<Long> filter1 = map1.filter(filterFunction);\n\t\topMethod.invoke(filter1, resource3);\n\n\t\tIterativeDataSet<Long> startOfIteration = filter1.iterate(10);\n\t\topMethod.invoke(startOfIteration, resource4);\n\n\t\tDataSet<Long> map2 = startOfIteration.map(mapFunction);\n\t\topMethod.invoke(map2, resource5);\n\n\t\t// CHAIN(Map -> Filter)\n\t\tDataSet<Long> feedback = map2.filter(filterFunction);\n\t\topMethod.invoke(feedback, resource6);\n\n\t\tDataSink<Long> sink = startOfIteration.closeWith(feedback).output(new DiscardingOutputFormat<Long>());\n\t\tsinkMethod.invoke(sink, resource7);\n\n\t\tPlan plan = env.createProgramPlan();\n\t\tOptimizer pc = new Optimizer(new Configuration());\n\t\tOptimizedPlan op = pc.compile(plan);\n\n\t\tJobGraphGenerator jgg = new JobGraphGenerator();\n\t\tJobGraph jobGraph = jgg.compileJobGraph(op);\n\n\t\tJobVertex sourceMapFilterVertex = jobGraph.getVerticesSortedTopologicallyFromSources().get(0);\n\t\tJobVertex iterationHeadVertex = jobGraph.getVerticesSortedTopologicallyFromSources().get(1);\n\t\tJobVertex feedbackVertex = jobGraph.getVerticesSortedTopologicallyFromSources().get(2);\n\t\tJobVertex sinkVertex = jobGraph.getVerticesSortedTopologicallyFromSources().get(3);\n\t\tJobVertex iterationSyncVertex = jobGraph.getVerticesSortedTopologicallyFromSources().get(4);\n\n\t\tassertTrue(sourceMapFilterVertex.getMinResources().equals(resource1.merge(resource2).merge(resource3)));\n\t\tassertTrue(iterationHeadVertex.getPreferredResources().equals(resource4));\n\t\tassertTrue(feedbackVertex.getMinResources().equals(resource5.merge(resource6)));\n\t\tassertTrue(sinkVertex.getPreferredResources().equals(resource7));\n\t\tassertTrue(iterationSyncVertex.getMinResources().equals(resource4));\n\t}", "private static Set<Chromosome> crossoverPopulation(ArrayList<Chromosome> population, int populationSize, int crossoverSize) {\n\n // declare a set of chromosomes which will store all thr chromosomes generated by the crossover operation\n Set<Chromosome> crossoverChromosomes = new HashSet<>();\n\n while (crossoverChromosomes.size() < crossoverSize) {\n // retrieve a set of chromosomes (of size 2) on which crossover will occur\n // using the Rank-Based Roulette Wheel Selection method\n Set<Chromosome> selectedChromosomes = rankBasedRouletteWheelSelection(population, populationSize);\n\n // store the 2 Chromosomes in parent 1 and parent 2\n Chromosome parent1 = selectedChromosomes.iterator().next();\n selectedChromosomes.remove(parent1);\n Chromosome parent2 = selectedChromosomes.iterator().next();\n\n // perform crossover using the crossoverChromosomes method\n // the method is called twice, switching the order of the parents for the second time, since SCX produces only\n // one child, however produces a different child when the parents are switched\n crossoverChromosomes.add(crossover(parent1, parent2));\n crossoverChromosomes.add(crossover(parent2, parent1));\n }\n\n return crossoverChromosomes;\n }", "public interface Heuristic\r\n{\r\n\r\n double calcStartToGoalCost(State currentState, State goalState);\r\n}", "public GeneralSinglePointCrossoverForRes(HashMap<String, Object> parameters) {\n\t\tsuper(parameters);\n\t\tsinglePointCrossoverFavorMaximizationOfRes = new SinglePointCrossoverFavorMaximizationOfRes(\n\t\t\t\tparameters);\n\t\tsinglePointCrossoverFavorMaximizationOfPP = new SinglePointCrossoverFavorMaximizationOfPP(\n\t\t\t\tparameters);\n\t\tsinglePointCrossoverForRes = new SinglePointCrossoverForRes(parameters);\n\n\t\tif (parameters.get(\"singlePointCrossoverProbability\") != null)\n\t\t\tsinglePointCrossoverProbability_ = (Double) parameters.get(\"singlePointCrossoverProbability\");\n\t}", "public ChainOperator(){\n\n }", "@Test\r\n\tpublic final void testCross() throws GeneticProgrammingException {\r\n\t\tfinal int[] training = TestHelper.genertateTrainingDataSet(-100, 100);\r\n\t\tfinal double[] targetValues = TestHelper.calculateTargetValues(\r\n\t\t\t\t\"x*2-1/2\", training);\r\n\t\tfinal Node root = new Node(null, \"/\", null, Node.OPERATOR);\r\n\t\tfinal Tree newTree = new Tree(root, new TerminalSet(),\r\n\t\t\t\tnew FunctionalSet());\r\n\t\tfinal Node minusOperator = new Node(root, \"-\", Node.LEFT, Node.OPERATOR);\r\n\t\tnewTree.addNode(minusOperator);\r\n\t\tfinal Node multiOperator = new Node(root, \"*\", Node.RIGHT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree.addNode(multiOperator);\r\n\t\tnewTree.addNode(new Node(minusOperator, \"1\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree.addNode(new Node(minusOperator, \"3\", Node.RIGHT, Node.OPERAND));\r\n\t\tnewTree.addNode(new Node(multiOperator, \"x\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree.addNode(new Node(multiOperator, \"5\", Node.RIGHT, Node.OPERAND));\r\n\t\tassertEquals(\"Tree did not get generated corectly\", \"(1-3)/(x*5)\",\r\n\t\t\t\tnewTree.getEquation().toString());\r\n\t\tfinal Node root2 = new Node(null, \"/\", null, Node.OPERATOR);\r\n\t\tfinal Tree newTree2 = new Tree(root2, new TerminalSet(),\r\n\t\t\t\tnew FunctionalSet());\r\n\t\tfinal Node minusOperator2 = new Node(root2, \"-\", Node.LEFT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree2.addNode(minusOperator2);\r\n\t\tfinal Node multiOperator2 = new Node(root2, \"*\", Node.RIGHT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree2.addNode(multiOperator2);\r\n\t\tnewTree2\r\n\t\t\t\t.addNode(new Node(minusOperator2, \"x\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree2\r\n\t\t\t\t.addNode(new Node(minusOperator2, \"7\", Node.RIGHT, Node.OPERAND));\r\n\t\tnewTree2\r\n\t\t\t\t.addNode(new Node(multiOperator2, \"8\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree2\r\n\t\t\t\t.addNode(new Node(multiOperator2, \"9\", Node.RIGHT, Node.OPERAND));\r\n\t\tassertEquals(\"Tree did not get generated corectly\", \"(x-7)/(8*9)\",\r\n\t\t\t\tnewTree2.getEquation().toString());\r\n\r\n\t\tfinal Node root3 = new Node(null, \"/\", null, Node.OPERATOR);\r\n\t\tfinal Tree newTree3 = new Tree(root3, new TerminalSet(),\r\n\t\t\t\tnew FunctionalSet());\r\n\t\tfinal Node minusOperator3 = new Node(root3, \"-\", Node.LEFT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree3.addNode(minusOperator3);\r\n\t\tfinal Node multiOperator3 = new Node(root3, \"*\", Node.RIGHT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree3.addNode(multiOperator3);\r\n\t\tfinal Node multiOperator4 = new Node(multiOperator3, \"*\", Node.LEFT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree3.addNode(multiOperator4);\r\n\t\tfinal Node multiOperator5 = new Node(multiOperator3, \"*\", Node.RIGHT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree3.addNode(multiOperator5);\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(minusOperator3, \"x\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(minusOperator3, \"7\", Node.RIGHT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(multiOperator4, \"1\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(multiOperator4, \"2\", Node.RIGHT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(multiOperator5, \"3\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(multiOperator5, \"4\", Node.RIGHT, Node.OPERAND));\r\n\t\tassertEquals(\"Tree did not get generated corectly\",\r\n\t\t\t\t\"(x-7)/(1*2)*(3*4)\", newTree3.getEquation().toString());\r\n\t\tfinal ArrayList<Tree> newTrees = new ArrayList<Tree>();\r\n\t\tnewTrees.add(newTree3);\r\n\t\tnewTrees.add(newTree2);\r\n\t\tnewTrees.add(newTree);\r\n\t\tassertEquals(\"Tree should have a size of 3 before the cross\", 3,\r\n\t\t\t\tnewTrees.size());\r\n\t\tCrossover.cross(newTrees, 1, 100, training, targetValues);\r\n\t\tfinal Iterator<Tree> iterator = newTrees.iterator();\r\n\t\twhile (iterator.hasNext()) {\r\n\t\t\t// All five trees should be different\r\n\t\t\tfinal String firstTree = iterator.next().toString();\r\n\t\t\tassertNotSame(\"Cross should change the tree but did not 1\",\r\n\t\t\t\t\tfirstTree, iterator.next().toString());\r\n\t\t\tassertNotSame(\"Cross should change the tree but did not 2\",\r\n\t\t\t\t\tfirstTree, iterator.next().toString());\r\n\t\t\tassertNotSame(\"Cross should change the tree but did not 3\",\r\n\t\t\t\t\tfirstTree, iterator.next().toString());\r\n\t\t\tassertNotSame(\"Cross should change the tree but did not 4\",\r\n\t\t\t\t\tfirstTree, iterator.next().toString());\r\n\t\t}\r\n\t\t// should be 5 trees after the crossover\r\n\t\tassertEquals(\"Tree should have a size of 5 but was not\", 5, newTrees\r\n\t\t\t\t.size());\r\n\t}", "@Test\n public void tr3()\n {\n Graph graph = new Graph(2);\n Set<Integer> sources = new TreeSet<Integer>();\n Set<Integer> targets = new TreeSet<Integer>();\n sources.add(0);\n targets.add(1);\n graph.addEdge(1,0);\n assertFalse(graph.reachable(sources, targets));\n }", "@Test\n public void tr1()\n {\n Graph graph = new Graph(2);\n Set<Integer> sources = new TreeSet<Integer>();\n Set<Integer> targets = new TreeSet<Integer>();\n sources.add(0);\n targets.add(1);\n assertFalse(graph.reachable(sources, targets));\n }", "public void computeAllPaths(String source)\r\n {\r\n Vertex sourceVertex = network_topology.get(source);\r\n Vertex u,v;\r\n double distuv;\r\n\r\n Queue<Vertex> vertexQueue = new PriorityQueue<Vertex>();\r\n \r\n \r\n // Switch between methods and decide what to do\r\n if(routing_method.equals(\"SHP\"))\r\n {\r\n // SHP, weight of each edge is 1\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + 1;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n else if (routing_method.equals(\"SDP\"))\r\n {\r\n // SDP, weight of each edge is it's propagation delay\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + u.adjacentVertices.get(key).propDelay;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n } \r\n }\r\n }\r\n else if (routing_method.equals(\"LLP\"))\r\n {\r\n // LLP, weight each edge is activeCircuits/AvailableCircuits\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = Math.max(u.minDistance,u.adjacentGet(key).load());\r\n //System.out.println(u.adjacentGet(key).load());\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n }\r\n }\r\n }", "public static void crossover(Individual[] parent) {\n Individual[] children = new Individual[POP_SIZE];\n for (int i = 0; i < POP_SIZE; i += 2) {\n Individual child1 = new Individual(GENE_SIZE, NUM_RULES, COND_LEN);\n child1.generateRulebase();\n Individual child2 = new Individual(GENE_SIZE, NUM_RULES, COND_LEN);\n child2.generateRulebase();\n\n int crossOverPoint = new Random().nextInt(GENE_SIZE);\n for (int j = 0; j < crossOverPoint; j++) {\n child1.gene[j] = parent[i].gene[j];\n child2.gene[j] = parent[i + 1].gene[j];\n }\n\n for (int j = crossOverPoint; j < GENE_SIZE; j++) {\n child1.gene[j] = parent[i + 1].gene[j];\n child2.gene[j] = parent[i].gene[j];\n }\n\n child1.generateRulebase();\n child2.generateRulebase();\n children[i] = new Individual(child1);\n children[i + 1] = new Individual(child2);\n }\n\n matingPool = Arrays.copyOf(children, parent.length);\n }", "private Vector crossover(Individual mother, Individual father) {\n \n //don't want to do crossover on two chromosomes that are equal\n if(mother.equals(father)) {\n Vector to_return = new Vector();\n to_return.add(mother);\n to_return.add(father);\n return to_return;\n }\n \n println(\"crossover\", 1);\n int[] mom = mother.getChromosome();\n int[] dad = father.getChromosome();\n int[] child1 = new int[num_shipping_points]; \n int[] child2 = new int[num_shipping_points]; \n \n println(\"mother is\", 1);\n displayChromosome(mother, 1);\n println(\"father is\", 1);\n displayChromosome(father, 1);\n \n int breakpoint = (int)(Math.random() * num_shipping_points) + 3;\n println(\"breakpoint = \" + breakpoint, 1);\n \n int comparisons = 0;\n \n for(int i = 0; i < num_shipping_points; i++) {\n if(i < breakpoint) {\n child1[i] = mom[i];\n child2[i] = dad[i];\n }\n else {\n child1[i] = -1;\n child2[i] = -1;\n }\n } \n \n int j = breakpoint; //index on other chromosome\n\n for(int i = breakpoint; i < num_shipping_points; i++) {\n\n while(containsGene(child2, mom[j])) {\n j++;\n comparisons++;\n if(comparisons > 30) {\n println(\"leaving\", 1);\n System.exit(0);\n }\n \n if(j == num_shipping_points) {\n j = 0;\n }\n if(j == breakpoint) //not supposed to happen, but it does\n break;\n }\n child2[i] = mom[j];\n j++;\n if(j == num_shipping_points) {\n j = 0;\n }\n\n }\n \n j = breakpoint;\n comparisons = 0; \n for(int i = breakpoint; i < num_shipping_points; i++) {\n\n while(containsGene(child1, dad[j])) {\n j++;\n comparisons++;\n if(comparisons > 30) {\n println(\"leaving\", 1);\n System.exit(0);\n }\n if(j == num_shipping_points) {\n j = 0;\n }\n if(j == breakpoint)\n break;\n }\n child1[i] = dad[j];\n j++;\n if(j == num_shipping_points) {\n j = 0;\n }\n }\n \n Vector v = new Vector();\n Individual i1 = new Individual(child1, this);\n Individual i2 = new Individual(child2, this);\n //i1.setFitness(evaluateFitness(i1));\n //i2.setFitness(evaluateFitness(i1));\n v.add(i1);\n v.add(i2);\n println(\"kid1:\",1);\n displayChromosome(i1, 1);\n println(\"kid2:\", 1);\n displayChromosome(i2, 1);\n println(\"returning from crossover\",1);\n return v;\n }", "public void mover() {\n\t}", "@Test\n public void testParallelPropagationLoopBack3SitesNtoNTopologyPutFromOneDS() {\n Integer lnPort = vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));\n Integer nyPort = vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));\n Integer tkPort = vm2.invoke(() -> WANTestBase.createFirstRemoteLocator(3, lnPort));\n\n createCacheInVMs(lnPort, vm3, vm6);\n createCacheInVMs(nyPort, vm4, vm7);\n createCacheInVMs(tkPort, vm5);\n vm3.invoke(WANTestBase::createReceiver);\n vm4.invoke(WANTestBase::createReceiver);\n vm5.invoke(WANTestBase::createReceiver);\n\n // site1\n vm3.invoke(() -> WANTestBase.createSender(\"ln1\", 2, true, 100, 10, false, false, null, true));\n vm6.invoke(() -> WANTestBase.createSender(\"ln1\", 2, true, 100, 10, false, false, null, true));\n\n vm3.invoke(() -> WANTestBase.createSender(\"ln2\", 3, true, 100, 10, false, false, null, true));\n vm6.invoke(() -> WANTestBase.createSender(\"ln2\", 3, true, 100, 10, false, false, null, true));\n\n // site2\n vm4.invoke(() -> WANTestBase.createSender(\"ny1\", 1, true, 100, 10, false, false, null, true));\n vm7.invoke(() -> WANTestBase.createSender(\"ny1\", 1, true, 100, 10, false, false, null, true));\n\n vm4.invoke(() -> WANTestBase.createSender(\"ny2\", 3, true, 100, 10, false, false, null, true));\n vm7.invoke(() -> WANTestBase.createSender(\"ny2\", 3, true, 100, 10, false, false, null, true));\n\n // site3\n vm5.invoke(() -> WANTestBase.createSender(\"tk1\", 1, true, 100, 10, false, false, null, true));\n vm5.invoke(() -> WANTestBase.createSender(\"tk2\", 2, true, 100, 10, false, false, null, true));\n\n // create PR\n vm3.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln1,ln2\", 0,\n 1, isOffHeap()));\n vm6.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln1,ln2\", 0,\n 1, isOffHeap()));\n\n vm4.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny1,ny2\", 0,\n 1, isOffHeap()));\n vm7.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny1,ny2\", 0,\n 1, isOffHeap()));\n\n vm5.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"tk1,tk2\", 0,\n 1, isOffHeap()));\n\n // start all the senders\n vm3.invoke(() -> WANTestBase.startSender(\"ln1\"));\n vm3.invoke(() -> WANTestBase.startSender(\"ln2\"));\n vm6.invoke(() -> WANTestBase.startSender(\"ln1\"));\n vm6.invoke(() -> WANTestBase.startSender(\"ln2\"));\n\n vm4.invoke(() -> WANTestBase.startSender(\"ny1\"));\n vm4.invoke(() -> WANTestBase.startSender(\"ny2\"));\n vm7.invoke(() -> WANTestBase.startSender(\"ny1\"));\n vm7.invoke(() -> WANTestBase.startSender(\"ny2\"));\n\n vm5.invoke(() -> WANTestBase.startSender(\"tk1\"));\n vm5.invoke(() -> WANTestBase.startSender(\"tk2\"));\n\n // pause senders on all the sites\n vm3.invoke(() -> WANTestBase.pauseSender(\"ln1\"));\n vm3.invoke(() -> WANTestBase.pauseSender(\"ln2\"));\n vm6.invoke(() -> WANTestBase.pauseSender(\"ln1\"));\n vm6.invoke(() -> WANTestBase.pauseSender(\"ln2\"));\n\n vm4.invoke(() -> WANTestBase.pauseSender(\"ny1\"));\n vm4.invoke(() -> WANTestBase.pauseSender(\"ny2\"));\n vm7.invoke(() -> WANTestBase.pauseSender(\"ny1\"));\n vm7.invoke(() -> WANTestBase.pauseSender(\"ny2\"));\n\n vm5.invoke(() -> WANTestBase.pauseSender(\"tk1\"));\n vm5.invoke(() -> WANTestBase.pauseSender(\"tk2\"));\n\n // this is required since sender pause doesn't take effect immediately\n Wait.pause(1000);\n\n // do puts on site1\n vm3.invoke(() -> WANTestBase.doPuts(getTestMethodName() + \"_PR\", 100));\n\n // verify queue size on site1 and site3\n vm3.invoke(() -> WANTestBase.verifyQueueSize(\"ln1\", 100));\n vm3.invoke(() -> WANTestBase.verifyQueueSize(\"ln2\", 100));\n\n // resume sender (from site1 to site2) on site1\n vm3.invoke(() -> WANTestBase.resumeSender(\"ln1\"));\n vm6.invoke(() -> WANTestBase.resumeSender(\"ln1\"));\n\n // validate region size on site2\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 100));\n\n // verify queue size on site2 (sender 2 to 1)\n // should remain at 0 as the events from site1 should not go back to site1\n vm4.invoke(() -> WANTestBase.verifyQueueSize(\"ny1\", 0));\n\n // verify queue size on site2 (sender 2 to 3)\n // should remain at 0 as events from site1 will reach site3 directly..site2 need not send to\n // site3 again\n vm4.invoke(() -> WANTestBase.verifyQueueSize(\"ny2\", 0));\n\n // do more puts on site3\n vm5.invoke(() -> WANTestBase.doPutsFrom(getTestMethodName() + \"_PR\", 100, 200));\n\n // resume sender (from site3 to site2) on site3\n vm5.invoke(() -> WANTestBase.resumeSender(\"tk2\"));\n\n // validate region size on site2\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n\n // verify queue size on site2 (sender 2 to 3)\n // should remain at 0 as the events from site3 should not go back to site3\n vm4.invoke(() -> WANTestBase.verifyQueueSize(\"ny2\", 0));\n\n // verify queue size on site2 (sender 2 to 1)\n // should remain at 0 as events from site3 will reach site1 directly..site2 need not send to\n // site1 again\n vm4.invoke(() -> WANTestBase.verifyQueueSize(\"ny1\", 0));\n\n // resume all senders\n vm3.invoke(() -> WANTestBase.resumeSender(\"ln2\"));\n vm6.invoke(() -> WANTestBase.resumeSender(\"ln2\"));\n\n vm4.invoke(() -> WANTestBase.resumeSender(\"ny1\"));\n vm4.invoke(() -> WANTestBase.resumeSender(\"ny2\"));\n vm7.invoke(() -> WANTestBase.resumeSender(\"ny1\"));\n vm7.invoke(() -> WANTestBase.resumeSender(\"ny2\"));\n\n vm5.invoke(() -> WANTestBase.resumeSender(\"tk1\"));\n\n // validate region size on all sites\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n }", "private Evolvable cross(Evolvable parent1, Evolvable parent2)\n\t{\n\t\tif(((SNSAgent)parent1).getBehavior().equals(\"RuleBased\"))\n\t\t{\t\n\t\t\tint split = R.nextInt(7) + 1;\n\t\t\tif(crossBehavior.equals(\"zipperCross\"))\n\t\t\t\treturn ruleZipperCross(parent1, parent2);\n\t\t\telse if(crossBehavior.equals(\"splitCross\"))\n\t\t\t\treturn ruleSplitCross(parent1, parent2, split);\n\t\t\telse if(crossBehavior.equals(\"smartCross\"))\n\t\t\t\treturn ruleSplitCross(parent1, parent2, split);\n\t\t\telse\n\t\t\t\tSystem.out.println(\"WARNING: Cross Behavior not defined.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint split = R.nextInt(1000) + 100;\n\t\t\tif(crossBehavior.equals(\"zipperCross\"))\n\t\t\t\treturn zipperCross(parent1, parent2);\n\t\t\telse if (crossBehavior.equals(\"splitCross\"))\n\t\t\t\treturn splitCross(parent1, parent2, split);\n\t\t\telse if (crossBehavior.equals(\"freeSplitCross\")){\n\t\t\t\treturn splitCross(parent1, parent2, R.nextInt(3000));\n\t\t\t}\n\t\t\telse if(crossBehavior.equals(\"smartCross\"))\n\t\t\t{\n\t\t\t\tsplit = ((SNSAgent)parent1).getCurrentMove() - R.nextInt(30);\n\t\t\t\treturn splitCross(parent1, parent2, split);\n\t\t\t}\n\t\t\telse\n\t\t\t\tSystem.out.println(\"WARNING: Cross Behavior not defined.\");\n\t\t}\n\n\t\treturn zipperCross(parent1, parent2);\n\t}", "public interface SharingFunction {\r\n\r\n /**\r\n * Sets internal DistanceFunction responsible for computation of plain distance between given individuals.\r\n * @param distanceFunction - DistanceFunction responsible for computation of plain distance as an input value for sharing function.\r\n */\r\n public void setDistanceFunction(DistanceFunction distanceFunction);\r\n\r\n /**\r\n * Computes value of shared function for targetIndividual which is also located in allIndividuals.\r\n * @param targetIndividual - individual for which the sharing value will be computed.\r\n * @param secondIndividual - individual in respect to which the sharing value is computed.\r\n * @return value of sharing function for individual according to secondIndividual.\r\n */\r\n public double computeShareValue(Individual targetIndividual, Individual secondIndividual);\r\n}", "public static Data crossover(Data d1, Data d2, int x) {\n try {\n if (d1.numberOfBytes() != d2.numberOfBytes())\n throw new Exception(\"Data crossover is impossible between two Data objects having different byte length\");\n if (x < 0 || x > d1.numberOfBits())\n throw new Exception(\"Pivot point in crossover is out of bounds (0<=\" + x + \"<\" + d1.numberOfBits() + \")\");\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n\n int bitx = x % 8;\n int bytex = x / 8;\n int n = d1.numberOfBytes();\n int m = d1.numberOfBits();\n\n ArrayList<Object> bytelist = new ArrayList<Object>(n);\n for (int i = 0; i < bytex; i++) bytelist.add(d1.getByte(i));\n int b1 = 0;\n for (int k = 0; k < bitx; k++) b1 = b1 + (1 << (7 - k));\n int b2 = 0;\n for (int k = bitx; k < 8; k++) b2 = b2 + (1 << (7 - k));\n int middle = (b1 & d1.getByte(bytex)) + (b2 & d2.getByte(bytex));\n byte bmiddle = (byte) middle;\n bytelist.add(bmiddle);\n for (int i = bytex + 1; i < n; i++) bytelist.add(d2.getByte(i));\n\n return new Data(bytelist);\n }", "@DISPID(-2147412112)\n @PropPut\n void onmouseover(\n java.lang.Object rhs);", "public static Tour[] partiallyMatchedCrossover(Tour parent1, Tour parent2){\n Tour child1 = new Tour(false);\n child1.getTour().addAll(parent1.getTour());\n // Remove the end city in the cycle\n child1.getTour().remove(child1.getLength()-1);\n // Start with the parent genotypes\n Tour child2 = new Tour(false);\n child2.getTour().addAll(parent2.getTour());\n child2.getTour().remove(child2.getLength()-1);\n // Return the parents unchanged as offspring if crossover rate not met or clones\n if((parent1 == parent2) || Math.random() > RunGA.crossoverRate){\n return new Tour[]{parent1, parent2};\n } else{\n int start = (int)(Math.random()*child1.getLength());\n int end = (int)(Math.random()*child1.getLength());\n if(start > end){\n int temp = start;\n start = end;\n end = temp;\n }\n // Swap the cities between the start and end indeces to the corresponding indeces in other parent\n for(int i=start; i<=end; i++){\n // Find index of the each city to be swapped in the genotype\n int swapIndex1 = child1.getTour().indexOf(parent2.getTour().get(i));\n int swapIndex2 = child2.getTour().indexOf(parent1.getTour().get(i));\n City temp1 = child1.getTour().get(i);\n City temp2 = child2.getTour().get(i);\n child1.getTour().set(i, parent2.getTour().get(i));\n child2.getTour().set(i, parent1.getTour().get(i));\n child1.getTour().set(swapIndex1, temp1);\n child2.getTour().set(swapIndex2, temp2);\n }\n // Reform cycle\n child1.getTour().add(child1.getTour().get(0));\n child2.getTour().add(child2.getTour().get(0));\n }\n Tour[] children = new Tour[]{child1, child2};\n return children;\n }", "public void setCrossoverRate(double rate) { this.exec = this.exec.withProperty(\"ux.rate\", rate); }", "private Vector step(){\n// System.out.println();\n// System.out.println(generationCount);\n// System.out.println(\"The Population is:\");\n// System.out.println(population);\n \n //DETERMINE WHO SURVIVES INTO NEXT GENERATION\n Vector nextGeneration = surviveType.run(population, fitnessArray);\n\n //DO THE CROSSOVER PROCESS\n //WHILE THE NEXT GENERATION ISN'T FULL\n while (nextGeneration.size() < (populationSize - randGenes)){\n //FIND PARENTS\n Gene parentOne, parentTwo;\n do {\n Gene[] parents = selectType.run(population, fitnessArray);\n parentOne = parents[0];\n parentTwo = parents[1];\n } while (selectPairs && (! closeEnough(parentOne, parentTwo)));\n //ADD CHILDREN\n Gene[] kids = crossType.children(parentOne, parentTwo);\n\n nextGeneration.add(kids[0]);\n if (nextGeneration.size() < (populationSize - randGenes)){\n nextGeneration.add(kids[1]);\n }\n }\n //ADD RANDOM GENES TO THE POPULATION\n while (nextGeneration.size() < populationSize){\n nextGeneration.add(initializer.createRandomGene(fitnessFunction, minRadius, maxRadius));\n }\n //MUTATE THE NEXT GENERATION\n for (int j = 0; j < populationSize; j++){\n if (Math.random() < mutationProb){\n nextGeneration.set(j, mutationType.run((Gene) nextGeneration.get(j)));\n }\n }\n\n //COMPUTE FITNESSES AND RELOCATE IF NECESSARY\n Gene bestGene = (Gene) nextGeneration.get(0);\n int bestX = 0;\n for (int x = 0; x < populationSize; x++){\n Gene next = (Gene) nextGeneration.get(x);\n while (relocationType.move(bannedList, next)){\n Gene newGene = initializer.createRandomGene(fitnessFunction, minRadius, maxRadius);\n next = newGene;\n nextGeneration.set(x, next);\n }\n fitnessArray[x] = next.getFitness();\n\n //FOR THE PURPOSES OF UPDATING THE BANNED LIST\n if (next.getFitness() > bestGene.getFitness()){\n bestGene = next;\n bestX = x;\n }\n } //End for (int x = 0;...\n\n Arrays.sort(fitnessArray);\n\n //UPDATE THE BANNED LIST BY ADDING THE BEST GENE IN THE NEXT GENERATION IF IT'S ABOVE minAccepted AND CONTAINS MORE THAN minPoints POINTS\n if (useList){\n if ((generationCount >= firstAdd) &&\n (solutionCounter >= countNum) &&\n (bestGene.getFitness() >= minAccepted) &&\n (bestGene.getCount() >= minPoints)){\n solutionCounter = 0;\n// System.out.println(bestGene);\n Gene bestClone = new Gene (bestGene.getMajorAxisRadius(), //THIS KLUDGE IS DONE B/C .clone() IS\n bestGene.getMinorAxisRadius(), //PROTECTED, AND I CAN'T UNPROTECT IT.\n bestGene.getX(), //I USE A CLONED GENE TO PREVENT A MUTATION\n bestGene.getY(), //IN THE NEXT GENERATION FROM ALTERING bannedList\n bestGene.getOrientation(),\n bestGene.getFunction());\n bannedList = relocationType.updateBannedList(bannedList, bestClone);\n\n\n //IF NECESSARY, UPDATE THE SOLUTION LIST BY ADDING ALL CLUSTERS WITH MORE THAN minPoints POINTS AND A FITNESS OF AT LEAST minAccepted\n if (returnAllSolutions){\n for (int i = 0; i < populationSize; i++){\n Gene next = (Gene) nextGeneration.get(i);\n if ((next.getFitness() >= minAccepted) && (next.getCount() >= minPoints)){\n solutionList.add(next);\n }\n }//End for (int i = 0...\n } else {\n solutionList = bannedList;\n } //End if (returnAllSolutions){...}else{\n } //End if (generationCount > 4...\n } //End if (useList){\n\n generationCount = generationCount + 1;\n solutionCounter = solutionCounter + 1;\n\n //IF AVOIDING CONVERGENCE, AND IT HAS CONVERGED, START OVER WITH RANDOM GENES\n\n double bestFitness = bestGene.getFitness();\n double medianFitness = roundToHundredths((double) fitnessArray[(int) Math.floor(populationSize / 2)]);\n\n// System.out.println(bestFitness);\n// System.out.println(medianFitness);\n\n if ((antiConvergence) &&\n ((bestFitness - medianFitness) < (0.01 * bestFitness)) &&\n (generationCount > firstAdd)){\n nextGeneration = initializer.getGenes(populationSize, fitnessFunction, minRadius, maxRadius);\n// System.out.println(\"EXPLODED CONVERGENCE!\");\n for (int x = 0; x < populationSize; x++){\n Gene next = (Gene) nextGeneration.get(x);\n fitnessArray[x] = next.getFitness();\n }\n Arrays.sort(fitnessArray);\n }\n\n return nextGeneration;\n }", "public interface AMDPModelLearner extends AMDPPolicyGenerator{\n\n\n public void updateModel(State s, Action a, List<Double> rewards, State sPrime, GroundedTask gt);\n\n\n}", "public MidiIndividual crossover(MidiIndividual that)\r\n\t{\n\t\tassert this.size() == that.size();\r\n\r\n\t\tVector<MidiIndividualTrack> newIndividualTracks = \r\n\t\t\tnew Vector<MidiIndividualTrack>();\r\n\r\n\t\tfor (int i = 0; i < midiIndividualTracks.size(); i++)\r\n\t\t{\r\n\t\t\tMidiIndividualTrack newIndv = \r\n\t\t\t\tthis.getIndividualTrack(i).crossover(that.getIndividualTrack(i));\r\n\t\t\tnewIndividualTracks.add(newIndv);\r\n\t\t}\r\n\r\n\t\treturn new MidiIndividual(newIndividualTracks);\r\n\t}", "public void Grasshopper(){\n this.hops = 2;\n this.hopLim = 3;\n }", "public Evolvable cross(Evolvable parent1, Evolvable parent2, int crossoverPoint)\n\t{\n\t\tif(((SNSAgent)parent1).getBehavior().equals(\"RuleBased\"))\n\t\t{\t\n\t\t\tif(crossBehavior.equals(\"zipperCross\"))\n\t\t\t\treturn ruleZipperCross(parent1, parent2);\n\t\t\telse if(crossBehavior.equals(\"splitCross\"))\n\t\t\t\treturn ruleSplitCross(parent1, parent2, crossoverPoint);\n\t\t\telse if(crossBehavior.equals(\"smartCross\"))\n\t\t\t\treturn ruleSplitCross(parent1, parent2, crossoverPoint);\n\t\t\telse\n\t\t\t\tSystem.out.println(\"WARNING: Cross Behavior not defined.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(crossBehavior.equals(\"zipperCross\"))\n\t\t\t\treturn zipperCross(parent1, parent2);\n\t\t\t\n\t\t\telse if (crossBehavior.equals(\"splitCross\"))\n\t\t\t\treturn splitCross(parent1, parent2, crossoverPoint);\n\t\t\t\n\t\t\telse if (crossBehavior.equals(\"freeSplitCross\")){\n\t\t\t\treturn splitCross(parent1, parent2, crossoverPoint);\n\t\t\t}\n\t\t\t\n\t\t\telse if(crossBehavior.equals(\"smartCross\")) {\n\t\t\t\tint split = ((SNSAgent)parent1).getCurrentMove() - R.nextInt(30);\n\t\t\t\treturn splitCross(parent1, parent2, split);\n\t\t\t}\n\t\t\telse\n\t\t\t\tSystem.out.println(\"WARNING: Cross Behavior not defined.\");\n\t\t}\n\n\t\treturn zipperCross(parent1, parent2);\n\t}", "interface Processor <T> {\n\n /**\n * Generates a feature for a source and its relevant method.\n *\n * @param source source to be processed.\n * @return a new feature.\n */\n T from(Source source);\n\n /**\n * Pre-computes a list of features to be fed into the processor.\n *\n * @param sources a set of source objects implementing a similar functionality.\n * @return a new list of features for a set of source objects and its relevant method names.\n */\n default Set<T> from(Set<Source> sources){\n return sources.stream()\n .map(this::from)\n .collect(Collectors.toSet());\n }\n\n /**\n * Process a typicality query. A typicality query finds the top k most typical\n * implementation of some functionality in a set of implementations with similar\n * functionality.\n *\n * @param topK k most typical/representative source objects, where k cannot\n * be greater than the size of the sources set.\n * @param sources a set of source objects implementing a similar functionality.\n * @return a list of relevant source objects, ranked by some given score. Different\n * scores will be implemented by the implementors of this type.\n * @throws IllegalArgumentException if topK > Size(sources)\n */\n List<Source> process(int topK, Set<Source> sources);\n }", "public void test4_b_parametric() { // Schedule found: (m + 1)i + j + (-m - 2)\n\t\t/* RelTrafo1: (i, j) - (i, j - 1) = (0, 1)\n\t\t * RelTrafo2: (i, j) - (i - 1, j + m) = (1, -m)\n\t\t * (m + 1) - m + (-m - 2) = -m - 1\n\t\t *//*\n\t\tGDGraph gdGraph = new GDGraph();\n\t\tGDGVertex gdVertex = gdGraph.addVertex();\n\t\tGDGEdge gdEdge1 = gdGraph.addEdge(gdVertex, gdVertex);\n\t\tGDGEdge gdEdge2 = gdGraph.addEdge(gdVertex, gdVertex);\n\n\t\tgdEdge1.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i, j - 1) \n\t\t\t\t{ 1, 0, 0, 0},\n\t\t\t\t{ 0, 1, 0, -1},\n\t\t\t\t{ 0, 0, 0, 1}\n });\n\t\tgdEdge1.producedDomain = convertIntTableToPIPDRational(new int[][]{ // (0..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, 0, 0},\n\t\t\t\t{ 0, 1, 0, -1}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\n\t\tgdEdge2.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i - 1, j + m) \n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 1, 0},\n\t\t\t\t{ 0, 0, 0, 1}\n });\t\t\n\t\tgdEdge2.producedDomain = convertIntTableToPIPDRational(new int[][]{ // (1..+inf, 0..+inf)\n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 0, 0}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\n\t\tgdVertex.computationDomain = convertIntTableToPIPDRational(new int[][]{ // (1..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 0, -1}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\t\t\n\t\tgdGraph.calculateFeautrierSchedule(true, true);\n\t\n\t\tgdGraph.<Rational>codeGeneration(Rational.ZERO, Rational.ONE);\n\t*/}", "public interface ChromosomeVelocityAdderIntf {\r\n /**\r\n * the operator that specifies how a velocity object is to be added to a\r\n * \"chromosome\" object representing a position in the solution space.\r\n * @param chromosome Object\r\n * @param velocity Object\r\n * @param params HashMap\r\n * @throws OptimizerException\r\n * @return Object\r\n */\r\n public Object addVelocity2Chromosome(Object chromosome, Object velocity, HashMap params) throws OptimizerException;\r\n}", "public void solveUsingLeastCostMethod() {\n\n this.solution = new Solution();\n\n Source[] proxySources = Arrays.copyOf(sources, sources.length);\n Destination[] proxyDestinations = Arrays.copyOf(destinations, destinations.length);\n int[][] matrix = new int[costs.length][costs[0].length];\n\n List<Integer> rows = new ArrayList<Integer>();\n List<Integer> columns = new ArrayList<Integer>();\n while ( rows.size() != proxySources.length && columns.size() != proxyDestinations.length ) {\n //getting minimum cell (if there is a tie, we choose where is the maximum quantity)\n int indexI,indexJ, value;\n indexI = 0;\n indexJ = 0;\n value = 0;\n boolean firstElement = true;\n for(int i=0;i<proxySources.length;i++) {\n if( !rows.contains(i) ) {\n for(int j=0;j<proxyDestinations.length;j++) {\n if( !columns.contains(j) ) {\n if ( firstElement ) {\n indexI = i;\n indexJ = j;\n value = costs[i][j];\n firstElement = false;\n }\n if( costs[i][j] < value ) {\n indexI = i;\n indexJ = j;\n value = costs[i][j];\n }\n else if( costs[i][j] == value ) {\n if( Math.min(proxySources[i].getSupply(),proxyDestinations[j].getDemand()) > Math.min(proxySources[indexI].getSupply(),proxyDestinations[indexJ].getDemand()) ) {\n indexI = i;\n indexJ = j;\n value = costs[i][j];\n }\n }\n }\n }\n }\n }\n int supply = proxySources[indexI].getSupply();\n int demand = proxyDestinations[indexJ].getDemand();\n\n\n this.solution.add(sources[indexI], destinations[indexJ], Math.min(supply,demand), costs[indexI][indexJ]);\n\n if ( supply < demand ) {\n proxySources[indexI].setSupply(0);\n proxyDestinations[indexJ].setDemand(demand - supply);\n rows.add(indexI);\n }\n else if( supply > demand ) {\n proxySources[indexI].setSupply(supply-demand);\n proxyDestinations[indexJ].setDemand(0);\n columns.add(indexJ);\n }\n else {\n proxySources[indexI].setSupply(0);\n proxyDestinations[indexJ].setDemand(0);\n rows.add(indexI);\n columns.add(indexJ);\n }\n }\n this.solution.showSolution();\n\n\n }", "void gen() {\n X86.Operand mleft = src1.gen_source_operand(false,tempReg1); \r\n X86.Operand mright = src2.gen_source_operand(true,tempReg2); \r\n X86.emit2(\"cmp\" + X86.Size.Q,mright,mleft);\r\n X86.emit0(\"j\" + op.X86_name() + \" F\" + funcNumber + \"_\" + lab.name);\r\n }", "public interface Operator<Downstream, Upstream> extends Function<Subscriber<? super Downstream>, Subscriber<? super Upstream>> {\n\n }", "Nop createNop();", "public static void cross(LogicProblem logicProblem, boolean applyChanges) \r\n throws RelationshipConflictException {\r\n// System.out.println(\"cross invoked\");\r\n HashMap<ItemPair,Relationship> relationshipTable = logicProblem.getRelationshipTable();\r\n\r\n HashSet<CategoryPair> categoryPairs = logicProblem.getCategoryPairs();\r\n \r\n for (CategoryPair categoryPair : categoryPairs) {\r\n //for (Category cat1 : logicProblem.getCategories()){\r\n // for (Category cat2 : logicProblem.getCategories()){\r\n // if (cat1!=cat2) {\r\n Category cat1 = categoryPair.first();\r\n Category cat2 = categoryPair.last();\r\n\r\n \r\n //for (Category cat1 : logicProblem.getCategories()){\r\n // for (Category cat2 : logicProblem.getCategories()){\r\n // if (cat1!=cat2) {\r\n for (Item item1 : cat1.getItems()){\r\n for (Item item2 : cat2.getItems()){\r\n Relationship sourceRelationship = relationshipTable.get(new ItemPair(item1,item2));\r\n if (sourceRelationship.getValue()==Relationship.ValueType.VALUE_YES) {\r\n// System.out.println(\"discovered VALUE_YES, setting up the cross\");\r\n for (Item itemA : cat1.getItems()){\r\n if (itemA != item1) {\r\n Relationship rel = relationshipTable.get(new ItemPair(itemA,item2));\r\n // could track superfluous and conflicts here\r\n if (rel.getValue() == Relationship.ValueType.VALUE_UNKNOWN) {\r\n Processor.setRelationship(logicProblem, applyChanges, rel, \r\n Relationship.ValueType.VALUE_NO,\r\n Relationship.LogicType.CROSS, sourceRelationship);\r\n// rel.setValue(Relationship.ValueType.VALUE_NO,Relationship.LogicType.CROSS,sourceRelationship);\r\n// System.out.println(\"created VALUE_NO relationship between \"+itemA.getName()+\" and \"+item2.getName()+ \" (CROSS)\");\r\n }\r\n }\r\n }\r\n for (Item itemB : cat2.getItems()){\r\n if (itemB != item2) {\r\n Relationship rel = relationshipTable.get(new ItemPair(item1,itemB));\r\n // could track superfluous and conflicts here\r\n if (rel.getValue() == Relationship.ValueType.VALUE_UNKNOWN) {\r\n Processor.setRelationship(logicProblem, applyChanges, rel, \r\n Relationship.ValueType.VALUE_NO,\r\n Relationship.LogicType.CROSS, sourceRelationship);\r\n// rel.setValue(Relationship.ValueType.VALUE_NO,Relationship.LogicType.CROSS,sourceRelationship);\r\n// System.out.println(\"created VALUE_NO relationship between \"+item1.getName()+\" and \"+itemB.getName()+ \" (CROSS)\");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "@Test\n public void testParallelPropagationLoopBack3Sites() {\n // Create locators\n Integer lnPort = vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));\n Integer nyPort = vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));\n Integer tkPort = vm2.invoke(() -> WANTestBase.createFirstRemoteLocator(3, lnPort));\n\n // create cache and receivers on all the 3 sites\n createCacheInVMs(lnPort, vm3, vm6);\n createReceiverInVMs(vm3, vm6);\n createCacheInVMs(nyPort, vm4, vm7);\n createReceiverInVMs(vm4, vm7);\n createCacheInVMs(tkPort, vm5);\n createReceiverInVMs(vm5);\n\n\n // create senders on all the 3 sites\n vm3.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, true));\n vm6.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, true));\n\n vm4.invoke(() -> WANTestBase.createSender(\"ny\", 3, true, 100, 10, false, false, null, true));\n vm7.invoke(() -> WANTestBase.createSender(\"ny\", 3, true, 100, 10, false, false, null, true));\n\n vm5.invoke(() -> WANTestBase.createSender(\"tk\", 1, true, 100, 10, false, false, null, true));\n\n // create PR on the 3 sites\n vm3.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 0, 100,\n isOffHeap()));\n vm6.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 0, 100,\n isOffHeap()));\n\n vm4.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 0, 100,\n isOffHeap()));\n vm7.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 0, 100,\n isOffHeap()));\n\n vm5.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"tk\", 0, 100,\n isOffHeap()));\n\n // start senders on all the sites\n startSenderInVMs(\"ln\", vm3, vm6);\n\n startSenderInVMs(\"ny\", vm4, vm7);\n\n vm5.invoke(() -> WANTestBase.startSender(\"tk\"));\n\n // pause senders on site1 and site3. Site2 has the sender running to pass along events\n vm3.invoke(() -> WANTestBase.pauseSender(\"ln\"));\n vm6.invoke(() -> WANTestBase.pauseSender(\"ln\"));\n\n vm5.invoke(() -> WANTestBase.pauseSender(\"tk\"));\n\n // do puts on site1\n vm3.invoke(() -> WANTestBase.doPuts(getTestMethodName() + \"_PR\", 100));\n\n // do more puts on site3\n vm5.invoke(() -> WANTestBase.doPutsFrom(getTestMethodName() + \"_PR\", 100, 200));\n\n // verify queue size on site1 and site3\n vm3.invoke(() -> WANTestBase.verifyQueueSize(\"ln\", 100));\n vm5.invoke(() -> WANTestBase.verifyQueueSize(\"tk\", 100));\n\n // resume sender on site1 so that events reach site2 and from there to site3\n vm3.invoke(() -> WANTestBase.resumeSender(\"ln\"));\n vm6.invoke(() -> WANTestBase.resumeSender(\"ln\"));\n vm6.invoke(() -> waitForSenderRunningState(\"ln\"));\n vm3.invoke(() -> waitForSenderRunningState(\"ln\"));\n\n // validate region size on site2 (should have 100) and site3 (should have 200)\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 100));\n vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n\n // verify queue size remains same on site3 which means event loopback did not happen\n // this means events coming from site1 are not enqueued back into the sender\n vm5.invoke(() -> WANTestBase.verifyQueueSize(\"tk\", 100));\n\n // resume sender on site3\n vm5.invoke(() -> WANTestBase.resumeSender(\"tk\"));\n vm5.invoke(() -> waitForSenderRunningState(\"tk\"));\n\n // validate region size\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n }", "N getTarget();", "public CrossoverOrder() {\n\t\tthis.randomGenerator = new Random(System.currentTimeMillis());\n\t}", "public interface Heuristic extends Serializable {\n\tpublic final String PATH = \"heuristic\";\n\tpublic final String BEST = \"CNN_f2_p8_m100_o50_t20_99\";\n\t\n\tpublic Heuristic copy();\n\tpublic double evaluate(State state);\n\tpublic void save(String name);\n\tpublic Heuristic mutate(double mutationProb);\n\tpublic List<Heuristic> crossover(Heuristic other);\n\t\n\t/**\n\t * perform crossover between pairs of parents, and return a new population with:\n\t * \t- All the parents\n\t * \t- All the crossover\n\t * - Mutation of the crossover\t\n\t * @param parents : List of parents. They must be an even number\n\t * @param populationSize : size of the population to return. It must be at least twice the number of parents\n\t * @param mutationProb : the probability to mutate a parameter\n\t * @param mutationScale : the scale that multiply the random number that will be summed to the parameter to modify\n\t * @return A list of new Heuristic that must be put into the existing brains for the new Tournament\n\t */\n\tpublic static List<Heuristic> nextGeneration(List<Heuristic> parents, int populationSize, double mutationProb) {\n\t\tif(parents.size() % 2 != 0 || parents.size() < 2)\n\t\t\tthrow new IllegalArgumentException(\"Must be an even number of parents\");\n\t\t\t\t\n\t\tList<Heuristic> ret = new ArrayList<>();\n\t\t\n\t\tfor(Heuristic par : parents)\n\t\t\tret.add(par.copy());\n\t\t\n\t\tfor(int i=0; i<parents.size(); i+=2) {\n\t\t\tList<Heuristic> children = parents.get(i).crossover(parents.get(i+1));\n\t\t\t\n\t\t\tfor(Heuristic child : children)\n\t\t\t\tret.add(child.copy());\n\t\t\t\n\t\t\twhile(ret.size() < (i+2)/parents.size() * populationSize)\n\t\t\t\tfor(Heuristic child : children) {\n\t\t\t\t\tret.add(child.copy().mutate(mutationProb));\n\t\t\t\t\tif(ret.size() == populationSize) return ret;\n\t\t\t\t}\n\t\t}\n\t\t\n\t\treturn ret;\n\t}\n\t\n\t/**\n\t * Return an heuristic from the file <filename>. if <filename> == \"new\" it will return a new Heuristic\n\t * @param filename. Name of the file to load. NO need to include the extension\n\t * @return\n\t */\n\tpublic static Heuristic of(String filename) {\n\t\tif(filename.equalsIgnoreCase(\"new\"))\n\t\t\treturn new HeuristicNN(64, 32, 16);\n\t\treturn HeuristicNN.load(filename);\n\t}\n}", "@Override\npublic int mover() {\n\treturn posicaoTopoEscada;\n}", "public static Double[] crossover(Double[] g1, Double[] g2){\n\t\tRandom random = new Random();\n\t\tint start = random.nextInt(variableNum-1);\n\t\tint end = start + 1 + random.nextInt(variableNum-start);\n\t\t//which one is better, why\n//\t\tfor(int i = start; i < end; i++) g1[i] = g2[i] + Math.random()*(g1[i]-g2[i]);\n//\t\tfor(int i = start; i < end; i++) g1[i] = g2[i];\n\t\tfor(int i = start; i < end; i++) {\n\t\t\tg1[i] = g2[i] + (Math.random()*2-1)*(g1[i]-g2[i]);\n\t\t\tif(g1[i] > maxValue) g1[i] = maxValue;\n\t\t\tif(g1[i] < minValue) g1[i] = minValue;\n\t\t}\n\t\treturn Arrays.copyOf(g1, g1.length);\n\t}", "public interface GeneticOptimizer {\r\n\tpublic int getGenPopulation();\r\n\tpublic void setGenPopulation(Integer popSize);\r\n\tpublic int getGenIterations();\r\n\tpublic void setGenIterations(Integer iterations);\r\n\r\n}", "public Population crossoverPopulation(Population population, List<FogDevice> fogDevices, List<? extends Cloudlet> cloudletList) {\n Individual queen = population.getFittest(0);\n // Loop over current population by fitness\n for (int dronesIndex = 1; dronesIndex < (numberDrones + 1); dronesIndex++) {\n Individual husband = population.getFittest(dronesIndex);\n\n // Apply crossover to this individual?\n if (this.crossoverRate > Math.random()) {\n // Initialize offspring\n Individual offspring = new Individual(husband.getChromosomeLength());\n\n offspring = crossover2Point(husband, queen);\n\n if(husband.getFitness() <= calcFitness(offspring, fogDevices, cloudletList)\n && !doesPopupationIncludeIndividual(population, offspring)) {\n population.getPopulation().remove(husband);\n population.getPopulation().add(offspring);\n }\n }\n }\n return population;\n }", "public Individual crossover2Point(Individual parent1, Individual parent2) {\n Individual offspring = new Individual(parent1.getChromosomeLength());\n int crossoverPoint1 = Service.rand(0, parent1.getChromosomeLength()-1);\n int crossoverPoint2 = Service.rand(crossoverPoint1 + 1, crossoverPoint1 + parent1.getChromosomeLength());\n\n for(int geneIndex = 0; geneIndex < parent1.getChromosomeLength(); geneIndex++) {\n if (crossoverPoint2 >= parent1.getChromosomeLength()) {\n if(geneIndex >= crossoverPoint1 || geneIndex < (crossoverPoint2 - parent1.getChromosomeLength())) {\n offspring.setGene(geneIndex, parent2.getGene(geneIndex));\n } else {\n offspring.setGene(geneIndex, parent1.getGene(geneIndex));\n }\n }else {\n if(geneIndex >= crossoverPoint1 && geneIndex < crossoverPoint2) {\n offspring.setGene(geneIndex, parent2.getGene(geneIndex));\n } else {\n offspring.setGene(geneIndex, parent1.getGene(geneIndex));\n }\n }\n }\n return offspring;\n }", "public interface PairwiseSimilarity {\n public double getMinValue();\n public double getMaxValue();\n public SRResultList mostSimilar(MostSimilarCache matrices, TIntFloatMap vector, int maxResults, TIntSet validIds) throws IOException;\n public SRResultList mostSimilar(MostSimilarCache matrices, int wpId, int maxResults, TIntSet validIds) throws IOException;\n}", "public void hover();", "default void process_crosslinks(MutableBeaconState state) {\n state.getPreviousCrosslinks().replaceAll(state.getCurrentCrosslinks().listCopy());\n\n for (EpochNumber epoch : get_previous_epoch(state).iterateTo(get_current_epoch(state).increment())) {\n for (UInt64 offset : UInt64s.iterate(UInt64.ZERO, get_epoch_committee_count(state, epoch))) {\n ShardNumber shard = get_epoch_start_shard(state, epoch)\n .plusModulo(offset, getConstants().getShardCount());\n List<ValidatorIndex> crosslink_committee = get_crosslink_committee(state, epoch, shard);\n Pair<Crosslink, List<ValidatorIndex>> winner =\n get_winning_crosslink_and_attesting_indices(state, epoch, shard);\n Crosslink winning_crosslink = winner.getValue0();\n List<ValidatorIndex> attesting_indices = winner.getValue1();\n if (get_total_balance(state, attesting_indices).times(3)\n .greaterEqual(get_total_balance(state, crosslink_committee).times(2))) {\n state.getCurrentCrosslinks().set(shard, winning_crosslink);\n }\n };\n }\n }", "public interface AllPairsShortestPathAlgo\n{\n long[][]getDistances(Graph g);\n}", "static void CopyPropagate( ParseResult p_result ){\n\n\tSet<String> fnames = p_result.fdetails.keySet( );\n\tIterator<String> f_iterator = fnames.iterator( );\n\n\twhile( f_iterator.hasNext( ) ){\n\t String fname = f_iterator.next( );\n\t FuncDetails fdetail = p_result.fdetails.get( fname );\n\t CopyPropFunction( fdetail );\n\t}\n\t\n\tCopyPropFunction( p_result.main_fn );\n/*\n\tHashSet<BasicBlock> to_visit = new HashSet<BasicBlock>( );\n\tHashSet<BasicBlock> visited = new HashSet<BasicBlock>( );\n\t\n\tto_visit.add( p_result.main_fn );\n\n\twhile( to_visit.isEmpty( ) == false ){\n\t BasicBlock b = (to_visit.iterator( )).next( );\n\t to_visit.remove( b );\n\t visited.add( b );\n\t \t \n\t for( int i = 0; i < b.NumNext( ); i++ ){\n\t\tBasicBlock nb = b.GetNext(i);\n\t \n\t\tif( visited.contains( nb ) == false )\n\t\t\tto_visit.add( nb );\n\t }\n\t}\n*/\t\t\n }", "public interface IAlgorithm extends IResetable, ILevelCtrl {\n /**\n * Applies the instructions in the specified message.\n * \n * @param msg the message.\n * @return true if the copy still exists here of false otherwise.\n */\n public boolean apply(Message<?> msg);\n\n /**\n * Called when a replica of the data is placed in the DC.\n */\n public void dataWasSet();\n\n /**\n * Processes a read request.\n */\n public void otherRead(IDataHolder dc);\n /**\n * Processes a read request by another data centre.\n */\n public void ownRead();\n\n /**\n * Processes a write request.\n * \n * @param data the data.\n * @return true if the copy still exists here of false otherwise.\n */\n public boolean ownWrite(Object data);\n /**\n * Processes a write request by another data centre.\n * \n * @param dc .\n * @param data the data.\n * @return true if the copy still exists here or false otherwise.\n */\n public boolean otherWrite(IDataHolder dc, Object data);\n\n /**\n * @param dc the data centre.\n * @param algorithm the specific argument for the new instance of the algorithm.\n * @return a duplicate of this algorithm.\n */\n public abstract IAlgorithm clone(Element algorithm, DataCentre dc);\n\n /**\n * @return true if the data should be replicated or false otherwise.\n */\n public boolean isReplicated();\n\n /**\n * Sets the listener for changes in the replica strength.\n * \n * @param listener the listener.\n */\n public void setListener(IAlgorithmListener listener);\n\n /**\n * Requests to start processing.\n */\n public void start();\n \n /**\n * Requests to stop any processing.\n */\n public void stop();\n}", "public interface SelectionFunction\n{\n // this function chooses an individual given the group of individuals, \"pop\"\n /**\n * Chooses an individual given the group a population.\n * @parameter pop Population of <code>GAIndividual</code> objects to be used for selection.\n * @return <code>GAIndividual</code> object selected from the supplied population.\n * @see GAIndividual\n */\n public GAIndividual selectParent(Vector pop);\n}", "@Test\n public void testParallelPropagationLoopBack() {\n Integer lnPort = vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));\n Integer nyPort = vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));\n\n // create receiver on site1 and site2\n createCacheInVMs(lnPort, vm2, vm4, vm5);\n vm2.invoke(WANTestBase::createReceiver);\n createCacheInVMs(nyPort, vm3, vm6, vm7);\n vm3.invoke(WANTestBase::createReceiver);\n\n // create senders on site1\n vm2.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, true));\n vm4.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, true));\n vm5.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, true));\n\n // create senders on site2\n vm3.invoke(() -> WANTestBase.createSender(\"ny\", 1, true, 100, 10, false, false, null, true));\n vm6.invoke(() -> WANTestBase.createSender(\"ny\", 1, true, 100, 10, false, false, null, true));\n vm7.invoke(() -> WANTestBase.createSender(\"ny\", 1, true, 100, 10, false, false, null, true));\n\n // create PR on site1\n vm2.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 0, 100,\n isOffHeap()));\n vm4.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 0, 100,\n isOffHeap()));\n vm5.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 0, 100,\n isOffHeap()));\n\n // create PR on site2\n vm3.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 0, 100,\n isOffHeap()));\n vm6.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 0, 100,\n isOffHeap()));\n vm7.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 0, 100,\n isOffHeap()));\n\n // start sender on site1\n startSenderInVMs(\"ln\", vm2, vm4, vm5);\n\n\n // start sender on site2\n startSenderInVMs(\"ny\", vm3, vm6, vm7);\n\n\n // pause senders on site1\n vm2.invoke(() -> WANTestBase.pauseSender(\"ln\"));\n vm4.invoke(() -> WANTestBase.pauseSender(\"ln\"));\n vm5.invoke(() -> WANTestBase.pauseSender(\"ln\"));\n\n // pause senders on site2\n vm3.invoke(() -> WANTestBase.pauseSender(\"ny\"));\n vm6.invoke(() -> WANTestBase.pauseSender(\"ny\"));\n vm7.invoke(() -> WANTestBase.pauseSender(\"ny\"));\n\n // this is required since sender pause doesn't take effect immediately\n Wait.pause(1000);\n\n // Do 100 puts on site1\n vm2.invoke(() -> WANTestBase.doPuts(getTestMethodName() + \"_PR\", 100));\n // do next 100 puts on site2\n vm3.invoke(() -> WANTestBase.doPutsFrom(getTestMethodName() + \"_PR\", 100, 200));\n // verify queue size on both sites\n vm2.invoke(() -> WANTestBase.verifyQueueSize(\"ln\", 100));\n vm4.invoke(() -> WANTestBase.verifyQueueSize(\"ln\", 100));\n vm5.invoke(() -> WANTestBase.verifyQueueSize(\"ln\", 100));\n\n vm3.invoke(() -> WANTestBase.verifyQueueSize(\"ny\", 100));\n vm6.invoke(() -> WANTestBase.verifyQueueSize(\"ny\", 100));\n vm7.invoke(() -> WANTestBase.verifyQueueSize(\"ny\", 100));\n\n // resume sender on site1\n vm2.invoke(() -> WANTestBase.resumeSender(\"ln\"));\n vm4.invoke(() -> WANTestBase.resumeSender(\"ln\"));\n vm5.invoke(() -> WANTestBase.resumeSender(\"ln\"));\n\n // validate events reached site2 from site1\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n\n // on site2, verify queue size again\n // this ensures that loopback is not happening since the queue size is same as before\n // the event coming from site1 are not enqueued again\n vm3.invoke(() -> WANTestBase.verifyQueueSize(\"ny\", 100));\n vm6.invoke(() -> WANTestBase.verifyQueueSize(\"ny\", 100));\n vm7.invoke(() -> WANTestBase.verifyQueueSize(\"ny\", 100));\n\n // resume sender on site2\n vm3.invoke(() -> WANTestBase.resumeSender(\"ny\"));\n vm6.invoke(() -> WANTestBase.resumeSender(\"ny\"));\n vm7.invoke(() -> WANTestBase.resumeSender(\"ny\"));\n\n // validate region size on both the sites\n vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n }", "public interface Heuristic {\n}", "private interface OperationOverNodes {\n\t\tvoid operate(Node node);\n\t}", "private int[][] crossoverOnePoint(int[] parent1, int[] parent2) {\n\t\tint crossPoint1 = rand.nextInt(parent1.length);\n\n\t\tint[] child = new int[parent1.length];\n\t\tint[] child2 = new int[parent1.length];\n\t\tfor (int i = 0; i < crossPoint1; i++) {\n\t\t\tchild[i] = parent1[i]; //before cross point = p1\n\t\t\tchild2[i] = parent2[i]; //opposite for child2\n\t\t}\n\n\t\tfor (int i = crossPoint1; i < parent1.length; i++) {\n\t\t\tchild[i] = parent2[i]; //after and including crosspoint = p2\n\t\t\tchild2[i] = parent1[i]; //opposite for child2\n\t\t}\n\t\treturn new int[][] { child, child2 };\n\n\t}", "LP getLp();", "public interface VertexCoverAlgorithm {\n\n\t/**\n\t * Finds a <code>Collection</code> of vertices such that for every \n\t * {@link org._3pq.jgrapht.Edge} in the {@link org._3pq.jgrapht.UnirectedGraph},\n\t * at least one of its two vertices is in the<code>Collection</code>}.\n\t * \n\t * @return a <code>Collection</code> representing the Vertex Cover \n\t * of the <code>UnirectedGraph</code>.\n\t */\n\tpublic Collection vertexCover();\n}", "public TesteCrossover() {\n initComponents();\n }", "public interface QComputablePlanner {\n\n public List<QValue> getQs(State s);\n\n public QValue getQ(State s, AbstractGroundedAction a);\n\n}", "public interface Algorithm {\r\n\r\n public static Point2D newPosition(Point2D currentXY, Point2D gp, Integer id){return null;};\r\n\r\n public static Point2D lineTrajectory(Point2D xy, Point2D goalPoint){return null;};\r\n\r\n public static Double getXforLine(Point2D xy, Point2D gp){return null;};\r\n}", "public SolutionSet execute() throws JMException, ClassNotFoundException {\n int maxEvaluations ;\n int evaluations ;\n\n SolutionSet population ;\n SolutionSet offspringPopulation ;\n\n Solution betterIndividual ;\n\n Operator mutationOperator ;\n Comparator comparator ;\n Operator localSearchOperator ;\n\n\n comparator = new ObjectiveComparator(0) ; // Single objective comparator\n\n // Read the params\n maxEvaluations = ((Integer)this.getInputParameter(\"maxEvaluations\")).intValue();\n\n // Initialize the variables\n population = new SolutionSet(mu_) ;\n offspringPopulation = new SolutionSet(lambda_) ;\n\n evaluations = 0;\n\n // Read the operators\n mutationOperator = this.operators_.get(\"mutation\");\n localSearchOperator = (LocalSearch) operators_.get(\"improvement\");\n\n System.out.println(\"(\" + mu_ + \" + \" + lambda_+\")ES\") ;\n\n // Create 1-parent population of mu solutions\n Solution newIndividual;\n newIndividual = new Solution(problem_);\n problem_.evaluate(newIndividual);\n evaluations++;\n betterIndividual = new Solution(newIndividual);\n population.add(betterIndividual);\n\n // Main loop\n while (evaluations < maxEvaluations) {\n // STEP 1. Generate the offspring\n Solution offspring = new Solution(population.get(0)) ;\n mutationOperator.execute(offspring);\n /*Solution mutated_solution = (Solution) mutationOperator.execute(offspring);\n if(offspring.getObjective(0) < mutated_solution.getObjective(0))\n offspring = mutated_solution;*/\n problem_.evaluate(offspring);\n Solution local_offspring = (Solution) localSearchOperator.execute(offspring);\n offspring.setObjective(0, local_offspring.getObjective(0));\n offspringPopulation.add(offspring);\n evaluations++;\n\n if(comparator.compare(betterIndividual, offspringPopulation.get(0)) > 0) {\n betterIndividual = new Solution(offspringPopulation.get(0));\n population.clear();\n // STEP 4. Create the new mu population\n population.add(betterIndividual);\n }\n\n System.out.println(population.get(0).getObjective(0)) ;\n\n // STEP 6. Delete the offspring population\n offspringPopulation.clear() ;\n } // while\n\n // Return a population with the best individual\n SolutionSet resultPopulation = new SolutionSet(1) ;\n resultPopulation.add(population.get(0)) ;\n\n return resultPopulation ;\n }", "public interface IMover {\n\n\t/**\n\t * Calculates movement then applies to body\n\t * \n\t * @param Body\n\t * - The body to apply the movement to\n\t * @param SteeringOutput\n\t * - Optional additional movement to apply to body\n\t */\n\tvoid move( float deltaTime, Body body );\n\n\t/**\n\t * is called from a puzzleManager and not applied to the body every step\n\t * \n\t * @param screwVal\n\t * - the 0 - maxdepth value of the screw\n\t * @param platform\n\t * - the platform the will be altered by this mover\n\t */\n\tpublic void runPuzzleMovement( Screw screw, float screwVal, Platform p );\n\n\t/**\n\t * returns the behavior for which this mover will be used in a puzzle\n\t * \n\t * @return MoverType\n\t */\n\tpublic PuzzleType getMoverType( );\n}", "private Individual[] crossOver(Individual father, Individual mother){\n\t\tIndividual[] children = problem.makeChild(mother, father);\r\n\t\treturn children;\r\n\t}" ]
[ "0.67555183", "0.6563008", "0.6410408", "0.624873", "0.62204665", "0.6135426", "0.6112925", "0.6038207", "0.60151106", "0.58823735", "0.5794971", "0.57791877", "0.5748142", "0.5731868", "0.5695461", "0.5667138", "0.5628175", "0.55771804", "0.5546775", "0.5537857", "0.55276793", "0.5498746", "0.5496071", "0.54768986", "0.5475", "0.5455696", "0.5436439", "0.54281706", "0.5422046", "0.53919286", "0.536495", "0.53212935", "0.5285735", "0.5264425", "0.5256313", "0.5234062", "0.5213288", "0.5197633", "0.51931965", "0.5187432", "0.5177512", "0.51598424", "0.5151774", "0.5145903", "0.51429707", "0.510813", "0.5106788", "0.5103902", "0.50908154", "0.50691533", "0.5050056", "0.5032048", "0.5024624", "0.5019234", "0.5009723", "0.50047654", "0.5004643", "0.49903524", "0.49565104", "0.495589", "0.4953035", "0.49523434", "0.49507695", "0.49401107", "0.4923707", "0.49167913", "0.49130404", "0.49103504", "0.49072087", "0.49067712", "0.48985344", "0.4897978", "0.4885252", "0.48653638", "0.48578703", "0.4857704", "0.48569217", "0.48418313", "0.48375985", "0.4828355", "0.48273394", "0.48233882", "0.48199713", "0.4816355", "0.4811631", "0.47918952", "0.47910115", "0.47891355", "0.47880885", "0.47825408", "0.47820932", "0.47780746", "0.47583044", "0.47568396", "0.47514856", "0.47507933", "0.47488946", "0.47385484", "0.47372636", "0.47345197" ]
0.6862676
0
the operation accepts 2 chromosomes (not DGAIndividual objects, not FunctionIntf() arguments), and combines them so as to produce two new such chromosomes that are returned in a Pair object. The operation may throw if any of the produced children are infeasible, assuming the operator has enough knowledge of that fact.
public Pair doXover(Object chromosome1, Object chromosome2, HashMap params) throws OptimizerException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface XoverOpIntf {\r\n /**\r\n * the operation accepts 2 chromosomes (not DGAIndividual objects, not\r\n * FunctionIntf() arguments), and combines them so as to produce two new\r\n * such chromosomes that are returned in a Pair object. The operation may\r\n * throw if any of the produced children are infeasible, assuming the operator\r\n * has enough knowledge of that fact.\r\n * @param chromosome1 Object\r\n * @param chromosome2 Object\r\n * @param params HashMap \r\n * @throws OptimizerException\r\n * @return Pair\r\n */\r\n public Pair doXover(Object chromosome1, Object chromosome2, HashMap params) throws OptimizerException;\r\n}", "public Chromosome crossover(Chromosome firstParent, Chromosome secondParent);", "private Vector crossover(Individual mother, Individual father) {\n \n //don't want to do crossover on two chromosomes that are equal\n if(mother.equals(father)) {\n Vector to_return = new Vector();\n to_return.add(mother);\n to_return.add(father);\n return to_return;\n }\n \n println(\"crossover\", 1);\n int[] mom = mother.getChromosome();\n int[] dad = father.getChromosome();\n int[] child1 = new int[num_shipping_points]; \n int[] child2 = new int[num_shipping_points]; \n \n println(\"mother is\", 1);\n displayChromosome(mother, 1);\n println(\"father is\", 1);\n displayChromosome(father, 1);\n \n int breakpoint = (int)(Math.random() * num_shipping_points) + 3;\n println(\"breakpoint = \" + breakpoint, 1);\n \n int comparisons = 0;\n \n for(int i = 0; i < num_shipping_points; i++) {\n if(i < breakpoint) {\n child1[i] = mom[i];\n child2[i] = dad[i];\n }\n else {\n child1[i] = -1;\n child2[i] = -1;\n }\n } \n \n int j = breakpoint; //index on other chromosome\n\n for(int i = breakpoint; i < num_shipping_points; i++) {\n\n while(containsGene(child2, mom[j])) {\n j++;\n comparisons++;\n if(comparisons > 30) {\n println(\"leaving\", 1);\n System.exit(0);\n }\n \n if(j == num_shipping_points) {\n j = 0;\n }\n if(j == breakpoint) //not supposed to happen, but it does\n break;\n }\n child2[i] = mom[j];\n j++;\n if(j == num_shipping_points) {\n j = 0;\n }\n\n }\n \n j = breakpoint;\n comparisons = 0; \n for(int i = breakpoint; i < num_shipping_points; i++) {\n\n while(containsGene(child1, dad[j])) {\n j++;\n comparisons++;\n if(comparisons > 30) {\n println(\"leaving\", 1);\n System.exit(0);\n }\n if(j == num_shipping_points) {\n j = 0;\n }\n if(j == breakpoint)\n break;\n }\n child1[i] = dad[j];\n j++;\n if(j == num_shipping_points) {\n j = 0;\n }\n }\n \n Vector v = new Vector();\n Individual i1 = new Individual(child1, this);\n Individual i2 = new Individual(child2, this);\n //i1.setFitness(evaluateFitness(i1));\n //i2.setFitness(evaluateFitness(i1));\n v.add(i1);\n v.add(i2);\n println(\"kid1:\",1);\n displayChromosome(i1, 1);\n println(\"kid2:\", 1);\n displayChromosome(i2, 1);\n println(\"returning from crossover\",1);\n return v;\n }", "public abstract Chromosome mutation(Chromosome child);", "public List<Chromosome> doCrossover(Chromosome other, String crossoverType){\n int geneSize = this.knapsackSelection.size();\n\n ArrayList<Chromosome> children = new ArrayList<>();\n\n //Allow for multiple crossover attempts to better the chance of a valid crossover.\n //Note that this can be disabled by setting GAConfiguration.CONCEPTION_ATTEMPTS = 1.\n for(int i = 0; i < PopulationConfiguration.CONCEPTION_ATTEMPTS; i++){\n\n //Set first crossover point to 0 if 1PX Crossover.\n int crossPoint1 = crossoverType.equals(\"1PX\") ? 0 : Configuration.RANDOM_GENERATOR.nextInt(geneSize);\n int crossPoint2 = Configuration.RANDOM_GENERATOR.nextInt(geneSize - crossPoint1) + crossPoint1;\n\n ArrayList<Boolean> c1 = new ArrayList<>();\n ArrayList<Boolean> c2 = new ArrayList<>();\n\n c1.addAll(this.knapsackSelection.subList(0, crossPoint1));\n c1.addAll(other.getKnapsackSelection().subList(crossPoint1, crossPoint2));\n c1.addAll(this.knapsackSelection.subList(crossPoint2, geneSize));\n Chromosome child1 = new Chromosome(c1).withFitnessCalculated();\n\n c2.addAll(other.getKnapsackSelection().subList(0, crossPoint1));\n c2.addAll(this.knapsackSelection.subList(crossPoint1, crossPoint2));\n c2.addAll(other.getKnapsackSelection().subList(crossPoint2, geneSize));\n Chromosome child2 = new Chromosome(c2).withFitnessCalculated();\n \n if(child1.isValid() && children.size() < 2){\n children.add(child1);\n }\n if(child2.isValid() && children.size() < 2){\n children.add(child2);\n }\n if(children.size() == 2){\n break;\n }\n }\n //If the crossover failed to generate a valid child, return the parents.\n if(children.size() == 0){\n children.add(other);\n children.add(this);\n }\n else if(children.size() == 1){\n children.add(this);\n }\n return children;\n }", "public static <KEY extends java.lang.Comparable<KEY>, ITEM> BinomialTree<KEY, ITEM> CombinePair (\n\t\tfinal BinomialTree<KEY, ITEM> binomialTree1,\n\t\tfinal BinomialTree<KEY, ITEM> binomialTree2,\n\t\tfinal boolean minHeap)\n\t{\n\t\tif (null == binomialTree1 || null == binomialTree2)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tint order = binomialTree1.order();\n\n\t\tif (order != binomialTree2.order())\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tBinomialTree<KEY, ITEM> upTree = null;\n\t\tBinomialTree<KEY, ITEM> downTree = null;\n\t\tBinomialTree<KEY, ITEM> combinedTree = null;\n\n\t\tKEY key1 = binomialTree1.entry().key();\n\n\t\tKEY key2 = binomialTree2.entry().key();\n\n\t\tif (minHeap)\n\t\t{\n\t\t\tif (-1 != key1.compareTo (\n\t\t\t\tkey2\n\t\t\t))\n\t\t\t{\n\t\t\t\tupTree = binomialTree2;\n\t\t\t\tdownTree = binomialTree1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tupTree = binomialTree1;\n\t\t\t\tdownTree = binomialTree2;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (-1 != key1.compareTo (\n\t\t\t\tkey2\n\t\t\t))\n\t\t\t{\n\t\t\t\tupTree = binomialTree1;\n\t\t\t\tdownTree = binomialTree2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tupTree = binomialTree2;\n\t\t\t\tdownTree = binomialTree1;\n\t\t\t}\n\t\t}\n\n\t\tjava.util.List<BinomialTree<KEY, ITEM>> meldedChildren =\n\t\t\tnew java.util.ArrayList<BinomialTree<KEY, ITEM>>();\n\n\t\tjava.util.List<BinomialTree<KEY, ITEM>> upChildren = upTree.children();\n\n\t\tif (null != upChildren)\n\t\t{\n\t\t\tint upChildrenCount = upChildren.size();\n\n\t\t\tfor (int meldedChildIndex = 0;\n\t\t\t\tmeldedChildIndex < upChildrenCount;\n\t\t\t\t++meldedChildIndex)\n\t\t\t{\n\t\t\t\tmeldedChildren.add (\n\t\t\t\t\tupChildren.get (\n\t\t\t\t\t\tmeldedChildIndex\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tmeldedChildren.add (\n\t\t\tdownTree\n\t\t);\n\n\t\ttry\n\t\t{\n\t\t\tcombinedTree = new BinomialTree<KEY, ITEM> (\n\t\t\t\tnew org.drip.graph.heap.PriorityQueueEntry<KEY, ITEM> (\n\t\t\t\t\tupTree.entry().key(),\n\t\t\t\t\tupTree.entry().item()\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\tcatch (java.lang.Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\n\t\t\treturn null;\n\t\t}\n\n\t\treturn combinedTree.setChildren (\n\t\t\tmeldedChildren\n\t\t) && downTree.setParent (\n\t\t\tcombinedTree\n\t\t) ? combinedTree : null;\n\t}", "private void crossover() {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < pop_size; i++) { // go through population\r\n\r\n int a = new Random().nextInt(this.pop_size);\r\n int b = new Random().nextInt(this.pop_size);\r\n\r\n int split_point = new Random().nextInt(this.gene_size);\r\n\r\n float[] p1_genes = this.parent_population.getPopulation()[a].getGenes();\r\n float[] p2_genes = this.parent_population.getPopulation()[b].getGenes();\r\n\r\n float[] c1_genes = new float[gene_size];\r\n float[] c2_genes = new float[gene_size];\r\n\r\n for (int j = 0; j < gene_size; j++) {\r\n\r\n if (j < split_point) {\r\n c1_genes[j] = p1_genes[j];\r\n c2_genes[j] = p2_genes[j];\r\n } else {\r\n c2_genes[j] = p1_genes[j];\r\n c1_genes[j] = p2_genes[j];\r\n }\r\n }\r\n individual child1 = new individual(c1_genes, solutions, output);\r\n individual child2 = new individual(c2_genes, solutions, output);\r\n\r\n if (child1.getFitness() > child2.getFitness()) {\r\n temp_pop[i] = child1;\r\n } else {\r\n temp_pop[i] = child2;\r\n }\r\n }\r\n this.offspring_population.setPopulation(temp_pop);\r\n this.offspring_population.update_population();\r\n }", "void pairwiseCombine(){\n\t\t\n\t\tmin.Left.Right = min.Right;\n\t\tmin.Right.Left = min.Left;\n\t\t/**\n\t\tPairwise combine differentiates itself in operation of depending on the presence of a child node\n\t\t*/\n\t\t\n\t\tif(min.Child==null){\n\t\t/*map acts as the table to store similar degree nodes*/\n\t\t\tHashMap<Integer, Nodefh> map = new HashMap<Integer, Nodefh>();\n\t\t\tcurrent = min.Right;\n\t\t\tmin = null;\n\t\t\tmin = current;\n\t\t\tlast = current.Left;\n\t\t\twhile(current!=last){\n\t\t\t\tNodefh check = new Nodefh();\n\t\t\t\tcheck = current.Right;\n\t\t\t\twhile(map.containsKey(current.degree)){\n\t\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\t\t\n\t\t\t\t\t/*Since a parent node can have only one child node a condition is checked to update its child node*/\n\t\t\t\t\tif(temp.dist < current.dist){\n\t\t\t\t\t/*If the node stored is less than the incoming node*/\n\t\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\t\tif(temp.isChildEmpty()){\n\t\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\t\tif(temp.Child == temp.Child.Right){\n\t\t\t\t\t\t\t\ttemp.Child.Right = current;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcurrent = temp;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t/*If the incoming node is lower*/\n\t\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\t\tcurrent.ChildCut = false;\t\n\t\t\t\t\t\tif(current.isChildEmpty()){\n\n\t\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif(min.dist >= current.dist){\n\t\t\t\t\tmin = current;\n\t\t\t\t}\n\t\t\t\tmap.put(current.degree, current);\n\t\t\t\tcurrent = check;\n\n\t\t\t}\n\t\t\tlast = min.Left;\n\t\t\t/*Since our condition is used only till last node and exits during last node the iteration is repeated for the last node*/\n\t\t\twhile(map.containsKey(current.degree)){\n\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\tif(temp.dist < current.dist){\n\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\tif(temp.isChildEmpty()){\n\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = temp;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\tcurrent.ChildCut = false;\n\t\t\t\t\tif(current.isChildEmpty()){\n\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(min.dist >= current.dist){\n\t\t\t\tmin = current;\n\t\t\t}\n\t\t\tcurrent = min;\n\t\t\tlast = min.Left;\n\n\t\t}\n\t\telse{\n\t\t\tHashMap<Integer, Nodefh> map = new HashMap<Integer, Nodefh>();\n\t\t\tcurrent = min.Child;\n\t\t\tcurrent.Parent = null;\n\t\t\tif(min!=min.Right){\n\t\t\t\tcurrent.Right.Left = min.Left;\n\t\t\t\tmin.Left.Right = current.Right;\n\t\t\t\tcurrent.Right = min.Right;\n\t\t\t\tmin.Right.Left = current;\n\t\t\t\tlast = current.Left;\n\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tlast = current.Left;\n\n\t\t\t}\n\t\t\tmin =null;\n\t\t\tmin = current;\n\t\t\t/*In the presence of a child the child has to be inserted at the top level*/\n\t\t\twhile(current != last){\n\t\t\t\tNodefh check = new Nodefh();\n\t\t\t\tcheck = current.Right;\n\n\t\t\t\twhile(map.containsKey(current.degree)){\n\n\t\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\t\tif(temp.dist < current.dist){\n\t\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\t\tif(temp.isChildEmpty()){\n\n\t\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrent = temp;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\t\tcurrent.ChildCut = false;\n\t\t\t\t\t\tif(current.isChildEmpty()){\n\t\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(min.dist >= current.dist){\n\t\t\t\t\tmin = current;\n\n\t\t\t\t}\n\t\t\t\tmap.put(current.degree, current);\n\t\t\t\tcurrent = check;\n\t\t\t}\n\t\t\tlast = min.Left;\n\t\t\twhile(map.containsKey(current.degree)){\n\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\tif(temp.dist < current.dist && temp.dist!=0){\n\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\tif(temp.isChildEmpty()){\n\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = temp;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\tcurrent.ChildCut = false;\n\t\t\t\t\tif(current.isChildEmpty()){\n\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(min.dist >= current.dist){\n\t\t\t\tmin = current;\n\n\t\t\t}\n\t\t\tcurrent = min;\n\t\t\tlast = min.Left;\n\t\t}\n\n\t}", "public int produce(int min, int max, int start, int subpopulation, Individual[] inds, ec.EvolutionState state, int thread)\n/* */ {\n/* 27 */ int n = this.sources[0].produce(min, max, start, subpopulation, inds, state, thread);\n/* */ \n/* */ \n/* */ \n/* 31 */ if (!state.random[thread].nextBoolean(this.likelihood)) {\n/* 32 */ return reproduce(n, start, subpopulation, inds, state, thread, false);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 38 */ if (!(this.sources[0] instanceof ec.BreedingPipeline)) {\n/* 39 */ for (int q = start; q < n + start; q++) {\n/* 40 */ inds[q] = ((Individual)inds[q].clone());\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 48 */ if (!(inds[start] instanceof TestCaseCandidate))\n/* 49 */ state.output.fatal(\"OurMutatorPipeline didn't get an Chromosome.The offending individual is in subpopulation \" + \n/* 50 */ subpopulation + \" and it's:\" + inds[start]);\n/* 51 */ ChromosomeSpecies species = (ChromosomeSpecies)inds[start].species;\n/* */ \n/* */ \n/* */ \n/* 55 */ for (int q = start; q < n + start; q++)\n/* */ {\n/* 57 */ TestCaseCandidate i = (TestCaseCandidate)inds[q];\n/* 58 */ double mutp = 1.0D / i.getGenes().size();\n/* */ \n/* 60 */ double[] propa = new double[i.getGenes().size()];\n/* 61 */ for (int x = 0; x < i.getGenes().size(); x++)\n/* 62 */ propa[x] = mutp;\n/* 63 */ for (int x = 0; x < i.getGenes().size(); x++) {\n/* 64 */ if (state.random[thread].nextBoolean(propa[x]))\n/* */ {\n/* */ \n/* 67 */ ((csbst.generators.AbsractGenerator)i.getGenes().get(x)).mutate();\n/* */ }\n/* */ }\n/* */ \n/* 71 */ i.evaluated = false;\n/* */ }\n/* */ \n/* 74 */ return n;\n/* */ }", "private Individual[] crossOver(Individual father, Individual mother){\n\t\tIndividual[] children = problem.makeChild(mother, father);\r\n\t\treturn children;\r\n\t}", "public List<Individual> crossover2Point2(Individual parent1, Individual parent2) {\n List <Individual> listOffsprings = new ArrayList<Individual>();\n Individual offspring1 = new Individual(parent1.getChromosomeLength());\n Individual offspring2 = new Individual(parent1.getChromosomeLength());\n int crossoverPoint1 = Service.rand(0, parent1.getChromosomeLength()-1);\n int crossoverPoint2 = Service.rand(crossoverPoint1 + 1, crossoverPoint1 + parent1.getChromosomeLength() - 1);\n\n for(int geneIndex = 0; geneIndex < parent1.getChromosomeLength(); geneIndex++) {\n if (crossoverPoint2 >= parent1.getChromosomeLength()) {\n if(geneIndex >= crossoverPoint1 || geneIndex < (crossoverPoint2 - parent1.getChromosomeLength())) {\n offspring1.setGene(geneIndex, parent2.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent1.getGene(geneIndex ));\n } else {\n offspring1.setGene(geneIndex, parent1.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent2.getGene(geneIndex ));\n }\n }else {\n if(geneIndex >= crossoverPoint1 && geneIndex < crossoverPoint2) {\n offspring1.setGene(geneIndex, parent2.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent1.getGene(geneIndex ));\n } else {\n offspring1.setGene(geneIndex, parent1.getGene(geneIndex ));\n offspring2.setGene(geneIndex, parent2.getGene(geneIndex ));\n }\n }\n }\n listOffsprings.add(offspring1);\n listOffsprings.add(offspring2);\n return listOffsprings;\n }", "protected abstract List<Individual> binaryOperation(List<Individual> acceptedFromLeft,\n List<Individual> acceptedFromRight);", "public Pair<Outbox, Boolean> mergeAdjacent(Outbox new_ob, Outbox last_ob) {\n\n int dim = new_ob.adjacent(last_ob);\n if ((dim != -1) && (!new_ob.sameSize(last_ob, dim))) dim = -1;\n if (dim != -1) new_ob.merge(last_ob, dim); //merge the two objects\n// if (dim!=-1) System.out.println(\"after merge:\"+new_ob);\n\n return new Pair<>(new_ob, dim != -1);\n\n }", "public Population evolve()\r\n {\r\n\tArrayList<Chromosome> tempPop = \r\n\t new ArrayList<Chromosome>(chromos.size());\r\n\tChromosome u;\r\n\tChromosome v;\r\n\r\n\tfor(int i = 0; i < chromos.size()/2; i++)\r\n\t {\r\n\t\tu = selectParent();\r\n\t\tv = selectParent();\r\n\t\t\r\n\t\t//System.out.println(\"*****Parent 1 : \\n\" + v);\r\n\t\t\r\n Chromosome c1 = u.child(v);\r\n Chromosome c2 = v.child(u);\r\n\t\ttempPop.add(c1);\r\n\t\ttempPop.add(c2);\r\n\t\t\r\n //System.out.println(\"****Generated new child: \\n\" + c1);\r\n\t }\t \r\n\t\r\n\t// if needed, add in the code for keeping the best chromosome\r\n\tPopulation pop = new Population(tempPop, selMethod, selPara, \r\n\t\t\t\t\tcrossMethod, crossPara, mutMethod, mutPara, \r\n\t\t\t\t\treplaceMethod, replacePara, powerStep, tourStep, ff);\r\n\r\n\tif(replaceMethod == ELITISM)\r\n\t {\r\n\t\tpop.remove(worstChromoIndex);\r\n\t\tpop.add(bestChromo.clone());\r\n\t\tpop.initialize();\r\n\t }\r\n\r\n\tgeneration++;\r\n\treturn pop;\r\n }", "private void phaseTwo(){\r\n\r\n\t\tCollections.shuffle(allNodes, random);\r\n\t\tList<Pair<Node, Node>> pairs = new ArrayList<Pair<Node, Node>>();\r\n\t\t\r\n\t\t//For each node in allNode, get all relationshpis and iterate through each relationship.\r\n\t\tfor (Node n1 : allNodes){\r\n\r\n\t\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t\t//If a node n1 is related to any other node in allNodes, add those relationships to rels.\r\n\t\t\t\t//Avoid duplication, and self loops.\r\n\t\t\t\tIterable<Relationship> ite = n1.getRelationships(Direction.BOTH);\t\t\t\t\r\n\r\n\t\t\t\tfor (Relationship rel : ite){\r\n\t\t\t\t\tNode n2 = rel.getOtherNode(n1);\t//Get the other node\r\n\t\t\t\t\tif (allNodes.contains(n2) && !n1.equals(n2)){\t\t\t\t\t//If n2 is part of allNodes and n1 != n2\r\n\t\t\t\t\t\tif (!rels.contains(rel)){\t\t\t\t\t\t\t\t\t//If the relationship is not already part of rels\r\n\t\t\t\t\t\t\tPair<Node, Node> pA = new Pair<Node, Node>(n1, n2);\r\n\t\t\t\t\t\t\tPair<Node, Node> pB = new Pair<Node, Node>(n2, n1);\r\n\r\n\t\t\t\t\t\t\tif (!pairs.contains(pA)){\r\n\t\t\t\t\t\t\t\trels.add(rel);\t\t\t\t\t\t\t\t\t\t\t//Add the relationship to the lists.\r\n\t\t\t\t\t\t\t\tpairs.add(pA);\r\n\t\t\t\t\t\t\t\tpairs.add(pB);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttx.success();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn;\r\n\t}", "private Vector step(){\n// System.out.println();\n// System.out.println(generationCount);\n// System.out.println(\"The Population is:\");\n// System.out.println(population);\n \n //DETERMINE WHO SURVIVES INTO NEXT GENERATION\n Vector nextGeneration = surviveType.run(population, fitnessArray);\n\n //DO THE CROSSOVER PROCESS\n //WHILE THE NEXT GENERATION ISN'T FULL\n while (nextGeneration.size() < (populationSize - randGenes)){\n //FIND PARENTS\n Gene parentOne, parentTwo;\n do {\n Gene[] parents = selectType.run(population, fitnessArray);\n parentOne = parents[0];\n parentTwo = parents[1];\n } while (selectPairs && (! closeEnough(parentOne, parentTwo)));\n //ADD CHILDREN\n Gene[] kids = crossType.children(parentOne, parentTwo);\n\n nextGeneration.add(kids[0]);\n if (nextGeneration.size() < (populationSize - randGenes)){\n nextGeneration.add(kids[1]);\n }\n }\n //ADD RANDOM GENES TO THE POPULATION\n while (nextGeneration.size() < populationSize){\n nextGeneration.add(initializer.createRandomGene(fitnessFunction, minRadius, maxRadius));\n }\n //MUTATE THE NEXT GENERATION\n for (int j = 0; j < populationSize; j++){\n if (Math.random() < mutationProb){\n nextGeneration.set(j, mutationType.run((Gene) nextGeneration.get(j)));\n }\n }\n\n //COMPUTE FITNESSES AND RELOCATE IF NECESSARY\n Gene bestGene = (Gene) nextGeneration.get(0);\n int bestX = 0;\n for (int x = 0; x < populationSize; x++){\n Gene next = (Gene) nextGeneration.get(x);\n while (relocationType.move(bannedList, next)){\n Gene newGene = initializer.createRandomGene(fitnessFunction, minRadius, maxRadius);\n next = newGene;\n nextGeneration.set(x, next);\n }\n fitnessArray[x] = next.getFitness();\n\n //FOR THE PURPOSES OF UPDATING THE BANNED LIST\n if (next.getFitness() > bestGene.getFitness()){\n bestGene = next;\n bestX = x;\n }\n } //End for (int x = 0;...\n\n Arrays.sort(fitnessArray);\n\n //UPDATE THE BANNED LIST BY ADDING THE BEST GENE IN THE NEXT GENERATION IF IT'S ABOVE minAccepted AND CONTAINS MORE THAN minPoints POINTS\n if (useList){\n if ((generationCount >= firstAdd) &&\n (solutionCounter >= countNum) &&\n (bestGene.getFitness() >= minAccepted) &&\n (bestGene.getCount() >= minPoints)){\n solutionCounter = 0;\n// System.out.println(bestGene);\n Gene bestClone = new Gene (bestGene.getMajorAxisRadius(), //THIS KLUDGE IS DONE B/C .clone() IS\n bestGene.getMinorAxisRadius(), //PROTECTED, AND I CAN'T UNPROTECT IT.\n bestGene.getX(), //I USE A CLONED GENE TO PREVENT A MUTATION\n bestGene.getY(), //IN THE NEXT GENERATION FROM ALTERING bannedList\n bestGene.getOrientation(),\n bestGene.getFunction());\n bannedList = relocationType.updateBannedList(bannedList, bestClone);\n\n\n //IF NECESSARY, UPDATE THE SOLUTION LIST BY ADDING ALL CLUSTERS WITH MORE THAN minPoints POINTS AND A FITNESS OF AT LEAST minAccepted\n if (returnAllSolutions){\n for (int i = 0; i < populationSize; i++){\n Gene next = (Gene) nextGeneration.get(i);\n if ((next.getFitness() >= minAccepted) && (next.getCount() >= minPoints)){\n solutionList.add(next);\n }\n }//End for (int i = 0...\n } else {\n solutionList = bannedList;\n } //End if (returnAllSolutions){...}else{\n } //End if (generationCount > 4...\n } //End if (useList){\n\n generationCount = generationCount + 1;\n solutionCounter = solutionCounter + 1;\n\n //IF AVOIDING CONVERGENCE, AND IT HAS CONVERGED, START OVER WITH RANDOM GENES\n\n double bestFitness = bestGene.getFitness();\n double medianFitness = roundToHundredths((double) fitnessArray[(int) Math.floor(populationSize / 2)]);\n\n// System.out.println(bestFitness);\n// System.out.println(medianFitness);\n\n if ((antiConvergence) &&\n ((bestFitness - medianFitness) < (0.01 * bestFitness)) &&\n (generationCount > firstAdd)){\n nextGeneration = initializer.getGenes(populationSize, fitnessFunction, minRadius, maxRadius);\n// System.out.println(\"EXPLODED CONVERGENCE!\");\n for (int x = 0; x < populationSize; x++){\n Gene next = (Gene) nextGeneration.get(x);\n fitnessArray[x] = next.getFitness();\n }\n Arrays.sort(fitnessArray);\n }\n\n return nextGeneration;\n }", "protected DNA NEATcross(DNA other) {\n\t\tDNA hifit;\n\t\tDNA lofit;\n\n\t\tif (this.fitness == null || other.fitness == null)\n\t\t\treturn null;\n\n\t\tDNA ret = new DNA(population, false);\n\n\t\t// Choose the genome with the higher fitness\n\t\tif (this.fitness > other.fitness) {\n\t\t\thifit = this;\n\t\t\tlofit = other;\n\t\t} else {\n\t\t\thifit = this;\n\t\t\tlofit = other;\n\t\t}\n\n\t\t// Populate gene list of ret\n\t\tfor (Integer i : hifit.getInnovations()) {\n\t\t\tGene submission;\n\t\t\tif (!lofit.hasGene(i)) {\n\t\t\t\tsubmission = hifit.getGene(i);\n\t\t\t} else {\n\t\t\t\tGene newgene;\n\t\t\t\tif (Braincraft\n\t\t\t\t\t\t.randomChance(population.inheritFromHigherFitRate))\n\t\t\t\t\tnewgene = new Gene(hifit.getGene(i));\n\t\t\t\telse\n\t\t\t\t\tnewgene = new Gene(lofit.getGene(i));\n\t\t\t\tif (!hifit.getGene(i).enabled || !lofit.getGene(i).enabled) {\n\t\t\t\t\tif (Braincraft.randomChance(population.disabledRate))\n\t\t\t\t\t\tnewgene.enabled = false;\n\t\t\t\t\telse\n\t\t\t\t\t\tnewgene.enabled = true;\n\t\t\t\t}\n\t\t\t\tsubmission = newgene;\n\t\t\t}\n\t\t\tif (!ret.hasNode(submission.start)) {\n\t\t\t\tret.submitNewNode(hifit.getNode(submission.start));\n\t\t\t}\n\t\t\tif (!ret.hasNode(submission.end)) {\n\t\t\t\tret.submitNewNode(hifit.getNode(submission.end));\n\t\t\t}\n\t\t\tret.submitNewGene(submission);\n\t\t}\n\n\t\tif (Braincraft.randomChance(population.weightMutationRate))\n\t\t\tret.mutateWeights();\n\t\tif (Braincraft.randomChance(population.linkMutationRate))\n\t\t\tret.mutateAddLink();\n\t\tif (Braincraft.randomChance(population.nodeMutationRate))\n\t\t\tret.mutateAddNode();\n\t\tif (Braincraft.randomChance(population.linkDisableRate))\n\t\t\tret.mutateDisableLink();\n\n\t\treturn ret;\n\t}", "private <T> List<Chromosome<T>> breedNewGeneration(List<Chromosome<T>> chromosomes){\n\t\tList<Chromosome<T>> selected = selection.apply(chromosomes);\n\t\tCollections.shuffle(selected);\n\n\t\tList<Chromosome<T>> crossedOver = Lists.newArrayList();\n\t\tfor(int i = 0; i < selected.size(); i+=2){\n\t\t\tChromosome<T>[] bred = crossover.apply(selected.get(i), selected.get(i+1));\n\t\t\tcrossedOver.add(bred[0]);\n\t\t\tcrossedOver.add(bred[1]);\n\t\t}\n\n\t\treturn crossedOver.stream().map(mutation::apply).collect(Collectors.toList());\n\t}", "private ClusterCombination checkAndDoJoinMultiPearson(ClusterCombination CC1, ClusterCombination CC2) {\n boolean doJoin = true;\r\n ArrayList<Cluster> CCList = new ArrayList<>(CC1.getClusters().size()+1); //list of output clusters for new CC if join is succesfull\r\n\r\n ArrayList<Cluster> CC1Clusters = CC1.getClusters();\r\n ArrayList<Cluster> CC2Clusters = CC2.getClusters();\r\n\r\n ArrayList<Cluster> LHS1 = CC1.getLHS();\r\n ArrayList<Cluster> LHS2 = CC2.getLHS();\r\n\r\n ArrayList<Cluster> RHS1 = CC1.getRHS();\r\n ArrayList<Cluster> RHS2 = CC2.getRHS();\r\n\r\n for(int i =0; i<CC1Clusters.size()-1; i++) {\r\n Cluster C1 = CC1Clusters.get(i);\r\n Cluster C2 = CC2Clusters.get(i);\r\n\r\n boolean overlap = checkClusterOverlap(C1, C2); // check if there is some overlap\r\n\r\n\r\n\r\n if(!overlap){ //the cluster in this position does not overlap, we don't need to join\r\n doJoin=false;\r\n break;\r\n }else{ // there is overlap, add the intersection of C1 and C2\r\n if(C1.getNPoints() <= C2.getNPoints()){\r\n CCList.add(C1);\r\n }else{\r\n CCList.add(C2);\r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n if(doJoin){ // each cluster in the candidate (except the last) does overlap\r\n // so, according to apriori, we join -> return the overlapping clusters + the last clusters of CC1 and CC2\r\n Cluster lastCC1 = CC1Clusters.get(CC1Clusters.size()-1);\r\n Cluster lastCC2 = CC2Clusters.get(CC2Clusters.size()-1);\r\n if(lastCC1.getClusterId() <= lastCC2.getClusterId()){ // make sure to respect ordering of clusters within a candidate by ID. otherwise this could be designated as a duplicate\r\n CCList.add(lastCC1); CCList.add(lastCC2);\r\n }else{\r\n CCList.add(lastCC2); CCList.add(lastCC1);\r\n }\r\n\r\n ArrayList<Cluster> newLHS = new ArrayList<>();\r\n ArrayList<Cluster> newRHS = new ArrayList<>();\r\n for(int i = 0; i<LHS1.size(); i++){\r\n newLHS.add(CCList.get(i));\r\n }\r\n for(int i = LHS1.size(); i<CCList.size(); i++){\r\n newRHS.add(CCList.get(i));\r\n }\r\n\r\n ClusterCombination newCC = new MultiPearsonClusterCombination(newLHS, newRHS);\r\n newCC.checkAndSetMaxSubsetLowerBound(Math.max(CC1.getLB(), CC1.getMaxLowerBoundSubset()));\r\n newCC.checkAndSetMaxSubsetLowerBound(Math.max(CC2.getLB(), CC2.getMaxLowerBoundSubset()));\r\n\r\n return newCC;\r\n\r\n }else{\r\n return null;\r\n }\r\n }", "public GeometryFacetBoundablePair(Boundable node1, Boundable node2)\r\n {\r\n this.boundable1 = node1;\r\n this.boundable2 = node2;\r\n minDistance = distance();\r\n }", "ITree combine(int leftLength, int rightLength, double leftTheta, double rightTheta,\n ITree otherTree);", "Tour crossOver(Tour p2, int x1, int x2) {\r\n\t\t// make an empty tour and then fill it in\r\n\t\tTour child = new Tour();\r\n\r\n\t\t// copy the 1st segment of (this) to the child\r\n\t\tfor (int i = 0; i < x1; i++) {\r\n\t\t child.index[i] = this.index[i];\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i = x1; i <= x2; i++) {\r\n\t\t child.index[i] = p2.index[i];\r\n\t\t}\r\n\t\t// copy the cross-over portion of p2 to the child\r\n\t\t\r\n for (int i = x2 + 1; i < index.length; i++) {\r\n child.index[i] = this.index[i];\r\n }\t\t\r\n\t\t// copy the last segment of (this) to the child\r\n\r\n\t\t// Now we need to correct the child for any duplicate cities\r\n\t\t\r\n\t\t// First find out the unique elements of the cross-over segment\r\n\t\t// i.e., those elements of the cross-over segment of\r\n\t\t// p1 that are not in p2\r\n\t\tint[] uniq = new int[x2 - x1 + 1];\r\n\t\tint k = 0;\r\n\t\tboolean found = false;\r\n for (int i = x1; i <= x2; i++) {\r\n for (int j = x1; j <= x2; j++) {\r\n if (this.index[i] == p2.index[j]) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n if (found) {\r\n found = false;\r\n continue;\r\n }\r\n uniq[k] = this.index[i];\r\n k++;\r\n }\r\n System.out.println();\r\n\t\t// *** TODO ***\r\n \r\n k--;\r\n found = false;\r\n for (int i = x1; i <= x2; i++) {\r\n for (int j = 0; j < x1; j++) {\r\n if (child.index[i] == child.index[j]) {\r\n child.index[i] = uniq[k];\r\n k--;\r\n found = true;\r\n break;\r\n }\r\n }\r\n \r\n if (found) {\r\n found = false;\r\n continue;\r\n }\r\n \r\n for (int j = x2 + 1; j < index.length; j++) {\r\n if (child.index[i] == child.index[j]) {\r\n child.index[i] = uniq[k];\r\n k--;\r\n break;\r\n }\r\n }\r\n }\r\n\t\t// scan the two portions of p1 that have been crossed into the\r\n\t\t// the child for any duplicates in the crossed-over \r\n\t\t// segment and if so replace with an element from the uniq list\r\n\t\t\r\n\t\tchild.distance = child.distance();\r\n\t\treturn child;\r\n\t}", "public static Graph_chromosome generateChild(Graph_chromosome parent1,\r\n\t\t\tGraph_chromosome parent2 )\r\n\t{\r\n\t\tRandom random_generator = new Random();\r\n\t\tint crossover_point = random_generator.nextInt(parent1.chromosome_size);\r\n\t\t\r\n\t\tGraph_chromosome child = new Graph_chromosome(parent1.chromosome_size,parent1.num_colors);\r\n\t\t\r\n\t\tfor(int i=0;i<child.chromosome_size;i++)\r\n\t\t{\r\n\t\t\tif(i<crossover_point)\r\n\t\t\t\tchild.chromosome[i] = parent1.getChromosomeAt(i+1);\r\n\t\t\telse\r\n\t\t\t\tchild.chromosome[i] = parent2.getChromosomeAt(i+1);\r\n\t\t}\r\n\t\treturn child;\r\n\t}", "abstract int[] crossOver();", "@Override\n public Tuple nonDistinctNext() {\n //function takes tuples from o2, merges them with t1 from o1 and\n //evaluates them, if it finds a fitting Tuple, returns the result of merge;\n while (tuple1 != null) {\n Tuple tuple2 = o2.nonDistinctNext();\n\n while (tuple2 != null) {\n Tuple result = tupleTrans.transform(new Tuple(tuple1, tuple2));\n if (result != null) {\n return result;\n }\n tuple2 = o2.nonDistinctNext();\n }\n\n //if o2 runs out of Tupes, new t1 is taken from o1 and o2 is reset\n tuple1 = o1.nonDistinctNext();\n o2.reset();\n }\n //if o1 runs out of tuples (t1 == null), the operator is at the end\n return null;\n }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "public ClothingPair(E left, E right) {\n super(left, right);\n }", "public EvPopulation<T> apply(EvPopulation<T> population) {\n\n int population_size = population.size();\n\n combine_parent_selector.init(population, 2, population_size);\n\n EvPopulation<T> result = new EvPopulation<T>(population_size + 3);\n\n // Generate children since population is not filled\n while (result.size() < population_size)\n combine(combine_parent_selector.getNextParents(), result);\n\n // Remove overfull\n while (result.size() > population_size)\n result.remove(result.size() - 1);\n\n return result;\n }", "private int[][] crossoverTwoPoint(int[] parent1, int[] parent2) {\n\t\tint crossPoint1 = rand.nextInt(parent1.length);\n\t\tint crossLength = rand.nextInt(parent1.length + 1 - crossPoint1);\n\t\tint crossPoint2 = crossPoint1 + crossLength;\n\n\t\tint[] child = new int[parent1.length];\n\t\tint[] child2 = new int[parent1.length];\n\t\tfor (int i = crossPoint1; i < crossPoint2; i++) {\n\t\t\tchild[i] = parent1[i]; //items between cross points are direct copied from p1\n\t\t\tchild2[i] = parent2[i]; //opposite for child 2\n\t\t}\n\t\tfor (int i = 0; i < crossPoint1; i++) {\n\t\t\tchild[i] = parent2[i]; //items on either side copied direct from p2\n\t\t\tchild2[i] = parent1[i]; //opposite for child 2\n\t\t}\n\t\tfor (int i = crossPoint2; i < parent1.length; i++) {\n\t\t\tchild[i] = parent2[i]; //items on either side copied direct from p2\n\t\t\tchild2[i] = parent1[i]; //opposite for child 2\n\t\t}\n\t\treturn new int[][] { child, child2 };\n\t}", "public abstract Individual doCrossover(Individual ind1, Individual ind2, MOEAD init);", "@Test\n\tpublic void addPairToSet2Test() {\n\t\tClone subLeft = createMock(Clone.class);\n\t\tClone subRight = createMock(Clone.class);\n\t\t\n\t\tParseTree subLeftTree = createMock(ParseTree.class);\n\t\tParseTree subRightTree = createMock(ParseTree.class);\n\t\t\n\t\tClone other = createMock(Clone.class);\n\t\tParseTree otherTree = createMock(ParseTree.class);\n\t\t\n\t\texpect(subLeft.getParseTree()).andReturn(subLeftTree).anyTimes();\n\t\texpect(subRight.getParseTree()).andReturn(subRightTree).anyTimes();\n\t\texpect(other.getParseTree()).andReturn(otherTree).anyTimes();\n\t\t\n\t\texpect(leftTree.getChildCount()).andReturn(1).anyTimes();\n\t\texpect(leftTree.getChild(0)).andReturn(subLeftTree).anyTimes();\n\t\t\n\t\texpect(rightTree.getChildCount()).andReturn(1).anyTimes();\n\t\texpect(rightTree.getChild(0)).andReturn(subRightTree).anyTimes();\n\t\t\n\t\texpect(subLeftTree.getChildCount()).andReturn(0).anyTimes();\n\t\texpect(subRightTree.getChildCount()).andReturn(0).anyTimes();\n\t\t\n\t\texpect(otherTree.getChildCount()).andReturn(0).anyTimes();\n\t\t\n\t\treplay(left);\n\t\treplay(leftTree);\n\t\treplay(subLeft);\n\t\treplay(subLeftTree);\n\t\treplay(right);\n\t\treplay(rightTree);\n\t\treplay(subRight);\n\t\treplay(subRightTree);\n\t\treplay(other);\n\t\treplay(otherTree);\n\t\t\n\t\tclones.addClonePair(subLeft, subRight);\n\t\tclones.addClonePair(subRight, other);\n\t\t\n\t\tassertEquals(1, clones.size());\n\t\t\n\t\tclones.addClonePair(left, right);\n\t\t\n\t\tassertEquals(2, clones.size());\n\t\t\n\t\tassertEquals(2, clones.getItem(0).size());\n\t\tassertEquals(2, clones.getItem(1).size());\n\t\t\n\t\tverify(left);\n\t\tverify(leftTree);\n\t\tverify(subLeft);\n\t\tverify(subLeftTree);\n\t\tverify(right);\n\t\tverify(rightTree);\n\t\tverify(subRight);\n\t\tverify(subRightTree);\n\t\tverify(other);\n\t\tverify(otherTree);\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic void crossover() {\r\n\t\tfinal double CROSSOVER_PROB = 0.5;\r\n\t\tfor (int i=0; i<this.nChromosomes-(this.nChromosomes%2); i=i+2) {\r\n\t\t\tif (Math.random() < CROSSOVER_PROB) {\r\n\t\t\t\tArrayList<Integer> chr1 = (ArrayList<Integer>) this.chromosomes.get(i);\r\n\t\t\t\tArrayList<Integer> chr2 = (ArrayList<Integer>) this.chromosomes.get(i+1);\r\n\t\t\t\t// Uniform crossover\r\n\t\t\t\tif (!chr1.equals(chr2)) {\r\n\t\t\t\t\tfor (int j=0; j<this.nViaPoints; j=j+2) {\r\n\t\t\t\t\t\t// swap via points between 2 chromosomes\r\n\t\t\t\t\t\tInteger tmp = chr2.get(j);\r\n\t\t\t\t\t\tchr2.remove(j);\r\n\t\t\t\t\t\tchr2.add(j, chr1.get(j));\r\n\t\t\t\t\t\tchr1.remove(j);\r\n\t\t\t\t\t\tchr1.add(j, tmp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.printChromosomes(\"After crossover\");\r\n\t}", "private TreeNode<K> combine(TreeNode<K> x, TreeNode<K> y) {\n TreeNode<K> z = new TreeNode<K>();\n z.left = x;\n z.right = y;\n z.rank = x.rank + 1;\n sift(z);\n return z;\n }", "public void merge(Tuple tup) {\n\t\t\n\t}", "public Chromosome doInsertionMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n boolean value = newSelection.get(allele2);\n\n newSelection.remove(allele2);\n try{\n newSelection.add(allele1 + 1, value);\n }\n catch(IndexOutOfBoundsException e){\n newSelection.add(value);\n }\n \n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "public static List<Future<Result>> createEnergyJobs(List<List<Rotamer>> rotamerSpace, Peptide startingPeptide, Set<RotamerPair> incompatiblePairs,\n ConcurrentHashMap<Rotamer,Double> tempMap1, ConcurrentHashMap<RotamerPair,Double> tempMap2,\n AtomicDouble backboneEnergy)\n {\n //System.out.println(new Date());\n //System.out.print(\"Preparing to create energy jobs...\");\n\n // create all glycine peptide\n Peptide templatePeptide = startingPeptide;\n ProtoAminoAcid glycine = ProtoAminoAcidDatabase.getTemplate(\"standard_glycine\");\n for (Residue residue : templatePeptide.sequence)\n {\n if ( residue.isHairpin )\n continue;\n templatePeptide = SidechainMutator.mutateSidechain(templatePeptide, residue, glycine);\n }\n\n // create jobs\n //System.out.print(\"single rotamer jobs...\");\n List<Future<Result>> futures = new ArrayList<>(); \n \n // create rotamer jobs\n // we minimize the amount of work by going across each row of rotamers\n // that is, we take the first rotamer at each position and make a peptide\n // then we go down the list, skipping positions where there aren't enough rotamers\n // incompatibles should not be an issue because those interactions will be ignored\n int maxIndex = 0;\n for (List<Rotamer> list : rotamerSpace)\n {\n if ( list.size() - 1 > maxIndex )\n maxIndex = list.size() -1;\n }\n\n for (int i=0; i <= maxIndex; i++)\n {\n List<Rotamer> theseRotamers = new LinkedList<>();\n for (List<Rotamer> list : rotamerSpace) \n {\n if ( i < list.size() )\n theseRotamers.add( list.get(i) );\n }\n ImmutableList<Rotamer> theseRotamers2 = ImmutableList.copyOf(theseRotamers);\n RotamerEnergyJob job = new RotamerEnergyJob(templatePeptide, theseRotamers2, theseRotamers2, tempMap1, backboneEnergy);\n Future<Result> f = GeneralThreadService.submit(job);\n futures.add(f);\n }\n\n // create rotamer pair jobs\n // we save time by just computing the interactions between the rotamers without the backbone present\n //System.out.println(new Date());\n //System.out.println(\"rotamer pair jobs...\");\n AStarEnergyCalculator.PairIterator iterator = new AStarEnergyCalculator.PairIterator(rotamerSpace, 1000);\n int count = 0;\n while (iterator.hasNext())\n {\n count++;\n LinkedListMultimap<Rotamer,Rotamer> thisBatch = iterator.next();\n RotamerPairEnergyJob job = new RotamerPairEnergyJob(templatePeptide, incompatiblePairs, thisBatch, tempMap2);\n Future<Result> f = GeneralThreadService.submit(job);\n futures.add(f);\n //System.out.printf(\"%d jobs created \\r\", count);\n }\n //System.out.println(\"\\nAll jobs created.\");\n return futures;\n }", "private Evolvable zipperCross(Evolvable parent1, Evolvable parent2)\n\t{\n\t\tint[] dnaP1 = ((SNSAgent)parent1).getDna();\n\t\t//dna of second parent\n\t\tint[] dnaP2 = ((SNSAgent)parent2).getDna();\n\t\t\n\t\t//result dna\n\t\tint dnaChild[] = new int[3000];\n\t\t//simple cross\n\t\tfor(int i = 0; i < 3000; i++)\n\t\t{\t\t\n\t\t\tif(i%2 == 0)\n\t\t\t\tdnaChild[i] = dnaP1[i];\n\t\t\telse\n\t\t\t\tdnaChild[i] = dnaP2[i];\n\t\t}\n\t\treturn new SNSAgent(dnaChild, ((SNSAgent)parent1).behavior);\t\n\t}", "IntermediateTuple(Tuple t1, Tuple t2) {\n\n if(t1 instanceof BaseTuple) {\n baseTuples.add((BaseTuple) t1);\n } else {\n for(BaseTuple bt : ((IntermediateTuple) t1).baseTuples) {\n baseTuples.add(bt);\n }\n }\n\n if(t2 instanceof BaseTuple) {\n baseTuples.add((BaseTuple) t2);\n } else {\n for(BaseTuple bt : ((IntermediateTuple) t2).baseTuples) {\n baseTuples.add(bt);\n }\n }\n }", "@Test\n public void testConsideredOperators() {\n EmptyValues secondFragmentLeaf = new EmptyValues(prop(2, 2), BatchSchema.SCHEMA_UNKNOWN_NO_DATA);\n Project secondFragmentProject1 = new Project(prop(2, 1), secondFragmentLeaf, null);\n Project secondFragmentProject0 = new Project(prop(2, 0), secondFragmentProject1, null);\n\n // Fragment 3\n EmptyValues thirdFragmentLeaf1 = new EmptyValues(prop(3, 1), BatchSchema.SCHEMA_UNKNOWN_NO_DATA);\n Project thirdFragmentProject0 = new Project(prop(3, 0), thirdFragmentLeaf1, null);\n\n // Fragment 1\n HashToRandomExchange hashToRandomExchange2 = new HashToRandomExchange(prop(1, 2),\n secondFragmentProject0.getProps(), null, null, BatchSchema.SCHEMA_UNKNOWN_NO_DATA, secondFragmentProject1, null, options);\n Project firstFragmentProject1 = new Project(prop(1, 1), hashToRandomExchange2, null);\n HashToRandomExchange hashToRandomExchange4 = new HashToRandomExchange(prop(1, 4),\n thirdFragmentProject0.getProps(), null, null, BatchSchema.SCHEMA_UNKNOWN_NO_DATA, secondFragmentProject1, null, options);\n Project firstFragmentProject3 = new Project(prop(1, 3), hashToRandomExchange4, null);\n HashJoinPOP hashJoinPOP = new HashJoinPOP(prop(1, 0).cloneWithMemoryExpensive(true), firstFragmentProject1, firstFragmentProject3,\n null, null, null, false, null);\n\n MemoryAllocationUtilities.FindConsideredOperators fco = new MemoryAllocationUtilities.FindConsideredOperators(1);\n hashJoinPOP.accept(fco, null);\n List<PhysicalOperator> consideredOperators = fco.getConsideredOperators();\n List<PhysicalOperator> nonConsideredOperators = fco.getNonConsideredOperators();\n\n assertEquals(1, consideredOperators.size()); // HashJoin\n assertTrue(consideredOperators.stream().allMatch(op -> op.getProps().getMajorFragmentId() == 1));\n assertEquals(1, consideredOperators.stream().map(op -> op.getProps().getLocalOperatorId()).distinct().count());\n\n assertEquals(4, nonConsideredOperators.size());\n assertTrue(nonConsideredOperators.stream().allMatch(op -> op.getProps().getMajorFragmentId() == 1));\n // no operator is visited more than once\n assertEquals(4, nonConsideredOperators.stream().map(op -> op.getProps().getLocalOperatorId()).distinct().count());\n\n\n fco = new MemoryAllocationUtilities.FindConsideredOperators(2);\n secondFragmentProject0.accept(fco, null);\n consideredOperators = fco.getConsideredOperators();\n nonConsideredOperators = fco.getNonConsideredOperators();\n\n assertEquals(0, consideredOperators.size());\n\n assertEquals(3, nonConsideredOperators.size());\n assertTrue(nonConsideredOperators.stream().allMatch(op -> op.getProps().getMajorFragmentId() == 2));\n assertEquals(3, nonConsideredOperators.stream().map(op -> op.getProps().getLocalOperatorId()).distinct().count());\n\n fco = new MemoryAllocationUtilities.FindConsideredOperators(3);\n thirdFragmentProject0.accept(fco, null);\n consideredOperators = fco.getConsideredOperators();\n nonConsideredOperators = fco.getNonConsideredOperators();\n\n assertEquals(0, consideredOperators.size());\n\n assertEquals(2, nonConsideredOperators.size());\n assertTrue(nonConsideredOperators.stream().allMatch(op -> op.getProps().getMajorFragmentId() == 3));\n assertEquals(2, nonConsideredOperators.stream().map(op -> op.getProps().getLocalOperatorId()).distinct().count());\n\n\n // visiting wrong fragment root\n fco = new MemoryAllocationUtilities.FindConsideredOperators(3);\n secondFragmentProject0.accept(fco, null); // fco visiting fragment 2 root instead of fragment 3\n consideredOperators = fco.getConsideredOperators();\n nonConsideredOperators = fco.getNonConsideredOperators();\n\n assertEquals(0, consideredOperators.size());\n assertEquals(0, nonConsideredOperators.size());\n }", "private void crossProduct() {\n BaseCandidateElement[] it = o.inputObject.firstStageCandidates.values().toArray(new BaseCandidateElement[0]);\n // logger.info(Arrays.toString(it));\n for (int i = 0; i < it.length; i++) {\n for (int j = i + 1; j < it.length; j++) {\n if (PrecisConfigProperties.HIERARCHY_DIMS_ENABLED && hierarchyDimsNegation.checkIfBelongToSameHierarchyGroup(it[i], it[j]))\n continue;\n if (it[i].xor(it[j]).cardinality() == 4) {\n BitSet b = it[i].or(it[j]);\n o.inputObject.addCandidate(b);\n }\n }\n }\n }", "private static Set<Chromosome> crossoverPopulation(ArrayList<Chromosome> population, int populationSize, int crossoverSize) {\n\n // declare a set of chromosomes which will store all thr chromosomes generated by the crossover operation\n Set<Chromosome> crossoverChromosomes = new HashSet<>();\n\n while (crossoverChromosomes.size() < crossoverSize) {\n // retrieve a set of chromosomes (of size 2) on which crossover will occur\n // using the Rank-Based Roulette Wheel Selection method\n Set<Chromosome> selectedChromosomes = rankBasedRouletteWheelSelection(population, populationSize);\n\n // store the 2 Chromosomes in parent 1 and parent 2\n Chromosome parent1 = selectedChromosomes.iterator().next();\n selectedChromosomes.remove(parent1);\n Chromosome parent2 = selectedChromosomes.iterator().next();\n\n // perform crossover using the crossoverChromosomes method\n // the method is called twice, switching the order of the parents for the second time, since SCX produces only\n // one child, however produces a different child when the parents are switched\n crossoverChromosomes.add(crossover(parent1, parent2));\n crossoverChromosomes.add(crossover(parent2, parent1));\n }\n\n return crossoverChromosomes;\n }", "public Pair(A primer, B segon) {\n this.primer = primer;\n this.segon = segon;\n }", "public Potential combine(Potential p) {\n Vector v, v1, v2;\n FiniteStates aux;\n int i, nv;\n PotentialTree pot;\n double x;\n ProbabilityTree tree, tree1, tree2;\n \n if (p instanceof elvira.potential.PTreeCredalSet) {\n v1 = variables; // Variables of this potential.\n v2 = p.variables; // Variables of the argument.\n v = new Vector(); // Variables of the new potential.\n \n for (i=0 ; i<v1.size() ; i++) {\n aux = (FiniteStates)v1.elementAt(i);\n v.addElement(aux);\n }\n for (i=0 ; i<v2.size() ; i++) {\n aux = (FiniteStates)v2.elementAt(i);\n if (aux.indexOf(v1) == -1)\n v.addElement(aux);\n }\n // The new Potential.\n pot = new PTreeCredalSet(v);\n tree1 = getTree(); // Tree of this potential.\n tree2 = ((PTreeCredalSet)p).getTree(); // Tree of the argument.\n tree = ProbabilityTree.combine(tree1,tree2); // The new tree.\n pot.setTree(tree);\n }\n else {\n System.out.println(\"Error in PTreeCredalSet.combine(Potential p): argument p was not a PTreeCredalSet\");\n System.exit(1);\n pot = this;\n }\n return pot;\n }", "public Chromosome doExchangeMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n Collections.swap(newSelection, allele1, allele2);\n\n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "private OCCTPair<Double, Integer> calculateSplitScoreInternal(Instances i1, Instances i2)\n throws Exception {\n // Handle empty case\n double sumOfScores = 0;\n int comparisonsCount = 0;\n if ((i1.numInstances()) > 0 && (i2.numInstances() > 0)) {\n // Calculate the sum of similarities of all possible pairs of records,\n Enumeration inst1Enum = i1.enumerateInstances();\n while (inst1Enum.hasMoreElements()) {\n Instance currentI1 = (Instance) inst1Enum.nextElement();\n Enumeration inst2Enum = i2.enumerateInstances();\n while (inst2Enum.hasMoreElements()) {\n Instance currentI2 = (Instance) inst2Enum.nextElement();\n sumOfScores += this.calculateSplitScoreForInstancesPair(currentI1, currentI2);\n ++comparisonsCount;\n }\n }\n }\n // Return the result - don't calculate here the final score\n return new OCCTPair<Double, Integer>(sumOfScores, comparisonsCount);\n }", "public interface Pair {\n /**\n * @return the x value from the pair\n */\n public int getX();\n\n /**\n * @return the y value from the pair\n */\n public int getY();\n\n /**\n * @param other the pair to add to this pair\n * @return a pair with the given pair's x and y values added onto this one's\n */\n public Pair add(Pair other);\n\n /**\n * @param other the pair to subtract this pair\n * @return a pair with the given pair's x and y values subtracted from this one's\n */\n public Pair subtract(Pair other);\n}", "@Test\n\tpublic void addPairToSet1Test() {\n\t\tClone subLeft = createMock(Clone.class);\n\t\tClone subRight = createMock(Clone.class);\n\t\t\n\t\tParseTree subLeftTree = createMock(ParseTree.class);\n\t\tParseTree subRightTree = createMock(ParseTree.class);\n\t\t\n\t\texpect(subLeft.getParseTree()).andReturn(subLeftTree).anyTimes();\n\t\texpect(subRight.getParseTree()).andReturn(subRightTree).anyTimes();\n\t\t\n\t\texpect(leftTree.getChildCount()).andReturn(1).anyTimes();\n\t\texpect(leftTree.getChild(0)).andReturn(subLeftTree).anyTimes();\n\t\t\n\t\texpect(rightTree.getChildCount()).andReturn(1).anyTimes();\n\t\texpect(rightTree.getChild(0)).andReturn(subRightTree).anyTimes();\n\t\t\n\t\texpect(subLeftTree.getChildCount()).andReturn(0).anyTimes();\n\t\texpect(subRightTree.getChildCount()).andReturn(0).anyTimes();\n\t\t\n\t\treplay(left);\n\t\treplay(leftTree);\n\t\treplay(subLeft);\n\t\treplay(subLeftTree);\n\t\treplay(right);\n\t\treplay(rightTree);\n\t\treplay(subRight);\n\t\treplay(subRightTree);\n\t\t\n\t\tclones.addClonePair(subLeft, subRight);\n\t\t\n\t\tassertEquals(1, clones.size());\n\t\t\n\t\tclones.addClonePair(left, right);\n\t\t\n\t\tassertEquals(1, clones.size());\n\t\t\n\t\tassertTrue(clones.getItem(0).contains(left));\n\t\tassertTrue(clones.getItem(0).contains(right));\n\t\t\n\t\tassertFalse(clones.getItem(0).contains(subLeftTree));\n\t\tassertFalse(clones.getItem(0).contains(subRightTree));\n\t\t\n\t\tverify(left);\n\t\tverify(leftTree);\n\t\tverify(subLeftTree);\n\t\tverify(subLeft);\n\t\tverify(right);\n\t\tverify(rightTree);\n\t\tverify(subRightTree);\n\t\tverify(subRight);\n\t}", "public Chromosome doDisplacementMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n\n int leftAllele = Math.min(allele1, allele2);\n int rightAllele = Math.max(allele1, allele2);\n\n var selectionSublist = new ArrayList<Boolean>(newSelection.subList(leftAllele, rightAllele));\n for(int j = leftAllele; j < rightAllele + 1; j++){\n newSelection.remove(leftAllele);\n }\n\n int index = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size()+1);\n newSelection.addAll(index, selectionSublist);\n\n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "private void crossover(Chromosome c1, Chromosome c2){\n int split = (int)(Math.random()*c1.getNumWeights());\n \n double[][] m1 = c1.getGeneData();\n double[][] m2 = c2.getGeneData();\n double store;\n \n //Begin the switch\n for(int r=0; r<m1.length; r++){\n //Stop spliting\n if(split <= 0){\n break;\n }\n for(int c=0; c<m1[r].length;c++){\n store = m1[r][c];\n m1[r][c] = m2[r][c];\n m2[r][c] = store;\n split--;\n //Stop spliting\n if(split <= 0){\n break;\n }\n }\n }\n }", "public Individual createIndividual( final EvolutionState state,\r\n int subpop,\r\n Individual[] inds,\r\n int index,\r\n int thread)\r\n {\n double Pm = 1.0 / inds.length;\r\n\r\n // default value for scaling factor F\r\n double F = state.random[thread].nextBoolean() ? 1.0 : ( SCALE_F / Math.sqrt(inds.length) );\r\n\r\n // K is random value distributed N(0,1)\r\n double K = state.random[thread].nextGaussian();\r\n\r\n // select three indexes different from each other and from that of the current parent\r\n int r0, r1, r2;\r\n do\r\n {\r\n r0 = state.random[thread].nextInt(inds.length);\r\n }\r\n while( r0 == index );\r\n do\r\n {\r\n r1 = state.random[thread].nextInt(inds.length);\r\n }\r\n while( r1 == r0 || r1 == index );\r\n do\r\n {\r\n r2 = state.random[thread].nextInt(inds.length);\r\n }\r\n while( r2 == r1 || r2 == r0 || r2 == index );\r\n\r\n DoubleVectorIndividual v = (DoubleVectorIndividual)(inds[index].clone());\r\n DoubleVectorIndividual g0 = (DoubleVectorIndividual)(inds[r0]);\r\n DoubleVectorIndividual g1 = (DoubleVectorIndividual)(inds[r1]);\r\n DoubleVectorIndividual g2 = (DoubleVectorIndividual)(inds[r2]);\r\n\r\n int dim = v.genome.length;\r\n int localIndex = state.random[thread].nextInt(dim);\r\n int counter = 0;\r\n\r\n // create the child\r\n do\r\n {\r\n if( state.random[thread].nextDouble() <= Pm )\r\n {\r\n v.genome[localIndex] = v.genome[localIndex] + F * (g1.genome[localIndex] - g2.genome[localIndex]);\r\n }\r\n else\r\n {\r\n v.genome[localIndex] = v.genome[localIndex] + K * (g0.genome[localIndex] - v.genome[localIndex]);\r\n }\r\n localIndex = (localIndex+1) % dim;\r\n }\r\n while (++counter < dim);\r\n\r\n return v;\r\n }", "Chromosome from(List<Chromosome> population);", "void mergePiece(Piece piece);", "public QueueADT<Region> sidewaysMerge1(QueueADT<Region> regionQueue,\n\t\t\tDouble mRedT,Double mGreenT,Double mBlueT,\n\t\t\tDouble sRedT,Double sGreenT,Double sBlueT,boolean PRINT) {\n\n\t\tQueueADT<Region> newRegionQueue=new LinkedQueue<Region>();\n\t\tQueueADT<Region> regionQueue2=new LinkedQueue<Region>();\n\t\tRegion r;\n\t\tQuadNode q;\n\n\t\t// Check each region against all other regions to see if\n\t\t// any should be merged: they must be adjacent and homogenuous.\n\t\t// If 2 regions are merged only the new regions in enqueued,\n\t\t// with the two mergered regions being discarded. Each merge\n\t\t// makes the regionQueue 1 smaller.\n\t\t// Merge 2 regions is the same homogeneity critera used\n\t\t// to merge square quadtrees is true \n\t\t// Perform this regions until merging can no longer be done.\n\n\t\t// Create a copy of regionQueue in regionQueue2\n\t\tfor(int i=0;i<regionQueue.size();i++)\n\t\t{\n\t\t\tRegion r1=regionQueue.dequeue();\n\t\t\tregionQueue.enqueue(r1);\n\t\t\tregionQueue2.enqueue(r1);\n\t\t}\n\n\t\tSystem.out.println(\"\\nInitial number of regions in sideswaysMerge1:\"\n\t\t\t\t+ regionQueue.size() + \"\\n\");\n\n\t\tBoolean performMerge=true;\n\t\twhile(performMerge)\n\t\t{\n\t\t\tperformMerge=false;\n\t\t\trestart_loops:\n\t\t\t\tfor(int i=0;i<regionQueue.size();i++)\n\t\t\t\t{\n\t\t\t\t\tRegion r1=regionQueue.dequeue();\n\t\t\t\t\tregionQueue.enqueue(r1);\n\t\t\t\t\t//System.out.println(\"i loop: regionQueue.size()=\" + regionQueue2.size());\n\n\t\t\t\t\tfor(int j=0;j<regionQueue2.size();j++)\n\t\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(\"j Loop: regionQueue2.size()=\" + regionQueue2.size());\n\t\t\t\t\t\tRegion r2=regionQueue2.dequeue();\n\t\t\t\t\t\tregionQueue2.enqueue(r2);\n\n\t\t\t\t\t\tif(r1!=r2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(r1.adjacent(r2,false) && homogeneous(r1,r2,mRedT,mGreenT,mBlueT,sRedT,sGreenT,sBlueT,false))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tSystem.out.println(\"Regions r1=\" + i + \" and r2=\" + j + \" are adjacent\");\n\t\t\t\t\t\t\t\tSystem.out.println(\"Regions r1=\" + i + \" and r2=\" + j + \" are homogeneous\");\n\t\t\t\t\t\t\t\tSystem.out.println(\"sidewaysMerge1: regions \" + i + \" and \" + j + \" merged\");\n\t\t\t\t\t\t\t\t// delete old r1 and r2 by not putting them in newRegionQueue\n\t\t\t\t\t\t\t\twhile(!regionQueue.isEmpty())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tr=regionQueue.dequeue();\n\t\t\t\t\t\t\t\t\tif(r!=r1 && r!=r2) newRegionQueue.enqueue(r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tSystem.out.println(\"Region r1 had \" + r1.getQuadQueueSize() + \" quadnodes\");\n\t\t\t\t\t\t\t\tSystem.out.println(\"Region r2 had \" + r2.getQuadQueueSize() + \" quadnodes\");\n\t\t\t\t\t\t\t\tr1.mergeRegion(r2,false);\n\t\t\t\t\t\t\t\tperformMerge=true;\n\t\t\t\t\t\t\t\tSystem.out.println(\"Newly merged region r1 has \" + r1.getQuadQueueSize() + \n\t\t\t\t\t\t\t\t\t\t\" quadnodes\");\n\t\t\t\t\t\t\t\tnewRegionQueue.enqueue(r1);\n\t\t\t\t\t\t\t\tSystem.out.println(\"newRegionQueue.size() after 2 deletions and 1 addition: \" \n\t\t\t\t\t\t\t\t\t\t+ newRegionQueue.size());\n\t\t\t\t\t\t\t\t// At this point old r2, which was merged into r1, is not re-added to queue\n\t\t\t\t\t\t\t\t// Now empty the regionQueue and regionQueue2() queues\n\t\t\t\t\t\t\t\twhile(!regionQueue.isEmpty()) { r=regionQueue.dequeue(); }\n\t\t\t\t\t\t\t\twhile(!regionQueue2.isEmpty()) { r=regionQueue2.dequeue(); }\n\t\t\t\t\t\t\t\t// Empty newRegionQueue and add its regions to regionQueue and regionQueue2\n\t\t\t\t\t\t\t\twhile(!newRegionQueue.isEmpty())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tr=newRegionQueue.dequeue();\n\t\t\t\t\t\t\t\t\tregionQueue.enqueue(r);\n\t\t\t\t\t\t\t\t\tregionQueue2.enqueue(r);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tSystem.out.println(\"regionQueue.size()=\" + regionQueue.size());\n\t\t\t\t\t\t\t\tSystem.out.println(\"regionQueue2.size()=\" + regionQueue2.size());\n\t\t\t\t\t\t\t\tSystem.out.println(\"\\nRestarting nested loops\\n\");\n\t\t\t\t\t\t\t\tbreak restart_loops;\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}\n\t\tSystem.out.println(\"Number of regions after sideswaysMerge1: \"\n\t\t\t\t+ regionQueue.size());\n\t\treturn regionQueue;\n\t}", "private Pair p(int i, int j) {\n return new Pair(i, j);\n }", "@Override\n\t\tpublic Tuple exec(Tuple input) throws IOException {\n\t\t\treturn merge(input, runMin, k);\n\t\t}", "private Optional<Pair<S, S>> getCrossingPair(final Node<S> node, final Pair<S, S>[] map) {\n Pair<S, S> result = null;\n if(node.hasNext()) {\n //aX ?\n if(node.getElement().isTerminal()) {\n // ab\n if(!node.getNext().getElement().isTerminal()) {\n S a = node.getElement();\n S b = map[node.getNext().getElement().getId()].a;\n result = !a.equals(b) ? new Pair<S, S>(a,b) : null;\n }\n } // Ax or AX\n else {\n S a = map[node.getElement().getId()].b;\n S b = node.getNext().getElement();\n // Ab?\n if(b.isTerminal()) {\n result = !a.equals(b) ? new Pair<S, S>(a, b) : null;\n } //AB\n else {\n result = !a.equals(map[b.getId()].a) ? new Pair<S, S>(a, map[b.getId()].a) : null;\n }\n }\n }\n return Optional.ofNullable(result);\n }", "@Test\r\n\tpublic final void testCross() throws GeneticProgrammingException {\r\n\t\tfinal int[] training = TestHelper.genertateTrainingDataSet(-100, 100);\r\n\t\tfinal double[] targetValues = TestHelper.calculateTargetValues(\r\n\t\t\t\t\"x*2-1/2\", training);\r\n\t\tfinal Node root = new Node(null, \"/\", null, Node.OPERATOR);\r\n\t\tfinal Tree newTree = new Tree(root, new TerminalSet(),\r\n\t\t\t\tnew FunctionalSet());\r\n\t\tfinal Node minusOperator = new Node(root, \"-\", Node.LEFT, Node.OPERATOR);\r\n\t\tnewTree.addNode(minusOperator);\r\n\t\tfinal Node multiOperator = new Node(root, \"*\", Node.RIGHT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree.addNode(multiOperator);\r\n\t\tnewTree.addNode(new Node(minusOperator, \"1\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree.addNode(new Node(minusOperator, \"3\", Node.RIGHT, Node.OPERAND));\r\n\t\tnewTree.addNode(new Node(multiOperator, \"x\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree.addNode(new Node(multiOperator, \"5\", Node.RIGHT, Node.OPERAND));\r\n\t\tassertEquals(\"Tree did not get generated corectly\", \"(1-3)/(x*5)\",\r\n\t\t\t\tnewTree.getEquation().toString());\r\n\t\tfinal Node root2 = new Node(null, \"/\", null, Node.OPERATOR);\r\n\t\tfinal Tree newTree2 = new Tree(root2, new TerminalSet(),\r\n\t\t\t\tnew FunctionalSet());\r\n\t\tfinal Node minusOperator2 = new Node(root2, \"-\", Node.LEFT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree2.addNode(minusOperator2);\r\n\t\tfinal Node multiOperator2 = new Node(root2, \"*\", Node.RIGHT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree2.addNode(multiOperator2);\r\n\t\tnewTree2\r\n\t\t\t\t.addNode(new Node(minusOperator2, \"x\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree2\r\n\t\t\t\t.addNode(new Node(minusOperator2, \"7\", Node.RIGHT, Node.OPERAND));\r\n\t\tnewTree2\r\n\t\t\t\t.addNode(new Node(multiOperator2, \"8\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree2\r\n\t\t\t\t.addNode(new Node(multiOperator2, \"9\", Node.RIGHT, Node.OPERAND));\r\n\t\tassertEquals(\"Tree did not get generated corectly\", \"(x-7)/(8*9)\",\r\n\t\t\t\tnewTree2.getEquation().toString());\r\n\r\n\t\tfinal Node root3 = new Node(null, \"/\", null, Node.OPERATOR);\r\n\t\tfinal Tree newTree3 = new Tree(root3, new TerminalSet(),\r\n\t\t\t\tnew FunctionalSet());\r\n\t\tfinal Node minusOperator3 = new Node(root3, \"-\", Node.LEFT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree3.addNode(minusOperator3);\r\n\t\tfinal Node multiOperator3 = new Node(root3, \"*\", Node.RIGHT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree3.addNode(multiOperator3);\r\n\t\tfinal Node multiOperator4 = new Node(multiOperator3, \"*\", Node.LEFT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree3.addNode(multiOperator4);\r\n\t\tfinal Node multiOperator5 = new Node(multiOperator3, \"*\", Node.RIGHT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree3.addNode(multiOperator5);\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(minusOperator3, \"x\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(minusOperator3, \"7\", Node.RIGHT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(multiOperator4, \"1\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(multiOperator4, \"2\", Node.RIGHT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(multiOperator5, \"3\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(multiOperator5, \"4\", Node.RIGHT, Node.OPERAND));\r\n\t\tassertEquals(\"Tree did not get generated corectly\",\r\n\t\t\t\t\"(x-7)/(1*2)*(3*4)\", newTree3.getEquation().toString());\r\n\t\tfinal ArrayList<Tree> newTrees = new ArrayList<Tree>();\r\n\t\tnewTrees.add(newTree3);\r\n\t\tnewTrees.add(newTree2);\r\n\t\tnewTrees.add(newTree);\r\n\t\tassertEquals(\"Tree should have a size of 3 before the cross\", 3,\r\n\t\t\t\tnewTrees.size());\r\n\t\tCrossover.cross(newTrees, 1, 100, training, targetValues);\r\n\t\tfinal Iterator<Tree> iterator = newTrees.iterator();\r\n\t\twhile (iterator.hasNext()) {\r\n\t\t\t// All five trees should be different\r\n\t\t\tfinal String firstTree = iterator.next().toString();\r\n\t\t\tassertNotSame(\"Cross should change the tree but did not 1\",\r\n\t\t\t\t\tfirstTree, iterator.next().toString());\r\n\t\t\tassertNotSame(\"Cross should change the tree but did not 2\",\r\n\t\t\t\t\tfirstTree, iterator.next().toString());\r\n\t\t\tassertNotSame(\"Cross should change the tree but did not 3\",\r\n\t\t\t\t\tfirstTree, iterator.next().toString());\r\n\t\t\tassertNotSame(\"Cross should change the tree but did not 4\",\r\n\t\t\t\t\tfirstTree, iterator.next().toString());\r\n\t\t}\r\n\t\t// should be 5 trees after the crossover\r\n\t\tassertEquals(\"Tree should have a size of 5 but was not\", 5, newTrees\r\n\t\t\t\t.size());\r\n\t}", "public abstract Individual makeChild(Individual otherIndividual);", "protected Pair() {\n\t\t\n\t\tsuper(2);\n\t}", "public static Population evolvePopulation(Population pop) {\n Population newPopulation = new Population(pop.populationSize(), false);\n\n // Keep our best individual if elitism is enabled\n int elitismOffset = 0;\n if (elitism) {\n newPopulation.saveTour(0, pop.getFittest());\n elitismOffset = 1;\n }\n\n // Crossover population\n // Loop over the new population's size and create individuals from\n // Current population\n for (int i = elitismOffset; i < newPopulation.populationSize(); i++) {\n // Select parents\n // Tour parent1 = tournamentSelection(pop);\n //Tour parent2 = tournamentSelection(pop);\n\n\n\n\n Tour[] temp_a = roullet( newPopulation);\n if( temp_a == null )\n {\n System.out.println(\"no a\");\n //r//eturn temp;\n }\n // Tour parent1 = tournamentSelection(pop);\n //Tour parent2 = tournamentSelection(pop);\n Tour parent1 = temp_a[0];\n Tour parent2 = temp_a[1];\n\n\n\n\n\n\n\n\n // Crossover parents\n Tour child = crossover(parent1, parent2);\n // Add child to new population\n newPopulation.saveTour(i, child);\n }\n\n // Mutate the new population a bit to add some new genetic material\n for (int i = elitismOffset; i < newPopulation.populationSize(); i++) {\n mutate(newPopulation.getTour(i));\n }\n\n return newPopulation;\n }", "private HashMap<ComparableExpression, HashSet<ComparableExpression>> composition(\n HashMap<ComparableExpression, HashSet<ComparableExpression>> rel1,\n HashMap<ComparableExpression, HashSet<ComparableExpression>> rel2) {\n\n HashMap<ComparableExpression, HashSet<ComparableExpression>> newRel = new HashMap<>();\n // (a,b) in rel1, (b,c) in rel2 => put (a,c) into newRel\n for (Map.Entry<ComparableExpression, HashSet<ComparableExpression>> r1 : rel1.entrySet()) {\n ComparableExpression key = r1.getKey();\n for (ComparableExpression oldValue : r1.getValue()) {\n // transitive relation?\n if (rel2.containsKey(oldValue)) {\n HashSet<ComparableExpression> newValues = rel2.get(oldValue);\n newRel.putIfAbsent(key, new HashSet<>());\n newRel.get(key).addAll(newValues);\n }\n }\n }\n return newRel;\n }", "public static void main(String[] args) {\n\t\tPermuatation2 p2 = new Permuatation2();\n\t\tSystem.out.println(p2.combinations(\"abc\"));\n\t}", "private static TempTable crossProductPair(Table one, Table two) throws ProcessorException {\n\t\ttry {\n\t\t\t// Define product table\n\t\t\tTempTable tempTable = new TempTable(one.getDatabase());\n\t\t\tfor (FieldDefinition fd : one.getFields()) {\n\t\t\t\ttempTable.addField(fd);\n\t\t\t}\n\t\t\tfor (FieldDefinition fd : two.getFields()) {\n\t\t\t\ttempTable.addField(fd);\n\t\t\t}\n\t\t\t\n\t\t\t// Create and load definition into memory\n\t\t\ttempTable.create();\n\t\t\t\n\t\t\t// Populate table with product rows\n\t\t\tClass<?> tempDef = tempTable.getDefinition();\n\t\t\tfor (Tuple oneRow : one.getTuples2()) {\n\t\t\t\t\n\t\t\t\t// Get fields from table one\n\t\t\t\tClass<?> fieldDef = oneRow.getData().getClass();\n\t\t\t\tField[] attrDef = fieldDef.getFields();\n\t\t\t\t\n\t\t\t\t// All \"inserts\" done at the nested level\n\t\t\t\tfor (Tuple twoRow : two.getTuples2()) {\n\t\t\t\t\t\n\t\t\t\t\t// New row instance\n\t\t\t\t\tTableDefinition newRow = (TableDefinition) tempDef.newInstance();\n\t\t\t\t\t\n\t\t\t\t\t// Set fields for table one\n\t\t\t\t\tfor (Field f : attrDef) {\n\t\t\t\t\t\tString fieldName = f.getName();\n\t\t\t\t\t\tObject fieldVal = f.get(oneRow.getData());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!tempTable.isValidFieldValue(fieldName, fieldVal)) {\n\t\t\t\t\t\t\tthrow new ProcessorException(\"Failed to build cross product pair: tuple domains do not match\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ttempDef.getField(fieldName).set(newRow, fieldVal);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get fields from table two\n\t\t\t\t\tClass<?> fieldDef2 = twoRow.getData().getClass();\n\t\t\t\t\tField[] attrDef2 = fieldDef2.getFields();\n\t\t\t\t\t\n\t\t\t\t\t// Set fields for table two\n\t\t\t\t\tfor (Field f : attrDef2) {\n\t\t\t\t\t\tString fieldName = f.getName();\n\t\t\t\t\t\tObject fieldVal = f.get(twoRow.getData());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!tempTable.isValidFieldValue(fieldName, fieldVal)) {\n\t\t\t\t\t\t\tthrow new ProcessorException(\"Failed to build cross product pair: tuple domains do not match\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ttempDef.getField(fieldName).set(newRow, fieldVal);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Wrap in Tuple and insert\n\t\t\t\t\tTuple tuple = new Tuple(tempTable);\n\t\t\t\t\ttuple.setData(newRow);\n\t\t\t\t\ttempTable.insertTuple(tuple);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn tempTable;\n\t\t\t\n\t\t} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | IOException | IllegalArgumentException | NoSuchFieldException | SecurityException e) {\n\t\t\tthrow new ProcessorException(\"Failed to build cross product pair: \" + e);\n\t\t}\n\t}", "public interface MonogamousCrossover {\r\n\r\n\tpublic Embryo mate(Individual mother, Individual father);\r\n}", "public Individual crossover2Point(Individual parent1, Individual parent2) {\n Individual offspring = new Individual(parent1.getChromosomeLength());\n int crossoverPoint1 = Service.rand(0, parent1.getChromosomeLength()-1);\n int crossoverPoint2 = Service.rand(crossoverPoint1 + 1, crossoverPoint1 + parent1.getChromosomeLength());\n\n for(int geneIndex = 0; geneIndex < parent1.getChromosomeLength(); geneIndex++) {\n if (crossoverPoint2 >= parent1.getChromosomeLength()) {\n if(geneIndex >= crossoverPoint1 || geneIndex < (crossoverPoint2 - parent1.getChromosomeLength())) {\n offspring.setGene(geneIndex, parent2.getGene(geneIndex));\n } else {\n offspring.setGene(geneIndex, parent1.getGene(geneIndex));\n }\n }else {\n if(geneIndex >= crossoverPoint1 && geneIndex < crossoverPoint2) {\n offspring.setGene(geneIndex, parent2.getGene(geneIndex));\n } else {\n offspring.setGene(geneIndex, parent1.getGene(geneIndex));\n }\n }\n }\n return offspring;\n }", "protected ChromosomeMaterial reproduce(Configuration jgapConfig, Chromosome parent1, Chromosome parent2) {\n\t\tif ((jgapConfig instanceof NeatConfiguration) == false)\n\t\t\tthrow new AnjiRequiredException(\"com.anji.neat.NeatConfiguration\");\n\t\tNeatConfiguration config = (NeatConfiguration) jgapConfig;\n\n\t\tChromosomeMaterial child = null;\n\t\t\n\t\t// If parent1 dominates parent2 (the superclass already performs a check and makes sure that parent2 does not dominate parent1).\n\t\tif (true) { //parent1.dominates(parent2)) {\n\t\t\t// Child inherits all structure/genes from dominant parent.\n\t\t\tchild = parent1.cloneMaterial();\n\t\t\tchild.setSecondaryParentId(parent2.getId());\n\n\t\t\t// Values (eg weights) for genes are mixture of those from both parents (where the non-dominant parent has a matching gene).\n\t\t\tfor (Allele allele1 : child.getAlleles()) {\n\t\t\t\tAllele allele2 = parent2.findMatchingGene(allele1);\n\t\t\t\tif (allele2 != null) { // if rec chrom has allele with same id\n\t\t\t\t\tint valueSwitch = config.getRandomGenerator().nextInt(3);\n\t\t\t\t\t// valueSwitch == 0 means we use parent1 allele value, nothing to do.\n\t\t\t\t\tif (valueSwitch == 1) {\n\t\t\t\t\t\t// Use parent2 allele value.\n\t\t\t\t\t\tallele1.setValue(allele2.getValue());\n\t\t\t\t\t}\n\t\t\t\t\telse if (valueSwitch == 2) {\n\t\t\t\t\t\t// Use value somewhere between those from both parents.\n\t\t\t\t\t\tdouble s = config.getRandomGenerator().nextDouble();\n\t\t\t\t\t\tallele1.setValue(allele1.getValue() * s + allele2.getValue() * (1-s));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Neither parent dominates the other. \n\t\telse {\n\t\t\tSortedSet<Allele> childAlleles = new TreeSet<Allele>();\n\t\t\tChromosomeMaterial m1 = parent1.getMaterial();\n\t\t\tChromosomeMaterial m2 = parent2.getMaterial();\n\t\t\tIterator<Allele> itrP1 = m1.getAlleles().iterator();\n\t\t\tIterator<Allele> itrP2 = m2.getAlleles().iterator();\n\t\t\tAllele allele1 = itrP1.next();\n\t\t\tAllele allele2 = itrP2.next();\n\t\t\tList<ConnectionAllele> addedConns = new ArrayList<ConnectionAllele>(Math.max(parent1.size(), parent2.size()));\n\t\t\t\n\t\t\t// Iterate through alleles from both parents, adding them to child as we go.\n\t\t\tdo {\n\t\t\t\tAllele childAllele = null;\n\t\t\t\t// If we have not reached excess alleles yet.\n\t\t\t\tif (allele1 != null && allele2 != null) {\n\t\t\t\t\t// Add allele that is missing from one or the other (or that both parents have in which case we default to parent 1).\n\t\t\t\t\tchildAllele = allele1.getInnovationId() <= allele2.getInnovationId() ? allele1.cloneAllele() : allele2.cloneAllele();\n\t\t\t\t\t\n\t\t\t\t\t// If both parents have this allele, allow using value from one or the other or a blended value.\n\t\t\t\t\tif (allele1.getInnovationId() == allele2.getInnovationId()) {\n\t\t\t\t\t\tint valueSwitch = config.getRandomGenerator().nextInt(3);\n\t\t\t\t\t\t// valueSwitch == 0 means we use parent1 allele value, nothing to do.\n\t\t\t\t\t\tif (valueSwitch == 1) {\n\t\t\t\t\t\t\t// Use parent2 allele value.\n\t\t\t\t\t\t\tchildAllele.setValue(allele2.getValue());\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (valueSwitch == 2) {\n\t\t\t\t\t\t\t// Use value somewhere between those from both parents.\n\t\t\t\t\t\t\tdouble s = config.getRandomGenerator().nextDouble();\n\t\t\t\t\t\t\tchildAllele.setValue(allele1.getValue() * s + allele2.getValue() * (1-s));\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// If both chromosomes have this allele, iterate to next on both.\n\t\t\t\t\tif (allele1.getInnovationId() == allele2.getInnovationId()) {\n\t\t\t\t\t\tallele1 = itrP1.hasNext() ? itrP1.next() : null;\n\t\t\t\t\t\tallele2 = itrP2.hasNext() ? itrP2.next() : null;\n\t\t\t\t\t}\n\t\t\t\t\t// Otherwise iterate on whichever had the disjoint allele.\n\t\t\t\t\telse if (allele1.getInnovationId() < allele2.getInnovationId()) {\n\t\t\t\t\t\tallele1 = itrP1.hasNext() ? itrP1.next() : null;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tallele2 = itrP2.hasNext() ? itrP2.next() : null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Iterating over excess alleles.\n\t\t\t\telse {\n\t\t\t\t\t// parent1 has the allele.\n\t\t\t\t\tif (allele1 != null) {\n\t\t\t\t\t\tchildAllele = allele1.cloneAllele();\n\t\t\t\t\t\tallele1 = itrP1.hasNext() ? itrP1.next() : null;\n\t\t\t\t\t}\n\t\t\t\t\t// parent2 has the allele.\n\t\t\t\t\telse {\n\t\t\t\t\t\tchildAllele = allele2.cloneAllele();\n\t\t\t\t\t\tallele2 = itrP2.hasNext() ? itrP2.next() : null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (childAllele != null) {\n\t\t\t\t\t// If this is a connection allele make sure adding it won't create a cycle if only feed-forward networks are allowed.\n\t\t\t\t\t// This may leave neurons with only incoming or outgoing connections; the prune mutation operator will clean it up.\n\t\t\t\t\tboolean add = true;\n\t\t\t\t\tif (childAllele instanceof ConnectionAllele) {\n\t\t\t\t\t\tConnectionAllele conn = ((ConnectionAllele) childAllele);\n\t\t\t\t\t\tif (!NeatChromosomeUtility.connectionAllowed(config, conn.getSrcNeuronId(), conn.getDestNeuronId(), addedConns)) {\n\t\t\t\t\t\t\tadd = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\taddedConns.add(conn);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (add) {\n\t\t\t\t\t\tchildAlleles.add(childAllele);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (allele1 != null || allele2 != null);\n\t\t\t\n\t\t\tchild = new ChromosomeMaterial(childAlleles, parent1.getId(), parent2.getId());\n\t\t\t\n\t\t\t// Make sure there are no dangling or isolated structures in the resultant network\n\t\t\t// (eg if connections that would cause recurrence have not been included).\n\t\t\tSet<Allele> unusedAllelles = PruneMutationOperator.getAllelesToRemove(child);\n\t\t\tchild.getAlleles().removeAll(unusedAllelles);\n\t\t}\n\n\t\treturn child;\n\t}", "private static void checkMapAndSum(Vector<XSParticleDecl> dChildren, int min1, int max1, SubstitutionGroupHandler dSGHandler, Vector<XSParticleDecl> bChildren, int min2, int max2, SubstitutionGroupHandler bSGHandler) throws XMLSchemaException {\n/* 1413 */ if (!checkOccurrenceRange(min1, max1, min2, max2)) {\n/* 1414 */ throw new XMLSchemaException(\"rcase-MapAndSum.2\", new Object[] {\n/* 1415 */ Integer.toString(min1), (max1 == -1) ? \"unbounded\" : \n/* 1416 */ Integer.toString(max1), \n/* 1417 */ Integer.toString(min2), (max2 == -1) ? \"unbounded\" : \n/* 1418 */ Integer.toString(max2)\n/* */ });\n/* */ }\n/* 1421 */ int count1 = dChildren.size();\n/* 1422 */ int count2 = bChildren.size();\n/* */ \n/* 1424 */ for (int i = 0; i < count1; i++) {\n/* */ \n/* 1426 */ XSParticleDecl particle1 = dChildren.elementAt(i);\n/* 1427 */ int j = 0; while (true) { if (j < count2) {\n/* 1428 */ XSParticleDecl particle2 = bChildren.elementAt(j);\n/* */ try {\n/* 1430 */ particleValidRestriction(particle1, dSGHandler, particle2, bSGHandler);\n/* */ \n/* */ break;\n/* 1433 */ } catch (XMLSchemaException xMLSchemaException) {}\n/* */ j++;\n/* */ continue;\n/* */ } \n/* 1437 */ throw new XMLSchemaException(\"rcase-MapAndSum.1\", null); }\n/* */ \n/* */ } \n/* */ }", "@Override\r\n\tpublic Population<BinaryStringChromosome> operate(\r\n\t\t\tPopulation<BinaryStringChromosome> population) {\n\t\tIterator<BinaryStringChromosome> iterator = population\r\n\t\t\t\t.getAllChromosomes().iterator();\r\n\t\tPopulation<BinaryStringChromosome> output = new Population<BinaryStringChromosome>();\r\n\t\tBinaryStringChromosome chromosome;\r\n\t\tRandom random = new Random(System.nanoTime());\r\n\t\twhile (iterator.hasNext()) {\r\n\t\t\tchromosome = iterator.next();\r\n\t\t\tif (random.nextDouble() < probability) {\r\n\t\t\t\tCommonGA.logger.info(\"Mutating chromosome \" + chromosome.toString());\r\n\t\t\t\tchromosome.mutateGene(random.nextInt(chromosome.getSize() - 1));\r\n\t\t\t\tCommonGA.logger.info(\"Mutated chromosome to \" + chromosome.toString());\r\n\t\t\t}\r\n\t\t\toutput.addChromosome(chromosome);\r\n\t\t}\r\n\t\treturn output;\r\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}", "public QueueADT<Region> sidewaysMerge2(QueueADT<Region> regionQueue,\n\t\t\tDouble sRedT,Double sGreenT,Double sBlueT) {\n\t\t\n\t\t//Creates 2 regionqueues to return and compare values with\n\t\tQueueADT<Region> newRegionQueue=new LinkedQueue<Region>();\n\t\tQueueADT<Region> regionQueue2=new LinkedQueue<Region>();\n\t\t\n\t\t//variables r for the merging of the images, and r3 for the temporary placeholder\n\t\tRegion r, r3;\n\n\t\t// Check each region against all other regions to see if\n\t\t// any should be merged: they must be adjacent and homogenuous.\n\t\t// If 2 regions are merged only the new regions in enqueued,\n\t\t// with the two mergered regions being discarded. Each merge\n\t\t// makes the regionQueue 1 smaller.\n\t\t// Merge 2 regions is the same homogeneity critera used\n\t\t// to merge square quadtrees is true \n\t\t// Perform this regions until merging can no longer be done.\n\n\t\t// Create a copy of regionQueue in regionQueue2\n\t\tfor(int i=0;i<regionQueue.size();i++)\n\t\t{\n\t\t\tRegion r1=regionQueue.dequeue();\n\t\t\tregionQueue.enqueue(r1);\n\t\t\tregionQueue2.enqueue(r1);\n\t\t}\n\n\t\t//Prints initial number of regions\n\t\tSystem.out.println(\"\\nInitial number of regions in sideswaysMerge1:\"\n\t\t\t\t+ regionQueue.size() + \"\\n\");\n\n\t\t//Boolean to loop merging procedure\n\t\tBoolean performMerge=true;\n\t\t\n\t\t//While loop that continues until boolean is false\n\t\twhile(performMerge)\n\t\t{\n\t\t\t//Quits loop if break is executed\n\t\t\tperformMerge=false;\n\t\t\t\n\t\t\t//Breakpoint\n\t\t\trestart_loops:\n\t\t\t\t\n\t\t\t\t//Nested loop to compare every value in both queues\n\t\t\t\tfor(int i=0;i<regionQueue.size();i++)\n\t\t\t\t{\n\t\t\t\t\t//Gets the r1 variable\n\t\t\t\t\tRegion r1=regionQueue.dequeue();\n\t\t\t\t\tregionQueue.enqueue(r1);\n\n\t\t\t\t\t//Loops through second set of queues\n\t\t\t\t\tfor(int j=0;j<regionQueue2.size();j++)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Gets the r2 variable\n\t\t\t\t\t\tRegion r2=regionQueue2.dequeue();\n\t\t\t\t\t\tregionQueue2.enqueue(r2);\n\t\t\t\t\t\t\n\t\t\t\t\t//Executes if variables are not the same and if regions are adjacent\t\n\t\t\t\t\tif (r1 != r2 && r1.adjacent(r2, false)) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Creates new region and merges regions being compared\n\t\t\t\t\t\tr = new Region();\n\t\t\t\t\t\tr.mergeRegion(r1, false);\n\t\t\t\t\t\tr.mergeRegion(r2, false);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Executes if newly merged region is homogenous\n\t\t\t\t\t\tif (homogeneous(r, sRedT, sGreenT, sBlueT)) {\n\t\t\t\t\t\t\tSystem.out.println(\"Regions r1=\" + i + \" and r2=\" + j + \" are adjacent\");\n\t\t\t\t\t\t\tSystem.out.println(\"Regions r1=\" + i + \" and r2=\" + j + \" are homogeneous\");\n\t\t\t\t\t\t\tSystem.out.println(\"sidewaysMerge1: regions \" + i + \" and \" + j + \" merged\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// delete old r1 and r2 by not putting them in newRegionQueue\n\t\t\t\t\t\t\twhile(!regionQueue.isEmpty())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tr3=regionQueue.dequeue();\n\t\t\t\t\t\t\t\tif(r3!=r1 && r3!=r2) newRegionQueue.enqueue(r3);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSystem.out.println(\"Region r1 had \" + r1.getQuadQueueSize() + \" quadnodes\");\n\t\t\t\t\t\t\tSystem.out.println(\"Region r2 had \" + r2.getQuadQueueSize() + \" quadnodes\");\n\t\t\t\t\t\t\tperformMerge=true;\n\t\t\t\t\t\t\tSystem.out.println(\"Newly merged region r1 has \" + r1.getQuadQueueSize() + \n\t\t\t\t\t\t\t\t\t\" quadnodes\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//Adds newly merged region to queu to be returned\n\t\t\t\t\t\t\tnewRegionQueue.enqueue(r);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t.println(\"newRegionQueue.size() after 2 deletions and 1 addition: \"\n\t\t\t\t\t\t\t\t\t\t\t+ newRegionQueue.size());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// At this point old r2, which was merged into r1,\n\t\t\t\t\t\t\t// is not re-added to queue\n\t\t\t\t\t\t\t// Now empty the regionQueue and regionQueue2()\n\t\t\t\t\t\t\t// queues\n\t\t\t\t\t\t\twhile (!regionQueue.isEmpty()) {\n\t\t\t\t\t\t\t\tr3 = regionQueue.dequeue();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twhile (!regionQueue2.isEmpty()) {\n\t\t\t\t\t\t\t\tr3 = regionQueue2.dequeue();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Empty newRegionQueue and add its regions to\n\t\t\t\t\t\t\t// regionQueue and regionQueue2\n\t\t\t\t\t\t\twhile (!newRegionQueue.isEmpty()) {\n\t\t\t\t\t\t\t\tr3 = newRegionQueue.dequeue();\n\t\t\t\t\t\t\t\tregionQueue.enqueue(r3);\n\t\t\t\t\t\t\t\tregionQueue2.enqueue(r3);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tSystem.out.println(\"regionQueue.size()=\"\n\t\t\t\t\t\t\t\t\t+ regionQueue.size());\n\t\t\t\t\t\t\tSystem.out.println(\"regionQueue2.size()=\"\n\t\t\t\t\t\t\t\t\t+ regionQueue2.size());\n\t\t\t\t\t\t\tSystem.out.println(\"\\nRestarting nested loops\\n\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//Breaks if this point in the code is reached\n\t\t\t\t\t\t\tbreak restart_loops;\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\tSystem.out.println(\"Number of regions after sideswaysMerge1: \"\n\t\t\t\t+ regionQueue.size());\n\t\t\n\t\t//Returns queue\n\t\treturn regionQueue;\n\t}", "public static void pseudoTrueTuples(LogicProblem logicProblem, boolean applyChanges)\r\n throws RelationshipConflictException {\n \r\n HashMap<ItemPair,Relationship> relationshipTable = logicProblem.getRelationshipTable();\r\n HashSet<CategoryPair> categoryPairs = logicProblem.getCategoryPairs();\r\n \r\n// System.out.println(\"searching...\");\r\n //within a subgrid\r\n for (CategoryPair categoryPair : categoryPairs) {\r\n// System.out.println(\"Category pair:\" + categoryPair);\r\n //vertical and horizontal search\r\n for (final boolean verticalOrientation : new boolean[] { false, true } ) {\r\n\r\n Category subrowCategory = verticalOrientation?categoryPair.first():categoryPair.last();\r\n Category subcolumnCategory = verticalOrientation?categoryPair.last():categoryPair.first();\r\n\r\n //commenting \"vertical search\" \r\n //(subrows match first category's items\r\n // subcolumns match second category's items)\r\n\r\n //i (2 to floor(n/2)) is the number of elements in the combination tuple\r\n // i=2 in pseudoTrue pairs\r\n //(for subgrids of 5x5 items, looking for both pairs and triplets becomes redundant\r\n for (int i=2; i<=floor(logicProblem.getNumCategories()/2);i++) {\r\n\r\n //https://github.com/dpaukov/combinatoricslib3/wiki/v3.3.0#1-simple-combinations\r\n List<List<Item>> columnCombinations = Generator.combination(subcolumnCategory.getItems())\r\n .simple(i) //for pseudo true pairs, i=2\r\n .stream()\r\n .collect(Collectors.<List<Item>>toList());\r\n //for i=2, this would contain \r\n //Bethany, Donovan\r\n //Bethany, Elizabeth\r\n //...\r\n //Frederick, Peyton\r\n// columnCombinations.stream().forEach(l -> System.out.println(\r\n// (verticalOrientation?\"vertical\":\"horizontal\")+ \" combo: \"+l.toString()));\r\n\r\n //create the sets\r\n //for each combination, start over\r\n \r\n //columnTuple contains i items with which we will compute set intersections\r\n for (List<Item> columnItemTuple : columnCombinations) {\r\n //Bethany, Donovan\r\n \r\n //similarly, valueNoSets contains i sets of VALUE_NO relationships\r\n List<Set<Item>> valueNoSets = new ArrayList<>(); //size=i\r\n //build a set for each i item of columnTuple\r\n for (Item columnItem : columnItemTuple) {\r\n //Bethany\r\n Set<Item> valueNoSet = new HashSet<>(); //size = n\r\n for (Item rowItem : subrowCategory.getItems()) {\r\n //Haley's Comet ....\r\n if (relationshipTable.get(new ItemPair(rowItem, columnItem)).getValue() == Relationship.ValueType.VALUE_NO)\r\n //stacking all VALUE_NO relationship into vertical set\r\n valueNoSet.add(rowItem); //store into single subcolumn set \r\n }\r\n //adding each vertical set into list of sets\r\n if (valueNoSet.size() >= logicProblem.getNumItems() - i //for pairs, we need three VALUE_NO in the set\r\n && valueNoSet.size() < logicProblem.getNumItems()-1) //uniqueness will take or n-1 cases\r\n valueNoSets.add(valueNoSet); //store single subcolumn into multi-set\r\n }\r\n //magic!\r\n Set<Item> intersectionSet = new HashSet<>(); //avoid NPE when the next call is made\r\n if (valueNoSets.size()>=2) //don't compute intersections otherwise\r\n intersectionSet = Processor.multiSetIntersection(valueNoSets);\r\n\r\n if (intersectionSet.size()==logicProblem.getNumItems()-i) {\r\n \r\n// System.out.println(\"----> found candidates for pseudo true pairs!\");\r\n// intersectionSet.stream().forEach(l -> System.out.println(\"\\t\" + l.toString()));\r\n// System.out.println(\"\\t\\tvs.\");\r\n// columnItemTuple.stream().forEach(l -> System.out.println(\"\\t\" + l.toString()));\r\n \r\n //create predecessor list\r\n //we can only add the intersection output as predecessors\r\n ArrayList<Dependable> predecessors = new ArrayList<Dependable>();\r\n for (Item intersectionColumn : intersectionSet) {\r\n for (Item rowItem : columnItemTuple) {\r\n predecessors.add(relationshipTable.get(new ItemPair(rowItem, intersectionColumn)));\r\n }\r\n }\r\n\r\n\r\n //we have a bunch of work to do\r\n for (Item everyRowItem : subrowCategory.getItems()) {\r\n //for every row item not in the intersectionSet\r\n if (!intersectionSet.contains(everyRowItem)) {\r\n for (Item everyColumnItem : subcolumnCategory.getItems()) {\r\n //for every column item not in any of the columnTuple list\r\n if (!columnItemTuple.contains(everyColumnItem)) {\r\n Relationship rel = relationshipTable.get(new ItemPair(everyRowItem,everyColumnItem));\r\n if (rel.getValue()!=Relationship.ValueType.VALUE_NO)\r\n Processor.setRelationship(logicProblem, applyChanges, rel, \r\n Relationship.ValueType.VALUE_NO, Relationship.LogicType.PSEUDOTRUE,\r\n predecessors.toArray(new Relationship[predecessors.size()])); \r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "private PMCGenotype[] advanceGeneration()\n\t{\n\t\tPMCGenotype[] newPop = new PMCGenotype[population.length];\n\t\tPMCGenotype[] parents = selectParents();\n\t\tArrayList<PMCGenotype> candidates = new ArrayList<PMCGenotype>();\n\n\t\t// Add the current population to the list of candidates.\n\t\tfor (PMCGenotype pmcg : population)\n\t\t{\n\t\t\tcandidates.add(pmcg);\n\t\t}\n\n\t\t// For each parent, generate a number of mutations (children), calculate their fitness\n\t\t// and add them to the list of candidates.\n\t\tint childrenPerParent = this.childrenPerGeneration / this.parentsToSelect;\n\t\tfor (PMCGenotype p : parents)\n\t\t{\n\t\t\tfor (int i = 0; i < childrenPerParent; i++)\n\t\t\t{\n\t\t\t\tPMCGenotype pmcg = PMCGenotype.mutate(p, r);\n\t\t\t\tpmcg.setFitness(fitness(pmcg, this.trials));\n\t\t\t\tcandidates.add(pmcg);\n\t\t\t}\n\t\t}\n\n\t\t// Find candidate with the best fitness and add it to the new population.\n\t\t// Repeat this until the new population size matches the previous population size.\n\t\tint candidatesChosen = 0;\n\t\twhile (candidatesChosen < this.population.length)\n\t\t{\n\t\t\tint numberOfRemainingCandidates = candidates.size();\n\t\t\tdouble currentBestFitnessScore = 0;\n\t\t\tint currentBestFitnessScoreIndex = 0;\n\n\t\t\tfor (int i = 0; i < numberOfRemainingCandidates; i++)\n\t\t\t{\n\t\t\t\tPMCGenotype pmcg = candidates.get(i);\n\t\t\t\tif (pmcg.getFitness() > currentBestFitnessScore)\n\t\t\t\t{\n\t\t\t\t\tcurrentBestFitnessScore = pmcg.getFitness();\n\t\t\t\t\tcurrentBestFitnessScoreIndex = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnewPop[candidatesChosen] = candidates.get(currentBestFitnessScoreIndex);\n\t\t\tcandidatesChosen++;\n\n\t\t\tcandidates.remove(currentBestFitnessScoreIndex);\n\t\t}\n\n\t\treturn newPop;\n\t}", "private void compressPairAll(final Pair<S, S> pair) {\n Function<Pair<S, S>, Consumer<GPairRecord<S, S>>> consumerFunction = p -> new ArrayList<>()::add;\n Predicate<S> leftPredicate = nonTerminal -> doLeftPop(nonTerminal, head -> head.isTerminal() && head.equals(pair.b));\n Predicate<S> rightPredicate = nonTerminal -> doRightPop(nonTerminal, tail -> tail.isTerminal() && tail.equals(pair.a));\n pop(phase + 1, leftPredicate, rightPredicate, consumerFunction);\n List<GPairRecord<S, S>> records = getPairs(p -> p.equals(pair));\n sortPairs(records);\n compressNonCrossingPairs(records);\n }", "public SolutionSet[] execute2() throws JMException, ClassNotFoundException {\n baiscSetting();\n /*\n * step2: Initialize the Population\n */\n initPopulation();\n initIdealPoint(); // initialize the ideal point\n\n initNadirPoint(); // initialize the nadir point\n\n initExtremePoints(); // initialize the extreme points\n /*\n * Enter the main loop,into the process of evolution\n */\n while (generations_ < maxGenerations_) {\n /*\n * step3 and step4:Mating Selection and Recombination to generate Offspring Populations\n */\n generateOffspringPopulation();\n /*\n * step5:Environmental Selection\n */\n environmentalSelection(generations_);\n\n generations_++;\n }\n\n// Ranking ranking = new NondominatedRanking(population_);\n// return ranking.getSubfront(0);\n return population_;\n }", "public JavaPairRDD<String, Tuple2<Iterable<Integer>, Iterable<Integer>>> cogroupExample(){\n return firstSet\n .cogroup(secondSet);\n }", "public Chromosome(){\n super();\n }", "public static void crossover(Individual[] parent) {\n Individual[] children = new Individual[POP_SIZE];\n for (int i = 0; i < POP_SIZE; i += 2) {\n Individual child1 = new Individual(GENE_SIZE, NUM_RULES, COND_LEN);\n child1.generateRulebase();\n Individual child2 = new Individual(GENE_SIZE, NUM_RULES, COND_LEN);\n child2.generateRulebase();\n\n int crossOverPoint = new Random().nextInt(GENE_SIZE);\n for (int j = 0; j < crossOverPoint; j++) {\n child1.gene[j] = parent[i].gene[j];\n child2.gene[j] = parent[i + 1].gene[j];\n }\n\n for (int j = crossOverPoint; j < GENE_SIZE; j++) {\n child1.gene[j] = parent[i + 1].gene[j];\n child2.gene[j] = parent[i].gene[j];\n }\n\n child1.generateRulebase();\n child2.generateRulebase();\n children[i] = new Individual(child1);\n children[i + 1] = new Individual(child2);\n }\n\n matingPool = Arrays.copyOf(children, parent.length);\n }", "Chromosome fittestChromosome();", "private void calculateAssociatedATypeBranches(Map<Integer, Double> associatedBranchforInput, int jOffsetForOutput,\r\n\t\t\tint plusMinus, int jOffset1stTerm, int jOffset2ndTerm, boolean parity1stTerm, boolean parity2ndTerm)\r\n\t{\r\n\t\tfor (Map.Entry<Integer, Double> entry : inputBranchWithJ.entrySet()) {\r\n\t\t\tint jForBranch = entry.getKey() + jOffsetForOutput;\r\n\t\t\tdouble energyForBranch;\r\n\r\n\t\t\ttry {\r\n\t\t\t\tdouble term1, term2, term3;\r\n\r\n\t\t\t\tterm1 = entry.getValue();\r\n\t\t\t\tterm2 = (plusMinus) * (energyAt(entry.getKey() + jOffset1stTerm, parity1stTerm));\r\n\t\t\t\tterm3 = (-1 * plusMinus) * (energyAt(entry.getKey() + jOffset2ndTerm, parity2ndTerm));\r\n\r\n\t\t\t\tenergyForBranch = term1 + term2 + term3;\r\n\t\t\t\tassociatedBranchforInput.put(jForBranch, energyForBranch);\r\n\t\t\t} catch (NoSuchEnergyException e) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Result call()\n {\n HashMap<RotamerPair,Double> tempMap = new HashMap<>();\n for ( Map.Entry<Rotamer,Rotamer> entry : work.entries() )\n {\n Rotamer rotamer1 = entry.getKey();\n Rotamer rotamer2 = entry.getValue();\n RotamerPair pair = new RotamerPair(rotamer1, rotamer2);\n if ( incompatiblePairs.contains(pair) )\n continue;\n \n //Atom extraAtom1 = null;\n //if ( rotamer1.description.indexOf(\"proline\") == -1 )\n // extraAtom1 = peptide.sequence.get(rotamer1.sequenceIndex).HN;\n \n //Atom extraAtom2 = null;\n //if ( rotamer2.description.indexOf(\"proline\") == -1 )\n // extraAtom2 = peptide.sequence.get(rotamer2.sequenceIndex).HN;\n \n //double energy = OPLScalculator.getInteractionEnergy(rotamer1, extraAtom1, rotamer2, extraAtom2);\n double energy = OPLScalculator.getInteractionEnergy(rotamer1, null, rotamer2, null);\n tempMap.put(pair,energy);\n }\n map.putAll(tempMap);\n return null;\n }", "public static void main(String[] args) throws IOException {\n\n String s1 = scanner.nextLine();\n\n String s2 = scanner.nextLine();\n\n int result = commonChild(s1, s2);\n System.out.println(result);\n //bufferedWriter.write(String.valueOf(result));\n //bufferedWriter.newLine();\n\n //bufferedWriter.close();\n\n scanner.close();\n }", "public ITree combine(int leftLength, int rightLength, double leftTheta, double rightTheta,\n ITree otherTree) {\n return new Branch(leftLength, rightLength, leftTheta, rightTheta, \n this.changeTheta(leftTheta), this.changeTheta(rightTheta)); \n \n }", "public void union(int first, int second){\n int firstId = find(first);\n int secondId = find(second);\n //Check if these are already connected\n if(firstId == secondId){\n return;\n }\n if(size[firstId] < size[secondId]){\n size[secondId]+=size[firstId];\n grid[first] = secondId;\n }\n else {\n size[firstId]+=size[secondId];\n grid[second] = firstId;\n }\n --numOfComponents;\n }", "public interface NextGenSelector {\n public List<Individual> getNextGenPopulation(List<Individual> parentGen, List<Individual> childGen);\n}", "public SymmetricHashJoin(JoinPredicate p, DbIterator child1, DbIterator child2) {\n this.pred = p;\n this.child1 = child1;\n this.child2 = child2;\n comboTD = TupleDesc.merge(child1.getTupleDesc(), child2.getTupleDesc());\n }", "public interface Chromosomal {\r\n void cross(Chromosomal ch, ArrayList<Integer> points);\r\n\r\n void mutate(int alghorithm);\r\n\r\n double getFFValue();\r\n\r\n ArrayList<Chromosomal> getChilds();\r\n\r\n ArrayList<Integer> getGens();\r\n\r\n void setGens(ArrayList<Integer> gensArray);\r\n\r\n String toString();\r\n}", "public static Cigar applyCigarToCigar(final Cigar firstToSecond, final Cigar secondToThird) {\n final boolean DEBUG = false;\n\n final List<CigarElement> newElements = new LinkedList<CigarElement>();\n final int nElements12 = firstToSecond.getCigarElements().size();\n final int nElements23 = secondToThird.getCigarElements().size();\n\n int cigar12I = 0, cigar23I = 0;\n int elt12I = 0, elt23I = 0;\n\n while ( cigar12I < nElements12 && cigar23I < nElements23 ) {\n final CigarElement elt12 = firstToSecond.getCigarElement(cigar12I);\n final CigarElement elt23 = secondToThird.getCigarElement(cigar23I);\n\n final CigarPairTransform transform = getTransformer(elt12.getOperator(), elt23.getOperator());\n\n if ( DEBUG )\n System.out.printf(\"Transform %s => %s with elt1 = %d %s @ %d elt2 = %d %s @ %d with transform %s%n\",\n firstToSecond, secondToThird, cigar12I, elt12.getOperator(), elt12I, cigar23I, elt23.getOperator(), elt23I, transform);\n\n if ( transform.op13 != null ) // skip no ops\n newElements.add(new CigarElement(1, transform.op13));\n\n elt12I += transform.advance12;\n elt23I += transform.advance23;\n\n // if have exhausted our current element, advance to the next one\n if ( elt12I == elt12.getLength() ) { cigar12I++; elt12I = 0; }\n if ( elt23I == elt23.getLength() ) { cigar23I++; elt23I = 0; }\n }\n\n return AlignmentUtils.consolidateCigar(new Cigar(newElements));\n }", "public void createSubs(List<QueryTreeNode> subQueries) {\r\n\t\tif (!isBranchIndexed()) {\r\n\t\t\t//nothing to do, stop searching this branch\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//If op=OR and if and sub-nodes are indexed, then we split.\r\n\t\tif (LOG_OP.OR.equals(op)) {\r\n\t\t\t//clone both branches (WHY ?)\r\n\t\t\tQueryTreeNode node1;\r\n\t\t\tif (n1 != null) {\r\n\t\t\t\tnode1 = n1;\r\n\t\t\t} else {\r\n\t\t\t\tn1 = node1 = new QueryTreeNode(null, t1, null, null, null, false);\r\n\t\t\t\tt1 = null;\r\n\t\t\t}\r\n\t\t\tQueryTreeNode node2;\r\n\t\t\tif (n2 != null) {\r\n\t\t\t\tnode2 = n2.cloneBranch();\r\n\t\t\t} else {\r\n\t\t\t\tn2 = node2 = new QueryTreeNode(null, t2, null, null, null, false);\r\n\t\t\t\tt2 = null;\r\n\t\t\t}\r\n\t\t\t//we remove the OR from the tree and assign the first clone/branch to any parent\r\n\t\t\tQueryTreeNode newTree;\r\n\t\t\tif (p != null) {\r\n\t\t\t\t//remove local OR and replace with n1\r\n\t\t\t\tif (p.n1 == this) {\r\n\t\t\t\t\tp.n1 = node1;\r\n\t\t\t\t\tp.t1 = null;\r\n\t\t\t\t\tp.relateToChildren();\r\n\t\t\t\t} else if (p.n2 == this) {\r\n\t\t\t\t\tp.n2 = node1;\r\n\t\t\t\t\tp.t2 = null;\r\n\t\t\t\t\tp.relateToChildren();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new IllegalStateException();\r\n\t\t\t\t}\r\n\t\t\t\t//clone and replace with child number n2/t2\r\n\t\t\t\t//newTree = cloneSingle(n2, t2, null, null);\r\n\t\t\t} else {\r\n\t\t\t\t//no parent.\r\n\t\t\t\t//still remove this one and replace it with the first sub-node\r\n\t\t\t\t//TODO should we use a set for faster removal?\r\n\t\t\t\tsubQueries.remove(this);\r\n\t\t\t\tsubQueries.add(node1);\r\n\t\t\t\tnode1.p = null;\r\n\t\t\t\tif (node2 != null) {\r\n\t\t\t\t\tnode2.p = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//now treat second branch and create a new parent for it, if necessary.\r\n\t\t\tif (p != null) {\r\n\t\t\t\tnewTree = p.cloneTrunk(node1, node2);\r\n\t\t\t} else {\r\n\t\t\t\tnewTree = node2;\r\n\t\t\t}\r\n\t\t\t//subQueriesCandidates.add(newTree.root());\r\n\t\t\tnewTree.createSubs(subQueries);\r\n\t\t\tsubQueries.add(newTree.root());\r\n\t\t}\r\n\t\t\r\n\t\t//go into sub-nodes\r\n\t\tif (n1 != null) {\r\n\t\t\tn1.createSubs(subQueries);\r\n\t\t}\r\n\t\tif (n2 != null) {\r\n\t\t\tn2.createSubs(subQueries);\r\n\t\t}\r\n\t}", "@Override\n public Tuple<Double, DoubleVector> call() throws Exception {\n for (int particleIndex = range.getStart(); particleIndex < range.getEnd(); particleIndex++) {\n DoubleVector currentPosition = particlePositions[particleIndex];\n DoubleVector currentBest = particlePersonalBestPositions[particleIndex];\n DenseDoubleVector vec = new DenseDoubleVector(dim);\n for (int index = 0; index < vec.getDimension(); index++) {\n double value = (phi * currentPosition.get(index)) // inertia\n + (alpha * random.nextDouble() * (currentBest.get(index) - currentPosition\n .get(index))) // personal memory\n + (beta * random.nextDouble() * (globalBestPosition.get(index) - currentPosition\n .get(index))); // group memory\n vec.set(index, value);\n }\n particlePositions[particleIndex] = vec;\n double cost = f.evaluateCost(vec).getCost();\n // check if we have a personal best\n if (cost < particlePersonalBestCost[particleIndex]) {\n particlePersonalBestCost[particleIndex] = cost;\n particlePersonalBestPositions[particleIndex] = vec;\n // if we had a personal best, do we have a better global?\n if (cost < globalCost) {\n globalCost = cost;\n globalBestPosition = vec;\n }\n }\n }\n return new Tuple<>(globalCost, globalBestPosition);\n }", "private int[][] crossoverOnePoint(int[] parent1, int[] parent2) {\n\t\tint crossPoint1 = rand.nextInt(parent1.length);\n\n\t\tint[] child = new int[parent1.length];\n\t\tint[] child2 = new int[parent1.length];\n\t\tfor (int i = 0; i < crossPoint1; i++) {\n\t\t\tchild[i] = parent1[i]; //before cross point = p1\n\t\t\tchild2[i] = parent2[i]; //opposite for child2\n\t\t}\n\n\t\tfor (int i = crossPoint1; i < parent1.length; i++) {\n\t\t\tchild[i] = parent2[i]; //after and including crosspoint = p2\n\t\t\tchild2[i] = parent1[i]; //opposite for child2\n\t\t}\n\t\treturn new int[][] { child, child2 };\n\n\t}", "@Test\n public void testChromosome() {\n\n Assert.assertTrue(this.chromB1.getGenes().length == 4);\n Assert.assertTrue(this.chromB1.getSize() == 4);\n Assert.assertTrue(this.chromB1.getGenes()[0] == 1);\n Assert.assertTrue(this.chromB1.getGenes()[1] == 2);\n Assert.assertTrue(this.chromB1.getGenes()[2] == 3);\n Assert.assertTrue(this.chromB1.getGenes()[3] == 4);\n }", "public ITree combine(int leftLength, int rightLength, double leftTheta, double rightTheta,\n ITree otherTree) {\n return new Branch(leftLength, rightLength, \n leftTheta, rightTheta, this.changeTheta(leftTheta), otherTree.changeTheta(rightTheta)); \n \n }", "public static void main(String[] args) {\n\t\tListNode node1 = new ListNode(5);\n node1.next = new ListNode(6);\n node1.next.next = new ListNode(7);\n\n ListNode node2 = new ListNode(5);\n node2.next = new ListNode(6);\n node2.next.next = new ListNode(7);\n\n ListNode result = new MergeTwoSortedLists().mergeTwoLists(node1, node2);\n\t}", "public Object[] nodeRecombine(node aNode, node newNode1, node newNode2,\n\t\t\tdouble gen, double loc){\n\t\tseg aSeg,seg1,seg2;\n\t\tObject[] returnArray; //container for nodes to return....\n\t\taSeg = new seg(0,loc);\n\t\tseg1 = segFactory.segIntersect(aNode.getSegment(), aSeg);\n\t\tseg2 = segFactory.segIntersect(aNode.getSegment(),segFactory.segInverse(aSeg));\n\t\taSeg = null;\n\t\tif(seg1 == null || seg2 == null){\n\t\t\tif(seg1 != null )\n\t\t\t\tseg1 = null;\n\t\t\tif(seg2 != null)\n\t\t\t\tseg2 = null;\n\t\t\treturnArray = new Object[1];\n\t\t\treturnArray[0] = 1;\n\t\t\treturn returnArray;\n\t\t}\n\t\treturnArray = new Object[3];\n\t\tnewNode1 = makeEmptyNode(gen,aNode.pop, aNode);\n\t\tnewNode1.setSegment(seg1);\n\t\tnewNode2 = makeEmptyNode(gen,aNode.pop,aNode);\n\t\tnewNode2.setSegment(seg2);\n\t\treturnArray[0] = 2;\n\t\treturnArray[1] = newNode1;\n\t\treturnArray[2] = newNode2;\n\t\t\n\t\treturn returnArray;\n\t}", "void unionTreeCoreset(int k,int n_1,int n_2,int d, Point[] setA,Point[] setB, Point[] centres, MTRandom clustererRandom) {\n\t\t//printf(\"Computing coreset...\\n\");\n\t\t//total number of points\n\t\tint n = n_1+n_2;\n\n\t\t//choose the first centre (each point has the same probability of being choosen)\n\t\t\n\t\t//stores, how many centres have been choosen yet\n\t\tint choosenPoints = 0; \n\t\t\n\t\t//only choose from the n-i points not already choosen\n\t\tint j = clustererRandom.nextInt(n-choosenPoints); \n\n\t\t//copy the choosen point\n\t\tif(j < n_1){\n\t\t\t//copyPointWithoutInit(&setA[j],&centres[choosenPoints]);\n\t\t\tcentres[choosenPoints] = setA[j].clone();\n\t\t} else {\n\t\t\tj = j - n_1;\n\t\t\t//copyPointWithoutInit(&setB[j],&centres[choosenPoints]);\n\t\t\tcentres[choosenPoints] = setB[j].clone();\n\t\t}\n\t\ttreeNode root = new treeNode(setA,setB,n_1,n_2, centres[choosenPoints],choosenPoints); //??\n\t\tchoosenPoints = 1;\n\t\t\n\t\t//choose the remaining points\n\t\twhile(choosenPoints < k){\n\t\t\tif(root.cost > 0.0){\n\t\t\t\ttreeNode leaf = selectNode(root, clustererRandom);\n\t\t\t\tPoint centre = chooseCentre(leaf, clustererRandom);\n\t\t\t\tsplit(leaf,centre,choosenPoints);\n\t\t\t\t//copyPointWithoutInit(centre,&centres[choosenPoints]);\n\t\t\t\tcentres[choosenPoints] = centre;\n\t\t\t} else {\n\t\t\t\t//create a dummy point\n\t\t\t\t//copyPointWithoutInit(root.centre,&centres[choosenPoints]);\n\t\t\t\tcentres[choosenPoints] = root.centre;\n\t\t\t\tint l;\n\t\t\t\tfor(l=0;l<root.centre.dimension;l++){\n\t\t\t\t\tcentres[choosenPoints].coordinates[l] = -1 * 1000000;\n\t\t\t\t}\n\t\t\t\tcentres[choosenPoints].id = -1;\n\t\t\t\tcentres[choosenPoints].weight = 0.0;\n\t\t\t\tcentres[choosenPoints].squareSum = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\tchoosenPoints++;\n\t\t}\n\n\t\t//free the tree\n\t\tfreeTree(root);\n\n\t\t//recalculate clustering features\n\t\tint i;\n\t\tfor(i=0;i<n;i++){\n\t\t\t\t\n\t\t\tif(i < n_1) {\n\t\t\t\t\n\t\t\t\tint index = setA[i].centreIndex;\n\t\t\t\tif(centres[index].id != setA[i].id){\n\t\t\t\t\tcentres[index].weight += setA[i].weight;\n\t\t\t\t\tcentres[index].squareSum += setA[i].squareSum;\n\t\t\t\t\tint l;\n\t\t\t\t\tfor(l=0;l<centres[index].dimension;l++){\n\t\t\t\t\t\tif(setA[i].weight != 0.0){\n\t\t\t\t\t\t\tcentres[index].coordinates[l] += setA[i].coordinates[l];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tint index = setB[i-n_1].centreIndex;\n\t\t\t\tif(centres[index].id != setB[i-n_1].id){\n\t\t\t\t\tcentres[index].weight += setB[i-n_1].weight;\n\t\t\t\t\tcentres[index].squareSum += setB[i-n_1].squareSum;\n\t\t\t\t\tint l;\n\t\t\t\t\tfor(l=0;l<centres[index].dimension;l++){\n\t\t\t\t\t\tif(setB[i-n_1].weight != 0.0){\n\t\t\t\t\t\t\tcentres[index].coordinates[l] += setB[i-n_1].coordinates[l];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public abstract int compute(int i1, int i2);", "public abstract Multigraph buildMatchedGraph();", "public Individual crossover(Individual parentB)\r\n\t{\r\n\t\tIndividual ind = new Individual(intSize, intCount, signedInt);\r\n\r\n\t\t// Copy over genes randomly\r\n\t\tfor (int i = 0; i < binary.length; i++)\r\n\t\t{\r\n\t\t\tboolean parentA = Math.random() >= 0.5;\r\n\t\t\tind.binary[i] = parentA ? binary[i] : parentB.binary[i];\r\n\t\t}\r\n\r\n\t\treturn ind;\r\n\t}", "public static void main(String[] args) throws Exception\n\t{\n\t\tScanner sc = new Scanner(in);\n\t\tPrintStream ps = new PrintStream(new BufferedOutputStream(out));\n\t\tint cases = sc.nextInt();\n\t\tfor (int c = 1; c <= cases; c++)\n\t\t{\n\t\t\tint n = sc.nextInt();\n\t\t\tint[] a = new int[n];\n\t\t\tint[] b = new int[n];\n\t\t\tboolean[] mark = new boolean[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t{\n\t\t\t\ta[i] = sc.nextInt();\n\t\t\t\tb[i] = sc.nextInt();\n\t\t\t}\n\t\t\tPriorityQueue<Pair> one = new PriorityQueue<Pair>(n, new One());\n\t\t\tPriorityQueue<Pair> two = new PriorityQueue<Pair>(n, new Two());\n\t\t\t\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t{\n\t\t\t\tPair p = new Pair(a[i],b[i]);\n\t\t\t\tone.add(p);\n\t\t\t\ttwo.add(p);\n\t\t\t}\n\t\t\tint stars = 0;\n\t\t\tboolean ok = true;\n\t\t\tint steps = 0;\n\t\t\twhile (one.size() != 0 && two.size() != 0)\n\t\t\t{\n\t\t\t\tPair p1 = one.poll();\n\t\t\t\tPair p2 = two.poll();\n/*\n\t\t\t\tps.println(\"one = \"+p1.toChar()+p1);\n\t\t\t\tps.println(\"two = \"+p2.toChar()+p2);\n*/\n\t\t\t\tif (p2.b <= stars)\n\t\t\t\t{\n\t\t\t\t\tone.add(p1);\n\t\t\t\t\tp2.tagB = true;\n\t\t\t\t\tif (p2.tagA) stars++;\n\t\t\t\t\telse stars += 2;\n\t\t\t\t\tsteps++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttwo.add(p2);\n\t\t\t\t\tif (!p1.tagA && !p1.tagB)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (p1.a <= stars)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tp1.tagA = true;\n\t\t\t\t\t\t\tstars++;\n\t\t\t\t\t\t\tsteps++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tok = false;\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}\n\t\t\t}\n\t\t\t//ps.println(\"**************\");\n\t\t\t//ps.println(\"one = \"+one.size());\n\t\t\t//ps.println(\"two = \"+two.size());\n\t\t\tif (ok)\n\t\t\t{\n\t\t\t\twhile (one.size() != 0)\n\t\t\t\t{\n\t\t\t\t\tPair p = one.poll();\n\t\t\t\t\tif (!p.tagA && !p.tagB)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (p.a <= stars)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstars++;\n/*\n\t\t\t\t\t\t\tps.println(\"mali\");\n*/\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tok = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsteps++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (ok)\n\t\t\t{\n\t\t\t\twhile (two.size() != 0)\n\t\t\t\t{\n\t\t\t\t\tPair p = two.poll();\n\t\t\t\t\tif (!p.tagB)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (p.a <= stars)\n\t\t\t\t\t\t{\n/*\n\t\t\t\t\t\t\tps.println(\"ere\");\n*/\n\t\t\t\t\t\t\tif (p.tagA) stars++;\n\t\t\t\t\t\t\telse stars += 2;\n\t\t\t\t\t\t\tsteps++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tok = false;\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}\n\t\t\t}\n\t\t\tif (ok) ps.printf(\"Case #%d: %d\\n\", c, steps);\n\t\t\telse ps.printf(\"Case #%d: Too Bad\\n\", c);\n\t\t}\n\t\tps.flush();\n\t}", "void union(int a, int b) {\n int aParent = find(a); // find parent of a\n int bParent = find(b); // find parent of b\n\n // here we are everytime setting the parent of a_set as b_set in union\n // set the parent of all a as parent of b\n childToParentMap.put(aParent, bParent);\n }" ]
[ "0.6513299", "0.63708365", "0.5828782", "0.5658923", "0.55688363", "0.5538957", "0.55200016", "0.52807903", "0.52432966", "0.52080464", "0.5179426", "0.51671493", "0.50906104", "0.50861496", "0.50775665", "0.5032327", "0.49789077", "0.4959087", "0.48902163", "0.48784506", "0.48777905", "0.4853757", "0.4835766", "0.48246956", "0.47986865", "0.479834", "0.47976843", "0.47965157", "0.47881487", "0.4786161", "0.47511503", "0.47363845", "0.46785173", "0.46754307", "0.46430475", "0.46330702", "0.46308848", "0.4622881", "0.46227062", "0.46148825", "0.4612404", "0.46117833", "0.46092913", "0.46019712", "0.45860666", "0.45817065", "0.45804837", "0.4578982", "0.45760944", "0.45589018", "0.45520908", "0.45416224", "0.45407498", "0.45400503", "0.45346588", "0.45265254", "0.45204133", "0.45197964", "0.45197245", "0.45158523", "0.45101243", "0.45093197", "0.4490249", "0.44868997", "0.4483561", "0.44816962", "0.44809365", "0.44807014", "0.44772208", "0.44762754", "0.44747123", "0.44744214", "0.44689238", "0.44618472", "0.4455129", "0.44542608", "0.44420394", "0.44351277", "0.44295934", "0.44289842", "0.44260922", "0.44176847", "0.4413731", "0.44042444", "0.43993708", "0.4391648", "0.43840668", "0.4383179", "0.43778804", "0.43756217", "0.43754125", "0.43734518", "0.43731233", "0.437142", "0.43689978", "0.43683046", "0.4359632", "0.4346522", "0.43463755", "0.43454987" ]
0.6297878
2
If only one player was on each team, we could have 33 teams
public void addTeam(Team team) { int maxTotalTeamsCurrentlyAllowed = getTotalPlayersInLeague(); // If a team has been created if(getTeams().size() != 0) { float greatestPlayerCount; // if the number of players on the largest team is not equal to zero if((greatestPlayerCount = (float) getTeamWithMostPlayers().getPlayerCount()) != 0) { // Get the sum of all the players in the league float totalLeaguePlayers = (float) getTotalPlayersInLeague(); // divide the total players in league by number of players in largest team, rounded down float totalTeamsAllowedFloat = totalLeaguePlayers / greatestPlayerCount; // cast into double for Math.floor method double totalTeamsAllowedDouble = (double) totalTeamsAllowedFloat; // cast into integer for comparison maxTotalTeamsCurrentlyAllowed = (int) Math.floor(totalTeamsAllowedDouble); } } // If we're requesting to make more teams than the current max allowed, throw exception if (getTeams().size() < maxTotalTeamsCurrentlyAllowed) { teams.add(team); } else { throw new IndexOutOfBoundsException("Not enough players for a new team"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private TeamId findWinningTeam(){\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS) {\n return TeamId.TEAM_1;\n }\n else {\n return TeamId.TEAM_2;\n }\n }", "private void getTeam() {\n Set<Integer> set = getRandomNumberSet();\n // clear new team list each time to allow for serial clicks on \"Generate New Random Team\"\n team.clear();\n for (Integer i : set) {\n getPokemon(i);\n }\n }", "@Override\n // report number of players on a given team (or all players, if null)\n\tpublic int numPlayers(String teamName) {\n\n int numPlayers = 0;\n\n\n if (teamName == null) {\n\n for (int i = 0; i < (stats.keySet()).toArray().length; i++) {\n\n numPlayers++;\n\n }\n\n return numPlayers;\n\n }\n\n else {\n\n Collection<SoccerPlayer> soccerPlayers = stats.values();\n\n for (SoccerPlayer sp: soccerPlayers) {\n\n if (sp.getTeamName().equals(teamName)){\n\n numPlayers++;\n }\n }\n\n return numPlayers;\n\n }\n\n\n\t}", "@Override\n\tpublic int countTeam() {\n\t\treturn 0;\n\t}", "private void getPlayers() {\r\n\t\tSystem.out.println(\"How Many Players: \");\r\n\t\tpnum = getNumber(1, 3);\r\n\r\n\t\tfor(int i=0; i < pnum; i++){\r\n\t\t\tSystem.out.println(\"What is player \" + (i + 1) + \"'s name? \");\r\n\t\t\tString name = sc.next();\r\n\t\t\tboolean dupe = true;\r\n\t\t\twhile(dupe){\r\n\t\t\t\tint samecounter = 0;\r\n\t\t\t\tfor(Player p : players){\r\n\t\t\t\t\tif(name.equals(p.getName())){\r\n\t\t\t\t\t\tsamecounter += 1;\r\n\t\t\t\t\t\tSystem.out.println(\"Name is the same as another players. Please choose another name: \");\r\n\t\t\t\t\t\tname = sc.next();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(samecounter == 0){\r\n\t\t\t\t\tdupe = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tplayers.add(new Player(name));\r\n\r\n\t\t}\r\n\t}", "private boolean multipleTeams(SettingsClass s){\r\n int a =s.getPlayerColor(0);\r\n for(int i=0;i<s.getNumPlayers();i++){\r\n if(a!=s.getPlayerColor(i)){\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public int numberOfTeams() {\n return noTeams;\n }", "private static void checkOne(ArrayList<Team> teamArray){\n int teamNum=1;\r\n int check = 0;\r\n boolean used = false;\r\n\r\n //sets Tokimon that have a JSON or is the first tokimon on the JSON\r\n //sorts Tokimon on team alphabetically and sorts teams by team number\r\n for(Team team: teamArray){\r\n team.getMembers().get(0).setHasJson(true);\r\n team.getMembers().get(0).setIsFirst(true);\r\n team.setOwner(team.getMembers().get(0));\r\n Collections.sort(team.getMembers(), new TokimonComparator());\r\n }\r\n Collections.sort(teamArray, new TeamComparator());\r\n\r\n for(int a=0; a<teamArray.size()-1; a++){\r\n for(int b=0; b<teamArray.get(a).getMembers().size(); b++){\r\n for(int c=a+1; c<teamArray.size(); c++){\r\n //finds if the Tokimon submitted a JSON file\r\n if(teamArray.get(a).getMembers().get(b).getId().trim().equalsIgnoreCase(teamArray.get(c).getMembers().get(0).getId().trim())){\r\n teamArray.get(c).getMembers().get(0).setHasJson(true);\r\n }\r\n for(int d=0; d<teamArray.get(c).getMembers().size(); d++){\r\n //If two Tokimon have the same ID, but different names on JSON files then exit\r\n if(teamArray.get(a).getMembers().get(b).getId().trim().equalsIgnoreCase(teamArray.get(c).getMembers().get(d).getId().trim())){\r\n if(teamArray.get(a).getMembers().get(b).getName().equals(teamArray.get(c).getMembers().get(d).getName())==false){\r\n System.out.println(\"Tokimon property match error between:\\n\");\r\n System.out.println(\"Name: \" + teamArray.get(a).getMembers().get(b).getName() + \" ID: \" + teamArray.get(a).getMembers().get(b).getId());\r\n System.out.println(\"Path and Filename: \" + teamArray.get(c).getFilename());\r\n System.out.println(\"and\");\r\n System.out.println(\"Name: \" + teamArray.get(c).getMembers().get(d).getName() + \" ID: \" + teamArray.get(c).getMembers().get(d).getId());\r\n System.out.println(\"Path and Filename: \" + teamArray.get(a).getFilename());\r\n System.exit(-1);\r\n }\r\n if(teamArray.get(a).getMembers().get(b).getHasJson()==true || teamArray.get(c).getMembers().get(d).getHasJson()==true){\r\n teamArray.get(a).getMembers().get(b).setHasJson(true);\r\n teamArray.get(c).getMembers().get(d).setHasJson(true);\r\n }\r\n }\r\n //used to check if team is equal\r\n if(teamArray.get(a).getMembers().size() == teamArray.get(c).getMembers().size()){\r\n used = true;\r\n if(teamArray.get(a).getMembers().get(d).getId().trim().equalsIgnoreCase(teamArray.get(c).getMembers().get(d).getId().trim())){\r\n check++;\r\n }\r\n }\r\n }\r\n //sets what team they are on\r\n if(check== teamArray.get(a).getMembers().size() && used == true ){\r\n if(teamArray.get(a).getTeamNum() == -1){\r\n teamArray.get(a).setTeamNum(teamNum);\r\n }\r\n teamArray.get(c).setTeamNum(teamArray.get(a).getTeamNum());\r\n }else if(check != teamArray.get(a).getMembers().size() && check!=0){\r\n System.out.println(\"Tokimon contained on different teams\");\r\n System.out.println(\"Path and Filename: \" + teamArray.get(a).getFilename());\r\n System.exit(-1);\r\n }\r\n if(teamArray.get(a).getMembers().size()==1){\r\n if(check == 1){\r\n System.out.println(\"Duplicate of single Tokimon team found\");\r\n System.out.println(\"Path and Filename: \" + teamArray.get(a).getFilename());\r\n System.exit(-1);\r\n }\r\n teamArray.get(a).setTeamNum(teamNum);\r\n }\r\n check = 0;\r\n used = false;\r\n }\r\n teamNum++;\r\n }\r\n }\r\n //base case if a single Tokimon team is last\r\n if(teamArray.get(teamArray.size()-1).getMembers().size()==1 && teamArray.get(teamArray.size()-1).getTeamNum()==-1){\r\n teamArray.get(teamArray.size()-1).setTeamNum(99999);\r\n }\r\n for(Team team: teamArray){\r\n for(Tokimon tokimon: team.getMembers()){\r\n //makes sure all tokimon have JSON\r\n if(tokimon.getHasJson()==false){\r\n System.out.println(\"Tokimon missing JSON submission\");\r\n System.out.println(\"Path and Filename: \" + team.getFilename());\r\n System.out.println(\"Name: \" + tokimon.getName() + \" ID: \" + tokimon.getId());\r\n System.exit(-1);\r\n }\r\n// System.out.println(tokimon.getId());\r\n }\r\n //makes sure tokimon only appear on one team\r\n if(team.getTeamNum()==-1){\r\n System.out.println(\"One or more teams are incorrect\");\r\n System.out.println(\"Path and Filename: \" + team.getFilename());\r\n System.exit(-1);\r\n }\r\n\r\n }\r\n }", "public static void set2v2Teams(int gameModeSelected, int numPlayers){\n\t\tint randomPlayer1;\n\t\tint randomPlayer2;\n\t\t\n\t\tif(gameModeSelected==2) {\n\t\t\tRandom playerGen =new Random();\n\t\t\trandomPlayer1=playerGen.nextInt(numPlayers)+1;\n\t\t\tRandom playerGen2 =new Random();\n\t\t\trandomPlayer2=playerGen2.nextInt(numPlayers)+1;\n\t\t\tif(randomPlayer1!=randomPlayer2) {\n\t\t\t\tif(randomPlayer1==1) {\n\t\t\t\t\tteam1[0]=\"Player 1\";\n\t\t\t\t\tif(randomPlayer2==2) {\n\t\t\t\t\t\tteam1[1]=\"Player 2\";\n\t\t\t\t\t\tteam2[0]=\"Player 3\";\n\t\t\t\t\t\tteam2[1]=\"Player 4\";\n\t\t\t\t\t}\n\t\t\t\t\telse if(randomPlayer2==3) {\n\t\t\t\t\t\tteam1[1]=\"Player 3\";\n\t\t\t\t\t\tteam2[0]=\"Player 2\";\n\t\t\t\t\t\tteam2[1]=\"Player 4\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\tteam1[1]=\"Player 4\";\n\t\t\t\t\tteam2[0]=\"Player 2\";\n\t\t\t\t\tteam2[1]=\"Player 3\";\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(randomPlayer1==2){\n\t\t\t\t\tteam1[0]=\"Player 2\";\n\t\t\t\t\tif(randomPlayer2==1) {\n\t\t\t\t\t\tteam1[1]=\"Player 1\";\n\t\t\t\t\t\tteam2[0]=\"Player 3\";\n\t\t\t\t\t\tteam2[1]=\"Player 4\";\n\t\t\t\t\t}\n\t\t\t\t\telse if(randomPlayer2==3) {\n\t\t\t\t\t\tteam1[1]=\"Player 3\";\n\t\t\t\t\t\tteam2[0]=\"Player 1\";\n\t\t\t\t\t\tteam2[1]=\"Player 4\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\tteam1[1]=\"Player 4\";\n\t\t\t\t\tteam2[0]=\"Player 1\";\n\t\t\t\t\tteam2[1]=\"Player 3\";\t\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\telse if(randomPlayer1==3){\n\t\t\t\t\tteam1[0]=\"Player 3\";\n\t\t\t\t\tif(randomPlayer2==1) {\n\t\t\t\t\t\tteam1[1]=\"Player 1\";\n\t\t\t\t\t\tteam2[0]=\"Player 2\";\n\t\t\t\t\t\tteam2[1]=\"Player 4\";\n\t\t\t\t\t}\n\t\t\t\t\telse if(randomPlayer2==2) {\n\t\t\t\t\t\tteam1[1]=\"Player 2\";\n\t\t\t\t\t\tteam2[0]=\"Player 1\";\n\t\t\t\t\t\tteam2[1]=\"Player 4\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\tteam1[1]=\"Player 4\";\n\t\t\t\t\tteam2[0]=\"Player 1\";\n\t\t\t\t\tteam2[1]=\"Player 2\";\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tteam1[0]=\"Player 4\";\n\t\t\t\t\tif(randomPlayer2==1) {\n\t\t\t\t\t\tteam1[1]=\"Player 1\";\n\t\t\t\t\t\tteam2[0]=\"Player 2\";\n\t\t\t\t\t\tteam2[1]=\"Player 3\";\n\t\t\t\t\t}\n\t\t\t\t\telse if(randomPlayer2==2) {\n\t\t\t\t\t\tteam1[1]=\"Player 2\";\n\t\t\t\t\t\tteam2[0]=\"Player 1\";\n\t\t\t\t\t\tteam2[1]=\"Player 3\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\tteam1[1]=\"Player 3\";\n\t\t\t\t\tteam2[0]=\"Player 1\";\n\t\t\t\t\tteam2[1]=\"Player 2\";\t\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}//end of if generated nums aren't equal\n\t\t\t\n\t\t\telse{ \n\t\t\t\tif(randomPlayer1==1) {\n\t\t\t\tteam1[0]=\"Player 1\";\n\t\t\t\tteam1[1]=\"Player 2\";\n\t\t\t\tteam2[0]=\"Player 3\";\n\t\t\t\tteam2[1]=\"Player 4\";\n\t\t\t\t}\n\t\t\t\telse if(randomPlayer1==2) {\n\t\t\t\t\tteam1[0]=\"Player 2\";\n\t\t\t\t\tteam1[1]=\"Player 1\";\n\t\t\t\t\tteam2[0]=\"Player 3\";\n\t\t\t\t\tteam2[1]=\"Player 4\";\n\t\t\t\t\t}\n\t\t\t\telse if(randomPlayer1==3) {\n\t\t\t\t\tteam1[0]=\"Player 3\";\n\t\t\t\t\tteam1[1]=\"Player 2\";\n\t\t\t\t\tteam2[0]=\"Player 1\";\n\t\t\t\t\tteam2[1]=\"Player 4\";\n\t\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tteam1[0]=\"Player 4\";\n\t\t\t\t\tteam1[1]=\"Player 2\";\n\t\t\t\t\tteam2[0]=\"Player 3\";\n\t\t\t\t\tteam2[1]=\"Player 4\";\n\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"Team 1 is \" + team1[0] + \" and \" + team1[1]);\n\t\t\tSystem.out.println(\"Team 2 is \" + team2[0] + \" and \" + team2[1]);\n\t\t}//end of if right gameMode\n\t}", "public void calculatePausedPlayers(Tournament tournament, Round round) {\r\n\t\t// this is the number of players in one match\r\n\t\tint numberOfMatchPlayers = tournament.getTeamSize() * 2; // home and away team\r\n\t\t// this is the maximum number of players in one round\r\n\t\tint maxNumberOfActivePlayers = tournament.getCourts() * numberOfMatchPlayers;\r\n\r\n\t\twhile (round.getPlayers().size() > maxNumberOfActivePlayers) {\r\n\t\t\taddPausedPlayer(tournament.getRounds(), round);\r\n\t\t}\r\n\r\n\t\twhile ((round.getPlayers().size() % numberOfMatchPlayers) != 0) {\r\n\t\t\taddPausedPlayer(tournament.getRounds(), round);\r\n\t\t}\r\n\t}", "boolean hasTeam();", "public void run() {\r\n for(int i = group; i < 64; i += 4) {\r\n if(!m_teams[i].isOut()) {\r\n setSurvivingTeam(m_teams[i]);\r\n return;\r\n }\r\n }\r\n\r\n m_botAction.sendArenaMessage(\"No one won for Base \" + (group + 1));\r\n }", "protected abstract void gatherTeam();", "public static void addPlayer(League theLeague, Team theTeam, Scanner keyboard) {\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"---Add Player---\");\r\n\t\ttheTeam.teamToString();\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"--Top 20 Free Agents--\");\r\n\t\ttheLeague.getFreeAgents(20);\r\n\r\n\t\tint playerChoice;\r\n\t\tdo {\r\n\t\t\tdo {\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tSystem.out.println(\" 0 - Filter Free Agents by Position\");\r\n\t\t\t\tSystem.out.println(\" -1 - View All Free Agents\");\r\n\t\t\t\tSystem.out.println(\"1-\" + theLeague.playerList().size() + \" - Select a Player\");\r\n\t\t\t\tplayerChoice = Input.validInt(-1, theLeague.playerList().size(), keyboard);\r\n\t\t\t\t\r\n\t\t\t\tif (playerChoice == -1) {\r\n\t\t\t\t\ttheLeague.getFreeAgents();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (playerChoice == 0) {\r\n\t\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\t\tSystem.out.println(\"Which position would you like to view?\");\r\n\t\t\t\t\tSystem.out.println(\"1 - QB\");\r\n\t\t\t\t\tSystem.out.println(\"2 - WR\");\r\n\t\t\t\t\tSystem.out.println(\"3 - RB\");\r\n\t\t\t\t\tSystem.out.println(\"4 - TE\");\r\n\t\t\t\t\tswitch (Input.validInt(1, 4, keyboard)) {\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent QBs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"QB\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent WRs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"WR\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 3:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent RBs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"RB\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 4:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent TEs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"TE\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\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} while (playerChoice < 1);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (theLeague.playerList().get(playerChoice - 1).getIsOwned()) {\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tSystem.out.println(theLeague.playerList().get(playerChoice - 1).playerToString() + \" is not available\");\r\n\t\t\t}\r\n\t\t} while (theLeague.playerList().get(playerChoice - 1).getIsOwned());\r\n\r\n\t\tPlayer thePlayer = theLeague.playerList().get(playerChoice - 1);\r\n\t\tthePlayer.setIsOwned();\r\n\t\ttheTeam.getRoster().add(thePlayer);\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"***\" + theTeam.getManagerName() + \" has added \" + thePlayer.playerToString() + \"***\");\r\n\t}", "int getTeam();", "@Override\n public boolean hasWonGame( int team ) {\n boolean canReach = false;\n if(team == 1){\n for(Dot sDot:board.getStartNodes1()){\n for(Dot eDot:board.getEndNodes1()){\n if(canReachDFS(sDot,eDot)){\n canReach = true;\n }\n }\n }\n }\n else if(team ==2){\n for(Dot sDot:board.getStartNodes2()){\n for(Dot eDot:board.getEndNodes2()){\n if(canReachDFS(sDot,eDot)){\n canReach = true;\n }\n }\n }\n }\n return canReach;\n }", "public void printTeamsInLeague(){\n for (T i : teams){\n System.out.println(i.getTeamName());\n }\n }", "public int size() {\r\n return team.size();\r\n }", "public Team getTeam(Team enemyTeam) {\n\t\tArrayList<Character>battleArray = new ArrayList<Character>();\r\n\t\tboolean complete = false;\r\n\t\t\r\n\t\tfor(Character c : guildArray) {\r\n\t\t\tStudent s = (Student) c;\r\n\t\t\t//Choosing alive students whose KP is max thus they can perform stronger attacks\r\n\t\t\tif(s.MaxKPReached() && s.getHP() > 0){\r\n\t\t\t\tbattleArray.add(s);\r\n\t\t\t}\r\n\t\t\t//if the size of the team is 5, then the team is completed\r\n\t\t\tif(battleArray.size() == 5){\r\n\t\t\t\tcomplete = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//If the team still needs members search for members\r\n\t\tfor(int i = 0; i < guildArray.size() && complete == false; i++) {\r\n\t\t\t//Check if the student is not already in the battle team and alive\r\n\t\t\tStudent student = (Student)guildArray.get(i);\r\n\t\t\tif(!battleArray.contains(student) && student.getHP() > 0){ \r\n\t\t\t\tbattleArray.add(student);\r\n\t\t\t}\r\n\t\t\tif(battleArray.size() == 5) {\r\n\t\t\t\tcomplete = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tTeam battleTeam = new StudentTeam(\"BattleTeam\");\r\n\t\tfor(Character c : battleArray) {\r\n\t\t\tbattleTeam.addMember(c);\r\n\t\t}\r\n\r\n\t\treturn battleTeam;\r\n\t}", "@Test\r\n\tpublic void findAllTeams() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: findAllTeams \r\n\t\tInteger startResult = 0;\r\n\t\tInteger maxRows = 0;\r\n\t\tList<Team> response = null;\r\n\t\tresponse = service.findAllTeams(startResult, maxRows);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: findAllTeams\r\n\t}", "@Override\n\tpublic int getTeam() {\n\t\treturn 0;\n\t}", "public ArrayList<CollegeFootballTeam> rankTeams();", "public void testSendToTeams() throws Exception{\n\n // Sort order:\n // Primary Sort = number of solved problems (high to low)\n // Secondary Sort = score (low to high)\n // Tertiary Sort = earliest submittal of last submission (low to high)\n // Forth Sort = teamName (low to high)\n // Fifth Sort = clientId (low to high)\n \n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n \"5,5,A,12,No\",\n \"6,5,A,12,Yes\", \n\n // t5 solves A, 32 pts = 20 + 12\n \n \"7,6,A,12,No,Yes\",\n \"8,6,A,12,Yes,No\",\n \n // t6 does not solve, 0 solve, 0 pts\n\n \"15,5,B,21,No\",\n \"16,5,B,22,Yes,No\", \n \n // t5 does solve B, but not sent to team/used 0 pts 0 solved\n \n \"25,6,B,21,No,No\",\n \"26,6,B,22,Yes,Yes\",\n \n // t6 solves B, 22 pts because No at 21 is NOT counted.\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n // rank, team, solved, pts\n \"1,team6,1,22\",\n \"2,team5,1,32\",\n \"3,team1,0,0\",\n \"3,team2,0,0\",\n \"3,team3,0,0\",\n \"3,team4,0,0\",\n };\n \n scoreboardTest (6, runsData, rankData, true);\n }", "Match getTeam1LooserOfMatch();", "public String winningTeam(String team1, String team2)\n {\n int r = new Random().nextInt(3 + 1);\n\n int team1Standing = -10;\n int team2Standing = -10;\n for (int i = 0 ; i < playoffs.length; i++)\n {\n if (playoffs[i].equals(team1))\n {\n team1Standing = i;\n break;\n }\n }\n\n for (int i = 0 ; i < playoffs.length; i++)\n {\n if (playoffs[i].equals(team2))\n {\n team2Standing = i;\n break;\n }\n }\n\n if(team1Standing < team2Standing && r == 1)\n return team1;\n else if (team1Standing > team2Standing && r == 1)\n return team2;\n\n else\n {\n r = new Random().nextInt(1 + 1);\n if(r == 0)\n return team1;\n else\n return team2;\n }\n\n }", "@Override\n\tpublic int compareTo(Team team) {\n\n\t\tif (this.numOfPlayer == team.numOfPlayer) {\n\t\t\tSystem.out.println(\"Both teams have same number of players\");\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "void addTeam1Members() {\n\n String pname, pinit;\n String[] aname;\n for (int x = 0; x < team1Players; x++) {\n switch (x) {\n case 0:\n aname = spnPlayer1.getSelectedItem().toString().split(\"-\");\n pname = aname[0].trim();\n pinit = aname[1].trim();\n\n setTeam1PlayerNames(pname, x);\n sT1P1 = pname;\n\n setTeam1PlayerInit(pinit, x);\n\n break;\n case 1:\n aname = spnPlayer2.getSelectedItem().toString().split(\"-\");\n pname = aname[0].trim();\n pinit = aname[1].trim();\n\n setTeam1PlayerNames(pname, x);\n sT1P2 = pname;\n\n setTeam1PlayerInit(pinit, x);\n\n break;\n case 2:\n aname = spnPlayer3.getSelectedItem().toString().split(\"-\");\n pname = aname[0].trim();\n pinit = aname[1].trim();\n\n setTeam1PlayerNames(pname, x);\n sT1P3 = pname;\n\n setTeam1PlayerInit(pinit, x);\n break;\n case 3:\n aname = spnPlayer4.getSelectedItem().toString().split(\"-\");\n pname = aname[0].trim();\n pinit = aname[1].trim();\n\n setTeam1PlayerNames(pname, x);\n sT1P4 = pname;\n\n setTeam1PlayerInit(pinit, x);\n break;\n case 4:\n aname = spnPlayer5.getSelectedItem().toString().split(\"-\");\n pname = aname[0].trim();\n pinit = aname[1].trim();\n\n setTeam1PlayerNames(pname, x);\n sT1P5 = pname;\n\n setTeam1PlayerInit(pinit, x);\n break;\n case 5:\n aname = spnPlayer6.getSelectedItem().toString().split(\"-\");\n pname = aname[0].trim();\n pinit = aname[1].trim();\n\n setTeam1PlayerNames(pname, x);\n sT1P6 = pname;\n\n setTeam1PlayerInit(pinit, x);\n break;\n\n }\n\n }\n\n }", "List<Team> findTeamsByUserId(UserId userId);", "public static void random() {\n boolean nameCheck = false;\n if ((PremierLeagueManager.premierLeague.size()-1)*(PremierLeagueManager.premierLeague.size())>(PremierLeagueManager.matches.size())) {\n do {\n Random rand = new Random();\n SportsClub randTest1 = PremierLeagueManager.premierLeague.get(rand.nextInt(PremierLeagueManager.premierLeague.size())); //getting random club name from array list\n SportsClub randTest2 = PremierLeagueManager.premierLeague.get(rand.nextInt(PremierLeagueManager.premierLeague.size()));\n clubName1 = randTest1.getClubName1(); //random club name initialize to the variable\n clubName2 = randTest2.getClubName1();\n if (!clubName1.equalsIgnoreCase(clubName2)) { //checking to random names are equal or not\n for (SportsClub footBallClub : PremierLeagueManager.matches) {\n if ((clubName1.equalsIgnoreCase((footBallClub).getClubName1())) && (clubName2.equalsIgnoreCase((footBallClub).getClubName2()))) {\n nameCheck = false;\n break;\n } else {\n nameCheck = true;\n }\n }\n } else {\n nameCheck = false;\n }\n }while (!nameCheck);\n\n LocalDate startDate = LocalDate.of(2020, 8, 1); //start date https://stackoverflow.com/questions/40253332/generating-random-date-in-a-specific-range-in-java/40253420\n long start = startDate.toEpochDay();\n\n LocalDate endDate = LocalDate.of(2021,5,30); //end date\n long end = endDate.toEpochDay();\n\n long randomEpochDay = ThreadLocalRandom.current().longs(start, end).findAny().getAsLong();\n String date = String.valueOf(LocalDate.ofEpochDay(randomEpochDay)); //getting random date between 2020-08-1 to 2021-05-31\n //System.out.println(date);\n\n\n Random randScore = new Random();\n team1Scored = randScore.nextInt(15); //getting random score between 0 to 15\n team2Scored = randScore.nextInt(15);\n\n for (SportsClub footBallClub : PremierLeagueManager.premierLeague) { //calculation part\n if ((footBallClub.getClubName1().equalsIgnoreCase(clubName1))) {\n if (team1Scored > team2Scored) {\n wins1 = ((FootBallClub) footBallClub).getWins()+1;\n defeats1 = ((FootBallClub) footBallClub).getDefeats();\n noOfPoints1 = ((FootBallClub) footBallClub).getNoOfPoints()+3;\n draws1 = ((FootBallClub) footBallClub).getDraws();\n }\n else if (team2Scored > team1Scored) {\n wins1 = ((FootBallClub) footBallClub).getWins();\n defeats1 = ((FootBallClub) footBallClub).getDefeats()+1;\n noOfPoints1 = ((FootBallClub) footBallClub).getNoOfPoints();\n draws1 = ((FootBallClub) footBallClub).getDraws();\n }\n else if (team1Scored == team2Scored) {\n wins1 = ((FootBallClub) footBallClub).getWins();\n defeats1 = ((FootBallClub) footBallClub).getDefeats();\n draws1 = ((FootBallClub) footBallClub).getDraws()+1;\n noOfPoints1 = ((FootBallClub) footBallClub).getNoOfPoints()+1;\n }\n noOfGoals1 = ((FootBallClub) footBallClub).getNoOfGoals()+team2Scored;\n scored1 = ((FootBallClub) footBallClub).getScored()+team1Scored;\n playedMatches1=((FootBallClub) footBallClub).getNoOfMatches()+1;\n goalDifference1 =scored1-noOfGoals1;\n SportsClub footballClub1 = new FootBallClub(clubName1,\"\",location,foundedYear,0,wins1,draws1,defeats1,noOfGoals1,scored1,noOfPoints1,playedMatches1, goalDifference1,date); //pass the object to the constructor\n PremierLeagueManager.premierLeague.set(PremierLeagueManager.premierLeague.indexOf(footBallClub),footballClub1); //set the first team object to the relevant index number\n\n\n }else if ((footBallClub.getClubName1().equalsIgnoreCase(clubName2))){\n if (team2Scored > team1Scored) {\n wins2 = ((FootBallClub) footBallClub).getWins()+1;\n defeats2 = ((FootBallClub) footBallClub).getDefeats();\n draws2 = ((FootBallClub) footBallClub).getDraws();\n noOfPoints2 = ((FootBallClub) footBallClub).getNoOfPoints()+3;\n }\n else if (team1Scored > team2Scored) {\n wins2 = ((FootBallClub) footBallClub).getWins();\n defeats2 = ((FootBallClub) footBallClub).getDefeats()+1;\n draws2 = ((FootBallClub) footBallClub).getDraws();\n noOfPoints2 = ((FootBallClub) footBallClub).getNoOfPoints();\n }\n else if (team1Scored == team2Scored) {\n wins2 = ((FootBallClub) footBallClub).getWins();\n defeats2 = ((FootBallClub) footBallClub).getDefeats();\n draws2 = ((FootBallClub) footBallClub).getDraws()+1;\n noOfPoints2 = ((FootBallClub) footBallClub).getNoOfPoints()+1;\n }\n noOfGoals2 = ((FootBallClub) footBallClub).getNoOfGoals()+team1Scored;\n scored2 = ((FootBallClub) footBallClub).getScored()+team2Scored;\n playedMatches2=((FootBallClub) footBallClub).getNoOfMatches()+1;\n goalDifference2 =scored2-noOfGoals2;\n SportsClub footballClub2 = new FootBallClub(clubName2,\"\",location,foundedYear,0,wins2,draws2,defeats2,noOfGoals2,scored2,noOfPoints2,playedMatches2, goalDifference2,date);\n PremierLeagueManager.premierLeague.set(PremierLeagueManager.premierLeague.indexOf(footBallClub),footballClub2); //set the second team object to the relevant index number\n }\n }\n SportsClub playedMatch1 = new FootBallClub(clubName1,clubName2,\"\",\"\",0,0,0,0,team1Scored,team2Scored,0,0,0,date); //pass the matches details to the constructor\n premierLeagueManager.addPlayedMatch(playedMatch1);\n position();\n }\n }", "public List<Player> playMatch(List<Player> arrayListPlayers) {\n\n //instantiate Lists for winners / losers\n List<Player> winners = new ArrayList<>();\n List<Player> losers = new ArrayList<>();\n\n //Pairing up - each Player with the next Player, iterator runs for every 2\n for (int i = 0; i < arrayListPlayers.size(); i += 2) {\n\n System.out.println(arrayListPlayers.get(i).printName() + \" (\" + arrayListPlayers.get(i).score + \") vs \"\n + arrayListPlayers.get((i + 1) % arrayListPlayers.size()).printName() + \" (\" + arrayListPlayers.get(i + 1).score + \")\");\n\n //Extra layer of random scoring, so calculateScore is run with each round\n //Without this, players get an initial score that stay with them through the tournament\n arrayListPlayers.get(i).calculateScore();\n\n //Use score to decipher winner, if (i) score is greater than (i +1) score then add (i) to winners List\n if (arrayListPlayers.get(i).score > arrayListPlayers.get(i + 1).score) {\n winners.add(arrayListPlayers.get(i));\n }\n //And if (i) score is less than (i + 1) score add (i + 1) to winners List\n if (arrayListPlayers.get(i).score < arrayListPlayers.get(i + 1).score) {\n winners.add(arrayListPlayers.get(i + 1));\n\n\n //extra if statement to handle draws, if score is equal add player [0] to winners List, could randomise this?\n } else if\n (arrayListPlayers.get(i).score == arrayListPlayers.get(i + 1).score) {\n winners.add(arrayListPlayers.get(i));\n }\n\n /**\n * Additional if statements for adding Player objects to new List 'losers'\n */\n //Create List of losers (not output)\n if (arrayListPlayers.get(i).score < arrayListPlayers.get(i + 1).score) {\n winners.remove(arrayListPlayers.get(i));\n losers.add(arrayListPlayers.get(i));\n\n } else if (arrayListPlayers.get(i).score > arrayListPlayers.get(i + 1).score) {\n winners.remove(arrayListPlayers.get(i + 1));\n losers.add(arrayListPlayers.get(i + 1));\n }\n }\n\n /**\n * This section of the playRound method outputs the list of winners for each round\n * A sleep function was added in attempt to slow down the output\n */\n\n System.out.println(\"\\n-x-x-x-x-x-x-x W I N N E R S x-x-x-x-x-x-x-\\n\");\n //Loop through winners and attach names\n try {\n sleep(10);\n for (int i = 0; i < winners.size(); i++) {\n //SysOut to console the winners\n System.out.println(winners.get(i).printName() + \" won with \" + winners.get(i).score + \" points\");\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n //Execution completed return winners List<>\n return winners;\n\n }", "public static Player.PlayerTeam getWinningTeam(List<Player> players) {\n int sumForPaper = players.stream()\n .filter(player -> player.getTeam() == Player.PlayerTeam.PAPER)\n .mapToInt(Player::getCurrentScore)\n .sum();\n\n int sumForRock = players.stream()\n .filter(player -> player.getTeam() == Player.PlayerTeam.ROCK)\n .mapToInt(Player::getCurrentScore)\n .sum();\n\n int sumForScissors = players.stream()\n .filter(player -> player.getTeam() == Player.PlayerTeam.SCISSORS)\n .mapToInt(Player::getCurrentScore)\n .sum();\n\n Map<Player.PlayerTeam, Integer> finalList = new HashMap<>();\n finalList.put(Player.PlayerTeam.PAPER, sumForPaper);\n finalList.put(Player.PlayerTeam.ROCK, sumForRock);\n finalList.put(Player.PlayerTeam.SCISSORS, sumForScissors);\n\n int max = Collections.max(finalList.values());\n\n List<Player.PlayerTeam> collect = finalList.entrySet().stream()\n .filter(entry -> entry.getValue() == max)\n .map(entry -> entry.getKey())\n .collect(Collectors.toList());\n\n Player.PlayerTeam winningTeam = collect.get(0);\n\n return winningTeam;\n\n }", "@Override\n public SoccerPlayer playerNum(int idx, String teamName) {\n\n Collection<SoccerPlayer> soccerPlayers = stats.values();\n\n if (teamName == null){\n\n int count = 0;\n\n for (SoccerPlayer sp: soccerPlayers){\n\n if(count == idx){\n\n return sp;\n\n }\n else{\n\n count++;\n\n }\n }\n }\n\n else {\n\n int count = -1;\n\n for (SoccerPlayer sp: soccerPlayers){\n\n if(sp.getTeamName().equals(teamName)){\n\n count++;\n\n if(count == idx){\n\n return sp;\n\n }\n }\n }\n }\n\n return null;\n }", "private Player playOneGame() {\n\t\tCountry.Counter = map.countries.size();\n\t\tPlayer winner = null;\n\t\tint turn = 0;\n\t\t\n\t\tstartUpPhase();\n\t\t\n\t\tdo\n\t\t{\n\t\t\tturn++;\n\t\t\tSystem.out.println(\"\\n - TURN \" + turn + \" -\");\n\n\t\t\tfor(Player p : map.players) \n\t\t\t{\n\t\t\t\tif(p.ownedCountries.size() > 0)\n\t\t\t\t{\n\t\t\t\t\treinforcementPhase(p);\n\t\t\t\t\tattackPhase(p);\n\t\t\t\t\t\n\t\t\t\t\tif(map.isOwned()) {\n\t\t\t\t\t\twinner = p;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfortificationPhase(p);\n\t\t\t\t}\n\t\t\t}\n\t\t}while(!map.isOwned() && turn < maximumTurns); /* When map is owned, end of the game */\n\t\t\n\t\treturn winner;\n\t}", "@Test\n void testNextPlayerWhenPlayerHas2Clubs() {\n Dealer testDealer = new Dealer();\n testDealer.initDealer();\n \n ArrayList<Card> clubCards;\n clubCards = new ArrayList <Card>();\n\n for (Rank rank : Rank.values()) {\n clubCards.add(new Card(Suit.CLUBS, rank, true));\n }\n \n testDealer.getUser().fillHandCards(clubCards);\n testDealer.setPlayerStarter(); \n testDealer.getTrickPlayer();\n assertEquals(testDealer.getBotA().getId(), testDealer.getNextPlayer());\n }", "public boolean hasTeam(User std) {\r\n\t\tboolean hasTeam = false;\r\n\t\tHashMap<String, ArrayList<String>> map = MySQLConnector.executeMySQL(\"select\", \"SELECT * FROM `is480-matching`.students WHERE id = \" + std.getID() + \" ;\");\r\n\t\tSet<String> keySet = map.keySet();\r\n\t\tIterator<String> iterator = keySet.iterator();\r\n\t\t\r\n\t\twhile (iterator.hasNext()){\r\n\t\t\tString key = iterator.next();\r\n\t\t\tArrayList<String> array = map.get(key);\t\r\n\t\t\tint teamId \t= Integer.parseInt(array.get(3));\r\n\t\t\t\r\n\t\t\tif(teamId != 0){\r\n\t\t\t\thasTeam = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn hasTeam;\r\n\t}", "public static void playTournament(\n\t\t ArrayList<MazePlayer> players,\n\t\t int width, int depth, \n\t\t int reps, int steps) {\n\t System.out.println(\"Playing tournament!\");\n\n\t int[][] winners = new int[players.size()][players.size()];\n\t for (MazePlayer p1:players)\n\t\t for (MazePlayer p2:players)\n\t\t if (!p1.equals(p2))\n\t\t for (int k=0;k<reps;k++){\n\t\t\t MazeGame g = new MazeGame(width,depth);\n\t\t\t g.addPlayer(p1);\n\t\t\t g.addPlayer(p2);\n\n\t\t\t for(int i=0;i<steps;i++){\n\t\t\t\t\tif (MazeGame.debugging) System.out.println(\"\\n\\n************\\nround \"+i);\n\t\t\t\t\tif (MazeGame.debugging) System.out.println(g.theBoard.drawBoard(g.playerPosition,g.jewelPosition));\n\t\t\t\t for (MazePlayer p: g.player.values()){\n\t\t\t\t\t\t Direction d = p.nextMove(g.playerPosition,g.jewelPosition,g.theBoard);\n\t\t\t\t\t\t g.movePlayer(p,d);\n\t\t\t\t\t }\n\t\t\t }\n\t\t\t int scoreDiff = g.score.get(p1.name)-g.score.get(p2.name);\n\t\t\t System.out.println(p1.name+\" vs \"+p2.name+\" = \"+scoreDiff);\n\t\t\t if (scoreDiff>0){\n\t\t\t\t winners[players.indexOf(p1)][players.indexOf(p2)] += 1;\n\t\t\t }\n\t\t\t else {\n\t\t\t\t winners[players.indexOf(p2)][players.indexOf(p1)] += 1;\t\t\t \n\t\t\t }\n\t\t }\n\t System.out.println(\"Results\");\n\t for (int i=0;i<players.size();i++){\n\t\t int sum=0;\n\t\t for(int j=0;j<players.size();j++){\n\t\t\t sum += winners[i][j];\n\t\t\t System.out.print(\"\\t\"+winners[i][j]);\n\t\t }\n\t\t System.out.println(\"\\t\"+sum+\"\\t\"+players.get(i).name);\n\t }\n\t for (int j=0;j<players.size();j++){\n\t\t int losses=0;\n\t\t for (int i=0;i<players.size();i++) {\n\t\t\t losses += winners[i][j];\n\t\t }\n\t\t System.out.print(\"\\t\"+losses);\n\t }\n\t System.out.println();\n }", "public void updateUserTeam() {\n\t\tUser user = users.get(userTurn);\n\t\tSystem.out.println(user.getName());\n\t\tSystem.out.println(tmpTeam.size());\n\t\tUserTeam roundTeam = new UserTeam();\n\t\troundTeam.putAll(tmpTeam.getPlayers());\n\t\tSystem.out.println(roundNumber);\n\t\tSystem.out.println(roundTeam.size());\n\t\tSystem.out.println(\"dfdfdfd\");\n\t\tuser.setUserTeam(roundTeam, roundNumber);\n\t\tSystem.out.println(\"dfdfdfd\");\n\t\ttmpTeam = new UserTeam();\n\t}", "public void setTeams(Collection<Team> teams) {\r\n this.teams = teams;\r\n }", "public void gameOverCheck() {\n //users\n if (tankTroubleMap.getUsers().size() != 0) {\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getUsers().get(0).getGroupNumber());\n for (int i = 1; i < tankTroubleMap.getUsers().size(); i++) {\n if (tankTroubleMap.getUsers().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n //bots\n int firstBot = 0;\n if (tankTroubleMap.getBots().size() != 0) {\n if (tankTroubleMap.getWinnerGroup() == -1) {\n firstBot = 1;\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getBots().get(0).getGroupNumber());\n }\n for (int i = firstBot; i < tankTroubleMap.getBots().size(); i++) {\n if (tankTroubleMap.getBots().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n tankTroubleMap.setGameOver(true);\n }", "private Set<SteamUserNode> bindGames(Set<SteamUserNode> players) {\n\t\tString dest = \"http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?\" +\r\n\t\t\t\t\"key=%s&steamid=%d&include_appinfo=1&include_played_free_games=1&format=json\";\r\n\t\tString response = \"\";\r\n\t\tfor (SteamUserNode p : players) {\r\n\t\t\ttry {\r\n\t\t\t\tthis.apiCalls += 1;\r\n\t\t\t\tString query = String.format(dest, key, p.getId());\r\n\t\t\t\tURL url = new URL(query);\r\n\t\t\t\tHttpURLConnection con = (HttpURLConnection) url.openConnection();\r\n\t\t\t\tcon.setRequestMethod(\"GET\");\r\n\t\t\t\tcon.setConnectTimeout(3000);\r\n\t\t\t\tcon.connect();\r\n\t\t\t\tint respCode = con.getResponseCode();\r\n\t\t\t\tif (respCode != 200)\r\n\t\t\t\t\tSystem.out.println(\"Status code: \" + respCode + \"\\nFor request: \" + query);\r\n\t\t\t\telse {\r\n\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(con.getInputStream()));\r\n\t\t\t\t\tresponse = reader.lines().collect(Collectors.joining());\r\n\t\t\t\t\tint numGames = new JSONObject(response).getJSONObject(\"response\").getInt(\"game_count\");\r\n\t\t\t\t\tif (numGames > 0) {\r\n\t\t\t\t\t\tJSONArray ownedGames = new JSONObject(response).getJSONObject(\"response\").getJSONArray(\"games\");\r\n\t\t\t\t\t\tfor (int i=0;i<ownedGames.length();++i) {\r\n\t\t\t\t\t\t\tJSONObject g = ownedGames.getJSONObject(i);\r\n\t\t\t\t\t\t\tlong appId = g.getLong(\"appid\");\r\n\t\t\t\t\t\t\tString name = g.getString(\"name\");\r\n\t\t\t\t\t\t\tString logoHash = g.getString(\"img_logo_url\");\r\n\t\t\t\t\t\t\tint playForever = g.getInt(\"playtime_forever\");\r\n\t\t\t\t\t\t\tint play2Wks = g.has(\"playtime_2weeks\") ? g.getInt(\"playtime_2weeks\") : 0;\r\n\t\t\t\t\t\t\tPlayedGame game = new PlayedGame(appId, name, logoHash, play2Wks, playForever);\r\n\t\t\t\t\t\t\tp.addPlayedGame(game);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (!knownGames.contains(game)) {\r\n\t\t\t\t\t\t\t\tknownGames.add((SteamGame) game);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (localWrite) {\r\n\t\t\t\t\t\t\tjsonWriter.writeOwnedGames(response, p);\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} catch (JSONException jse) {\r\n\t\t\t\tSystem.err.println(jse.getMessage());\r\n\t\t\t\tSystem.out.println(response);\r\n\t\t\t} catch (MalformedURLException mue) {\r\n\t\t\t\t//once again, this better not happen...\r\n\t\t\t\tSystem.err.println(mue.getMessage());\r\n\t\t\t} catch (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 players;\r\n\t}", "private void createPlayers() {\n\t\t//Randomize roles\n\t\tArrayList<AdventurerEnum> randomisedRoles = getRandomisedRoles();\n\t\tfor(int i=0; i<numPlayers; i++) \n\t\t\tcreateOnePlayer(randomisedRoles.get(i), i+1);\n\t}", "public static ArrayList<Match> generateMatch(String season){\n LeagueManager premierLeagueManagerService = PremierLeagueManager.getInstance();\n int numberOfClubsPresent = PremierLeagueManager.getPremierLeagueFootballClubList().size();\n\n // This condition is to make sure that there is at least 2 clubs to play a match\n if(numberOfClubsPresent > 1){\n\n // there 2 or more clubs present so we can generate a match\n // loading the data from the file\n PremierLeagueManager.loadingData();\n\n // getting the clubs with the filtered matches by season\n guiSeasonFilteredClubs = getGuiSeasonFilteredClubs(season);\n\n Random random = new Random();\n\n // step 01: randomly select 2 clubs\n int randomClub_01 = random.nextInt(guiSeasonFilteredClubs.size());\n FootballClub selectedClub_O1 = guiSeasonFilteredClubs.get(randomClub_01);\n int randomClub_02 = random.nextInt(guiSeasonFilteredClubs.size());\n\n // This is to make sure that the same club is not selected again for the match\n while (randomClub_02==randomClub_01){\n randomClub_02 = random.nextInt(guiSeasonFilteredClubs.size());\n }\n FootballClub selectedClub_O2 = guiSeasonFilteredClubs.get(randomClub_02);\n\n // step 02: randomly generate the necessary data\n int numberGoalScored_club_1 = random.nextInt(7);\n int numberGoalScored_club_2 = random.nextInt(7);\n\n // setting the random date and random season depending on the randomly selected year\n int[] possibleYears = new int[2];\n\n int seasonYear = Integer.parseInt(season.split(\"-\")[0]);\n\n possibleYears[0] = seasonYear;\n possibleYears[1] = seasonYear + 1;\n\n // making sure that the months are in given range for the year select for the season\n // premier league happens every year from August to next May\n int day = random.nextInt(30)+1;\n int randomYearIndexSelected = random.nextInt(2);\n int year = possibleYears[randomYearIndexSelected];\n int month;\n\n // if randomYearIndexSelected = 0, then the months have to be in the range from 8 to 12 else 1 to 5\n if(randomYearIndexSelected==0){\n // 8 to 12\n month = random.nextInt(5) + 8;\n\n }else{\n // 1 to 5\n month = random.nextInt(5) + 1;\n\n }\n\n DateMatch date = new DateMatch(day, month, year);\n String[] matchTypes = new String[]{\"Home\", \"Away\"};\n String matchType = matchTypes[random.nextInt(2)];\n\n // step 03: call the addPlayedMatch() wisely by passing all the generated random data\n premierLeagueManagerService.addPlayedMatch(season,selectedClub_O1.getName(), selectedClub_O2.getName(),\n numberGoalScored_club_1, numberGoalScored_club_2, date, matchType);\n\n // step 04: call the save file method\n premierLeagueManagerService.saveDataIntoFile();\n\n // step 05: call the load file method\n PremierLeagueManager.loadingData();\n\n // getting the clubs with the filtered matches by season\n guiSeasonFilteredClubs = getGuiSeasonFilteredClubs(season);\n\n // getting the matches for a season and returning\n return getMatchesForSeason(guiSeasonFilteredClubs);\n }\n // if there are less than 2 clubs we can't generate a match\n return null;\n }", "public Player getTeamMate(){\n\t\tif(team == null) return null;\n\t\tCollection<Player> players = team.getPlayers();\n\t\tfor(Player p : players){\n\t\t\tif(!p.equals(this))return p; \n\t\t}\n\t\treturn null;\n\t}", "public void setTeam(String team) {\n\t\tthis.teamOfPlayer = team;\n\t}", "@Override\n\tpublic void setTeam(int i) {\n\t\t\n\t}", "public static void oneTeam(String[] name, int[] team)\n {\n int a=0;\n System.out.println(\"The following players played with one team for their entire NHL careers:\");\n for(int i=0;i<team.length;i++)\n { \n if(team[i]==1)\n {\n System.out.println(name[i]);\n }//end of if statement\n }//end of for loop\n }", "public void selectAttackerPlayer(Player[] players){\n int x,xTemp;\n Player playerSelected;\n if( team == 0){\n xTemp = 0;\n for(Player p : players ){\n x = (int) p.getPosition().getX();\n if( x > xTemp ){\n xTemp = x;\n playerSelected = p;\n }\n }\n playerOne = playerSelected;\n }else{\n xTemp = 14;\n for(Player p : players ){\n x = (int) p.getPosition().getX();\n if( x < xTemp ){\n xTemp = x;\n playerSelected = p;\n }\n }\n playerOne = playerSelected;\n }\n }", "public static void main(String[] args) \n {\n \n Team j = new Team(\"SaPKo\"); \n Player p = new Player(\"Sasf\"); \n Player a = new Player (\"gds\");\n Player s = new Player (\"asjkdh\");\n j.addPlayer(p);\n j.addPlayer(a);\n j.addPlayer(s);\n \n// System.out.println(\"array size: \" + j.getArraySize());\n \n j.printPlayers();\n }", "@Override\n\tpublic boolean isIsTeamMatch() {\n\t\treturn _esfTournament.isIsTeamMatch();\n\t}", "public String[] getAvailableTeams() {\n\n int team1 = 0;\n int team2 = 0;\n if (activePlayers > 0) {\n for (int i = 0; i < activePlayers; i++) {\n if (players[i].getTeam() == teams[0]) {\n team1++;\n continue;\n }\n team2++;\n }\n\n String[] team = new String[2];\n if ((activePlayers == numMaxPlayers - 1) && (team1 == 0 || team2 == 0)) {\n if (team1 == 0) {\n team[0] = teams[0].toString();\n return team;\n }\n team[0] = teams[1].toString();\n return team;\n }\n }\n return new String[]{teams[0].toString(), teams[1].toString(), null};\n }", "@Test\r\n\tpublic void saveTeamGamesForVisitorTeamFk() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeamGamesForVisitorTeamFk \r\n\t\tInteger teamId_4 = 0;\r\n\t\tGame related_gamesforvisitorteamfk = new wsdm.domain.Game();\r\n\t\tTeam response = null;\r\n\t\tresponse = service.saveTeamGamesForVisitorTeamFk(teamId_4, related_gamesforvisitorteamfk);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: saveTeamGamesForVisitorTeamFk\r\n\t}", "private int get2(String name) {\n int t = 0;\n PlayerRecord curr = playerlist.first();\n while (curr != null) {\n if (curr.getTeamname().equals(name))\n t = t + curr.getWinninggoals(); // sum of all GWGs\n curr = playerlist.next();\n }\n return t;\n }", "@Test\n public final void testPlayer1Win() {\n checkPlayerWin(player1);\n }", "public void addingPlayedMatch() throws IOException {\n\n displayStatistics();\n Scanner scn = new Scanner(System.in);\n System.out.println(\"Enter date (dd.mm.yyyy): \");\n String scanned = scn.nextLine();\n Date date;\n try {\n date = new SimpleDateFormat(\"dd.mm.yyyy\").parse(scanned);\n } catch (ParseException ex) {\n System.out.println(\"date should in this format!!! >> mm-dd-yyyy\");\n return;\n }\n System.out.println(\"Enter Team 1: \");\n scanned = scn.nextLine();\n FootballClub team1 = null;\n for (FootballClub club : footballClubArrayList) {\n if (club.getClubName().equals(scanned))\n team1 = club;\n }\n if (team1 == null) {\n System.out.println(\"Wrong club name!!!\");\n return;\n }\n System.out.println(\"Enter Team 2: \");\n scanned = scn.nextLine();\n FootballClub team2 = null;\n for (FootballClub club : footballClubArrayList) {\n if (club.getClubName().equals(scanned))\n team2 = club;\n }\n if (team2 == null) {\n System.out.println(\"Wrong club name!!!\");\n return;\n }\n\n System.out.println(\"Team 1 goals: \");\n scanned = scn.nextLine();\n int team1Goal = -1;\n try {\n team1Goal = Integer.parseInt(scanned);\n } catch (Exception e) {\n }\n if (team1Goal == -1) {\n System.out.println(\"Enter the number of goals\");\n return;\n }\n\n System.out.println(\"Team 2 goals: \");\n scanned = scn.nextLine();\n int team2Goal = -1;\n try {\n team2Goal = Integer.parseInt(scanned);\n } catch (Exception e) {\n }\n if (team2Goal == -1) {\n System.out.println(\"Enter the number of goals\");\n return;\n }\n\n\n Match match = new Match(date,team1,team2,team1Goal,team2Goal); //setting variables when user enter number of goals\n match.setDate(date);\n match.setTeam1(team1);\n match.setTeam2(team2);\n match.setTeam1Goal(team2Goal);\n match.setTeam2Goal(team1Goal);\n matchArrayList.add(match);\n team1.setNumOfGoalsScored(team1.getNumOfGoalsScored() + team1Goal);\n team2.setNumOfGoalsScored(team2.getNumOfGoalsScored() + team2Goal);\n team1.setNumOfGoalsReceived(team1.getNumOfGoalsReceived() + team2Goal);\n team2.setNumOfGoalsReceived(team2.getNumOfGoalsReceived() + team1Goal);\n team1.setNumOfMatchesPlayed(team1.getNumOfMatchesPlayed() + 1);\n team2.setNumOfMatchesPlayed(team2.getNumOfMatchesPlayed() + 1);\n\n if (team1Goal > team2Goal) {\n team1.setNumOfPoints(team1.getNumOfPoints() + 3);\n team1.setNumOfWins(team1.getNumOfWins() + 1);\n team2.setNumOfDefeats(team2.getNumOfDefeats() + 1);\n } else if (team1Goal < team2Goal) {\n team2.setNumOfPoints(team2.getNumOfPoints() + 3);\n team2.setNumOfWins(team2.getNumOfWins() + 1);\n team1.setNumOfDefeats(team1.getNumOfDefeats() + 1);\n } else {\n team1.setNumOfPoints(team1.getNumOfPoints() + 1);\n team2.setNumOfPoints(team2.getNumOfPoints() + 1);\n team1.setNumOfDraws(team1.getNumOfDraws() + 1);\n team2.setNumOfDraws(team2.getNumOfDraws() + 1);\n }\n\n FileOutputStream fis = new FileOutputStream(\"clubData.txt\");\n ObjectOutputStream oos = new ObjectOutputStream(fis);\n oos.writeObject(footballClubArrayList);\n oos.close();\n fis.close();\n\n displayStatistics();\n matchArrayList.add(new Match(date, team1, team2, team1Goal, team2Goal));\n\n\n try {\n FileOutputStream fileOut = new FileOutputStream(\"matchData.txt\");\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);\n objectOut.writeObject(matchArrayList);\n objectOut.close();\n fileOut.close();\n System.out.println(\"Match added Successfully\");\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n\n }", "public int getTeam() {\n return team;\n }", "public void Players()\n\t{\n\t\tSystem.out.println(\"What team are you looking for?: \");\n\t\tSystem.out.println(\"1: Soccer\\n2: Basketball\\n3: Football\\n4: RETURN\");\n\t\tint choice1 = input.nextInt();\n\t\tswitch (choice1) {\n\t\t\n\t\tcase 1:\n\t\t\t\n\t\t\tString name = \"GB Soccer\";\n\t\t\tSelectTeam(name);\n\t\t\t\n\t\t\tSystem.out.println(\"\\nTo view player's full Bio, type Last Name\");\n\t\t\t\n\t\t\tScanner input = new Scanner(System.in);\n\t\t\tString Spname = input.nextLine();\n\t\t\tSelectPlayer(Spname);\n\t\t\tSystem.out.println(\"To return to teams list press 1, to exit press 2\");\n\t\t\tint choice2 = input.nextInt();\n\t\t\tswitch(choice2)\n\t\t\t{\n\t\t\tcase 1: Players(); break; case 2: System.exit(2); break;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Yet to be implemented\");\n\t\t\t\tbreak; \n\t\t\t\t}\n\t\t\t\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tString name1 = \"GB Basketball\";\n\t\t\tSelectTeam(name1);\n\t\t\t\n\t\t\tSystem.out.println(\"\\nTo view player's full Bio, type Last Name\");\n\t\t\t\n\t\t\tScanner input1 = new Scanner(System.in);\n\t\t\tString Bpname = input1.nextLine();\n\t\t\tSelectPlayer(Bpname);\n\t\t\tSystem.out.println(\"To return to teams list press 1, to exit press 2\");\n\t\t\tint choice3 = input1.nextInt();\n\t\t\tswitch(choice3)\n\t\t\t{\n\t\t\tcase 1: Players(); break; case 2: System.exit(0); break;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Yet to be implemented\");\n\t\t\t\tbreak; \n\t\t\t\t}\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tString name2 = \"GB Football\";\n\t\t\tSelectTeam(name2);\n\t\t\t\n\t\t\tSystem.out.println(\"\\nTo view player's full Bio, type Last Name\");\n\t\t\t\n\t\t\tScanner input2 = new Scanner(System.in);\n\t\t\tString Fpname = input2.nextLine();\n\t\t\tSelectPlayer(Fpname);\n\t\t\tSystem.out.println(\"To return to teams list press 1, to exit press 2\");\n\t\t\tint choice4 = input2.nextInt();\n\t\t\tswitch(choice4)\n\t\t\t{\n\t\t\tcase 1: Players(); break; case 2: System.exit(0); break;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Yet to be implemented\");\n\t\t\t\tbreak; \n\t\t\t\t}\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tquestion();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Yet to be implemented\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "public List<PlayerTeam> display6() {\n List<PlayerTeam> l = new List<PlayerTeam>();\n List<PlayerTeam> all = build();\n int max = 0;\n PlayerTeam curr = all.first();\n while (curr != null) {\n int c = curr.getWinninggoals();\n if (c > max) {// if is a new maximum value, empty the list\n l.clear();\n l.add(curr);\n max = c;\n } else if (c == max) { // if there are more than one maximum value,\n // add it\n l.add(curr);\n }\n curr = all.next();\n }\n return l;\n }", "void addEventPlayers(Player player, boolean team);", "public void selectProtectPlayer(Player[] players){\n int x,xTemp;\n Player playerSelected;\n if( team == 0){\n xTemp = 0;\n for(Player p : players ){\n x = (int) p.getPosition().getX();\n if( x > xTemp && p != playerOne ){\n xTemp = x;\n playerSelected = p;\n }\n }\n playerOne = playerSelected;\n }else{\n xTemp = 14;\n for(Player p : players ){\n x = (int) p.getPosition().getX();\n if( x < xTemp && p != playerOne ){\n xTemp = x;\n playerSelected = p;\n }\n }\n playerOne = playerSelected;\n }\n }", "@Override\n\tpublic int countProjectTeam() {\n\t\treturn 0;\n\t}", "private void addPlayers(@NotNull MapHandler map, @NotNull NewGameDto newGameDto) {\n ComparableTuple<Integer, Stack<SpawnTile>> result = analyseMap(map);\n flagCount = result.key;\n Stack<SpawnTile> spawnTiles = result.value;\n if (!spawnTiles.isEmpty()) {\n for (PlayerDto player : newGameDto.players) {\n SpawnTile spawnTile = spawnTiles.pop();\n if (player.id == newGameDto.userId) {\n user = new Player(spawnTile.getX(), spawnTile.getY(), Direction.NORTH, map, new ComparableTuple<>(GameGraphics.mainPlayerName + \" (you)\", player.color), player.id);\n user.setDock(spawnTile.getSpawnNumber());\n players.add(user);\n } else {\n IPlayer onlinePlayer = new OnlinePlayer(spawnTile.getX(), spawnTile.getY(), Direction.NORTH, map, new ComparableTuple<>(player.name, player.color), player.id);\n onlinePlayer.setDock(spawnTile.getSpawnNumber());\n players.add(onlinePlayer);\n }\n }\n } else {\n for (int i = 0; i < playerCount; i++) {\n NonPlayer nonPlayer = new NonPlayer(i, 0, Direction.NORTH, map, new ComparableTuple<>(\"blue\", Color.BLUE));\n nonPlayer.setDock(i);\n players.add(nonPlayer);\n }\n }\n }", "public static List<Player> getRankedPlayersInTeam(List<Player> players, Player.PlayerTeam team) {\n List<Player> choosenTeam = players.stream()\n .filter(player -> player.getTeam() == team)\n .collect(Collectors.toList());\n\n\n Comparator<Player> playerComparator = new Comparator<Player>() {\n @Override\n public int compare(Player o1, Player o2) {\n return o2.getCurrentScore() - o1.getCurrentScore();\n }\n };\n choosenTeam.sort(playerComparator);\n return choosenTeam;\n\n }", "@Test\n void testGameContext() {\n Set<Player> playersNotMatched = new HashSet<>(players);\n for(Player player : gameContext.getPlayersTurnOrder()) {\n assertTrue(playersNotMatched.contains(player));\n playersNotMatched.remove(player);\n }\n assertTrue(playersNotMatched.isEmpty());\n\n assertNotNull(gameContext.getMarket());\n assertNotNull(gameContext.getDevelopmentCardsTable());\n assertNotNull(gameContext.getFaithPath());\n assertNotNull(gameContext.getPlayersTurnOrder());\n\n for(Player player : players)\n assertNotNull(gameContext.getPlayerContext(player));\n }", "public FightTeam team();", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.btTeam2:\n addTeam1Members();\n Intent team2entry = new Intent(\"ca.longship.planetkubb.TEAMLISTS2\");\n startActivity(team2entry);\n\n break;\n case R.id.bAddPlayer1:\n if (sTeam1PlayNum == 1) {\n\n playercount = 2;\n } else if (sTeam1PlayNum == 2) {\n\n playercount = 3;\n } else if (sTeam1PlayNum == 3) {\n\n playercount = 4;\n\n } else if (sTeam1PlayNum == 4) {\n\n playercount = 5;\n\n } else if (sTeam1PlayNum == 5) {\n\n playercount = 6;\n\n } else if (sTeam1PlayNum == 6) {\n Toast.makeText(getBaseContext(),\n \"Cannot add any more players. Max is 6\",\n Toast.LENGTH_SHORT).show();\n playercount = 6;\n\n }\n sTeam1PlayNum = playercount;\n team1Players = sTeam1PlayNum;\n setVisiblePlayers();\n break;\n case R.id.bDelPlayer1:\n if (sTeam1PlayNum == 1) {\n Toast.makeText(getBaseContext(),\n \"Must have at least 1 player\",\n Toast.LENGTH_SHORT).show();\n playercount = 1;\n } else if (sTeam1PlayNum == 2) {\n tvt1p2.setVisibility(View.INVISIBLE);\n spnPlayer2.setVisibility(View.INVISIBLE);\n playercount = 1;\n } else if (sTeam1PlayNum == 3) {\n tvt1p3.setVisibility(View.INVISIBLE);\n spnPlayer3.setVisibility(View.INVISIBLE);\n playercount = 2;\n\n } else if (sTeam1PlayNum == 4) {\n tvt1p4.setVisibility(View.INVISIBLE);\n spnPlayer4.setVisibility(View.INVISIBLE);\n playercount = 3;\n\n } else if (sTeam1PlayNum == 5) {\n tvt1p5.setVisibility(View.INVISIBLE);\n spnPlayer5.setVisibility(View.INVISIBLE);\n playercount = 4;\n\n } else if (sTeam1PlayNum == 6) {\n tvt1p6.setVisibility(View.INVISIBLE);\n spnPlayer6.setVisibility(View.INVISIBLE);\n playercount = 5;\n\n }\n sTeam1PlayNum = playercount;\n team1Players = sTeam1PlayNum;\n setVisiblePlayers();\n\n break;\n }\n }", "public ArrayList<Player> whoWins(ArrayList<Player> players) {\r\n\r\n // on créé un tableau pour stocker les gagnants\r\n ArrayList<Player> winners = new ArrayList<>();\r\n\r\n int bestScore = 0;\r\n\r\n for(Player player : players) {\r\n if( ! isBusted(player)) {\r\n if(total(player).max() > bestScore || (player.isDealer() && total(player).max() == bestScore)) {\r\n bestScore = total(player).max();\r\n winners.clear();\r\n winners.add(player);\r\n }\r\n else if(total(player).max() == bestScore) {\r\n winners.add(player);\r\n }\r\n } else {\r\n Logger.write(player.getName() + \" a perdu, il perd sa mise :\" + player.getStake());\r\n player.removeTokens(player.getStake());\r\n }\r\n }\r\n return winners;\r\n }", "public List<PlayerWon> findByTeamId(int teamId);", "public static void playTournament(ArrayList<MazePlayer> players) {\n\t playTournament(players,5,10,10,100);\n }", "public Tournament(){\n simplePlayer = new SimpleFakeGinRummyPlayer(new ParamList(new double[]{}));\n\n knockOnGinPlayer = new EnsembleHandEvalPlayer(ParamList.getRandomParamList(1), new DeadwoodHandEvaluator());\n knockOnGinPlayer.setKnockDecider(new KnockOnGinKnockDecider() );\n knockOnGinPlayer.setDrawDecider(new MeldOnlyDrawDecider());\n\n ExperimentalRuns.fixTwoStageKnockDecider101();\n // paramOfTunedTwoStagePlayer.set(ParamList.TS_KNOCK_THRESHOLD_EARLY, 0);\n // paramOfTunedTwoStagePlayer.set(ParamList.TS_KNOCK_THRESHOLD_LATE, 0);\n // paramOfTunedTwoStagePlayer.set(ParamList.TS_KNOCK_MIDDLE, 6);\n ParamList.setFixedValue(ParamList.TS_DRAW_MIDDLE, 14);\n ParamList paramOfTunedTwoStagePlayer = ParamList.getRandomParamList(1);\n System.out.println(paramOfTunedTwoStagePlayer);\n tunedTwoStagePlayer = new IndexEnsembleHandEvalPlayer(paramOfTunedTwoStagePlayer, new DeadwoodHandEvaluator());\n tunedTwoStagePlayer.setKnockDecider(new TwoStageKnockDecider(paramOfTunedTwoStagePlayer) );\n tunedTwoStagePlayer.setDrawDecider(new MeldOnlyDrawDecider());\n tunedTwoStagePlayer.setDrawDecider(new TwoStageDrawDecider(paramOfTunedTwoStagePlayer));\n\n resultSimpleVsKnockGin = 0;\n resultKnockGinVsTwoStage = 0;\n resultTwoStageVsSimple = 0;\n\n numGamePerPair = 2000;\n\n }", "public static void main(String[] args) {\n Sport Football = new Sport(\"Football\"); //Creating instance of Sport class (Creating football sport)\n Football RM = new Football(\"RealMadrid\"); //Creating instance of Football class (Creating football team)\n Football Monaco = new Football(\"Monaco\");//Creating instance of Football class (Creating football team)\n Football Barca = new Football(\"Barca\");//Creating instance of Football class (Creating football team)\n Football Liverpool = new Football(\"Liverpool\");//Creating instance of Football class (Creating football team)\n\n League<Football> footballLeague = new League<>(\"Football\"); //Creating arraylist with objects from Football class (Creating league)\n footballLeague.addTeamToLeague(RM); //adding team to league\n footballLeague.addTeamToLeague(Monaco);\n footballLeague.addTeamToLeague(Barca);\n footballLeague.addTeamToLeague(Liverpool);\n footballLeague.displayLeague(); //display all teams from football league\n\n System.out.println();\n\n Sport Hockey = new Sport(\"Hockey\"); //The same for hockey\n Hockey CB =new Hockey(\"Chicago Bulls\");\n Hockey CSKA =new Hockey(\"CSKA\");\n Hockey Sparta =new Hockey(\"Sparta\");\n Hockey RB =new Hockey(\"Red Bull\");\n Hockey GK =new Hockey(\"German Knights\");\n League<Hockey> hockeyLeague = new League<>(\"Hockey\");\n hockeyLeague.addTeamToLeague(CB);\n hockeyLeague.addTeamToLeague(CSKA);\n hockeyLeague.addTeamToLeague(Sparta);\n hockeyLeague.addTeamToLeague(RB);\n hockeyLeague.addTeamToLeague(GK);\n hockeyLeague.displayLeague();\n }", "private void drawTeams(float delta) {\n\t\tEntity [] team = state.getPlayerTeam();\n\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t// Draw each entity that exists\n\t\t\tif (team[i] != null) {\n\t\t\t\tPoint spritePos = getEntityPosition(i, 0);\n\t\t\t\tteam[i].render(delta, batch, spritePos);\n\n\t\t\t\tdrawCursor(i * -1, spritePos);\n\t\t\t}\n\t\t}\n\n\t\t// Draw the enemy team\n\t\tteam = state.getCPUTeam();\n\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tif (team[i] != null) {\n\t\t\t\tPoint spritePos = getEntityPosition(i, 1);\n\t\t\t\tteam[i].render(delta, batch, spritePos);\n\n\t\t\t\t// If the cursor is on this entity, draw it\n\t\t\t\tdrawCursor(i + 1, spritePos);\n\t\t\t}\n\t\t}\n\t}", "private static void displayUserTeam() {\n\t\tif (game.getCurrentRound()==1) {\n\t\t\tfor (int i = 0; i<11; i++) {\n\t\t\t\tplayerNameArray[i].setText(\"Name\");\n\t\t\t\timageArray[i].setIcon(MainGui.getShirt(\"noTeam\"));\n\t\t\t\tbuttonArray[i].setText(\"+\");\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void picksOpponentRandom() throws Exception {\n Map<Integer,Integer> allMovesMade = new HashMap<Integer,Integer>();\n allMovesMade.put(1, 2);\n SmartPlayer x = new SmartPlayer(0,0);\n x.setMovesMadeByOtherPlayers(allMovesMade);\n //suppose this game has 5 total players including the player x\n int opponent = x.picksOpponent(5);\n //the opponent cannot be himself or a player with a player number outside the total number of players in game\n assertTrue(opponent!=0 && opponent<5 && opponent>0);\n }", "private void assignGameVertices_(TeamRecord_[] otherTeamsRecord) {\n int sourceVertexNumber = 0;\n int gameVertex = 1;\n for (int team1Index = 0; team1Index < numberOfOtherTeams_; team1Index++) {\n TeamRecord_ record1 = otherTeamsRecord[team1Index];\n for (int team2Index = team1Index + 1; team2Index < numberOfOtherTeams_; team2Index++) {\n // Connect the game vertex to the source.\n TeamRecord_ record2 = otherTeamsRecord[team2Index];\n int capacity = teamsSchedule_.getNumberOfGamesBetweenTwoTeams(record1.teamNumber_, record2.teamNumber_);\n FlowEdge gameEdge = new FlowEdge(sourceVertexNumber, gameVertex, capacity);\n flowNetwork_.addEdge(gameEdge);\n\n // Connect the game vertex to the corresponding team vertices.\n FlowEdge infiniteEdge1 = new FlowEdge(\n gameVertex, teamToVertex_.get(record1.teamNumber_), Double.POSITIVE_INFINITY);\n FlowEdge infiniteEdge2 = new FlowEdge(\n gameVertex, teamToVertex_.get(record2.teamNumber_), Double.POSITIVE_INFINITY);\n flowNetwork_.addEdge(infiniteEdge1);\n flowNetwork_.addEdge(infiniteEdge2);\n gameVertex++;\n }\n }\n }", "public NetworkGame(String team){\n super();\n this.team = team;\n }", "@Test\n public void picksOpponentSmart() throws Exception {\n Map<Integer,Integer> allMovesMade = new HashMap<Integer,Integer>();\n allMovesMade.put(1, 2);\n SmartPlayer x = new SmartPlayer(0,0);\n x.setMovesMadeByOtherPlayers(allMovesMade);\n x.setCards(2,2);\n //suppose this game has 5 total players including the player x\n int opponent = x.picksOpponent(5);\n //the opponent cannot be himself or a player with a player number outside the total number of players in game\n assertTrue(opponent==1);\n }", "void setVisiblePlayers() {\n\n switch (team1Players) {\n\n case 6:\n\n tvt1p6.setVisibility(View.VISIBLE);\n\n spnPlayer6.setVisibility(View.VISIBLE);\n\n case 5:\n\n tvt1p5.setVisibility(View.VISIBLE);\n\n spnPlayer5.setVisibility(View.VISIBLE);\n\n case 4:\n\n tvt1p4.setVisibility(View.VISIBLE);\n\n spnPlayer4.setVisibility(View.VISIBLE);\n\n case 3:\n\n tvt1p3.setVisibility(View.VISIBLE);\n\n spnPlayer3.setVisibility(View.VISIBLE);\n\n case 2:\n\n tvt1p2.setVisibility(View.VISIBLE);\n\n spnPlayer2.setVisibility(View.VISIBLE);\n\n case 1:\n\n tvt1p1.setVisibility(View.VISIBLE);\n\n spnPlayer1.setVisibility(View.VISIBLE);\n\n break;\n\n }\n\n }", "public void createTeams()\n {\n ArrayList<Student> teamCreator = new ArrayList<Student>();\n Integer[] teamSize = getTeamSizeArray();// Calculate all the sizes\n for (int i =0 ; i < teamSize.length ; i ++)\n {\n teamCreator = femaleHardConstraintApplicator(teamCreator, teamSize[i]);//Initial 4/ 3/ 2 students added to the ArrayList\n if(!Constraint.femaleHardConstraintCheck(teamCreator)) // Hard Constraint Check\n {\n System.out.println(\"Sorry! A team cannot be formed currently as a hard constraint is not met.\\n\" +\n \"Hard Constraint : Maximum of one woman per team cannot be met currently\");\n break;\n }\n teamCreator = dislikedMembersRemover(teamCreator);\n for (int x = 0; x < Constraint.allSoftConstraints.size(); x++) // bubble sort outer loop\n {\n for (int y = 0; y < Constraint.allSoftConstraints.size() - x - 1; y++) {\n if (Constraint.allSoftConstraints.get(y).getWeightAge() > (Constraint.allSoftConstraints.get(y + 1).getWeightAge())) {\n Constraint temp = Constraint.allSoftConstraints.get(y);\n Constraint.allSoftConstraints.set(y, Constraint.allSoftConstraints.get(y + 1));\n Constraint.allSoftConstraints.set(y + 1, temp);\n }\n }\n }\n\n for(Constraint c: Constraint.allSoftConstraints){\n switch (Integer.parseInt(c.getConstraintId().substring(11,12))) {\n case 1:\n teamCreator = uniquePersonalityConstraintApplicator(teamCreator);\n break;\n case 2:\n teamCreator = requiredPersonalityApplicator(teamCreator);\n break;\n case 3:\n teamCreator = experienceSoftConstraintApplicator(teamCreator);\n break;\n default:\n break;\n }\n }\n\n teamCreator = teamAverageGPAConstraintApplicator(teamCreator);\n if(!Constraint.averageGPAHardConstraintCheck(teamCreator))\n {\n System.out.println(\"Sorry! A team cannot be formed currently as a hard constraint is not met.\\n\" +\n \"Hard Constraint : Average team GPA should be less than 3.5.\");\n break;\n }\n teamCreator = teamMemberGPAConstraintApplicator(teamCreator);\n if(!Constraint.twoMembersWith3GPAHardConstraintCheck(teamCreator) && !Constraint.averageGPAHardConstraintCheck(teamCreator))\n {\n System.out.println(\"Sorry! A team cannot be formed currently as a hard constraint is not met.\\n\" +\n \"Hard Constraint : Two Members needed with GPA 3 or Above.\");\n break;\n }\n Team team = setProjectForTeam(teamCreator);\n System.out.println(Constraint.ANSI_BLUE + \"\\nCongratulations! A team has been formed!!\\n\" +Constraint.ANSI_RESET +\n \"The team ID is \\t\\t\\t: \" + team.getTeamID() +\n \"\\nThe Project Assigned\\t: \" + team.getProjectAssigned().getProjectTitle() +\n \"\\n\");\n System.out.print(\"The Students IDs of students in this team are: \\n\\n\");\n for (Student student : teamCreator)\n {\n System.out.print(student.getId() + \"\\t\\tName: \" + student.getFirstName() + \"\\t\\t\\t\\tGender : \" + student.getGender() + \"\\n\");\n }\n Team.allTeams.add(team);\n for (Student student : teamCreator)\n {\n for(Student student1 : Student.allStudents){\n if(student.getId().compareTo(student1.getId()) ==0){\n student.setAssignedTeam(team);\n student1.setAssignedTeam(team);\n }\n }\n }\n teamCreator.clear();\n team = null;\n\n int choice = 0;\n System.out.println(\"\\nDo you want to attempt to create another team ?\\n\" +\n \"1.Yes\\n\" +\n \"2.No \\n\");\n choice = InputTools.intChecker(1,2);\n if (choice == 2)\n {\n break;\n }\n }\n System.out.println(\"Exited\");\n }", "private void buildGroups() {\n if(groups.size() == 1){\n Group aGroup = groups.get(0);\n for (Team team : teams) {\n aGroup.add(team);\n }\n return;\n }\n\n for (Team team : teams) {\n groups.get(getIndex()).add(team);\n }\n }", "private void createLeague(){ \r\n FantasyUser maxUser = new FantasyUser();\r\n maxUser.setEmail(\"[email protected]\");\r\n maxUser.setPassword(\"password\");\r\n fUserBean.create(maxUser);\r\n \r\n FantasyUser adrianUser = new FantasyUser();\r\n adrianUser.setEmail(\"[email protected]\");\r\n adrianUser.setPassword(\"password\");\r\n fUserBean.create(adrianUser);\r\n \r\n FantasyUser ashayUser = new FantasyUser();\r\n ashayUser.setEmail(\"[email protected]\");\r\n ashayUser.setPassword(\"password\");\r\n fUserBean.create(ashayUser);\r\n \r\n FantasyUser jessUser = new FantasyUser();\r\n jessUser.setEmail(\"[email protected]\");\r\n jessUser.setPassword(\"password\");\r\n fUserBean.create(jessUser);\r\n \r\n //create league\r\n FantasyLeague league = new FantasyLeague();\r\n league.setDraftStarted(false);\r\n league.setFinishedDraft(false);\r\n league.setLeagueName(\"Mongeese Only\");\r\n league.setLeagueOwner(maxUser);\r\n flBean.create(league);\r\n \r\n //create teams\r\n FantasyTeam maxTeam = new FantasyTeam();\r\n maxTeam.setTeamName(\"Max's Team\");\r\n maxTeam.setTeamOwner(maxUser);\r\n maxTeam.setLeague(league);\r\n ftBean.create(maxTeam);\r\n \r\n FantasyTeam ashayTeam = new FantasyTeam();\r\n ashayTeam.setTeamName(\"Ashay's Team\");\r\n ashayTeam.setTeamOwner(ashayUser);\r\n ashayTeam.setLeague(league);\r\n ftBean.create(ashayTeam);\r\n \r\n FantasyTeam jessTeam = new FantasyTeam();\r\n jessTeam.setTeamName(\"Jess's team\");\r\n jessTeam.setTeamOwner(jessUser);\r\n jessTeam.setLeague(league);\r\n ftBean.create(jessTeam);\r\n \r\n FantasyTeam adrianTeam = new FantasyTeam();\r\n adrianTeam.setTeamName(\"Team Greasy Pizza\");\r\n adrianTeam.setTeamOwner(adrianUser);\r\n adrianTeam.setLeague(league); \r\n ftBean.create(adrianTeam);\r\n }", "public int getTeam() {\n return team_;\n }", "public static ArrayList<Integer> partitionTeam(ArrayList<Team> allTeams){\n int count = 0;\r\n ArrayList<Integer> all = new ArrayList<Integer>();\r\n Team prev = allTeams.get(0);\r\n ArrayList<Team> finalTeams = new ArrayList<Team>();\r\n finalTeams.add(prev);\r\n all.add(0);\r\n for(Team team: allTeams){\r\n if(prev.getTeamNum() != team.getTeamNum()){\r\n all.add(count);\r\n }\r\n prev = team;\r\n count++;\r\n }\r\n return all;\r\n }", "private boolean isOver() {\r\n return players.size() == 1;\r\n }", "private void checkForJudgeAndTeam(IInternalContest contest) {\n Account account = contest.getAccounts(ClientType.Type.TEAM).firstElement();\n assertFalse(\"Team account not generated\", account == null);\n assertFalse(\"Team account not generated\", account.getClientId().equals(Type.TEAM));\n \n account = contest.getAccounts(ClientType.Type.JUDGE).firstElement();\n assertFalse(\"Judge account not generated\", account == null);\n assertFalse(\"Team account not generated\", account.getClientId().equals(Type.TEAM));\n\n }", "@Override\npublic int getNumPlayers() {\n\treturn numPlayer;\n}", "Match getTeam2LooserOfMatch();", "protected void startTracking(final Team team){\n \t\tfor (ArenaPlayer p: team.getPlayers()){\n \t\t\tstartTracking(p);}\n \t}", "private void doMatchesStats(int week){\r\n \r\n \r\n List<FantasyMatch> fMatches = fmatchBean.findByWeek(week);\r\n for(int i = 0; i < fMatches.size(); i++){\r\n FantasyMatch fm = fMatches.get(i);\r\n FantasyTeam team1 = fm.getTeam1();\r\n FantasyTeam team2 = fm.getTeam2();\r\n int team1Points = 0, team2Points = 0;\r\n \r\n team1Points += retrievePoints(fm.getTeam1QB(), week);\r\n team2Points += retrievePoints(fm.getTeam2QB(), week);\r\n \r\n team1Points += retrievePoints(fm.getTeam1RB1(), week);\r\n team2Points += retrievePoints(fm.getTeam2RB1(), week);\r\n\r\n team1Points += retrievePoints(fm.getTeam1RB2(), week);\r\n team2Points += retrievePoints(fm.getTeam2RB2(), week);\r\n\r\n team1Points += retrievePoints(fm.getTeam1WR1(), week);\r\n team2Points += retrievePoints(fm.getTeam2WR1(), week);\r\n\r\n team1Points += retrievePoints(fm.getTeam1WR2(), week);\r\n team2Points += retrievePoints(fm.getTeam2WR2(), week);\r\n\r\n team1Points += retrievePoints(fm.getTeam1WRRB(), week);\r\n team2Points += retrievePoints(fm.getTeam2WRRB(), week);\r\n\r\n team1Points += retrievePoints(fm.getTeam1TE(), week);\r\n team2Points += retrievePoints(fm.getTeam2TE(), week);\r\n\r\n team1Points += retrievePoints(fm.getTeam1K(), week);\r\n team2Points += retrievePoints(fm.getTeam2K(), week);\r\n\r\n team1Points += retrievePoints(fm.getTeam1DEF(), week);\r\n team2Points += retrievePoints(fm.getTeam2DEF(), week);\r\n \r\n fm.setTeam1Points(team1Points);\r\n fm.setTeam2Points(team2Points);\r\n \r\n if(team1Points > team2Points){\r\n team1.setWins(team1.getWins() + 1);\r\n team2.setLosses(team2.getLosses() + 1);\r\n }\r\n if(team1Points == team2Points){\r\n team1.setDraws(team1.getDraws() + 1);\r\n team2.setDraws(team2.getDraws() + 1);\r\n }\r\n if(team1Points < team2Points){\r\n team1.setLosses(team1.getLosses() + 1);\r\n team2.setWins(team2.getWins() + 1);\r\n }\r\n \r\n team1.setPointsFor(team1.getPointsFor() + team1Points);\r\n team1.setPointsAgainst(team1.getPointsAgainst() + team2Points);\r\n \r\n team2.setPointsFor(team2.getPointsFor() + team2Points);\r\n team2.setPointsAgainst(team2.getPointsAgainst() + team1Points);\r\n \r\n fmatchBean.edit(fm);\r\n ftBean.edit(team1);\r\n ftBean.edit(team2);\r\n }\r\n \r\n List<FantasyLeague> leagues = flBean.findAll();\r\n for(int i = 0; i < leagues.size(); i++){\r\n List<FantasyTeam> teams = ftBean.findByLeague(leagues.get(i));\r\n \r\n //DO SORTING BY WINS\r\n Collections.sort(teams, new TeamWinComparator());\r\n \r\n for(int j = 0; j < teams.size(); j++){\r\n FantasyTeam team = teams.get(j);\r\n team.setPreviousRank(team.getRank());\r\n team.setRank(j + 1); \r\n }\r\n }\r\n \r\n }", "@Test\r\n\tpublic void loadTeams() {\r\n\t\tSet<Team> response = null;\r\n\t\tresponse = service.loadTeams();\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: loadTeams\r\n\t}", "public Team(String name) {\r\n this.name = name;\r\n team = new ArrayList<Hero>();\r\n }", "@SuppressWarnings(\"unchecked\")\n private List createTeamList() {\n\n ArrayList result = new ArrayList();\n for( int i = 0 ; i < leagues_array.size() ; ++i ) {\n /* each group need each HashMap-Here for each group we have 3 subgroups */\n ArrayList secList = new ArrayList();\n for( int n = 0 ; n < SplashScreen.full_teams_array.get(i).size() ; n++ ) {\n HashMap child = new HashMap();\n child.put( \"Team\", SplashScreen.full_teams_array.get(i).get(n) );\n boolean favorite_found = false;\n for(int j=0; j<SplashScreen.new_favorites_array.size(); j++) {\n if(SplashScreen.full_teams_array.get(i).get(n).toString().equals(SplashScreen.new_favorites_array.get(j)[1]) &&\n leagues_array.get(i).equals(SplashScreen.new_favorites_array.get(j)[0]) ) {\n favorite_found = true;\n }\n }\n if(favorite_found) { child.put( \"Favorite\", \"1\" ); }\n else { child.put( \"Favorite\", \"0\" ); }/*\n if(SplashScreen.full_teams_array.get(i).get(n).toString().equals(favorite_team) &&\n leagues_array.get(i).equals(favorite_league) ) {\n child.put( \"Favorite\", \"1\" );\n } else {\n }\n child.put( \"Favorite\", \"0\" );/*\n }*/\n secList.add( child );\n }\n result.add( secList );\n }\n return result;\n }", "public void setTeamId(int value) {\n this.teamId = value;\n }", "public static void main(String[] args) {\n\n FootballPlayer fp1 = new FootballPlayer(\"fp1\");\n BaseballPlayer bsp1 = new BaseballPlayer(\"bsp1\");\n BasketballPlayer bkp1 = new BasketballPlayer(\"bkp1\");\n\n// issue players of different type can add to the same team\n// Team t1 = new Team(\"t1\");\n// t1.addPlayer(fp1);\n// t1.addPlayer(bsp1);\n// t1.addPlayer(bkp1);\n// System.out.println(t1.numberOfPlayers());\n\n Team<FootballPlayer> t2 = new Team<>(\"t2\");\n t2.addPlayer(fp1);\n// t2.addPlayer(bsp1);\n\n Team<BaseballPlayer> t3 = new Team<>(\"t3\");\n Team<BasketballPlayer> t4 = new Team<>(\"t4\");\n\n Team<FootballPlayer> t5 = new Team<>(\"t5\");\n\n t2.matchResult(t5,3,2);\n\n// t2.matchResult(t3,3,2);\n\n System.out.println(t2.compareTo(t5));\n// System.out.printf(t2.compareTo(t4)); // error\n\n\n }", "public void updateAirForceTeam(Collection<Unit> airunits) {\n\t\t\n\t\t// remove airunit of invalid team \n\t\tList<Integer> invalidUnitIds = new ArrayList<>();\n\t\t\n\t\tfor (Integer airunitId : airForceTeamMap.keySet()) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tif (!UnitUtils.isCompleteValidUnit(airunit)) {\n\t\t\t\tinvalidUnitIds.add(airunitId);\n\t\t\t} else if (airForceTeamMap.get(airunitId).leaderUnit == null) {\n\t\t\t\tinvalidUnitIds.add(airunitId);\n\t\t\t}\n\t\t}\n\t\tfor (Integer invalidUnitId : invalidUnitIds) {\n\t\t\tairForceTeamMap.remove(invalidUnitId);\n\t\t}\n\t\t\n\t\t// new team\n\t\tfor (Unit airunit : airunits) {\n\t\t\tAirForceTeam teamOfAirunit = airForceTeamMap.get(airunit.getID());\n\t\t\tif (teamOfAirunit == null) {\n\t\t\t\tairForceTeamMap.put(airunit.getID(), new AirForceTeam(airunit));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// 리더의 위치를 비교하여 합칠 그룹인지 체크한다.\n\t\t// - 클로킹모드 상태가 다른 그룹은 합치지 않는다.\n\t\t// - 수리 상태의 그룹은 합치지 않는다.\n\t\tList<AirForceTeam> airForceTeamList = new ArrayList<>(new HashSet<>(airForceTeamMap.values()));\n\t\tMap<Integer, Integer> airForceTeamMergeMap = new HashMap<>(); // key:merge될 그룹 leaderID, value:merge할 그룹 leaderID\n\t\t\n\t\tint mergeDistance = AIR_FORCE_TEAM_MERGE_DISTANCE;\n\t\tif (InfoUtils.enemyRace() == Race.Terran) {\n\t\t\tmergeDistance += 120;\n\t\t}\n\t\tfor (int i = 0; i < airForceTeamList.size(); i++) {\n\t\t\tAirForceTeam airForceTeam = airForceTeamList.get(i);\n\t\t\tif (airForceTeam.repairCenter != null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tboolean cloakingMode = airForceTeam.cloakingMode;\n\t\t\tfor (int j = i + 1; j < airForceTeamList.size(); j++) {\n\t\t\t\tAirForceTeam compareForceUnit = airForceTeamList.get(j);\n\t\t\t\tif (compareForceUnit.repairCenter != null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (cloakingMode != compareForceUnit.cloakingMode) { // 클로킹상태가 다른 레이쓰부대는 합쳐질 수 없다.\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tUnit airForceLeader = airForceTeam.leaderUnit;\n\t\t\t\tUnit compareForceLeader = compareForceUnit.leaderUnit;\n\t\t\t\tif (airForceLeader.getID() == compareForceLeader.getID()) {\n//\t\t\t\t\tSystem.out.println(\"no sense. the same id = \" + airForceLeader.getID());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (airForceLeader.getDistance(compareForceLeader) <= mergeDistance) {\n\t\t\t\t\tairForceTeamMergeMap.put(compareForceLeader.getID(), airForceLeader.getID());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// 합쳐지는 에어포스팀의 airForceTeamMap을 재설정한다.\n\t\tfor (Unit airunit : airunits) {\n\t\t\tInteger fromForceUnitLeaderId = airForceTeamMap.get(airunit.getID()).leaderUnit.getID();\n\t\t\tInteger toForceUnitLeaderId = airForceTeamMergeMap.get(fromForceUnitLeaderId);\n\t\t\tif (toForceUnitLeaderId != null) {\n\t\t\t\tairForceTeamMap.put(airunit.getID(), airForceTeamMap.get(toForceUnitLeaderId));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// team 멤버 세팅\n\t\tSet<AirForceTeam> airForceTeamSet = new HashSet<>(airForceTeamMap.values());\n\t\tfor (AirForceTeam airForceTeam : airForceTeamSet) {\n\t\t\tairForceTeam.memberList.clear();\n\t\t}\n\t\t\n\t\tList<Integer> needRepairAirunitList = new ArrayList<>(); // 치료가 필요한 유닛\n\t\tMap<Integer, Unit> airunitRepairCenterMap = new HashMap<>(); // 치료받을 커맨드센터\n\t\tList<Integer> uncloakedAirunitList = new ArrayList<>(); // 언클락 유닛\n\t\t\n\t\tfor (Integer airunitId : airForceTeamMap.keySet()) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tif (airunit.getHitPoints() <= 50) { // repair hit points\n\t\t\t\tAirForceTeam repairTeam = airForceTeamMap.get(airunitId);\n\t\t\t\tif (repairTeam == null || repairTeam.repairCenter == null) {\n\t\t\t\t\tUnit repairCenter = UnitUtils.getClosestActivatedCommandCenter(airunit.getPosition());\n\t\t\t\t\tif (repairCenter != null) {\n\t\t\t\t\t\tneedRepairAirunitList.add(airunitId);\n\t\t\t\t\t\tairunitRepairCenterMap.put(airunitId, repairCenter);\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\t\n\t\t\tAirForceTeam airForceTeam = airForceTeamMap.get(airunit.getID());\n\t\t\tif (airForceTeam.cloakingMode && (airunit.getType() != UnitType.Terran_Wraith || airunit.getEnergy() < 15)) {\n\t\t\t\tuncloakedAirunitList.add(airunitId);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tairForceTeam.memberList.add(airunit);\n\t\t}\n\t\t\n\t\t// create separated team for no energy airunit\n\t\tfor (Integer airunitId : uncloakedAirunitList) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tAirForceTeam uncloackedForceTeam = new AirForceTeam(airunit);\n\t\t\tuncloackedForceTeam.memberList.add(airunit);\n\t\t\t\n\t\t\tairForceTeamMap.put(airunitId, uncloackedForceTeam);\n\t\t}\n\t\t\n\t\t// create repair airforce team\n\t\tfor (Integer airunitId : needRepairAirunitList) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tAirForceTeam needRepairTeam = new AirForceTeam(airunit);\n\t\t\tneedRepairTeam.memberList.add(airunit);\n\t\t\tneedRepairTeam.repairCenter = airunitRepairCenterMap.get(airunit.getID());\n\t\t\t\n\t\t\tairForceTeamMap.put(airunitId, needRepairTeam);\n\t\t}\n\t\t\n\t\t// etc (changing leader, finishing repair, achievement) \n\t\tSet<AirForceTeam> reorganizedSet = new HashSet<>(airForceTeamMap.values());\n\t\tachievementEffectiveFrame = 0;\n\t\tfor (AirForceTeam airForceTeam : reorganizedSet) {\n\t\t\t// leader 교체\n\t\t\tUnit newLeader = UnitUtils.getClosestUnitToPosition(airForceTeam.memberList, airForceTeam.getTargetPosition());\n\t\t\tairForceTeam.leaderUnit = newLeader;\n\t\t\t\n\t\t\t// repair 완료처리\n\t\t\tif (airForceTeam.repairCenter != null) {\n\t\t\t\tif (!UnitUtils.isValidUnit(airForceTeam.repairCenter) || WorkerManager.Instance().getWorkerData().getNumAssignedWorkers(airForceTeam.repairCenter) < 3) {\n\t\t\t\t\tUnit repairCenter = UnitUtils.getClosestActivatedCommandCenter(airForceTeam.leaderUnit.getPosition());\n\t\t\t\t\tif (repairCenter != null) {\n\t\t\t\t\t\tairForceTeam.repairCenter = repairCenter;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tboolean repairComplete = true;\n\t\t\t\tfor (Unit airunit : airForceTeam.memberList) {\n\t\t\t\t\tif (airunit.getHitPoints() < airunit.getType().maxHitPoints() * 0.95) { // repair complete hit points\n\t\t\t\t\t\trepairComplete = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (repairComplete) {\n\t\t\t\t\tairForceTeam.repairCenter = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// achievement\n\t\t\tint achievement = airForceTeam.achievement();\n\t\t\taccumulatedAchievement += achievement;\n\t\t\tachievementEffectiveFrame = achievementEffectiveFrame + airForceTeam.killedEffectiveFrame * 100 - airForceTeam.damagedEffectiveFrame;\n\t\t}\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\n Scanner teamScanner = new Scanner(new File(\"teamInfo.txt\"));\n teamScanner.useDelimiter(\",\");\n ArrayList<Team> teams = new ArrayList<Team>();\n String teamName = teamScanner.next();\n String temp = teamScanner.next();\n double winLoss = Double.parseDouble(temp);\n String temp2 = teamScanner.next();\n double SRS = Double.parseDouble(temp2);\n teams.add(new Team(teamName, winLoss, SRS));\n while (teamScanner.hasNext()) {\n teamName = teamScanner.next();\n temp = teamScanner.next();\n temp2 = teamScanner.next();\n //System.out.println(\"t\" + temp);\n //System.out.println(\"x\" + teamName);\n winLoss = Double.parseDouble(temp);\n SRS = Double.parseDouble(temp2);\n\n\n teams.add(new Team(teamName.substring(2), winLoss, SRS));\n }\n\n // System.out.println(teams.get(0).name);\n //\n\n ArrayList<String> TeamsList = new ArrayList<String>();\n Scanner teamsListScanner = new Scanner(new File(\"competingTeams.txt\"));\n while(teamsListScanner.hasNextLine()){\n TeamsList.add(teamsListScanner.nextLine());\n }\n // System.out.println(TeamsList);\n //String names = teamsListScanner.next();\n//\n // ArrayList<String> competingString = new ArrayList<>();\n ArrayList<Team> competingTeams = new ArrayList<>();\n // System.out.println(teams.get(0).name);\n for (int i = 0; i < TeamsList.size(); i++)\n {\n for(int j = 0; j < teams.size(); j++)\n {\n // System.out.println(TeamsList.get(i));\n // System.out.println(teams.get(j).name);\n if (TeamsList.get(i).equalsIgnoreCase(teams.get(j).name))\n {\n competingTeams.add(teams.get(j));\n break;\n }\n }\n }\n for (int j = 1; j < 7; j++) {\n System.out.println(\"Winning Teams Round \" + j + \":\");\n ArrayList<Team> tempTeams = BracketRunner.RunRound(competingTeams);\n for (int i = 0; i < tempTeams.size(); i++) {\n System.out.println(tempTeams.get(i).name);\n }\n competingTeams = tempTeams;\n System.out.println(tempTeams.size());\n }\n // for (int i = 0; i < teams.size(); i++) {\n // System.out.println(teams.get(i).SRS);\n //}\n //g\n }", "public List<Player> lookForShootPeople(Player player)\n {\n List<Player> playerList = new LinkedList<>();\n\n playerList.addAll(player.getSquare().getRoom().getPlayerRoomList()); //adds all the players in the room\n\n /*\n * Now i have to check if the player is close to a door. In this case i can see all the players in this adiacent room.\n * I will implement the method in this way:\n * 1. I check if the player can move to a different room with a distance 1 using the method squareReachableNoWall\n * 2. If the player can effectively move to a different room it means it is close to a door\n * 3. I will add to the list all the players in this different room\n */\n\n for (Square square : player.getSquare().getGameBoard().getArena().squareReachableNoWall(player.getSquare().getX(), player.getSquare().getY(), 1))\n {\n if (!(player.getSquare().getColor().equals(square.getColor()))) // if the color of the reachable square is different from the color of the square\n // where the player is this means player can see in a different room\n {\n playerList.addAll(player.getSquare().getRoom().getPlayerRoomList()); //adds all the players in the room\n }\n\n }\n\n Set<Player> playerSet = new HashSet<>();\n playerSet.addAll(playerList);\n\n playerList.clear();\n\n playerList.addAll(playerSet);\n playerList.remove(player);\n\n\n return playerList;\n }", "public synchronized void announceWinner(Team team) {\n\n String[] gameStats = new String[players.length];\n for(int i = 0; i < players.length; i++){\n\n String s = players[i].getName() + \": \" + players[i].getCorrectAnswers();\n gameStats[i] = s;\n System.err.println(s);\n }\n\n for (PlayerHandler playerHandler : players) {\n\n if (playerHandler.getTeam() == team) {\n playerHandler.getOutputStream().println(\n GFXGenerator.drawYouWon(playerHandler.getTeam().getColor(), score, teams[0], teams[1]) +\n \"\\n\" + GFXGenerator.drawTable(gameStats, 4, \"GAME STATS (CORRECT ANSWERS)\"));\n\n continue;\n }\n\n playerHandler.getOutputStream().println(\n GFXGenerator.drawGameOver(playerHandler.getTeam().getColor(), score, teams[0], teams[1])+\n \"\\n\" + GFXGenerator.drawTable(gameStats, 4, \"GAME STATS (CORRECT ANSWERS)\"));\n }\n\n }", "public Team(String name, List<Player> players) {\n this.name = name;\n this.players = players;\n }", "private void setupTestMatch(int t1Size, int t2Size, int teamSize, MatchmakerImpl.MatchMakingRule rule) {\n\n HashSet<Player> team1 = new HashSet<Player>();\n for(int i = 0; i < t1Size; i++) {\n\n Player p = new Player(\"Player \" + i, 100, 100);\n team1.add(p);\n }\n\n HashSet<Player> team2 = new HashSet<Player>();\n for(int i = 0; i < t2Size; i++) {\n\n Player p = new Player(\"Player \" + (i + t1Size), 100, 100);\n team2.add(p);\n }\n\n MatchmakerImpl dummyMatchmaker = new MatchmakerImpl();\n dummyMatchmaker.matchingRule = rule;\n testMatch = new Match(team1, team2, teamSize, dummyMatchmaker);\n }", "public void checkSetPlayerTurn() // Check and if needed set the players turns so it is their turn.\n\t{\n\t\tswitch (totalPlayers) // Determine how many players there are...\n\t\t{\n\t\tcase 2: // For two players...\n\t\t\tswitch (gameState)\n\t\t\t{\n\t\t\tcase twoPlayersNowPlayerOnesTurn: // Make sure it's player one's turn.\n\t\t\t\tplayers.get(0).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\n\t\t\tcase twoPlayersNowPlayerTwosTurn: // Make sure it's player two's turn.\n\t\t\t\tplayers.get(1).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}" ]
[ "0.685519", "0.66812783", "0.65362996", "0.6463817", "0.6440445", "0.6371693", "0.63210905", "0.6234183", "0.62288046", "0.62089986", "0.62046057", "0.6195069", "0.6193902", "0.6158723", "0.6149687", "0.6087806", "0.6082862", "0.6079383", "0.6051767", "0.60468113", "0.60467726", "0.6043725", "0.6036361", "0.600534", "0.59868413", "0.59864724", "0.59849536", "0.59745723", "0.594865", "0.5940147", "0.5938861", "0.5916595", "0.5914034", "0.5909489", "0.59080786", "0.59077054", "0.59072685", "0.59048593", "0.5898141", "0.5895423", "0.5894622", "0.58910084", "0.58745056", "0.584573", "0.5843911", "0.5839396", "0.5839324", "0.58371717", "0.5834493", "0.5828649", "0.5827751", "0.58203256", "0.5807212", "0.5800289", "0.5800195", "0.5793182", "0.5790138", "0.578421", "0.5775742", "0.5774303", "0.576371", "0.5758592", "0.5756284", "0.574486", "0.5731382", "0.57301986", "0.57292044", "0.5727493", "0.5702443", "0.5699067", "0.5697691", "0.5694418", "0.56922734", "0.5692179", "0.5691705", "0.5690881", "0.5689846", "0.5683959", "0.56792504", "0.5677109", "0.5672129", "0.5671569", "0.5662148", "0.5661748", "0.5659144", "0.56586134", "0.565289", "0.5649401", "0.5647054", "0.56384933", "0.5638231", "0.5637685", "0.5632525", "0.5627369", "0.5624128", "0.56218874", "0.5621101", "0.5615777", "0.5613254", "0.5609914" ]
0.6014847
23
///////////////////////////////////////////////// ListOfPlayers interface overrides /////////////////////////////////////////////////
@Override public List<Player> getPlayers() { return new ArrayList<Player>(players); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Player> listPlayers();", "List<Player> getPlayers();", "@Override\n public List<Player> getPlayers() {\n return players;\n }", "public List<Player> getPlayerList(){\n return this.players;\n }", "static List<Player> getAllPlayers() {\n\t\treturn null;\r\n\t}", "ArrayList<IPlayer> buildPlayerList();", "@Override\n public ArrayList<Player> getPlayers() {return steadyPlayers;}", "private void getPlayerList(){\r\n\r\n PlayerDAO playerDAO = new PlayerDAO(Statistics.this);\r\n players = playerDAO.readListofPlayerNameswDefaultFirst();\r\n\r\n }", "ArrayList<Player> getAllPlayer();", "public ListResponse<PlayerResponse> getPlayers() {\n\t\tcheckProvided();\n\t\treturn players;\n\t}", "public List<Player> getPlayers() {\r\n return players;\r\n }", "public List<Player> getPlayers() {\r\n return players;\r\n }", "@Override\n public ArrayList<Player> getPlayers() throws RemoteException {\n return players;\n }", "public List<Player> getPlayerList()\n\t{\n\t\treturn playerList;\n\t}", "@Override\r\n\tpublic ArrayList<PlayerPO> getAllPlayers() {\n\t\treturn playerController.getAllPlayers();\r\n\t}", "public List<Player> getPlayers() {\r\n\t\treturn players;\r\n\t}", "public CopyOnWriteArrayList<Player> getPlayerList() \t\t\t\t\t\t\t{ return this.playerList; }", "public void getPlayerList() {\n if (connected == true) {\n try {\n write(\"get playerlist\");\n } catch (IOException e) {\n System.out.println(\"No connecting with server:ServerCommunication:getPlayerList()\");\n }\n }\n }", "public List<Player> findAllPlayers(){\n\t\treturn playerRepository.findAll();\n\t}", "public List<Player> getAllPlayers() {\r\n // TODO fix actual order of players in the List.\r\n\r\n List<Player> players = new ArrayList<>();\r\n players.addAll(teamRed.getPlayers());\r\n players.addAll(teamBlue.getPlayers());\r\n\r\n return players;\r\n }", "protected ClientList getCurrentPlayers() {\r\n\t\treturn this.players;\r\n\t}", "public ArrayList<Player> getPlayers() {\n return players;\n}", "private Collection<Player> getPlayers() {\n\t\treturn players;\n\t}", "public ArrayList<Player> getPlayerList() {\n ArrayList<Player> ret = new ArrayList<>();\n ret.addAll(playerList);\n return ret;\n }", "public List<String> listPlayerNames() {\n return this.playersNames;\n }", "List<Player> findAllPlayers();", "public List<Player> getPlayers() {\n\t\treturn players;\n\t}", "public List<PlayerItem> getAllPlayerItemById(Player player);", "public ArrayList<Player> getPlayers() {\n return players;\n }", "private void updatePlayerList() \n\t{\n\t\tplayerStatus.clear();\n\n\t\tfor(Player thisPlayer: players) // Add the status of each player to the default list model.\n\t\t{\n\t\t\tplayerStatus.addElement(thisPlayer.toString());\n\t\t}\n\n\t}", "Collection<User> players();", "public List<ServerPlayerEntity> getPlayerList() {\n return this.players;\n }", "public static ArrayList<Player> getWinners(){return winners;}", "public List<Player> getPlayers() {\n\n\t\treturn players;\n\t}", "public List<Player> getPlayers() {\r\n\t\tList<Player> playerList = new ArrayList<Player>();\r\n\r\n\t\tfor (Player p : players.values()) {\r\n\t\t\tif (p != null)\r\n\t\t\t\tplayerList.add(p);\r\n\t\t}\r\n\r\n\t\treturn playerList;\r\n\t}", "public List<String> getAllPlayerNames() {\n List<String> playerNames = new ArrayList<>(10);\n for (Player p : players) {\n playerNames.add(p.getName());\n }\n return playerNames;\n }", "public void setPlayers(ArrayList<Player> players) {\n this.players = players;\n }", "void showWaitingPlayerList(List<String> waitingPlayerUsernames);", "public ArrayList<Player> getPlayers() {\n return players;\n }", "public List<String> getAllPlayers() throws ServerProblem {\r\n\ttry (Connection connTDB = ConnectionManager.getInstance().getConnection()) {\r\n\t LOGGER.debug(\"Getting all players\");\r\n\t List<String> results = engine.getAllPlayers(connTDB);\r\n\t LOGGER.debug(\"Players found in the database: \" + results);\r\n\t return results;\r\n\t} catch (Exception ex) {\r\n\t String error = \"Problem encountered getting all players: \" + ex;\r\n\t LOGGER.error(error);\r\n\t throw new ServerProblem(error, ex);\r\n\t}\r\n }", "public ArrayList<CardGamePlayer> getPlayerList(){\n\t\treturn this.playerList;\n\t}", "public EntityList<Player> getPlayers() {\n\t\treturn players;\n\t}", "public abstract Collection<PlayerFish> getPlayers();", "public List <FootballPlayer> getAllPlayers() {\n\t\treturn market.getAllPlayers();\n\t}", "public void printAllPlayerStats(List<Player> players);", "public String[] getPlayers() {\r\n return playerIds;\r\n }", "public Player[] getPlayers() {\r\n return players;\r\n }", "public List<Colour> getPlayerList();", "public Player[] getPlayers()\r\n\t{\r\n\t\treturn this.players;\r\n\t}", "public LinkedList<Player> getPlayers() {\n\t\treturn this.players;\n\t}", "public List<PlayerItem> getAll();", "private void getPlayers() {\r\n\t\tSystem.out.println(\"How Many Players: \");\r\n\t\tpnum = getNumber(1, 3);\r\n\r\n\t\tfor(int i=0; i < pnum; i++){\r\n\t\t\tSystem.out.println(\"What is player \" + (i + 1) + \"'s name? \");\r\n\t\t\tString name = sc.next();\r\n\t\t\tboolean dupe = true;\r\n\t\t\twhile(dupe){\r\n\t\t\t\tint samecounter = 0;\r\n\t\t\t\tfor(Player p : players){\r\n\t\t\t\t\tif(name.equals(p.getName())){\r\n\t\t\t\t\t\tsamecounter += 1;\r\n\t\t\t\t\t\tSystem.out.println(\"Name is the same as another players. Please choose another name: \");\r\n\t\t\t\t\t\tname = sc.next();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(samecounter == 0){\r\n\t\t\t\t\tdupe = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tplayers.add(new Player(name));\r\n\r\n\t\t}\r\n\t}", "public void setPlayers(ArrayList<Player> players) {\n\t\tthis.players = players;\n\t}", "public Player[] getPlayers() {\n return this.players;\n }", "public Player[] getPlayers() {\n return this.players;\n }", "public void initializePlayers(){\r\n allPlayers = new ArrayList<Player>();\r\n currentPlayerIndex = 0;\r\n Player redPlayer = new Player(1, new Location(2, 2), Color.RED);\r\n Player bluePlayer = new Player(2, new Location(4, 2), Color.BLUE);\r\n Player whitePlayer = new Player(3, new Location(2, 4), Color.WHITE);\r\n Player yellowPlayer = new Player(4, new Location(4, 4), Color.YELLOW);\r\n allPlayers.add(redPlayer);\r\n allPlayers.add(bluePlayer);\r\n allPlayers.add(whitePlayer);\r\n allPlayers.add(yellowPlayer);\r\n }", "public ArrayList<Entity> getPlayers() {\n ArrayList<Entity> players = new ArrayList<>();\n students.forEach(student -> players.add(student.getPlayer()));\n return players;\n }", "@RequestMapping(\"/players\")\n public List<Player> getAllPlayers() {\n return playerService.getPlayerList();\n }", "public Player[] getPlayers() {\n return players;\n }", "@Override\npublic int getNumPlayers() {\n\treturn numPlayer;\n}", "public void addPlayerToTheList(){\n \tif(!txtFieldPlayerName.getText().trim().isEmpty() && totPlayers <= maximumPlayersAllowed){\n\t\t\t\n \t\t//creates a new Player and adds the name that the user inputs from the textField\n\t\t\tplayer.add(new Player(txtFieldPlayerName.getText()));\n\t\t\n\t\t\tString playerName = \"\";\n\t\t\tint playerNr = 1;\n\t\t\t\n\t\t\tfor(Player p : player){\n\t\t\t\tplayerName += playerNr+\": \"+p.getName()+\"<br>\"; \n\t\t\t\tplayerNr++;\n\t\t\t}\n\t\t\t\n\t\t\ttotPlayers++;\n\t\t\tlblPlayerList.setText(\"<html><h2>PLAYER LIST</h2>\"+playerName+\"</html>\");\n\t\t\ttxtFieldPlayerName.setText(\"\");\n\t\t}\n\t\t\n\t\tif(totPlayers >= minimumPlayersAllowed){\n\t\t\tbtnPlay.setEnabled(true);\n\t\t}\n\t\t\n\t\tif(totPlayers >= maximumPlayersAllowed){\n\t\t\tbtnAddPlayer.setEnabled(false);\n\t\t\ttxtFieldPlayerName.setEnabled(false);\n\t\t}\n }", "public List<Player> getPlayersOrdered() {\r\n ArrayList<Player> result = new ArrayList<>();\r\n for (PlayerContainer container : players) {\r\n result.add(container.player);\r\n }\r\n return result;\r\n }", "@Override\n\tpublic List<Player> getPlayer() {\n\t\treturn ofy().load().type(Player.class).list();\n\t}", "public Player[] getPlayers()\n\t{\n\t\treturn players;\n\t}", "public void setD_PlayerList(ArrayList<Player> p_PlayerList) {\n d_PlayerList = p_PlayerList;\n }", "public PlayerServices(){\n playerList = new ArrayList<>();\n }", "Set<String> getPlayers();", "public int getNumOfPlayers() {\n\t\treturn playerList.size();\n\t}", "void refreshPlayerList(Map<String, IPlayerConfig> playerList) throws RpcException;", "public Set<Player> getPlayers() {\n return players;\n }", "public List<PlayerInfo> getPlayerList(GameInfo gi){\n\t\tClientModelFacade facade = ClientModelFacade.getInstance(null);\n\t\t\n\t\tGameInfo[] gameList = facade.getGamesList();\n\n\t\tfor(int i = 0; i < gameList.length; i++){\n\t\t\tif(gameList[i].getId() == gi.getId()){\n\t\t\t\treturn gameList[i].getPlayers();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "protected void newPlayerList() {\n int len = getPlayerCount();\n mPlayerStartList = new PlayerStart[ len ];\n for(int i = 0; i < len; i++) {\n mPlayerStartList[i] = new PlayerStart( 0.f, 0.f );\n }\n }", "public ArrayList<CardGamePlayer> getPlayerList() {\n\t\treturn playerList;\n\t}", "private void loadPlayers() {\r\n this.passive_players.clear();\r\n this.clearRoster();\r\n //Map which holds the active and passive players' list\r\n Map<Boolean, List<PlayerFX>> m = ServiceHandler.getInstance().getDbService().getPlayersOfTeam(this.team.getID())\r\n .stream().map(PlayerFX::new)\r\n .collect(Collectors.partitioningBy(x -> x.isActive()));\r\n this.passive_players.addAll(m.get(false));\r\n m.get(true).stream().forEach(E -> {\r\n //System.out.println(\"positioning \"+E.toString());\r\n PlayerRosterPosition pos = this.getPlayerPosition(E.getCapnum());\r\n if (pos != null) {\r\n pos.setPlayer(E);\r\n }\r\n });\r\n }", "private List<String> receiveConnectedPlayers(@NotNull String data) {\n ConnectedPlayersDto result = GameGraphics.gson.fromJson(data, ConnectedPlayersDto.class);\n if (result.players != null) {\n players = result.players.stream()\n .filter(Objects::nonNull)\n .map(player -> player.name)\n .collect(Collectors.toList());\n return players;\n }\n return null;\n }", "public List<PlayerInstance> getAllPlayers()\n\t{\n\t\tfinal List<PlayerInstance> players = new ArrayList<>();\n\t\tfor (Creature temp : getCharactersInside())\n\t\t{\n\t\t\tif (temp instanceof PlayerInstance)\n\t\t\t{\n\t\t\t\tplayers.add((PlayerInstance) temp);\n\t\t\t}\n\t\t}\n\t\treturn players;\n\t}", "public TennisPlayer[] getAllPlayers() throws TennisDatabaseRuntimeException {\n\t\t \t\n\t\tTennisPlayerContainerIterator iterator = this.iterator();\n\t\t\n iterator.setInorder();\n \t\n TennisPlayer[] outputArray = new TennisPlayer[playerCount];\n \n int index = 0;\n \n while (iterator.hasNext()) {\n \t\n outputArray[index] = iterator.next();\n \n index++;\n \n }\n \n return outputArray;\n \n\t}", "private void listPlayer(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tList<Player> players = playerDbUtil.getPlayers();\n\n\t\t// adiciona o jogador no request attribute\n\t\trequest.setAttribute(\"PLAYER_LIST\", players);\n\n\t\t// envia para a jsp:list-players (view)\n\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"/list-players.jsp\");\n\t\tdispatcher.forward(request, response);\n\t}", "public LobbyPacket(List<Player> players) {\n this.players = players.toArray(new Player[players.size()]);\n }", "public String getPlayerListName ( ) {\n\t\treturn handleOptional ( ).map ( Player :: getPlayerListName ).orElse ( name );\n\t}", "public Collection<Player> getPlayersChunk() {\n var chunk = new Chunk<Player>();\n var playersChunk = chunk.get(this.players, ALL_PLAYERS_CHUNK_SIZE, allPlayersChunkIndex);\n\n // up to ALL_PLAYERS_CHUNK_SIZE with empty players\n // to have an even view\n var startIndex = playersChunk.size();\n for (var i = startIndex; i < ALL_PLAYERS_CHUNK_SIZE; i++) {\n playersChunk.add(new Player(new Person()));\n }\n\n return playersChunk;\n }", "@SuppressWarnings(\"ResultOfObjectAllocationIgnored\")\n private String getWinnerList() {\n String list = \"\";\n\n ArrayList<IPlayer> arrlist = sortPlayerAfterPoints();\n\n for (IPlayer i : arrlist) {\n try {\n list += i.getName();\n list += \": \" + i.getPoints() + \"\\n\";\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n\n try {\n if (dialog.getSoundBox().isSelected()) {\n if (iPlayerList.size() > 0) {\n if (playersAgentsMap.get(arrlist.get(0).getName()).get(0).getColor().equals(Color.decode(AgentUtils.ROT))) {\n new SoundClip(\"red_team_is_the_winner\");\n } else if (playersAgentsMap.get(arrlist.get(0).getName()).get(0).getColor().equals(Color.decode(AgentUtils.BLAU))) {\n new SoundClip(\"blue_team_is_the_winner\");\n } else {\n new SoundClip(\"Flawless_victory\");\n }\n } else {\n new SoundClip(\"players_left\");\n }\n }\n } catch (NumberFormatException | RemoteException e) {\n e.printStackTrace();\n }\n\n return list;\n }", "@Override\r\n\tpublic List<Player> getAllPlayer(String email) {\n\t\treturn dao.getAllPlayer(email);\r\n\t}", "public int numPlayers() {\n return playerList.size();\n }", "public void printAllPlayers(){\n for (Player player : players){\n player.printPlayerInfo();\n }\n }", "public void addPlayers(ArrayList<Player> players) {\r\n\t\tthis.players = players;\r\n\t}", "public Map<String, Player> getPlayersMap(){\n return this.players;\n }", "public static List<Player> getTrackablePlayers() {\n\t\tPlayer[] players = Bukkit.getOnlinePlayers();\n\t\tList<Player> players1 = new ArrayList<Player>();\n\t\tfor (int i = 0; i < players.length; i++) {\n\t\t\tif (!players[i].hasMetadata(\"invisible\")) {\n\t\t\t\tplayers1.add(players[i]);\n\t\t\t}\n\n\t\t}\n\t\treturn players1;\n\t}", "public Player getPlayerFromList(String name){\n for (Player player : players){\n if (player.getName().equals(name)){\n return player;\n }\n }\n return null; //This will never happen. Will always be found. Only called from the takeoverTerritory method\n }", "public Hashtable<Integer, Player> getPlayers() {\r\n\t\treturn players;\r\n\t}", "public Set<UUID> getAlivePlayers() {\n return new HashSet<>(players);\n }", "public static Collection<? extends Player> getOnlinePlayers() {\n return Bukkit.getServer().getOnlinePlayers();\n }", "List<Player> getViewers();", "public abstract ArrayList<String> getPlayer(int gameId) throws SQLException;", "int getNumberOfPlayers(){\n return players.size();\n }", "public List<Player> getAllOrdered() {\n PlayerDB pdb = new PlayerDB();\n return pdb.getAllOrdered();\n }", "public List<Player> getAvailablePlayers(Round round) {\r\n\t\tList<Player> availablePlayers = playerLogic.createNew(round.getPlayers());\r\n\r\n\t\tfor (Match match : round.getMatches()) {\r\n\t\t\tavailablePlayers.removeAll(match.getHomeTeam());\r\n\t\t\tavailablePlayers.removeAll(match.getAwayTeam());\r\n\t\t}\r\n\t\treturn availablePlayers;\r\n\t}", "public List<Player> formatPlayers(ResultSet rs) {\n\t\tList<Player> pList = new ArrayList<Player>();\n\t\ttry {\n\t\t\twhile (rs.next()) {\n\t\t\t\tPlayer p = new Player(rs.getString(3), rs.getString(4), rs.getDate(5), rs.getInt(6));\n\t\t\t\tpList.add(p);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn pList;\n\t}", "public List<LobbyPlayer> getPlayers(String code) throws NoDocumentException {\n return Firebase.requestDocument(\"lobbies/\" + code).toObject(LobbyDTO.class).toModel().getPlayers();\n }", "public void setUpPlayers() {\n this.players.add(new Player(\"Diogo\"));\n this.players.add(new Player(\"Hayden\"));\n this.players.add(new Player(\"Gogo\"));\n }" ]
[ "0.81763655", "0.80469173", "0.7890082", "0.7634759", "0.7473943", "0.74648356", "0.7377769", "0.7344725", "0.73011416", "0.72862035", "0.7285177", "0.7285177", "0.7204182", "0.7198806", "0.7171775", "0.7090992", "0.70835423", "0.70761156", "0.7058626", "0.704869", "0.70393527", "0.70309496", "0.7012524", "0.7010205", "0.69944155", "0.6992757", "0.69716287", "0.69625485", "0.69354993", "0.69262034", "0.69222873", "0.6906273", "0.6885021", "0.6853921", "0.6819714", "0.680856", "0.6794187", "0.67889357", "0.6771659", "0.6754669", "0.6730036", "0.6710078", "0.6684352", "0.6666146", "0.66503304", "0.6645528", "0.6624801", "0.6611408", "0.6610806", "0.6609509", "0.66075414", "0.6592945", "0.6585213", "0.6573821", "0.6573821", "0.6555201", "0.6553332", "0.65492725", "0.6545542", "0.65436906", "0.65424377", "0.6527673", "0.65092504", "0.6507917", "0.6507853", "0.65049666", "0.6500697", "0.64963907", "0.6493007", "0.6485722", "0.64768386", "0.6466219", "0.6465262", "0.6464869", "0.645446", "0.64402825", "0.64366037", "0.6436345", "0.6425091", "0.64210427", "0.6420731", "0.6419262", "0.64125067", "0.6379337", "0.6374726", "0.6357925", "0.6351223", "0.6348872", "0.63429517", "0.6329579", "0.6329538", "0.6320765", "0.6309473", "0.6305586", "0.6305061", "0.62941265", "0.62924033", "0.62657964", "0.62597644", "0.6258368" ]
0.782665
3
Determine range of players to show
@Override public List<Player> getPlayerPage(int page) throws IndexOutOfBoundsException { page = page - 1; int bottom = page * 10; if(bottom < 0 || bottom > players.size()) { throw new IndexOutOfBoundsException(); } int top; if(players.size() - bottom < 10) { top = players.size(); } else { top = bottom + 10; } List<Player> playersList = new ArrayList<>(players); return playersList.subList(bottom, top); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getAttackRange();", "private void getNumPlayers() {\n\t\tSystem.out.println(\"How many people are playing? (must be between \"+MIN_PLAYERS+\" and \"+MAX_PLAYERS+\")\");\n\t\tnumPlayers = GetInput.getInstance().anInteger(MIN_PLAYERS, MAX_PLAYERS);\n\t}", "public void setMinimumPlayers(int nPlayers)\r\n {\n \r\n }", "int range() {\n\t\treturn mpg * fuelcap;\n\t}", "int getRange();", "void setVisiblePlayers() {\n\n switch (team1Players) {\n\n case 6:\n\n tvt1p6.setVisibility(View.VISIBLE);\n\n spnPlayer6.setVisibility(View.VISIBLE);\n\n case 5:\n\n tvt1p5.setVisibility(View.VISIBLE);\n\n spnPlayer5.setVisibility(View.VISIBLE);\n\n case 4:\n\n tvt1p4.setVisibility(View.VISIBLE);\n\n spnPlayer4.setVisibility(View.VISIBLE);\n\n case 3:\n\n tvt1p3.setVisibility(View.VISIBLE);\n\n spnPlayer3.setVisibility(View.VISIBLE);\n\n case 2:\n\n tvt1p2.setVisibility(View.VISIBLE);\n\n spnPlayer2.setVisibility(View.VISIBLE);\n\n case 1:\n\n tvt1p1.setVisibility(View.VISIBLE);\n\n spnPlayer1.setVisibility(View.VISIBLE);\n\n break;\n\n }\n\n }", "int range(){\n return fuelcap*mpg;\n }", "public int getMinPlayers() {\n return minPlayers;\n }", "public String playerNear(){\r\n\t\tif(AdventureManager.toon.x + 25 > x-200 && AdventureManager.toon.x +25 < x) return \"left\";\r\n\t\telse if(AdventureManager.toon.x +25 < x+250 && AdventureManager.toon.x +25 > x) return \"right\";\r\n\t\telse return \"n\";\r\n\t}", "@Override\n public int between(int min, int max) {\n return super.between(min, max);\n }", "public boolean inRange(){\n //System.out.println(\"inRange\");\n return Math.abs(GameView.instance.player.position.x - creationPoint.x) < GameView.instance.cameraSize * attackRange;\n }", "public Range getVideoPortsRange();", "public int getMinimumPlayers() {\n return getOption(ArenaOption.MINIMUM_PLAYERS);\n }", "public void getRange()\n\t{\n\t\tint start = randInt(0, 9);\n\t\tint end = randInt(0, 9);\t\t\n\t\tint startNode = start<=end?start:end;\n\t\tint endNode = start>end?start:end;\n\t\tSystem.out.println(\"Start : \"+startNode+\" End : \"+endNode);\n\t}", "abstract public RandomRange getPlunderRange(Unit attacker);", "Range controlLimits();", "public int getPoints ( Player player );", "public void setMinPlayers(int minPlayers) {\n\t\tthis.minPlayers = minPlayers;\n\t}", "public void displayPlayerWinnings()\n {\n for(int card = 0; card < playerCardsWon; card++)\n {\n System.out.println(playerWinnings[card].toString());\n }\n }", "public int getPlayerStarting() {\r\n int playerstarting = 0;\r\n int[] score = players.get(0).getMaxDomino();\r\n System.out.println(\"Player\" + players.get(0).getName() + \" has max score \" + score[0] + \"Its a double \" + score[1] + \" 1==true\");\r\n for (int i = 1; i < players.size(); i++) {\r\n int[] aux = players.get(i).getMaxDomino();\r\n System.out.println(\"ENTERING THE LOOP FOR\" + players.get(i).getName() + \"with highest domino\" + aux[0] + \"with double\" + aux[1]);\r\n if (score[1] < aux[1]) {\r\n score = aux;\r\n playerstarting = i;\r\n } else if (aux[0] > score[0] && score[1] == aux[1]) {\r\n score = aux;\r\n playerstarting = i;\r\n }\r\n }\r\n\r\n return playerstarting;\r\n }", "public void setMaxPlayers(short maxPlayer) {\n\t\tif (maxPlayer <= 0 || maxPlayer > CommonConstants.MAX_PLAYERS) {\n\t\t\tthrow new IllegalArgumentException(\"Player count must be 1..\" + CommonConstants.MAX_PLAYERS);\n\t\t}\n\n\t\tShortPoint2D[] newPlayerStarts = new ShortPoint2D[maxPlayer];\n\t\tfor (int i = 0; i < maxPlayer; i++) {\n\t\t\tnewPlayerStarts[i] = i < playerCount ? playerStarts[i] : new ShortPoint2D(width / 2, height / 2);\n\t\t}\n\t\tthis.playerCount = maxPlayer;\n\t\tthis.playerStarts = newPlayerStarts;\n\n\t}", "List<Videogioco> doRetriveVideogiocoAllRange(int min, int max);", "private String whichPlayerToStart(){\n\t\tdouble whichPlayerToCommence = Math.random();\n\t\tdouble randomLimit = Math.random();\n\t\tif(whichPlayerToCommence <= randomLimit){ \n\t\tthis.turn = \"blue\";\n\t\treturn this.turn;\n\t\t}\n\t\telse{\n\t\tthis.turn = \"red\";\n\t\treturn this.turn;\n\t\t} \n\t}", "void calculateRange() {\n //TODO: See Rules\n }", "public int getPlayerVisiblePosition(Colour colour);", "public void setMinimumPlayers(int minimumPlayers) {\n if (minimumPlayers < 2) {\n setOptionValue(ArenaOption.MINIMUM_PLAYERS, 2);\n return;\n }\n setOptionValue(ArenaOption.MINIMUM_PLAYERS, minimumPlayers);\n }", "private void checkBounds() {\n\t\t// checks to see if playerX is to the left of the left side of the display\n\t\tif (player.getX() < 0)\n\t\t\tplayer.setX(0);\n\t\t// checks to see if playerX is greater than the width of the display\n\t\tif (player.getX() > displayWidth - sprite.get(\"playerSprite\").getWidth())\n\t\t\tplayer.setX(displayWidth - sprite.get(\"playerSprite\").getWidth());\n\t\t// checks to see if playerY is lower than the bottom of the display\n\t\tif (player.getY() < 0)\n\t\t\tplayer.setY(0);\n\t\t// checks to see if playerY is greater than the height of the display\n\t\tif (player.getY() > displayHeight - sprite.get(\"playerSprite\").getHeight())\n\t\t\tplayer.setY(displayHeight - sprite.get(\"playerSprite\").getHeight());\n\t}", "public String playerRealNear(){\r\n\t\tif(AdventureManager.toon.x + 25 > x-50 && AdventureManager.toon.x +25 < x) return \"left\";\r\n\t\telse if(AdventureManager.toon.x +25 < x+100 && AdventureManager.toon.x +25 > x) return \"right\";\r\n\t\telse return \"n\";\r\n\t}", "public int getRangeWidth();", "public int askPermitToGetBetweenVisible();", "public int getMinPlayers() {\n\t\treturn minPlayers;\n\t}", "@Override\n public List<Set<String>> getPlayersVisibleTo(){\n Set<String> players = new HashSet<String>();\n players.add(destination.getOwner().getName());\n for(Region adj : destination.getAdjRegions()){\n players.add(adj.getOwner().getName());\n }\n //All adjacent can see cloaking happened\n return Arrays.asList(players);\n }", "Range alarmLimits();", "public int getMaxPlayers() {\n return maxPlayers;\n }", "public ArrayList<BoardGame> filterByPlayer(ArrayList<BoardGame> list) {\n //int playerCount = Integer.parseInt(numPlayers);\n int playerCount = extractInt(numPlayers);\n ArrayList<BoardGame> tempList = new ArrayList<>();\n for (BoardGame game: list) {\n //Debug print out\n Log.i(\"FILTER PLAYERS\", \"Game: \" + game.getName() + \" Min players: \" + game.getMinPlayers() +\n \" Max players: \" + game.getMaxPlayers() + \" Target players: \" + playerCount);\n //TODO: Is there some case for 10+ that would differ from the below?\n if(game.getMinPlayers() <= playerCount && game.getMaxPlayers() >= playerCount) {\n addGameToList(tempList, game);\n }\n }\n return tempList;\n }", "@Override\npublic int getNumPlayers() {\n\treturn numPlayer;\n}", "public int getMaximumPlayers() {\n return maximumPlayers;\n }", "protected int getExperiencePoints(EntityPlayer player)\n {\n return super.getExperiencePoints(player);\n }", "protected int getExperiencePoints(PlayerEntity player) {\n return super.getExperiencePoints(player);\n }", "public void NumberOfPlayers()\r\n {\r\n Input=JOptionPane.showInputDialog(\"Type the number of players\", JOptionPane.YES_NO_OPTION);\r\n \r\n SecondInput = JOptionPane.showInputDialog(\"How many of those \"+ Input +\" players will be AI ?\", JOptionPane.YES_NO_OPTION);\r\n \r\n while(Converter(SecondInput) >= Converter(Input))\r\n {\r\n if(Converter(SecondInput) >= Converter(Input))\r\n {\r\n JOptionPane.showMessageDialog(this,\"AI players can't be equal or more than the original number of players!\",\r\n \"ERROR\",\r\n JOptionPane.ERROR_MESSAGE);\r\n\r\n SecondInput = JOptionPane.showInputDialog(\"How many of those \"+ Input +\" players will be AI ?\", JOptionPane.YES_NO_OPTION);\r\n }\r\n \r\n }\r\n \r\n if(Input!=null)\r\n {\r\n int j = Converter(Input); \r\n \r\n Start();\r\n }\r\n \r\n }", "public ArrayList<Range> getCompRange()\r\n\t{\r\n\t\tArrayList<Panel> known = new ArrayList<Panel>();\r\n\t\tfor(int i = 0; i<newGame.getCompHandLength(); i++)\r\n\t\t{\r\n\t\t\tif(newGame.getCompHand().getPanel(i).isFlipped())\r\n\t\t\t{\r\n\t\t\t\tknown.add(newGame.getCompHand().getPanel(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i<newGame.getUserHandLength(); i++)\r\n\t\t{\r\n\t\t\tif(newGame.getUserHand().getPanel(i).isFlipped())\r\n\t\t\t{\r\n\t\t\t\tknown.add(newGame.getUserHand().getPanel(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn(ranges(newGame.getCompHand(),known,false));\r\n\t}", "public LimitedPlayer() {\r\n\t\tsuper.setturnsLimit(10);\r\n\t}", "public int parseNumPlayers() {\n\t\tboolean validParse = false;\n\t\tSystem.out.println(\"How many players are playing Legends of Heroes? (1-4)\");\n\t\t\n\t\twhile(!validParse) {\n\t\t\tint num = parseInt();\n\t\t\tif(num < 1 || num > 4) {\n\t\t\t\tprintErrorParse();\n\t\t\t} else {\n\t\t\t\tvalidParse = true;\n\t\t\t\treturn num;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t\t\n\t}", "private void setPoints () {\n\t\tArrayList<Point> emptySpot = new ArrayList<Point>();\n\t\tfor (int i = 0; i < width; i++) {\n\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\tif (maze[i][j] == 0) {\n\t\t\t\temptySpot.add(new Point (i, j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCollections.shuffle(emptySpot);\n\t\tthis.goal = emptySpot.get(0);\n\t\tdouble goalRange = this.goal.getX() + this.goal.getY();\n\t\tfor (int i = 1; i < emptySpot.size(); i++) {\n\t\t\tPoint playerStart = emptySpot.get(i);\n\t\t\tdouble playerRange = playerStart.getX() + playerStart.getY();\n\t\t\tif (Math.abs(playerRange - goalRange) > width/2)\n\t\t\tthis.playerStart = playerStart;\n\t\t}\n\t}", "private int promptNumPlayers() {\r\n Object[] options = {1, 2, 3, 4};\r\n int numPlr = (int) JOptionPane.showInputDialog(\r\n null,\r\n \"How many people are playing?\",\r\n \"Welcome!\",\r\n JOptionPane.PLAIN_MESSAGE,\r\n null,\r\n options,\r\n 1);\r\n\r\n players = new Player[numPlr];\r\n\r\n for (int i = 0; i < numPlr; i++) {\r\n players[i] = new Player();\r\n }\r\n\r\n return numPlr;\r\n }", "public List<PlayerRecord> display4() {\n List<PlayerRecord> l = new List<PlayerRecord>();\n int max = 0;\n PlayerRecord curr = playerlist.first();\n while (curr != null) {\n int c = curr.getShots();\n if (c > max) {// if is a new maximum value, empty the list\n l.clear();\n l.add(curr);\n max = c;\n } else if (c == max) { // if there are more than one maximum value,\n // add it\n l.add(curr);\n }\n curr = playerlist.next();\n }\n return l;\n }", "public void getScores(){\n String p1 = \"Player 1 has \" + Integer.toString(player1.getWins());\n String p2 = \"Player 2 has \" + Integer.toString(player2.getWins());\n String winner = \"tie\";\n if(player1.getWins()>player2.getWins()){\n winner = player1.getName() + \" wins!!!!\";\n }\n else if(player2.getWins()>player1.getWins()){\n winner = player2.getName() + \" Wins!!!\";\n }\n JOptionPane.showMessageDialog(null, (p1 + \"\\n\" + p2 + \"\\n\" + winner));\n }", "@Override\r\n public void getRange(ArrayList<Piece> pieces){\r\n this.range.clear();\r\n int pieceX = this.getX(); int pieceY = this.getY(); // X and Y coordinates for the king piece\r\n\r\n // getPiece: 0 = empty; 1 = same color; 2 = opposite color\r\n //Up\r\n if (this.getPiece(pieceX, pieceY+1, pieces) == 0 || this.getPiece(pieceX, pieceY+1, pieces) == 2)\r\n this.range.add(new int[] {pieceX, pieceY+1}); // Return int[] of tested coordinates\r\n\r\n //Up-right\r\n if (this.getPiece(pieceX+1, pieceY+1, pieces) == 0 || this.getPiece(pieceX+1, pieceY+1, pieces) == 2)\r\n this.range.add(new int[] {pieceX+1, pieceY+1}); // Return int[] of tested coordinates\r\n\r\n //Right\r\n if (this.getPiece(pieceX+1, pieceY, pieces) == 0 || this.getPiece(pieceX+1, pieceY, pieces) == 2)\r\n this.range.add(new int[] {pieceX+1, pieceY}); // Return int[] of tested coordinates\r\n\r\n //Down-right\r\n if (this.getPiece(pieceX+1, pieceY-1, pieces) == 0 || this.getPiece(pieceX+1, pieceY-1, pieces) == 2)\r\n this.range.add(new int[] {pieceX+1, pieceY-1}); // Return int[] of tested coordinates\r\n\r\n //Down\r\n if (this.getPiece(pieceX, pieceY-1, pieces) == 0 || this.getPiece(pieceX, pieceY-1, pieces) == 2)\r\n this.range.add(new int[] {pieceX, pieceY-1}); // Return int[] of tested coordinates\r\n\r\n //Down-left\r\n if (this.getPiece(pieceX-1, pieceY-1, pieces) == 0 || this.getPiece(pieceX-1, pieceY-1, pieces) == 2)\r\n this.range.add(new int[] {pieceX-1, pieceY-1}); // Return int[] of tested coordinates\r\n\r\n //Left\r\n if (this.getPiece(pieceX-1, pieceY, pieces) == 0 || this.getPiece(pieceX-1, pieceY, pieces) == 2)\r\n this.range.add(new int[] {pieceX-1, pieceY}); // Return int[] of tested coordinates\r\n\r\n //Up-left\r\n if (this.getPiece(pieceX-1, pieceY+1, pieces) == 0 || this.getPiece(pieceX-1, pieceY+1, pieces) == 2)\r\n this.range.add(new int[] {pieceX-1, pieceY+1}); // Return int[] of tested coordinates\r\n\r\n //Castling\r\n for (Piece piece : pieces) {\r\n if (piece instanceof Rook) {\r\n if (piece.getColor() == this.getColor()) {\r\n if (validCastling(pieces, (Rook)piece)) {\r\n int targetX = (piece.getX() < getX()) ? (this.getX() - 2) : (this.getX() + 2);\r\n this.range.add(new int[] {targetX, this.getY()});\r\n }\r\n }\r\n }\r\n }\r\n }", "private void calculateRange(){\r\n float minAER = theAccounts.get(0).getAer();\r\n float maxAER = theAccounts.get(accountInTotal-1).getAer();\r\n float averageAER = maxAER-minAER;\r\n float averageBond = startingBonds + (startingBonds*averageAER/100);\r\n\r\n Account averageAccount = new Account(startingBonds,averageBond,averageAER);\r\n System.out.println(averageAccount.toString());\r\n }", "Limits limits();", "@Override\n\tpublic int getRange() {\n\t\treturn range;\n\t}", "private List<Player> calculatePoints()\n\t{\n\t\tthis.systemDataInput.printMessage(\"Calculating points...\");\n\t\t\n\t\tArrayList<Player> winningPlayers = new ArrayList<Player>();\n\t\tint maxPoints = 0;\n\t\tint maxBuilding = 0;\n\t\t\n\t\tfor(Player player : playerList)\n\t\t{\n\t\t\tint points = 0;\n\t\t\tint bestBuilding = 0;\n\t\t\t\n\t\t\tfor(Area area : board.getAreaList())\n\t\t\t{\n\t\t\t\tif (!area.hasDemon())\n\t\t\t\t{\n\t\t\t\t\tif (area.hasBuilding(player))\n\t\t\t\t\t{\n\t\t\t\t\t\tpoints += area.getCost();\n\t\t\t\t\t\tif (area.getCost() > bestBuilding)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbestBuilding = area.getCost();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpoints += 5 * area.getMinionList(player).size();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tint playerMoney = player.getMoneyAmount();\n\t\t\tpoints += playerMoney;\n\t\t\t\n\t\t\tfor(Card card : player.getInFrontOfHimDeck())\n\t\t\t{\n\t\t\t\tfor(Action action : card.getActions(BorrowMoneyFromTheBank.class))\n\t\t\t\t{\n\t\t\t\t\tint moneyToPayBack = ((BorrowMoneyFromTheBank)action).getMoneyToPayBack();\n\t\t\t\t\tif (playerMoney >= moneyToPayBack)\n\t\t\t\t\t{\n\t\t\t\t\t\tpoints -= moneyToPayBack;\n\t\t\t\t\t\tplayerMoney -= moneyToPayBack;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tpoints -= ((BorrowMoneyFromTheBank)action).getPointsToLose();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tplayer.addPoints(points);\n\t\t\tplayer.getDataInput().printMessage(points + \" points\");\n\t\t\t\n\t\t\tif (points > maxPoints || (points == maxPoints && bestBuilding > maxBuilding))\n\t\t\t{\n\t\t\t\tmaxPoints = points;\n\t\t\t\tmaxBuilding = bestBuilding;\n\t\t\t\twinningPlayers.clear();\n\t\t\t\twinningPlayers.add(player);\n\t\t\t}\n\t\t\telse if (points == maxPoints && bestBuilding == maxBuilding)\n\t\t\t{\n\t\t\t\twinningPlayers.add(player);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn winningPlayers;\n\t}", "private Bounds getDrawBounds() {\n\t\tfinal float boundsWidth = 2 * OFFSET_X;\n\t\tfinal float boundsHeight = 2 * OFFSET_Y;\n\t\t\n\t\t//Get the center point of the player, then subtract by offset\n\t\tfinal float x = (activePlayer.getX() + activePlayer.getWidth() / 2f) \n\t\t\t\t/ activePlayer.getScaleX() - OFFSET_X;\n\n\t\tfinal float y = (activePlayer.getY() + activePlayer.getHeight() / 2f) \n\t\t\t\t/ activePlayer.getScaleY() - OFFSET_Y + 1;\n\t\t\n\t\treturn new Bounds(x, y, boundsWidth, boundsHeight);\n\t}", "int getActivePlayerIndex();", "@Override\n public int getTotalHumanPlayers() {\n return totalHumanPlayers;\n }", "public Rect getRectplayer1()\n {return new Rect(x+ width*9/25,\ty +height*1/20,\n x+ width*9/25 + width*27/100, y +height*1/20 +height*7/50);}", "public int getPoints(){\n\t\t//add the player socres(including monster killing, powerUp points and winning points\n\t\tint points = this.player.getScore() + 200*this.player.getHealth();\n\t\t\n\t\t//since the better the less time used, we use 600 seconds to minus the total seconds being used\n\t\t//and add it to the points\n\t\t//600 seconds is 10 minutes, which is definity long enough\n\t\t//if exceeds 10 minutes, we will subtract total score\n\t\tif(this.player.win()){\t//only if the player wins will we calculate the time\n\t\t\tpoints += (int)(3600 - (this.time / 1000000000));\n\t\t}\n\t\t\n\t\tthis.totalLabel.setText(String.valueOf(points));\t//set the value of the JLabel\n\t\t\n\t\treturn points;\n\t\t\n\t}", "public int rangeSize() {\n return Math.abs(max - min);\n }", "List<Player> getViewers();", "public double getRange(){\r\n\t\t uSensor.ping();\r\n\t\t return uSensor.getRangeInches();\r\n\t\t}", "public List<PlayerRecord> display3() {\n List<PlayerRecord> l = new List<PlayerRecord>();\n int max = 0;\n PlayerRecord curr = playerlist.first();\n while (curr != null) {\n int c = curr.getWinninggoals();\n if (c > max) {// if is a new maximum value, empty the list\n l.clear();\n l.add(curr);\n max = c;\n } else if (c == max) { // if there are more than one maximum value,\n // add it\n l.add(curr);\n }\n curr = playerlist.next();\n }\n return l;\n }", "public void setNumberOfPlayers(int numberOfPlayers) {\n this.numberOfPlayers = numberOfPlayers;\n }", "public String[] getNearestPlayer(Player p, PlayerData pd)\r\n/* 60: */ {\r\n/* 61:58 */ Game g = pd.getGame();\r\n/* 62: */ \r\n/* 63:60 */ int x = p.getLocation().getBlockX();\r\n/* 64:61 */ int y = p.getLocation().getBlockY();\r\n/* 65:62 */ int z = p.getLocation().getBlockZ();\r\n/* 66: */ \r\n/* 67:64 */ int i = 200000;\r\n/* 68: */ \r\n/* 69:66 */ Player player = null;\r\n/* 70:68 */ for (String s : g.getPlayers())\r\n/* 71: */ {\r\n/* 72:70 */ Player p2 = Bukkit.getPlayer(s);\r\n/* 73:72 */ if ((p2 != null) && (!p2.equals(p)) && (!pd.isOnTeam(s)))\r\n/* 74: */ {\r\n/* 75:74 */ Location l = p2.getLocation();\r\n/* 76: */ \r\n/* 77:76 */ int c = cal((int)(x - l.getX())) + cal((int)(y - l.getY())) + cal((int)(z - l.getZ()));\r\n/* 78:78 */ if (i > c)\r\n/* 79: */ {\r\n/* 80:79 */ player = p2;\r\n/* 81:80 */ i = c;\r\n/* 82: */ }\r\n/* 83: */ }\r\n/* 84: */ }\r\n/* 85:84 */ if (player != null) {\r\n/* 86:84 */ p.setCompassTarget(player.getLocation());\r\n/* 87: */ }\r\n/* 88:86 */ return new String[] { player == null ? \"none\" : player.getName(), String.valueOf(i) };\r\n/* 89: */ }", "public void showResult(NimPlayer player1, NimPlayer player2) {\n String g1 = \"game\";\n String g2 = \"game\";\n\n // check the sigular\n if (player1.getWinTimes() >= 2) {\n g1 = \"games\";\n }\n if (player2.getWinTimes() >= 2) {\n g2 = \"games\";\n }\n System.out.println(player1.getName() + \" won \" +\n player1.getWinTimes() + \" \" + g1 + \" out of \" +\n player1.getTotalTimes() + \" played\");\n System.out.println(player2.getName() + \" won \" +\n player2.getWinTimes() + \" \" + g2 + \" out of \" +\n player2.getTotalTimes() + \" played\");\n }", "public void selectCloserPlayer(Player[] players){\n Point ball = this.engine.getGameInformation().getBallPosition();\n int diff = 100;\n for ( Player p : players ){\n if( playerOne == null ){\n int resTemp = p.getPosition().getX()-ball.getX() + p.getPosition().getY()-ball.getY() - move;\n if (resTemp < 0 ) resTemp = -resTemp;\n resTemp = resTemp - this.getGameInformation().cells[p.getPosition().getX()][p.getPosition().getY()].playerMoves;\n if ( resTemp < diff ){\n diff = resTemp;\n playerOne = p;\n }\n }else if (p != playerOne){\n int resTemp = (int) p.getPosition().getX()-ball.getX() + p.getPosition().getY()-ball.getY() - move;\n if (resTemp < 0 ) resTemp = -resTemp;\n resTemp = resTemp - this.getGameInformation().cells[(int) p.getPosition().getX()][(int) p.getPosition().getY()].playerMoves;\n if ( resTemp < diff ){\n diff = resTemp;\n playerTwo = p;\n }\n }\n \n }\n }", "public abstract int getSpotsNeeded();", "public void speedRange4()\n\t{\n\t\trange = (gen.nextInt(upper4 - lower4)+1) + lower4;\n\t\tspeedBalloonY4 = range;\n\t}", "public boolean makeVisible(int player) {\n\t\tif (player < 0 || player >= 4) {\n\t\t\treturn false;\n\t\t}\n\t\tshow[player] = true;\n\t\treturn true;\n\t}", "private boolean isInSpawnRange(int spawnChance) {\n\t\t\treturn (spawnChance < spawnRangeMax && spawnChance >= spawnRangeMin);\n\t\t}", "public List<PlayerTeam> display6() {\n List<PlayerTeam> l = new List<PlayerTeam>();\n List<PlayerTeam> all = build();\n int max = 0;\n PlayerTeam curr = all.first();\n while (curr != null) {\n int c = curr.getWinninggoals();\n if (c > max) {// if is a new maximum value, empty the list\n l.clear();\n l.add(curr);\n max = c;\n } else if (c == max) { // if there are more than one maximum value,\n // add it\n l.add(curr);\n }\n curr = all.next();\n }\n return l;\n }", "private boolean checkPoints() {\n\n for (Map.Entry pair : playersAgentsMap.entrySet()) {\n ArrayList<IAgent> iAgentList = (ArrayList<IAgent>) pair.getValue();\n\n int points = 0;\n try {\n points = iPlayerList.get(iAgentList.get(0).getName()).getPoints();\n } catch (RemoteException ex) {\n Logger.getLogger(ServerFrame.class.getName()).log(Level.SEVERE, null, ex);\n }\n try {\n for (Component comp : playerList.getComponents()) {\n if (comp instanceof PlayerPanel) {\n PlayerPanel panel = (PlayerPanel) comp;\n if (panel.getName().equals(iAgentList.get(0).getName())) {\n panel.setPlayerPoints(points);\n }\n }\n\n }\n } catch (RemoteException e1) {\n e1.printStackTrace();\n }\n if (points >= targetAmount) {\n try {\n System.out.println(iAgentList.get(0).getName() + \" has won with \" + points + \" points\");\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n return false;\n }\n }\n\n return true;\n }", "public void selectProtectPlayer(Player[] players){\n int x,xTemp;\n Player playerSelected;\n if( team == 0){\n xTemp = 0;\n for(Player p : players ){\n x = (int) p.getPosition().getX();\n if( x > xTemp && p != playerOne ){\n xTemp = x;\n playerSelected = p;\n }\n }\n playerOne = playerSelected;\n }else{\n xTemp = 14;\n for(Player p : players ){\n x = (int) p.getPosition().getX();\n if( x < xTemp && p != playerOne ){\n xTemp = x;\n playerSelected = p;\n }\n }\n playerOne = playerSelected;\n }\n }", "private String whoIsMVP() {\n int highestValue = 0;\n String mvp = null;\n for (String player : mvpPlayersMap.keySet()) {\n if (highestValue < mvpPlayersMap.get(player)) {\n highestValue = mvpPlayersMap.get(player);\n mvp = player;\n }\n }\n log.info(\"MVP player: {} with {} points\", mvp, highestValue);\n return mvp;\n }", "public int getBound();", "public Range getAudioPortsRange();", "static int SetScore(int p){\n\t\tif (p==1) {\n\t\t\tp1Score=p1Score+4;\n\t\t\tlblp1Score.setText(Integer.toString(p1Score));\n\t\t\t\n\t\t\t//check whether the score reaches to destination score or not..........\n\t\t\t\n\t\t\tif(p1Score>=destinationScore){\n\t\t\t\tfrmCardGame.dispose();\n\t\t\t\tnew EndGame(p,p1Score,destinationScore).setVisible(true);\n\t\t\t}\n\t\t}\n\t\telse if(p==2){\n\t\t\tp2Score=p2Score+4;\n\t\t\tlblp2Score.setText(Integer.toString(p2Score));\n\t\t\t\n\t\t\tif(p2Score>=destinationScore){\n\t\t\t\tfrmCardGame.dispose();\n\t\t\t\tnew EndGame(p,p2Score,destinationScore).setVisible(true);\n\t\t\t}\n\t\t}\n\t\telse if(p==3){\n\t\t\tp3Score=p3Score+4;\n\t\t\tlblp3Score.setText(Integer.toString(p3Score));\n\t\t\t\n\t\t\tif(p3Score>=destinationScore){\n\t\t\t\tfrmCardGame.dispose();\n\t\t\t\tnew EndGame(p,p3Score,destinationScore).setVisible(true);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tp4Score=p4Score+4;\n\t\t\tlblp4Score.setText(Integer.toString(p4Score));\n\t\t\t\n\t\t\tif(p4Score>=destinationScore){\n\t\t\t\tfrmCardGame.dispose();\n\t\t\t\tnew EndGame(p,p4Score,destinationScore).setVisible(true);\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "private void setInfoPlayers() {\n\n\t\t//PLAYER 1\n\t\tlblPlayer1name.setText(players.get(0).getName());\n\t\tlblCashP1.setText(\"\" + players.get(0).getMoney());\n\t\tlblBuildP1.setText(\"\" + players.get(0).getNumberBuildings());\n\t\tlblPropP1.setText(\"\" + players.get(0).getOwnproperties().size());\n\t\tlblPosP1.setText(\"\"+ players.get(0).getPosition());\n\n\t\t//PLAYER 2\n\t\tlblPlayer2name.setText(players.get(1).getName());\n\t\tlblCashP2.setText(\"\" + players.get(1).getMoney());\n\t\tlblBuildP2.setText(\"\" + players.get(1).getNumberBuildings());\n\t\tlblPropP2.setText(\"\" + players.get(1).getOwnproperties().size());\n\t\tlblPosP2.setText(\"\"+ players.get(1).getPosition());\n\t\t\n\t\tif(players.size() > 2){\n\t\t\t//PLAYER 3\n\t\t\tlblPlayerName3.setText(players.get(2).getName());\n\t\t\tlblCashP3.setText(\"\" + players.get(2).getMoney());\n\t\t\tlblBuildP3.setText(\"\" + players.get(2).getNumberBuildings());\n\t\t\tlblPropP3.setText(\"\" + players.get(2).getOwnproperties().size());\n\t\t\tlblPosP3.setText(\"\"+ players.get(2).getPosition());\n\n\t\t\tif(players.size() > 3){\n\t\t\t\t//PLAYER 4\n\t\t\t\tlblPlayerName4.setText(players.get(3).getName());\n\t\t\t\tlblCashP4.setText(\"\" + players.get(3).getMoney());\n\t\t\t\tlblBuildP4.setText(\"\" + players.get(3).getNumberBuildings());\n\t\t\t\tlblPropP4.setText(\"\" + players.get(3).getOwnproperties().size());\n\t\t\t\tlblPosP4.setText(\"\"+ players.get(3).getPosition());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n String player1 = displayHighScorePosition(\"aldi\") + calculateHighScorePosition(1500);\n System.out.println(player1);\n\n String player2 = displayHighScorePosition(\"nana\") + calculateHighScorePosition(900);\n System.out.println(player2);\n\n String player3 = displayHighScorePosition(\"muhrim\") + calculateHighScorePosition(400);\n System.out.println(player3);\n\n String player4 = displayHighScorePosition(\"ununu\") + calculateHighScorePosition(50);\n System.out.println(player4);\n\n }", "private int inputNumPlayers() {\n\t\t\t// set up dialog box\n\t\t\tString[] options = {\"OK\"};\n\t\t\tJPanel panel = new JPanel(new GridLayout(0, 1));\n\t\t\tJLabel lbl = new JLabel(\"How many players? (2-6)\");\n\t\t\tJTextField txt = new JTextField(10);\n\t\t\tpanel.add(lbl);\n\t\t\tpanel.add(txt);\n\t\t\t\n\t\t\t// show dialog box\n\t\t\tJOptionPane.showOptionDialog(frame, panel, \"# Players\",\n\t\t\t\t\tJOptionPane.NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options , options[0]);\n\t\t\tString numPlayersResponse = txt.getText();\n\t\t\t\n\t\t\t// determine input validity\n\t\t\tint numPlayers = 0;\n\t\t\ttry{\n\t\t\t\tnumPlayers = Integer.parseInt(numPlayersResponse);\n\t\t\t\t// check for out of bounds number\n\t\t\t\twhile(numPlayers < 2 || numPlayers > 6){\n\t\t\t\t\tpanel.remove(lbl);\n\t\t\t\t\ttxt.setText(\"\");\n\t\t\t\t\tlbl = new JLabel(\"Invalid number. Must be 2-6 players.\");\n\t\t\t\t\tpanel.add(lbl);\n\t\t\t\t\tJOptionPane.showOptionDialog(frame, panel, \"# Players\",\n\t\t\t\t\t\t\tJOptionPane.NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options , options[0]);\n\t\t\t\t\tnumPlayersResponse = txt.getText();\n\t\t\t\t\tnumPlayers = Integer.parseInt(numPlayersResponse);\n\t\t\t\t}\n\t\t\t} catch(NumberFormatException e){\n\t\t\t\t// player entered nothing or a non-numeric string\n\t\t\t\treturn inputNumPlayers();\n\t\t\t}\n\t\t\treturn numPlayers;\n\t\t}", "public static Integer getDrawsPvP() {\n return humanVsHuman.draws;\n }", "public int getMaximumPlayers() {\n return getOption(ArenaOption.MAXIMUM_PLAYERS);\n }", "public static int GetPlayersLeft () {\n int players_left = 0;\r\n\r\n // LOOK AT EACH PLAYER AND CHECK IF THEY HAVEN'T LOST\r\n for (int i = 0; i < player_count; i++) {\r\n if (!player[i].lost)\r\n players_left++;\r\n }\r\n\r\n // RETURN THE RESULTS\r\n return players_left;\r\n }", "public Integer[] getAllPlayerVisible() {\n\t\treturn playerVisible.toArray(new Integer[playerVisible.size()]);\n\t}", "public int getRange()\n\t{\n\t\treturn Range;\n\t}", "public int getNumPlayers(){\n return m_numPlayers;\n }", "public void setSightRange(int n){\n\tsightRange = n;\n }", "private void displayPlayers() {\n\t\tfor (Player p: game.getPlayers()) {\n\t\t\tview.updateDisplay(p.getId(), p.getDeck().getNumberOfCards());\n\t\t}\n\t}", "@Test\n\tpublic void testLimits() throws DeviceException {\n\t\tsetUpIncrement();\n\t\tdouble lastPos = INITIAL_POSITION;\n\t\tfor (int i = 0; i < 100; i++) {\n\t\t\tfinal double currentPos = (double) monitor.getPosition();\n\t\t\tassertTrue(Math.abs(currentPos - lastPos) > 0.001);\n\t\t\tassertTrue(currentPos - UPPER_LIMIT < 0.001);\n\t\t\tassertTrue(currentPos - LOWER_LIMIT > 0.001);\n\t\t\tlastPos = currentPos;\n\t\t}\n\t}", "public int getMaxPlayers() {\n\t\treturn maxPlayers;\n\t}", "public int getPointsP() {\r\n\r\n pointsP = getPointsPlayer() + getPointsPlayer2();\r\n\r\n if (pointsP >= 10) {\r\n pointsP -= 10;\r\n }\r\n return pointsP;\r\n }", "public int damagedRangeLimit() {\r\n return fDamagedRange[1];\r\n }", "int countPowertypeRanges();", "int getCount(Side player) {\n return player == BLACK ? _countBlack : _countWhite;\n }", "private void sameGroup() {\n if(winningHoleGroup == 0){\n max = 9;\n min = 0;\n }\n if(winningHoleGroup == 1){\n max = 19;\n min = 10;\n }\n if(winningHoleGroup == 2){\n max = 29;\n min = 20;\n }\n if(winningHoleGroup == 3){\n max = 39;\n min = 30;\n }\n if(winningHoleGroup == 4){\n max = 49;\n min = 40;\n }\n }", "public void speedRange1()\n\t{\n\t\trange = (gen.nextInt(upper1 - lower1)+1) + lower1;\n\t\tspeedBalloonY1 = range;\n\t}", "static boolean isNumberInRange(int playerValue, int minBarrier, int maxBarrier) {\n return playerValue > minBarrier && playerValue < maxBarrier;\n }", "@Override\n public void onEntityUpdate() {\n if (!(world.provider instanceof WorldProviderLimbo || world.provider instanceof WorldProviderDungeonPocket)) {\n setDead();\n super.onEntityUpdate();\n return;\n }\n\n super.onEntityUpdate();\n\n // Check for players and update aggro levels even if there are no players in range\n EntityPlayer player = world.getClosestPlayerToEntity(this, MAX_AGGRO_RANGE);\n boolean visibility = player != null && player.canEntityBeSeen(this);\n updateAggroLevel(player, visibility);\n\n // Change orientation and face a player if one is in range\n if (player != null) {\n facePlayer(player);\n if (!world.isRemote && isDangerous()) {\n // Play sounds on the server side, if the player isn't in Limbo.\n // Limbo is excluded to avoid drowning out its background music.\n // Also, since it's a large open area with many Monoliths, some\n // of the sounds that would usually play for a moment would\n // keep playing constantly and would get very annoying.\n playSounds(player.getPosition());\n }\n\n if (visibility) {\n // Only spawn particles on the client side and outside Limbo\n if (world.isRemote && isDangerous()) {\n spawnParticles(player);\n }\n\n // Teleport the target player if various conditions are met\n if (aggro >= MAX_AGGRO && !world.isRemote && ModConfig.monoliths.monolithTeleportation && !player.isCreative() && isDangerous()) {\n aggro = 0;\n Location destination = WorldProviderLimbo.getLimboSkySpawn(player);\n TeleportUtils.teleport(player, destination, 0, 0);\n player.world.playSound(null, player.getPosition(), ModSounds.CRACK, SoundCategory.HOSTILE, 13, 1);\n }\n }\n }\n }", "private Worm getFirstWormInRangeSpecial() {\n \n int count = 0;\n Worm targetWorm = null;\n\n //Jika worm saat ini adalah Agent (bisa menggunakan Banana Bomb)\n if (gameState.myPlayer.worms[1].id == gameState.currentWormId) {\n count = gameState.myPlayer.worms[1].bananaBombs.count;\n int range = gameState.myPlayer.worms[1].bananaBombs.range;\n for (Worm enemyWorm : opponent.worms) {\n\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, enemyWorm.position.x, enemyWorm.position.y) > range) {\n continue;\n }\n if (enemyWorm.health <= 0) {\n continue;\n }\n //AUTO NYERANG WORM YANG PERTAMAKALI DITEMUKAN DI DALAM RANGE\n targetWorm = enemyWorm;\n break;\n }\n\n }\n\n //Jika worm saat ini adalah Technician (bisa menggunakan Snowball)\n if (gameState.myPlayer.worms[2].id == gameState.currentWormId) {\n count = gameState.myPlayer.worms[2].snowballs.count;\n int range = gameState.myPlayer.worms[2].snowballs.range;\n for (Worm enemyWorm : opponent.worms) {\n\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, enemyWorm.position.x, enemyWorm.position.y) > range) {\n continue;\n }\n if (enemyWorm.roundsUntilUnfrozen > 1) {\n continue;\n }\n //AUTO NYERANG WORM YANG PERTAMAKALI DITEMUKAN DI DALAM RANGE\n targetWorm = enemyWorm;\n break;\n }\n\n }\n \n return targetWorm;\n\n }", "public void Players(int blk_limit) // initialize the player objects\n {\n player1_blocks = new int[blk_limit][2]; // initialize the blocks\n player2_blocks = new int[blk_limit][2]; // initialize the blocks\n\n p1_score = 0; // initialize player scores\n p2_score = 0;\n \n p1_steps = 0; // initialize steps\n p2_steps = 0;\n }", "public static int getNumPlayers(){\n\t\treturn numPlayers;\n\t}", "public int getNoOfPlayers()\r\n\t{\r\n\t\tString noOfPlayers = JOptionPane.showInputDialog(null, \"Please enter the number of players from 1-6\", \"Number of Players\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t//Check to see if the entry was invalid\r\n\t\twhile(!isNumber(noOfPlayers) || Integer.parseInt(noOfPlayers) < 1 || Integer.parseInt(noOfPlayers) > 6)\r\n\t\t{\r\n\t\t\tif(!isNumber(noOfPlayers))\r\n\t\t\t\tnoOfPlayers = JOptionPane.showInputDialog(null, \"You must enter a NUMBER. Please re-enter the number of players from 1-6\", \"NUMBER of Players\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\telse\r\n\t\t\t\tnoOfPlayers = JOptionPane.showInputDialog(null, \"Please re-enter the number of players from 1-6\", \"Players must be between 1 and 6\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t}\r\n\t\t\r\n\t\treturn Integer.parseInt(noOfPlayers);\r\n\t}" ]
[ "0.66138095", "0.62253445", "0.61169076", "0.60208744", "0.59651345", "0.59561914", "0.5892633", "0.58302265", "0.5802618", "0.5775047", "0.5749974", "0.5714175", "0.57038385", "0.57017195", "0.56637144", "0.56634766", "0.5637406", "0.5622062", "0.55832094", "0.55800796", "0.5545237", "0.5544183", "0.55380976", "0.5535026", "0.55216277", "0.5500134", "0.5495126", "0.54766876", "0.54689616", "0.5467246", "0.54627156", "0.54572403", "0.5447974", "0.54466504", "0.5438526", "0.543021", "0.5427954", "0.53909713", "0.5389525", "0.5388138", "0.536834", "0.5351462", "0.5331915", "0.5309121", "0.5302608", "0.53020793", "0.52935916", "0.5282067", "0.5278221", "0.52658635", "0.52556205", "0.5251806", "0.5251542", "0.5248442", "0.5247378", "0.5240788", "0.5240264", "0.52367747", "0.52274406", "0.5220801", "0.52183425", "0.5210932", "0.5208851", "0.52087456", "0.52070975", "0.5191148", "0.5190301", "0.5181957", "0.51815695", "0.5178776", "0.51635927", "0.51563895", "0.51540726", "0.5151162", "0.51462346", "0.5141462", "0.5140479", "0.5138311", "0.5134485", "0.51337487", "0.5129923", "0.5126518", "0.51041704", "0.5101932", "0.50938", "0.5073082", "0.50670725", "0.50656253", "0.50603694", "0.5059714", "0.5053472", "0.505166", "0.5051465", "0.50501585", "0.50499576", "0.50478554", "0.5041225", "0.5038442", "0.5038258", "0.5038243", "0.50357044" ]
0.0
-1
hardcoded for now just to prove it works, which it does.
@RequestMapping(value = "createSwapItem", method = RequestMethod.POST) public @ResponseBody String createSwapItem( @RequestParam(value = "description", required = false, defaultValue = "DEFAULT DESC") String description, @RequestParam(value = "owner", required = false, defaultValue = "DEFAULT OWNER") String owner, @RequestParam(value = "summary", required = false, defaultValue = "DEFAULT SUMMARY") String summary, @RequestParam(value = "location", required = false, defaultValue = "DEFAULT LOCATION") String location) { SwapItem item = new SwapItem(); item.setDescription(description); item.setOwner(owner); item.setSummary(summary); item.setLocation(location); item.setPostedOn(new Date()); item.setExpiresAfter(new Date(System.currentTimeMillis() + 600000L)); dao.insert(item); return item.toDbObject().toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean func_70814_o() { return true; }", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "private void m50366E() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "protected boolean func_70041_e_() { return false; }", "public void method_4270() {}", "public boolean method_2453() {\r\n return false;\r\n }", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "public boolean method_2434() {\r\n return false;\r\n }", "private void kk12() {\n\n\t}", "public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }", "public boolean method_4088() {\n return false;\n }", "public void m9741j() throws cf {\r\n }", "public boolean method_4132() {\n return false;\n }", "@Override\n public int retroceder() {\n return 0;\n }", "public boolean method_4093() {\n return false;\n }", "private void test() {\n\n\t}", "public boolean method_218() {\r\n return false;\r\n }", "public boolean method_216() {\r\n return false;\r\n }", "private void m50367F() {\n }", "private static void cajas() {\n\t\t\n\t}", "public void mo21792Q() {\n }", "public void mo38117a() {\n }", "public void smell() {\n\t\t\n\t}", "public void m23075a() {\n }", "public abstract void mo70713b();", "@Override\n public void perish() {\n \n }", "public final void mo91715d() {\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n Type type0 = Type.CHAR_TYPE;\n Class<Integer> class0 = Integer.class;\n Class<Object> class1 = Object.class;\n Type.getType(class1);\n Type.getType(class0);\n Type.getObjectType(\"The prefix must not be null\");\n Type type1 = Type.INT_TYPE;\n int[] intArray0 = new int[6];\n intArray0[0] = 4;\n type1.getDescriptor();\n intArray0[1] = 2;\n intArray0[2] = 7;\n intArray0[3] = 4;\n intArray0[4] = 1;\n intArray0[5] = 0;\n frame0.inputStack = intArray0;\n Item item0 = classWriter0.newFieldItem(\"%B\\\"F$,FHLc-:\", \"The prefix must not be null\", \"The prefix must not be null\");\n classWriter1.toByteArray();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n // Undeclared exception!\n try { \n frame0.execute(192, 4, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public boolean method_4102() {\n return false;\n }", "private test5() {\r\n\t\r\n\t}", "private stendhal() {\n\t}", "void m5770d() throws C0841b;", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n public int describeContents() { return 0; }", "public boolean method_1456() {\r\n return true;\r\n }", "public boolean method_108() {\r\n return false;\r\n }", "void m5771e() throws C0841b;", "public boolean method_3897() {\r\n return false;\r\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[1] = type1;\n Type type2 = Type.DOUBLE_TYPE;\n typeArray0[2] = type2;\n Type type3 = Type.INT_TYPE;\n typeArray0[3] = type3;\n Type type4 = Type.VOID_TYPE;\n typeArray0[4] = type4;\n Type type5 = Type.BOOLEAN_TYPE;\n typeArray0[5] = type5;\n Type type6 = Type.FLOAT_TYPE;\n typeArray0[6] = type6;\n Type type7 = Type.SHORT_TYPE;\n type2.toString();\n typeArray0[7] = type7;\n Class<Integer> class0 = Integer.class;\n Type.getType(class0);\n Type[] typeArray1 = new Type[1];\n typeArray1[0] = type0;\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n Type.getMethodDescriptor(type1, typeArray1);\n ClassWriter classWriter0 = new ClassWriter(174);\n Item item0 = classWriter0.newConstItem(\"\");\n // Undeclared exception!\n try { \n frame0.execute(3, 2, (ClassWriter) null, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public void func_70305_f() {}", "private void strin() {\n\n\t}", "boolean test() {\n return false; // REPLACE WITH SOLUTION\n }", "public boolean method_208() {\r\n return false;\r\n }", "@Test\n public void test27() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1348,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test27\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode(\"\");\n iIOMetadataNode0.getNodeValue();\n Iterator<?> iterator0 = IteratorUtils.getIterator((Object) null);\n assertEquals(false, iterator0.hasNext());\n }", "public void mo21877s() {\n }", "public void mo12628c() {\n }", "public void mo1976s() throws cf {\r\n }", "public boolean method_109() {\r\n return true;\r\n }", "C3579d mo19679F() throws IOException;", "private void level7() {\n }", "private final void i() {\n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "void m1864a() {\r\n }", "public boolean method_194() {\r\n return false;\r\n }", "public boolean func_145773_az() { return true; }", "void m5769c() throws C0841b;", "public abstract void mo56925d();", "public void mo21787L() {\n }", "public int method_113() {\r\n return 0;\r\n }", "public boolean method_210() {\r\n return false;\r\n }", "zzafe mo29840Y() throws RemoteException;", "@Override public int describeContents() { return 0; }", "public int method_209() {\r\n return 0;\r\n }", "void m5768b() throws C0841b;", "public void mo21779D() {\n }", "public void mo23813b() {\n }", "@Test\n\tpublic void testEvilPuzzleGeneration() {\n\t}", "public void mo21785J() {\n }", "public void mo12930a() {\n }", "public boolean method_196() {\r\n return false;\r\n }", "public abstract int mo9754s();", "public abstract void mo27385c();", "public void mo1964g() throws cf {\r\n }", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n JSTerm jSTerm0 = new JSTerm();\n String string0 = \"not\";\n jSTerm0.add((Object) \"not\");\n // Undeclared exception!\n try { \n jSTerm0.clonePF();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1 >= 1\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "public final void mo8775b() {\n }", "public void mo1962e() throws cf {\r\n }", "public abstract void mo6549b();", "public void test5() {\n\t\t\n\t}", "public void mo21878t() {\n }", "@Test\n\tpublic void test04() throws Throwable {\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Test(timeout = 4000)\n public void test059() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-2450));\n String[] stringArray0 = new String[3];\n stringArray0[0] = \" u]{2y%.,\";\n stringArray0[1] = \" u]{2y%.,\";\n stringArray0[2] = \"+#`s5#[1e3xKfl3\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 889, \"byte\", \"oc[MfnZM[~MHOK iO\", \"+#`s5#[1e3xKfl3\", stringArray0, false, false);\n Object object0 = new Object();\n methodWriter0.visitFrame(889, 2, stringArray0, 2, stringArray0);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, true);\n methodWriter0.visitTypeInsn(2, \"byte\");\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, true, true);\n methodWriter0.visitFrame((-525), (-1274), stringArray0, 458, stringArray0);\n assertEquals(3, stringArray0.length);\n }", "@Test public void test_4() throws Exception {\n yetihelper.Helper v76=new yetihelper.Helper(); // time:1355223203509\n int v77=-2147483647; // time:1355223203509\n java.lang.Integer v78=v76.dummyInteger((int)v77); // time:1355223203509\n material.Square v79=new material.Square((java.lang.Integer)v78,(java.lang.Integer)v78); // time:1355223203509\n java.lang.Integer v80=v79.getRow(); // time:1355223203509\n material.Square v286=new material.Square((java.lang.Integer)v80,(java.lang.Integer)null); // time:1355223203642\n int v2252=v286.hashCode();\n /**BUG FOUND: RUNTIME EXCEPTION**/ // time:1355223207190\n /**YETI EXCEPTION - START \n java.lang.NullPointerException\n \tat material.Square.hashCode(Square.java:49)\n YETI EXCEPTION - END**/ \n /** original locs: 4674 minimal locs: 7**/\n \n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180370));\n String string0 = \"H\";\n classWriter0.addType(\"H\");\n FileSystemHandling.shouldAllThrowIOExceptions();\n String string1 = \"Fj)3/|(;sZXz$\";\n boolean boolean0 = false;\n String string2 = null;\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"H\";\n stringArray0[1] = \"<inat>\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1983180370), \"<inat>\", \"Fj)3/|(;sZXz$\", (String) null, stringArray0, false, true);\n methodWriter0.visitVarInsn(191, (-1725718076));\n int int0 = 176;\n methodWriter0.visitInsn(176);\n Integer integer0 = new Integer(2);\n Label label0 = new Label();\n Label label1 = label0.successor;\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n // Undeclared exception!\n try { \n label0.visitSubroutine((Label) null, (-672L), 813);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -1\n //\n verifyException(\"org.objectweb.asm.jip.Label\", e);\n }\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer1);\n jSTerm0.add((Object) null);\n // Undeclared exception!\n try { \n jSTerm0.clonePF();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"umd.cs.shop.JSPredicateForm\", e);\n }\n }", "private void poetries() {\n\n\t}", "public abstract void mo27386d();", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter((-4015));\n String string0 = \"+t1`X]_2(_63\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", (String[]) null, false, true);\n Label label0 = new Label();\n Label label1 = label0.getFirst();\n Label[] labelArray0 = new Label[1];\n labelArray0[0] = label1;\n methodWriter0.visitTableSwitchInsn(14, 1, label1, labelArray0);\n methodWriter0.visitAnnotationDefault();\n String string1 = \"qBd*JX4Q%HiR1LZ\";\n methodWriter0.visitTypeInsn(57, \"qBd*JX4Q%HiR1LZ\");\n MethodWriter methodWriter1 = classWriter0.lastMethod;\n MockFileInputStream mockFileInputStream0 = null;\n try {\n mockFileInputStream0 = new MockFileInputStream((File) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.evosuite.runtime.mock.java.io.MockFileInputStream\", e);\n }\n }", "static void feladat9() {\n\t}", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[9];\n defaultNucleotideCodec0.toString(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n Nucleotide nucleotide0 = Nucleotide.Pyrimidine;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray1 = defaultNucleotideCodec1.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec2.toString(byteArray1);\n defaultNucleotideCodec2.toString(byteArray1);\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.getUngappedOffsetFor((byte[]) null, 12);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.nio.ByteBuffer\", e);\n }\n }", "public boolean method_198() {\r\n return false;\r\n }", "public void test17_33() throws Exception {\n helperPass(new String[] { \"p.Foo\" }, \"getX\", \"p.Foo\", 14, 17, 14, 21);\n }", "public boolean method_214() {\r\n return false;\r\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.spliterator();\n Range.Builder range_Builder0 = new Range.Builder(range0);\n range_Builder0.expandEnd((-4622L));\n Object object0 = new Object();\n range0.equals(object0);\n range0.toString();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n range_Builder0.expandBegin((-4622L));\n range0.equals((Object) null);\n String string0 = null;\n // Undeclared exception!\n try { \n Range.CoordinateSystem.valueOf(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.CoordinateSystem.\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(32767);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"%%N)&#pn7Z\", \"%%N)&#pn7Z\", \"Label offset position has not been resolved yet\", (String[]) null, false, true);\n Label label0 = new Label();\n Object object0 = new Object();\n methodWriter0.visitLocalVariable(\"Label offset position has not been resolved yet\", \"Label offset position has not been resolved yet\", \"StackMapTable\", label0, label0, 1);\n MethodWriter methodWriter1 = null;\n try {\n methodWriter1 = new MethodWriter(classWriter0, 3928, \"&h'pH__a\", \"double\", \"StackMapTable\", (String[]) null, false, true);\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "void mo57277b();", "public abstract String mo13682d();" ]
[ "0.61948025", "0.61231744", "0.57960784", "0.57669663", "0.5701848", "0.5690428", "0.5654557", "0.5605337", "0.5583384", "0.5567899", "0.55195296", "0.55165184", "0.55090696", "0.5507051", "0.5448025", "0.54053646", "0.5396756", "0.5386292", "0.5308173", "0.52942675", "0.5288587", "0.52801955", "0.5279421", "0.5275295", "0.5273412", "0.5266177", "0.5264779", "0.5261483", "0.5243177", "0.5238556", "0.52338004", "0.5233339", "0.5231925", "0.5227446", "0.52150637", "0.5211129", "0.5210798", "0.5210412", "0.52051175", "0.52002263", "0.51991916", "0.51932085", "0.5188699", "0.518509", "0.51842445", "0.51765656", "0.5174325", "0.5173236", "0.5168135", "0.5153937", "0.51501304", "0.51476103", "0.51384693", "0.5131881", "0.512875", "0.5122548", "0.51218355", "0.51205087", "0.5117435", "0.51109105", "0.5109728", "0.51093453", "0.51048064", "0.50981706", "0.5089702", "0.5085563", "0.50850457", "0.5076424", "0.50718457", "0.50700116", "0.5062545", "0.50620633", "0.5058571", "0.5057662", "0.5057504", "0.5054277", "0.505335", "0.5053213", "0.5051044", "0.50505227", "0.5049964", "0.5046745", "0.5045279", "0.50438106", "0.50376874", "0.5035566", "0.5032449", "0.5029869", "0.5029041", "0.50284886", "0.5026132", "0.50258124", "0.5020948", "0.5019858", "0.5019303", "0.50128543", "0.5009406", "0.50067323", "0.50048786", "0.5002659", "0.5002331" ]
0.0
-1
Reset the database delete all the crap data and start over.
@RequestMapping("reset") public @ResponseBody String resetDB() { StringBuffer buffer = new StringBuffer(); List<SwapItem> items = dao.findAll(); for (SwapItem item : items) { int result = dao.delete(item); buffer.append(result).append(" / "); } return buffer.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetDB()\n\t{\n\t\tshutdown();\n\t\t\n\t\tif(Files.exists(m_databaseFile))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tFiles.deleteIfExists(m_databaseFile);\n\t\t\t} catch (IOException e)\n\t\t\t{\n\t\t\t}\n\t\t}\n\t\t\n\t\tloadDatabase();\n\t\tupdateCommitNumber();\n\t\tupdateDatabase();\n\t}", "private static void clearDB()\n {\n if(getStatus().equals(\"no database\"))\n return;\n\n clearTable(\"myRooms\");\n clearTable(\"myReservations\");\n }", "public void clearDatabase() {\n\t\tstudentRepository.deleteAll();\n\t}", "@Override\r\n\tpublic void clearDatabase() {\n\t\t\r\n\t}", "public void clearDatabase() {\n\n\t\tObjectSet<Article> articles = db.query(Article.class);\n\t\tarticles.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<CreditCard> creditCards = db.query(CreditCard.class);\n\t\tcreditCards.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<Customer> customers = db.query(Customer.class);\n\t\tcustomers.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<Order> orders = db.query(Order.class);\n\t\torders.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<OrderDetail> orderDetails = db.query(OrderDetail.class);\n\t\torderDetails.stream()\n\t\t\t.forEach(db::delete);\n\t\t\n\t\tSystem.out.println(\"\\nBase de dades esborrada per complet\");\n\t}", "public void clearDatabase();", "public void clearDatabase(){\n\t\tem.createNativeQuery(\"DELETE FROM CAMINHO\").executeUpdate();\r\n\t\tem.createNativeQuery(\"DELETE FROM MAPA\").executeUpdate();\r\n\t\t\r\n\t\tlog.info(\"Limpou a base de dados\");\r\n\t\r\n\t}", "private void clearAllDatabases()\n\t{\n\t\tdb.clear();\n\t\tstudent_db.clear();\n\t}", "public void resetDB(SQLiteDatabase db) {\n db.execSQL(SQL_DELETE_ENTRIES);\n onCreate(db);\n }", "public void setUp() {\n deleteTheDatabase();\n }", "public void setUp() {\n deleteTheDatabase();\n }", "public void clearDatabase() {\n new ExecutionEngine(this.database).execute(\"MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE r, n\");\n }", "public void wipeDB() {\n\t\tSQLiteDatabase db = nodeData.getReadableDatabase();\n\t\tdb.delete(EventDataSQLHelper.TABLE, null, null);\n\t\tdb.close();\n }", "@AfterEach\n\tvoid clearDatabase() {\n\t\t//Clear the table\n\t\taccountRepository.deleteAll();\n\t}", "public void wipeDatabaseData() {\n\t\tdbHelper.onUpgrade(database, 0, 1);\n\t}", "public void resetStore() {\n try {\n db.close();\n uncommited = null;\n uncommitedDeletes = null;\n autoCommit = true;\n bloom = new BloomFilter();\n utxoCache = new LRUCache(openOutCache, 0.75f);\n } catch (IOException e) {\n log.error(\"Exception in resetStore.\", e);\n }\n\n File f = new File(filename);\n if (f.isDirectory()) {\n for (File c : f.listFiles())\n c.delete();\n }\n openDB();\n }", "public void resetTables() {\n SQLiteDatabase db = this.getWritableDatabase();\n // Delete All Rows\n db.delete(TABLE_LOGIN, null, null);\n db.close();\n }", "public static void reset() {\n Set<Map.Entry<Class<?>, DatabaseDefinition>> entrySet = globalDatabaseHolder.databaseClassLookupMap.entrySet();\n for (Map.Entry<Class<?>, DatabaseDefinition> value : entrySet) {\n value.getValue().reset(getContext());\n }\n globalDatabaseHolder.reset();\n loadedModules.clear();\n }", "private static void resetDatabase() throws DataStoreException{\n\n try{\n if ( ! Configuration.isConfigured() ){\n URL testFile = MySQLConnectorTest.class.getResource(\"test.conf\");\n Configuration.load(new File(testFile.toURI()));\n }\n loadDBConfiguration();\n } catch (NotConfiguredException | URISyntaxException | IOException e) {\n //If we get here we are unable to load the configuration file, so test setup is wrong.\n throw new RuntimeException(e);\n }\n\n try(\n Connection conn = DriverManager.getConnection(\"jdbc:mysql://\" + host + \":\" +\n port + \"/\" + database + \"?user=\" +\n username + \"&password=\" + password +\n \"&default-character-set=utf8\") ){\n\n Statement resetStatement = conn.createStatement();\n for(String statement: sqlResetBatch){\n resetStatement.addBatch(statement);\n }\n for(String statement: sqlInsertBatch){\n resetStatement.addBatch(statement);\n }\n resetStatement.executeBatch();\n\n MySQLConnector.getInstance().invalidateCaches();\n } catch (SQLException | NotConfiguredException | ConnectionException e){\n //If we get here we are unable to load the configuration file, so test setup is wrong.\n throw new RuntimeException(e);\n }\n }", "public void emptyDb() {\n\t\tgetReadableDatabase().execSQL(\"DELETE FROM \" + TABLE_ABSTRACT_DETAILS);\n\t}", "@Override\n public void clearDB() throws Exception {\n hBaseOperation.deleteTable(this.dataTableNameString);\n hBaseOperation.createTable(this.dataTableNameString, this.columnFamily, numRegion);\n }", "public void resetTables(){\r\n try {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n // Delete All Rows\r\n db.delete(User.TABLE_USER_NAME, null, null);\r\n db.close();\r\n }catch(SQLiteDatabaseLockedException e){\r\n e.printStackTrace();\r\n }\r\n }", "public void resetAppData() {\n this.materials = new ArrayList<String>();\n this.shoplistGroc = new ArrayList<String>();\n this.shopListMat = new ArrayList<String>();\n this.pantry = new ArrayList<String>();\n this.unassignedChores = new ArrayList<Chore>();\n this.finishedChores = new ArrayList<Chore>();\n this.regUsers= new ArrayList<User>();\n this.adminUsers= new ArrayList<AdminUser>();\n this.currentUserId = 0;\n this.serialNumber = 1;\n }", "public void clearTheDB(boolean logout) {\n\n // NOTE : I didn't use \"TableUtils.clearTable\" as the ORMLite library author advising not to use it\n // and use Drop & Create instead for some auto-increment issues he is not sure of\n try {\n // first drop all of the tables\n TableUtils.dropTable(connectionSource, Cards.class, true);\n\n // then create all of them again\n TableUtils.createTable(connectionSource, Cards.class);\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@After\n public void clearup() {\n try {\n pm.close();\n DriverManager.getConnection(\"jdbc:derby:memory:test_db;drop=true\");\n } catch (SQLException se) {\n if (!se.getSQLState().equals(\"08006\")) {\n // SQLState 08006 indicates a success\n se.printStackTrace();\n }\n }\n }", "public void resetAll() {\n reset(getAll());\n }", "public void removeAll()\r\n {\n db = this.getWritableDatabase(); // helper is object extends SQLiteOpenHelper\r\n db.execSQL(\"drop table \"+\"campaing\");\r\n db.execSQL(\"drop table \"+\"cafe\");\r\n db.execSQL(\"drop table \"+\"points\");\r\n\r\n db.close ();\r\n }", "private void reset() {\n //todo test it !\n longitude = 0.0;\n latitude = 0.0;\n IDToday = 0L;\n venVolToday = 0L;\n PM25Today = 0;\n PM25Source = 0;\n DBCanRun = true;\n DBRunTime = 0;\n isPMSearchRunning = false;\n isLocationChanged = false;\n isUploadRunning = false;\n refreshAll();\n locationInitial();\n DBInitial();\n sensorInitial();\n }", "@Override\n public void setUp() {\n deleteTheDatabase();\n }", "public void setUp() throws Exception {\t\t\t\t\t\n\t\tDatabase.reset();\n\t}", "@Before\n public void setUp() {\n //clearDbData();//having some trouble\n }", "@BeforeEach\n @AfterEach\n public void clearDatabase() {\n \taddressRepository.deleteAll();\n \tcartRepository.deleteAll();\n \tuserRepository.deleteAll();\n }", "@Override\n\tpublic void clearDBRisposte() {\n\t\tDB db = getDB();\n\t\tMap<Long, Risposta> risposte = db.getTreeMap(\"risposte\");\n\t\trisposte.clear();\n\t\tdb.commit();\n\t}", "public static boolean resetDB(Context context) {\n openDBIfClosed(context);\n try {\n mMetaDb.execSQL(\"DROP TABLE IF EXISTS languages;\");\n Log.i(AnkiDroidApp.TAG, \"Resetting all language assignment\");\n mMetaDb.execSQL(\"DROP TABLE IF EXISTS whiteboardState;\");\n Log.i(AnkiDroidApp.TAG, \"Resetting whiteboard state\");\n mMetaDb.execSQL(\"DROP TABLE IF EXISTS customDictionary;\");\n Log.i(AnkiDroidApp.TAG, \"Resetting custom Dictionary\");\n mMetaDb.execSQL(\"DROP TABLE IF EXISTS widgetStatus;\");\n Log.i(AnkiDroidApp.TAG, \"Resetting widget status\");\n mMetaDb.execSQL(\"DROP TABLE IF EXISTS smallWidgetStatus;\");\n Log.i(AnkiDroidApp.TAG, \"Resetting small widget status\");\n mMetaDb.execSQL(\"DROP TABLE IF EXISTS intentInformation;\");\n Log.i(AnkiDroidApp.TAG, \"Resetting intentInformation\");\n upgradeDB(mMetaDb, DATABASE_VERSION);\n return true;\n } catch (Exception e) {\n Log.e(\"Error\", \"Error resetting MetaDB \", e);\n }\n return false;\n }", "@After\n public void cleanDatabase() {\n\n databaseInstance.setTaxpayersArrayList(new ArrayList<Taxpayer>());\n }", "private void cleanDB() {\n // the database will contain a maximum of MAX_DB_SIZE wallpapers (default N=50)\n // when the db gets bigger then N, the oldest wallpapers are deleted from the database\n // the user will set if he wants to delete also the wallpaper or the database entry only\n if (maxDbSize != -1 && getOldWallpapersID().size() > maxDbSize) {\n try (ResultSet rs = db.executeQuery(\"SELECT wp FROM WALLPAPERS ORDER BY date FETCH FIRST 20 PERCENT ROWS ONLY\")) {\n while (!keepWallpapers && rs.next()) {\n Wallpaper wp = (Wallpaper) rs.getObject(\"wp\");\n log.log(Level.FINEST, wp::toString);\n log.log(Level.FINE, () -> \"Cleaning of DB, removing \" + wp.getID());\n\n new File(wp.getPath()).delete();\n }\n db.executeUpdate(\"DELETE FROM WALLPAPERS WHERE id IN (SELECT id FROM WALLPAPERS ORDER BY date fetch FIRST 20 PERCENT rows only)\");\n\n } catch (SQLException throwables) {\n log.log(Level.WARNING, \"Query Error in cleanDB()\");\n log.log(Level.FINEST, throwables.getMessage());\n }\n }\n }", "public void setUp() {\n deleteAllRecords();\n }", "public void resetData() {\n user = new User();\n saveData();\n }", "public void clearDatabase(SQLiteDatabase db) {\n dropTables(db);\n createTables(db);\n }", "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 }", "public synchronized void resetOrdenDBList() {\n ordenDBList = null;\n }", "public void resetCigs() {\n user.resetCigs();\n saveData();\n }", "public void reset () {\n lastSave = count;\n count = 0;\n }", "public void reset(){\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm -r data/games_module\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"sed -i \\\"1s/.*/ \"+\"0\"+\" /\\\" data/winnings\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"sed -i \\\"1s/.*/ \"+\"175\"+\" /\\\" data/tts_speed\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/answered_questions\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/five_random_categories\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/current_player\");\n\t\t_currentPlayer = null;\n\t\t_internationalUnlocked = false;\n\t\t_gamesData.clear();\n\t\t_fiveRandomCategories.clear();\n\t\tfor (int i= 0; i<5;i++) {\n\t\t\t_answeredQuestions[i]=0;\n\t\t}\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/answered_questions\");\n\t\tinitialiseCategories();\n\t\ttry {\n\t\t\treadCategories();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsetFiveRandomCategories();\n\t}", "private void clearData() {\r\n em.createQuery(\"delete from MonitoriaEntity\").executeUpdate();\r\n }", "public void clean() {\r\n\t\t\r\n\t\tlogger.trace(\"Enter clean\");\r\n\t\t\r\n\t\tdata.clear();\r\n\t\tfireTableDataChanged();\r\n\t\t\r\n\t\tlogger.trace(\"Exit clean\");\r\n\t}", "private void clearData() {\n em.createQuery(\"delete from ViajeroEntity\").executeUpdate();\n }", "@After\n public void tearDown() throws Exception {\n File dbFile = new File(\"./data/clinicmate.h2.db\");\n dbFile.delete();\n dbFile = new File(\"./data/clinicmate.trace.db\");\n dbFile.delete();\n }", "public void reset() {\n serverReset(game.generateUIDs(data.getObjectCount()));\n }", "public void resetContactsTable(){\r\n try {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n // Delete All Rows\r\n db.delete(Contacts.TABLE_CONTACTS, null, null);\r\n db.close();\r\n }catch(SQLiteDatabaseLockedException e){\r\n e.printStackTrace();\r\n }\r\n }", "private void resetAll() {\n resetResources();\n resetStory();\n refresh();\n }", "private void reset() {\n\t\tdata.clear();\n\t}", "@Override\n\tpublic void resetData() throws Exception {\n\t\tDataSource dataSource = (DataSource)context.getBean(\"dataSource\");\n\t\tConnection dbconn = dataSource.getConnection();\n\t\t\n\t\tStatement stmt = dbconn.createStatement();\n\t\t//stmt.executeUpdate(\"CREATE TABLE RENTALS(RENTAL_ID BIGINT, RENTAL_RENTALDATE TIMESTAMP, RENTAL_RENTALDAYS INTEGER,USER_ID BIGINT,MOVIE_ID BIGINT)\");\n\t\t\n\t\tstmt.executeUpdate(\"DROP TABLE ROLES IF EXISTS\");\n\t\tstmt.executeUpdate(\"DROP TABLE RENTALS IF EXISTS\");\n\t\tstmt.executeUpdate(\"DROP TABLE MOVIES IF EXISTS\");\n\t\tstmt.executeUpdate(\"DROP TABLE USERS IF EXISTS\");\n\t\tstmt.executeUpdate(\"DROP TABLE PRICECATEGORIES IF EXISTS\");\n\t\tstmt.executeUpdate(\"CREATE MEMORY TABLE USERS(USER_ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,\" +\n\t\t\t\t\"USER_EMAIL VARCHAR(255),\" +\n\t\t\t\t\"USER_FIRSTNAME VARCHAR(255),\" +\n\t\t\t\t\"USER_NAME VARCHAR(255))\");\n\t\tstmt.executeUpdate(\"CREATE MEMORY TABLE PRICECATEGORIES(PRICECATEGORY_ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,\" +\n\t\t\t\t\"PRICECATEGORY_TYPE VARCHAR(255))\");\n\t\tstmt.executeUpdate(\"CREATE MEMORY TABLE MOVIES(MOVIE_ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,MOVIE_RELEASEDATE TIMESTAMP,MOVIE_TITLE VARCHAR(255),MOVIE_RENTED BOOLEAN,PRICECATEGORY_FK BIGINT,CONSTRAINT FK_CATEGORY FOREIGN KEY(PRICECATEGORY_FK) REFERENCES PRICECATEGORIES(PRICECATEGORY_ID))\");\n\t\tstmt.executeUpdate(\"CREATE MEMORY TABLE RENTALS(RENTAL_ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,RENTAL_RENTALDATE TIMESTAMP,RENTAL_RENTALDAYS INTEGER,USER_ID BIGINT,MOVIE_ID BIGINT,CONSTRAINT FK_USER FOREIGN KEY(USER_ID) REFERENCES USERS(USER_ID),CONSTRAINT FK_MOVIE FOREIGN KEY(MOVIE_ID) REFERENCES MOVIES(MOVIE_ID))\");\n\t\tstmt.executeUpdate(\"CREATE MEMORY TABLE ROLES(ROLE_ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,ROLE_ROLENAME VARCHAR(255),USER_ID BIGINT,CONSTRAINT FK67A8EBDC52137E1 FOREIGN KEY(USER_ID) REFERENCES USERS(USER_ID))\");\n\n\t\tIDatabaseConnection connection = new DatabaseConnection(dbconn);\n\t\tDatabaseConfig config = connection.getConfig();\n\t\tconfig.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY,\n\t\t\t\tnew HsqldbDataTypeFactory());\n\t\t\n\t\tInputStream stream = getClass().getResourceAsStream(\"dataset.xml\");\n\t\t\n\t\tFlatXmlDataSetBuilder builder = new FlatXmlDataSetBuilder();\n\t\tIDataSet dataSet = builder.build(stream);\n \n\t\ttry {\n\t\t\tDatabaseOperation.CLEAN_INSERT.execute(connection, dataSet);\n\t\t} finally {\n\t\t\tconnection.close();\n\t\t}\n\t}", "private void reset()\r\n {\r\n log.info(\"{0}: Resetting cache\", logCacheName);\r\n\r\n try\r\n {\r\n storageLock.writeLock().lock();\r\n\r\n if (dataFile != null)\r\n {\r\n dataFile.close();\r\n }\r\n\r\n final File dataFileTemp = new File(rafDir, fileName + \".data\");\r\n Files.delete(dataFileTemp.toPath());\r\n\r\n if (keyFile != null)\r\n {\r\n keyFile.close();\r\n }\r\n final File keyFileTemp = new File(rafDir, fileName + \".key\");\r\n Files.delete(keyFileTemp.toPath());\r\n\r\n dataFile = new IndexedDisk(dataFileTemp, getElementSerializer());\r\n keyFile = new IndexedDisk(keyFileTemp, getElementSerializer());\r\n\r\n this.recycle.clear();\r\n this.keyHash.clear();\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Failure resetting state\", logCacheName, e);\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n }", "private static void removeDB()\n {\n if(getStatus().equals(\"no database\"))\n return;\n\n dropTable(\"myRooms\");\n dropTable(\"myReservations\");\n }", "public void reset() {\n\t\ttry {\n\t\ttr.reset();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Exception when reset the table reader\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@SuppressLint(\"WrongConstant\")\n public void cleanDB(View view) {\n\n SQLiteDatabase CDB = openOrCreateDatabase(\n \"CDB.db\"\n , SQLiteDatabase.CREATE_IF_NECESSARY\n , null\n );\n\n CDB.execSQL(\"DROP TABLE IF EXISTS t_Anglais\");\n CDB.execSQL(\"DROP TABLE IF EXISTS t_Allemand\");\n CDB.execSQL(\"DROP TABLE IF EXISTS t_Espagnol\");\n\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor EDITOR = preferences.edit();\n EDITOR.putBoolean(\"FST_LAUNCH\", true);\n EDITOR.putString(\"TAG_LIST\", \"EMPTY_NULL\");\n EDITOR.putBoolean(\"NEED_UPD_01\", true);\n EDITOR.commit();\n\n Intent i = new Intent ( this, LoadingScreenDisplay.class );\n startActivity( i );\n finish();\n\n }", "private void resetAll() // resetAll method start\n\t{\n\t\theader.reset();\n\t\tdebit.reset();\n\t\tcredit.reset();\n\t}", "void flushDB();", "public void clearDB() {\n String[] collections = {\"reviews\", \"products\", \"orders\", \"users\"};\n MongoClient mongoClient = null;\n try {\n mongoClient = getConnectionClient();\n MongoDatabase mongoDBConnect = mongoClient.getDatabase(\"cart\");\n mongoDBConnect.drop();\n mongoDBConnect = mongoClient.getDatabase(\"cart\");\n for (String collectionsToMake : collections) {\n mongoDBConnect.createCollection(collectionsToMake);\n MongoCollection<Document> collection = mongoDBConnect.getCollection(collectionsToMake);\n if (collectionsToMake.equals(\"reviews\")) {\n Document uniqueIndex = new Document(\"review_id\", 1);\n collection.createIndex(uniqueIndex, new IndexOptions().unique(true));\n } else if (collectionsToMake.equals(\"products\")) {\n Document uniqueIndex = new Document(\"product_id\", 1);\n collection.createIndex(uniqueIndex, new IndexOptions().unique(true));\n } else if (collectionsToMake.equals(\"users\")) {\n Document uniqueIndex = new Document(\"username\", 1);\n collection.createIndex(uniqueIndex, new IndexOptions().unique(true));\n }\n }\n System.out.println(\"Database is cleared, new data is being filled\");\n } catch (MongoCommandException mongoCommandException) {\n System.out.println(\"There was an error executing mongo command, please try again later\");\n } catch (MongoWriteException mongoWriteException) {\n System.out.println(\"There was an error writing to mongo db\");\n } catch (MongoSocketReadException mongoSocketReadException) {\n System.out.println(\"There was an error reading from socket\");\n } finally {\n mongoClient.close();\n }\n }", "@Override\n public void clearTable() {\n final var query = \"TRUNCATE TABLE piano_project.pianos\";\n try(final var statement = connection.createStatement()) {\n statement.executeUpdate(query);\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n }", "protected void tearDown() throws Exception {\n TestHelper.executeDBScript(TestHelper.SCRIPT_CLEAR);\n TestHelper.closeAllConnections();\n TestHelper.clearAllConfigurations();\n\n super.tearDown();\n }", "public void removeAllData() {\n dbHelper.removeAllData(db);\n }", "@After\n public void cleanDatabaseTablesAfterTest() {\n databaseCleaner.clean();\n }", "@After\n\tpublic void tearDown() throws Exception {\n\t\tfor (int i = 0; i < feedbacks.length; ++i) {\n\t\t\tfeedbacks[i] = null;\n\t\t}\n\t\tfeedbacks = null;\n\t\texecuteSQL(connection, \"test_files/stress/clear.sql\");\n\t\tconnection.close();\n\t\tconnection = null;\n\t}", "public void clean() {\n\t\tdata = new ServerData();\n\t\tdataSaver.clean();\n\t}", "public void reset() {\r\n id = -1;\r\n username = \"\";\r\n password = \"\";\r\n password2 = \"\";\r\n firstName = \"\";\r\n lastName = \"\";\r\n phoneNumber = \"\";\r\n email = \"\";\r\n address = \"\";\r\n socialSecurityNumber = \"\";\r\n creditCard = \"\";\r\n }", "protected void reset() {\n\t\t}", "public void deleteAllData() {\n SQLiteDatabase db = getWritableDatabase();\n db.beginTransaction();\n try {\n db.delete(TABLE_HISTORY, null, null);\n db.delete(TABLE_LASTSCAN, null, null);\n db.delete(TABLE_SENSOR, null, null);\n db.delete(TABLE_SCANS, null, null);\n\n db.setTransactionSuccessful();\n } catch (Exception e) {\n\n } finally {\n db.endTransaction();\n }\n }", "private void clearRecords() {\n SQLiteDatabase db = mDbHelper.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(HabitEntry.COLUMN_SUNDAY, 0);\n values.put(HabitEntry.COLUMN_MONDAY, 0);\n values.put(HabitEntry.COLUMN_TUESDAY, 0);\n values.put(HabitEntry.COLUMN_WEDNESDAY, 0);\n values.put(HabitEntry.COLUMN_THURSDAY, 0);\n values.put(HabitEntry.COLUMN_FRIDAY, 0);\n values.put(HabitEntry.COLUMN_SATURDAY, 0);\n\n db.update(HabitEntry.TABLE_NAME, values, null, null);\n\n loaderManager.restartLoader(HABITS_LOADER_ID, null, this);\n }", "public static void resetTable() {\n tableModel.resetDefault();\n updateSummaryTable();\n }", "public void deleteDB(){\n \t\tSQLiteDatabase db = this.getWritableDatabase();\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS user\");\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS poll\");\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS time\");\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS status\");\n \t\tonCreate(db);\n \t}", "public void cleanSlate(View view) {\n Log.d(LOG, \"in cleanSlate\");\r\n dbh.deleteAllData();\r\n Log.d(LOG, \"all data deleted\");\r\n }", "public void reset() throws SQLException {\n final Session[] s;\n synchronized (sessions) {\n s = sessions.values().toArray(new Session[sessions.size()]);\n sessions.clear();\n }\n /*\n * The calls to Session.close() must be performed\n * outside the synchronized (sessions) block.\n */\n for (final Session session : s) {\n session.close();\n }\n locale = null;\n }", "public void reset() {\n initEntries();\n }", "public void reset() {\n\t\tappTda_ = new ApplicationTda();\n\t\t\n\t\t// get the associated settings\n\t\tprocessData_ = appTda_.getSettings();\n\t}", "public void dropAllCreateAgain() {\n\t\tSQLiteDatabase db = getWritableDatabase() ;\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_ABSTRACT_DETAILS);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_AUTHORS_DETAILS);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \"\n\t\t\t\t+ TABLE_ABSTRACT_AUTHOR_POSITION_AFFILIATION);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_AFFILIATION_DETAILS);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \"\n\t\t\t\t+ TABLE_ABSTRACT_AFFILIATION_ID_POSITION);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_ABSTRACT_REFERENCES);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_ABSTRACT_FIGURES);\n\t\tonCreate(db);\n\t\t}", "private void handleClearDB() {\n try {\n ContentResolver contentResolver = this.mContext.getContentResolver();\n contentResolver.delete(KeyguardNotification.URI, null, null);\n contentResolver.notifyChange(KeyguardNotification.URI, null);\n } catch (Exception e) {\n Log.e(\"KeyguardNotifHelper\", \"handleClearDB\", e);\n }\n }", "public void clearTables() {\r\n // your code here\r\n\t\ttry {\r\n\t\t\tdeleteReservationStatement.executeUpdate();\r\n\t\t\tdeleteBookingStatement.executeUpdate();\r\n\t\t\tdeleteUserStatement.executeUpdate();\r\n\t\t} catch (SQLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "@BeforeEach\n\tpublic void cleanDataBase()\n\t{\n\t\taddRepo.deleteAll()\n\t\t.as(StepVerifier::create) \n\t\t.verifyComplete();\n\t\t\n\t\tdomRepo.deleteAll()\n\t\t.as(StepVerifier::create) \n\t\t.verifyComplete();\n\t}", "@Override\n\tpublic void reset() {\n\t\tthis.prepare();\n\t\tsuper.reset();\n\t}", "public void delete() {\r\n\t\tfor (int i = 0; i <= DatabaseUniverse.getDatabaseNumber(); i++) {\r\n\t\t\tif (this.equals(DatabaseUniverse.getDatabases(i))) {\r\n\t\t\t\tDatabaseUniverse.getAllDatabases().set(i, null);\r\n\t\t\t\tDatabaseUniverse.getAllDatabases().remove(i);\r\n\t\t\t\tDatabaseUniverse.setDatabaseNumber(-1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void resetZealotCounter() {\n persistentValues.summoningEyeCount = 0;\n persistentValues.totalKills = 0;\n persistentValues.kills = 0;\n saveValues();\n }", "public void reset() {\n\t\t\t\t\r\n\t\t\t}", "public void wipeTable() {\n SqlStorage.wipeTable(db, TABLE_NAME);\n }", "@Override\n\tpublic void clearDBDomande() {\n\t\tDB db = getDB();\n\t\tMap<Long, Domanda> domande = db.getTreeMap(\"domande\");\n\t\tdomande.clear();\n\t\tdb.commit();\n\t}", "public void adm1() {\n\t\ttry { // Delete all table contents\n\t\t\tstatement = connection.createStatement();\n\t\t\tstatement.executeQuery(\"delete from PLANE\");\n\t\t\tstatement.executeQuery(\"delete from FLIGHT\");\n\t\t\tstatement.executeQuery(\"delete from PRICE\");\n\t\t\tstatement.executeQuery(\"delete from CUSTOMER\");\n\t\t\tstatement.executeQuery(\"delete from RESERVATION\");\n\t\t\tstatement.executeQuery(\"delete from DETAIL\");\n\t\t\tstatement.executeQuery(\"delete from OUR_DATE\");\n\t\t\tstatement.executeQuery(\"delete from AIRLINE\");\n\t\t} catch(SQLException Ex) {System.out.println(\"Error running the sample queries. Machine Error: \" + Ex.toString());}\n\t\tSystem.out.println(\"DATABASE ERASED\");\n\t}", "@After\n public void tearDown() {\n jdbcTemplate.execute(\"DELETE FROM assessment_rubric;\" +\n \"DELETE FROM user_group;\" +\n \"DELETE FROM learning_process;\" +\n \"DELETE FROM learning_supervisor;\" +\n \"DELETE FROM learning_process_status;\" +\n \"DELETE FROM rubric_type;\" +\n \"DELETE FROM learning_student;\");\n }", "@Override\n\tpublic void prepare() throws Exception {\n\n\t\tsuper.prepare();\n\t\tmaintainDBService.truncateTables();\n\t}", "public static void reset() {\n Castle.userId(null);\n Castle.flush();\n }", "public static void reset() {\n\t\tCAUGHT.clear();\n\t\tLOAD_CACHE.clear();\n\t}", "private void reset() {\n }", "public void resetData() {\r\n this.setName(\"\");\r\n this.setType(\"\");\r\n this.setContact(\"\");\r\n this.setAffiliatedResearchers(\"\");\r\n this.setCountry(\"\");\r\n this.setResearchKeywords(\"\");\r\n this.setResearchDescription(\"\");\r\n this.setHomePage(\"\");\r\n }", "public synchronized void reset() {\n }", "public synchronized void reset() {\r\n \ttry {\r\n \t\trecreate();\r\n \t} catch (CoreException e) {\r\n \t\tResourcesPlugin.getPlugin().getLog().log(e.getStatus());\r\n \t}\r\n }", "public void reset() {\n while (getNumTotal() > 0) {\n this.removeNuclei();\n }\n lastModified = Calendar.getInstance().getTimeInMillis(); // record time\n }", "public void reset()\r\n {\r\n gameBoard.reset();\r\n fillBombs();\r\n fillBoard();\r\n scoreBoard.reset();\r\n }", "@BeforeClass\n public static void clean() {\n DatabaseTest.clean();\n }", "public void clearTable(){\n\t\tloaderImage.loadingStart();\n\t\tfullBackup.clear();\n\t\tlist.clear();\n\t\toracle.clear();\n\t\tselectionModel.clear();\n\t\tdataProvider.flush();\n\t\tdataProvider.refresh();\n\t}", "public void reset() throws Exception;" ]
[ "0.8098577", "0.7521195", "0.7322441", "0.7307684", "0.7208143", "0.71869767", "0.716142", "0.7105139", "0.7078717", "0.7077859", "0.7077859", "0.7028948", "0.7027048", "0.7004044", "0.69837445", "0.69749653", "0.6973339", "0.69346815", "0.6870671", "0.6851706", "0.6801599", "0.67312086", "0.67221713", "0.6686883", "0.6669474", "0.6647143", "0.6642953", "0.6637175", "0.6635981", "0.6630572", "0.65837246", "0.6583035", "0.65675175", "0.6560334", "0.65462863", "0.65451753", "0.65407974", "0.65127945", "0.65106916", "0.6497707", "0.649283", "0.648275", "0.6476043", "0.6472319", "0.6462499", "0.6398614", "0.639726", "0.63908696", "0.6387777", "0.6377622", "0.63733053", "0.6351897", "0.63486254", "0.6336245", "0.63266826", "0.6321067", "0.6314659", "0.62818617", "0.6273974", "0.62694246", "0.62680197", "0.62668085", "0.62564236", "0.6221928", "0.6208417", "0.62032926", "0.61941075", "0.6190676", "0.6188518", "0.61846924", "0.618439", "0.6178187", "0.61641765", "0.61638", "0.61614776", "0.61541545", "0.61504453", "0.61464036", "0.61416245", "0.6126643", "0.61231685", "0.611877", "0.6118545", "0.6113266", "0.6095209", "0.6091712", "0.60904074", "0.6085733", "0.6078274", "0.6073957", "0.6068424", "0.60646117", "0.60560715", "0.60361326", "0.60348445", "0.60342133", "0.60307723", "0.60284436", "0.6022438", "0.6021444" ]
0.65814716
32
Set the progress indicator as visible
private void searchSubreddit(String searchQuery) { mLoadingIndicatorPB.setVisibility(View.VISIBLE); // Create url string Bundle loaderArgs = new Bundle(); String searchSubredditUrl = SubredditSearchUtils.buildSubredditSearchURL(searchQuery, "25", "relevancy"); loaderArgs.putString(SEARCH_URL_KEY, searchSubredditUrl); LoaderManager loaderManager = getSupportLoaderManager(); loaderManager.restartLoader(SEARCH_LOADER_ID, loaderArgs, this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showProgressIndicator() {\n setProgressBarIndeterminateVisibility(true);\n setProgressBarIndeterminate(true);\n }", "public void showProgressBar() {\n\t\tmProgressBarVisible = true;\n\t\tif (getView() != null) {\n\t\t\tLinearLayout progressLayout = (LinearLayout) getView()\n\t\t\t\t\t.findViewById(R.id.severity_list_progress_layout);\n\t\t\tif (progressLayout != null)\n\t\t\t\tprogressLayout.setVisibility(View.VISIBLE);\n\t\t}\n\t}", "public void setProgressBarVisible(final boolean flag) {\r\n pBarVisible = flag;\r\n }", "private void showIndicator() {\n mProgressBarHolder.setVisibility(View.VISIBLE);\n mEmailView.setFocusableInTouchMode(false);\n mEmailView.setFocusable(false);\n mEmailView.setEnabled(false);\n mPasswordView.setFocusableInTouchMode(false);\n mPasswordView.setFocusable(false);\n mPasswordView.setEnabled(false);\n mRegister.setEnabled(false);\n mEmailSignInButton.setEnabled(false);\n }", "public void setProgressBarVisible(boolean flag) {\r\n\r\n pBarVisible = flag;\r\n\r\n if (progressBar != null) {\r\n progressBar.setVisible(flag);\r\n }\r\n }", "public void showProgress() {\n img_left_action.setVisibility(View.GONE);\n search_progress.setAlpha(0.0f);\n search_progress.setVisibility(View.VISIBLE);\n ObjectAnimator.ofFloat(search_progress, \"alpha\", 0.0f, 1.0f).start();\n }", "private void startProgressBar() {\n\t b_buscar.setVisibility(View.GONE);\n\t // wi_progreso.setVisibility(View.VISIBLE);\n\t ly_progreso.setVisibility(View.VISIBLE);\n\t}", "private void setProgressBarVisible(boolean pBool) {\n\n ProgressBar tempBar = (ProgressBar)findViewById(R.id.tallyDeviceConnectionStatusMessageProgressBar);\n\n if (pBool) { tempBar.setVisibility(View.VISIBLE); }\n else { tempBar.setVisibility(View.GONE); }\n\n }", "void showLoading(boolean visible);", "protected void showProgressBar(boolean visible) {\n\t\tif (mContext == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (mContext instanceof BaseActivity) {\n\t\t\tBaseActivity activity = (BaseActivity) mContext;\n\t\t\tactivity.showProgressBar(visible);\n\t\t}\n\t}", "private void toggleProgress() {\n if (progWheel.getVisibility() == View.VISIBLE) {\n // Needs its own thread for timing control\n Handler handler = new Handler();\n final Runnable r = new Runnable() {\n public void run() {\n if (progWheel.getVisibility()\n == View.VISIBLE) {\n progWheel.setVisibility(View.GONE);\n }\n }\n };\n handler.postDelayed(r, 1);\n } else if (progWheel.getVisibility() == View.GONE) {\n progWheel.spin();\n progWheel.setVisibility(View.VISIBLE);\n }\n }", "@Override\n\tpublic void showProgress() {\n\t\twaitDialog(true);\n\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tprogressLayout.setVisibility(View.VISIBLE);\n\n\t\t}", "@Override\n public void showProgress() {\n mCircleProgressThemeDetail.setVisibility(View.VISIBLE);\n mCircleProgressThemeDetail.spin();\n mRecyclerThemeDaily.setVisibility(View.GONE);\n }", "@Override\n protected void onPreExecute() {\n mProgressbar.setVisibility(View.VISIBLE);\n }", "public final void showLoadingIndicator(boolean z) {\n if (z) {\n ProgressBar progressBar = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLoadingAuctionSaleList);\n Intrinsics.checkExpressionValueIsNotNull(progressBar, \"pbLoadingAuctionSaleList\");\n progressBar.setVisibility(0);\n return;\n }\n ProgressBar progressBar2 = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLoadingAuctionSaleList);\n Intrinsics.checkExpressionValueIsNotNull(progressBar2, \"pbLoadingAuctionSaleList\");\n progressBar2.setVisibility(8);\n }", "@Override\n\tprotected void onPreExecute() {\n\t\tprogressBar.setVisibility(View.VISIBLE);\n\t\ttv.setVisibility(View.VISIBLE);\n\t\tsuper.onPreExecute();\n\t}", "@Override\r\n\tpublic void showLoading(boolean isLoading) {\r\n\t\tsetSupportProgressBarIndeterminateVisibility(isLoading);\r\n\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n progress.setVisibility(ProgressBar.VISIBLE);\n }", "public void infoProgressOn (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourInfoBinding.tourInfoProgress.getVisibility() != View.VISIBLE) {\n tabTourInfoBinding.tourInfoProgress.setVisibility(View.VISIBLE);\n }\n if (tabTourInfoBinding.tourInfoLayout.getVisibility() != View.GONE) {\n tabTourInfoBinding.tourInfoLayout.setVisibility(View.GONE);\n }\n }\n });\n }", "@Override\n public void setSupportProgressBarIndeterminateVisibility(boolean visible) {\n getSupportActionBar().getCustomView().setVisibility(visible ? View.VISIBLE : View.GONE);\n }", "@Override\n protected void onPreExecute() {\n mProgressBar.setVisibility(View.VISIBLE);\n }", "public void showProgress(){\n loadMainActivity.setVisibility(View.VISIBLE);\n recyclerView.setVisibility(View.INVISIBLE);\n }", "public void setStateToInProgress() {\n progressBar.setIndeterminate(true);\n progressBarLabel.setText(\"Simulation is in progress...\");\n openFolderButton.setVisible(false);\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tlinlaHeaderProgress.setVisibility(View.VISIBLE);\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\t//\t\t\tmProgress.setVisibility(View.VISIBLE);\n\t\t}", "public void showProgress(boolean show) {\n \t}", "private void showActionBarProgress(boolean visible)\n\t{\n\t\t((ActionBarActivity) getActivity()).setSupportProgressBarIndeterminateVisibility(visible);\n\t\tmActionBarProgress = visible;\n\t}", "void showProgress(final View progressView, final View progressIndicator, int delay) {\n TurbolinksLog.d(\"showProgress called\");\n\n // Don't show the progress view if a screenshot is available\n if (screenshotView != null && screenshotOrientation == getOrientation()) return;\n\n hideProgress();\n\n this.progressView = progressView;\n progressView.setClickable(true);\n addView(progressView);\n\n progressIndicator.setVisibility(View.GONE);\n\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n progressIndicator.setVisibility(View.VISIBLE);\n }\n }, delay);\n }", "protected void showProgressBar(boolean show){\n if(show){\n mProgressBar.setVisibility(View.VISIBLE);\n }\n else{\n mProgressBar.setVisibility(View.GONE);\n }\n }", "private void makeLeaderboardVisible(){\n if(leaderBoardBar!=null){\n leaderBoardBar.animate().alpha(1).setDuration(800).setInterpolator(new DecelerateInterpolator(2.0f));\n }\n }", "@Override\n\tpublic void showProgress() {\n\t\tprogress.show();\n\t\tprogress.setCancelable(false);\n\t\tprogress.setContentView(R.layout.progress);\n\t}", "private void showLoading()\n {\n relLoadingPanel.setVisibility(View.VISIBLE);\n ViewHelper.setViewGroupEnabled(scrMainContainer, false);\n }", "@Override\n\tpublic void setRequiredIndicatorVisible(boolean requiredIndicatorVisible) {\n\t\t\n\t}", "private void uploadingProgressBarInit() {\n uploadingProgressBar.setVisibility(VISIBLE);\n uploadingProgressBar.setProgress(0);\n }", "@Override\n protected void onProgressUpdate(Integer... values) {\n progress.setVisibility(View.VISIBLE);\n progress.setProgress(values[0]);\n super.onProgressUpdate(values);\n }", "void showProgress();", "public boolean isProgressBarVisible() {\r\n return pBarVisible;\r\n }", "@Override\n public void onStart()\n {\n if (mProgressView != null)\n {\n mProgressView.setVisibility(View.VISIBLE);\n }\n }", "@Override\n\t\tpublic void onShutter() {\n\t\t\tmProgressContainer.setVisibility(View.VISIBLE);\n\t\t}", "public final void showLoadingIndicator(boolean z) {\n if (z) {\n ProgressBar progressBar = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbReviewPayment);\n Intrinsics.checkExpressionValueIsNotNull(progressBar, \"pbReviewPayment\");\n progressBar.setVisibility(0);\n return;\n }\n ProgressBar progressBar2 = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbReviewPayment);\n Intrinsics.checkExpressionValueIsNotNull(progressBar2, \"pbReviewPayment\");\n progressBar2.setVisibility(8);\n }", "private void hideProgressIndicator() {\n setProgressBarIndeterminateVisibility(false);\n setProgressBarIndeterminate(false);\n }", "private void setLoadingBarVisible(String text)\n {\n loadingBar.setVisibility(View.VISIBLE);\n loadingText.setText(text);\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n public void showProgress(final boolean show) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mProgressBar.setVisibility(show ? View.GONE : View.VISIBLE);\n btnAwardPoints.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n btnAwardPoints.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressBar.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressBar.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressBar.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressBar.setVisibility(show ? View.VISIBLE : View.GONE);\n btnAwardPoints.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\t//progreso.setVisibility(View.VISIBLE);\n\t\t\tsetProgressBarIndeterminateVisibility(true);\n\t\t}", "@Override\n protected void onPreExecute() {\n pb.setVisibility(View.VISIBLE);\n }", "@Override\n public void showProgressBar() {\n MainActivity.sInstance.showProgressBar();\n }", "void showProgressBar(boolean show, boolean isFirstPage);", "@Override\n public void showProgress() {\n\n }", "private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n logoImageView.animate().setDuration(shortAnimTime).alpha(show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n logoImageView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n }", "private void showProgress(final boolean show) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }", "protected void showLoader() {\n if (progressBar != null) {\n progressBar.setVisibility(View.VISIBLE);\n }\n if(getActivity()!=null) {\n getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,\n WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n linearLayoutParent.setVisibility(show ? View.GONE : View.VISIBLE);\n linearLayoutParent.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n linearLayoutParent.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n linearLayoutParent.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "private void showLoading() {\n mRecycleView.setVisibility(View.INVISIBLE);\n /* Finally, show the loading indicator */\n mLoadingIndicator.setVisibility(View.VISIBLE);\n }", "@Override\n\t protected void onPreExecute() {\n\t super.onPreExecute();\n\t //this method will be running on UI thread\n\t mProgressBar.setVisibility(View.VISIBLE);\n\t }", "public final void showLoadingIndicator(boolean z) {\n if (z) {\n ProgressBar progressBar = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLogin);\n if (progressBar != null) {\n progressBar.setVisibility(0);\n return;\n }\n return;\n }\n ProgressBar progressBar2 = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLogin);\n if (progressBar2 != null) {\n progressBar2.setVisibility(8);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n }", "@Override public void searchStarted() {\n progressBar.setVisibility(View.VISIBLE);\n }", "public void onShutter()\n {\n mProgressContainer.setVisibility(View.VISIBLE);\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n }", "public void show() {\n visible=true;\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n\n\n LoadingView.setVisibility(show ? View.VISIBLE : View.GONE);\n LoadingView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n LoadingView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n LoadingView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n }", "private void showProgressBar(boolean show){\n if(show){\n progressBar.show();\n } else {\n progressBar.dismiss();\n }\n }", "private void showDialog() {\n if (!progressDialog.isShowing())\n progressDialog.show();\n }", "private void displayLoadingIndicator(Boolean displayIndicator){\n Log.d(LOG_TAG, \"displayLoadingIndicator() => \" + displayIndicator);\n if (displayIndicator){\n /* Display the loading indicator */\n mLoadingIndicator.setVisibility(View.VISIBLE);\n } else {\n /* Hide the loading indicator */\n mLoadingIndicator.setVisibility(View.INVISIBLE);\n }\n }", "void showLoading(boolean isLoading);", "void onShowProgress();", "public void setVisible()\r\n\t{\r\n\t\tthis.setVisible(true);\r\n\t}", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n @Override\n public void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n }", "public boolean isIndicatorVisible() {\n return isIndicatorVisible;\n }", "private void showLoading() {\n hideNoNetwork();\n mRecipesBinding.fragmentRecipesProgressBar.setVisibility(View.VISIBLE);\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mFilterFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mFilterFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mFilterFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mFilterFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "public final boolean isProgressBarVisible() {\r\n\r\n if ((pBarVisible == true) && (progressBar != null)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n\tprivate void showProgress(final boolean show) {\n\t\t// On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n\t\t// for very easy animations. If available, use these APIs to fade-in\n\t\t// the progress spinner.\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n\t\t\tint shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n\n\t\t\tmProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n\t\t\tmProgressView.animate().setDuration(shortAnimTime).alpha(\n\t\t\t\t\tshow ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onAnimationEnd(Animator animation) {\n\t\t\t\t\tmProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\t// The ViewPropertyAnimator APIs are not available, so simply show\n\t\t\t// and hide the relevant UI components.\n\t\t\tmProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n\t\t}\n\t}", "private void showProgress() {\n if (dialogProgress == null) {\n dialogProgress = new Dialog(this);\n dialogProgress.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialogProgress.setContentView(R.layout.custom_progress);\n dialogProgress.setCancelable(false);\n }\n\n dialogProgress.getWindow().getDecorView().getRootView().setBackgroundColor(getResources().getColor(android.R.color.transparent));\n dialogProgress.show();\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show, final View view) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n view.setVisibility(show ? View.GONE : View.VISIBLE);\n view.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n view.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n view.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n\tprivate void showProgress(final boolean show) {\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n\t\t\tint shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n\n\t\t\tmProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n\t\t\tmProgressView.animate().setDuration(shortAnimTime).alpha(\n\t\t\t\t\tshow ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onAnimationEnd(Animator animation) {\n\t\t\t\t\tmProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\t// The ViewPropertyAnimator APIs are not available, so simply show\n\t\t\t// and hide the relevant UI components.\n\t\t\tmProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n\t\t}\n\t}", "@TargetApi( Build.VERSION_CODES.HONEYCOMB_MR2 )\n private void showProgress( final boolean show )\n {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2 )\n {\n int shortAnimTime =\n getResources().getInteger(\n android.R.integer.config_shortAnimTime );\n\n mLoginStatusView.setVisibility( View.VISIBLE );\n mLoginStatusView.animate()\n .setDuration( shortAnimTime )\n .alpha( show ? 1 : 0 )\n .setListener( new AnimatorListenerAdapter()\n {\n @Override\n public void onAnimationEnd( Animator animation )\n {\n mLoginStatusView.setVisibility( show\n ? View.VISIBLE : View.GONE );\n }\n } );\n\n mLoginFormView.setVisibility( View.VISIBLE );\n mLoginFormView.animate()\n .setDuration( shortAnimTime )\n .alpha( show ? 0 : 1 )\n .setListener( new AnimatorListenerAdapter()\n {\n @Override\n public void onAnimationEnd( Animator animation )\n {\n mLoginFormView.setVisibility( show ? View.GONE\n : View.VISIBLE );\n }\n } );\n }\n else\n {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mLoginStatusView.setVisibility( show ? View.VISIBLE : View.GONE );\n mLoginFormView.setVisibility( show ? View.GONE : View.VISIBLE );\n }\n }", "private void showProgress(final boolean show) {\n //hide the relevant UI components.\n binding.loginProgress.setVisibility(show ? View.VISIBLE : View.GONE);\n binding.emailLoginForm.setVisibility(show ? View.GONE : View.VISIBLE);\n }", "@Override\n public void esconderBarraProgresso(){\n progressbar.setVisibility(View.GONE);\n listView.setVisibility(View.VISIBLE);\n }", "public boolean uploadingProgressBarIsShow() {\n return uploadingProgressBar.getVisibility() == VISIBLE;\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n loginSV.setVisibility(show ? View.GONE : View.VISIBLE);\n loginSV.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n loginSV.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n loginPB.setVisibility(show ? View.VISIBLE : View.GONE);\n loginPB.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n loginPB.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n loginPB.setVisibility(show ? View.VISIBLE : View.GONE);\n loginSV.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n// mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n\n }\n });\n\n// mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n// mProgressView.animate().setDuration(shortAnimTime).alpha(\n// show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n// @Override\n// public void onAnimationEnd(Animator animation) {\n// mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n// }\n// });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n// mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n// mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mAnalysisForm.setVisibility(show ? View.GONE : View.VISIBLE);\n mAnalysisForm.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mAnalysisForm.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mAnalysisForm.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@Override\n @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n public void showProgress(final boolean show) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = this.view.getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n this.view.getProgress().setVisibility(show ? View.VISIBLE : View.GONE);\n this.view.getProgress().animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n view.getProgress().setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n this.view.getProgress().setVisibility(show ? View.VISIBLE : View.GONE);\n// mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n /*mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });*/\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n //mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@Override\n\tpublic boolean isRequiredIndicatorVisible() {\n\t\treturn false;\n\t}", "private void progressMode() {\n\t\t// lazily build the layout\n\t\tif (progressLayout == null) {\n\t\t\tprogressLayout = new DefaultVerticalLayout(true, true);\n\n\t\t\tprogressBar = new ProgressBar();\n\t\t\tprogressBar.setHeight(\"20px\");\n\t\t\tprogressLayout.add(progressBar);\n\n\t\t\tstatusLabel = new Text(\"\");\n\t\t\tprogressLayout.add(statusLabel);\n\t\t}\n\t\tprogressBar.setValue(0.0f);\n\t\tstatusLabel.setText(\"\");\n\n\t\tremoveAll();\n\t\tadd(progressLayout);\n\t}", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginStatusView.setVisibility(View.VISIBLE);\n mLoginStatusView.animate()\n .setDuration(shortAnimTime)\n .alpha(show ? 1 : 0)\n .setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginStatusView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n\n mLoginFormView.setVisibility(View.VISIBLE);\n mLoginFormView.animate()\n .setDuration(shortAnimTime)\n .alpha(show ? 0 : 1)\n .setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mLoginStatusView.setVisibility(show ? View.VISIBLE : View.GONE);\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@Override\n public void showProgressSync() {\n }", "protected void showLoading()\n {\n progressBar = new ProgressDialog(this);\n progressBar.setTitle(\"Loading\");\n progressBar.setMessage(\"Wait while loading...\");\n progressBar.setCancelable(false); // disable dismiss by tapping outside of the dialog\n progressBar.show();\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n public void showProgress(final boolean show) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n getProgress().setVisibility(show ? View.VISIBLE : View.GONE);\n getProgress().animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n getProgress().setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n getProgress().setVisibility(show ? View.VISIBLE : View.GONE);\n// mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mReviewFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mReviewFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mReviewFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mReviewFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tloadingView.setVisibility(View.VISIBLE);\n\t\t}", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n }", "public void showLoadingView() {\n handleLoadingContainer(false /* showContent */, false /* showEmpty */, false /* animate */);\n }", "void showModalProgress();", "void hideProgress();", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mItemFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mItemFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mItemFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mItemFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n mLoginFormView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n }", "@Override\n\t\tprotected void onProgressUpdate(Integer... progress) {\n\t\t\tprogressBar.setVisibility(View.VISIBLE);\n\n\t\t\t// updating progress bar value\n\t\t\tprogressBar.setProgress(progress[0]);\n\n\t\t\t// updating percentage value\n\t\t\ttxtPercentage.setText(String.valueOf(progress[0]) + \"%\");\n\t\t}" ]
[ "0.7809273", "0.75535965", "0.74240834", "0.7300872", "0.7284884", "0.7188262", "0.7173794", "0.7146865", "0.71173966", "0.70845515", "0.70046216", "0.6996763", "0.6985872", "0.6962724", "0.6955249", "0.69303054", "0.6914053", "0.69081795", "0.6878282", "0.68351656", "0.68124104", "0.6802066", "0.6799114", "0.6796865", "0.67883116", "0.6785669", "0.6753085", "0.67528224", "0.67409396", "0.674025", "0.6722011", "0.6704115", "0.66926104", "0.6674741", "0.66706014", "0.6666739", "0.6653085", "0.662243", "0.6617073", "0.6615278", "0.6612099", "0.6599077", "0.6583095", "0.65777457", "0.65744364", "0.65710455", "0.65678287", "0.6556543", "0.655454", "0.65483415", "0.65436304", "0.6539271", "0.6524509", "0.6514053", "0.6512515", "0.6489816", "0.648626", "0.6483303", "0.6481619", "0.64774275", "0.6476649", "0.6464659", "0.645025", "0.64429677", "0.64209175", "0.6387198", "0.63814884", "0.6353876", "0.6353011", "0.6340216", "0.63390684", "0.6321823", "0.6319388", "0.63088053", "0.6305589", "0.62982786", "0.6290022", "0.6289323", "0.6287602", "0.6286825", "0.62860143", "0.6280003", "0.6274011", "0.6271593", "0.6263366", "0.625993", "0.6256461", "0.624782", "0.6247436", "0.6246504", "0.6226192", "0.61922747", "0.6180213", "0.6178887", "0.6157458", "0.6156259", "0.6155285", "0.61486965", "0.6146901", "0.6141913", "0.613837" ]
0.0
-1
strip prefix "/r" if exists
String stripPrefix(String subredditName) { if (subredditName.length() >= 2) { Log.d(TAG, subredditName.substring(0, 2)); if (subredditName.substring(0, 2).equals("r/")) { return subredditName.substring(2); } } return subredditName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String strip(String name) {\n if (name == null) {\n return null;\n }\n int n = name.length() - 1;\n while (n >= 0 && name.charAt(n) != '/' && name.charAt(n) != '\\\\') {\n n--;\n }\n if (n > 0) {\n n++; // skip the '\\\\' we found\n }\n return name.substring(n);\n }", "private String cutPrefixFromFilePath(String path) {\n return path.replace(mainFolder, \"\");\n }", "public static String cleanUpPathPrefix(String prefix) {\n if (UtilValidate.isEmpty(prefix)) {\n return \"\";\n }\n\n StringBuilder cppBuff = new StringBuilder(prefix.replace('\\\\', '/'));\n\n if (cppBuff.charAt(0) != '/') {\n cppBuff.insert(0, '/');\n }\n if (cppBuff.charAt(cppBuff.length() - 1) == '/') {\n cppBuff.deleteCharAt(cppBuff.length() - 1);\n }\n return cppBuff.toString();\n }", "private String trimLine(String line) {\n int idx = line.indexOf(\"//\");\n if (idx != -1) {\n line = line.substring(0, idx);\n }\n return line.trim();\n }", "protected String cleanReadName(String readName) {\n if (readName.endsWith(\"/1\") || readName.endsWith(\"/2\")) {\n readName = readName.substring(0, readName.length()-2);\n }\n return readName;\n }", "private String trimLeadingPath(String filename) {\n return filename.substring(Math.max(filename.lastIndexOf('/'), filename.lastIndexOf('\\\\')) + 1);\n }", "public static String removePrecedingSlash(String url) {\n if (url.startsWith(\"/\")) {\n return url.substring(1);\n } else {\n return url;\n }\n }", "private String cleanPath(String path) {\n if(path == null)\n return path;\n if(path.equals(\"\") || path.equals(\"/\"))\n return path;\n\n if(!path.startsWith(\"/\"))\n path = \"/\" + path;\n path = path.replaceAll(\"/+\", \"/\");\n if(path.endsWith(\"/\"))\n path = path.substring(0,path.length()-1);\n return path;\n }", "private String removeSlashes(String in) {\n StringBuffer sb = new StringBuffer();\n int i = in.indexOf(\"\\\\\\\\\");\n if (i != -1) {\n return in;\n }\n\n sb.append(in.substring(0,i+1));\n \n int index = i+2;\n boolean done = false;\n while (!done) {\n i = in.indexOf(\"\\\\\\\\\",index);\n if (i == -1) {\n sb.append(in.substring(index));\n done = true;\n }\n else {\n sb.append(in.substring(index,i+1)+\"\\\\\");\n index = i+2;\n }\n }\n return sb.toString();\n }", "private String sanitizePath(String path)\r\n\t{\r\n\t\tif (path == null)\r\n\t\t\treturn \"\";\r\n\t\telse if (path.startsWith(\"/\"))\r\n\t\t\tpath = path.substring(1);\r\n\r\n\t\treturn path.endsWith(\"/\") ? path : path + \"/\";\r\n\t}", "private static String normalizePathString(String path) {\n String noUnion = removePrefix(path, \"union:/\");\n // Remove scheme marker\n String noScheme = removeAndBefore(noUnion, \"//\");\n // Remove '%2370!' that forge has, example:\n // union:/C:/Users/natan/.gradle/caches/fabric-loom/1.17.1/net.fabricmc.yarn.1_17_1.1.17.1+build.61-v2-forge-1.17.1-37.0.69/forge-1.17.1-37.0.69-minecraft-mapped.jar%2371!\n // We use 'removeLastPercentSymbol' instead of removing everything after last occurrence of '%' so it works with spaces as well\n // (the last space will be 'deleted', but that doesn't matter for our purposes)\n String noPercent = removeLastPercentSymbol(noScheme);\n // Remove trailing '/' and '!'\n return removeSuffix(removeSuffix(noPercent, \"/\"), \"!\");\n }", "private static String cleanup(String uri) {\n String[] dirty = tokenize(uri, \"/\\\\\", false);\n int length = dirty.length;\n String[] clean = new String[length];\n boolean path;\n boolean finished;\n\n while (true) {\n path = false;\n finished = true;\n for (int i = 0, j = 0; (i < length) && (dirty[i] != null); i++) {\n if (\".\".equals(dirty[i])) {\n // ignore\n } else if (\"..\".equals(dirty[i])) {\n clean[j++] = dirty[i];\n if (path) {\n finished = false;\n }\n } else {\n if ((i + 1 < length) && (\"..\".equals(dirty[i + 1]))) {\n i++;\n } else {\n clean[j++] = dirty[i];\n path = true;\n }\n }\n }\n if (finished) {\n break;\n } else {\n dirty = clean;\n clean = new String[length];\n }\n }\n StringBuffer b = new StringBuffer(uri.length());\n\n for (int i = 0; (i < length) && (clean[i] != null); i++) {\n b.append(clean[i]);\n if ((i + 1 < length) && (clean[i + 1] != null)) {\n b.append(\"/\");\n }\n }\n return b.toString();\n }", "private String removeNamePrefix(String sFileName){\n int iDateScoreIndex = 0;\n String sOriginalFileName = \"\";\n\n iDateScoreIndex = sFileName.indexOf(\"_attempt_\");\n sOriginalFileName = sFileName.substring(iDateScoreIndex + 29);\n\n return sOriginalFileName;\n }", "static String removePathIfNecessaryOrNull(final String filename) {\n String result = null;\n\n for (int i = filename.length() - 1; i >= 0; --i) {\n final char c = filename.charAt(i);\n if ('/' == c || ContentDispositionFileNameSupport.isFileSeperator(c)) {\n result = filename.substring(i + 1);\n break;\n }\n }\n\n return result;\n }", "SimpleString removePrefix(SimpleString address);", "static public IPath removePrefixFromPath(IPath rootPath, IPath cpath) {\r\n if (matchingFirstSegments(rootPath, cpath) == rootPath.segmentCount()) {\r\n \tIPath suffix = cpath.removeFirstSegments(rootPath.segmentCount());\r\n \treturn suffix.setDevice(null);\r\n }\r\n return null;\r\n }", "public void stripComments() {\r\n if (command.contains(\"//\")) {\r\n command = command.substring(0, command.indexOf(\"//\"));\r\n }\r\n command = command.replace(\"\\n\", \"\");\r\n command = command.replace(\"\\t\", \"\");\r\n }", "private static boolean isPrefix_r(String text, String pattern)\n {\n /*\n System.out.printf(\"text...: %s\\n\", text);\n System.out.printf(\"pattern: %s\\n\", pattern);\n System.out.println(\"---------------------------------\");\n */\n\n if (pattern.length() == 0)\n return true;\n else if (text.length() < pattern.length())\n return false;\n else if (text.charAt(0) != pattern.charAt(0))\n return false;\n else\n return isPrefix_r(text.substring(1), pattern.substring(1));\n }", "private String normalizePath(String path)\n {\n return path.replaceAll(\"\\\\\\\\{1,}\", \"/\");\n }", "private void trimRemoteNS() {\n Map<String, String> nsMap = model.getNsPrefixMap();\n for (Entry<String, String> entry : nsMap.entrySet()) {\n String nameSpace = entry.getKey();\n String uri = entry.getValue();\n if (nameSpace.startsWith(REMOTE_NS_PREFIX)) {\n remoteNameSpaceURI = uri.substring(uri.lastIndexOf('/') + 1);\n model.setNsPrefix(nameSpace, remoteNameSpaceURI);\n }\n }\n }", "private String filterOutRestEasyError(String error) {\n if (error != null && error.startsWith(RESTEASY_PREFIX) && error.contains(\":\")) {\n return null;\n } else {\n return error;\n }\n }", "private String removeComments(String line) {\n\t\tint commentIndex = line.indexOf(\"//\");\n\t\tif (commentIndex >= 0) {\n\t\t\tline = line.substring(0, commentIndex);\n\t\t}\n\t\tline = line.trim();\n\n\t\t// clear line if entire line is comment\n\t\tif (line.startsWith(\"#\")) {\n\t\t\treturn \"\";\n\t\t}\n\t\treturn line;\n\t}", "static private String stripPlusIfPresent( String value ){\n String strippedPlus = value;\n \n if ( value.length() >= 2 && value.charAt(0) == '+' && value.charAt(1) != '-' ) {\n strippedPlus = value.substring(1);\n }\n return strippedPlus;\n }", "public static final String handleRemoveXmlPrefix(String xml, String prefix) {\n\t\txml = StringEscapeUtils.unescapeXml(xml);\n\t\tprefix = StringEscapeUtils.unescapeXml(prefix);\n\n\t\tif (xml.contains(prefix)) {\n\t\t\txml = xml.substring(prefix.length());\n\t\t}\n\n\t\treturn xml;\n\t}", "public static String removeLeadingDoubleSlash(String url, String scheme) {\n if (url != null && url.startsWith(\"//\")) {\n url = url.substring(2);\n if (scheme != null) {\n if (scheme.endsWith(\"://\")) {\n url = scheme + url;\n } else {\n Log.e(TAG, \"Invalid scheme used: \" + scheme);\n }\n }\n }\n return url;\n }", "private String cleanString(String data){\n Pattern ptn = Pattern.compile(\"//.*\");\n Matcher mc = ptn.matcher(data);\n while(mc.find())data = data.replace(mc.group(),\"\");\n ptn = Pattern.compile(\"/\\\\*(.|\\n)*?\\\\*/\");\n mc = ptn.matcher(data);\n while(mc.find()) data = data.replace(mc.group(),\"\");\n return data.trim();\n }", "public static String cleanPath(String path) {\n \tString clean = path;\n\t\tclean.replaceAll(\"(\\\\$|\\\\+|\\\\#|\\\\%|\\\\&|\\\\{|\\\\}|\\\\\\\\|\\\\<|\\\\>|\\\\*|\\\\?|\\\\/|\\\\$|\\\\!|\\\\'|\\\\\\\"|\\\\:|\\\\@|\\\\+|\\\\`|\\\\||\\\\=)*\", \"\");\n\t\tclean.replaceAll(\"( )*\", \"\");\n\t\tclean.replace(\"\\\\\", \"/\");\n\t\treturn clean;\n\t}", "private String entryName(String name) {\n name = name.replace(File.separatorChar, '/');\n String matchPath = \"\";\n /* Need to add code to consolidate paths\n for (String path : paths) {\n if (name.startsWith(path)\n && (path.length() > matchPath.length())) {\n matchPath = path;\n }\n }\n */\n name = name.substring(matchPath.length());\n \n if (name.startsWith(\"/\")) {\n name = name.substring(1);\n } else if (name.startsWith(\"./\")) {\n name = name.substring(2);\n }\n return name;\n }", "private static String removeSharp(String x) {\n\t\treturn (x.indexOf(\"#\") != -1 && x.lastIndexOf(\"#\") < x.length()) ? x.substring(x.lastIndexOf(\"#\") + 1) : x;\n\t}", "private String getResourceIdPrefix(String resourceId) {\n if (resourceId == null) {\n return null;\n }\n if (resourceId.indexOf(\"%3A\") != -1) {\n return resourceId.substring(0, resourceId.indexOf(\"%3A\"));\n } else if (resourceId.indexOf(\":\") != -1) {\n return resourceId.substring(0, resourceId.indexOf(\":\"));\n } else {\n return null;\n }\n }", "private String fixSlashes(String str) {\n\t\tstr = str.replace('\\\\', '/');\r\n\t\t// compress multiples into singles;\r\n\t\t// do in 2 steps with dummy string\r\n\t\t// to avoid infinte loop\r\n\t\tstr = replaceString(str, \"//\", \"_____\");\r\n\t\tstr = replaceString(str, \"_____\", \"/\");\r\n\t\treturn str;\r\n\t}", "public static String removeLastSlash(String fileName) {\n\t\tif (fileName.lastIndexOf('/') == fileName.length() - 1) {\n\t\t\treturn fileName.substring(0, fileName.length() - 1);\n\t\t} else {\n\t\t\treturn fileName;\n\t\t}\n\t}", "public static String removeClassUriPrefix(final String classURI) {\n\n\t\tString unprefixed = classURI.replace(\"jar:\", \"\");\n\n\t\tfinal String osname = System.getProperty(\"os.name\");\n\t\t// Detect Mac OS X from Java:\n\t\t// http://developer.apple.com/library/mac/#technotes/tn2002/tn2110.html\n\t\tif (osname.toLowerCase().contains(\"linux\")\n\t\t\t\t|| osname.startsWith(\"Mac OS X\")) {\n\t\t\tunprefixed = unprefixed.replace(\"file:\", \"\");\n\t\t} else {\n\t\t\tunprefixed = unprefixed.replace(\"file:/\", \"\");\n\t\t}\n\n\t\treturn unprefixed;\n\t}", "public boolean useTrailingSlashMatch()\n/* */ {\n/* 574 */ return this.trailingSlashMatch;\n/* */ }", "public static String removeNamespace(String name) {\r\n\t\tString returnValue;\r\n\t\t\r\n\t\treturnValue = name.replaceFirst(\".*#\",\"\");\r\n\t\treturn returnValue;\r\n\t}", "private String readPrefixPart()\n // { return readWordSub(false, false) ; }\n {\n return readSegment(false);\n }", "public String normalizePathName( final String name );", "public static String cleanFilePath(String path) {\r\n if (path.endsWith(\"/\")) {\r\n path = path.substring(0, path.length() - 1);\r\n }\r\n return path;\r\n }", "public abstract String unrewrite(String absoluteIRI);", "private String trimName(String line) {\n line = trimLine(line);\n int idx = line.indexOf(\"(\");\n if(idx == -1){\n idx = line.indexOf(\":\");\n }\n if (idx != -1) {\n line = line.substring(0, idx);\n }\n return line.trim();\n }", "public String removeSeparadorData(String data) {\r\n if(data.contains(\"/\")) {\r\n data = data.replaceAll(\"/\", \"\");\r\n \r\n } else if(data.contains(\"-\")) {\r\n data = data.replace(\"-\", \"\");\r\n }\r\n return data;\r\n }", "@Override\n public void setValue(ImportPath o, String value) {\n o.prefix = LEADING_TRAILING_SLASHES.matcher(value.trim()).replaceAll(\"\");\n }", "public static String reverseRoundtripDirRegExp()\n {\n read_if_needed_();\n \n return _dir_regexp;\n }", "static String stripPrefixes(String name, String... prefixes) {\n if (name == null || name.isEmpty()) {\n return name;\n } else {\n String result = name;\n for (String prefix : prefixes) {\n if (result.startsWith(prefix)) {\n result = result.substring(prefix.length());\n }\n }\n return result;\n }\n }", "private String removeFirstChar(String name) {\n\t\treturn name.substring(1, name.length());\n\t}", "private String ensureWellFormed(String res)\r\n {\r\n String resource = res;\r\n int idx;\r\n\r\n // replace all occurances of '.*' with '*'\r\n while( (idx = resource.indexOf(TIGHT_BINDING+LOOSE_BINDING)) != -1)\r\n {\r\n if (idx == 0)\r\n {\r\n resource = LOOSE_BINDING +\r\n resource.substring(TIGHT_BINDING_LEN+LOOSE_BINDING_LEN);\r\n }\r\n else\r\n {\r\n resource = resource.substring(0, idx) + LOOSE_BINDING +\r\n resource.substring(idx+TIGHT_BINDING_LEN+LOOSE_BINDING_LEN);\r\n }\r\n }\r\n\r\n // replace all occurances of '*.' with '*'\r\n while( (idx = resource.indexOf(LOOSE_BINDING+TIGHT_BINDING)) != -1)\r\n {\r\n if (idx == 0)\r\n {\r\n resource = LOOSE_BINDING +\r\n resource.substring(TIGHT_BINDING_LEN+LOOSE_BINDING_LEN);\r\n }\r\n else\r\n {\r\n resource = resource.substring(0, idx) + LOOSE_BINDING +\r\n resource.substring(idx+LOOSE_BINDING_LEN+TIGHT_BINDING_LEN);\r\n }\r\n }\r\n\r\n return resource;\r\n }", "private static String getResourceName(String uri) {\r\n int p = uri.lastIndexOf('/');\r\n if (p != -1) {\r\n return uri.substring(p + 1);\r\n } else {\r\n return uri;\r\n }\r\n }", "private void removeIfNeeded(String prefix) {\r\n // remove the previous mapping to the prefix\r\n if (this.prefixMapping.containsValue(prefix)) {\r\n Object key = null;\r\n for (Enumeration e = this.prefixMapping.keys(); e.hasMoreElements();) {\r\n key = e.nextElement();\r\n if (this.prefixMapping.get(key).equals(prefix)) \r\n break;\r\n }\r\n this.prefixMapping.remove(key); // we know key should have a value\r\n\t if (DEBUG) System.err.println(\"Removed \" + prefix);\r\n \r\n }\r\n }", "protected boolean removeDoubleSlashesFromConfigNames() {\n return true;\n }", "private String removeTailComment(String line) {\n //remove any comment from this line\n int commentPos = line.indexOf(\",#\");\n if (commentPos != -1) {\n line = line.substring(0, commentPos);\n }\n return line;\n }", "private static String cleanServerAddress(String dirtyServerAddress){\n\t\tif (dirtyServerAddress.contains(\":\")){\n\t\t\tdirtyServerAddress = dirtyServerAddress.substring(0, dirtyServerAddress.indexOf(':'));\n\t\t}\n\t\tif (dirtyServerAddress.contains(\"/\")){\n\t\t\tdirtyServerAddress = dirtyServerAddress.substring(0, dirtyServerAddress.indexOf('/'));\n\t\t}\n\t\treturn(dirtyServerAddress);\n\t}", "public abstract String getPrefix();", "private static String normalizeUrlPath(String baseUrl) {\n if (!baseUrl.matches(\".*/$\")) {\n return baseUrl + \"/\";\n }\n return baseUrl;\n }", "protected static String isolateName(String id)\n\t{\n\t\tif (id == null) return null;\n\t\tif (id.length() == 0) return null;\n\n\t\t// take after the last resource path separator, not counting one at the very end if there\n\t\tboolean lastIsSeparator = id.charAt(id.length() - 1) == '/';\n\t\treturn id.substring(id.lastIndexOf('/', id.length() - 2) + 1, (lastIsSeparator ? id.length() - 1 : id.length()));\n\n\t}", "private String removeBinFirstAndLast(String runtimeBin) {\n if (StringUtils.isBlank(runtimeBin)) {\n return null;\n }\n if (runtimeBin.startsWith(\"0x\")) {\n runtimeBin = StringUtils.removeStart(runtimeBin, \"0x\");\n }\n if (runtimeBin.length() > 68) {\n runtimeBin = runtimeBin.substring(0, runtimeBin.length() - 68);\n }\n return runtimeBin;\n }", "public static String removeLeadingTrailingChar(char c, String s) {\n \tif(s==null) return s;\n \tboolean hasLeading = true;\n \tboolean hasTrailing=true;\n \tString retVal = s;\n \twhile(hasLeading || hasTrailing) {\n\t \tif(hasLeadingChar(c,retVal)) {\n\t \t\tretVal = retVal.substring(1);\n\t \t}\n\t \telse {\n\t \t\thasLeading = false;\n\t \t}\n\t \tif(hasTrailingChar(c,retVal)) {\n\t \t\tretVal = retVal.substring(0,retVal.length()-1);\n\t \t}\n\t \telse {\n\t \t\thasTrailing = false;\n\t \t}\n\t \t\n \t}\n \treturn retVal;\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 trimLineSeparator(String line) {\n int n = line.length();\n if (n == 0) {\n return line;\n }\n char ch = line.charAt(n - 1);\n if (ch == '\\n' || ch == '\\r') {\n n--;\n }\n else {\n return line;\n }\n if (n > 0) {\n char ch2 = line.charAt(n - 1);\n if ((ch2 == '\\n' || ch2 == '\\r') && ch2 != ch) {\n n--;\n }\n }\n return line.substring(0, n);\n\n }", "public static String removeTrailingSlash(String url) {\n if (url.endsWith(\"/\")) {\n return url.substring(0, url.length() - 1);\n } else {\n return url;\n }\n }", "protected String getTildered(String wrappedUri) {\r\n\t\treturn wrappedUri.replaceAll(\"~\", \"~0\").replaceAll(\"/\", \"~1\");\r\n\t}", "@Override\n\tpublic String getRealPath(String path) {\n\t\treturn null;\n\t}", "@Override\n\t\tpublic String getRealPath(String path) {\n\t\t\treturn null;\n\t\t}", "private String trimClassPaths (String s) {\n int idx = 0;\n for (int i = s.length() - 1; i >= 0; i--) {\n if (s.charAt(i) == '.') {\n idx = i;\n break;\n }\n }\n String trimmed = s.substring(idx + 1);\n return trimmed;\n }", "public static String removeProtocolPrefix(String prefixedUri)\r\n {\r\n if (prefixedUri.startsWith(\"http://\"))\r\n {\r\n prefixedUri = prefixedUri.replaceFirst(\"http://\", \"\");\r\n } else if (prefixedUri.startsWith(\"file://\"))\r\n {\r\n prefixedUri = prefixedUri.replaceFirst(\"file://\", \"\");\r\n }\r\n return prefixedUri;\r\n }", "public void setRname(String rname) {\n this.rname = rname == null ? null : rname.trim();\n }", "public com.example.DNSLog.Builder clearRcodename() {\n rcodename = null;\n fieldSetFlags()[14] = false;\n return this;\n }", "boolean haveToSkip(String path, boolean addSrcPrefix);", "String getPrefix();", "String getPrefix();", "String getPrefix();", "String getPrefix();", "String checkAndTrimUrl(String url);", "private String fixPath(String Path) {\n\n // Nothing to do if we're running the plugin on a Windows machine.\n if (Global.IsWindowsOS()) {\n return Path;\n }\n\n // Replace all of the Windows separator characters with linux separator characters.\n String NewPath = Path.replaceAll(\"\\\\\\\\\", File.separator);\n\n Log.getInstance().write(Log.LOGLEVEL_TRACE, \"RecordingEpisode.fixPath: \" + Path + \"->\" + NewPath);\n \n return NewPath;\n }", "private static String trim (String urlString) {\n int ix = urlString.lastIndexOf('/');\n boolean trimTrailingSlash = ix == urlString.length() - 1;\n if (trimTrailingSlash) {\n ix = urlString.lastIndexOf('/', ix - 1);\n }\n String result;\n if (ix > 0) {\n result = urlString.substring(ix + 1);\n } else {\n result = urlString;\n }\n if (trimTrailingSlash && result.length() > 1) {\n result = result.substring(0, result.length() - 1);\n }\n return result;\n }", "@Test\n public void testVocabWithoutTrailingSlash() {\n assertExtract(\"/html/rdfa/vocab-without-trailing-slash.html\");\n\n assertContains(null, RDF.TYPE, RDFUtils.iri(\"http://schema.org/BreadcrumbList\"));\n }", "public static String stripTrailingFs(String s) {\n return s == null ? null : s.replaceAll(\"(?i)f*$\", \"\");\n }", "private char unprefixedSymbol(final char symbol) {\n switch (symbol) {\n case 't':\n return '\\t';\n case 'n':\n return '\\n';\n case '_':\n return ' ';\n default:\n return symbol;\n }\n }", "public static String stripDomain(String user) {\n if (user.lastIndexOf(\"\\\\\") > -1) {\n user = user.substring(user.lastIndexOf(\"\\\\\")+1); \n }\n if (user.indexOf('@') > -1) {\n user = user.substring(0,user.indexOf('@')); \n }\n return user;\n }", "static String cleanBundleDir( String bundleDir )\n {\n if ( bundleDir == null )\n {\n return bundleDir;\n }\n\n // Using slashes\n bundleDir = bundleDir.replace( '\\\\', '/' );\n\n // Remove '/' prefix if any so that directory is a relative path\n if ( bundleDir.startsWith( \"/\" ) )\n {\n bundleDir = bundleDir.substring( 1, bundleDir.length() );\n }\n\n if ( bundleDir.length() > 0 && !bundleDir.endsWith( \"/\" ) )\n {\n // Adding '/' suffix to specify a directory structure if it is not empty\n bundleDir = bundleDir + \"/\";\n }\n\n return bundleDir;\n }", "private String nocomment(String s) {\r\n\t\tint excLocation=s.indexOf('!');\r\n\t\tif(excLocation!=-1) s=s.substring(0,excLocation);\r\n\t\treturn s.trim();\r\n\t}", "private String sep(String path) {\n return path == null ? \"\" : \"/\" + path;\n }", "public static String m212a(String str) {\n if (TextUtils.isEmpty(str)) {\n return str;\n }\n int lastIndexOf = str.lastIndexOf(File.separator);\n return lastIndexOf == -1 ? \"\" : str.substring(0, lastIndexOf);\n }", "private String stripURL( String inputLine )\n\t{\n\t\tint fromIndex = inputLine.indexOf( \"<img \" ) + \"<img \".length();\n\t\tint beginIndex = inputLine.indexOf( \"src=\\\"\", fromIndex ) + \"src=\\\"\".length();\n\t\tint endIndex = inputLine.indexOf( \"\\\"\", beginIndex );\n\t\treturn inputLine.substring( beginIndex, endIndex );\n\t}", "@Override\n public String readLine() throws IOException {\n\n String line = null;\n\n while (true) {\n\n line = super.readLine();\n\n if (line == null) {\n\n return null;\n }\n\n // Get rid of comments\n\n // VT: FIXME: not handling the escaped comments\n\n int hash = line.indexOf(\"#\");\n\n if (hash != -1) {\n\n // Check if the '#' is escaped\n\n if (hash > 0 && line.indexOf(\"\\\\#\") == hash - 1) {\n\n // Yes, it is\n\n // System.err.println( \"Raw: '\"+line+\"'\" );\n line = line.substring(0, hash - 1) + line.substring(hash, line.length());\n // System.err.println( \"Unescaped: '\"+line+\"'\" );\n\n } else {\n\n line = line.substring(0, hash);\n }\n }\n\n // Trim it\n\n line = line.trim();\n\n if (line.length() != 0) {\n\n return line;\n }\n }\n }", "public static String reverseRoundtripFileRegExp()\n {\n read_if_needed_();\n \n return _file_regexp;\n }", "public ArrayList<String> cleanUpPath(ArrayList<String> path) {\n if (path.size() > 1) {\n for (int i = 0; i < path.size() - 2; i++) {\n if ((path.get(i).equals(\"L\") && path.get(i + 1).equals(\"R\")) || (path.get(i).equals(\"R\") && path.get(i + 1).equals(\"L\"))) {\n path.remove(i + 1);\n path.remove(i);\n } else if ((path.get(i).equals(\"U\") && path.get(i + 1).equals(\"D\")) || (path.get(i).equals(\"D\") && path.get(i + 1).equals(\"U\"))) {\n path.remove(i + 1);\n path.remove(i);\n }\n }\n }\n return path;\n }", "private static String removePathPrefixOfTestDirectory(String hostname,\n String xml, int times) {\n int hostnameLocation = xml.indexOf(hostname + \"/\");\n if (hostnameLocation == -1) {\n fail(\"could not find hostname in xml '\" + xml + \"'\");\n }\n hostnameLocation += hostname.length() + 1;\n int testLocation = xml.indexOf(\"test/com/google/enterprise\",\n hostnameLocation);\n if (testLocation == -1) {\n fail(\"could not find test directory in xml '\" + xml + \"'\");\n }\n if (times < 2) {\n return xml.substring(0, hostnameLocation) + xml.substring(testLocation);\n } else {\n return xml.substring(0, hostnameLocation)\n + removePathPrefixOfTestDirectory(hostname,\n xml.substring(testLocation), times - 1);\n }\n }", "java.util.Optional<String> getPrefix();", "boolean haveToSkip(String path, boolean addSrcPrefix, boolean withoutFilename);", "public String simplifyPath(String path) {\n String resString=\"\";\n String[] steRes=path.split(\"/|\\\\.\");\n if (steRes.length==0)\n return \"/\";\n return '/'+steRes[steRes.length-1];\n }", "@Override\n \t\tpublic String getPrefix(String uri) {\n \t\t\tthrow new UnsupportedOperationException();\n \t\t}", "public static void set_ReverseRoundtripDirRegExp(String s, boolean cs) throws RuntimeException\n {\n UmlCom.send_cmd(CmdFamily.javaSettingsCmd, JavaSettingsCmd._setJavaDirRevFilterCmd, s, cs);\n UmlCom.check();\n _dir_regexp = s;\n _dir_regexp_case_sensitive = cs;\n }", "@Override\n\tpublic void setRepertoire(String r) {\n\t\t\n\t}", "public String clean(String file_name)\n\t{\n\t\treturn file_name;\n\t}", "public static String getBareName(String name) {\n\t\tif (name.indexOf(AURA_TOKEN) != -1)\n\t\t\treturn secondName(name);\n\t\tint s0 = name.lastIndexOf(FILE_SEP);\n\t\tString s = (s0 == -1) ? name : name.substring(s0 + 1);// get partial name after slash\n\t\tif (s.indexOf(META_TOKEN) != -1) {\n\t\t\tString bareName = s.replace(META_TOKEN, \"\");\n\t\t\tif (bareName == null || bareName == \"\") return \"\";\n\t\t\tint s1 = bareName.lastIndexOf('.');\n\t\t\treturn s1 == -1 ? bareName : bareName.substring(0, s1);\n\t\t} else {\n\t\t\tint s1 = s.lastIndexOf('.');\n\t\t\treturn s1 == -1 ? s : s.substring(0, s1);\n\t\t}\n\t}", "private String fixName(String name, String prefix)\n {\n if (name.startsWith(prefix))\n return name.substring(prefix.length());\n return FIXME_INVALID_PREFIX + name;\n }", "@Override\n\tprotected String getPathSeparator() {\n\t\treturn null;\n\t}", "public static String rest(String s) {\n\treturn s.substring(1);\n\t}", "public final static String normalizePath(String path) { \n return normalizePath( path, true);\n }", "boolean truncatePrefix(final long firstIndexKept);" ]
[ "0.5958491", "0.59008527", "0.5856691", "0.5843354", "0.57888204", "0.5762812", "0.5695896", "0.5543826", "0.55340034", "0.54706794", "0.5455505", "0.54302365", "0.5407926", "0.53199524", "0.52878237", "0.52733797", "0.52643585", "0.5259542", "0.52427244", "0.5230767", "0.5175501", "0.5146082", "0.5095461", "0.50840056", "0.50639427", "0.50554055", "0.50082576", "0.50079733", "0.50034076", "0.49927586", "0.4956836", "0.4952335", "0.49492717", "0.49427015", "0.49221504", "0.4914359", "0.49021745", "0.48931217", "0.48892066", "0.48737016", "0.48565292", "0.4856052", "0.48459834", "0.48278925", "0.48249143", "0.48163614", "0.481049", "0.4804659", "0.47953779", "0.47887012", "0.47881606", "0.47701696", "0.47570956", "0.47463804", "0.47336158", "0.47294122", "0.47157773", "0.47081226", "0.46995288", "0.46816266", "0.4679782", "0.46783283", "0.4673151", "0.46303165", "0.46296743", "0.4615744", "0.46091455", "0.46051273", "0.46051273", "0.46051273", "0.46051273", "0.46032047", "0.46027982", "0.46020386", "0.45966697", "0.4589531", "0.45807138", "0.45770895", "0.45761827", "0.45760414", "0.456489", "0.45615312", "0.45596045", "0.45533237", "0.45493373", "0.45317653", "0.4531404", "0.45296183", "0.45289272", "0.45263723", "0.4526254", "0.4509043", "0.45078865", "0.45037207", "0.45011628", "0.44946828", "0.44884232", "0.44831395", "0.44824705", "0.44783434" ]
0.68909615
0
/ Add Subreddit Button Click Listener
@Override public void onSubredditAdd(SubredditSearchUtils.SubredditItem subredditItem, ImageButton addSubredditButton) { if (!checkSubredditSaved(subredditItem.name)) { long status = addSubredditToDB(subredditItem); if (status == -1 ) Log.d(TAG, "IT IS NOT ADDED"); addSubredditButton.setImageResource(R.drawable.ic_action_check); toast("Subreddit " + subredditItem.name + " saved!"); } else { deleteSubredditFromDB(subredditItem.name); addSubredditButton.setImageResource(R.drawable.ic_action_add); toast("Subreddit " + subredditItem.name + " removed!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onAddByWebSitePressed( ) {\n Router.Instance().changeView(Router.Views.AddFromWebSite);\n }", "public void run() {\n subredditApiRequest = new SubredditApiRequest(SubredditListViewFragment.this);\n subredditApiRequest.execute(subreddit);\n }", "private void setupAddToReviewButton() {\n\t\tImageIcon addreview_button_image = new ImageIcon(parent_frame.getResourceFileLocation() + \"addtoreview.png\");\n\t\tJButton add_to_review = new JButton(\"\", addreview_button_image);\n\t\tadd_to_review.setBounds(374, 598, 177, 100);\n\t\tadd_to_review.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\twords_to_add_to_review.add(words_to_spell.get(current_word_number));\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t}\n\t\t});\n\t\tadd_to_review.addMouseListener(new VoxMouseAdapter(add_to_review,null));\n\t\tadd(add_to_review);\n\t}", "protected void setSubmitReviewButtonListener() {\n\n submitButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String username = getSharedPreferences(\"appUserPrefs\",MODE_PRIVATE).getString(\"username\",\"\");\n String venueID = pitch.getVenueID();\n String pitchName = pitch.getPitchName();\n PlayerSubmitReview playerSubmitReview = new PlayerSubmitReview(username,\n venueID, pitchName, ratingBar.getRating());\n connectionManager.setNewPitchRating(playerSubmitReview);\n Toast.makeText(instance, \"Pitch reviewed successfully: \" + ratingBar.getRating() ,\n Toast.LENGTH_SHORT).show();\n }\n });\n }", "void onAddClicked();", "public void setUpListSubReddits() {\n\n for (SubReddit s : db.getAllSubReddits()) {\n subReddits.add(s.getName());\n }\n\n adapter = new ArrayAdapter<String>(getActivity(),\n android.R.layout.simple_list_item_1, android.R.id.text1, subReddits);\n\n // Assign adapter to ListView\n lvSubRedditList.setAdapter(adapter);\n\n // ListView Item Click Listener\n lvSubRedditList.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n // ListView Clicked item index\n int itemPosition = position;\n\n // ListView Clicked item value\n String sub = (String) lvSubRedditList.getItemAtPosition(position);\n Toast toast = Toast.makeText(getContext(), sub, Toast.LENGTH_SHORT);\n toast.show();\n\n\n int opened = 1;\n\n if (db.getSubReddit(sub).getOpened() == 0) {\n db.openSubRedditFirstTime(sub);\n opened = 0;\n }\n\n Class fragClass = Fragment_Posts.class;\n try {\n Fragment frag = (Fragment) fragClass.newInstance();\n Bundle args = new Bundle();\n args.putString(\"subName\", sub);\n args.putInt(\"opened\", opened);\n frag.setArguments(args);\n switchFragment(frag);\n } catch (Exception e) {\n e.printStackTrace();\n Log.i(\"StartFrag\", \"Failed\");\n }\n\n\n }\n });\n }", "@Override\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tNoteEditView.this.addShare();\n \t\t\t}", "public VBox addButton(ObservableList<Song> searchResults, ObservableList<Song> playlist) {\r\n\t \t\tVBox vbox = new VBox();\r\n\t \t\tsearchResults = searchResults;\r\n\t \t\tplaylist = playlist;\r\n\t \t\tvbox.setPadding(new Insets(350, 100, 350, 10));\r\n\t \t\tButton addSongBtn = new Button();\r\n\t \t\taddSongBtn.setText(\"Add Song\");\r\n\t \t\taddSongBtn.setPrefSize(25.0, 15);\r\n\t \t\taddSongBtn.setAlignment(Pos.CENTER_LEFT);\r\n\t \t\t\r\n\t \t\tvbox.getChildren().addAll(addSongBtn);\r\n\t \t\t\r\n\t \t\treturn vbox;\r\n\t \t}", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n MediaPlayer.create(getActivity(), R.raw.click).start();\n\n RedditEntry redditEntry = (RedditEntry) adapterView.getItemAtPosition(i);\n Intent intent = new Intent(getActivity(), EntryDisplayActivity.class);\n intent.putExtra(\"entry\", redditEntry);\n startActivity(intent);\n }", "public void onFavouritesPress(View view) {\n\n favouritesDBHandler.addGame(game);\n Toast.makeText(getContext(), game.getName() + \" has been added to your favourites!\", Toast.LENGTH_SHORT).show();\n\n }", "public void clickCreateNewPostBtn() {\n createPostBtn.get(0).click();\n }", "@Override\n public void getSubReddits() {\n UseCaseData queryData = new RedditsQueryData(afterToken, pageLimit);\n // execute the use case\n this.getSubRedditsListUseCase.setData(queryData);\n this.getSubRedditsListUseCase.execute(new SubRedditListSubscriber());\n }", "@Override\n public void onClick(View view) {\n Intent recentIntent = new Intent(Playlists.this, Recent.class);\n startActivity(recentIntent);\n }", "public void addAddEpisodeButtonListener(ActionListener l)\n\t{\n\t\taddEpisodeButton.setActionCommand(\"Add Episode\");\n\t\taddEpisodeButton.addActionListener(l);\n\t}", "@Override\n public void onClick(View v) {\n mListener.onAddButtonClicked();\n }", "public void onClick(View v) {\n post.setTitle(titleEditText.getText().toString());\n post.setContent(descriptionEditText.getText().toString());\n post.setImageUrl((String) gallery.getSelectedItem());\n\n PostAction.curatePost(post, jsonForSelectedSharers(), PostCurateActivity.this, true, new PostAction.OnActionComplete() {\n\n @Override\n public void onActionComplete(Post in, Post out) {\n Intent i = new Intent();\n i.putExtra(\"postToAdd\", out);\n i.putExtra(\"postToRemove\", in);\n PostCurateActivity.this.setResult(TabPostsListActivity.RESULT_ADD_CURATED_AND_REMOVE_CURABLE, i);\n PostCurateActivity.this.finish();\n }\n });\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\ttwitter.setSource(\"keyrani\");\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\ttwitter.updateStatus(status.getText().toString());\n\t\t\t\t\t\t\n\t\t\t\t\t}catch (Repetition e) {\n\t\t\t\t\t\t Toast.makeText(TwitUpdate.this, \"status tdk boleh sama\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void onClick(View view) {\n AddWordFromDaum();\n }", "public void addListenerOnButton() {\n\n\t\t//koppel de button code aan een widget en voeg een onclicklistener toe\n\t\tsettings = (Button) findViewById(R.id.settings);\n\n\t\tsettings.setOnClickListener(new OnClickListener() {\n\t\t\t//koppel de button aan een nieuw xml scherm wat opent\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\n\t\t\t\tIntent myIntent = new Intent(view.getContext(), Settings.class);\n\t\t\t\tstartActivityForResult(myIntent, 0);\n\t\t\t}\n\n\t\t});\n\n\t\tsearch = (Button) findViewById(R.id.search);\n\n\t\tsearch.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\n\t\t\t\tIntent myIntent = new Intent(view.getContext(), Search.class);\n\t\t\t\tstartActivityForResult(myIntent, 0);\n\t\t\t}\n\t\t});\n\t\tterug = (Button) findViewById(R.id.terug);\n\n\t\tterug.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tsetResult(RESULT_OK, intent);\n\t\t\t\tfinish();\n\t\t\t}\n\n\t\t});\n\n\n\t}", "private void addSongButtonActionListener(JButton addSongButton) {\n addSongButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n String songName = JOptionPane.showInputDialog(\"Enter the song name: \");\n String artist = JOptionPane.showInputDialog(\"Enter the artist's name: \");\n Song song = new Song(songName, artist);\n queue.addSong(song);\n JOptionPane.showMessageDialog(null, song.description() + \" has been successfully added to queue!\");\n }\n });\n }", "public void onClickAddTask(View view) {\n\n // Insert new Movie data via a ContentResolver\n\n\n ContentValues mUpdateValues = new ContentValues();\n // Defines selection criteria for the rows you want to update\n /*\n * Sets the updated value and updates the selected words.\n */\n\n if (fav == 0) {\n mRatingBar.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), android.R.drawable.btn_star_big_on));\n mUpdateValues.put(MoviesContract.MovieEntry.COLUMN_PRIORITY, 1);\n } else {\n mRatingBar.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), android.R.drawable.btn_star_big_off));\n mUpdateValues.put(MoviesContract.MovieEntry.COLUMN_PRIORITY, 0);\n }\n int mRowsUpdated = getContentResolver().update(\n MoviesContract.MovieEntry.buildMoviesUri(_id),\n mUpdateValues,\n MoviesContract.MovieEntry._ID+\"=?\",\n new String[] {String.valueOf(_id)});\n\n\n }", "void addButton_actionPerformed(ActionEvent e) {\n addButton();\n }", "void addToFavorites(int recipeId);", "@Override\n public void onViewClicked(@NotNull RecyclerView recyclerView, @NotNull View view, int position, Tweet tweet) {\n if (tweet != null && tweet.id > 0 && tweet.user != null && !TextUtils.isEmpty(tweet.user.screenName)) {\n String twitterPermalinkFormat = \"https://twitter.com/%s/status/%d?ref_src=twsrc%%5Etwitterkit\";\n Uri permalink = Uri.parse(String.format(Locale.US, twitterPermalinkFormat, tweet.user.screenName, tweet.id));\n final Intent intent = new Intent(Intent.ACTION_VIEW, permalink);\n IntentUtils.safeStartActivity(getContext(), intent);\n }\n }", "private void makePostCommentClickable() {\n\t\tButton postComment = (Button) findViewById(R.id.postComment);\n\t\tpostComment.setOnClickListener(new View.OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tsendDataToServer();\n\t\t\t}\n\t\t});\n\t}", "public void onFavButtonClicked(View view) {\n isFav = !isFav;\n toggleButtonText(isFav);\n \n // Update DB\n new OperateWithDBMovieAsyncTask().execute(isFav ? ADD_MOVIE : REMOVE_MOVIE);\n }", "void onChannelTitleClick(Item item);", "@Override\n public void onClick(View view) {\n mVoteListener.editListener(\"newQuestion\",\n \"newOptionOne\", \"newOptionTwo\");\n }", "private void searchSubreddit(String searchQuery) {\n mLoadingIndicatorPB.setVisibility(View.VISIBLE);\n\n // Create url string\n Bundle loaderArgs = new Bundle();\n String searchSubredditUrl = SubredditSearchUtils.buildSubredditSearchURL(searchQuery, \"25\", \"relevancy\");\n loaderArgs.putString(SEARCH_URL_KEY, searchSubredditUrl);\n LoaderManager loaderManager = getSupportLoaderManager();\n loaderManager.restartLoader(SEARCH_LOADER_ID, loaderArgs, this);\n }", "@Override\n public void onClick(View v) {\n buttonAddClicked();\n }", "void acceptQueAnswersClicked();", "void onAddParameterButtonClick();", "@Override\r\n \t\t\tpublic void onClick(ClickEvent event) {\n \t\t\t\tmovieProvider.getList().add(new Movie(\"\", 0, Language.English, \"\", \"\"));\r\n \t\t\t\tmovieTable.redraw();\r\n \t\t\t\t//movieProvider.refresh();\r\n \t\t\t\tWindow.alert(\"Added\");\r\n \t\t }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(edit_add.getText().toString().length()>0){\n\t\t\t\t\taddQuestion(UrlUtils.USERQUESTIONADD, edit_add.getText().toString());\n\t\t\t\t}\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n int itemPosition = position;\n\n // ListView Clicked item value\n String sub = (String) lvSubRedditList.getItemAtPosition(position);\n Toast toast = Toast.makeText(getContext(), sub, Toast.LENGTH_SHORT);\n toast.show();\n\n\n int opened = 1;\n\n if (db.getSubReddit(sub).getOpened() == 0) {\n db.openSubRedditFirstTime(sub);\n opened = 0;\n }\n\n Class fragClass = Fragment_Posts.class;\n try {\n Fragment frag = (Fragment) fragClass.newInstance();\n Bundle args = new Bundle();\n args.putString(\"subName\", sub);\n args.putInt(\"opened\", opened);\n frag.setArguments(args);\n switchFragment(frag);\n } catch (Exception e) {\n e.printStackTrace();\n Log.i(\"StartFrag\", \"Failed\");\n }\n\n\n }", "@Override\n\tprotected void initAddButton() {\n addBtn = addButton(\"newBtn\", TwlLocalisationKeys.ADD_BEAT_TYPE_TOOLTIP, new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tnew AddEditBeatTypePanel(true, null, BeatTypesList.this).run(); // adding\n\t\t\t\t}\n\t }); \t\t\n\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tAllSongs allSongs = new AllSongs();\n\t\t\t\t\t// AllSongs allSongs = new AllSongs();\n\t\t\t\t\tJPanel jp = allSongs.displaySongsOnThePanel(new File(playListPath), false);\n\t\t\t\t\tjavax.swing.GroupLayout allSongsLayout = new javax.swing.GroupLayout(jp);\n\t\t\t\t\tjp.setLayout(allSongsLayout);\n\t\t\t\t\tallSongsLayout.setHorizontalGroup(\n\t\t\t\t\t\t\tallSongsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 510,\n\t\t\t\t\t\t\t\t\tShort.MAX_VALUE));\n\t\t\t\t\tallSongsLayout.setVerticalGroup(\n\t\t\t\t\t\t\tallSongsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 420,\n\t\t\t\t\t\t\t\t\tShort.MAX_VALUE));\n\t\t\t\t\t// JFrame frame3 = new JFrame();\n\t\t\t\t\t// frame3.setSize(500,500);\n\t\t\t\t\t// frame3.setLocation(300,200);\n\t\t\t\t\t// frame3.add(jp);\n\t\t\t\t\t// frame3.setVisible(true);\n//\t\t\t\t\tMusicPlayer.window.add(jp);\n\t\t\t\t\tMusicPlayer.window.getContentPane().add(jp);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(playListFile));\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t\t/*\n\t\t\t\t\t * On click of crete playlist button, I should be able to\n\t\t\t\t\t * create another button and add it to the panel\n\t\t\t\t\t * ????????????\n\t\t\t\t\t */\n\n\t\t\t\t}", "private void setupClickEvents() {\n ivAddNewCategory.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n addNewCategory();\n }\n });\n }", "public void tweetButton() {\n ReusableActionsPageObjects.clickOnElement(driver, tweetButton, logger, \"tweet.\");\n }", "@Override\n \tpublic void onClick (View v)\n \t{\n \t\tString status = editText.getText().toString();\n \t\tnew PostToTwitter().execute(status);\n \t}", "@Override\n public void onClick(View v) {\n addUpdateNotes();\n }", "@Override\n public void onClick(View v) {\n FavouriteDatabase fd = new FavouriteDatabase();\n fd.addToFavouritesList(catID);\n Toast.makeText(getContext(), \"Added to your Favourites\", Toast.LENGTH_SHORT).show();\n }", "public interface Callbacks {\n void onSubmissionSelected(SubredditSubmission subredditSubmission);\n }", "void OnNextButtonClicked(String buttonClicked,StoriesClass currentStor);", "@Override\n public void onClick(View view) {\n CreatePost createPost = new CreatePost(context, selectedPic);\n createPost.execute(title.getText().toString(), description.getText().toString());\n }", "private void addRcmButtonHandler() {\n\t\tTitledBorder border = new TitledBorder(\" ADD RCM\");\n\t\tborder.setTitleFont(new Font(\"TimesNewRoman\", Font.BOLD, 12));\n\t\tdisplayPanel.setBorder(border);\n\t\t\n\t\tdisplayPanel.removeAll();\n\t\tdisplayPanel.add(new AddRcmPanel(rmos, rmosManager, statusManager));\n\t\tdisplayPanel.revalidate();\n\t\tdisplayPanel.repaint();\n\t}", "void addButton_actionPerformed(ActionEvent e) {\n doAdd();\n }", "@Override\n public void onClick(View view) {\n startPosting();\n\n }", "private void acceptListener() {\n addDialog.getAccept().addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n try {\n Task newTask = new Task(addDialog.getTaskName().getText(), addDialog.getTaskDesc().getText(),\n Integer.parseInt(addDialog.getTaskDate().getText()));\n toDoList.addTask(newTask);\n } catch (NumberFormatException | InvalidTitleException a) {\n addDialog.dispose();\n }\n addDialog.dispose();\n refresh();\n }\n });\n }", "private void setButtonListener(Button button){\n \tfinal Context ctx = this.getActivity();\n \tfinal String tag = button.getText().toString();\n \t// button on click listers\n \t\tbutton.setOnClickListener(new OnClickListener() {\n \t\t\t@Override\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tIntent intent = new Intent(ctx, Questions_Tab_Activity.class);\n \t\t\t\tintent.putExtra(\"tagPressed\", tag);\n \t\t\t\tintent.putExtra(\"UserID\", userId);\n// \t\t\t\tif(multiTag)\n \t\t\t\t\tintent.putExtra(\"typeSearch\", 3);\n// \t\t\t\telse\n// \t\t\t\t\tintent.putExtra(\"typeSearch\", 1);\n \t\t\t\tstartActivity(intent);\n \t\t\t\t\n \t\t\t}\n \t\t});\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(isAdded()){\n\t\t\t\t\tif(comment.getText().length()>0){\n\n\t\t\t\t\t\t//\t\t\t\t\t\tcommentSubject=subject.getText().toString().trim();\n\t\t\t\t\t\tcommentStr=comment.getText().toString().trim();\n\t\t\t\t\t\tif(sharedImagePath==null){\n\t\t\t\t\t\t\tAlertHomeFragment dialog=new AlertHomeFragment(HomeFragment.this,\"Info\",\"Image not added to post.\\n\\nNote: Sharing your image with your status is recommended.\",\"Proceed Anyway\",\"Cancel\",false,\"not_added\");\n\t\t\t\t\t\t\tdialog.setCancelable(true);\n\t\t\t\t\t\t\tdialog.show(fm, \"post\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tmyPrefs = getActivity().getSharedPreferences(\"myPrefs\",getActivity().MODE_PRIVATE);\n\t\t\t\t\t\t\tdoPostCommentsActions(myPrefs);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tAlertHomeFragment dialog=new AlertHomeFragment(HomeFragment.this,\"Warning\",\"All fields are mandatory to be filled.\",\"OK\",\"Proceed\",true,\"field_check\");\n\t\t\t\t\t\tdialog.setCancelable(true);\n\t\t\t\t\t\tdialog.show(fm, \"field\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tstatusAlert.dismiss();\n\t\t\t\t\tToast.makeText(getActivity(), \"Something went wrong.Try sharing your updates again.\", 1000).show();\n\t\t\t\t}\n\t\t\t}", "public interface OnReviewItemListener {\n void onReviewItemClick(ReviewContent content);\n}", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tif(!stock.isBookmarked()){\n\t\t\t\t\t\t\tToast.makeText(StockListActivity.this, stock.getStockCode().toString()+\" added to Watchlist \",Toast.LENGTH_SHORT).show\n\n\t();\n\t\t\t\t\t\t\tstock.setBookmarked(true);\n\t\t\t\t\t\t\taddToWatchlist(stock);\n\t\t\t\t\t\t\tiButton.setImageResource(R.drawable.bookmark_yes);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tToast.makeText(StockListActivity.this, stock.getStockCode().toString()+\" removed from Watchlist \",Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\tstock.setBookmarked(false);\n\t\t\t\t\t\t\tremoveFromWatchlist(stock);\n\t\t\t\t\t\t\tiButton.setImageResource(R.drawable.bookmark_no);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void addSubject(final View v) {\n //final ArrayList<String> dummySubjectList = new ArrayList<String>();\n\n //Creates the alert dialogue\n final AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);\n final EditText input = new EditText(this);\n alertDialog.setView(input);\n\n //Setting Dialog Title\n alertDialog.setTitle(\"Add subject\");\n\n //Setting Icon to Dialog\n alertDialog.setIcon(R.drawable.ic_tutorme);\n\n //Add skills visually, and pass to the server\n alertDialog.setPositiveButton(\"Add\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n String skill = input.getText().toString();\n Button newSkill = new Button(findViewById(R.id.subjectList).getContext());\n dummySubjectList.add(skill);\n newSkill.setText(skill);\n //newSkill.setBackgroundColor(getResources().getColor(R.color.gray));\n\n\n //Add functionality to button\n newSkill.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n removeSkill(view);\n }\n });\n subjectButtons.add(newSkill);\n\n LinearLayout layout = (LinearLayout) findViewById(R.id.subjectList);\n layout.removeView(v);\n layout.addView(newSkill);\n layout.addView(v);\n\n //TODO: Push arraylist to server\n\n }\n });\n\n alertDialog.setNeutralButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n\n }\n });\n\n alertDialog.show();\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\taddLikeRelationship(jsonArray.getJSONObject(index).getInt(\"postid\"),index);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "@SuppressWarnings(\"unchecked\")\n @Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp)\n throws IOException {\n resp.setStatus(204);\n\n SyndFeed feed = Feeds.parseFeed(req.getInputStream());\n if (feed == null) {\n return;\n }\n \n List<SyndEntry> entries = feed.getEntries();\n \n if (entries.isEmpty()) {\n return;\n } \n \n JID user = new JID(req.getPathInfo().substring(1));\n // TODO(mihaip): this is potentially incorrect if a feed gets redirected and\n // its self URL changes since the time the subscription was created\n List<URL> feedUrls = Feeds.getLinkUrl(feed, Feeds.SELF_RELATION); \n if (!feedUrls.isEmpty()) {\n URL feedUrl = feedUrls.get(0);\n List<Subscription> subscriptions =\n Subscription.getSubscriptionsForUserAndFeedUrl(user, feedUrl);\n \n if (!subscriptions.isEmpty()) {\n final Subscription subscription = subscriptions.get(0);\n Set<String> seenEntryIds = subscription.getSeenEntryIds();\n List<String> newEntryIds = Lists.newArrayList();\n List<SyndEntry> filteredEntries = Lists.newArrayList();\n for (SyndEntry entry : entries) {\n String entryId = Feeds.getEntryId(entry);\n if (seenEntryIds.contains(entryId)) {\n logger.info(\"Filtering out already seen entry from \" + feedUrl);\n continue;\n }\n filteredEntries.add(entry);\n newEntryIds.add(entryId);\n }\n \n if (!filteredEntries.isEmpty()) {\n subscription.addSeenEntryIds(newEntryIds);\n Persistence.withManager(new Persistence.Closure() {\n @Override public void run(PersistenceManager manager) {\n manager.makePersistent(subscription);\n }\n });\n } else {\n return;\n }\n \n entries = filteredEntries;\n } else {\n logger.warning(\"Got notification for feed without subscription \" + feedUrl);\n }\n }\n \n \n // If subscribing to a previously unseen URL, the hub might report a bunch\n // of entries as new, so we sort them by published date and only show the\n // first few\n Collections.sort(entries, new Comparator<SyndEntry>() {\n @Override public int compare(SyndEntry o1, SyndEntry o2) {\n if (o1.getPublishedDate() == null) {\n return 1;\n }\n if (o2.getPublishedDate() == null) {\n return -1;\n }\n return o2.getPublishedDate().compareTo(o1.getPublishedDate());\n }\n });\n \n List<SyndEntry> displayEntries;\n if (entries.size() > MAX_ENTRIES_TO_DISPLAY) {\n displayEntries = entries.subList(0, MAX_ENTRIES_TO_DISPLAY);\n } else {\n displayEntries = entries;\n }\n \n StringBuilder message = new StringBuilder(\"Update from \")\n .append(StringEscapeUtils.unescapeHtml4(feed.getTitle())).append(\":\");\n for (SyndEntry displayEntry : displayEntries) {\n String title = displayEntry.getTitle();\n if (Strings.isNullOrEmpty(title)) {\n title = \"(title unknown)\";\n } else {\n title = StringEscapeUtils.unescapeHtml4(title);\n }\n String link = displayEntry.getLink();\n if (Strings.isNullOrEmpty(link)) {\n link = \"<no link>\";\n }\n \n message.append(\"\\n \").append(title).append(\": \").append(link);\n }\n \n if (displayEntries.size() != entries.size()) {\n message.append(\"\\n (and \")\n .append(entries.size() - displayEntries.size()).append(\" more)\");\n }\n \n Xmpp.sendMessage(user, message.toString());\n }", "@Override\n protected void onHandleIntent(Intent intent) {\n if (intent != null) {\n\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);\n int[] appWidgetIds = appWidgetManager.getAppWidgetIds(\n new ComponentName(this, MyRedditWidget.class));\n\n Cursor data = getContentResolver().query(\n MainActivity.CONTENT_URI,\n null,\n null,\n null,\n null);\n\n data.moveToFirst();\n String subr = \"\";\n try {\n while (data.moveToNext()) {\n subr += data.getString(0) + \",\";\n }\n } finally {\n data.close();\n }\n\n for (int appWidgetId : appWidgetIds) {\n Intent launchIntent = new Intent(this, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, launchIntent, 0);\n\n // Construct the RemoteViews object\n RemoteViews views = new RemoteViews(this.getPackageName(), R.layout.myreddit_widget);\n views.setTextViewText(R.id.appwidget_text, subr );\n views.setOnClickPendingIntent(R.id.appwidget_text, pendingIntent);\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }\n }\n }", "@FXML\r\n private void onBtnAddReview(ActionEvent event) {\n reviewRecordsList.add(new ReviewRecords(reviewRecordsList.size()));\r\n }", "public void addAddMovieButtonListener(ActionListener l)\n\t{\n\t\taddMovieButton.setActionCommand(\"Add Movie\");\n\t\taddMovieButton.addActionListener(l);\n\t}", "public static void addSubCommand(String root,String sub) {\n\t\tcommands.get(root).add(sub);\n\t\tlast[0] = root;\n\t\tlast[1] = sub;\n\t}", "@Override\n protected void addListener() {\n button.addActionListener(new DeleteWorkoutButton.ClickHandler());\n }", "@Override\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tNoteEditView.this.addAudio();\n \t\t\t}", "@Override\n public void onClick(View view) {\n Intent hitsIntent = new Intent(Playlists.this, Playing_now.class);\n startActivity(hitsIntent);\n }", "public void clickAddButton() {\n\t\tfilePicker.fileManButton(locAddButton);\n\t}", "@Override\r\n public void onClick(View v) {\n profileClick(mFeedReplyList.get(pos));\r\n }", "void onDiscoverItemClicked(Movie item);", "public AddRandomList() {\n setTitleText(\"Add new random List\");\n\n addButton.setText(\"Add\");\n addButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addButtonActionPerformed(evt);\n }\n });\n addButton(addButton);\n }", "@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tif (!loginInfo.isLoggedIn()) {\r\n\t\t\t\tWindow.open(loginInfo.getLoginUrl(), \"_self\", \"\"); \r\n\t\t\t}\r\n\t\t\telse { //logged in\r\n\t\t\t\tloginService.addOrUpdateRating(loginInfo.getEmail(), \r\n\t\t\t\t\tnewRating,\r\n\t\t\t\t\tnew AsyncCallback() {\r\n\t\t\t\t\t\tpublic void onFailure(Throwable error) {\r\n\t\t\t\t\t\t\tGWT.log(\"\", error);\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 void onSuccess(Object result) {\r\n\t\t\t\t\t\t\t//refresh client side userRating\r\n\t\t\t\t\t\t\tSwagItemRating previousRating = loginInfo.getSwagItemRating(newRating.getSwagItemKey());\r\n\t\t\t\t\t\t\tif (previousRating!=null) {\r\n\t\t\t\t\t\t\t\tloginInfo.getSwagItemRatings().remove(previousRating);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tloginInfo.getSwagItemRatings().add(newRating);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//update stars\r\n\t\t\t\t\t\t\tupdateUserRatingStars(newRating.getSwagItemKey());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\trefreshItem();\r\n\t\t\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}", "@Override\n public void onClick(View view) {\n Intent songsIntent = new Intent(Playlists.this, MainActivity.class);\n startActivity(songsIntent);\n }", "@FXML\n\tvoid AddVisitor_Button_Clicked(ActionEvent event) { // could the visitor be for different parks? time? date ?\n\t\tString ordererId = PopUp.getUserInput(\"Private Group Order\", \"Enter ID of the visitor\", \"ID or Subscriber ID\");\n\n\t\tif (!CheckID(ordererId)) {\n\t\t\tPopUp.showInformation(\"Please enter appropriate ID\", \"Please enter appropriate ID\",\n\t\t\t\t\t\"Please enter appropriate ID\");\n\t\t} else if (visitorsIDArray.contains(ordererId) || visitorsIDArray.contains(\"S\" + ordererId)\n\t\t\t\t|| visitorsIDArray.contains(ordererId.substring(1, ordererId.length()))) {\n\t\t\tPopUp.showInformation(\"This ID already is added\", \"This ID already is added\", \"This ID already is added\");\n\t\t} else {\n\t\t\tvisitorsIDArray.add(ordererId);\n\t\t\tPopUp.showInformation(\"Visitor Added\", \"Visitor Added\", \"Visitor Added\");\n\t\t\tvisitorsCounter++;\n\t\t\tlistViewVisitors.getItems().add(\"visitor #\" + visitorsCounter + \" \" + \"(\" + ordererId + \")\");\n\t\t\tPlaceOrder_Button.setDisable(false);\n\t\t\tRemoveVisitor_Button.setDisable(false);\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tpulllist();\n\t\t\t}", "public void onAddCategoryButtonClicked(View v){\n //starts addcategory activity\n Intent addCategoryIntent = new Intent(this, AddCategoryActivity.class);\n startActivity(addCategoryIntent);\n }", "public interface OnNextButtonClicked {\n // TODO: Update argument type and name\n void OnNextButtonClicked(String buttonClicked,StoriesClass currentStor);\n }", "@Override\r\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\r\n\t\t\t\tvenEditarPacks.init(\"NEW\",null);\r\n\t\t\t\tUI.getCurrent().addWindow(venEditarPacks);\r\n\t\t\t\t\r\n\t\t\t}", "private void getAddButtonSemantics() {\r\n String requestingTweetID = addTweet.getidTextField().getText();\r\n String requestingTweetBody = addTweet.getBodyTextField().getText();\r\n JFrame error = new JFrame(\"Error\");\r\n\r\n if (!isNumeric(requestingTweetID) || requestingTweetID.contains(\"-\")) {\r\n JOptionPane.showMessageDialog(error, \"The specified ID is not a valid number!\");\r\n } else {\r\n Tweet requestingTweet = new Tweet(requestingTweetID, requestingTweetBody);\r\n requestingTweet.setID(requestingTweetID);\r\n requestingTweet.setBody(requestingTweetBody);\r\n if (twitterModel.contains(requestingTweet)) {\r\n JOptionPane.showMessageDialog(error, \"The specified ID is not a valid number!\");\r\n } else {\r\n twitterModel.add(requestingTweet);\r\n System.out.println(\"Tweet added: \" + requestingTweet.getID() + \": \" + requestingTweet.getBody());\r\n// for (int i = 0; i < twitterModel.getTweetList().size(); i++) {\r\n// //System.out.println(Arrays.toString(twitterModel.getTweetList().toArray()));\r\n//\r\n// }\r\n System.out.println(twitterModel.getTweetList());\r\n }\r\n }\r\n }", "public void openTheListOfGadgets(){\r\n\t\tdriver.findElement(By.xpath(\"\"+TODAY_WIN_XPATH+\"//button[contains(text(),'Add more..')]\")).click();\r\n\t\tReporter.log(\"List Of Gadgets Buttons is clicked\",true);\r\n\t}", "@Override\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tscrollPanel.clear();\r\n\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\t * Entfernung der evtl. zuvor ausgegebenen Fehlermeldung\r\n\t\t\t\t * in der infoBox\r\n\t\t\t\t */\r\n\t\t\t\t\tinfoBox.clear();\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Erzeugt aus den Text aus dem Suchfeld das Keyword und\r\n\t\t\t\t\t * entfernt ggf. Leerzeichen.\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString keyword = suggestBox.getText().trim()\r\n\t\t\t\t\t\t\t.replaceAll(\" \", \"\");\r\n\t\t\t\t\tfor (Hashtag hashtag : allHashtag) {\r\n\t\t\t\t\t\tif (hashtag.getKeyword() == keyword) {\r\n\t\t\t\t\t\t\thashtagSelection = hashtag;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Überprüfung ob mindestens drei Zeichen eingegeben wurden.\r\n\t\t\t\t\t */\r\n\t\t\t\t\tif (!FieldVerifier.isValidHashtag(keyword)) {\r\n\t\t\t\t\t\tinfoBox.setWarningText(\"Please select a Hashtag with at least three characters!\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\t * Lädt alle User, die der ausgewählte User abonniert hat und startet die Methode \r\n\t\t\t\t * \"generateUserSubscriptionReport(result)\" der Klasse \"HTMLUserSubscriptionReport\", \r\n\t\t\t\t * die den Report aufbaut und im ScrollPanel ausgibt\r\n\t\t\t\t * \r\n\t\t\t\t * @see HTMLUserSubscriptionReport\r\n\t\t\t\t */ \r\n\t\t\t\tadministration.getAllFollowersFromHashtag(hashtagSelection, new AsyncCallback<Vector<User>>() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onSuccess(Vector<User> result) {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Zuweisung und Anpassung des Widgets.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tscrollPanel.setSize(\"100%\", \"100%\");\r\n\t\t\t\t\t\tRootPanel.get(\"Details\").add(scrollPanel);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Fügt den generierten Report dem scrollPanel hinzu.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tscrollPanel.add(HTMLHashtagFollowerReport.generateHashtagFollowerReport(result, hashtagSelection));\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmListener.onAddMorePressed(editContent.getEditableText().toString());\r\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}", "public void onAdd() {\n String bookTitle = details[0];\n String author = details[1];\n boolean addedCorrectly = ControllerBook.addBook(this.ISBN, author, bookTitle, \"\");\n if (addedCorrectly) {\n dispose();\n } else {\n\n pack();\n }\n\n }", "public void btn_AddActivity(View view) {\n startActivity(new Intent(this, add_Recipe.class));\n }", "public void addComment(BlogEntry blog, CommentForm comment);", "void addScoreButtonListener() {\n Button leadButton = findViewById(R.id.leaderBoard);\n leadButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n switchToActivity(ScoreBoardActivity.class);\n }\n });\n }", "@Override\n public void onClick(View view) {\n Intent albumsIntent = new Intent(PlaylistsActivity.this, AlbumsActivity.class);\n startActivity(albumsIntent);\n }", "private void handleRepostButtonClick(boolean performRepost) {\n performUIActivitiesForRepost(performRepost);\n\n if (performRepost) {\n DatabaseAction.performRepost(prismPost);\n } else {\n DatabaseAction.performUnrepost(prismPost);\n }\n }", "void enablButtonListener();", "private void vote(Vote whichVoteButton, MenuItem item, PostData p) {\n if (!RedditLoginInformation.isLoggedIn()) {\n Toast.makeText(this, R.string.you_must_be_logged_in_to_vote, Toast.LENGTH_SHORT).show();\n return;\n }\n\n Intent intent = new Intent(Consts.BROADCAST_UPDATE_SCORE);\n intent.putExtra(Consts.EXTRA_PERMALINK, p.getPermalink());\n\n switch (whichVoteButton) {\n case DOWN:\n switch (p.getVote()) {\n case DOWN:\n RedditService.vote(this, p.getName(), Vote.NEUTRAL);\n item.setIcon(R.drawable.ic_action_downvote);\n p.setVote(Vote.NEUTRAL);\n p.setScore(p.getScore() + 1);\n break;\n\n case NEUTRAL:\n case UP:\n RedditService.vote(this, p.getName(), Vote.DOWN);\n item.setIcon(R.drawable.ic_action_downvote_highlighted);\n p.setVote(Vote.DOWN);\n mUpvoteMenuItem.setIcon(R.drawable.ic_action_upvote);\n p.setScore(p.getScore() - 1);\n break;\n }\n break;\n\n case UP:\n switch (p.getVote()) {\n case NEUTRAL:\n case DOWN:\n RedditService.vote(this, p.getName(), Vote.UP);\n item.setIcon(R.drawable.ic_action_upvote_highlighted);\n p.setVote(Vote.UP);\n p.setScore(p.getScore() + 1);\n mDownvoteMenuItem.setIcon(R.drawable.ic_action_downvote);\n break;\n\n case UP:\n RedditService.vote(this, p.getName(), Vote.NEUTRAL);\n item.setIcon(R.drawable.ic_action_upvote);\n p.setVote(Vote.NEUTRAL);\n p.setScore(p.getScore() - 1);\n break;\n }\n\n break;\n\n default:\n break;\n }\n\n // Broadcast the intent to update the score in the ImageDetailFragment\n intent.putExtra(Consts.EXTRA_SCORE, p.getScore());\n LocalBroadcastManager.getInstance(this).sendBroadcast(intent);\n }", "@Override\n public void onClick(View v) {\n doPostThatYeah();\n }", "private void addPlayAgainButtonListener() {\n Button playAgainButton = findViewById(fall2018.csc2017.gamehub.R.id.hanoPlayAgain);\n playAgainButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent hanoStart = new Intent(HanoEnd.this,\n fall2018.csc2017.gamehub.TowerOfHano.StartingActivity.class);\n hanoStart.putExtra(\"scoreboardManager\",scoreboardManager);\n hanoStart.putExtra(\"userManager\",userManager);\n startActivity(hanoStart);\n }\n });\n }", "@Override\n public void onClick(View view) {\n Intent playerIntent = new Intent(PlaylistsActivity.this, MainActivity.class);\n startActivity(playerIntent);\n }", "@OnClick(R.id.fab_add_forum_post)\n void onClick() {\n CreateDiscussionFragment createDiscussionFragment = new CreateDiscussionFragment();\n createDiscussionFragment.show(getFragmentManager(), \"Create Discussion\");\n }", "private void commentPopItemActionPerformed(java.awt.event.ActionEvent evt) {\n comment();\n }", "void makeTweet(OnTweetPostListener onTweetPostListener);", "public void mo76613b(SearchSubTab searchSubTab) {\n TextView textView = (TextView) mo108897N();\n textView.setText(searchSubTab.title);\n textView.setTextColor(this.f52184a.getResources().getColor(searchSubTab.selected ? R.color.GBL01A : R.color.GBK04A));\n textView.setBackground(this.f52184a.getResources().getDrawable(searchSubTab.selected ? R.drawable.a_y : R.drawable.a_x));\n this.itemView.setOnClickListener(new View.OnClickListener(searchSubTab) {\n /* class com.zhihu.android.app.search.p1259ui.holder.$$Lambda$SearchSubTabHolder$J3wJO6J35gxJsiH1gIuMw53CZI */\n private final /* synthetic */ SearchSubTab f$1;\n\n {\n this.f$1 = r2;\n }\n\n public final void onClick(View view) {\n SearchSubTabHolder.m156407lambda$J3wJO6J35gxJsiH1gIuMw53CZI(SearchSubTabHolder.this, this.f$1, view);\n }\n });\n }", "void configureButtonListener();", "private void addReview(){\n db = DatabaseHelper.getInstance(this).getWritableDatabase();\n btn = findViewById(R.id.rvBtn);\n btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n editText = findViewById(R.id.rvEditText);\n ratingBar = findViewById(R.id.rvRatingBar);\n\n String comment = editText.getText().toString();\n double rating = ratingBar.getRating();\n\n if(rating == 0){\n Toast.makeText(BookReviewActivity.this, \"Please add your rating\", Toast.LENGTH_SHORT).show();\n } else if(comment.equals(\"\")){\n Toast.makeText(BookReviewActivity.this, \"Please add your comment\", Toast.LENGTH_SHORT).show();\n } else {\n db.execSQL(\"INSERT INTO REVIEW (Comment, Rate, BookID) VALUES ('\"+comment+\"','\"+rating+\"','\"+bookIDSelected+\"');\");\n Toast.makeText(BookReviewActivity.this, comment+\", \"+rating, Toast.LENGTH_SHORT).show();\n }\n\n loadReviews();\n\n }\n });\n }", "public void submit_intsatpos(View button) {\n }", "public void addFavourite(View view){\n // We need to get the input from the fields\n EditText editTextName = (EditText) findViewById(R.id.editTextItemName);\n\n // First we need to make sure that the two required fields have entries and are valid\n if (editTextName.length() == 0) {\n Context context = getApplicationContext();\n CharSequence text = \"Missing Name.\";\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n\n return;\n }\n\n Context context = getApplicationContext();\n CharSequence text = \"Entry added as favourite\";\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n view.setClickable(false); // Turns button off //\n view.setVisibility(View.INVISIBLE);\n\n // Also make text entry invisible\n editTextName.setVisibility(editTextName.INVISIBLE);\n\n Globals.l.add(editTextName.getText().toString(),Globals.f);\n\n\n }", "@Override\n public void onClick(View v) \n {\n TableRow buttonTableRow = (TableRow) v.getParent();\n Button searchButton = \n (Button) buttonTableRow.findViewById(R.id.newListButton);\n \n String list = searchButton.getText().toString();\n \n // set EditTexts to match the chosen url and site_name\n listEditText.setText(list);\n urlEditText.setText(savedSiteList.getString(list, \"\"));\n }", "private void onWhatTokenButtonClick() {\r\n\r\n //Open related web post\r\n Intent i = new Intent(Intent.ACTION_VIEW);\r\n i.setData(Uri.parse(getString(R.string.url_github_about_tokens)));\r\n startActivity(i);\r\n }", "@Listen(\"onClick=#createEntryButton\")\n public void createEntryButtonOnClick(){\n Window window = (Window) Executions.createComponents(\"entry.zul\", phonePageWindow, new HashMap());\n window.doModal();\n }" ]
[ "0.59105355", "0.5766586", "0.5602713", "0.5513272", "0.54776305", "0.536728", "0.53610915", "0.5357793", "0.5329149", "0.5309097", "0.52954656", "0.528884", "0.5280583", "0.52751905", "0.5236698", "0.5174683", "0.5169322", "0.5167417", "0.51632684", "0.51372737", "0.5095003", "0.5084027", "0.5077822", "0.50674945", "0.5064026", "0.5053359", "0.5047156", "0.5044166", "0.50210506", "0.50209695", "0.5016364", "0.5011653", "0.50095445", "0.500433", "0.49864662", "0.49825737", "0.49567428", "0.4955708", "0.49541888", "0.49531877", "0.4952239", "0.4948891", "0.4921087", "0.49199194", "0.4900585", "0.48800468", "0.4875707", "0.48683983", "0.4863647", "0.48604593", "0.48548433", "0.48535147", "0.4845531", "0.48289698", "0.4825747", "0.4825445", "0.48205405", "0.48174894", "0.48147678", "0.48085004", "0.48035276", "0.48034993", "0.47883615", "0.47873917", "0.47850698", "0.47700784", "0.47672808", "0.47542858", "0.47416547", "0.47375914", "0.4734223", "0.47322714", "0.47319496", "0.4724902", "0.47205675", "0.47178954", "0.47165498", "0.47147432", "0.47116676", "0.47110406", "0.47105625", "0.47044656", "0.47032478", "0.47027484", "0.47010562", "0.46974272", "0.4696038", "0.4693046", "0.468962", "0.46851113", "0.46840474", "0.4681978", "0.46795875", "0.46794552", "0.4673301", "0.467034", "0.46657157", "0.46651673", "0.46592474", "0.46582592" ]
0.74175614
0
/ Interface from adapter to check whether name exists in database to assign add/remove button
@Override public Boolean AdapterCheckIfExistInDB(String subredditName) { return checkSubredditSaved(subredditName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isInsert(String name){\n Cursor a = db.query(TABLE_NAME,new String[]{NAME}, NAME + \" LIKE \\\"\" + name + \"\\\"\",null,null,null, null);\n\n if (a.getCount() == 0){\n return false;\n }else{\n return true;\n }\n }", "boolean hasDataName();", "public boolean has(String itemName);", "@Override\n\tpublic boolean isExist(String name) {\n\t\treturn false;\n\t}", "boolean isSetName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean insertList(DBHelper db, String name) {\r\n SQLiteDatabase sdb = db.getWritableDatabase();\r\n cursor = null;\r\n String check = \"SELECT * FROM \" + table_name_1 + \" WHERE list_name='\" + name + \"'\";\r\n cursor = sdb.rawQuery(check, null);\r\n if (cursor.getCount() <= 0) {\r\n ContentValues cv = new ContentValues();\r\n cv.put(\"list_name\", name);\r\n sdb.insertOrThrow(table_name_1, null, cv);\r\n Log.d(\"Database operations\", \"one row inserted\");\r\n cursor.close();\r\n return true;\r\n } else {\r\n Log.d(\"Database operations\", \"Insertion failed, duplicate name\");\r\n cursor.close();\r\n return false;\r\n }\r\n\r\n }", "@Override\n\tprotected boolean itemExists() {\n\t\treturn false;\n\t}", "private boolean checkNameExistAdd(String userName) {\n\n\t\tUser user = this.userDAO.getUserByName(userName);\n\t\tif (null != user) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "@Override\n\tpublic boolean isHaveThisName(String name) {\n\t\tsql=\"select * from news_sort where sort_name=?\";\n\t\tDBUtil db =new DBUtil(sql);\n\t\ttry {\n\t\t\tdb.ps.setString(1,name);\n\t\t\trs=db.ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tdb.close();\n\t\t}\n\t\treturn false;\n\t\n\t}", "private boolean nameEntry() {\n EditText nameField = (EditText) findViewById(R.id.batman_identity);\n String batmanIdentity = nameField.getText().toString();\n\n if (batmanIdentity.equalsIgnoreCase(\"bruce wayne\")) {\n return true;\n }\n\n return false;\n\n }", "public void findByName() {\n String name = view.input(message_get_name);\n if (name != null){\n try{\n List<Customer> list = model.findByName(name);\n if(list!=null)\n if(list.isEmpty())\n view.showMessage(not_found_name);\n else\n view.showTable(list);\n else\n view.showMessage(not_found_error);\n }catch(Exception e){\n view.showMessage(incorrect_data_error);\n }\n } \n }", "private boolean validEntry() {\n EditText locationName = (EditText) findViewById(R.id.nameInput);\n\n // Validate required null fields\n if (locationName.getText().toString().trim().equals(\"\"))\n {\n return false;\n }\n\n // Query database to determine if name already exists in database\n String placeName = locationName.getText().toString();\n if (!placeName.equals(currentPlace.name)) {\n try {\n PlacesDB db = new PlacesDB((Context) this);\n SQLiteDatabase pDB = db.openDB();\n Cursor cur = pDB.rawQuery(\"select name from places where name=? ;\", new String[]{placeName});\n if (cur.getCount() > 0) {\n return false;\n }\n } catch (Exception ex) {\n android.util.Log.w(this.getClass().getSimpleName(), \"Unable to load places from database.\");\n }\n }\n return true;\n }", "private boolean moreProfileExists(String name) {\n \tdb = dbHelper.getReadableDatabase();\n\t Cursor cursor = db.query(DbContract.MoreEntry.TN, DbContract.MoreEntry.allColumns, DbContract.MoreEntry.CN_NAME + \" = '\" + name + \"'\", null, null, null, null);\n cursor.moveToFirst();\n if (cursor.getCount() == 0 || cursor.getString(1) == null){\n \tcursor.close();\n \treturn false;\n } \n cursor.close();\n return true;\n\t}", "boolean existsByName(String name);", "private boolean checkName(String name) {\n if (!name.equals(\"\")) {\n //Check si le nom est déjà utilisé\n return myDbA.checkName(name);\n }\n return false;\n }", "public void checkUsernameExist() {\n\n try {\n BLUser bluser = new BLUser();\n User user = new User();\n\n ResultSet rs = bluser.selectUserIdFromUsername(txt_username.getText());\n\n user.setUsername(txt_username.getText());\n bluser.setUser(user);\n\n if (bluser.checkUsernameExist()) {\n \n populateDataOnTable();\n }// end if\n else {\n JOptionPane.showMessageDialog(rootPane, \"Invalid username!\");\n }// end else \n\n }// end try\n catch (Exception ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage(), \"Exception\", JOptionPane.INFORMATION_MESSAGE);\n }//end catch\n }", "boolean nameExists(Key name);", "public abstract boolean isNameAvailable(String readerName);", "public boolean checkUserName(TextField userName) {\n String userNameSQL = \"SELECT * FROM user WHERE user_name = ? \";\n ResultSet rsUser;\n boolean username_exists = false;\n\n\n try {\n\n PreparedStatement userPST = connection.prepareStatement(userNameSQL);\n userPST.setString(1, userName.getText());\n rsUser = userPST.executeQuery();\n\n if (rsUser.next()) {\n username_exists = true;\n outputText.setStyle(\"-fx-text-fill: #d33232\");\n outputText.setText(\"Username Already Exists\");\n }\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n return username_exists;\n\n }", "public boolean hasAdapter(Object adaptable, String adapterTypeName);", "public boolean isNameSet( ) {\n \t\t\treturn id == null;\n \t\t}", "public boolean ifExists(Model model)\n\t{\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tCursor cursor = null;\n\t\tString checkQuery = \"SELECT \"+ KEY_NAME + \" FROM \" + TABLE_SHOP + \" WHERE \" + KEY_NAME + \"= '\"+model.getName() + \"'\";\n\t\tcursor= db.rawQuery(checkQuery,null);\n\t\tboolean exists = (cursor.getCount() > 0);\n\t\tcursor.close();\n\t\treturn exists;\n\t}", "public boolean checkIfNameExists(String name) {\n String[] projection = {\n MediaStore.Audio.Playlists._ID,\n MediaStore.Audio.Playlists.NAME\n };\n\n String selection = MediaStore.Audio.Playlists.NAME + \" = ? \";\n String[] selectionArgs = {\n name\n };\n\n Cursor cursor = getContentResolver().query(\n MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI,\n projection,\n selection,\n selectionArgs,\n null);\n\n // id is the ID of the playlist that is found to have the same name as the new name, if no\n // playlist if found for this name, id = -1\n int id = -1;\n\n if (cursor != null) {\n cursor.moveToFirst();\n if (!cursor.isAfterLast()) {\n id = cursor.getInt(0);\n }\n }\n cursor.close();\n\n if (id == -1) {\n return false;\n } else {\n return true;\n }\n\n }", "public boolean isSetName() {\r\n return this.name != null;\r\n }", "public boolean isSetName() {\n return this.name != null;\n }", "public boolean isSetName() {\n return this.name != null;\n }", "public boolean isSetName() {\n return this.name != null;\n }", "public boolean isSetName() {\n return this.name != null;\n }", "protected abstract boolean isAddAdapterHeader();", "@Override\n public boolean containsNameProfesor(String Name) {\n try {\n Entity retValue = null; \n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"SELECT * FROM persona where nombre = ?\");\n\n pstmt.setString(1, Name);\n\n rs = pstmt.executeQuery();\n\n if (rs.next()) {\n return true; \n } \n \n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n return false;\n }", "public boolean ifHasArrangement (String userToDelete)\n {\n cursor2 = arrangement_db.rawQuery(\"SELECT * FROM \"+MyArrangementSQLiteHelper.TABLE_NAME+\" WHERE \"+MyArrangementSQLiteHelper.COLUMN_USERNAME+\"=?\",new String[] {userToDelete});\n if (cursor2!=null)\n {\n cursor2.moveToFirst();\n return true ;\n }\n return false ;\n }", "public boolean isSetName() {\n return this.Name != null;\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()){\n case R.id.rename_button_id:\n DBConnection dbConnection=new DBConnection(renameView.getContext());\n\n if(dbConnection.rename(id,type,renameEditText.getText().toString()) == 1){\n updateFragment(CAT_ID);\n dismiss();\n Toast.makeText(getActivity(),type+\" has been renamed successfully\",Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(getActivity(),\"Rename Error !!\",Toast.LENGTH_LONG).show();\n dismiss();\n }\n break;\n case R.id.rename_cancel_button_id:\n dismiss();\n break;\n }\n }", "public boolean addName(String name) {\n\t\tboolean resultOK = false;\n\t\tPreparedStatement ps = null;\n\t\ttry{\n\t\t\tString responces = \"insert into responses values(?, null, null, null, null)\";\n\t\t\tps = conn.prepareStatement(responces);\n\t\t\tps.setString(1, name);\n\t\t ps.executeUpdate(); \n\t\t resultOK = true;\n\t\t ps.close();\n\t\t} catch (SQLException e) {\n\t\t resultOK = false; // one reason may be that the name is already in the database\n\t\t if(e.getErrorCode()==1062 && e.getSQLState().equals(\"23000\")){ \n\t\t \t// duplicate key error\n\t\t \t// System.out.println(name + \" already exists in the database\");\n\t\t } else {\n\t\t\t\tprintSqlError(e);\n\t\t }\n\t\t} finally {\n\t\t\tif(ps != null){\n\t\t\t\ttry {\n\t\t\t\t\tps.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tprintSqlError(e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn resultOK;\n\t}", "public void onAddItem(View view) {\n EditText editText = (EditText) findViewById(R.id.editText);\n // get the contents and cast from an Object to a String\n String text = editText.getText().toString();\n mNameMatch = false;\n\n // add the text to our adapter if text isn't blank\n if (text.trim().length() > 0) {\n for (int i = 0; i < mCurrentList.size(); i++) {\n if (text.equals(mCurrentList.get(i).text)) {\n Toast toast = Toast.makeText(NewListActivity.this, \"That option was already inserted previously\", Toast.LENGTH_SHORT);\n toast.setGravity(Gravity.CENTER, 0, 0);\n toast.show();\n mNameMatch = true;\n }\n }\n if (mNameMatch == false) {\n ListItem item = new ListItem(text, mListID, false);\n mAdapter.add(item, mAdapter.getItemCount());\n mCurrentList = mAdapter.getCurrentListItems(mListID, \"\");\n }\n\n } else {\n editText.setError(\"Nothing added because no text was inserted\");\n }\n\n // clear EditText so user won’t add it twice\n editText.setText(\"\");\n }", "public boolean isItemExist(String item)\n {\n boolean uExist = true;\n Connection conn = DatabaseConnection.getConnection();\n PreparedStatement pss;\n ResultSet rss;\n \n try {\n pss = conn.prepareStatement(\"SELECT * FROM items WHERE Item_number = ?\");\n \n pss.setString(1, jTextFieldNumber.getText());\n \n rss = pss.executeQuery();\n \n if(rss.next())\n {\n JOptionPane.showMessageDialog(null, \"Item Already Exists!\");\n return false;\n }\n else\n {\n return true;\n }\n \n } \n catch (SQLException ex) {\n Logger.getLogger(ItemQuery.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n finally\n {\n try {\n conn.close();\n } catch (SQLException ex) {\n Logger.getLogger(AddItem.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n \n return uExist;\n }", "public boolean isSetName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(NAME$2) != null;\r\n }\r\n }", "public boolean check(String name){\n SQLiteDatabase db=this.getWritableDatabase();\n Cursor cursor = null;\n String sql =\"SELECT 1 FROM \"+TABLE_NAME+\" WHERE \" + COL32 + \"='\" + name + \"'\";\n cursor= db.rawQuery(sql,null);\n //Log(\"Cursor Count : \" + cursor.getCount());\n\n if(cursor.getCount()>0){\n cursor.close();\n return false;\n }else{\n cursor.close();\n return true;\n }\n //cursor.close();\n }", "public boolean check_ab_exist(String ab_name){\n if(ab_store.get(ab_name) != null)\n return true;\n else\n return false;\n }", "@Override\n public void onClick(View v) {\n String name = nameEditText.getText().toString();\n String phoneNumber = phoneEditText.getText().toString();\n\n //create a Contact Object to add\n Contact contact1 = new Contact(name, phoneNumber);\n\n //add contact1 object to database\n int temp = 0;\n for (Contact contact : contacts) {\n if (contact.getName().equals(name) && contact.getPhoneNumber().equals(phoneNumber)){\n Toast.makeText(MainActivity.this, \"This contact does exists\", Toast.LENGTH_SHORT).show();\n temp = 1;\n break;\n }\n if (contact.getName().equals(name)) {\n replaceContact(contact1);\n temp = 1;\n break;\n }\n }\n if (temp == 0) {\n addContact(contact1);\n }\n }", "public boolean exsitName(String name) {\n\t\tKynamic kynamic = this.kynamicDao.getKynamicByName(name);\r\n\t\treturn kynamic!=null?true:false;\r\n\t}", "boolean existsByNameAndId(String name, int id);", "public boolean isSetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$8) != 0;\n }\n }", "public Boolean Exist(String name)\n\t{\n\t\tBoolean res = false;\n\n\t\tint f = this.FindByName(name);\n\n\t\tif (f == -1)\n\t\t{\n\t\t\tres = false;\n\t\t} else\n\t\t{\n\t\t\tres = true;\n\t\t}\n\n\t\treturn res;\n\t}", "boolean hasItemIndex();", "boolean hasItemIndex();", "boolean hasItemIndex();", "public boolean isSetName() {\n return this.name != null;\n }", "private void nameInventory() throws SQLException {\r\n boolean answer = Close_Program.DisplayAlert(\"New Inventory\", \"Would you like to update inventory with new values?\");\r\n if (answer) {\r\n new Archive().Weekly_Inventory();\r\n }\r\n\r\n }", "boolean hasRenameStore();", "public boolean isSetName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(NAME$0) != 0;\r\n }\r\n }", "public boolean isSetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$0) != 0;\n }\n }", "public boolean isSetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$0) != 0;\n }\n }", "boolean hasRename();", "@Override\n public void onClick(View v) {\n name = editName.getText().toString();\n //if name is not written, show message\n if(name.equalsIgnoreCase(\"\")) {\n Toast.makeText(getApplicationContext(), \"이름을 입력해주세요.\", Toast.LENGTH_LONG).show();\n } else { //if name is written, delete data from DB, and show updating data list by using list view\n //reset editText\n editName.setText(\"\");\n editNum.setText(\"\");\n //delete data from DB\n delete(name);\n //show data list by using list view\n showList();\n }\n }", "public boolean setName(String name);", "public boolean setName(String name);", "private static <T extends HmBo> boolean checkBONameExists(Class<T> boClass, String name, Object value) {\r\n List<?> boIds = QueryUtil.executeQuery(boClass, null,\r\n new FilterParams(name, value),\r\n AhRestoreNewMapTools.getonlyDomain().getId());\r\n\t return !boIds.isEmpty();\r\n\t}", "@Override\n public boolean userExists(String name){\n\n String sql = \"SELECT count(*) FROM users WHERE name=?\";\n int count = jdbcTemplate.queryForObject(sql, Integer.class, name);\n if(count == 0) {\n return false;\n } else {\n return true;\n }\n\n }", "public boolean isSetName() {\n\t\treturn this.name != null;\n\t}", "@Override\r\n\tpublic boolean isExist() {\n\t\treturn false;\r\n\t}", "boolean hasCollectionName();", "boolean hasQueryName();", "public boolean addToFavourites(String name){\n SQLiteDatabase db =this.getReadableDatabase();\n ContentValues contentVal = new ContentValues();\n contentVal.put(FAVOURITES,true);\n db.update(Db_Table,contentVal, \"movie_name = ?\",new String[]{ name });\n return true;\n }", "public abstract boolean doesExist();", "boolean isNameRequired();", "public interface DokeosLxitClassDAO {\r\n\r\n boolean isClassNameExist(String name);\r\n\r\n void add(DokeosLxitClass dokeosLxitClass);\r\n\r\n}", "private void registerClick() {\n listView = (ListView) findViewById(R.id.listViewPick);\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n private AdapterView parent;\n\n @Override\n public void onItemClick(AdapterView<?> parent, View viewClicked, int position, long id) {\n this.parent = parent;\n TextView textView = (TextView) viewClicked;\n //String message = \"You clicked # \" + position + \", which is list: \" + textView.getText().toString();\n //Toast.makeText(PickExisting.this, message, Toast.LENGTH_SHORT).show();\n\n String name = textView.getText().toString();\n Product product = new Product();\n product = myDB.findProdByName(name);\n\n if (FROM.equals(\"UseList\")) {\n myDB.addListProduct(FORWARD, product);\n }else{\n myDB.addInventoryProduct(FORWARD, product);\n }\n }\n });\n }", "private boolean checkNameExistModify(String userName, Integer id) {\n\n\t\tUser user = this.userDAO.getUserByName(userName);\n\t\tif (null != user && id != user.getUserId()) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "private void loadTableName()\n{\n try\n {\n ArrayList<String> tableList=DatabaseDAO.getAllTableName();\n if(tableList.isEmpty()==true)\n JOptionPane.showMessageDialog(null, \"Sorry.! No Table is created yet\",\"No Record\",JOptionPane.INFORMATION_MESSAGE);\n else\n {\n jcTableName.removeAllItems(); \n for(String tList:tableList)\n jcTableName.addItem(tList); \n }\n }\n catch(SQLException ex)\n {\n JOptionPane.showMessageDialog(null, \"SQLException \"+ex,\"Error \",JOptionPane.ERROR_MESSAGE); \n }\n}", "public static boolean itemExists(String itemName)\n {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n String query = \"SELECT count(*) FROM Item \" +\n \"WHERE itemName\"+ \"=\" + \"'\" + itemName + \"'\";\n try\n {\n ps = connection.prepareStatement(query);\n //ps.setString(1, emailAddress);\n rs = ps.executeQuery();\n if (rs.next()) {\n\t\tif (rs.getInt(1) > 0) {\n\t\t return true;\n\t\t}\n\t }\n }\n catch(SQLException e)\n {\n e.printStackTrace();\n return false;\n }\n finally\n {\n DButil.closeResultSet(rs);\n DButil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n return false;\n }", "@Override\n\tpublic void onClick(View button) {\n\t\tIntent i;\n\t\tDataBaseControl entry = new DataBaseControl(MainActivity.this);\n\t\tboolean flag = false;\n\t\tswitch(button.getId()){\n\t\tcase R.id.searchB:\n\t\t\tentry.Open();\n\t\t\tflag = entry.findUser(userName.getText().toString());\n\t\t\tentry.close();\n\t\t\tif(flag == false){\n\t\t\t\tToast.makeText(this, \"PLEASE REGISTER\", Toast.LENGTH_LONG).show();\n\t\t\t}else{\n\t\t\t\ti = new Intent(this,Search.class);\n\t\t\t\ti.putExtra(\"name\", userName.getText().toString());\n\t\t\t\tstartActivity(i);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase R.id.registerB:\n\t\t\ti = new Intent(this,Register.class);\n\t\t\tstartActivity(i);\n\t\t\tbreak;\n\t\t}\n\t}", "public boolean alreadyExist(String nameRoom) throws SQLException{\n return roomDao.alreadyExist(nameRoom);\n }", "@Override\n public boolean isAlreadyInDb () {\n try {\n load( idDevice );\n } catch ( EntityNotFoundException e ) {\n return false;\n }\n return true;\n }", "public boolean findUserIsExist(String name) {\n\t\treturn false;\r\n\t}", "public boolean lookup(String name){\n return table.containsKey(name);\n }", "public void addData(Movie movieToAdd, View view)\n {\n /* Creating a DatabaseHelper Instance to access the getData Method in order to get the\n * Title (Index 1 in terms of Columns) of all the saved Movies in the Database and to make\n * sure that the Title of the Movie to be registered isn't equals to any of the existing movies\n */\n DatabaseHelper databaseHelper = new DatabaseHelper(context);\n Cursor c = databaseHelper.getData();\n\n ArrayList<String> listLabels = new ArrayList<>();\n\n while(c.moveToNext())\n {\n //get the value from the database in column 1\n //then add it to the ArrayList\n listLabels.add(c.getString(1));\n }\n\n // Error Message if the Title of the Movie to Add Already is found\n if (listLabels.contains(movieToAdd.getTitle()))\n\n Snackbar.make(view, \"Movie Already has already been Registered !!!\",Snackbar.LENGTH_SHORT)\n .setBackgroundTint(context.getResources().getColor(R.color.transparent_yellow))\n .setTextColor(context.getResources().getColor(R.color.grey_black))\n .show();\n\n else\n {\n int favorite = 0;\n\n if (movieToAdd.isFavorite())\n\n favorite = 1;\n\n /* the execSQL Method simply executes this query on the Database, in this Query UPDATE is\n * used to specify the Table Name to Update, SET specifies the Column name to Update in this\n * case COL8 contains favorites and WHERE is the condition in this case it is to make sure\n * that the Movie Title Matches with the given title\n */\n this.getWritableDatabase().execSQL(\n \"INSERT INTO \" + TABLE_NAME +\n \" (title, year, director, actor_actress, rating, review, favorite)\" +\n \" values('\"\n + movieToAdd.getTitle() + \"', '\" + movieToAdd.getYear() + \"', '\"\n + movieToAdd.getDirector() + \"', '\" + movieToAdd.getActorActress() + \"', \"\n + movieToAdd.getRating() + \", '\" + movieToAdd.getReview() + \"', \" + favorite\n + \")\");\n\n Snackbar.make(view, \"Successfully Registered !\",Snackbar.LENGTH_SHORT)\n .setBackgroundTint(context.getResources().getColor(R.color.transparent_yellow))\n .setTextColor(context.getResources().getColor(R.color.grey_black))\n .show();\n }\n }" ]
[ "0.6431392", "0.62570477", "0.6180462", "0.61700004", "0.6121058", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.60968614", "0.58581185", "0.583148", "0.5795985", "0.57822293", "0.5775101", "0.5760203", "0.57456404", "0.5741164", "0.5656462", "0.5652283", "0.5639262", "0.56243265", "0.56080544", "0.56030464", "0.5581049", "0.55706066", "0.5562184", "0.55594236", "0.5547387", "0.5540375", "0.5540375", "0.5540375", "0.5540375", "0.5517209", "0.5516132", "0.55153203", "0.55148226", "0.55112755", "0.550631", "0.54917073", "0.54815066", "0.54595524", "0.5452577", "0.54499924", "0.5434626", "0.5425891", "0.5424838", "0.54214257", "0.5415987", "0.5415263", "0.5415263", "0.5415263", "0.5413049", "0.5404665", "0.53908503", "0.5385867", "0.5384445", "0.5384445", "0.5380665", "0.53536797", "0.5346209", "0.5346209", "0.5335049", "0.53204525", "0.5316026", "0.5314008", "0.5311335", "0.5308737", "0.53023595", "0.5301798", "0.5298123", "0.52916384", "0.5288895", "0.52876025", "0.5282598", "0.5279598", "0.527773", "0.52661854", "0.5263225", "0.52592224", "0.52587503", "0.525419" ]
0.63562065
1
TODO Autogenerated method stub
@Override public void cry() { System.out.println("喵喵喵"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
Dismissing the progress dialog
@Override public void onErrorResponse(VolleyError volleyError) { Log.e("status Response", String.valueOf(volleyError)); // mProgressDialog.dismiss(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void dismissDialog() {\n if (progressDialog != null) {\n progressDialog.dismiss();\n }\n }", "public void dismissDialog(){\n\t if(pd != null){\n\t\t pd_progress = pd.getProgress();\n\t\t pd.dismiss();\n\t }\n }", "public void dismissProgressDialog() {\r\n if (progressDialog.isShowing()) {\r\n progressDialog.dismiss();\r\n }\r\n }", "public void dismissProgress() {\n if (mProgressDialog != null) {\n mProgressDialog.dismiss();\n mProgressDialog = null;\n }\n }", "public void dissMissDialog(){\r\n if (dialog != null && dialog.isShowing()\r\n && dialog.getContext() != null) {\r\n try {\r\n dialog.dismiss();\r\n\r\n if(mCallback != null){\r\n mCallback.onProgressDissmiss();\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "public void dismissProgressDialog(){\n if(progressDialog != null)\n progressDialog.dismiss();\n }", "private void dismissProgressDialog()\n {\n \tif (null != dialog && dialog.isShowing()) {\n \t\tdialog.dismiss();\n \t}\n }", "private void dismissProgress() {\n \n \t\tnew Handler(getMainLooper()).post(new Runnable() {\n \n \t\t\t@Override\n \t\t\tpublic void run() {\n \t\t\t\tif (progressDialog == null)\n \t\t\t\t\tprogressDialog = (ProgressDialogFragment) getSupportFragmentManager()\n \t\t\t\t\t\t\t.findFragmentByTag(\n \t\t\t\t\t\t\t\t\tProgressDialogFragment.FRAGMENT_TAG);\n \n \t\t\t\tif (progressDialog != null && progressDialog.getShowsDialog()) {\n \t\t\t\t\tprogressDialog.dismiss();\n \n \t\t\t\t\tprogressDialog = null;\n \t\t\t\t}\n \t\t\t}\n \t\t});\n \t}", "private void hideDialog() {\n if (progressDialog.isShowing())\n progressDialog.dismiss();\n }", "private void hideProgress() {\n if (dialogProgress != null) {\n dialogProgress.dismiss();\n dialogProgress = null;\n }\n }", "private void dismissProgressIndication() {\n if (mProgressDialog != null && mProgressDialog.isShowing()) {\n try{\n mProgressDialog.dismiss(); // safe even if already dismissed\n }catch(Exception e){\n Log.i(TAG, \"dismiss exception: \" + e);\t\n }\n mProgressDialog = null;\n }\n }", "public void offProgressDialog(){\n if(dialogProgresIndeterminate != null && dialogProgresIndeterminate.isShowing()){\n dialogProgresIndeterminate.dismiss();\n }\n }", "void dismissProgressDialog();", "void dismissProgressDialog();", "void dismissProgressDialog();", "public void dismissProgressDialog() {\n if (this.progressDialog != null) {\n this.progressDialog.dismiss();\n this.progressDialog = null;\n }\n }", "public void dismissProgressDialog() {\n if (this.pDialog != null && this.pDialog.isShowing()) {\n this.pDialog.dismiss();\n }\n }", "private void dismissProgressDialog() {\n if (mProgressDialog != null && mProgressDialog.isShowing()) {\n mProgressDialog.dismiss();\n }\n }", "void dismissProgressLoading() {\n if (progressDialog != null) {\n progressDialog.dismiss();\n }\n }", "public void hideProgress() {\n // if (progressDialog != null && progressDialog.isShowing())\n try {\n progressDialog.dismiss();\n } catch (Exception e) {\n\n }\n }", "@Override\n\tpublic void hideProgress() {\n\t\twaitDialog(false);\n\t}", "private void stopProgressDialog() {\n try {\n if (mProgressDialog != null && mProgressDialog.isShowing()) {\n mProgressDialog.dismiss();\n }\n } catch (Exception e) {\n LogWriter.err(e);\n } finally {\n mProgressDialog = null;\n }\n }", "public void hideProgress() {\n if (progressDialog != null && progressDialog.isShowing())\n progressDialog.dismiss();\n }", "private void hideProgress() {\n \tif(mProgress!=null){\n \t\tmProgress.dismiss();\n \tmProgress=null;\n \t}\n }", "@Override\n\tpublic void hideProgress() {\n\t\tprogress.dismiss();\n\t}", "public static void hideProgressDialog() {\n try {\n if (PROGRESS_DIALOG != null) {\n PROGRESS_DIALOG.dismiss();\n }\n } catch(Exception ignored) {}\n }", "public void hideProgressDialog() {\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (progress.isShowing())\r\n\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t} catch (Throwable e) {\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\t\n\t\t}", "void hideModalProgress();", "@Override\r\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\r\n\t\t}", "@Override\r\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\r\n\t\t}", "public void dissmissDialog() {\n if (pdialog != null) {\n if (pdialog.isShowing()) {\n pdialog.dismiss();\n }\n pdialog = null;\n }\n\n }", "@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\n\t\t}", "@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\n\t\t}", "@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\n\t\t}", "protected void dismissLoading()\n {\n progressBar.dismiss();\n }", "public void dismissProgress(ProgressDialog progressDialog) {\n if (progressDialog != null && progressDialog.isShowing()) {\n progressDialog.dismiss();\n }\n }", "public void hideProgressDialog() {\n if (mProgressDialog != null) {\n mProgressDialog.dismiss();\n }\n }", "@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\n\t\t\tmProgressHUD.dismiss();\n\t\t\t\n\t\t}", "public void run() {\n progressDialog.dismiss();\n }", "public void run() {\n progressDialog.dismiss();\n }", "@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\n\t\t\tmProgressHUD.dismiss();\n\t\t}", "@Override\n\t\t\t protected void onPostExecute(Void result)\n\t\t\t {\n\t\t\t\t\t\t\t\t\tif (progressDialog != null)\n\t\t\t\t\t\t\t\t\t\tprogressDialog.dismiss();\n\t\t\t }", "@Override\n\t\t\t\t protected void onPostExecute(Void result)\n\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tif (progressDialog != null)\n\t\t\t\t\t\t\t\t\t\t\tprogressDialog.dismiss();\n\t\t\t\t }", "public void hideDownloadProgressDialog()\n {\n if(mDownloadProgress != null)\n {\n mDownloadProgress.dismiss();\n }\n mDownloadProgress = null;\n }", "public void dismissProgressBar() {\n\t\tmProgressBarVisible = false;\n\t\tif (getView() != null) {\n\t\t\tLinearLayout progressLayout = (LinearLayout) getView()\n\t\t\t\t\t.findViewById(R.id.severity_list_progress_layout);\n\t\t\tif (progressLayout != null) {\n\t\t\t\tprogressLayout.setVisibility(View.GONE);\n\t\t\t}\n\t\t\tProgressBar listProgress = (ProgressBar) getView().findViewById(\n\t\t\t\t\tR.id.severity_list_progress);\n\t\t\tlistProgress.setProgress(0);\n\t\t}\n\t}", "@Override\n\t\t\t\tpublic void confirm() {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}", "@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tdialog.dismiss();\n\t\t}", "@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tdialog.dismiss();\n\t\t}", "@Override\n \t\tprotected void onPostExecute(Void result) \n \t\t{\n\t\t\t//close the progress dialog\n\t\t\tprogressDialog.dismiss();\n\t\t\tprogressDialog = null;\n \t\t}", "public void dismissSavingHint() {\n if (this.mProgressDialog != null && this.mProgressDialog.isShowing()) {\n this.mProgressDialog.dismiss();\n }\n }", "@Override\n public void onDetach() {\n if (progressDialog != null && progressDialog.isShowing()) {\n progressDialog.dismiss();\n }\n super.onDetach();\n }", "@Override\r\n public void run() {\n dialog.dismiss();\r\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n // dismiss the progress dialog\n MyTask.this.cancel(true);\n finish();\n pDialog.dismiss();\n // Tell the system about cancellation\n\n }", "@Override\n public void hideProgressIndicator() {\n ProgressDialogFragment.dismissDialog(getChildFragmentManager());\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n task.cancel(true); //meng- cancel AsincTask\n pd.dismiss(); //menghilangkan progress dialog\n }", "protected void dismiss() {\n Message msg = mHandler.obtainMessage(DIALOG_DISMISS);\n mHandler.sendMessage(msg);\n }", "@Override\n public void hideLoading() {\n if (progressDialog!=null && progressDialog.isShowing()){\n progressDialog.dismiss();\n }\n }", "@Override\n\t\t\t\tpublic void onDismiss(DialogInterface dialog) {\n\t\t\t\t\tfinish();\n\t\t\t\t\t\n\t\t\t\t}", "public void goneProgress(){\n mProgressBar.setVisibility(View.GONE);\n }", "public void dismiss() {\r\n\t\tmWindow.dismiss();\r\n\t}", "public void run() {\n dialog.dismiss();\n }", "public void run() {\n dialog.dismiss();\n }", "void hideProgress();", "protected void onStop() { //멈추었을때 다이어로그를 제거해주는 메서드\n super.onStop();\n if (progressDialog != null)\n progressDialog.dismiss(); //다이어로그가 켜져있을경우 (!null) 종료시켜준다\n }", "@Override\n public void run() {\n pDialog.dismiss();\n finish();\n }", "@Override\n public void onDismiss(DialogInterface dialog) {\n }", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}", "void dismissAlertDialog();", "@Override\n public void onDismiss(DialogInterface dialog) {\n super.dismiss();\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t\t\t\t}", "@Override\n\t\t\tpublic void onDismiss(DialogInterface dialogInterface) {\n\t\t\t\tSystem.out.println(\"Dialog dismissed\");\n\t\t\t\tParser.dialogOpen = false;\n if(Download!=null) Download.cancel(true);\n\t\t\t}", "@Override\n public void onDismiss(DialogInterface dialog) {\n\n }", "@Override\n public void onDismiss(DialogInterface dialog) {\n\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "@Override\n\t\t\t\tpublic void onDismiss() {\n\t\t\t\t\tsleep_time.setText(\"无操作\" + getTimeOut(context.getContentResolver())\n\t\t\t\t\t\t\t+ \"后休眠\");\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}", "void dismiss();", "@Override\r\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t}", "@Override\n protected void onPostExecute(String file_url) {\n dismissDialog(progress_bar_type);\n //pDialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "public void dismiss() {\n dismissWithDelay(0, null);\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t}", "public void cancelDialog() {dispose();}", "@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n mDialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onDismiss(DialogInterface dialog) {\n\n }", "@Override\r\n protected void onPostExecute(Void result) {\n mProgressDialog.dismiss();\r\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.dismiss();\n }", "@Override\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}" ]
[ "0.84301925", "0.8244721", "0.81212205", "0.8110473", "0.8038313", "0.80224514", "0.7887234", "0.7876067", "0.7817506", "0.774995", "0.7742372", "0.77355254", "0.7725122", "0.7725122", "0.7725122", "0.77058333", "0.76175463", "0.7603588", "0.75875247", "0.7545539", "0.7495149", "0.7345538", "0.73442394", "0.7313959", "0.73111856", "0.72071415", "0.7195515", "0.7194405", "0.7162077", "0.71549356", "0.71549356", "0.71378237", "0.71362126", "0.71362126", "0.71362126", "0.7106404", "0.7095763", "0.7088044", "0.7068977", "0.7029653", "0.7029653", "0.7029434", "0.70120895", "0.6995886", "0.69651103", "0.69429564", "0.69349957", "0.6927184", "0.6927184", "0.6890019", "0.6861149", "0.6807012", "0.6784191", "0.67798686", "0.6778168", "0.6709402", "0.66833764", "0.66820544", "0.6668522", "0.660603", "0.6588004", "0.6577133", "0.6577133", "0.6566623", "0.6558327", "0.65520656", "0.6549861", "0.65322006", "0.65322006", "0.65322006", "0.65298605", "0.6526433", "0.6508829", "0.6508829", "0.65055335", "0.6504762", "0.6504762", "0.65025294", "0.6499919", "0.6498502", "0.6485013", "0.6485013", "0.6480023", "0.6462649", "0.6462649", "0.64592403", "0.6453525", "0.6453465", "0.6449933", "0.6449933", "0.64464635", "0.64445645", "0.6441765", "0.6440626", "0.64352417", "0.6432486", "0.6430572", "0.6429405", "0.6421744", "0.6421744", "0.6421744" ]
0.0
-1
EntityManager is NOT threadsafe
public EntityManager getEntityManager() { return getFactory().createEntityManager(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract EntityManager getEntityManager();", "abstract E getEntityManager();", "@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}", "@Override\n protected EntityManager getEntityManager() {\n return em;\n }", "@Override\n\tprotected EntityManager getEntityManager() {\n\t return em;\n\t}", "@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn em;\n\t}", "@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn em;\n\t}", "EntityManager createEntityManager();", "@Override\n public EntityManager getEntityManager() {\n return entityManager;\n }", "private EntityManager getEM() {\n\t\tif (emf == null || !emf.isOpen())\n\t\t\temf = Persistence.createEntityManagerFactory(PUnit);\n\t\tEntityManager em = threadLocal.get();\n\t\tif (em == null || !em.isOpen()) {\n\t\t\tem = emf.createEntityManager();\n\t\t\tthreadLocal.set(em);\n\t\t}\n\t\treturn em;\n\t}", "static EntityManager getEntityManager(){\n return ENTITY_MANAGER_FACTORY.createEntityManager();\n }", "private static void init(){\n entityManager = HibernateUtil.getEntityManager();\n transaction = entityManager.getTransaction();\n }", "@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn null;\n\t}", "protected EntityManager getEntityManager() {\n return emf.createEntityManager();\n }", "@Override\n\tpublic EntityManager getEntityManager() {\n\t return em;\n\t}", "protected EntityManager getEntityManager() {\n return em;\n }", "protected EntityManager getEntityManager() {\n return this.entityManager;\n }", "private EntityManagerProvider(){}", "public EntityManager getEntityManager() {\r\n return entityManager;\r\n }", "public EntityManager getEntityManager() {\n return this.em;\n }", "@Test\n public void testIsolationLevel()\n {\nEmployee employee = new EmployeeBuilder().withAge(30).withName(\"Hans\").withSurename(\"Mueller\").build();\n Department department = new DepartmentBuilder().withName(\"Abteilung 1\").build();\n em.getTransaction().begin();\n\n // From the spec:\n // If FlushModeType.COMMIT is specified,\n //flushing will occur at transaction commit; the persistence provider is permitted, but not required, to perform\n //to flush at other times.\n em.setFlushMode(FlushModeType.COMMIT);\n\n employee.setDepartment(department);\n em.persist(department);\n\n // partial flush should be visible to same EM\n Department reloadedDepartment = em.find(Department.class, department.getId());\n Assert.assertNotNull(reloadedDepartment);\n\n // check for flushed content in the db via second EM\n // Will fail on hsqldb, because of lack of isolationlevel implementation\n EntityManager em2 = emf.createEntityManager();\n reloadedDepartment = em2.find(Department.class, department.getId());\n Assert.assertNull(\"This one is failing if HSQLDB is used (here READ_UNCOMMITTED is actually used!) ...\", reloadedDepartment);\n\n em.getTransaction().commit();\n }", "public interface AnutaEntityManager {\n\n /**\n * Saves entity in database\n * @param entity the entity to be saved\n * @param <T> the type if target entity\n * @return saved entity\n */\n public <T> T save(T entity);\n\n /**\n * Loads the entity from data source using entity's id\n * @param entityClass the target entity class\n * @param id the id of entity lo load\n * @param <T> the type if target entity\n * @return Java object, representing the entity if object was found and null otherwise\n */\n public <T> T find(Class<T> entityClass, String id);\n\n\n /**\n * Loads entity without loading all inner collections\n * @param id the id of the entity\n * @return loaded entity, if exists and null otherwise\n */\n public <T> T getPlainEntity(Class<T> entityClass, String id);\n\n /**\n * Updates entity in database\n * @param <T> the type if target entity\n * @return updated entity\n */\n public <T> T update(T entity);\n\n /**\n * Deletes entity from database\n * @param entity the entity to be deleted\n * @param <T> the type if target entity\n * @return true if was removed and false otherwise\n */\n public <T> boolean delete(T entity);\n\n /**\n * Deletes entity from database\n * @param entityClass the class of entity to be deleted\n * @param id the id of entity to be removed\n * @param <T> the type if target entity\n * @return true if was removed and false otherwise\n */\n public <T> boolean delete(Class<T> entityClass, String id);\n\n /**\n * Finds all entities of the given type\n * @param <T> the type if target entity\n * @return list of found entities or empty list if nothing was found\n */\n public <T> List<T> findAll(Class<T> entityClass);\n\n /**\n * Finds all entities of the given type\n * @param <T> the type if target entity\n * @return list of found entities or empty list if nothing was found\n */\n public <T> List<T> findByQuery(AnutaQuery<T> query);\n\n /**\n * Saves all entities into database\n * @param <T> the type if target entity\n * @return collection of saved entities\n */\n public <T> Collection<T> saveAll(Collection<T> entities);\n\n /**\n * Updates all entities in database\n * @param <T> the type if target entity\n * @return collection of updated entities\n */\n public <T> Collection<T> updateAll(Collection<T> entities);\n\n /**\n * Deletes all entities in database\n * @param <T> the type if target entity\n * @return collection of updated entities\n */\n public <T> boolean deleteAll(Collection<T> entities);\n\n /**\n * Deletes all entities in database\n * @param ids collection of ids for entities to be deleted\n * @param <T> the type if target entity\n * @return collection of updated entities\n */\n public <T> boolean deleteAll(Class<T> entityClass, Collection<String> ids);\n\n /**\n * @return the instance of {@link AnutaQueryBuilder} which can be used to build query\n */\n public <T> AnutaQueryBuilder<T> getQueryBuilder(Class<T> cls);\n\n /**\n * Queries data from DB and coverts data from cursor to Java entity.\n * @param query the query to select objects\n * @param <T> type of target entity\n * @return an instance of {@link AnutaEntityCursor} which can be used to iterate objects from database\n */\n public <T> AnutaEntityCursor<T> getEntityCursor(AnutaQuery<T> query);\n\n /**\n * Executes query and returns true if query was executed successfully and false otherwise\n * @param query the query to be executed\n * @return {@code true} if query was executed successfully and {@code false} otherwise\n */\n public <T> boolean executeQuery(AnutaQuery<T> query);\n\n /**\n * Initializes all related collections and entities\n * @param entity the entity to be initialized\n * @return initialized entity. WARNING! The reference of returned object will differ from passed at params\n */\n public <T> T initialize(T entity);\n\n /**\n * Initializes all related collections and entities up to the given level\n * @param entity the entity to be initialized\n * @param level the level of initialization (greater then 0 or one of the following)\n * <ul>\n * <li>{@link DatabaseAccessSession#LEVEL_ENTITY_ONLY} - to load plain entity</li>\n * <li>{@link DatabaseAccessSession#LEVEL_ALL} - to load entity and all dependent collections</li>\n * <li>{@link DatabaseAccessSession#LEVEL_ANNOTATION_BASED} - to load entity and collections will be loaded accorging to annotation config</li>\n * </ul>\n * @return initialized entity. WARNING! The reference of returned object will differ from passed at params\n */\n public <T> T initialize(T entity, int level);\n\n /**\n * Initializes all related collections and entities for the given collection of entities\n * @param entities the collection of entities to be initialized\n * @return initialized entity. WARNING! The reference of returned object will differ from passed at params\n */\n public <T> Collection<T> initialize(Collection<T> entities);\n\n /**\n * Initializes all related collections and entities up to the given level\n * @param entities the collection of entities to be initialized\n * @param level the level of initialization (greater then 0 or one of the following)\n * <ul>\n * <li>{@link DatabaseAccessSession#LEVEL_ENTITY_ONLY} - to load plain entity</li>\n * <li>{@link DatabaseAccessSession#LEVEL_ALL} - to load entity and all dependent collections</li>\n * <li>{@link DatabaseAccessSession#LEVEL_ANNOTATION_BASED} - to load entity and collections will be loaded accorging to annotation config</li>\n * </ul>\n * @return initialized entity. WARNING! The reference of returned object will differ from passed at params\n */\n public <T> Collection<T> initialize(Collection<T> entities, int level);\n}", "@Override\r\n\tpublic EntityManager getEntityManger() {\n\t\treturn em;\r\n\t}", "@Test\n public void testPessimisticLocking()\n {\n Employee employee = new EmployeeBuilder().withAge(30).withName(\"Hans\").withSurename(\"Mueller\").build();\n\n // saving Employee\n em.getTransaction().begin();\n em.persist(employee);\n em.getTransaction().commit();\n\n // fresh start\n em = emf.createEntityManager();\n EntityManager em2 = emf.createEntityManager();\n\n em.getTransaction().begin();\n Employee reloadedEmployeInstance1 = em.find(Employee.class, employee.getId());\n\n // Enable to get a deadlock\n// em.lock(reloadedEmployeInstance1, LockModeType.READ);\n\n em2.getTransaction().begin();\n Employee reloadedEmployeInstance2 = em2.find(Employee.class, employee.getId());\n reloadedEmployeInstance2.setAge(99);\n em2.persist(reloadedEmployeInstance2);\n em2.getTransaction().commit();\n\n\n em.getTransaction().commit();\n }", "public static EntityManager getEntityManager() {\n EntityManager em = tl.get();\n return em;\n }", "protected abstract EntityManagerFactory getEntityManagerFactory();", "public interface EntityManager {\r\n public <T> T findById(Class<T> entityClass, Long id);\r\n public <T> Long getNextIdVal(String tableName, String columnIdName);\r\n public <T> Object insert(T entity);\r\n public <T> List<T> findAll(Class<T> entityClass);\r\n public <T> T update(T entity);\r\n public void delete(Object entity);\r\n public <T> List<T> findByParamsClass(Class<T> entityClass, Map<String, Object> params);\r\n}", "public final static EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}", "@Override\n @Test(groups = {\"Entity Manager access\"})\n public void testEntityManager00() throws Exception {\n super.testEntityManager00();\n }", "public interface OrganizationService extends EntityService<Organization> {\n\n /**\n * 缓存\n *\n * @param id\n * @return\n * @throws Exception\n */\n public Organization queryCacheOrganizationById(long id) throws Exception;\n}", "@Test(expected = RollbackException.class)\n public void testOptimisticLocking()\n {\n Employee employee = new EmployeeBuilder().withAge(30).withName(\"Hans\").withSurename(\"Mueller\").build();\n\n // saving Employee\n em.getTransaction().begin();\n em.persist(employee);\n em.getTransaction().commit();\n\n // fresh start\n em = emf.createEntityManager();\n EntityManager em2 = emf.createEntityManager();\n\n\n Employee reloadedEmployeInstance1 = em.find(Employee.class, employee.getId());\n Employee reloadedEmployeInstance2 = em2.find(Employee.class, employee.getId());\n\n // --- client 1 ---\n // saving employee1\n reloadedEmployeInstance1.setAge(100);\n em.getTransaction().begin();\n em.persist(reloadedEmployeInstance1);\n em.getTransaction().commit();\n\n // --- client 2 ---\n // saving employe2\n reloadedEmployeInstance2.setAge(99);\n em2.getTransaction().begin();\n em2.persist(reloadedEmployeInstance2);\n em2.getTransaction().commit();\n }", "public abstract void setEntityManager(EntityManager em);", "private AdminEntity() {\n \tsuper();\n\n this.emf = Persistence.createEntityManagerFactory(\"entityManager\");\n\tthis.em = this.emf.createEntityManager();\n\tthis.tx = this.em.getTransaction();\n }", "protected WorkToSubjectEntityDAO(EntityManager em) {\n\n this.em = em;\n }", "public interface EntityManagerCreator {\n EntityManager createEntityManager();\n}", "public EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}", "public EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}", "public EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}", "public interface IEntityManagerFactory {\r\n\r\n\t/**\r\n\t * Called when entity manager factory will help to create DAO objects.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tEntityManager createEntityManager();\r\n}", "public void flushEntityCache() {\n super.flushEntityCache();\n }", "@Override\r\n public void testGettingEntityManager() { debug(\"overriddenTestGettingEntityManager - noop\"); }", "@Override\r\n\t\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\r\n\t\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\t\tsqlLogInspetor.enable();\r\n\r\n\t\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\t\tmasterAEnt.setBlobLazyB(null);\r\n\t\t\t\t\targ0.flush();\r\n\t\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}", "public void flush()\n{\n\t// no such operation required for mock persistence provider\n}", "EMInitializer() {\r\n try {\r\n emf = Persistence.createEntityManagerFactory(\"pl.polsl_MatchStatist\"\r\n + \"icsWeb_war_4.0-SNAPSHOTPU\");\r\n em = emf.createEntityManager();\r\n } catch (Exception e) {\r\n em = null;\r\n emf = null;\r\n }\r\n\r\n }", "protected void entityInit() {}", "public EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}", "public EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}", "public EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}", "public EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}", "private static void init() {\n\t\tif (factory == null) {\n\t\t\tfactory = Persistence.createEntityManagerFactory(\"hibernatePersistenceUnit\");\n\t\t}\n\t\tif (em == null) {\n\t\t\tem = factory.createEntityManager();\n\t\t}\n\t}", "@Override\n\tpublic EntityManagerFactory getEntityManagerFactory() {\n\t\treturn null;\n\t}", "public TManagerImp() {\n transactions = new ConcurrentHashMap<>();\n }", "public EntityManager getEntityManager() {\n\t\treturn this.entityManager;\n\t}", "@Before\n\tpublic void init()\n\t{\n\t\tEntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory(\"persistenceUnit\");\n\t\tEntityManager entityManager = entityManagerFactory.createEntityManager();\n\t\tcacheManager = new CacheManagerDefaultImpl();\n\t\t((CacheManagerDefaultImpl) cacheManager).setEntityManager(entityManager);\n\t}", "protected abstract T getEntityById(Long id);", "@Before\n\tpublic void setUp() throws Exception {\n\t\ttry {\n\t\t\temf = Persistence.createEntityManagerFactory(\"DistribSubastaCoreEM\");\n\t\t dao.setEm(emf.createEntityManager());\n\t\t dao.getEm().setFlushMode(FlushModeType.COMMIT);\n\t\t dao.getEm().getEntityManagerFactory().getCache().evictAll();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\t}", "DAOClienteJPA(EntityManager entity) {\r\n this.entity = entity;\r\n }", "protected T getEntity() {\r\n\t\treturn entity;\r\n\t}", "@Override\r\n\tpublic void onFinally(Object pojo, Method method) {\r\n\t\tif (threadLocalEntityManager != null)\r\n\t\t\tthreadLocalEntityManager.closeEntityManager();\r\n\t\telse\r\n\t\t\tlogger.warn(\"JPA: thread local entity manager is null.\");\r\n\t}", "void waitAndReleaseAllEntities();", "public void testMultiEMCachingTrue() {\n Map props = new HashMap(System.getProperties());\n props.put(\"openjpa.MetaDataFactory\", \"jpa(Types=\" + Person.class.getName() + \")\");\n props.put(\"openjpa.jdbc.QuerySQLCache\", \"true\");\n runMultiEMCaching(props);\n }", "@Transactional\npublic interface ProteinDatabaseManagement {\n /**\n * Persists protein Id search database. This database could be available for everyone in case experiment param is null\n **/\n long createDatabase(long actor, String nameToDisplay, long proteinDBType, long sizeInBytes, boolean bPublic, boolean bReversed, ExperimentCategory category);\n\n long updateDatabaseDetails(long actor, long database, String databaseName, long databaseType);\n\n\n void deleteDatabase(long actor, long db);\n\n long getMaxDatabaseSize();\n\n void specifyProteinDatabaseContent(long userId, long proteinDb, String contentUrl);\n\n void markDatabasesInProgress(Iterable<Long> dbs);\n\n void updateDatabaseSharing(long actor, boolean bPublic, long databaseId);\n\n DuplicateResponse duplicateDatabase(long actor, long database);\n\n class DuplicateResponse{\n public final Long id;\n public final String errorMessage;\n\n public DuplicateResponse(Long id, String errorMessage) {\n this.id = id;\n this.errorMessage = errorMessage;\n }\n }\n}", "@Transactional\npublic interface VideoDao extends CrudRepository<Video, Long> {\n}", "@Override\n @RequestScoped\n public EntityManager provide() {\n // hk2\n final EntityManager instance = getEntityManager();\n\n if (closeableService != null) {\n closeableService.add(new Closeable() {\n @Override\n public void close() throws IOException {\n dispose(instance);\n }\n });\n }\n return instance;\n }", "abstract void initPersistance();", "@Before\n\tpublic void setUp() throws Exception {\n\t\tydelseService.setEntityManager(entityManager);\n\t}", "private void run(AuthordDao dao, EntityManager entityManager) {\n Author een = new Author(\"Bakker\");\n dao.save(een);\n Author twee = new Author(\"Smit\");\n dao.save(twee);\n Author drie = new Author(\"Meijer\");\n dao.save(drie);\n Author vier = new Author(\"Mulder\");\n dao.save(vier);\n Author vijf = new Author(\"de Boer\");\n dao.save(vijf);\n Author zes = new Author(\"Pieters\");\n dao.save(zes);\n\n /////////////////////////////////////////// --> delete author 2\n dao.delete(twee);\n\n /////////////////////////////////////////// --> update naam author 1\n dao.updateName(1, \"Hendriks\");\n dao.save(een);\n\n ////////////////////////////////////////// --> try setters\n drie.setHasDebuted(Boolean.TRUE);\n vijf.setHasDebuted(Boolean.TRUE);\n zes.setHasDebuted(Boolean.TRUE);\n dao.update(drie);\n dao.update(vijf);\n dao.update(zes);\n\n /////////////////////////////////////////// --> find by lastname\n log(dao.findBy(\"Meijer\"));\n\n /////////////////////////////////////////// --> enum\n een.setGenre(Genre.FICTION);\n dao.save(een);\n\n drie.setGenre(Genre.CHILDREN);\n dao.save(drie);\n\n vier.setGenre(Genre.BIOGRAPHY);\n dao.save(vier);\n\n vijf.setGenre(Genre.ROMANCE);\n dao.save(vijf);\n\n zes.setGenre(Genre.FICTION);\n dao.save(zes);\n\n ///////////////////////////////////////////////// --> unidirectional\n Publisher theBestPublisher = new Publisher(\"the Best Publisher\");\n Publisher eenAnderePublisher = new Publisher(\"een Andere Publisher\");\n Publisher deLaaststePublisher = new Publisher(\"de Laatste Publisher\");\n\n Dao<Publisher> publisherDao = new Dao<>(entityManager);\n publisherDao.save(theBestPublisher);\n publisherDao.save(eenAnderePublisher);\n publisherDao.save(deLaaststePublisher);\n\n een.setSignedBy(theBestPublisher);\n drie.setSignedBy(deLaaststePublisher);\n vier.setSignedBy(eenAnderePublisher);\n vijf.setSignedBy(theBestPublisher);\n zes.setSignedBy(deLaaststePublisher);\n\n dao.update(een);\n dao.update(drie);\n dao.update(vier);\n dao.update(vijf);\n dao.update(zes);\n\n List<Author> soft = dao.findByPublisher(\"best\");\n soft.forEach(this::log);\n\n ////////////////////////////////////////////////// --> bidirectional\n Dao assistantDao = new Dao(entityManager);\n\n Assistant assistant1 = new Assistant(\"Assistent 1\");\n Assistant assistant2 = new Assistant(\"Assistent 2\");\n Assistant assistant3 = new Assistant(\"Assistent 3\");\n assistantDao.save(assistant1);\n assistantDao.save(assistant2);\n assistantDao.save(assistant3);\n\n een.setAssistant(assistant3);\n drie.setAssistant(assistant2);\n vier.setAssistant(assistant2);\n vijf.setAssistant(assistant1);\n zes.setAssistant(assistant1);\n\n dao.update(een);\n dao.update(drie);\n dao.update(vier);\n dao.update(vijf);\n dao.update(zes);\n\n ////////////////////////////////////////////////// --> test one-to-many (Book testen)\n\n }", "public void test_selectEntity_Tx() throws Exception {\n // ## Arrange ##\n final Integer memberId = 3;\n\n // ## Act ##\n long before = currentDate().getTime();\n final Member member = jdbcManager.from(Member.class).where(\"memberId = ?\", memberId).getSingleResult();\n long after = currentDate().getTime();\n\n // ## Assert ##\n assertNotNull(member);\n log(member.toString());\n assertEquals(memberId, member.memberId);\n log(\"cost: \" + convertToPerformanceView(before, after));\n }", "public interface AccountService {\n\n List<AccountDO> findAllAccount();\n\n AccountDO findAccountByUserId(long userId);\n\n /**\n * 使用Hmily 事务\n * @param accountDO\n * @return\n */\n @Hmily\n boolean updateAccount(AccountDO accountDO);\n\n}", "public void flush() {\n entityManager.flush();\n }", "private static PersistenceSession getPersistenceSession() {\n return NakedObjectsContext.getPersistenceSession();\n }", "public void getEntities() {\n\t\t\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\tEntityA entityA = exampleDao.getOne(1);\r\n\t\tEntityB entityB3 = entityBDao.getOne(3);\r\n\t \tEntityB entityB2 = entityBDao.getOne(2);\r\n\t \tEntityB entityB1 = entityBDao.getOne(1);\r\n\r\n\t \t\r\n\r\n\t\tentityA.setEntityBList(Arrays.asList(entityB2,entityB3,entityB1));\r\n\r\n\t}", "protected FullTextEntityManager getFullTextEntityManager() {\n\t if (ftem == null) {\n\t ftem = Search.getFullTextEntityManager(getEntityManager());\n\t try {\n\t\t\t\t/* Como o banco de dados é resetado a cada vez que\n\t\t\t\t * a aplicação inicializa (banco em memória), é preciso reconstruir\n\t\t\t\t * os índices de busca utilizados pelo hibernate-search.*/\n\t\t\t\tftem.createIndexer().startAndWait();\n\t\t\t} catch (InterruptedException e) {//TODO: tratar exceção\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t }\n\t return ftem;\n\t}", "protected abstract Serializable getEntity();", "@Dao\npublic interface PostDao {\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insertPost(iPost iPosts);\n\n @Update\n void updatePost(iPost iPost);\n\n @Delete\n void deletePost(iPost iPost);\n\n @Query(\"SELECT * FROM iPost\")\n List<iPost> getAllPosts();\n\n @Query(\"SELECT * FROM iPost WHERE idThread=:threadId\")\n List<iPost> findPostsByThread(final int threadId);\n\n @Transaction\n @Query(\"SELECT * FROM iPost WHERE idThread=:threadId\")\n Single<List<PostsHelper>> getPostsFromThread(String threadId);\n}", "public static void main(String[] args) {\n\n entityManager.getTransaction().begin();\n\n\n\n Account account1 = entityManager.createQuery(\"from Account where accountNr = 1\", Account.class).getSingleResult();\n Account account2 = entityManager.createQuery(\"from Account where accountNr = 2\", Account.class).getSingleResult();\n\n account1.setBalance(1000);\n account2.setBalance(1000);\n\n entityManager.getTransaction().commit();\n\n System.out.println(entityManager.createQuery(\"from Account\").getResultList());\n\n new Thread(() -> {\n\n entityManager.getTransaction().begin();\n\n Account account = entityManager.createQuery(\"from Account where accountNr = 1\", Account.class).getSingleResult();\n\n try {\n Thread.sleep(1000);\n }\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n account.withdraw(1000);\n System.out.println(entityManager.createQuery(\"from Account\").getResultList());\n\n entityManager.getTransaction().commit();\n\n }).run();\n\n new Thread(() -> {\n\n entityManager2.getTransaction().begin();\n\n Account account = entityManager.createQuery(\"from Account where accountNr = 1\", Account.class).getSingleResult();\n\n try {\n Thread.sleep(1000);\n }\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n\n account.withdraw(500);\n System.out.println(entityManager.createQuery(\"from Account\").getResultList());\n\n entityManager2.getTransaction().begin();\n\n }).run();\n\n System.out.println(entityManager.createQuery(\"from Account\").getResultList());\n\n }", "@AllowFailure(message=\"OPENJPA-1179 2.0 doesn't allow 'all' as in previous releases\")\n public void testMultiEMCachingAll() {\n Map props = new HashMap(System.getProperties());\n props.put(\"openjpa.MetaDataFactory\", \"jpa(Types=\" + Person.class.getName() + \")\");\n props.put(\"openjpa.jdbc.QuerySQLCache\", \"all\");\n runMultiEMCaching(props);\n }", "public interface EntityService<E extends BaseEntity<ID>, ID extends Serializable> {\n\n /**\n * Find a copy of the entity by its identifier from the database.\n * @param identifier The object identifier\n * @return An instance of the entity\n * @throws ResourceNotFoundException In case of the resource has not been found\n */\n E find(final ID identifier) throws ResourceNotFoundException;\n\n /**\n * Persist an entity object in the database.\n * @param entity The entity object to save\n * @param context The authentication context from the request\n * @throws TechnicalException The entity could not be saved in the database\n * @throws ConflictException A similar copy of the entity already exists\n */\n E create(E entity, RequestContext context)\n throws TechnicalException, ConflictException;\n\n /**\n * Update the provided entity in the database.\n * @param id The entity id\n * @param entity The entity to update\n * @param context The authentication context from the request\n * @throws PersistenceException Thrown if the given entity does not exist in the database\n */\n E update(ID id, E entity, RequestContext context);\n\n /**\n * Gets all the entities from the database.\n * @return A list of all the entities\n */\n List<E> findAll();\n\n /**\n * Retrieves all the entities from database, with pagination.\n * @param page The current page index\n * @param size The number of elements to put on the page\n * @return A list of all the entities of this page\n */\n List<E> findAll(int page, int size);\n\n /**\n * Retrieves all the entites from database, sorted according to the\n * sort object given in argument.\n * @param sort A sort object describing what and how to sort\n * @return A list of all the entites, sorted\n */\n List<E> findAll(Sort sort);\n\n /**\n * Retrieves all the entities with specified identifiers from the database.\n * @param identifiers A sequence of ID of entity objects to retrieve.\n * @return A list of all the entities\n */\n List<E> findAll(Iterable<ID> identifiers);\n\n /**\n * Returns the number of all entity objects.\n * @return The number of entities\n */\n long count();\n\n /**\n * Delete the given entity object.\n * @param entity The entity object to delete\n * @param context The authentication context from the request\n * @throws TechnicalException A persistence error occured during the operation\n * @throws ResourceNotFoundException The entity was not found\n */\n void delete(E entity, RequestContext context)\n throws TechnicalException, ResourceNotFoundException;\n\n /**\n * Try to find an entity that conforms to the given Specification object.\n * @param spec The Specification object, representing the criteria\n * @return The found object, or null else\n */\n E findOne(Specification<E> spec);\n\n /**\n * Retrieves all the entities that conforms to the given Specification object.\n * @return A list of the found entities\n */\n List<E> findAll(Specification<E> spec);\n\n /**\n * Retrieves all the entities that conforms to the given Specification object,\n * sorted according to the Sort object.\n * @return A list of the found entities, sorted\n */\n List<E> findAll(Specification<E> spec, Sort sort);\n\n default <Pr> E findAnyBy(String propertyName, Pr candidateValue)\n throws ResourceNotFoundException {\n return findAllBy(propertyName, candidateValue).stream()\n .findAny()\n .orElseThrow(ResourceNotFoundException::new);\n }\n\n default <Pr> E findFirstBy(String propertyName, Pr candidateValue)\n throws ResourceNotFoundException {\n return findAllBy(propertyName, candidateValue).stream()\n .findFirst()\n .orElseThrow(ResourceNotFoundException::new);\n }\n\n /**\n * Finds all the entity for which the property described by the given accessor\n * have the candidate value.\n * @param propertyName A method reference to the entity property\n * @param candidateValue The candidate value\n * @param <Pr> The type of the property\n * @return A list of all the found entities\n */\n <Pr> List<E> findAllBy(String propertyName, Pr candidateValue);\n\n /**\n * Counts the entities that conforms to the given Specification object.\n * @return The number of found entities\n */\n long count(Specification<E> spec);\n\n\n /**\n * Delete the given entity object.\n * @param entity The entity object to delete\n * @throws TechnicalException A persistence error occured during the operation\n * @throws ResourceNotFoundException The entity was not found\n */\n default void delete(E entity)\n throws TechnicalException, ResourceNotFoundException {\n delete(entity, null);\n }\n\n /**\n * Delete the given entity object.\n * @param id The id of the entity to delete\n * @throws TechnicalException A persistence error occured during the operation\n * @throws ResourceNotFoundException The entity was not found\n */\n default void delete(ID id)\n throws TechnicalException, ConflictException{\n delete(find(id));\n }\n\n /**\n * Persist an entity object in the database.\n * @param entity The entity object to save\n * @throws TechnicalException The entity could not be saved in the database\n * @throws ConflictException A similar copy of the entity already exists\n */\n default E create(E entity)\n throws TechnicalException, ConflictException {\n return create(entity, null);\n }\n\n /**\n * Persist a sequence of entity objects in the database.\n * @param entities The sequence of the entities\n * @throws TechnicalException The entity could not be saved in the database\n * @throws ConflictException A similar copy of the entity already exists\n */\n default void create(Iterable<E> entities)\n throws TechnicalException, ConflictException {\n entities.forEach(this::create);\n }\n\n /**\n * Persist a sequence of entity objects in the database.\n * @param entities The sequence of the entities\n * @param context The authentication context from the request\n * @throws TechnicalException The entity could not be saved in the database\n * @throws ConflictException A similar copy of the entity already exists\n */\n default void create(Iterable<E> entities, RequestContext context)\n throws TechnicalException, ConflictException {\n entities.forEach(entity -> create(entity, context));\n }\n\n /**\n * Update the provided entity in the database.\n * @param id The entity id\n * @param entity The entity to update\n * @throws PersistenceException Thrown if the given entity does not exist in the database\n */\n default E update(ID id, E entity) {\n return update(id, entity, null);\n }\n\n}", "@Override\n public Entity getEntity() {\n return super.getEntity();\n }", "abstract protected void queueEntity(Entity entity);", "@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\t//doing lazy-load\r\n\t\t\t\tmasterAEnt.getDetailAEntCol().size();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest.this\r\n\t\t\t\t\t.manager\r\n\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tSignatureBean signatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQUVudCIsImlzQ29sbCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoiZGV0YWlsQUVudENvbCIsInJhd0tleVZhbHVlcyI6WyIxIl0sInJhd0tleVR5cGVOYW1lcyI6WyJqYXZhLmxhbmcuSW50ZWdlciJdfQ\");\r\n\t\t\t\tCollection<DetailAEnt> detailAEntCol = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\t\t\t\tPlayerSnapshot<Collection<DetailAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(detailAEntCol);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}", "@Transactional\npublic interface RouteJPA extends JpaRepository<RouteEntity, String> {\n\n}", "@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\t//doing lazy-load\r\n\t\t\t\tmasterAEnt.getDetailAEntCol().size();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest.this\r\n\t\t\t\t\t.manager\r\n\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tSignatureBean signatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQUVudCIsImlzQ29sbCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoiZGV0YWlsQUVudENvbCIsInJhd0tleVZhbHVlcyI6WyIxIl0sInJhd0tleVR5cGVOYW1lcyI6WyJqYXZhLmxhbmcuSW50ZWdlciJdfQ\");\r\n\t\t\t\tCollection<DetailAEnt> detailAEntCol = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\t\t\t\tArrayList<DetailAEnt> detailAEntCuttedCol = new ArrayList<>();\r\n\t\t\t\tdetailAEntCuttedCol.add(new ArrayList<>(detailAEntCol).get(1));\r\n\t\t\t\tdetailAEntCuttedCol.add(new ArrayList<>(detailAEntCol).get(2));\r\n\t\t\t\tPlayerSnapshot<Collection<DetailAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(detailAEntCuttedCol);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\t//doing lazy-load\r\n\t\t\t\tmasterAEnt.getDetailAEntCol().size();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest.this\r\n\t\t\t\t\t.manager\r\n\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tSignatureBean signatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQUVudCIsImlzQ29sbCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoiZGV0YWlsQUVudENvbCIsInJhd0tleVZhbHVlcyI6WyIxIl0sInJhd0tleVR5cGVOYW1lcyI6WyJqYXZhLmxhbmcuSW50ZWdlciJdfQ\");\r\n\t\t\t\tCollection<DetailAEnt> detailAEntCol = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\t\t\t\tArrayList<DetailAEnt> detailAEntCuttedCol = new ArrayList<>();\r\n\t\t\t\tdetailAEntCuttedCol.add(new ArrayList<>(detailAEntCol).get(0));\r\n\t\t\t\tdetailAEntCuttedCol.add(new ArrayList<>(detailAEntCol).get(1));\r\n\t\t\t\tPlayerSnapshot<Collection<DetailAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(detailAEntCuttedCol);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}", "@Transactional\r\npublic interface IAlbumManager extends ISoundlinkManager<Album, Integer> {\r\n\r\n /**\r\n * Get all albums from artiste\r\n * \r\n * @param artisteId\r\n * @param userId\r\n * @return\r\n */\r\n List<Album> getAlbumFromArtiste(Integer artisteId, Integer userId);\r\n\r\n /**\r\n * Find an album by his name and the artiste name\r\n * \r\n * @param albumName\r\n * @param artisteName\r\n * @return\r\n */\r\n Album findAlbumByNameAndArtisteName(String albumName, String artisteName);\r\n\r\n /**\r\n * Get all albums from user\r\n * \r\n * @param user id\r\n * @return\r\n */\r\n List<Album> getAlbumsByUserId(Integer userId);\r\n\r\n}", "@Override\n\t@PersistenceContext(unitName=\"PU-POC\")\t\n\tpublic void setEntityManager(EntityManager entityManager) {\n\t\tsuper.setEntityManager(entityManager);\n\t}", "@BeforeClass\n public static void initTestFixture() throws Exception {\n entityManagerFactory = Persistence.createEntityManagerFactory(\"test\");\n entityManager = entityManagerFactory.createEntityManager();\n }", "@Override\n@Transactional\npublic Employee getEmployeeById(int id) {\n\treturn entityManager.find(Employee.class, id);\n}", "public interface ITestAuthorsService extends IBaseEntityManager<TestAuthors> {\n}", "public interface EntityContext extends EJBContext\n{\n /**\n * Obtain a reference to the EJB local object that is currently \n * associated with the instance.\n *\n * <p> An instance of an entity enterprise Bean can call this method only\n * when the instance is associated with an EJB local object identity, i.e.\n * in the ejbActivate, ejbPassivate, ejbPostCreate, ejbRemove,\n * ejbLoad, ejbStore, and business methods.\n *\n * <p> An instance can use this method, for example, when it wants to\n * pass a reference to itself in a method argument or result.\n *\n * @return The EJB local object currently associated with the instance.\n *\n * @exception IllegalStateException if the instance invokes this\n * method while the instance is in a state that does not allow the\n * instance to invoke this method, or if the instance does not have\n * a local interface.\n */\n EJBLocalObject getEJBLocalObject() throws IllegalStateException;\n\n /**\n * Obtain a reference to the EJB object that is currently associated with \n * the instance.\n *\n * <p> An instance of an entity enterprise Bean can call this method only\n * when the instance is associated with an EJB object identity, i.e.\n * in the ejbActivate, ejbPassivate, ejbPostCreate, ejbRemove,\n * ejbLoad, ejbStore, and business methods.\n *\n * <p> An instance can use this method, for example, when it wants to\n * pass a reference to itself in a method argument or result.\n *\n * @return The EJB object currently associated with the instance.\n *\n * @exception IllegalStateException Thrown if the instance invokes this\n * method while the instance is in a state that does not allow the\n * instance to invoke this method, or if the instance does not have\n * a remote interface.\n */\n EJBObject getEJBObject() throws IllegalStateException;\n\n /**\n * Obtain the primary key of the EJB object that is currently\n * associated with this instance.\n *\n * <p> An instance of an entity enterprise Bean can call this method only\n * when the instance is associated with an EJB object identity, i.e.\n * in the ejbActivate, ejbPassivate, ejbPostCreate, ejbRemove,\n * ejbLoad, ejbStore, and business methods.\n *\n * <p><b>Note</b>: The result of this method is that same as the\n * result of getEJBObject().getPrimaryKey().\n *\n * @return The primary key currently associated with the instance.\n *\n * @exception IllegalStateException Thrown if the instance invokes this\n * method while the instance is in a state that does not allow the\n * instance to invoke this method.\n */\n Object getPrimaryKey() throws IllegalStateException;\n}", "public interface BaseLocalDataSource {\n void openTransaction();\n\n void closeTransaction();\n}", "public EntityManager getEM() {\n\t\treturn this.entity;\n\t}", "@Transactional\npublic interface PostDao extends CrudRepository<Post, Long> {\n\n Post findById(Long id);\n\n}", "@Test\r\n public void testManyToOneAfterClosed(){\r\n EntityManager em = factory.createEntityManager();\r\n // create MyTestObject1 and a 2 with a reference from 1 to 2.\r\n MyTestObject4 o4 = new MyTestObject4();\r\n o4.setName4(\"04\");\r\n em.persist(o4);\r\n MyTestObject2 o2 = new MyTestObject2(\"ob2\", 123);\r\n o2.setMyTestObject4(o4);\r\n em.persist(o2);\r\n MyTestObject o1 = new MyTestObject();\r\n o1.setMyTestObject2(o2);\r\n em.persist(o1);\r\n em.getTransaction().commit();\r\n // close em\r\n em.close();\r\n\r\n // clean out the caches\r\n clearCaches();\r\n\r\n em = factory.createEntityManager();\r\n // get all MyTestObject2's to get them in 2nd level cache\r\n Query query = em.createQuery(\"select o from MyTestObject2 o\");\r\n List<MyTestObject2> resultList = query.getResultList();\r\n for (MyTestObject2 myTestObject2 : resultList) {\r\n System.out.println(myTestObject2);\r\n }\r\n // close em\r\n em.close();\r\n\r\n em = factory.createEntityManager();\r\n // now get 1's and touch the referenced 2's, ie: getMyTestObject2();\r\n query = em.createQuery(\"select o from MyTestObject o\");\r\n List<MyTestObject> resultList2 = query.getResultList();\r\n for (MyTestObject myTestObject : resultList2) {\r\n System.out.println(myTestObject.getMyTestObject2().getMyTestObject4());\r\n }\r\n em.close();\r\n }", "public void commitEntity();", "protected Object update(Object entity) {\r\n\r\n try {\r\n entityManager.getTransaction().begin();\r\n Object o = entityManager.merge(entity);\r\n entityManager.getTransaction().commit();\r\n return o;\r\n } catch (Exception e) {\r\n System.err.println(\"Erro ao atualizar Entidade \" + e.getMessage());\r\n }\r\n\r\n return null;\r\n }", "public abstract FHIRPersistence getPersistenceImpl() throws Exception;", "@Override\n public E update(E entity) {\n LOG.info(\"[update] Start: entity = \" + entity.getClass().getSimpleName());\n entityManager.merge(entity);\n LOG.info(\"[update] End\");\n return entity;\n }", "protected abstract Object getTransactionObject() throws TransactionInfrastructureException;", "@Override\n protected Loadable[] getEntityPersisters() {\n \t\treturn persisters;\n \t}" ]
[ "0.6979293", "0.68959546", "0.68591624", "0.6835134", "0.68288404", "0.6753234", "0.6753234", "0.67416036", "0.66860896", "0.6658358", "0.663653", "0.66270804", "0.65487474", "0.6483364", "0.6462739", "0.6372437", "0.6349639", "0.6316726", "0.61260456", "0.6011383", "0.6009084", "0.6007976", "0.59957916", "0.5964638", "0.5958061", "0.5931501", "0.59233725", "0.59190005", "0.59171516", "0.5906162", "0.5905965", "0.58856475", "0.58304", "0.5830029", "0.5827353", "0.58216226", "0.58216226", "0.58216226", "0.5801927", "0.579886", "0.5766615", "0.5739012", "0.5737994", "0.5730618", "0.5729259", "0.57138497", "0.57138497", "0.57138497", "0.57138497", "0.5708159", "0.5659824", "0.56455654", "0.5612302", "0.56074905", "0.5593271", "0.558034", "0.5577629", "0.55477405", "0.55251724", "0.5521182", "0.55209494", "0.5518798", "0.55064243", "0.54888576", "0.5475269", "0.5454145", "0.5448994", "0.5422562", "0.5415784", "0.5411014", "0.5408312", "0.5406383", "0.54023063", "0.5386446", "0.5365102", "0.5347796", "0.53460777", "0.5334838", "0.5330776", "0.53281343", "0.53249514", "0.5288583", "0.5287976", "0.52877575", "0.52863055", "0.5278001", "0.526516", "0.52600783", "0.5255555", "0.5246616", "0.5244132", "0.5234495", "0.52174973", "0.5217477", "0.5209673", "0.52088845", "0.52075285", "0.5202541", "0.51937217", "0.51702005" ]
0.58050084
38
EXAMPLE USE CASES (using variables declared above)
public void Plant(){ name = "Peter"; // ID = 7; //<-- Not working because it is "final" - meaning it cannot be reassigned //TODO: Uncomment the above line to see error ^^^^ this.size = "large"; type = "Tree"; //<-- Only working because we're in the same class as the declared variable height = 10; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int main()\n{\n int x;\n float y;\n cin>>x>>y;\n switch(x)\n {\n case 1:\n break;\n case 2:\n y= (y*0.5)+y;\n cout<<y;\n break;\n case 3:\n y= y*2;\n cout<<y;\n break;\n default: \n cout<<\"Number of items is more\";\n break;\n }\n}", "public static void main(String[] args) {\n int number = 1154 ;\n switch (number){\n\n case 1:\n case 3:\n case 5:\n case 7:\n case 8:\n case 10:\n case 12:\n System.out.println(\"31 days in this month\");\n break;\n\n\n case 4:\n case 6:\n case 9:\n case 11:\n System.out.println(\" 30 days in this month\");\n break;\n\n case 2:\n System.out.println(\"28 days in february\");\n break;\n\n default:\n System.out.println(\"Invalid\");\n break;\n\n\n }\n\n\n System.out.println(\"------------ Pass or failed____________________\");\n\n\n char grade = 'u';\n\n switch (grade){\n case 'A':\n case 'B':\n case 'C':\n case 'D':\n System.out.println(\"Passed\");\n break;\n\n case 'F':\n System.out.println(\"Failed\");\n break;\n\n default:\n System.out.println(\"Invalid Grade\");\n }\n\n\n\n\n\n }", "public static void main(String[] args) {\n int currentSeason = 0;\n\n switch (currentSeason) {\n case 1: // ga wandelen in de natuur\n System.out.println(\"Lente!\");\n break;\n case 2: // ga liggen op het strand\n System.out.println(\"Zomer!\");\n break;\n case 3: // ga steden bezoeken\n System.out.println(\"Herfst!\");\n break;\n default: // het is winter, ga op wintersport\n System.out.println(\"Winter!\");\n break;\n }\n\n // what if currentSeason is 6, we only have 4 seasons: We make an if statement around the switch statement.\n // we have additional conditions: if anotherSeason is greater than or equal to 0 AND less than 5, then you may execute the switch statement\n int anotherSeason = 3;\n\n if (anotherSeason >= 0 && anotherSeason < 5) {\n switch (anotherSeason) {\n case 1: // ga wandelen in de natuur\n System.out.println(\"Lente!\");\n break;\n case 2: // ga liggen op het strand\n System.out.println(\"Zomer!\");\n break;\n case 3: // ga steden bezoeken\n System.out.println(\"Herfst!\");\n break;\n default: // het is winter, ga op wintersport\n System.out.println(\"Winter!\");\n break;\n }\n }\n\n // switch statement switchValue\n // don't forget the break!\n int switchValue = 3;\n\n switch (switchValue) {\n case 1:\n System.out.println(\"Value was 1\");\n break;\n case 2:\n System.out.println(\"Value was 2\");\n break;\n case 3:\n case 4:\n case 5:\n System.out.println(\"Value was a 3, or a 4, or a 5\");\n System.out.println(\"Actually it was a \" + switchValue);\n break;\n default:\n System.out.println(\"Was not 1, 2, 3, 4 or 5\");\n break;\n }\n\n // switch statement toUppercase()\n String month = \"JuNE\";\n\n switch (month.toUpperCase()) {\n case \"JANUARY\":\n System.out.println(\"January\");\n break;\n case \"JUNE\":\n System.out.println(\"June\");\n break;\n default:\n System.out.println(\"Not sure\");\n }\n }", "public static void main(String[] args)\n { char z ='c'; // defining variance\n if(z=='a') // applying condition\n {\n System.out.println(\"City name starts with \" + z + \" is Ahmedabad\");\n }\n else if (z=='b')\n {\n System.out.println(\"City name starts with \" + z + \" is Baroda\");\n }\n else if (z=='c')\n {\n System.out.println(\"City name starts with \" + z + \" is Charotar\");\n }\n else if (z=='d')\n {\n System.out.println(\"City name starts with \" + z + \" is Daman\");\n }\n else if (z=='e')\n {\n System.out.println(\"City name starts with \" + z + \" is Egola\");\n }\n else if (z=='f')\n {\n System.out.println(\"City name starts with \" + z + \" is Fatehpura\");\n }\n else\n {\n System.out.println(\"Invalid Entry\");\n }\n }", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\r\n System.out.print(\"Where are you from? \");\r\n String country = sc.next().toLowerCase();\r\n\r\n // Test the variable against the cases\r\n switch(country)\r\n {\r\n case \"ireland\": System.out.println(\"So you are Irish\"); break;\r\n case \"france\": System.out.println(\"So you are French\"); break;\r\n case \"brazil\": System.out.println(\"So you are Brazilian\"); break;\r\n default: System.out.println(\"Unknown\"); break;\r\n }\r\n }", "public static void main(String[] args) {\n\t\tlong x = 100L;\r\n\t\tswitch ((int) x) {\r\n//\t\tcase value:\r\n//\r\n//\t\t\tbreak;\r\n//\r\n//\t\tdefault:\r\n//\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tString username = \"zhangsan\";\r\n\t\tswitch (username) {\r\n//\t\tcase value:\r\n//\t\t\t\r\n//\t\t\tbreak;\r\n//\r\n//\t\tdefault:\r\n//\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\tSystem.out.println(\"请输入数字:\");\r\n\t\tint num = scanner.nextInt();\r\n\t\tswitch (num) {\r\n\t\tcase 1:\r\n\t\t\tSystem.out.println(\"星期一\");\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"星期二\");\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"星期三\");\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"星期四\");\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tcase 5:\r\n\t\t\tSystem.out.println(\"星期五\");\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"对不起你输入的数字非法!!!\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"---------------------------------------\");\r\n\r\n\t\t// case穿透\r\n\t\tswitch (num) {\r\n\t\tcase 1:\r\n\t\t\tSystem.out.println(\"星期一\");\r\n\r\n\r\n\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"星期二\");\r\n\r\n\r\n\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"星期三\");\r\n\r\n\r\n\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"星期四\");\r\n\r\n\r\n\r\n\t\tcase 5:\r\n\t\t\tSystem.out.println(\"星期五\");\r\n\r\n\r\n\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"对不起你输入的数字非法!!!\");\r\n\r\n\t\t}\r\n\r\n\t\t// case合并\r\n\t\tswitch (num) {\r\n\t\tcase 1:\r\n\t\tcase 0:\r\n\t\t\tSystem.out.println(\"星期一\");\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"星期二\");\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"星期三\");\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"星期四\");\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tcase 5:\r\n\t\t\tSystem.out.println(\"星期五\");\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"对不起你输入的数字非法!!!\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t}", "public String getMessage(int chance){\n switch(chance){\n case 1: danger=5;\n pred = \"monkeys\";\n return \"A whole community of monkeys hide in the trees around you. They stare intently\";\n case 2: danger=5;\n pred = \"snakes\";\n return \"In the ground there are giant holes as if made by a large mammal. But no such animals live here \";\n case 3: danger=10;\n pred = \"tiger\";\n return \"A tiger is watching you. This is not the jungle book\";\n case 4: danger = 6;\n pred = \"evil rabbit\";\n return \"There are animal carcases everywhere. You are in someones lair\";\n default: return \"\";\n }\n}", "protected void do_switch() {\n {\n bind(OPC.CONST_0); iparmNone();\n pre(FLOW_NEXT); do_const(0); post();\n bind(OPC.CONST_1); iparmNone();\n pre(FLOW_NEXT); do_const(1); post();\n bind(OPC.CONST_2); iparmNone();\n pre(FLOW_NEXT); do_const(2); post();\n bind(OPC.CONST_3); iparmNone();\n pre(FLOW_NEXT); do_const(3); post();\n bind(OPC.CONST_4); iparmNone();\n pre(FLOW_NEXT); do_const(4); post();\n bind(OPC.CONST_5); iparmNone();\n pre(FLOW_NEXT); do_const(5); post();\n bind(OPC.CONST_6); iparmNone();\n pre(FLOW_NEXT); do_const(6); post();\n bind(OPC.CONST_7); iparmNone();\n pre(FLOW_NEXT); do_const(7); post();\n bind(OPC.CONST_8); iparmNone();\n pre(FLOW_NEXT); do_const(8); post();\n bind(OPC.CONST_9); iparmNone();\n pre(FLOW_NEXT); do_const(9); post();\n bind(OPC.CONST_10); iparmNone();\n pre(FLOW_NEXT); do_const(10); post();\n bind(OPC.CONST_11); iparmNone();\n pre(FLOW_NEXT); do_const(11); post();\n bind(OPC.CONST_12); iparmNone();\n pre(FLOW_NEXT); do_const(12); post();\n bind(OPC.CONST_13); iparmNone();\n pre(FLOW_NEXT); do_const(13); post();\n bind(OPC.CONST_14); iparmNone();\n pre(FLOW_NEXT); do_const(14); post();\n bind(OPC.CONST_15); iparmNone();\n pre(FLOW_NEXT); do_const(15); post();\n bind(OPC.OBJECT_0); iparmNone();\n pre(FLOW_NEXT); do_object(0); post();\n bind(OPC.OBJECT_1); iparmNone();\n pre(FLOW_NEXT); do_object(1); post();\n bind(OPC.OBJECT_2); iparmNone();\n pre(FLOW_NEXT); do_object(2); post();\n bind(OPC.OBJECT_3); iparmNone();\n pre(FLOW_NEXT); do_object(3); post();\n bind(OPC.OBJECT_4); iparmNone();\n pre(FLOW_NEXT); do_object(4); post();\n bind(OPC.OBJECT_5); iparmNone();\n pre(FLOW_NEXT); do_object(5); post();\n bind(OPC.OBJECT_6); iparmNone();\n pre(FLOW_NEXT); do_object(6); post();\n bind(OPC.OBJECT_7); iparmNone();\n pre(FLOW_NEXT); do_object(7); post();\n bind(OPC.OBJECT_8); iparmNone();\n pre(FLOW_NEXT); do_object(8); post();\n bind(OPC.OBJECT_9); iparmNone();\n pre(FLOW_NEXT); do_object(9); post();\n bind(OPC.OBJECT_10); iparmNone();\n pre(FLOW_NEXT); do_object(10); post();\n bind(OPC.OBJECT_11); iparmNone();\n pre(FLOW_NEXT); do_object(11); post();\n bind(OPC.OBJECT_12); iparmNone();\n pre(FLOW_NEXT); do_object(12); post();\n bind(OPC.OBJECT_13); iparmNone();\n pre(FLOW_NEXT); do_object(13); post();\n bind(OPC.OBJECT_14); iparmNone();\n pre(FLOW_NEXT); do_object(14); post();\n bind(OPC.OBJECT_15); iparmNone();\n pre(FLOW_NEXT); do_object(15); post();\n bind(OPC.LOAD_0); iparmNone();\n pre(FLOW_NEXT); do_load(0); post();\n bind(OPC.LOAD_1); iparmNone();\n pre(FLOW_NEXT); do_load(1); post();\n bind(OPC.LOAD_2); iparmNone();\n pre(FLOW_NEXT); do_load(2); post();\n bind(OPC.LOAD_3); iparmNone();\n pre(FLOW_NEXT); do_load(3); post();\n bind(OPC.LOAD_4); iparmNone();\n pre(FLOW_NEXT); do_load(4); post();\n bind(OPC.LOAD_5); iparmNone();\n pre(FLOW_NEXT); do_load(5); post();\n bind(OPC.LOAD_6); iparmNone();\n pre(FLOW_NEXT); do_load(6); post();\n bind(OPC.LOAD_7); iparmNone();\n pre(FLOW_NEXT); do_load(7); post();\n bind(OPC.LOAD_8); iparmNone();\n pre(FLOW_NEXT); do_load(8); post();\n bind(OPC.LOAD_9); iparmNone();\n pre(FLOW_NEXT); do_load(9); post();\n bind(OPC.LOAD_10); iparmNone();\n pre(FLOW_NEXT); do_load(10); post();\n bind(OPC.LOAD_11); iparmNone();\n pre(FLOW_NEXT); do_load(11); post();\n bind(OPC.LOAD_12); iparmNone();\n pre(FLOW_NEXT); do_load(12); post();\n bind(OPC.LOAD_13); iparmNone();\n pre(FLOW_NEXT); do_load(13); post();\n bind(OPC.LOAD_14); iparmNone();\n pre(FLOW_NEXT); do_load(14); post();\n bind(OPC.LOAD_15); iparmNone();\n pre(FLOW_NEXT); do_load(15); post();\n bind(OPC.STORE_0); iparmNone();\n pre(FLOW_NEXT); do_store(0); post();\n bind(OPC.STORE_1); iparmNone();\n pre(FLOW_NEXT); do_store(1); post();\n bind(OPC.STORE_2); iparmNone();\n pre(FLOW_NEXT); do_store(2); post();\n bind(OPC.STORE_3); iparmNone();\n pre(FLOW_NEXT); do_store(3); post();\n bind(OPC.STORE_4); iparmNone();\n pre(FLOW_NEXT); do_store(4); post();\n bind(OPC.STORE_5); iparmNone();\n pre(FLOW_NEXT); do_store(5); post();\n bind(OPC.STORE_6); iparmNone();\n pre(FLOW_NEXT); do_store(6); post();\n bind(OPC.STORE_7); iparmNone();\n pre(FLOW_NEXT); do_store(7); post();\n bind(OPC.STORE_8); iparmNone();\n pre(FLOW_NEXT); do_store(8); post();\n bind(OPC.STORE_9); iparmNone();\n pre(FLOW_NEXT); do_store(9); post();\n bind(OPC.STORE_10); iparmNone();\n pre(FLOW_NEXT); do_store(10); post();\n bind(OPC.STORE_11); iparmNone();\n pre(FLOW_NEXT); do_store(11); post();\n bind(OPC.STORE_12); iparmNone();\n pre(FLOW_NEXT); do_store(12); post();\n bind(OPC.STORE_13); iparmNone();\n pre(FLOW_NEXT); do_store(13); post();\n bind(OPC.STORE_14); iparmNone();\n pre(FLOW_NEXT); do_store(14); post();\n bind(OPC.STORE_15); iparmNone();\n pre(FLOW_NEXT); do_store(15); post();\n bind(OPC.LOADPARM_0); iparmNone();\n pre(FLOW_NEXT); do_loadparm(0); post();\n bind(OPC.LOADPARM_1); iparmNone();\n pre(FLOW_NEXT); do_loadparm(1); post();\n bind(OPC.LOADPARM_2); iparmNone();\n pre(FLOW_NEXT); do_loadparm(2); post();\n bind(OPC.LOADPARM_3); iparmNone();\n pre(FLOW_NEXT); do_loadparm(3); post();\n bind(OPC.LOADPARM_4); iparmNone();\n pre(FLOW_NEXT); do_loadparm(4); post();\n bind(OPC.LOADPARM_5); iparmNone();\n pre(FLOW_NEXT); do_loadparm(5); post();\n bind(OPC.LOADPARM_6); iparmNone();\n pre(FLOW_NEXT); do_loadparm(6); post();\n bind(OPC.LOADPARM_7); iparmNone();\n pre(FLOW_NEXT); do_loadparm(7); post();\n bind(OPC.WIDE_M1); iparmNone();\n pre(FLOW_CHANGE); do_wide(-1); post();\n bind(OPC.WIDE_0); iparmNone();\n pre(FLOW_CHANGE); do_wide(0); post();\n bind(OPC.WIDE_1); iparmNone();\n pre(FLOW_CHANGE); do_wide(1); post();\n bind(OPC.WIDE_SHORT); iparmNone();\n pre(FLOW_CHANGE); do_wide_short(); post();\n bind(OPC.WIDE_INT); iparmNone();\n pre(FLOW_CHANGE); do_wide_int(); post();\n bind(OPC.ESCAPE); iparmNone();\n pre(FLOW_CHANGE); do_escape(); post();\n bind(OPC.ESCAPE_WIDE_M1); iparmNone();\n pre(FLOW_CHANGE); do_escape_wide(-1); post();\n bind(OPC.ESCAPE_WIDE_0); iparmNone();\n pre(FLOW_CHANGE); do_escape_wide(0); post();\n bind(OPC.ESCAPE_WIDE_1); iparmNone();\n pre(FLOW_CHANGE); do_escape_wide(1); post();\n bind(OPC.ESCAPE_WIDE_SHORT); iparmNone();\n pre(FLOW_CHANGE); do_escape_wide_short(); post();\n bind(OPC.ESCAPE_WIDE_INT); iparmNone();\n pre(FLOW_CHANGE); do_escape_wide_int(); post();\n bind(OPC.CATCH); iparmNone();\n pre(FLOW_NEXT); do_catch(); post();\n bind(OPC.CONST_NULL); iparmNone();\n pre(FLOW_NEXT); do_const_null(); post();\n bind(OPC.CONST_M1); iparmNone();\n pre(FLOW_NEXT); do_const(-1); post();\n bind(OPC.CONST_BYTE); iparmNone();\n pre(FLOW_NEXT); do_const_byte(); post();\n bind(OPC.CONST_SHORT); iparmNone();\n pre(FLOW_NEXT); do_const_short(); post();\n bind(OPC.CONST_CHAR); iparmNone();\n pre(FLOW_NEXT); do_const_char(); post();\n bind(OPC.CONST_INT); iparmNone();\n pre(FLOW_NEXT); do_const_int(); post();\n bind(OPC.CONST_LONG); iparmNone();\n pre(FLOW_NEXT); do_const_long(); post();\n bind(OPC.OBJECT); iparmUByte();\n bind(OPC.OBJECT_WIDE); pre(FLOW_NEXT); do_object(); post();\n bind(OPC.LOAD); iparmUByte();\n bind(OPC.LOAD_WIDE); pre(FLOW_NEXT); do_load(); post(); \n bind(OPC.LOAD_I2); iparmUByte();\n bind(OPC.LOAD_I2_WIDE); pre(FLOW_NEXT); do_load_i2(); post();\n bind(OPC.STORE); iparmUByte();\n bind(OPC.STORE_WIDE); pre(FLOW_NEXT); do_store(); post();\n bind(OPC.STORE_I2); iparmUByte();\n bind(OPC.STORE_I2_WIDE); pre(FLOW_NEXT); do_store_i2(); post();\n bind(OPC.LOADPARM); iparmUByte();\n bind(OPC.LOADPARM_WIDE); pre(FLOW_NEXT); do_loadparm(); post();\n bind(OPC.LOADPARM_I2); iparmUByte();\n bind(OPC.LOADPARM_I2_WIDE); pre(FLOW_NEXT); do_loadparm_i2(); post();\n bind(OPC.STOREPARM); iparmUByte();\n bind(OPC.STOREPARM_WIDE); pre(FLOW_NEXT); do_storeparm(); post();\n bind(OPC.STOREPARM_I2); iparmUByte();\n bind(OPC.STOREPARM_I2_WIDE); pre(FLOW_NEXT); do_storeparm_i2(); post();\n bind(OPC.INC); iparmUByte();\n bind(OPC.INC_WIDE); pre(FLOW_NEXT); do_inc(); post(); \n bind(OPC.DEC); iparmUByte();\n bind(OPC.DEC_WIDE); pre(FLOW_NEXT); do_dec(); post(); \n bind(OPC.INCPARM); iparmUByte();\n bind(OPC.INCPARM_WIDE); pre(FLOW_NEXT); do_incparm(); post();\n bind(OPC.DECPARM); iparmUByte();\n bind(OPC.DECPARM_WIDE); pre(FLOW_NEXT); do_decparm(); post();\n bind(OPC.GOTO); iparmByte();\n bind(OPC.GOTO_WIDE); pre(FLOW_CHANGE); do_goto(); post();\n bind(OPC.IF_EQ_O); iparmByte();\n bind(OPC.IF_EQ_O_WIDE); pre(FLOW_CHANGE); do_if(1, EQ, OOP); post();\n bind(OPC.IF_NE_O); iparmByte();\n bind(OPC.IF_NE_O_WIDE); pre(FLOW_CHANGE); do_if(1, NE, OOP); post();\n bind(OPC.IF_CMPEQ_O); iparmByte();\n bind(OPC.IF_CMPEQ_O_WIDE); pre(FLOW_CHANGE); do_if(2, EQ, OOP); post();\n bind(OPC.IF_CMPNE_O); iparmByte();\n bind(OPC.IF_CMPNE_O_WIDE); pre(FLOW_CHANGE); do_if(2, NE, OOP); post();\n bind(OPC.IF_EQ_I); iparmByte();\n bind(OPC.IF_EQ_I_WIDE); pre(FLOW_CHANGE); do_if(1, EQ, INT); post();\n bind(OPC.IF_NE_I); iparmByte();\n bind(OPC.IF_NE_I_WIDE); pre(FLOW_CHANGE); do_if(1, NE, INT); post();\n bind(OPC.IF_LT_I); iparmByte();\n bind(OPC.IF_LT_I_WIDE); pre(FLOW_CHANGE); do_if(1, LT, INT); post();\n bind(OPC.IF_LE_I); iparmByte();\n bind(OPC.IF_LE_I_WIDE); pre(FLOW_CHANGE); do_if(1, LE, INT); post();\n bind(OPC.IF_GT_I); iparmByte();\n bind(OPC.IF_GT_I_WIDE); pre(FLOW_CHANGE); do_if(1, GT, INT); post();\n bind(OPC.IF_GE_I); iparmByte();\n bind(OPC.IF_GE_I_WIDE); pre(FLOW_CHANGE); do_if(1, GE, INT); post();\n bind(OPC.IF_CMPEQ_I); iparmByte();\n bind(OPC.IF_CMPEQ_I_WIDE); pre(FLOW_CHANGE); do_if(2, EQ, INT); post();\n bind(OPC.IF_CMPNE_I); iparmByte();\n bind(OPC.IF_CMPNE_I_WIDE); pre(FLOW_CHANGE); do_if(2, NE, INT); post();\n bind(OPC.IF_CMPLT_I); iparmByte();\n bind(OPC.IF_CMPLT_I_WIDE); pre(FLOW_CHANGE); do_if(2, LT, INT); post();\n bind(OPC.IF_CMPLE_I); iparmByte();\n bind(OPC.IF_CMPLE_I_WIDE); pre(FLOW_CHANGE); do_if(2, LE, INT); post();\n bind(OPC.IF_CMPGT_I); iparmByte();\n bind(OPC.IF_CMPGT_I_WIDE); pre(FLOW_CHANGE); do_if(2, GT, INT); post();\n bind(OPC.IF_CMPGE_I); iparmByte();\n bind(OPC.IF_CMPGE_I_WIDE); pre(FLOW_CHANGE); do_if(2, GE, INT); post();\n bind(OPC.IF_EQ_L); iparmByte();\n bind(OPC.IF_EQ_L_WIDE); pre(FLOW_CHANGE); do_if(1, EQ, LONG); post();\n bind(OPC.IF_NE_L); iparmByte();\n bind(OPC.IF_NE_L_WIDE); pre(FLOW_CHANGE); do_if(1, NE, LONG); post();\n bind(OPC.IF_LT_L); iparmByte();\n bind(OPC.IF_LT_L_WIDE); pre(FLOW_CHANGE); do_if(1, LT, LONG); post();\n bind(OPC.IF_LE_L); iparmByte();\n bind(OPC.IF_LE_L_WIDE); pre(FLOW_CHANGE); do_if(1, LE, LONG); post();\n bind(OPC.IF_GT_L); iparmByte();\n bind(OPC.IF_GT_L_WIDE); pre(FLOW_CHANGE); do_if(1, GT, LONG); post();\n bind(OPC.IF_GE_L); iparmByte();\n bind(OPC.IF_GE_L_WIDE); pre(FLOW_CHANGE); do_if(1, GE, LONG); post();\n bind(OPC.IF_CMPEQ_L); iparmByte();\n bind(OPC.IF_CMPEQ_L_WIDE); pre(FLOW_CHANGE); do_if(2, EQ, LONG); post();\n bind(OPC.IF_CMPNE_L); iparmByte();\n bind(OPC.IF_CMPNE_L_WIDE); pre(FLOW_CHANGE); do_if(2, NE, LONG); post();\n bind(OPC.IF_CMPLT_L); iparmByte();\n bind(OPC.IF_CMPLT_L_WIDE); pre(FLOW_CHANGE); do_if(2, LT, LONG); post();\n bind(OPC.IF_CMPLE_L); iparmByte();\n bind(OPC.IF_CMPLE_L_WIDE); pre(FLOW_CHANGE); do_if(2, LE, LONG); post();\n bind(OPC.IF_CMPGT_L); iparmByte();\n bind(OPC.IF_CMPGT_L_WIDE); pre(FLOW_CHANGE); do_if(2, GT, LONG); post();\n bind(OPC.IF_CMPGE_L); iparmByte();\n bind(OPC.IF_CMPGE_L_WIDE); pre(FLOW_CHANGE); do_if(2, GE, LONG); post();\n bind(OPC.GETSTATIC_I); iparmUByte();\n bind(OPC.GETSTATIC_I_WIDE); pre(FLOW_CALL); do_getstatic(INT); post();\n bind(OPC.GETSTATIC_O); iparmUByte();\n bind(OPC.GETSTATIC_O_WIDE); pre(FLOW_CALL); do_getstatic(OOP); post();\n bind(OPC.GETSTATIC_L); iparmUByte();\n bind(OPC.GETSTATIC_L_WIDE); pre(FLOW_CALL); do_getstatic(LONG); post();\n bind(OPC.CLASS_GETSTATIC_I); iparmUByte();\n bind(OPC.CLASS_GETSTATIC_I_WIDE); pre(FLOW_CALL); do_class_getstatic(INT); post();\n bind(OPC.CLASS_GETSTATIC_O); iparmUByte();\n bind(OPC.CLASS_GETSTATIC_O_WIDE); pre(FLOW_CALL); do_class_getstatic(OOP); post();\n bind(OPC.CLASS_GETSTATIC_L); iparmUByte();\n bind(OPC.CLASS_GETSTATIC_L_WIDE); pre(FLOW_CALL); do_class_getstatic(LONG); post();\n bind(OPC.PUTSTATIC_I); iparmUByte();\n bind(OPC.PUTSTATIC_I_WIDE); pre(FLOW_CALL); do_putstatic(INT); post();\n bind(OPC.PUTSTATIC_O); iparmUByte();\n bind(OPC.PUTSTATIC_O_WIDE); pre(FLOW_CALL); do_putstatic(OOP); post();\n bind(OPC.PUTSTATIC_L); iparmUByte();\n bind(OPC.PUTSTATIC_L_WIDE); pre(FLOW_CALL); do_putstatic(LONG); post();\n bind(OPC.CLASS_PUTSTATIC_I); iparmUByte();\n bind(OPC.CLASS_PUTSTATIC_I_WIDE); pre(FLOW_CALL); do_class_putstatic(INT); post();\n bind(OPC.CLASS_PUTSTATIC_O); iparmUByte();\n bind(OPC.CLASS_PUTSTATIC_O_WIDE); pre(FLOW_CALL); do_class_putstatic(OOP); post();\n bind(OPC.CLASS_PUTSTATIC_L); iparmUByte();\n bind(OPC.CLASS_PUTSTATIC_L_WIDE); pre(FLOW_CALL); do_class_putstatic(LONG); post();\n bind(OPC.GETFIELD_I); iparmUByte();\n bind(OPC.GETFIELD_I_WIDE); pre(FLOW_CALL); do_getfield(INT); post();\n bind(OPC.GETFIELD_B); iparmUByte();\n bind(OPC.GETFIELD_B_WIDE); pre(FLOW_CALL); do_getfield(BYTE); post();\n bind(OPC.GETFIELD_S); iparmUByte();\n bind(OPC.GETFIELD_S_WIDE); pre(FLOW_CALL); do_getfield(SHORT); post();\n bind(OPC.GETFIELD_C); iparmUByte();\n bind(OPC.GETFIELD_C_WIDE); pre(FLOW_CALL); do_getfield(USHORT); post();\n bind(OPC.GETFIELD_O); iparmUByte();\n bind(OPC.GETFIELD_O_WIDE); pre(FLOW_CALL); do_getfield(OOP); post();\n bind(OPC.GETFIELD_L); iparmUByte();\n bind(OPC.GETFIELD_L_WIDE); pre(FLOW_CALL); do_getfield(LONG); post();\n bind(OPC.GETFIELD0_I); iparmUByte();\n bind(OPC.GETFIELD0_I_WIDE); pre(FLOW_NEXT); do_getfield0(INT); post();\n bind(OPC.GETFIELD0_B); iparmUByte();\n bind(OPC.GETFIELD0_B_WIDE); pre(FLOW_NEXT); do_getfield0(BYTE); post();\n bind(OPC.GETFIELD0_S); iparmUByte();\n bind(OPC.GETFIELD0_S_WIDE); pre(FLOW_NEXT); do_getfield0(SHORT); post();\n bind(OPC.GETFIELD0_C); iparmUByte();\n bind(OPC.GETFIELD0_C_WIDE); pre(FLOW_NEXT); do_getfield0(USHORT); post();\n bind(OPC.GETFIELD0_O); iparmUByte();\n bind(OPC.GETFIELD0_O_WIDE); pre(FLOW_NEXT); do_getfield0(OOP); post();\n bind(OPC.GETFIELD0_L); iparmUByte();\n bind(OPC.GETFIELD0_L_WIDE); pre(FLOW_NEXT); do_getfield0(LONG); post();\n bind(OPC.PUTFIELD_I); iparmUByte();\n bind(OPC.PUTFIELD_I_WIDE); pre(FLOW_CALL); do_putfield(INT); post();\n bind(OPC.PUTFIELD_B); iparmUByte();\n bind(OPC.PUTFIELD_B_WIDE); pre(FLOW_CALL); do_putfield(BYTE); post();\n bind(OPC.PUTFIELD_S); iparmUByte();\n bind(OPC.PUTFIELD_S_WIDE); pre(FLOW_CALL); do_putfield(SHORT); post();\n bind(OPC.PUTFIELD_O); iparmUByte();\n bind(OPC.PUTFIELD_O_WIDE); pre(FLOW_CALL); do_putfield(OOP); post();\n bind(OPC.PUTFIELD_L); iparmUByte();\n bind(OPC.PUTFIELD_L_WIDE); pre(FLOW_CALL); do_putfield(LONG); post();\n bind(OPC.PUTFIELD0_I); iparmUByte();\n bind(OPC.PUTFIELD0_I_WIDE); pre(FLOW_NEXT); do_putfield0(INT); post();\n bind(OPC.PUTFIELD0_B); iparmUByte();\n bind(OPC.PUTFIELD0_B_WIDE); pre(FLOW_NEXT); do_putfield0(BYTE); post();\n bind(OPC.PUTFIELD0_S); iparmUByte();\n bind(OPC.PUTFIELD0_S_WIDE); pre(FLOW_NEXT); do_putfield0(SHORT); post();\n bind(OPC.PUTFIELD0_O); iparmUByte();\n bind(OPC.PUTFIELD0_O_WIDE); pre(FLOW_NEXT); do_putfield0(OOP); post();\n bind(OPC.PUTFIELD0_L); iparmUByte();\n bind(OPC.PUTFIELD0_L_WIDE); pre(FLOW_NEXT); do_putfield0(LONG); post();\n bind(OPC.INVOKEVIRTUAL_I); iparmUByte();\n bind(OPC.INVOKEVIRTUAL_I_WIDE); pre(FLOW_CALL); do_invokevirtual(INT); post();\n bind(OPC.INVOKEVIRTUAL_V); iparmUByte();\n bind(OPC.INVOKEVIRTUAL_V_WIDE); pre(FLOW_CALL); do_invokevirtual(VOID); post();\n bind(OPC.INVOKEVIRTUAL_L); iparmUByte();\n bind(OPC.INVOKEVIRTUAL_L_WIDE); pre(FLOW_CALL); do_invokevirtual(LONG); post();\n bind(OPC.INVOKEVIRTUAL_O); iparmUByte();\n bind(OPC.INVOKEVIRTUAL_O_WIDE); pre(FLOW_CALL); do_invokevirtual(OOP); post();\n bind(OPC.INVOKESTATIC_I); iparmUByte();\n bind(OPC.INVOKESTATIC_I_WIDE); pre(FLOW_CALL); do_invokestatic(INT); post();\n bind(OPC.INVOKESTATIC_V); iparmUByte();\n bind(OPC.INVOKESTATIC_V_WIDE); pre(FLOW_CALL); do_invokestatic(VOID); post();\n bind(OPC.INVOKESTATIC_L); iparmUByte();\n bind(OPC.INVOKESTATIC_L_WIDE); pre(FLOW_CALL); do_invokestatic(LONG); post();\n bind(OPC.INVOKESTATIC_O); iparmUByte();\n bind(OPC.INVOKESTATIC_O_WIDE); pre(FLOW_CALL); do_invokestatic(OOP); post();\n bind(OPC.INVOKESUPER_I); iparmUByte();\n bind(OPC.INVOKESUPER_I_WIDE); pre(FLOW_CALL); do_invokesuper(INT); post();\n bind(OPC.INVOKESUPER_V); iparmUByte();\n bind(OPC.INVOKESUPER_V_WIDE); pre(FLOW_CALL); do_invokesuper(VOID); post();\n bind(OPC.INVOKESUPER_L); iparmUByte();\n bind(OPC.INVOKESUPER_L_WIDE); pre(FLOW_CALL); do_invokesuper(LONG); post();\n bind(OPC.INVOKESUPER_O); iparmUByte();\n bind(OPC.INVOKESUPER_O_WIDE); pre(FLOW_CALL); do_invokesuper(OOP); post();\n bind(OPC.INVOKENATIVE_I); iparmUByte();\n bind(OPC.INVOKENATIVE_I_WIDE); pre(FLOW_CALL); do_invokenative(INT); post();\n bind(OPC.INVOKENATIVE_V); iparmUByte();\n bind(OPC.INVOKENATIVE_V_WIDE); pre(FLOW_CALL); do_invokenative(VOID); post();\n bind(OPC.INVOKENATIVE_L); iparmUByte();\n bind(OPC.INVOKENATIVE_L_WIDE); pre(FLOW_CALL); do_invokenative(LONG); post();\n bind(OPC.INVOKENATIVE_O); iparmUByte();\n bind(OPC.INVOKENATIVE_O_WIDE); pre(FLOW_CALL); do_invokenative(OOP); post();\n bind(OPC.FINDSLOT); iparmUByte();\n bind(OPC.FINDSLOT_WIDE); pre(FLOW_CALL); do_findslot(); post();\n bind(OPC.EXTEND); iparmUByte();\n bind(OPC.EXTEND_WIDE); pre(FLOW_NEXT); do_extend(); post();\n bind(OPC.INVOKESLOT_I); iparmNone();\n pre(FLOW_CALL); do_invokeslot(INT); post();\n bind(OPC.INVOKESLOT_V); iparmNone();\n pre(FLOW_CALL); do_invokeslot(VOID); post();\n bind(OPC.INVOKESLOT_L); iparmNone();\n pre(FLOW_CALL); do_invokeslot(LONG); post();\n bind(OPC.INVOKESLOT_O); iparmNone();\n pre(FLOW_CALL); do_invokeslot(OOP); post();\n bind(OPC.RETURN_V); iparmNone();\n pre(FLOW_CHANGE); do_return(VOID); post();\n bind(OPC.RETURN_I); iparmNone();\n pre(FLOW_CHANGE); do_return(INT); post();\n bind(OPC.RETURN_L); iparmNone();\n pre(FLOW_CHANGE); do_return(LONG); post();\n bind(OPC.RETURN_O); iparmNone();\n pre(FLOW_CHANGE); do_return(OOP); post();\n bind(OPC.TABLESWITCH_I); iparmNone();\n pre(FLOW_CHANGE); do_tableswitch(INT); post();\n bind(OPC.TABLESWITCH_S); iparmNone();\n pre(FLOW_CHANGE); do_tableswitch(SHORT); post();\n bind(OPC.EXTEND0); iparmNone();\n pre(FLOW_NEXT); do_extend0(); post();\n bind(OPC.ADD_I); iparmNone();\n pre(FLOW_NEXT); do_add(INT); post();\n bind(OPC.SUB_I); iparmNone();\n pre(FLOW_NEXT); do_sub(INT); post();\n bind(OPC.AND_I); iparmNone();\n pre(FLOW_NEXT); do_and(INT); post();\n bind(OPC.OR_I); iparmNone();\n pre(FLOW_NEXT); do_or(INT); post();\n bind(OPC.XOR_I); iparmNone();\n pre(FLOW_NEXT); do_xor(INT); post();\n bind(OPC.SHL_I); iparmNone();\n pre(FLOW_NEXT); do_shl(INT); post();\n bind(OPC.SHR_I); iparmNone();\n pre(FLOW_NEXT); do_shr(INT); post();\n bind(OPC.USHR_I); iparmNone();\n pre(FLOW_NEXT); do_ushr(INT); post();\n bind(OPC.MUL_I); iparmNone();\n pre(FLOW_NEXT); do_mul(INT); post();\n bind(OPC.DIV_I); iparmNone();\n pre(FLOW_CALL); do_div(INT); post();\n bind(OPC.REM_I); iparmNone();\n pre(FLOW_CALL); do_rem(INT); post();\n bind(OPC.NEG_I); iparmNone();\n pre(FLOW_NEXT); do_neg(INT); post();\n bind(OPC.I2B); iparmNone();\n pre(FLOW_NEXT); do_i2b(); post(); \n bind(OPC.I2S); iparmNone();\n pre(FLOW_NEXT); do_i2s(); post(); \n bind(OPC.I2C); iparmNone();\n pre(FLOW_NEXT); do_i2c(); post(); \n bind(OPC.ADD_L); iparmNone();\n pre(FLOW_NEXT); do_add(LONG); post();\n bind(OPC.SUB_L); iparmNone();\n pre(FLOW_NEXT); do_sub(LONG); post();\n bind(OPC.MUL_L); iparmNone();\n pre(FLOW_NEXT); do_mul(LONG); post();\n bind(OPC.DIV_L); iparmNone();\n pre(FLOW_CALL); do_div(LONG); post();\n bind(OPC.REM_L); iparmNone();\n pre(FLOW_CALL); do_rem(LONG); post();\n bind(OPC.AND_L); iparmNone();\n pre(FLOW_NEXT); do_and(LONG); post();\n bind(OPC.OR_L); iparmNone();\n pre(FLOW_NEXT); do_or(LONG); post();\n bind(OPC.XOR_L); iparmNone();\n pre(FLOW_NEXT); do_xor(LONG); post();\n bind(OPC.NEG_L); iparmNone();\n pre(FLOW_NEXT); do_neg(LONG); post();\n bind(OPC.SHL_L); iparmNone();\n pre(FLOW_NEXT); do_shl(LONG); post();\n bind(OPC.SHR_L); iparmNone();\n pre(FLOW_NEXT); do_shr(LONG); post();\n bind(OPC.USHR_L); iparmNone();\n pre(FLOW_NEXT); do_ushr(LONG); post();\n bind(OPC.L2I); iparmNone();\n pre(FLOW_NEXT); do_l2i(); post(); \n bind(OPC.I2L); iparmNone();\n pre(FLOW_NEXT); do_i2l(); post(); \n bind(OPC.THROW); iparmNone();\n pre(FLOW_CALL); do_throw(); post();\n bind(OPC.POP_1); iparmNone();\n pre(FLOW_NEXT); do_pop(1); post(); \n bind(OPC.POP_2); iparmNone();\n pre(FLOW_NEXT); do_pop(2); post(); \n bind(OPC.MONITORENTER); iparmNone();\n pre(FLOW_CALL); do_monitorenter(); post();\n bind(OPC.MONITOREXIT); iparmNone();\n pre(FLOW_CALL); do_monitorexit(); post();\n bind(OPC.CLASS_MONITORENTER); iparmNone();\n pre(FLOW_CALL); do_class_monitorenter(); post();\n bind(OPC.CLASS_MONITOREXIT); iparmNone();\n pre(FLOW_CALL); do_class_monitorexit(); post();\n bind(OPC.ARRAYLENGTH); iparmNone();\n pre(FLOW_CALL); do_arraylength(); post();\n bind(OPC.NEW); iparmNone();\n pre(FLOW_CALL); do_new(); post(); \n bind(OPC.NEWARRAY); iparmNone();\n pre(FLOW_CALL); do_newarray(); post();\n bind(OPC.NEWDIMENSION); iparmNone();\n pre(FLOW_CALL); do_newdimension(); post();\n bind(OPC.CLASS_CLINIT); iparmNone();\n pre(FLOW_CALL); do_class_clinit(); post();\n bind(OPC.BBTARGET_SYS); iparmNone();\n pre(FLOW_NEXT); do_bbtarget_sys(); post();\n bind(OPC.BBTARGET_APP); iparmNone();\n pre(FLOW_CALL); do_bbtarget_app(); post();\n bind(OPC.INSTANCEOF); iparmNone();\n pre(FLOW_CALL); do_instanceof(); post();\n bind(OPC.CHECKCAST); iparmNone();\n pre(FLOW_CALL); do_checkcast(); post();\n bind(OPC.ALOAD_I); iparmNone();\n pre(FLOW_CALL); do_aload(INT); post();\n bind(OPC.ALOAD_B); iparmNone();\n pre(FLOW_CALL); do_aload(BYTE); post();\n bind(OPC.ALOAD_S); iparmNone();\n pre(FLOW_CALL); do_aload(SHORT); post();\n bind(OPC.ALOAD_C); iparmNone();\n pre(FLOW_CALL); do_aload(USHORT); post();\n bind(OPC.ALOAD_O); iparmNone();\n pre(FLOW_CALL); do_aload(OOP); post();\n bind(OPC.ALOAD_L); iparmNone();\n pre(FLOW_CALL); do_aload(LONG); post();\n bind(OPC.ASTORE_I); iparmNone();\n pre(FLOW_CALL); do_astore(INT); post();\n bind(OPC.ASTORE_B); iparmNone();\n pre(FLOW_CALL); do_astore(BYTE); post();\n bind(OPC.ASTORE_S); iparmNone();\n pre(FLOW_CALL); do_astore(SHORT); post();\n bind(OPC.ASTORE_O); iparmNone();\n pre(FLOW_CALL); do_astore(OOP); post();\n bind(OPC.ASTORE_L); iparmNone();\n pre(FLOW_CALL); do_astore(LONG); post();\n bind(OPC.LOOKUP_I); iparmNone();\n pre(FLOW_CALL); do_lookup(INT); post();\n bind(OPC.LOOKUP_B); iparmNone();\n pre(FLOW_CALL); do_lookup(BYTE); post();\n bind(OPC.LOOKUP_S); iparmNone();\n pre(FLOW_CALL); do_lookup(SHORT); post();\n bind(OPC.PAUSE); iparmNone();\n pre(FLOW_NEXT); do_pause(); post();\n\n/*if[FLOATS]*/\n bind(OPC.FCMPL); iparmNone();\n pre(FLOW_NEXT); do_fcmpl(); post();\n bind(OPC.FCMPG); iparmNone();\n pre(FLOW_NEXT); do_fcmpg(); post();\n bind(OPC.DCMPL); iparmNone();\n pre(FLOW_NEXT); do_dcmpl(); post();\n bind(OPC.DCMPG); iparmNone();\n pre(FLOW_NEXT); do_dcmpg(); post();\n bind(OPC.GETSTATIC_F); iparmUByte();\n bind(OPC.GETSTATIC_F_WIDE); pre(FLOW_CALL); do_getstatic(FLOAT); post();\n bind(OPC.GETSTATIC_D); iparmUByte();\n bind(OPC.GETSTATIC_D_WIDE); pre(FLOW_CALL); do_getstatic(DOUBLE); post();\n bind(OPC.CLASS_GETSTATIC_F); iparmUByte();\n bind(OPC.CLASS_GETSTATIC_F_WIDE); pre(FLOW_CALL); do_class_getstatic(FLOAT); post();\n bind(OPC.CLASS_GETSTATIC_D); iparmUByte();\n bind(OPC.CLASS_GETSTATIC_D_WIDE); pre(FLOW_CALL); do_class_getstatic(DOUBLE); post();\n bind(OPC.PUTSTATIC_F); iparmUByte();\n bind(OPC.PUTSTATIC_F_WIDE); pre(FLOW_CALL); do_putstatic(FLOAT); post();\n bind(OPC.PUTSTATIC_D); iparmUByte();\n bind(OPC.PUTSTATIC_D_WIDE); pre(FLOW_CALL); do_putstatic(DOUBLE); post();\n bind(OPC.CLASS_PUTSTATIC_F); iparmUByte();\n bind(OPC.CLASS_PUTSTATIC_F_WIDE); pre(FLOW_CALL); do_class_putstatic(FLOAT); post();\n bind(OPC.CLASS_PUTSTATIC_D); iparmUByte();\n bind(OPC.CLASS_PUTSTATIC_D_WIDE); pre(FLOW_CALL); do_class_putstatic(DOUBLE); post();\n bind(OPC.GETFIELD_F); iparmUByte();\n bind(OPC.GETFIELD_F_WIDE); pre(FLOW_CALL); do_getfield(FLOAT); post();\n bind(OPC.GETFIELD_D); iparmUByte();\n bind(OPC.GETFIELD_D_WIDE); pre(FLOW_CALL); do_getfield(DOUBLE); post();\n bind(OPC.GETFIELD0_F); iparmUByte();\n bind(OPC.GETFIELD0_F_WIDE); pre(FLOW_NEXT); do_getfield0(FLOAT); post();\n bind(OPC.GETFIELD0_D); iparmUByte();\n bind(OPC.GETFIELD0_D_WIDE); pre(FLOW_NEXT); do_getfield0(DOUBLE); post();\n bind(OPC.PUTFIELD_F); iparmUByte();\n bind(OPC.PUTFIELD_F_WIDE); pre(FLOW_CALL); do_putfield(FLOAT); post();\n bind(OPC.PUTFIELD_D); iparmUByte();\n bind(OPC.PUTFIELD_D_WIDE); pre(FLOW_CALL); do_putfield(DOUBLE); post();\n bind(OPC.PUTFIELD0_F); iparmUByte();\n bind(OPC.PUTFIELD0_F_WIDE); pre(FLOW_NEXT); do_putfield0(FLOAT); post();\n bind(OPC.PUTFIELD0_D); iparmUByte();\n bind(OPC.PUTFIELD0_D_WIDE); pre(FLOW_NEXT); do_putfield0(DOUBLE); post();\n bind(OPC.INVOKEVIRTUAL_F); iparmUByte();\n bind(OPC.INVOKEVIRTUAL_F_WIDE); pre(FLOW_CALL); do_invokevirtual(FLOAT); post();\n bind(OPC.INVOKEVIRTUAL_D); iparmUByte();\n bind(OPC.INVOKEVIRTUAL_D_WIDE); pre(FLOW_CALL); do_invokevirtual(DOUBLE); post();\n bind(OPC.INVOKESTATIC_F); iparmUByte();\n bind(OPC.INVOKESTATIC_F_WIDE); pre(FLOW_CALL); do_invokestatic(FLOAT); post();\n bind(OPC.INVOKESTATIC_D); iparmUByte();\n bind(OPC.INVOKESTATIC_D_WIDE); pre(FLOW_CALL); do_invokestatic(DOUBLE); post();\n bind(OPC.INVOKESUPER_F); iparmUByte();\n bind(OPC.INVOKESUPER_F_WIDE); pre(FLOW_CALL); do_invokesuper(FLOAT); post();\n bind(OPC.INVOKESUPER_D); iparmUByte();\n bind(OPC.INVOKESUPER_D_WIDE); pre(FLOW_CALL); do_invokesuper(DOUBLE); post();\n bind(OPC.INVOKENATIVE_F); iparmUByte();\n bind(OPC.INVOKENATIVE_F_WIDE); pre(FLOW_CALL); do_invokenative(FLOAT); post();\n bind(OPC.INVOKENATIVE_D); iparmUByte();\n bind(OPC.INVOKENATIVE_D_WIDE); pre(FLOW_CALL); do_invokenative(DOUBLE); post();\n bind(OPC.INVOKESLOT_F); iparmNone();\n pre(FLOW_CALL); do_invokeslot(FLOAT); post();\n bind(OPC.INVOKESLOT_D); iparmNone();\n pre(FLOW_CALL); do_invokeslot(DOUBLE); post();\n bind(OPC.RETURN_F); iparmNone();\n pre(FLOW_CHANGE); do_return(FLOAT); post();\n bind(OPC.RETURN_D); iparmNone();\n pre(FLOW_CHANGE); do_return(DOUBLE); post();\n bind(OPC.CONST_FLOAT); iparmNone();\n pre(FLOW_CHANGE); do_const_float(); post();\n bind(OPC.CONST_DOUBLE); iparmNone();\n pre(FLOW_CHANGE); do_const_double(); post();\n bind(OPC.ADD_F); iparmNone();\n pre(FLOW_NEXT); do_add(FLOAT); post();\n bind(OPC.SUB_F); iparmNone();\n pre(FLOW_NEXT); do_sub(FLOAT); post();\n bind(OPC.MUL_F); iparmNone();\n pre(FLOW_NEXT); do_mul(FLOAT); post();\n bind(OPC.DIV_F); iparmNone();\n pre(FLOW_NEXT); do_div(FLOAT); post();\n bind(OPC.REM_F); iparmNone();\n pre(FLOW_NEXT); do_rem(FLOAT); post();\n bind(OPC.NEG_F); iparmNone();\n pre(FLOW_NEXT); do_neg(FLOAT); post();\n bind(OPC.ADD_D); iparmNone();\n pre(FLOW_NEXT); do_add(DOUBLE); post();\n bind(OPC.SUB_D); iparmNone();\n pre(FLOW_NEXT); do_sub(DOUBLE); post();\n bind(OPC.MUL_D); iparmNone();\n pre(FLOW_NEXT); do_mul(DOUBLE); post();\n bind(OPC.DIV_D); iparmNone();\n pre(FLOW_NEXT); do_div(DOUBLE); post();\n bind(OPC.REM_D); iparmNone();\n pre(FLOW_NEXT); do_rem(DOUBLE); post();\n bind(OPC.NEG_D); iparmNone();\n pre(FLOW_NEXT); do_neg(DOUBLE); post();\n bind(OPC.I2F); iparmNone();\n pre(FLOW_NEXT); do_i2f(); post(); \n bind(OPC.L2F); iparmNone();\n pre(FLOW_NEXT); do_l2f(); post(); \n bind(OPC.F2I); iparmNone();\n pre(FLOW_NEXT); do_f2i(); post(); \n bind(OPC.F2L); iparmNone();\n pre(FLOW_NEXT); do_f2l(); post(); \n bind(OPC.I2D); iparmNone();\n pre(FLOW_NEXT); do_i2d(); post(); \n bind(OPC.L2D); iparmNone();\n pre(FLOW_NEXT); do_l2d(); post(); \n bind(OPC.F2D); iparmNone();\n pre(FLOW_NEXT); do_f2d(); post(); \n bind(OPC.D2I); iparmNone();\n pre(FLOW_NEXT); do_d2i(); post(); \n bind(OPC.D2L); iparmNone();\n pre(FLOW_NEXT); do_d2l(); post(); \n bind(OPC.D2F); iparmNone();\n pre(FLOW_NEXT); do_d2f(); post(); \n bind(OPC.ALOAD_F); iparmNone();\n pre(FLOW_CALL); do_aload(FLOAT); post();\n bind(OPC.ALOAD_D); iparmNone();\n pre(FLOW_CALL); do_aload(DOUBLE); post();\n bind(OPC.ASTORE_F); iparmNone();\n pre(FLOW_CALL); do_astore(FLOAT); post();\n bind(OPC.ASTORE_D); iparmNone();\n pre(FLOW_CALL); do_astore(DOUBLE); post();\n/*end[FLOATS]*/\n }\n }", "public static void main(String[] args){\n final int a = 1;\n // final int b;\n // b = 2;\n int x = 5;\n switch(x){\n case a: System.out.println(\"case a\");\n // case b://constant expression required .. compile error\n case 3: // is a compile time constant.\n System.out.println(\"case 3\");\n System.out.println(\"2nd line in case 3\");\n // To be a variable that is a compile time constant, the variable needs to be...\n // 1.declared as final\n // 2.have a primative or String type\n // 3.initialized (on the same line as the declaration)\n // 4.assigned to a compile time constant expression\n default: System.out.println(\"default, if no break will continue\");\n case 4:{System.out.println(\"case 4\");};//can omit {} and ;\n }\n// String derp = \"s\";\n// switch(derp){\n// \n// }\n }", "public void method_2486(ahl var1, int var2, int var3, int var4) {\r\n String[] var10000 = class_752.method_4253();\r\n int var6 = var1.method_33(var2, var3, var4);\r\n String[] var5 = var10000;\r\n if(method_2687(var6)) {\r\n label47: {\r\n label46: {\r\n label45: {\r\n label44: {\r\n label43: {\r\n label42: {\r\n float var7 = 0.25F;\r\n if(var5 != null) {\r\n switch(method_2686(var6)) {\r\n case 0:\r\n this.method_2443(0.0F, 0.25F, 0.0F, 1.0F, 1.0F, 1.0F);\r\n break;\r\n case 1:\r\n break label42;\r\n case 2:\r\n break label43;\r\n case 3:\r\n break label44;\r\n case 4:\r\n break label45;\r\n case 5:\r\n break label46;\r\n default:\r\n break label47;\r\n }\r\n }\r\n\r\n if(var5 != null) {\r\n break label47;\r\n }\r\n }\r\n\r\n this.method_2443(0.0F, 0.0F, 0.0F, 1.0F, 0.75F, 1.0F);\r\n if(var5 != null) {\r\n break label47;\r\n }\r\n }\r\n\r\n this.method_2443(0.0F, 0.0F, 0.25F, 1.0F, 1.0F, 1.0F);\r\n if(var5 != null) {\r\n break label47;\r\n }\r\n }\r\n\r\n this.method_2443(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.75F);\r\n if(var5 != null) {\r\n break label47;\r\n }\r\n }\r\n\r\n this.method_2443(0.25F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);\r\n if(var5 != null) {\r\n break label47;\r\n }\r\n }\r\n\r\n this.method_2443(0.0F, 0.0F, 0.0F, 0.75F, 1.0F, 1.0F);\r\n }\r\n\r\n if(var5 != null) {\r\n return;\r\n }\r\n }\r\n\r\n this.method_2443(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);\r\n }", "public static void main(String[] args) {\n byte age = 6;\n String p = \"\";\n switch (age) {\n case 1:\n p = \"you can crawl\";\n break;\n case 2:\n p = \"you can talk\";\n break;\n case 3:\n p = \"you can walk\";\n break;\n case 4:\n p = \"you should have some vaccines\";\n break;\n case 5:\n p = \"you can start reading\";\n break;\n default:\n p = \"go to school\";\n break;\n }\n System.out.println(p);\n }", "public void Case21(){\n System.out.println(\"Testing Case 21\");\n for(int z=1; z<=7; z++) {\n carriedProd();\n if(z==1) {\n byName();\n }\n else if(z==2){\n byShortName();\n }\n else if(z==3){\n byItemCode();\n }\n else if(z==4){\n byDescription();\n }\n else if(z==5){\n byBrand();\n }\n else if(z==6){\n byKeyword();\n }\n else if(z==7){\n byPrincipal();\n }\n clear();\n }\n System.out.println(\"Case 21 Done\");\n }", "public static void main(String args[])\n {\n Scanner n = new Scanner(System.in);\n int n1= n.nextInt();\n switch(n1){\n case 1:int a=n.nextInt();\n a=a*a;\n System.out.println(a);\n break;\n case 2:int l=n.nextInt();\n int b=n.nextInt();\n int r=l*b;\n System.out.println(r);\n break;\n case 3:int b1=n.nextInt();\n int h=n.nextInt();\n int r1=(b1*h)/2;\n System.out.println(r1);\n break;\n case 4:int r2=n.nextInt();\n double a2=3.14*r2*r2;\n System.out.println(a2);\n break;\n default:break;\n }\n }", "public static void main(String[] args) {\n if (1 > 0) {\n System.out.println(\"1 > 0\");\n }\n \n \n if (5 < 4) {\n System.out.println(\"5 < 4\");\n } else {\n System.out.println(\"5 > 4\");\n }\n \n if (1 > 10) {\n System.out.println(\"1 > 10\");\n } else if (5 > 10) {\n System.out.println(\"5 > 10\");\n } else if (9 > 10) {\n System.out.println(\"9 > 10\");\n } else if (11 > 10){\n System.out.println(\"11 > 10\");\n } else {\n System.out.println(\"< 10\");\n }\n \n /*\n * keywordul break - opreste executia in acel bloc\n * in cazul structurii switch: daca gasim un rezultat valid vom opri excecutia\n */\n \n \n //Controlul executiei prin switch\n char rezultat;\n char valoareEvaluata = 'F';\n switch (valoareEvaluata) {\n case 'A':\n rezultat = 'A';\n break;\n case 'B':\n rezultat = 'B';\n break;\n case 'C':\n rezultat = 'C';\n break;\n default:\n rezultat = valoareEvaluata;\n }\n System.out.println(\"Am gasit: \" + rezultat);\n \n }", "public void employeeAttendanceUsingCase() {\n\t\tswitch (randomCheck) {\n\t\tcase 1:\n\t\t\tcheckAttendance();\n\t\t\tcalculatingDailyWage();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tcheckAttendance();\n\t\t\tcalculatingDailyWage();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tcheckAttendance();\n\t\t\tcalculatingDailyWage();\n\t\t}\n\t}", "public static void computeSwitch() { \n\t\t// result[pos-off] += prod % 10;\n\t\tSystem.out.println (\"switch (prod) {\");\n\t\tfor (int i = 0; i < 100; i++) {\n\t\t\tSystem.out.print (\"case \" + i + \": \");\n\t\t\tif (i%10 != 0) {\n\t\t\t\tSystem.out.print (\"result[iPos] += \" + (i%10) + \";\");\n\t\t\t}\n\t\t\tif ((i / 10) != 0) {\n\t\t\t\tSystem.out.print (\"result[iPosSubOne] += \" + (i/10) + \";\");\n\t\t\t}\n\t\t\tSystem.out.println (\"break;\");\n\t\t}\n\t\tSystem.out.println (\"};\");\n\t\t\n\t\t// middle one\n//\t\tif (result[pos-off] > 9) { // carry internally\n//\t\t\tdo {\n//\t\t\t\tresult[pos-off] -= 10;\n//\t\t\t\tresult[pos-off-1]++;\n//\t\t\t} while (result[pos-off] > 9);\n//\t\t}\n\t\tSystem.out.println (\"switch (result[iPos]) {\");\n\t\tfor (int i = 0; i < 100; i++) {\n\t\t\tint tens = 10*(i/10);\n\t\t\tif (tens == 0) {\n\t\t\t\tSystem.out.println (\"case \" + i + \": break; \");\n\t\t\t} else {\n\t\t\t\tSystem.out.println (\"case \" + i + \": result[iPosSubOne] += \" + (i/10) + \"; result[iPos] -= \" + tens + \"; break; \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println (\"};\");\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args){\n int bananas = 34;\n System.out.println(bananas);\n\n int students = 400;\n System.out.println(students);\n\n int phonebook=100, textbook=200, computers=300;\n System.out.println(phonebook+textbook+computers);\n\n int peopleInCity=1000, birdsOnTree=2000, fishInLake=3000;\n System.out.println(peopleInCity);\n System.out.println(birdsOnTree);\n System.out.println(fishInLake);\n\n int studentsInNY = 25, studentsInVA = 50, studentsInCO = 5;\n System.out.println(studentsInNY);\n System.out.println(studentsInVA);\n System.out.println(studentsInCO);\n\n\n\n }", "public void Case20(){\n System.out.println(\"Testing Case 20\");\n for(int z=1; z<=7; z++) {\n activeProd();\n if(z==1) {\n byName();\n }\n else if(z==2){\n byShortName();\n }\n else if(z==3){\n byItemCode();\n }\n else if(z==4){\n byDescription();\n }\n else if(z==5){\n byBrand();\n }\n else if(z==6){\n byKeyword();\n }\n else if(z==7){\n byPrincipal();\n }\n clear();\n }\n System.out.println(\"Case 20 Done\");\n }", "public static void main(String[] args) {\n\r\n\t\tint x=2;\r\n\t\t\r\n\t\tswitch (x) {\r\n\t\tcase 1:\r\n\t\t\tSystem.out.println(\"1\");\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"2\");\r\n\t\t\tbreak;\r\n\t\tcase 3:case 4:case 5:\r\n\t\t\tSystem.out.println(\"3 or more\");\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"else\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Let's add some stuff\");\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n boolean freeShipping = true;\n boolean onSale = true;\n boolean hasItem = false;\n String item = \"Wooden Spoon\";\n\n if (freeShipping && onSale) {\n System.out.println(\"Purchase the - \" + item);\n } else {\n System.out.println(\"Next time when item \" + item + \" on sale\");\n }\n System.out.println(\"==================================\");\n\n // 2nd job offer selector\n\n String location = \"Toronto\";\n double salary = 85_000.0;\n boolean remote = true;\n boolean hasBenefit = true;\n\n if (location.equals(\"Toronto\") && salary == 85_000 && remote && hasBenefit) {\n\n System.out.println(\"Accept job offer\");\n } else {\n System.out.println(\"Reject the offer\");\n }\n System.out.println(\"==================================\");\n // 3rd practice OR(||)\n System.out.println(\"false || true = \" + (false || true)); // true\n System.out.println(\"true || false = \" + (false || true)); // true\n System.out.println(\"==================================\");\n\n // 4th practice OR||\n\n int apples = 10;\n int oranges = 8;\n\n if (apples > 11 || oranges > 10) {\n System.out.println(\"I have enough fruits\");\n } else {\n System.out.println(\"Go to Giant buy fruits\");\n\n }\n System.out.println(\"==================================\");\n\n // 4th practice CitySelector\n\n String city = \"VA\";\n if (city.equals(\"LA\") || city.equals(\"Toronto\")) {\n System.out.println(\"Willing to relocate LA\");\n\n } else {\n System.out.println(\"Not considering Seattle\");\n }\n System.out.println(\"==================================\");\n\n char grade = 'A';\n if (grade == 'A' || grade == 'B' || grade == 'C') {\n System.out.println(\"passed with grade\");\n\n } else if (grade == 'D') {\n System.out.println(\"quality for retake\");\n } else if(grade == 'E') {\n\n } else {\n System.out.println(\"invalid grade\");\n }\n\n // 4 th dealership\n\n double budget = 5000.0;\n String model = (\"Toyota\");\n double carPrice = 4500;\n\n if (carPrice == 4500 && (model.equals(\"Toyota\") || model.equals(\"Honda\"))) {\n\n System.out.println(\"Ready to purchase + \" + model + \", price = \" + carPrice);\n\n }else {\n System.out.println(\"Not interested in model = \" + model + \", price = \" + carPrice);\n }\n\n // ! not Operator\n\n\n System.out.println(\"!true = \" + (!true));\n int age = 5;\n if (!(age < 4)) {\n System.out.println(\"Need to seat in child seat = \" + age);\n }else {\n System.out.println(\"Can seat in adult seat = \" + age);\n }\n\n boolean isSmokingAllowed = false;\n\n if (!isSmokingAllowed) {\n System.out.println(\"Need to exit and smoke outside\");\n }else {\n System.out.println(\"You can smoke\");\n }\n\n String inputPassword = \"abd123\";\n String correctPassword = \"123abc\";\n\n if (!inputPassword.equals(\"abc123\")) {\n\n System.out.println(\"Access granted\");\n }else {\n System.out.println(\"Access denied\" );\n }\n\n\n\n\n }", "public static void main(String [] args) {\n\n Scanner scanner = new Scanner(System.in);\n\n// System.out.println(12.5);\n// System.out.println(12);\n\n\n System.out.println(\"Digite um numero que representa um mes: \");\n\n int mes = scanner.nextInt();\n\n\n switch (mes) {\n case 1:\n System.out.println(\"JAN\");\n break;\n case 2:\n System.out.println(\"FEV\");\n break;\n case 3:\n System.out.println(\"MAR\");\n break;\n default:\n System.out.println(\"MES INVALIDO\");\n }\n\n\n\n\n\n\n\n// if (mes == 1) {\n// System.out.println(\"JANEIRO\");\n// } else {\n// if (mes == 2) {\n// System.out.println(\"FEVEREIRO\");\n// } else {\n// if (mes == 3) {\n// System.out.println(\"MARÇO\");\n// }\n// else {\n// System.out.println(\"MES INVALIDO\");\n// }\n// }\n// }\n\n\n\n\n\n\n }", "public static void main(String[] args) {\n \r\n \r\n int day = 2;\r\n String dayType;\r\n String dayString;\r\n \r\n switch (day) \r\n {\r\n case 1: dayString = \"Monday\";\r\n \t\t\r\n break;\r\n case 2: dayString = \"Tuesday\";\r\n break;\r\n case 3: dayString = \"Wednesday\";\r\n break;\r\n case 4: dayString = \"Thursday\";\r\n break;\r\n case 5: dayString = \"Friday\";\r\n break;\r\n case 6: dayString = \"Saturday\";\r\n break;\r\n case 7: dayString = \"Sunday\";\r\n break;\r\n default: dayString = \"Invalid day\";\r\n }\r\n \r\n switch (day) \r\n {\r\n //multiple cases without break statements \r\n \r\n case 1: \r\n case 2:\r\n case 3:\r\n case 4:\r\n case 5:\r\n dayType = \"Weekday\";\r\n break;\r\n case 6:\r\n case 7:\r\n dayType = \"Weekend\"; \r\n break;\r\n \r\n default: dayType= \"Invalid daytype\";\r\n }\r\n \r\n System.out.println(dayString+\" is a \"+ dayType);\r\n }", "@Test\n\tpublic void testCase1() {\n\t\t\n\t\tvisa visa1 = new visa(\"Visa\", 100);\n\t\tmastercard mc1 = new mastercard(\"Mastercard\", 100);\n\t\tdiscover discover1 = new discover(\"Discover\", 100);\n\t\t\n\t\tdouble visaInterest = visa1.simpleInterest(visa1.getBalance(), visa1.getInterestRate());\n\t\tdouble mcInterest = mc1.simpleInterest(mc1.getBalance(), mc1.getInterestRate());\n\t\tdouble discInterest = discover1.simpleInterest(discover1.getBalance(), discover1.getInterestRate());\n\t\tdouble totInterest = visaInterest + mcInterest + discInterest;\n\t\t\n\t\tassertEquals(10,visaInterest, DELTA); //visa interest\n\t\tassertEquals(5,mcInterest,DELTA); //mastercard interest\n\t\tassertEquals(1, discInterest,DELTA); //discover interest\n\t\tassertEquals(16, totInterest,DELTA); //total interest\n\t}", "public static void main(String[] args) {\n Random random = new Random();\n\n int number = random.nextInt( 6 );\n System.out.println( \"number is \" + number );\n\n String numberRepresentation = \"\";\n\n switch(number) {\n case 0:\n numberRepresentation = \"zero\";\n //System.out.println( \"zero\" );\n break;\n case 1:\n numberRepresentation = \"one\";\n break;\n case 2:\n numberRepresentation = \"two\";\n break;\n case 3:\n numberRepresentation = \"three\";\n break;\n case 4:\n numberRepresentation = \"four\";\n break;\n case 5:\n numberRepresentation = \"five\";\n break;\n }\n\n System.out.println( numberRepresentation );\n\n\n }", "public static void demo() {\n\t\tlab_2_2_5();\n\n\t}", "public void testingSwitchWithStringStatemant() {\r\n\t\tSystem.err\r\n\t\t\t\t.println(\"Class NewFeatures, method testingSwitchWithStringStatement called!\");\r\n\t\tArrayList<String> randomStrings = new ArrayList<>();\r\n\t\trandomStrings.add(\"hey\");\r\n\t\trandomStrings.add(\"hello\");\r\n\t\trandomStrings.add(\"labas\");\r\n\t\t// generating random number and using Random class\r\n\t\tRandom generator = new Random();\r\n\t\tswitch (randomStrings.get(generator.nextInt(3))) {\r\n\t\tcase \"hey\":\r\n\t\t\tSystem.out.println(\"String \"\r\n\t\t\t\t\t+ randomStrings.get(generator.nextInt(3)) + \" called!\");\r\n\t\t\tbreak;\r\n\t\tcase \"hello\":\r\n\t\t\tSystem.out.println(\"String \"\r\n\t\t\t\t\t+ randomStrings.get(generator.nextInt(3)) + \" called!\");\r\n\t\t\tbreak;\r\n\t\tcase \"labas\":\r\n\t\t\tSystem.out.println(\"String \"\r\n\t\t\t\t\t+ randomStrings.get(generator.nextInt(3)) + \" called!\");\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"Nothing has been called!\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"Class NewFeatures, method testingSwitchWithStringStatement done!\");\r\n\t}", "public void test18() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "public static int[] choice(String enemy, int enemyHealth, int enemyDamage, int playerHealth, int playerDamage, int elixirCount, int elixirHealth, int wins, boolean[] items, int itemCount, int level) {\r\n //ASK: Gets user input\r\n Scanner scnr = new Scanner(System.in);\r\n System.out.println(\"What would you like to do?\\n\\t> 1: Fight\\n\\t> 2: Drink elixir\\n\\t> 3: Run\");\r\n String userInput = scnr.next();\r\n //FIGHT\r\n switch (userInput) {\r\n case \"1\": {\r\n int[] returned = fight(enemy, enemyHealth, enemyDamage, playerHealth, playerDamage, elixirCount, elixirHealth, wins, items, itemCount, level);\r\n if (level == 3)\r\n playerHealth = returned[0];\r\n elixirCount = returned[1];\r\n wins = returned[2];\r\n itemCount = returned[3];\r\n return new int[]{playerHealth, elixirCount, wins, itemCount};\r\n }\r\n //ELIXIR\r\n case \"2\": {\r\n int[] returned = elixir(enemy, enemyHealth, enemyDamage, playerHealth, playerDamage, elixirCount, elixirHealth, wins, items, itemCount, level);\r\n if (level == 3)\r\n playerHealth = returned[0];\r\n elixirCount = returned[1];\r\n wins = returned[2];\r\n itemCount = returned[3];\r\n return new int[]{playerHealth, elixirCount, wins, itemCount};\r\n }\r\n //RUN/SKIP\r\n case \"3\":\r\n System.out.println(\"You chose to run.\\nHere comes another enemy!\");\r\n break;\r\n //NOTHING SELECTED\r\n default:\r\n System.out.println(\"What would you like to do?\\n\\t> 1: Fight\\n\\t> 2: Drink elixir\\n\\t> 3: Run\");\r\n userInput = scnr.next();\r\n break;\r\n }\r\n return new int[]{playerHealth, elixirCount, wins, itemCount};\r\n }", "public void test17() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Type the country: \");\n String country = scanner.nextLine();\n\n switch (country) {\n case \"bulgaria\":\n System.out.println(\"How many euros are you exchanging?\");\n double euro = scanner.nextDouble();\n double exchangeRateGBP = 1.96;\n double bulgarianMoney = euro * exchangeRateGBP;\n Locale locale = new Locale(\"en\", \"BG\");\n NumberFormat currencyFormatter = NumberFormat.getCurrencyInstance(locale);\n String output = String.format(\" %.2f euro at an exchange rate of %.2f is %s.\", euro, exchangeRateGBP, currencyFormatter.format(bulgarianMoney));\n System.out.println(output);\n break;\n case \"turkey\":\n System.out.println(\"How many euros are you exchanging?\");\n double euro1 = scanner.nextDouble();\n double exchangeRateTurkishLira = 6.97;\n double turkishMoney = euro1 * exchangeRateTurkishLira;\n Locale locale1 = new Locale(\"en\", \"TR\");\n NumberFormat currencyFormatter1 = NumberFormat.getCurrencyInstance(locale1);\n String output1 = String.format(\" %.2f euro at an exchange rate of %.2f is %s.\", euro1, exchangeRateTurkishLira, currencyFormatter1.format(turkishMoney));\n System.out.println(output1);\n break;\n case \"romania\":\n System.out.println(\"How many euros are you exchanging?\");\n double euro2 = scanner.nextDouble();\n double exchangeRateRomanianRon = 4.84;\n double romanianMoney = euro2 * exchangeRateRomanianRon;\n Locale locale2 = new Locale(\"en\", \"RO\");\n NumberFormat currencyFormatter2 = NumberFormat.getCurrencyInstance(locale2);\n String output2 = String.format(\" %.2f euro at an exchange rate of %.2f is %s.\", euro2, exchangeRateRomanianRon, currencyFormatter2.format(romanianMoney));\n System.out.println(output2);\n break;\n case \"moldavia\":\n System.out.println(\"How many euros are you exchanging?\");\n double euro3 = scanner.nextDouble();\n double exchangeRateMoldavianLeu = 19.48;\n double moldavianMoney = euro3 * exchangeRateMoldavianLeu;\n Locale locale3 = new Locale(\"en\", \"MD\");\n NumberFormat currencyFormatter3 = NumberFormat.getCurrencyInstance(locale3);\n String output3 = String.format(\" %.2f euro at an exchange rate of %.2f is %s.\", euro3, exchangeRateMoldavianLeu, currencyFormatter3.format(moldavianMoney));\n System.out.println(output3);\n break;\n case \"canada\":\n System.out.println(\"How many euros are you exchanging?\");\n double euro4 = scanner.nextDouble();\n double exchangeRateCanadianDollar = 1.55;\n double canadianMoney = euro4 * exchangeRateCanadianDollar;\n Locale locale4 = new Locale(\"en\", \"CA\");\n NumberFormat currencyFormatter4 = NumberFormat.getCurrencyInstance(locale4);\n String output4 = String.format(\" %.2f euro at an exchange rate of %.2f is %s.\", euro4, exchangeRateCanadianDollar, currencyFormatter4.format(canadianMoney));\n System.out.println(output4);\n break;\n case \"usa\":\n System.out.println(\"How many euros are you exchanging?\");\n double euro5 = scanner.nextDouble();\n double exchangeRateUSDollar = 1.09;\n double americanMoney = euro5 * exchangeRateUSDollar;\n Locale locale5 = new Locale(\"en\", \"US\");\n NumberFormat currencyFormatter5 = NumberFormat.getCurrencyInstance(locale5);\n String output5 = String.format(\" %.2f euros at an exchange rate of %.2f is %s.\", euro5, exchangeRateUSDollar, currencyFormatter5.format(americanMoney));\n System.out.println(output5);\n break;\n case \"hungary\":\n System.out.println(\"How many euros are you exchanging?\");\n double euro6 = scanner.nextDouble();\n double exchangeRateHungarianForint = 354.97;\n double hungarianMoney = euro6 * exchangeRateHungarianForint;\n Locale locale6 = new Locale(\"en\", \"HU\");\n NumberFormat currencyFormatter6 = NumberFormat.getCurrencyInstance(locale6);\n String output6 = String.format(\" %.2f euros at an exchange rate of %.2f is %s.\", euro6, exchangeRateHungarianForint, currencyFormatter6.format(hungarianMoney));\n System.out.println(output6);\n break;\n default:\n System.out.println(\"The entered country is not in our list but you can still calculate if you know the exchange rate.\\nWhat is the exchange rate?\");\n double exchangeRate = scanner.nextDouble();\n System.out.println(\"How many euros are you exchanging?\");\n double euro7 = scanner.nextDouble();\n double exchangedMoney = euro7 * exchangeRate;\n String output7 = String.format(\" %.2f euros at an exchange rate of %.2f is %.2f.\", euro7, exchangeRate, exchangedMoney);\n System.out.println(output7);\n }\n }", "public static void main(String args[]){ \r\n\t\r\n\t\t\r\n\t\tint month; //An integer variable is decleared named as month \r\n\t\t\r\n\t\tScanner myvar = new Scanner(System.in); //scanner object is created named as Myvar \r\n\t\t\r\n\t\tSystem.out.println(\"Sirji Ye kaunsa mahina hai wo bata do :\"); //Prints somes strings\r\n\t\tSystem.out.println(\" January >> 1\");\r\n\t\tSystem.out.println(\" February >> 2\");\r\n\t\tSystem.out.println(\" March >> 3\");\r\n\t\tSystem.out.println(\" April >> 4\");\r\n\t\tSystem.out.println(\" May >> 5\");\r\n\t\tSystem.out.println(\" June >> 6\");\r\n\t\tSystem.out.println(\" July >> 7\");\r\n\t\tSystem.out.println(\" August >> 8\");\r\n\t\tSystem.out.println(\" September >> 9\");\r\n\t\tSystem.out.println(\" October >> 10\");\r\n\t\tSystem.out.println(\" November >> 11\");\r\n\t\tSystem.out.println(\" December >> 12\");\r\n\t\t\r\n\t\tSystem.out.print(\">>>>>>>>>>>>> \");\r\n\t\tmonth = myvar.nextInt(); //Takes Input from user\r\n\t\t\r\n\t\tswitch (month){ //switch is applied on month variable\r\n\t\t\r\n\t\tcase 1:\r\n\t\tcase 2:\r\n\t\tcase 11:\r\n\t\tcase 12:\r\n\t\t\tSystem.out.println(\"Thand hai bahar :v soja \");\r\n\t\t\tbreak; //used to break out of the switch case\r\n\r\n\t\tcase 3:\r\n\t\tcase 4:\r\n\t\tcase 5:\r\n\t\tcase 6:\r\n\t\t\tSystem.out.println(\"Garmi hai bahar soja :v \");\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 7:\r\n\t\tcase 8:\r\n\t\tcase 9:\r\n\t\tcase 10:\r\n\t\t\tSystem.out.println(\"Barish Ho rahi hai Bheeg jaye ga :V Soja\");\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"Jyada Hoshyari na kar :v Soja\");\r\n\t\t} //The default code block gets Executed when others cases fails\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter number to choose case\");\n\t\tint num = sc.nextInt();\n\n\t\tSystem.out.println(\"Enter 1st number\");\n\t\tint n1 = sc.nextInt();\n\t\t\n\t\tSystem.out.println(\"Enter 2nd number\");\n\t\tint n2 = sc.nextInt();\n\t\t\n\t\tswitch (num) {\n\t\tcase 1:\n\t\t\tSystem.out.println(\"Addition is: \"+(n1+n2));\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tSystem.out.println(\"Substraction is: \"+(n1-n2));\n\t\t\tbreak;\n\t\t\t\n\t\tcase 3:\n\t\t\tSystem.out.println(\"Multiplication is: \"+(n1*n2));\n\t\t\tbreak;\n\n\t\tcase 4:\n\t\t\tSystem.out.println(\"Division is: \"+(n1*n2));\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tSystem.out.println(\"No case match\");\n\t\t\tbreak;\n\t\t}\n\t}", "public void Case24(){\n System.out.println(\"Testing Case 24\");\n for(int z=1; z<=7; z++) {\n infoFilterAllProd();\n if(z==1) {\n byName();\n }\n else if(z==2){\n byShortName();\n }\n else if(z==3){\n byItemCode();\n }\n else if(z==4){\n byDescription();\n }\n else if(z==5){\n byBrand();\n }\n else if(z==6){\n byKeyword();\n }\n else if(z==7){\n byPrincipal();\n }\n clear();\n }\n System.out.println(\"Case 24 Done\");\n }", "public static void main(String args[])\n {\n Scanner in=new Scanner(System.in);\n int n=in.nextInt();\n switch(n)\n {\n case 1:\n int s=in.nextInt();\n int area1=s*s;\n System.out.println(area1);\n break;\n case 2:\n int l=in.nextInt();\n int b=in.nextInt();\n int area2=l*b;\n System.out.println(area2);\n break;\n case 3:\n int base=in.nextInt();\n int h=in.nextInt();\n int area3=(base*h)/2;\n System.out.println(area3);\n break;\n case 4:\n int r=in.nextInt();\n double area4=3.14*r*r;\n System.out.println(area4);\n break;\n default:\n System.out.println(\"not found\");\n }\n \n }", "public void decideNature()\n {\n String nature = new String(\"\");\n Random rand = new Random();\n int i = rand.nextInt(100);\n if(i <= 25)\n {\n nature = \"Very mischievous. Enjoys hiding objects in plain sight\";\n }//ends the if\n else if(i > 25 && i <= 50)\n {\n nature = \"Loves to spend time sleeping on the clouds\";\n }//ends the else if\n else if(i > 50 && i <= 75)\n {\n nature = \"Is very playful\";\n }//ends the else if\n else\n {\n nature = \"Loves to perform dances in the air\";\n }\n \n setNature(nature);\n }", "public static void main(String[] args) {\n int num = 14;\n int output = 6;\n System.out.println((numberOfSteps(num)) == output ? \"CASE 1 PASS\" : \"X CASE 1 FAIL\");\n\n // TEST CASE 2: Input: num = 8 Output: 4\n num = 8;\n output = 4;\n System.out.println((numberOfSteps(num)) == output ? \"CASE 2 PASS\" : \"X CASE 2 FAIL\");\n\n // TEST CASE 3: Input: num = 123 Output: 12\n num = 123;\n output = 12;\n System.out.println((numberOfSteps(num)) == output ? \"CASE 3 PASS\" : \"X CASE 3 FAIL\");\n }", "public static void main(String[] args) {\n Input UserIn = new Input();\n// try {\n// System.out.println(\"Let's see...\");\n// int result = 1 / 0;\n// System.out.println(\"I can divide by zero!\");\n// } catch (ArithmeticException e) {\n// System.out.println(\"Math still works!\");\n// }\n\n System.out.println(\"What would you like to do?\\n\" +\n \"\\n\" +\n \"0 - exit\\n\" +\n \"1 - view all movies\\n\" +\n \"2 - view movies in the animated category\\n\" +\n \"3 - view movies in the drama category\\n\" +\n \"4 - view movies in the horror category\\n\" +\n \"5 - view movies in the scifi category\\n\");\n// String userChoice = Scan.next();\n// System.out.print(userChoice);\n\n try {\n switch (UserIn.getInt()) {\n case 0:\n System.exit(0);\n break;\n case 1:\n// class var |variable defined above\n for (Movie movie : moviesList) {\n System.out.println(movie.getName() + \" -- \" + movie.getCategory());\n }\n break;\n case 2:\n printMovieByCategory(\"animated\");\n case 3:\n printMovieByCategory(\"drama\");\n break;\n case 4:\n printMovieByCategory(\"horror\");\n break;\n case 5:\n\n printMovieByCategory(\"scifi\");\n\n// default:\n// throw new IllegalArgumentException(\"Not a Category\");\n }\n }catch(ArrayIndexOutOfBoundsException ex){\n System.out.println(\"out of bounds\");\n }\n }", "public boolean method_6198(ahb var1, Random var2, class_1206 var3) {\r\n String[] var4 = class_752.method_4253();\r\n int var10000 = this.method_6203(var1, var3);\r\n if(var4 != null) {\r\n if(var10000 != 0) {\r\n return false;\r\n }\r\n\r\n this.method_6213(var1, var3, 0, 0, 0, 10, 6, 10, true, var2, class_1252.method_6598());\r\n this.method_6302(var1, var2, var3, this.field_5851, 4, 1, 0);\r\n this.method_6211(var1, var3, 4, 1, 10, 6, 3, 10, class_1192.field_6025, class_1192.field_6025, false);\r\n this.method_6211(var1, var3, 0, 1, 4, 0, 3, 6, class_1192.field_6025, class_1192.field_6025, false);\r\n this.method_6211(var1, var3, 10, 1, 4, 10, 3, 6, class_1192.field_6025, class_1192.field_6025, false);\r\n var10000 = this.field_5880;\r\n }\r\n\r\n if(var4 != null) {\r\n int var5;\r\n switch(var10000) {\r\n case 0:\r\n this.method_6208(var1, class_1192.field_6123, 0, 5, 1, 5, var3);\r\n this.method_6208(var1, class_1192.field_6123, 0, 5, 2, 5, var3);\r\n this.method_6208(var1, class_1192.field_6123, 0, 5, 3, 5, var3);\r\n this.method_6208(var1, class_1192.field_6077, 0, 4, 3, 5, var3);\r\n this.method_6208(var1, class_1192.field_6077, 0, 6, 3, 5, var3);\r\n this.method_6208(var1, class_1192.field_6077, 0, 5, 3, 4, var3);\r\n this.method_6208(var1, class_1192.field_6077, 0, 5, 3, 6, var3);\r\n this.method_6208(var1, class_1192.field_6071, 0, 4, 1, 4, var3);\r\n this.method_6208(var1, class_1192.field_6071, 0, 4, 1, 5, var3);\r\n this.method_6208(var1, class_1192.field_6071, 0, 4, 1, 6, var3);\r\n this.method_6208(var1, class_1192.field_6071, 0, 6, 1, 4, var3);\r\n this.method_6208(var1, class_1192.field_6071, 0, 6, 1, 5, var3);\r\n this.method_6208(var1, class_1192.field_6071, 0, 6, 1, 6, var3);\r\n this.method_6208(var1, class_1192.field_6071, 0, 5, 1, 4, var3);\r\n this.method_6208(var1, class_1192.field_6071, 0, 5, 1, 6, var3);\r\n if(var4 != null) {\r\n break;\r\n }\r\n case 1:\r\n var5 = 0;\r\n\r\n while(true) {\r\n if(var5 < 5) {\r\n this.method_6208(var1, class_1192.field_6123, 0, 3, 1, 3 + var5, var3);\r\n this.method_6208(var1, class_1192.field_6123, 0, 7, 1, 3 + var5, var3);\r\n this.method_6208(var1, class_1192.field_6123, 0, 3 + var5, 1, 3, var3);\r\n this.method_6208(var1, class_1192.field_6123, 0, 3 + var5, 1, 7, var3);\r\n ++var5;\r\n if(var4 == null) {\r\n break;\r\n }\r\n\r\n if(var4 != null) {\r\n continue;\r\n }\r\n }\r\n\r\n this.method_6208(var1, class_1192.field_6123, 0, 5, 1, 5, var3);\r\n this.method_6208(var1, class_1192.field_6123, 0, 5, 2, 5, var3);\r\n this.method_6208(var1, class_1192.field_6123, 0, 5, 3, 5, var3);\r\n this.method_6208(var1, class_1192.field_6033, 0, 5, 4, 5, var3);\r\n break;\r\n }\r\n\r\n if(var4 != null) {\r\n break;\r\n }\r\n case 2:\r\n var5 = 1;\r\n\r\n while(true) {\r\n if(var5 <= 9) {\r\n this.method_6208(var1, class_1192.field_6029, 0, 1, 3, var5, var3);\r\n this.method_6208(var1, class_1192.field_6029, 0, 9, 3, var5, var3);\r\n ++var5;\r\n if(var4 == null) {\r\n break;\r\n }\r\n\r\n if(var4 != null) {\r\n continue;\r\n }\r\n }\r\n\r\n var5 = 1;\r\n break;\r\n }\r\n\r\n while(true) {\r\n if(var5 <= 9) {\r\n this.method_6208(var1, class_1192.field_6029, 0, var5, 3, 1, var3);\r\n this.method_6208(var1, class_1192.field_6029, 0, var5, 3, 9, var3);\r\n ++var5;\r\n if(var4 == null) {\r\n break;\r\n }\r\n\r\n if(var4 != null) {\r\n continue;\r\n }\r\n }\r\n\r\n this.method_6208(var1, class_1192.field_6029, 0, 5, 1, 4, var3);\r\n this.method_6208(var1, class_1192.field_6029, 0, 5, 1, 6, var3);\r\n this.method_6208(var1, class_1192.field_6029, 0, 5, 3, 4, var3);\r\n this.method_6208(var1, class_1192.field_6029, 0, 5, 3, 6, var3);\r\n this.method_6208(var1, class_1192.field_6029, 0, 4, 1, 5, var3);\r\n this.method_6208(var1, class_1192.field_6029, 0, 6, 1, 5, var3);\r\n this.method_6208(var1, class_1192.field_6029, 0, 4, 3, 5, var3);\r\n this.method_6208(var1, class_1192.field_6029, 0, 6, 3, 5, var3);\r\n break;\r\n }\r\n\r\n var5 = 1;\r\n\r\n while(true) {\r\n if(var5 <= 3) {\r\n this.method_6208(var1, class_1192.field_6029, 0, 4, var5, 4, var3);\r\n this.method_6208(var1, class_1192.field_6029, 0, 6, var5, 4, var3);\r\n this.method_6208(var1, class_1192.field_6029, 0, 4, var5, 6, var3);\r\n this.method_6208(var1, class_1192.field_6029, 0, 6, var5, 6, var3);\r\n ++var5;\r\n if(var4 == null) {\r\n break;\r\n }\r\n\r\n if(var4 != null) {\r\n continue;\r\n }\r\n }\r\n\r\n this.method_6208(var1, class_1192.field_6077, 0, 5, 3, 5, var3);\r\n break;\r\n }\r\n\r\n var5 = 2;\r\n\r\n while(true) {\r\n if(var5 <= 8) {\r\n label56: {\r\n this.method_6208(var1, class_1192.field_6030, 0, 2, 3, var5, var3);\r\n this.method_6208(var1, class_1192.field_6030, 0, 3, 3, var5, var3);\r\n if(var4 != null) {\r\n if(var4 == null) {\r\n break;\r\n }\r\n\r\n if(var5 > 3 && var5 < 7) {\r\n break label56;\r\n }\r\n\r\n this.method_6208(var1, class_1192.field_6030, 0, 4, 3, var5, var3);\r\n this.method_6208(var1, class_1192.field_6030, 0, 5, 3, var5, var3);\r\n }\r\n\r\n this.method_6208(var1, class_1192.field_6030, 0, 6, 3, var5, var3);\r\n }\r\n\r\n this.method_6208(var1, class_1192.field_6030, 0, 7, 3, var5, var3);\r\n this.method_6208(var1, class_1192.field_6030, 0, 8, 3, var5, var3);\r\n ++var5;\r\n if(var4 != null) {\r\n continue;\r\n }\r\n }\r\n\r\n this.method_6208(var1, class_1192.field_6091, this.method_6207(class_1192.field_6091, 4), 9, 1, 3, var3);\r\n this.method_6208(var1, class_1192.field_6091, this.method_6207(class_1192.field_6091, 4), 9, 2, 3, var3);\r\n this.method_6208(var1, class_1192.field_6091, this.method_6207(class_1192.field_6091, 4), 9, 3, 3, var3);\r\n this.method_6219(var1, var3, var2, 3, 4, 8, class_1652.method_9098(field_5879, new class_1652[]{class_1010.field_5259.getBlock06(var2)}), 1 + var2.nextInt(4));\r\n break;\r\n }\r\n }\r\n\r\n var10000 = 1;\r\n }\r\n\r\n return (boolean)var10000;\r\n }", "@Test\n void animalVariablesTest() {\n assertEquals(50, pens[0].getHealth());\n assertEquals(100, pens[1].getHealth());\n assertEquals(80, pens[2].getHealth());\n assertEquals(70, pens[3].getHealth());\n for (int i = 0; i < pens.length; i++) {\n assertEquals(100, pens[i].getHappiness());\n }\n assertEquals(50, pens[0].getValue());\n assertEquals(100, pens[1].getValue());\n assertEquals(80, pens[2].getValue());\n assertEquals(70, pens[3].getValue());\n }", "@Override\n\tpublic void visit(CaseExpression arg0) {\n\t\t\n\t}", "public void test19() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "public static void main(String[] args) {\n\t\tScanner keyboard= new Scanner(System.in);\r\nSystem.out.print(\"Enter a number:\");\r\nString word1,word2 = null,word3 = null,word4; //Create four string for four outputs\r\nint number = keyboard.nextInt();\r\nif(number%15==0){ word1=\"special\";}//check weather it is special\r\nelse { word1=\"not special\";}\r\nif( number>999){word3=\"big\";}//check weather it is big\r\nelse{word3=\"not big\";}\r\nif(number%5==0&&number%6==0&&number%18!=0){word2=\"weird\";} //check weather it is weird\r\nelse{word2=\"not weird\";}\r\nif(word3==\"big\"||word2==\"weird\"){word4=\"scary\";}//check weather it is scary\r\nelse{word4=\"not scary\";}\r\n \r\n// strings ae compared in oder to check the all possible outcome combinations\r\n//Then outcomes are printed as given in the sample test cases\r\n\r\nif(word1==\"special\" && word4!=\"scary\"){\r\n\tSystem.out.println(number+\" is \"+\" \"+word1+\", but \"+word4+\".\");\r\n}\r\nif(word1==\"special\" && word3!=\"big\"&& word2==\"weird\"){\r\n\tSystem.out.println(number+\" is \"+word1+\", \"+word2+\", \"+word4+\", but \"+word3+\".\");\r\n}\r\nif(word1==\"special\" && word3==\"big\" && word2!=\"weird\"){\r\n\tSystem.out.println(number+\" is \"+word1+\" , \"+word3+\", \"+word4+\", but \"+word2+\".\");\r\n}\r\nif(word1!=\"special\" && word3==\"big\" && word2!=\"weird\"){\r\n\tSystem.out.println(number+\" is \"+word3+\", \"+word4+\", but \"+word2+\".\");\r\n}\r\nif(word1!=\"special\" && word3!=\"big\" && word2==\"weird\"){\r\n\tSystem.out.println(number+\" is \"+word2+\", \"+word4+\", but \"+word3+\".\");\r\n}\r\nif(word1!=\"special\" && word3!=\"big\" && word2!=\"weird\"){\r\n\tSystem.out.println(number+\" is \"+word4+\".\");\r\n}\r\nif(word1==\"special\" && word3==\"big\" && word2==\"weird\"){\r\n\tSystem.out.println(number+\" is \"+word1+\", \"+word3+\", \"+word2+\", \"+word4+\".\");\r\n}\r\n\r\n\r\nkeyboard.close();\r\n\t}", "public static void main(String[] args){\r\n\r\n IStmt lab2ex1 = new CompStmt(new AssignStmt(\"v\", new ConstExp(2)), new PrintStmt(new VarExp(\"v\")));\r\n\r\n /*\r\n * lab2ex2\r\n * a = 2 + 3 * 5;\r\n * b = a + 1;\r\n * print(b)\r\n *\r\n * */\r\n\r\n IStmt lab2ex2 = new CompStmt(new AssignStmt(\"a\", new ArithExp('+', new ConstExp(2), new ArithExp('*', new ConstExp(3), new ConstExp(5)))), new CompStmt(new AssignStmt(\"b\", new ArithExp('+', new VarExp(\"a\"), new ConstExp(1))), new PrintStmt(new VarExp(\"b\"))));\r\n\r\n /*\r\n * lab2ex3\r\n * a = 2 - 2;\r\n * if a then v = 2 else v = 3\r\n * print(v)\r\n *\r\n * */\r\n\r\n IStmt lab2ex3 = new CompStmt(new AssignStmt(\"a\", new ArithExp('-', new ConstExp(2), new ConstExp(2))), new CompStmt(new IfStmt(new VarExp(\"a\"), new AssignStmt(\"v\", new ConstExp(2)), new AssignStmt(\"v\", new ConstExp(3))), new PrintStmt(new VarExp(\"v\"))));\r\n\r\n /*\r\n * lab3ex1\r\n * openRFile(var_f, \"test.in\");\r\n * readFile(var_f, var_c); print(var_c);\r\n * if var_c then readFile(var_f, var_c); print(var_c)\r\n * else print(0)\r\n * closeRFile(var_f)\r\n *\r\n * */\r\n\r\n IStmt lab3ex1 = new CompStmt(new OpenRFileStmt(\"var_f\", \"test1.in\"),\r\n new CompStmt(\r\n new ReadFileStmt(new VarExp(\"var_f\"), \"var_c\"),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"var_c\")),\r\n new CompStmt(\r\n new IfStmt(\r\n new VarExp(\"var_c\"),\r\n new CompStmt(\r\n new ReadFileStmt(new VarExp(\"var_f\"), \"var_c\"),\r\n new PrintStmt(new VarExp(\"var_c\"))\r\n ),\r\n new PrintStmt(new ConstExp(0))\r\n ),\r\n new CloseRFileStmt(new VarExp(\"var_f\"))\r\n )\r\n )\r\n )\r\n );\r\n\r\n /**\r\n * lab3ex2\r\n * openRFile(var_f + 2, var_c); print(var_c);\r\n * (if var_c then readFile(var_f, var_c); print(var_c)\r\n * else print(0));\r\n * closeRFile(var_f)\r\n *\r\n */\r\n\r\n IStmt lab3ex2 = new CompStmt(new OpenRFileStmt(\"var_f\", \"test.in\"),\r\n new CompStmt(\r\n new ReadFileStmt(new ArithExp('+', new VarExp(\"var_f\"), new ConstExp(2)), \"var_c\"),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"var_c\")),\r\n new CompStmt(\r\n new IfStmt(\r\n new VarExp(\"var_c\"),\r\n new CompStmt(\r\n new ReadFileStmt(new VarExp(\"var_f\"), \"var_c\"),\r\n new PrintStmt(new VarExp(\"var_c\"))\r\n ),\r\n new PrintStmt(new ConstExp(0))\r\n ),\r\n new CloseRFileStmt(new VarExp(\"var_f\"))\r\n )\r\n )\r\n )\r\n );\r\n\r\n\r\n /*\r\n * v = 10; new(v, 20); new(a, 22); wH(a, 30); print(a); print(rH(a)); a = 0;\r\n *\r\n * */\r\n\r\n IStmt lab4ex1 = new CompStmt(new AssignStmt(\"v\", new ConstExp(10)),\r\n new CompStmt(\r\n new NewStmt(\"v\", new ConstExp(20)),\r\n new CompStmt(\r\n new NewStmt(\"a\", new ConstExp(22)),\r\n new CompStmt(\r\n new WriteHeapStmt(\"a\", new ConstExp(30)),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"a\")),\r\n new CompStmt(\r\n new PrintStmt(new ReadHeapExp(\"a\")),\r\n new AssignStmt(\"a\", new ConstExp(0))\r\n )\r\n )\r\n )\r\n )\r\n )\r\n );\r\n\r\n\r\n /**\r\n *\r\n * Lab5ex1: 10 + (2 < 6) = 11\r\n *\r\n * */\r\n\r\n\r\n IStmt lab5ex1 = new CompStmt(new AssignStmt(\"P\", new ArithExp('+', new ConstExp(10),\r\n new BooleanExp(new ConstExp(2), new ConstExp(6), \"<\"))),\r\n new PrintStmt(new VarExp(\"P\")));\r\n\r\n\r\n /*\r\n *\r\n * Lab5ex2: (10 + 2) < 6\r\n *\r\n * **/\r\n\r\n IStmt lab5ex2 = new CompStmt(new AssignStmt(\"Q\", new BooleanExp(new ArithExp('+',\r\n new ConstExp(10), new ConstExp(2)), new ConstExp(6), \"<\")),\r\n new PrintStmt(new VarExp(\"Q\")));\r\n\r\n\r\n /*\r\n *\r\n * v = 6;\r\n * (while (v - 4) print(v); v = v - 1)\r\n * print(v)\r\n *\r\n ***/\r\n\r\n AssignStmt as = new AssignStmt(\"v\", new ConstExp(6));\r\n IStmt auxlab5ex3 = new CompStmt(new WhileStmt(new BooleanExp(new VarExp(\"v\"),\r\n new ConstExp(4), \">=\"), new CompStmt(new PrintStmt(new VarExp(\"v\")),\r\n new AssignStmt(\"v\", new ArithExp('-', new VarExp(\"v\"), new ConstExp(1))))),\r\n new PrintStmt(new VarExp(\"v\")));\r\n\r\n IStmt lab5ex3 = new CompStmt(as, auxlab5ex3);\r\n\r\n\r\n /**\r\n *\r\n * la6ex1\r\n * v = 10; new(a, 22);\r\n * fork(wH(a, 30); v = 32; print(v); print(rH(a)));\r\n * print(v); print(rH(a))\r\n *\r\n * */\r\n\r\n IStmt lab6ex1 = new CompStmt(\r\n new CompStmt(\r\n new AssignStmt(\"v\", new ConstExp(10)),\r\n new NewStmt(\"a\", new ConstExp(22))\r\n ),\r\n new CompStmt(\r\n new ForkStmt(\r\n new CompStmt(\r\n new WriteHeapStmt(\"a\", new ConstExp(30)),\r\n new CompStmt(\r\n new AssignStmt(\"v\", new ConstExp(32)),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"v\")),\r\n new PrintStmt(new ReadHeapExp(\"a\"))\r\n )\r\n )\r\n )\r\n ),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"v\")),\r\n new PrintStmt(new ReadHeapExp(\"a\"))\r\n )\r\n )\r\n );\r\n\r\n IStmt lab6ex2 = new CompStmt(\r\n new CompStmt(\r\n new AssignStmt(\"v\", new ConstExp(10)),\r\n new NewStmt(\"a\", new ConstExp(22))\r\n ),\r\n new CompStmt(\r\n new ForkStmt(\r\n new CompStmt(\r\n new WriteHeapStmt(\"a\", new ConstExp(30)),\r\n new CompStmt(\r\n new AssignStmt(\"v\", new ConstExp(32)),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"v\")),\r\n new PrintStmt(new ReadHeapExp(\"a\"))\r\n )\r\n )\r\n )\r\n ),\r\n new ForkStmt(new CompStmt(\r\n new PrintStmt(new VarExp(\"v\")),\r\n new PrintStmt(new ReadHeapExp(\"a\")))\r\n )\r\n )\r\n );\r\n\r\n\r\n\r\n TextMenu menu = new TextMenu(new MyDictionary<String, Command>(new HashMap<String, Command>()));\r\n menu.addCommand(new ExitCommand(\"0\", \"Exit\"));\r\n menu.addCommand(new RunExample(\"1\", lab2ex1.toString(), getNewController(lab2ex1)));\r\n menu.addCommand(new RunExample(\"2\", lab2ex2.toString(), getNewController(lab2ex2)));\r\n menu.addCommand(new RunExample(\"3\", lab2ex3.toString(), getNewController(lab2ex3)));\r\n menu.addCommand(new RunExample(\"4\", lab3ex1.toString(), getNewController(lab3ex1)));\r\n menu.addCommand(new RunExample(\"5\", lab3ex2.toString(), getNewController(lab3ex2)));\r\n menu.addCommand(new RunExample(\"6\", lab4ex1.toString(), getNewController(lab4ex1)));\r\n menu.addCommand(new RunExample(\"7\", lab5ex1.toString(), getNewController(lab5ex1)));\r\n menu.addCommand(new RunExample(\"8\", lab5ex2.toString(), getNewController(lab5ex2)));\r\n menu.addCommand(new RunExample(\"9\", lab5ex3.toString(), getNewController(lab5ex3)));\r\n menu.addCommand(new RunExample(\"10\", lab6ex1.toString(), getNewController(lab6ex1)));\r\n menu.addCommand(new RunExample(\"11\", lab6ex2.toString(), getNewController(lab6ex2)));\r\n\r\n menu.show();\r\n }", "public void effetDeCarte(int idEffet, Joueur joueurQuiJoueLaCarte, Plateau plateau) {\n switch (idEffet) {\n case 0:\n joueurQuiJoueLaCarte.deck.piocher(1);\n break;\n case 1:\n joueurQuiJoueLaCarte.deck.piocher(2);\n break;\n case 2:\n joueurQuiJoueLaCarte.deck.piocher(3);\n break;\n case 3:\n joueurQuiJoueLaCarte.gagnerDegats(1);\n break;\n case 4:\n joueurQuiJoueLaCarte.gagnerDegats(2);\n break;\n case 5:\n joueurQuiJoueLaCarte.gagnerDegats(3);\n\n break;\n case 6:\n joueurQuiJoueLaCarte.gagnerDegats(4);\n break;\n case 7:\n joueurQuiJoueLaCarte.gagnerRunes(1);\n break;\n case 8:\n gagnerDesRunes(joueurQuiJoueLaCarte,2);\n break;\n case 9:\n gagnerDesRunes(joueurQuiJoueLaCarte,3);\n break;\n case 11:\n gagnerDesRunes(joueurQuiJoueLaCarte,1);\n gagnerDesDegats(joueurQuiJoueLaCarte,1);\n break;\n case 12:\n joueurQuiJoueLaCarte.gagnerPointsHonneur(1);\n break;\n case 14:\n joueurQuiJoueLaCarte.gagnerPointsHonneur(2);\n joueurQuiJoueLaCarte.piocher(1);\n break;\n case 15:\n joueurQuiJoueLaCarte.tuerUneCarteAvecDeLattaqueGratuitement(plateau);\n System.out.println(\"DEfeat a monster that has 4 D or less without paying it cost\");\n break;\n case 16:\n System.out.println(\"DEfeat a monster that has 6 D or less without paying it cost\");\n break;\n case 17:\n //joueurQuiJoueLaCarte.deck.piocher(1);\n System.out.println(\" You may banish a card in the center row\");\n break;\n case 18:\n System.out.println(\"Discard a card, if you do, draw two cards\");\n break;\n case 19:\n System.out.println(\"Copy l'effet d'un Héros joué ce tour-ci\");\n break;\n case 20:\n System.out.println(\"Once per turn you may draw a card\");\n break;\n case 21:\n System.out.println(\"You may banish this Construct to take an additional turn after this one.\");\n break;\n case 22:\n System.out.println(\"Acquire a Hero without paying its cost. Place in on top of your deck.\");\n break;\n case 23:\n joueurQuiJoueLaCarte.gagnerPointsHonneur(1);\n gagnerDesRunes(joueurQuiJoueLaCarte,1);\n break;\n case 24:\n gagnerDesRunes(joueurQuiJoueLaCarte,2);\n verifLifebound(joueurQuiJoueLaCarte);\n break;\n case 25:\n gagnerDesRunes(joueurQuiJoueLaCarte,1);\n joueurQuiJoueLaCarte.deck.piocher(1);\n break;\n case 26:\n System.out.println(\"Once per turn, gain 1 runes, the first time you play a lifebound hero, each turn gain 1 recompense\");\n break;\n case 27:\n System.out.println(\"Once per turn , gain 1d\" +\n \"Once per turn, you may spend 4r to gain 3 recompense\");\n break;\n case 28:\n gagnerDesDegats(joueurQuiJoueLaCarte,2);\n plusDeDeuxConstructeur(joueurQuiJoueLaCarte);\n System.out.println(\"Draw a card if you control 2 or moreConstrcut\");\n break;\n case 29:\n System.out.println(\"Gain 1d or 1r\");\n break;\n case 30:\n joueurQuiJoueLaCarte.gagnerPointsHonneur(2);\n System.out.println(\"Gain 2r You pay 1R less the next time you acquire a Construc this turn\");\n break;\n case 31:\n joueurQuiJoueLaCarte.gagnerPointsHonneur(2);\n System.out.println(\"Once per turn, when you put a Mechana Construc into play (including this one) , draw a card\");\n break;\n case 32:\n joueurQuiJoueLaCarte.gagnerPointsHonneur(2);\n System.out.println(\"Once per turn, gain 2d.You may spend it only to acquire Mechana Construct\");\n break;\n case 33:\n joueurQuiJoueLaCarte.gagnerPointsHonneur(2);\n System.out.println(\" Once per turn\");\n gagner1DParTourPourChaqueMechaConstruct(joueurQuiJoueLaCarte);\n\n break;\n case 34:\n System.out.println(\"You may treat all Construcs as Mechana Construcs\");\n break;\n case 35:\n System.out.println(\"Once per turn, when you acquire another Mechana Construc, you may put it directly into play\");\n break;\n case 36:\n System.out.println(\"Once per turn ,gain 1 r . you may spend it only to acquire Mechana Construc\");\n break;\n case 37:\n joueurQuiJoueLaCarte.deck.piocher(2);\n System.out.println(\"Banish a card in you hand\");\n break;\n case 38:\n gagnerDesDegats(joueurQuiJoueLaCarte,2);\n System.out.println(\"Banish a card in you hand or discard pile\");\n break;\n case 39:\n gagnerDesDegats(joueurQuiJoueLaCarte,1);\n System.out.println(\"Banish a card in you hand or discard pile\");\n break;\n case 40:\n System.out.println(\"Once per turn, gain 3d\");\n break;\n case 41:\n System.out.println(\"Once per turn, gain 1d\");\n break;\n case 42:\n System.out.println(\"Once per turn gain 1 The first time you deafeat a monster in the center row each turn, gain 1 R\");\n break;\n case 43:\n System.out.println(\"Unbanishable You may acquire or defeat any car in the center row without paying its cost\");\n break;\n case 44:\n System.out.println(\"Each opponent must destryo a Construc he controls\");\n break;\n case 45:\n System.out.println(\"Banish a card un the center row and/or in you discard pile\");\n break;\n case 46:\n System.out.println(\"Banish a card un the center row\");\n break;\n case 47:\n System.out.println(\"If an opponent has more than one construct, that player must destroy all but one Construct he controls\");\n break;\n case 48:\n System.out.println(\"Take a card at random from each oppenent's hand and add that card to your hands\");\n break;\n }\n\n }", "public void test(int x) {\n\t\t double y;\n\n\t\t// Logical Or Tests\n\t\t// I used && to check if || was properly parsing\n\t\t// if (x == 1 && y == 2) {\n\t\t// System.out.println(\"something\");\n\t\t// }\n\n\t\t// if(x == 1 && (y == 2 && z == 3)) {\n\t\t// System.out.println(\"something\");\n\t\t// }\n\n\t\t if (x == 1 || y == 2) {\n\t\t System.out.println(\"something\");\n\t\t }\n\t\t\n\t\t// if(x == 1 || (y == 2 && z == 3)) {\n\t\t// System.out.println(\"something\");\n\t\t// }\n\n\t\t// Operators Tests\n\t\t x += y;\n\t\t x -= y;\n\t\t x *= y;\n\t\t x /= y;\n\t\t (x /= y);\n\n\t\t// Post and Prefix increment/decrement\n\t\t ++x;\n\t\t --x;\n\t\t x++;\n\t\t x--;\n\n\t\t// Conditional (Ternary) Expression Tests\n\t\t// if (1 = 1){\n\t\t// System.out.println(\"if\");\n\t\t// } else {\n\t\t// System.out.println(\"else\");\n\t\t// }\n\t\t\n\t\t (a = a) ? System.out.println(\"a\") : System.out.println(\"b\");\n\n\t\t// Static blocks and Instance blocks tests\n\n\t\t {\n\t\t System.out.println(\"Instance Test\");\n\t\t }\n\n\t\t// Do-While Tests\n\t\t do {\n\t\t x++;\n\t\t } while (x > 11)\n\n\t\t// For-Loop Tests\n\t\t for(int x = 0;\n\t\t x = 5;\n\t\t x++){\n\t\t System.out.println(\"*\");\n\t\t }\n\n\t\t// Enhanced For-Loop Test\n\t\t for(int x : numbers) {\n\t\t System.out.println(\"numbers\");\n\t\t }\n\n\t}", "public static void main(String[] args){\r\n String saludar = \"Hola Mundo desde Java\";\r\n System.out.println(saludar);\r\n System.out.println(\"saludar.toUpperCase(Locale.ROOT) = \" + saludar.toUpperCase(Locale.ROOT));\r\n\r\n Integer numero = 11;\r\n\r\n\r\n boolean valor = true;\r\n Integer numero2 = 5;\r\n if(valor){\r\n System.out.println(\"numero = \" + numero);\r\n numero2 = 10;\r\n }\r\n System.out.println(\"numero2 = \" + numero2);\r\n\r\n var numero3 = \"15\";\r\n\r\n String nombre;\r\n\r\n nombre = \"Juan\";\r\n\r\n if(numero >10){\r\n nombre = \"Andres\";\r\n }\r\n\r\n System.out.println(\"nombre = \" + nombre);\r\n\r\n System.out.println();\r\n\r\n }", "public static double calcularCosto(String tipoLicencia, int vigencia) {\n float monto = 0;\n switch(tipoLicencia){\n case \"Clase A\": \n switch(vigencia){\n case 1: monto = 20;\n break;\n case 3: monto = 25;\n break;\n case 4: monto = 30;\n break;\n case 5: monto = 40;\n break;\n }\n break;\n case \"Clase B\": switch(vigencia){\n case 1: monto = 20;\n break;\n case 3: monto = 25;\n break;\n case 4: monto = 30;\n break;\n case 5: monto = 40;\n break;\n }\n break;\n case \"Clase C\": switch(vigencia){\n case 1: monto = 23;\n break;\n case 3: monto = 30;\n break;\n case 4: monto = 35;\n break;\n case 5: monto = 47;\n break;\n }\n break;\n case \"Clase D\": switch(vigencia){\n case 1: monto = 20;\n break;\n case 3: monto = 25;\n break;\n case 4: monto = 30;\n break;\n case 5: monto = 40;\n break;\n }\n break;\n case \"Clase E\": switch(vigencia){\n case 1: monto = 29;\n break;\n case 3: monto = 39;\n break;\n case 4: monto = 44;\n break;\n case 5: monto = 59;\n break;\n }\n break;\n case \"Clase F\": switch(vigencia){\n case 1: monto = 20;\n break;\n case 3: monto = 25;\n break;\n case 4: monto = 30;\n break;\n case 5: monto = 40;\n break;\n }\n break;\n case \"Clase G\": switch(vigencia){\n case 1: monto = 20;\n break;\n case 3: monto = 25;\n break;\n case 4: monto = 30;\n break;\n case 5: monto = 40;\n break;\n }\n break;\n } \n return monto;\n }", "public void Case19(){\n System.out.println(\"Testing Case 19\");\n for(int z=1; z<=7; z++) {\n docuSequence();\n if(z==1) {\n byName();\n }\n else if(z==2){\n byShortName();\n }\n else if(z==3){\n byItemCode();\n }\n else if(z==4){\n byDescription();\n }\n else if(z==5){\n byBrand();\n }\n else if(z==6){\n byKeyword();\n }\n else if(z==7){\n byPrincipal();\n }\n clear();\n }\n System.out.println(\"Case 19 Done\");\n }", "public static void main(String[] args) {\n String color=\"blue\";\n String shirt=\"shirt\";\n switch(color)\n {\n case \"blue\": shirt=\"blue\"+shirt;\n break;\n case \"red\": shirt=\"red\"+shirt;\n break;\n default : shirt =\"white\"+shirt; \n }\n System.out.println(\"shirt type:\"+shirt);\n\t}", "public void doOperations(){\n try {\n UtilityMethods.print(\"Let's create some mammals.! Please choose the mammal to create.\\n1. Labrador\\n2. Golden Retriver\\n3. Bat\");\n Scanner reader = new Scanner(System.in);\n String text = reader.nextLine();\n switch (text) {\n case \"1\":\n UtilityMethods.print(\"You can call him \" + createLabrador().getName());\n break;\n case \"2\":\n UtilityMethods.print(\"You can call him \" + createGolderRetriver().getName());\n break;\n case \"3\":\n UtilityMethods.print(\"You can call him \" + createBat().getName());\n break;\n default:\n break;\n }\n reader.close();\n } catch (Exception e) {\n UtilityMethods.print(e.getMessage());\n }\n }", "public static void main(String[] args) {\n\t\tint hourOfDay =20;\n\n\t\tif(hourOfDay > 15)\n\t\t\tSystem.out.println(\"Good Afternoon\");\n\t\telse if( hourOfDay > 11 ) {\n\t\t\tSystem.out.println(\"Good Morning\"); //UNREACHEABLE CODE... But the compiler can't notice about it and it still compiles\n\t\t} else \n\t\t\tSystem.out.println(\"Good Evening\");\n\n\t\t//Call another example\n\t\tIfThenElseStatement.trickyMethod();\n\t\tIfThenElseStatement.trickyMethodTwo();\n\t}", "public void Case29(){\n\n }", "public void Case25a(){\n System.out.println(\"Testing Case 25\");\n for(int z=1; z<=7; z++) {\n infoFilterInventoryGreaterThanZero();\n if(z==1) {\n byName();\n }\n else if(z==2){\n byShortName();\n }\n else if(z==3){\n byItemCode();\n }\n else if(z==4){\n byDescription();\n }\n else if(z==5){\n byBrand();\n }\n else if(z==6){\n byKeyword();\n }\n else if(z==7){\n byPrincipal();\n }\n clear();\n }\n System.out.println(\"Case 25 Done\");\n }", "public static void main(String args[]){\n\t\tint age = 60;\r\n\t\tSystem.out.printf(\"You are %d years old\\n\", age);\r\n\t\t\r\n\t\tif (age<50){\r\n\t\t\tSystem.out.println(\"You are young\");\r\n\t\t}else{\r\n\t\t\tSystem.out.println(\"You are old\");\r\n\t\t\tif (age >75){\r\n\t\t\t\tSystem.out.println(\"You are really old\");\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"Don't worry you are not really that old\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//method 2: else-if statements\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\");\r\n\t\t\r\n\t\tint age2 = 20;\r\n\t\tSystem.out.printf(\"You are %d years old \\n\", age2);\r\n\t\t\r\n\t\tif (age2 >= 65)\r\n\t\t\tSystem.out.println(\"You are a senior citizen\");\r\n\t\telse if (age2 >= 50)\r\n\t\t\tSystem.out.println(\"You are almost a senior citizen\");\r\n\t\telse if (age2 >= 30)\r\n\t\t\tSystem.out.println(\"You are a (working) adult!\");\r\n\t\telse if (age2 >= 20)\r\n\t\t\tSystem.out.println(\"You are a young adolescent!\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"You are young\");\r\n\t\t\r\n\t\t//method 3: conditional operators\r\n\t\t\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tint age3;\r\n\t\tSystem.out.println(\"Type in your age: \");\r\n\t\tage3 = input.nextInt();\r\n\t\tinput.nextLine();\r\n\t\t\r\n\t\tSystem.out.println(age3 >= 65 ? \"You are a senior citizen\" : \"You are still young!\");\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\n\t\tboolean allergy=true;\n\t\t\n\t\tboolean petAllergy=false;\n\t\tboolean peanatAllergy=true;\n\t\tboolean pollenAllergy=false;\n\t\t\n\t\t\n\t\t\n\tif (allergy) {\n\t\tSystem.out.println(\"Lets do further check\");\n\t\tif (petAllergy) {\n\t\t\tSystem.out.println(\"Please no cats or dogs in the house\");\n\t\t\n\t\t\n\t\t} else if (peanatAllergy){\n\t\t\tSystem.out.println(\"Dont eat peanat butter\");\n\t\t}else if (pollenAllergy) {\n\t\t\tSystem.out.println(\"Dont clean \");}\n\t}else {\n\t\tSystem.out.println(\"You are lucky\");\n\t}\n\t\n\tSystem.out.println(\"-----------Example 2----------\");\n\t\n\t/*\n\t * If todays is friday we will watch movie but would like to check the date\n\t * if date is 13--> watching scary movie\n\t * and if its is not--> i will watch comedy, action\n\t * \n\t * if no Friday --> i am studying\n\t */\n\t\n\tboolean Friday=false;\n\tint date=4;\n\tboolean monday=true;\n\t\n\tif (Friday) {\n\t\tif (date==13) {\n\t\t\tSystem.out.println(\"We will watch a scary movie\");\n\t\t\n\t\t}else {\n\t\t\tSystem.out.println(\"Watch a comedy\");\n\t\t}\n\t\t\n\t\t\n\t}else {\n\t\t\n\t\tif(monday) {\n\t\tSystem.out.println(\"I am not studying,Im working\");\n\t}else {\n\t\tSystem.out.println(\"I have class at Syntax\");\n\t}\n\t}\n\t\n\tSystem.out.println(\"----------Example 3------\");\n\t/*\n\t * check if assignment is completed\n\t * if assignment is complited:\n\t * if score >90--> great job\n\t * if score >80--> good job;\n\t * if score >70--> please study more\n\t */\n\t\n\tboolean assignment=false;\n\tint score=92;\n\t\n\tif (assignment) {\n\t\tif(score>90) {\n\t\t\tSystem.out.println(\"Great job!\");\n\t\t}else if (score>80) {\n\t\t\tSystem.out.println(\"Good job\");\n\t\t}else if (score>70) {\n\t\t\tSystem.out.println(\"Pleaase study more\");\n\t\t}else {\n\t\t\tSystem.out.println(\"Good job for trying,but must study!\");\n\t\t}\n\t\t\n\t\t\n\t}else {\n\t\tSystem.out.println(\"You should always complete all assignments\");\n\t}\n\t\n\t}", "public static void main(String[] args){\n// int[] testArray = {82, 95, 71, 6, 34};\n//\n// int min = Aggregate.min(testArray);\n// int max = Aggregate.max(testArray);\n// int sum = Aggregate.sum(testArray);\n// double avg = Aggregate.average(testArray);\n// double div = Aggregate.standardDeviation(testArray);\n//\n// System.out.println(min); // 6\n// System.out.println(max); //95\n// System.out.println(sum); //288\n// System.out.println(avg); //57.6\n// System.out.println(div); //36.719\n\n final int ROCK = 1;\n final int SCISSORS = 2;\n final int PAPER = 3;\n\n int computerDecision = getComputerChoice();\n int userDecision = getUserChoice();\n\n System.out.print(\"user: \" + printChoice(userDecision));\n switch(userDecision) {\n\n case ROCK:\n if(computerDecision == ROCK){\n System.out.println(\"That's a Tie!\");\n }\n else if(computerDecision == SCISSORS ){\n System.out.println(\"Congrats! You won\");\n }\n else{\n System.out.println(\"Sorry,You lost!\");\n }\n break;\n case SCISSORS:\n if(computerDecision == ROCK){\n System.out.println(\"Sorry,You lost!\");\n }\n else if(computerDecision == SCISSORS ){\n System.out.println(\"That's a Tie!\");\n }\n else{\n System.out.println(\"Congrats! You won\");\n }\n break;\n case PAPER:\n if(computerDecision == ROCK){\n System.out.println(\"Congrats! You won\");\n }\n else if(computerDecision == SCISSORS ){\n System.out.println(\"Sorry,You lost!\");\n }\n else{\n System.out.println(\"That's a Tie!\");\n }\n break;\n\n default:\n\n }\n\n\n }", "public static void main(String[] args) {\n\t\tint num=1234;\r\n\t\tint num2=56;\r\n\t\tint bigger;\r\n\t\tif(num>num2){\r\n\t\t\tbigger=num;\r\n\t\t\tSystem.out.println(\"num \"+num+\" is bigger\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\tbigger=num2;\r\n\t\t\tSystem.out.println(\"num2 \"+num2+\" is bigger\");\r\n\t\t}\r\n\t\t//created a variable called bigger\r\n\t\t//which is going to be the bigger of the two numbers\r\n\t\t\r\n\tbigger=num > num2 ? num : num2;\r\n\tSystem.out.println(\"bigger is \"+bigger);\r\n\t\r\n\tint age=16;\r\n\tString adm;\r\n\tadm=age>18 ? \"addmitted\":\" No admission\";\r\n\t\r\n\tSystem.out.println(adm);\r\n\t\r\n\tboolean sex;//true is female, falses is male\r\n\tdouble price;//price of a haircut\r\n\tsex=false;//if male price is 10, otherwise price is 15.50\r\n\tprice=sex==false ? 10.00:15.50;\r\n\tSystem.out.println(\"price is \"+price);\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tint age;\n\t\tScanner input;\n\t\t\n\t\tinput=new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter the age!!\");\n\t\tage=input.nextInt();\n\t\t\n\t\tif(age>=1 && age<=3) {\n\t\t\tSystem.out.println(\"You are a baby\");\n\t\t}else if(age>3 && age<=5) {\n\t\t\tSystem.out.println(\"You are a toddler\");\n\t\t}else if(age>5 && age<=12) {\n\t\t\tSystem.out.println(\"You are kid\");\n\t\t}else if(age>12 && age<=19) {\n\t\t\tSystem.out.println(\"You are teenager\");\n\t\t}else if(age>=20) {\n\t\t\tSystem.out.println(\"You are an adult\");\n\t\t}else {\n\t\t\tSystem.out.println(\"Entered invalid age\");\n\t\t}\n\t\t\n\t\t\n\t\t//SECOND WAY\n\t\t\n\t\tScanner input1=new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter the age!!\");\n\t\tint age1=input1.nextInt();\n\t\t\n String human;\n\t\t\n\t\tif(age1>=1 && age1<=3) {\n\t\t\thuman=\"baby\";\n\t\t}else if(age1>3 && age1<=5) {\n\t\t\thuman=\"toddler\";\n\t\t}else if(age1>5 && age1<=12) {\n\t\t\thuman=\"kid\";\n\t\t}else if(age1>12 && age1<=19) {\n\t\t\thuman=\"teenager\";\n\t\t}else if(age1>=20) {\n\t\t\thuman=\"adult\";\n\t\t}else {\n\t\t\thuman=\"unknown\";\n\t\t}\n\t\t\n\t\tSystem.out.println(\"You are \"+human);\n\t\t//not: if u dont System.out.println(\"You are \"+human); the system will not work.\n\t\t//system work with sout..\n\t}", "@Override\n\tpublic void visit(CaseExpression arg0) {\n\n\t}", "public static void main(String[] args) {\n\t\n\t int velocidad = 130; //KM/H\n\t int limiteVelocidad = 80;\n\t \n//\t if (velocidad > limiteVelocidad) {\n//\t \tSystem.out.println(\"El coche va a excceso de velocidad\");\n//\t }else {\n//\t \tSystem.out.println(\"El coche va en la velocidad adecuada\");\n//\t }\n\t \n//\t IF Anidado\n\t \n\t boolean carretera = true;\n\t \n\t if (carretera) {\n\t \t\n\t System.out.println(\"Estas en una carretera\");\n\t \t\n\t limiteVelocidad = 110;\n\t \t\n\t \tif(velocidad > limiteVelocidad) {\n\t \t \tSystem.out.println(\"El coche va a excceso de velocidad\");\n\t \t }else {\n\t \t \tSystem.out.println(\"El coche va en la velocidad adecuada\");\n\t \t }\n\t }else if (velocidad > limiteVelocidad) {\n\t\t\t\t\tSystem.out.println(\"El coche esta en una calle y va a excceso de velocidad\");\n\t\t}else {\n\t\t\tSystem.out.println(\"El coche esta en una calle y va en la velocidad adecuada\");\n\t\t}\t \n\t \n//\t SWITCH CASE\n\t \n\t int temperatura = 30;\n\t switch(temperatura) {\n\t \n\t case 5:\n\t \tSystem.out.println(\"mucho frio\");\n\t \tbreak;\n\t \t\n\t case 10:\n\t \tSystem.out.println(\"frio\");\n\t \tbreak;\n\n\t case 20:\n\t\t\tSystem.out.println(\"clima agradable\");\n\t\t\tbreak;\t \n\t\t\t\n\t case 30:\n\t\t\tSystem.out.println(\"calor\");\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tSystem.out.println(\"no encontro temperatura\");\n\t\t \n\t }\n\t \t\t\n\t}", "public static void doExercise3() {\n // TODO: Complete Exercise 3 Below\n\n }", "@Override\n\tpublic Void visit(Case casee) {\n\t\tprintIndent(\"case\");\n\t\tindent++;\n\t\tcasee.var.accept(this);\n\t\tfor (var v : casee.cases)\n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "CaseStatement createCaseStatement();", "public static void main(String[] args) {\n\n String selection = \"drink\"; // Snack\n String drinkItems = \"tea\"; // coke\n String snackItems = \"chips\"; // candy\n\n if(selection.equals(\"drink\")){\n System.out.println(\"drink option is selected\");\n if(drinkItems.equals(\"tea\")){\n System.out.println(\"tea is selected\");\n }\n else{\n System.out.println(\"coke is selected\");\n }\n }\n else if(selection.equals(\"snack\")){\n System.out.println(\"snack option is selected\");\n if(snackItems.equals(\"chips\")){\n System.out.println(\"chips item is selected\");\n }\n else{\n System.out.println(\"candy item is selected\");\n }\n }\n }", "public void alg_REQAlg(){\r\nswitch (productIndex.value){\r\ncase 0:\r\r\n\tprice.value=10;\r\r\ncase 1:\t\r\r\n\tprice.value=20;\r\r\ncase 2:\r\r\n\tprice.value=30;\r\r\ndefault:\r\n\tprice.value=1;\r\r\n}\r\n}", "public static void main(String[] args) {\n\t\t\t\tint complexity = 0;\n\n\t\t\tcomplexity == (temps < 30) && (ingredients < 5) ;\n\n\t\tSystem.out.println(complexity);\n\n\n\n\n\t\t\tif (complexity < 30 && ingredients < 5) {\n\t\t\tSystem.out.println(\"easy\");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\t\t\t\n\t\t\telse if(complexity < 60 && ingredients < 10) {\n\t\t\t\tSystem.out.println(\"medium\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\n\t\t\telse if(complexity >= 60 && ingredients >= 10) {\n\t\t\t\tSystem.out.println(\"hard\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\n\t\t\n\t\t\t\n\t}", "public void faiLavoro(){\n System.out.println(\"Scrivere 1 per Consegna lunga\\nSeleziona 2 per Consegna corta\\nSeleziona 3 per Consegna normale\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n soldiTam += 500;\n puntiVita -= 40;\n puntiFame -= 40;\n puntiFelicita -= 40;\n }\n case 2 -> {\n soldiTam += 300;\n puntiVita -= 20;\n puntiFame -= 20;\n puntiFelicita -= 20;\n }\n case 3 -> {\n soldiTam += 100;\n puntiVita -= 10;\n puntiFame -= 10;\n puntiFelicita -= 10;\n }\n }\n checkStato();\n }", "void switch_test() {\n\t\tSystem.out.println(\"switch test)\\n[i] : [j]\");\n\t\tint sw = 0;\n\t\tint j = 0;\n\t\tfor (int i = 1; i <= 100; i++) {\n\t\t\t\n\t\t\tswitch(sw) {\n\t\t\tcase 0 : \n\t\t\t\tj = j + i;\n\t\t\t\tsw = 1;\n\t\t\t\tbreak;\n\t\t\tcase 1 : \n\t\t\t\tj = j - i;\n\t\t\t\tsw = 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(i + \" : \" + j);\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}\n\t}", "int main()\n{\n int units,r;\n cin>>units;\n if (units<=200) {\n r=units*0.5;\n cout<<\"Rs.\"<<r;\n }\n else if (units>=200 && units<=400){\n r=0.65*units+100;\n cout<<\"Rs.\"<<r;\n }\n else if (units>=400 && units<=600){\n r=0.8*units+200;\n cout<<\"Rs.\"<<r;\n }\n else{\n r=1.25*units+425;\n cout<<\"Rs.\"<<r;\n }\n}", "public void Expresstion_generator_based_on_difficulty() {\n\t\tString Difficulty = getIntent().getStringExtra(\"Difficulty\");\n\t\tif (Difficulty == null) {\n\t\t\tDifficulty = getPreferences(MODE_PRIVATE).getString(\n\t\t\t\t\t\"WhatDifficulty\", \"\");\n\t\t}\n\t\tif (Difficulty.equals(\"novice\")) {\n\t\t\tnovice();\n\t\t} else if (Difficulty.equals(\"easy\")) {\n\t\t\teasy();\n\t\t} else if (Difficulty.equals(\"medium\")) {\n\t\t\tmedium();\n\t\t} else if (Difficulty.equals(\"guru\")) {\n\t\t\tguru();\n\t\t}\n\t}", "public static void main(String[] args) throws SQLException, IOException {\n CONNECTION = getConnection();\n System.out.println(\"Enter the number of the check task\");\n int number = Integer.parseInt(READER.readLine());\n switch (number) {\n case 2:\n exerciseOne();\n break;\n case 3:\n exerciseTwo();\n break;\n case 4:\n exerciseThree();\n break;\n case 5:\n exerciseFive();\n break;\n case 6:\n exerciseSix();\n break;\n case 7:\n exerciseSeven();\n break;\n case 8:\n exerciseEight();\n break;\n case 9:\n exerciseNine();\n break;\n }\n\n }", "public static void main(String args[]){\n\t\t\t\tbyte variableByte = 126;\n\t\t\t\tshort variableShort = 32767;\n\t\t\t\tint variableInt = 214778;\n\t\t\t\tlong variableLong = 3454656;\n\t\t\t\tchar variableChar = 'a';\n\n\t\t\t\tSystem.out.println(\"Este es una variable byte: \\n\" + variableByte);\n\t\t\t\tSystem.out.println(\"Este es una variable short: \\n\" + variableShort);\n\t\t\t\tSystem.out.println(\"Este es una variable int: \\n\" + variableInt);\n\t\t\t\tSystem.out.println(\"Este es una variable long: \\n\" + variableLong);\n\n\t\t\t\tSystem.out.println(\"La primer letra es \" + variableChar);\n \n\t\t\t//Tipos Boolean \n\t\t\t\tboolean isActive = false ; \n\t\t\t\tSystem.out.println(\"Boolean solo tiene dos valores , tales como true and : \" + isActive);\n\n\n\t\t\t//Tipos REALES \n\n\t\t\t\tfloat variableFlotante = 3.1415f;\n\n\t\t\t\tSystem.out.println(\"Este es un flotante \" + variableFlotante );\n\n\t\t\t\tdouble variableDouble = 343434.234333333;\t\n\t\t\t\tSystem.out.println(\"Este es un double : \" + variableDouble);\t\t\n\n\t}", "public static void main(String[] agrs){\n double kilometers = (1.609334 * 100);\n int highScore=50;\n\n if(highScore==50) {\n System.out.println(\"This is an expression\");\n }\n\n //Challenge\n //In the following code that i will type below, write downd\n //what parts of the code are expressinos\n\n int score = 100;\n if(score>90) {\n System.out.println(\"You got the high score!\");\n score=0;\n }\n\n //The expressions above are =,100, sout, the string in sout\n\n\n\n\n\n\n\n\n\n }", "public static void main(String[] args) {\n Random r = new Random();\n int a = r.nextInt(6);\n switch (a){\n case 1:\n System.out.println(\"1 = \"+a);\n break;\n case 2:\n System.out.println(\"2 = \"+a);\n break;\n case 3:\n System.out.println(\"3 = \"+a);\n break;\n case 4:\n System.out.println(\"4 = \"+a);\n break;\n case 5:\n System.out.println(\"5 = \"+a);\n break;\n default:\n System.out.println(\"Not found = \"+a);\n break;\n }\n }", "@Test\n public void testDetermineTitle() {\n System.out.println(\"determineTitle\");\n // Test case 1\n System.out.println(\"\\tTest case 1\");\n \n // define the input varibles \n int charisma = 3;\n int diplomacy = 2;\n int strategy = 1;\n String expResult = \"Benevolent\"; // define the expected output variable\n \n // call the method\n String result = GameControl.determineTitle(charisma, diplomacy, strategy);\n \n // test to see if the result returned equals the expected result\n assertEquals(expResult, result);\n \n // Test case 2\n System.out.println(\"\\tTest case 2\");\n \n // define the input varibles \n charisma = 0;\n diplomacy = 3;\n strategy = 3;\n expResult = \"Balanced\"; // define the expected output variable\n \n // call the method\n result = GameControl.determineTitle(charisma, diplomacy, strategy);\n \n // test to see if the result returned equals the expected result\n assertEquals(expResult, result);\n \n // Test case 3\n System.out.println(\"\\tTest case 3\");\n \n // define the input varibles \n charisma = -1;\n diplomacy = 4;\n strategy = 1;\n expResult = \"error\"; // define the expected output variable\n \n // call the method\n result = GameControl.determineTitle(charisma, diplomacy, strategy);\n \n // test to see if the result returned equals the expected result\n assertEquals(expResult, result);\n \n // Test case 4\n System.out.println(\"\\tTest case 4\");\n \n // define the input varibles \n charisma = 1;\n diplomacy = -2;\n strategy = -3;\n expResult = \"error\"; // define the expected output variable\n \n // call the method\n result = GameControl.determineTitle(charisma, diplomacy, strategy);\n \n // test to see if the result returned equals the expected result\n assertEquals(expResult, result);\n \n // Test case 5\n System.out.println(\"\\tTest case 5\");\n \n // define the input varibles \n charisma = 2;\n diplomacy = 1;\n strategy = -3;\n expResult = \"error\"; // define the expected output variable\n \n // call the method\n result = GameControl.determineTitle(charisma, diplomacy, strategy);\n \n // test to see if the result returned equals the expected result\n assertEquals(expResult, result);\n \n // Test case 6\n System.out.println(\"\\tTest case 6\");\n \n // define the input varibles \n charisma = 7;\n diplomacy = -3;\n strategy = -3;\n expResult = \"error\"; // define the expected output variable\n \n // call the method\n result = GameControl.determineTitle(charisma, diplomacy, strategy);\n \n // test to see if the result returned equals the expected result\n assertEquals(expResult, result);\n \n // Test case 7\n System.out.println(\"\\tTest case 7\");\n \n // define the input varibles \n charisma = 4;\n diplomacy = 8;\n strategy = 2;\n expResult = \"error\"; // define the expected output variable\n \n // call the method\n result = GameControl.determineTitle(charisma, diplomacy, strategy);\n \n // test to see if the result returned equals the expected result\n assertEquals(expResult, result);\n \n // Test case 8\n System.out.println(\"\\tTest case 8\");\n \n // define the input varibles \n charisma = 3;\n diplomacy = 3;\n strategy = 9;\n expResult = \"error\"; // define the expected output variable\n \n // call the method\n result = GameControl.determineTitle(charisma, diplomacy, strategy);\n \n // test to see if the result returned equals the expected result\n assertEquals(expResult, result);\n \n // Test case 9\n System.out.println(\"\\tTest case 9\");\n \n // define the input varibles \n charisma = 4;\n diplomacy = 3;\n strategy = 0;\n expResult = \"error\"; // define the expected output variable\n \n // call the method\n result = GameControl.determineTitle(charisma, diplomacy, strategy);\n \n // test to see if the result returned equals the expected result\n assertEquals(expResult, result);\n \n // Test case 10\n System.out.println(\"\\tTest case 10\");\n \n // define the input varibles \n charisma = 6;\n diplomacy = 0;\n strategy = 0;\n expResult = \"Silver Tongued\"; // define the expected output variable\n \n // call the method\n result = GameControl.determineTitle(charisma, diplomacy, strategy);\n \n // test to see if the result returned equals the expected result\n assertEquals(expResult, result);\n \n // Test case 11\n System.out.println(\"\\tTest case 11\");\n \n // define the input varibles \n charisma = 0;\n diplomacy = 6;\n strategy = 0;\n expResult = \"Peace Walker\"; // define the expected output variable\n \n // call the method\n result = GameControl.determineTitle(charisma, diplomacy, strategy);\n \n // test to see if the result returned equals the expected result\n assertEquals(expResult, result);\n \n // Test case 12\n System.out.println(\"\\tTest case 12\");\n \n // define the input varibles \n charisma = 0;\n diplomacy = 0;\n strategy = 6;\n expResult = \"Iron Monger\"; // define the expected output variable\n \n // call the method\n result = GameControl.determineTitle(charisma, diplomacy, strategy);\n \n // test to see if the result returned equals the expected result\n assertEquals(expResult, result);\n \n // Test case 13\n System.out.println(\"\\tTest case 13\");\n \n // define the input varibles \n charisma = 0;\n diplomacy = 4;\n strategy = 2;\n expResult = \"Peace Walker\"; // define the expected output variable\n \n // call the method\n result = GameControl.determineTitle(charisma, diplomacy, strategy);\n \n // test to see if the result returned equals the expected result\n assertEquals(expResult, result);\n \n // Test case 14\n System.out.println(\"\\tTest case 14\");\n \n // define the input varibles \n charisma = 3;\n diplomacy = 0;\n strategy = 3;\n expResult = \"Justifier\"; // define the expected output variable\n \n // call the method\n result = GameControl.determineTitle(charisma, diplomacy, strategy);\n \n // test to see if the result returned equals the expected result\n assertEquals(expResult, result);\n \n // Test case 15\n System.out.println(\"\\tTest case 15\");\n \n // define the input varibles \n charisma = 1;\n diplomacy = 5;\n strategy = 0;\n expResult = \"Benevolent\"; // define the expected output variable\n \n // call the method\n result = GameControl.determineTitle(charisma, diplomacy, strategy);\n \n // test to see if the result returned equals the expected result\n assertEquals(expResult, result);\n }", "private void manual() {\n State q1 = new State(\"q1\", \"ID\");\n State q2 = new State(\"q2\", \"IF\");\n State q3 = new State(\"q3\", \"ID\");\n State q4 = new State(\"q4\", \"CONSTANTE\");\n State q5 = new State(\"q5\", \"ABRE_PARENTESES\");\n State q6 = new State(\"q6\", \"FECHA_PARENTESES\");\n State q7 = new State(\"q7\", \"OPERADOR_MAIOR\");\n State q8 = new State(\"q8\", \"OPERADOR_MENOR\");\n State q9 = new State(\"q9\", \"OPERADOR_DIFERENTE\");\n State q10 = new State(\"q10\", \"ID\");\n State q11 = new State(\"q11\", \"ID\");\n State q12 = new State(\"q12\", \"ID\");\n State q13 = new State(\"q13\", \"ID\");\n State q14 = new State(\"q14\", \"BEGIN\");\n State q15 = new State(\"q15\", \"ID\");\n State q16 = new State(\"q16\", \"ID\");\n State q17 = new State(\"q17\", \"END\");\n State q18 = new State(\"q18\", \"ESPACO\");\n State q19 = new State(\"q19\", \"ID\");\n State q20 = new State(\"q20\", \"ID\");\n State q21 = new State(\"q21\", \"ELSE\");\n\n // IF\n q0.put(\"[i]\", q1);\n q1.put(\"[f]\", q2);\n q1.put(\"[^\\\\Wf]\", q3);\n q2.put(\"[\\\\w]\", q3);\n\n // ID\n q0.put(\"[^\\\\Wbei0-9_]\", q3);\n q3.put(\"[\\\\w]\", q3);\n\n // CONSTANTE\n q0.put(\"[\\\\d]\", q4);\n q4.put(\"[\\\\d]\", q4);\n\n // ABRE_PARENTESES\n q0.put(\"[(]\", q5);\n\n // ABRE_PARENTESES\n q0.put(\"[)]\", q6);\n\n // OPERADOR_MAIOR\n q0.put(\"[>]\", q7);\n\n // OPERADOR_MENOR\n q0.put(\"[<]\", q8);\n\n // OPERADOR_DIFERENTE\n q0.put(\"[#]\", q9);\n\n // BEGIN\n q0.put(\"[b]\", q10);\n q10.put(\"[e]\", q11);\n q11.put(\"[g]\", q12);\n q12.put(\"[i]\", q13);\n q13.put(\"[n]\", q14);\n q10.put(\"[^\\\\We]\", q3);\n q11.put(\"[^\\\\Wg]\", q3);\n q12.put(\"[^\\\\Wi]\", q3);\n q13.put(\"[^\\\\Wn]\", q3);\n q14.put(\"[\\\\w]\", q3);\n\n // END\n q0.put(\"[e]\", q15);\n q15.put(\"[n]\", q16);\n q16.put(\"[d]\", q17);\n q15.put(\"[^\\\\Wnl]\", q3);\n q16.put(\"[^\\\\Wd]\", q3);\n q17.put(\"[\\\\w]\", q3);\n\n // ELSE\n q15.put(\"[l]\", q19);\n q19.put(\"[s]\", q20);\n q20.put(\"[e]\", q21);\n q19.put(\"[^\\\\Ws]\", q3);\n q20.put(\"[^\\\\We]\", q3);\n q21.put(\"[\\\\w]\", q3);\n\n // ESPACO\n q0.put(\"[\\\\s]\", q18);\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tint whiteCastleseaten = 10;\r\n\t\tString response;\r\n\t\t\r\n\t\tswitch(whiteCastleseaten){\r\n\t\t\tcase 0:\r\n\t\t\t\tresponse = \"That`s probably smart\";\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 5:\r\n\t\t\t\tresponse = \"Well, are you feeling ok?\";\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 10:\r\n\t\t\t\tresponse = \"Are you crazy\";\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 20:\r\n\t\t\t\tresponse = \"And You are not dead?\";\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\tdefault: \t\t\r\n\t\t\t\tresponse = \"White Castle is the best\";\r\n\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(response);\r\n\r\n\t}", "public static void main( String[] args )\n {\n Scanner kbd = new Scanner( System.in );\n boolean done = false;\n\n Ch12Ex1to9 exercise = new Ch12Ex1to9();\n\n do\n {\n System.out.println();\n System.out.println();\n System.out.println( \"Make a selection\" );\n System.out.println();\n System.out.println( \" (1) Discount Prices\" );\n System.out.println( \" (2) Order Checker\" );\n System.out.println( \" (3) Last Chance Gas\" );\n System.out.println( \" (4) Ground Beef Value Calculator\" );\n System.out.println( \" (5) Y2K Problem Detector\" );\n System.out.println( \" (6) Wind Chill Index\" );\n System.out.println( \" (7) Your Age in Seconds\" );\n System.out.println( \" (8) Matinee Movie Tickets\" );\n System.out.println( \" (9) Midnight Madness\" );\n System.out.println( \" (Q) Quit\" );\n System.out.println();\n System.out.print( \"Enter a choice: \" );\n String response = kbd.nextLine();\n\n if ( response.length() > 0 )\n {\n System.out.println();\n\n switch ( response.charAt( 0 ) )\n {\n case '1':\n exercise.discountPrices();\n break;\n case '2':\n exercise.orderChecker();\n break;\n case '3':\n exercise.lastChanceGas();\n break;\n case '4':\n exercise.groundBeefValueCalc();\n break;\n case '5':\n exercise.y2KProblemDetector();\n break;\n case '6':\n exercise.windChillIndex();\n break;\n case '7':\n exercise.yourAgeInSeconds();\n break;\n case '8':\n exercise.matineeMovieTickets();\n break;\n case '9':\n exercise.midnightMadness();\n break;\n default:\n if ( response.toLowerCase().charAt( 0 ) == 'q' )\n {\n done = true;\n }\n else\n {\n System.out.print( \"Invalid Choice\" );\n }\n break;\n }\n }\n } while ( !done );\n System.out.println( \"Goodbye!\" );\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tSystem.out.println(\"How many libraries you bought?\");\r\n\t\tint sales = in.nextInt();\r\n\t\tswitch(sales){\r\n\t\tcase 6: System.out.println(\"You Won $1000\");\r\n\t\tcase 5: System.out.println(\"You Won A Motorcycle\");\r\n\t\tcase 4: System.out.println(\"You won A Smart Phone\");\r\n\t\tcase 3: System.out.println(\"You Won A Nintendo\");\r\n\t\tcase 2: System.out.println(\"You Won A Car\");\r\n\t\tcase 1: System.out.println(\"You won A watch\");\r\n\t\tbreak;\r\n\t\tdefault: System.out.println(\"no Price\");\r\n\r\n\t}\r\n\t}", "public static void doExercise4() {\n // TODO: Complete Exercise 4 Below\n\n }", "public static void main(String[] args) {\n int i = 22;\n if (i < 20) {\n System.out.println(\"1\");\n } else if (i<25) {\n System.out.println(\"2\");\n } else if (i<30) {\n System.out.println(\"3\");\n } else {\n System.out.println(\"4\");\n }\n }", "public static void main(String[] args) {\n /*~~~~~~~~~~~~~~~~~~~~~||~CHAPTER THREE~||~~~~~~~~~~~~~~~~~~~~~*/\n /*~~~~~~~~~~~~~~~~~~~~~||~~~~By Cosby~~~||~~~~~~~~~~~~~~~~~~~~~*/\n /*~~~~~~~~~~~~~~~~~~~~~||~~~~~~~~~~~~~~~||~~~~~~~~~~~~~~~~~~~~~*/\n\n Scanner scan = new Scanner(System.in);\n\n // exercise 3.2\n int magicnumber1 =(int)(Math.random()*9)+1;\n int magicnumber2 =(int)(Math.random()*9)+1;\n\n\n\n boolean whileKey = false;\n while(!whileKey) {\n System.out.println(\"What is \" + magicnumber1 + \" + \" + magicnumber2 + \"?\");\n int answer = scan.nextInt();\n\n if (answer == magicnumber1 + magicnumber2) {\n System.out.println(\"Wow, you are capable of adding small values\");\n whileKey = true;\n } else {\n System.out.println(\"Wow, you are not capable of adding small values.. try again\");\n }\n }\n\n\n // exercise 3.4\n //Randomly select a month 1-12\n //Print out from switch case\n int month = (int)(Math.random()*11)+1;\n\n switch (month){\n case 1:\n System.out.println(\"January\");\n break;\n case 2:\n System.out.println(\"February\");\n break;\n case 3:\n System.out.println(\"March\");\n break;\n case 4:\n System.out.println(\"April\");\n break;\n case 5:\n System.out.println(\"May\");\n break;\n case 6:\n System.out.println(\"June\");\n break;\n case 7:\n System.out.println(\"July\");\n break;\n case 8:\n System.out.println(\"August\");\n break;\n case 9:\n System.out.println(\"September\");\n break;\n case 10:\n System.out.println(\"October\");\n break;\n case 11:\n System.out.println(\"November\");\n break;\n case 12:\n System.out.println(\"December\");\n break;\n }\n\n // exercise 3.8\n //Sorting numbers scanned from keyboard/user\n\n // Enter three numbers\n System.out.print(\"Input three integers: \");\n int number1 = scan.nextInt();\n int number2 = scan.nextInt();\n int number3 = scan.nextInt();\n\n if (number1 > number2) {\n int temp = number1;\n number1 = number2;\n number2 = temp;\n }\n\n if (number2 > number3) {\n int temp = number2;\n number2 = number3;\n number3 = temp;\n }\n\n if (number1 > number2) {\n int temp = number1;\n number1 = number2;\n number2 = temp;\n }\n\n System.out.println(\"The sorted numbers are \"\n + number1 + \" \" + number2 + \" \" + number3);\n\n // exercise 3.15 (lottery)\n int dig1, dig2, dig3, guess1, guess2, guess3;\n dig1 = (int)(Math.random()*9);\n dig2 = (int)(Math.random()*9);\n dig3 = (int)(Math.random()*9);\n\n System.out.println(\"Input three digits:\");\n guess1 = scan.nextInt();\n guess2 = scan.nextInt();\n guess3 = scan.nextInt();\n\n if(dig1==guess1 && dig2==guess2 && dig3==guess3){\n System.out.println(\"You Matched all three digits in the correct order. \" +\n \"The award is $10,000.\");\n }\n else if((dig1==guess1 || dig1==guess2 || dig1==guess3) && (dig2==guess1 || dig2==guess2 || dig2==guess3) && (dig3==guess1 || dig3==guess2 || dig3==guess3)){\n System.out.println(\"You Matched all three digits\" +\n \"The award is $3,000.\");\n }\n else if(dig1==guess1 || dig1==guess2 || dig1==guess3 || dig2==guess1 || dig2==guess2 || dig2==guess3 || dig3==guess1 || dig3==guess2 || dig3==guess3){\n System.out.println(\"You Matched a digit. \" +\n \"The award is $1,000.\");\n }\n else{\n System.out.println(\"Sorry, you didn't win jack shit :( \");\n }\n\n\n\n }", "public static SwitchExpression switch_(Expression switchValue, Expression defaultBody, Method method, Iterable<SwitchCase> cases) { throw Extensions.todo(); }", "public void Case12(){\n System.out.println(\"Testing Case 12\");\n for(int z=1; z<=7; z++) {\n allProd();\n if(z==1) {\n byName();\n clear();\n }\n else if(z==2){\n byShortName();\n clear();\n }\n else if(z==3){\n byItemCode();\n clear();\n }\n else if(z==4){\n byDescription();\n clear();\n }\n else if(z==5){\n byBrand();\n clear();\n }\n else if(z==6){\n byKeyword();\n clear();\n }\n else if(z==7){\n byPrincipal();\n clear();\n }\n }\n System.out.println(\"Case 12 Done\");\n }", "public static void main(String[] args) {\n\t\n\t\tint day=6 ;\n\t\t\n\t\t\t\tString weekDay;\n\t\t\n\t\t\t\tif ( day==1) {\n\t\t\t\t\tweekDay=\"Monday\";\n\t\t\t\t}else if(day==2) {\n\t\t\t\t\tweekDay=\"Tuesday\";\n\t\t\t\t}else if(day==3) {\n\t\t\t\t\tweekDay=\"Wednesday\";\n\t\t\t\t}else if(day==4) {\n\t\t\t\t\tweekDay=\"Thursday\";\n\t\t\t\t}else if(day==5) {\n\t\t\t\t\tweekDay=\"Friday\";\n\t\t\t\t}else if(day==6) {\n\t\t\t\t\tweekDay=\"Saturday\";\n\t\t\t\t}else if(day==7) {\n\t\t\t\t\tweekDay=\"Sunday\";\n\t\t\t\t}else {\n\t\t\t\t\t\tweekDay=\"invaid\";\n\t\t\t\t\t\n\t\t\t\t\t\t\t\tSystem.out.println(\"weekDay\");\n\t\t\t\t\t}\n\t\t\t\t// switch statement execute one statment from mutiple \n\t\t\t\t//condition a switch works\n\t\t\t\t//with byte, short,char, and string \n\t\t\n\t\t\t\tswitch(day){\n\t\t\t\tcase 1://day==1\n\t\t\t\t\tweekDay=\"Monday\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tweekDay=\"Tuesday\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tweekDay=\"Wedensday\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tweekDay=\"Thursday\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tweekDay=\"Friday\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tweekDay=\"Saturday\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7: \n\t\t\t\t\tweekDay=\"Sunday\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tweekDay=\"invlid\";\n\t\t\t\t\t\n\t\t\tSystem\n\t\t\t.out.println(weekDay);\n\t\t\t\t\t\t\t\n\t\t\t\t\n\t}\n\n}", "public static void example1() {\n // moved to edu.jas.application.Examples\n }", "public static void main(String[] args) {\n byte age=20, myDogAge=4;\n // create a variable 'age' of byte datatype, and stored 20 in it.\n // what is the datatype of age? -> byte\n byte soccerGoal = 8;\n /**\n * short: is a primitive datatype\n * can store only whole numbers, ranging from -32,768 to 32,767\n */\n short noOfDaysInYear = 365; // 20\n // 365 days in an year\n System.out.println(\"365 days in an year\");\n\n System.out.println(\"Hello world\"); // Hello world\n System.out.println(noOfDaysInYear); // 365\n\n System.out.println(noOfDaysInYear + \" days in an year\");\n // 365 days in an year\n // Days in an year is 365, with 52 weeks\n int weeksInYear = 52;\n System.out.println(\"Days in an year is \"+noOfDaysInYear+\", with \"+weeksInYear+\" weeks\");\n\n /**\n * int: is a primitive datatype\n * can store only whole numbers, ranging from -2,147,000,000 to 2,147,000,000\n *\n * In daily routine: we use 'int' to store whole values.\n *\n */\n int usaCovidCasesCount = 100000;\n\n /**\n * long: is a primitive datatype\n * can store only whole numbers, ranging from\n * -9,000,000,000,000,000,000 to 9,000,000,000,000,000,000\n */\n\n long worldPopulation = 99999999999L; // L is an indicator for Java to treat value as long instead int\n // created a variable 'worldPopulation' of long datatype, and stored 99999999999 value\n\n System.out.println(\"Hello Dear\"); // Hello Dear\n System.out.println(age); // 20\n System.out.println(worldPopulation); // 99999999999\n\n\n System.out.println(usaCovidCasesCount);\n\n\n\n worldPopulation = 888888888888L; // replacing the value in existing variable\n\n System.out.println(\"World population is \" + worldPopulation); // 888888888888\n\n\n int population = 100;\n population = 50;\n\n System.out.println(population); // 50\n\n population = 25;\n\n System.out.println(worldPopulation); // 25\n\n System.out.println(noOfDaysInYear); //\n // Casting\n\n\n\n // store dog's age in a variable\n // -128 to 127\n byte dogAge = 4;\n byte dogWeigh = 10;\n short myAge = 22;\n\n System.out.println(\"Hello world\");\n System.out.println(\"Dog age is \" + dogAge + \", weigh is \" + dogWeigh); // Dog age is X, weigh is Y\n System.out.println(myAge); // My age is 22\n\n\n\n\n\n\n\n\n // store no. of floors in the Empire State building\n // 100-110\n // byte (-128 to 127)\n byte floorsCountEmpireState = 105;\n\n // store your cat's age in a variable\n // 0-15\n // byte\n byte catAge = 10;\n\n // store your age in a variable\n // 0 - 150\n // short\n short humanAge = 140;\n\n // store your account balance in a variable\n // float, double\n\n // Store subject grade (A,B,C,D) in a variable.\n // char\n\n // Store your blood group (or name) in a variable\n // String\n\n // Store ssn in a variable\n // int\n\n // Balance: XXXXX.XX\n // sout(\"Balance: \" + balance);\n\n\n System.out.println(\"Sep 14 2020\"); // Sep 14 2020\n System.out.println(\"Text value\"); // Text value\n System.out.println(worldPopulation); // value of 'worldPopulation' variable will be printed out.\n\n // +\n\n // world population is worldPopulation\n System.out.println(\"world population is \" + worldPopulation);\n // world population is 888888888\n\n int amount = 98;\n byte discount = 5;\n\n // Amount is 100, discount is 10\n System.out.println(\"Amount is \" + amount + \", discount is \" + discount);\n // Amount is 100, discount is 10\n\n System.out.println(amount);\n System.out.println(discount);\n\n\n\n int abc = 20; // abc is int-datatypes\n int def = abc; // assign the value inside abc to def\n\n System.out.println(\"DEF = \" + def);\n\n\n\n\n\n\n }", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint i =sc. nextInt();\n\t\tString a = \"\";\n\t\t\n\t\tswitch(i) {\n\t\tcase 1: a = \"one\"; break;\n\t\tcase 2: a = \"two\"; break;\n\t\tcase 3: a = \"three\"; break;\n\t\t\n\t\tdefault : a= \"?\"; break;\n\t\t}\n\t\tSystem.out.println(a);\n\t\t\n\t\t/*\n\t\tif(i == 1) System.out.println(\"one\");\n\t\telse if(i == 2) System.out.println(\"two\");\n\t\telse if(i == 3) System.out.println(\"three\");\n\t\telse System.out.println(\"?\"); */\n\t}", "@Override\n public Expression differentiate(String var) {\n Expression firstLn = new Log(new Var(\"e\"), this.getEx2());\n Expression secondLn = new Log(new Var(\"e\"), this.getEx2());\n Expression denom = new Pow(secondLn, new Num(2));\n Expression div1 = new Div(this.getEx2().differentiate(var), this.getEx2());\n Expression div2 = new Div(this.getEx2().differentiate(var), this.getEx2());\n Expression mult1 = new Mult(div1, secondLn);\n Expression mult2 = new Mult(div2, firstLn);\n Expression numer = new Minus(mult1, mult2);\n Expression difEx = new Div(numer, denom);\n return difEx;\n \n \n \n /*Expression newExp1 = new Div(ex2.differentiate(var), ex2);\n Expression newExp2 = new Div(ex1.differentiate(var), ex1);\n return new Div(newExp1, newExp2).differentiate(var).differentiate(var);\n //return new Div(new Div(ex2.differentiate(var), ex2), new Div(ex1.differentiate(var), ex1));\n ///NEED TO TEST BETTER */\n\n }", "private static void LessonFundamentals() {\n byte myNum1 = 100;\n System.out.println(myNum1);\n short myNum2 = 5000;\n System.out.println(myNum2);\n int myNum3 = 100000;\n System.out.println(myNum3);\n long myNum4 = 15000000000L;\n System.out.println(myNum4);\n float myNum5 = 5.75f;\n System.out.println(myNum5);\n double myNum6 = 19.99d;\n System.out.println(myNum6);\n boolean isJavaFun = true;\n boolean isFishTasty = false;\n System.out.println(isJavaFun);\n System.out.println(isFishTasty);\n char myGrade = 'B';\n System.out.println(myGrade);\n String greeting = \"Hello World\";\n System.out.println(greeting);\n\n //#4\n //Strings are non-primitive data types that are objects\n //Strings can be empty or null while primitive type can not\n //int a = null;\n String b = null;\n\n //#5\n List<String> stringList = new ArrayList<String>();\n stringList.add(\"Hello\");\n stringList.add(\"World\");\n stringList.add(\"Let's do this\");\n\n for(String oneStr : stringList) {\n System.out.println(oneStr);\n }\n\n //List can't have primitive types like int, char, double etc\n //List(int) characters = new ArrayList<int>()\n\n //#6\n //Lottery Variables\n String gameName = \"Powerball\";\n double jackpot = 20000000.00d;\n String drawingDate = \"1/2/2013\";\n List<String> winningNumbers = new ArrayList<String>();\n winningNumbers.add(\"3\");\n winningNumbers.add(\"7\");\n winningNumbers.add(\"13\");\n winningNumbers.add(\"25\");\n winningNumbers.add(\"47\");\n winningNumbers.add(\"13LB\");\n winningNumbers.add(\"5x\");\n\n }", "public static void main(String[] args) {\n byte age = 30;\n long viewsCount = 331_333_333_333L;\n float price = 10.99F;\n char letter = 'A';\n boolean isEligible = true;\n System.out.println(age);\n System.out.println(viewsCount);\n }", "public static void main (String [] args) {\n //default main class\n\n // set variables - input\n int x = 3;\n int y = 4;\n\n// if x is equal to or greater than 4 do this\nif (x >= 4) {\nint newx = x-1; \n if (newx >= 4) { // inner if statement after doing first calculation\n System.out.println(\"x is at least 4\");\n System.out.println(\"x = \" + newx + \" y = \" + y);\n } else {\n System.out.println(\"x is less than 4\");\n System.out.println(\"x = \" + newx + \" y = \" + y);\n }\n}\n\n\n// if x is less than 4 do this\nif (x < 4) {\nint newx = x+1;\n if (newx >= 4) { // inner if statement after doing first calculation\n System.out.println(\"x is at least 4\");\n System.out.println(\"x = \" + newx + \" y = \" + y);\n } else {\n System.out.println(\"x is less than 4\");\n System.out.println(\"x = \" + newx + \" y = \" + y);\n }\n\n } \n\n}", "static void sueldo7diasl(){\nSystem.out.println(\"Ejemplo estructura Condicional Multiple 1 \");\nString descuenta=\"\";\n//datos de entrada xd\nint ganancias= teclado.nextInt();\nif(ganancias<=150){\ndescuenta=\"0.5\";\n}else if (ganancias>150 && ganancias<300){\n descuenta=\"0.7\";}\n else if (ganancias>300 && ganancias<450){\n descuenta=\"0.9\";}\n //datos de salida:xd\n System.out.println(\"se le descuenta : \"+descuenta);\n}", "static void SampleItinerary() {\n\t\tSystem.out.println(\"\\n ***Everyone piles on the boat and goes to Molokai***\");\n\t\tbg.AdultRowToMolokai();\n\t\tbg.ChildRideToMolokai();\n\t\tbg.AdultRideToMolokai();\n\t\tbg.ChildRideToMolokai();\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"What task: \");\r\n\t\tint option = scan.nextInt();\r\n\t\tswitch (option) {\r\n\t\tcase 1:\r\n\t\t\tpositionalNumbers();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tpassword();\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tmean();\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tbase();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tString greeting = \"What up!\";\r\n\t\tString greeting2 = greeting;\r\n\t\tString greeting3 = \"What up?\";\r\n\t\t\r\n\t\tSystem.out.println(\"Test1\");\r\n\t\tSystem.out.println(greeting);\r\n\t\tSystem.out.println(greeting2);\r\n\t\tSystem.out.println(greeting3);\r\n\t\t\r\n\t\tString greeting2v2 = greeting2.toUpperCase();\r\n\t\tString greeting3v2 = greeting3.toUpperCase();\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Test2\");\r\n\t\tSystem.out.println(greeting);\r\n\t\tSystem.out.println(greeting2v2);\r\n\t\tSystem.out.println(greeting3);\r\n\t}", "java.lang.String getHowToUse();", "java.lang.String getHowToUse();", "@Test\n public void testSubsequentCallsToTheSameComponentWithDifferentVariables() throws ParseException\n {\n ExpressionEvaluator evaluator = new ExpressionEvaluator(EXPRESSION_GOOD_PLUS_PERIOD);\n Map<String, Object> map1 = new HashMap<>();\n Map<String, Object> map2 = new HashMap<>();\n map1.put(VARIABLE_PERIOD, MORNING);\n map2.put(VARIABLE_PERIOD, AFTERNOON);\n assertEquals(GOOD_MORNING, evaluator.evaluate(map1));\n assertEquals(GOOD_AFTERNOON, evaluator.evaluate(map2));\n }", "public static void doExercise5() {\n // TODO: Complete Exercise 5 Below\n\n }", "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}" ]
[ "0.594266", "0.55914176", "0.5547432", "0.5535044", "0.5527353", "0.5517876", "0.55115706", "0.5490455", "0.5487901", "0.54708874", "0.546817", "0.54554", "0.54548615", "0.54251534", "0.5410188", "0.54078", "0.54023176", "0.5400412", "0.53969926", "0.5336452", "0.5319386", "0.53157586", "0.5293474", "0.5291804", "0.5289721", "0.5289184", "0.52840555", "0.5277416", "0.52762306", "0.5274731", "0.52672714", "0.525286", "0.52362406", "0.5231992", "0.5224543", "0.52167505", "0.5210978", "0.5202909", "0.5202318", "0.5200357", "0.5200191", "0.51995385", "0.51769125", "0.5173681", "0.5156379", "0.5148792", "0.5148181", "0.51480097", "0.51441836", "0.5131696", "0.5125767", "0.5124965", "0.5122079", "0.51189286", "0.51175517", "0.51147234", "0.511207", "0.51094395", "0.51086485", "0.5105786", "0.5099952", "0.50977194", "0.5095515", "0.50947636", "0.5093756", "0.5075414", "0.50419354", "0.5041462", "0.5040575", "0.50375295", "0.5034146", "0.503249", "0.5025171", "0.50219446", "0.5020244", "0.50147915", "0.5009863", "0.5005347", "0.5001063", "0.49884748", "0.49832395", "0.49813157", "0.49806264", "0.4979666", "0.4977603", "0.49774528", "0.4977081", "0.49752453", "0.49750778", "0.49740523", "0.49735132", "0.4970137", "0.49695122", "0.49644408", "0.4962489", "0.49603504", "0.49584648", "0.49584648", "0.49573424", "0.4956436", "0.4949318" ]
0.0
-1
Creates instance of type
IOperationable create(String operationType);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "Type createType();", "Type createType();", "Type createType();", "Instance createInstance();", "T create();", "T create();", "@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public org.python.types.Type __new__(org.python.types.Type cls);", "public T newInstance();", "static <T> T instantiate(Class<T> type) {\n\n\n try {\n final Constructor<T> constructor = type.getDeclaredConstructor();\n return constructor.newInstance();\n } catch (NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException e) {\n e.printStackTrace();\n }\n\n\n return null;\n }", "void create(T instance) throws IOException;", "<U extends T> U create(String name, Class<U> type) throws InvalidUserDataException;", "public static NewExpression new_(Class type) { throw Extensions.todo(); }", "public void create(){}", "void create(T t);", "@Override\n\tpublic <T> T construct(Class<T> type) {\n\t\treturn injector.getInstance(type);\n\t}", "private Instantiation(){}", "private TypeDb createTypeInstance(long id, String nameEn) {\n TypeDb typeDb = new TypeDb();\n typeDb.setId(id);\n typeDb.setTypeNameEn(nameEn);\n typeDb.setTypeNameRu(new TypeMapper().toRu(nameEn));\n return typeDb;\n }", "private ConfigurationObject createObject(String name, String type) throws Exception {\r\n ConfigurationObject object = new DefaultConfigurationObject(name);\r\n object.setPropertyValue(PROPERTY_TYPE, type);\r\n\r\n return object;\r\n }", "public abstract DataType<T> newInstance();", "InstanceModel createInstanceOfInstanceModel();", "OBJECT createOBJECT();", "DataType createDataType();", "For createFor();", "public <T> T createInstance(final Class<T> type, final String moduleName, final String className,\n\t\t\tfinal Object... args) {\n\n\t\tfinal PyObject importer = getImporter();\n\t\tsetClasspath(importer);\n\n\t\tfinal PyObject instance = createObject(getPythonClass(importer, moduleName, className), args);\n\n\t\t// coerce into java type\n\t\treturn (T) instance.__tojava__(type);\n\t}", "Reproducible newInstance();", "public ODocument create(@Generic(\"T\") final Class<?> type) {\n dbProvider.get();\n return new ODocument(type.getSimpleName());\n }", "TypeDefinition createTypeDefinition();", "Class createClass();", "HxType createType(final String className);", "public Object createNew(String typename, Object... args) \n\t\tthrows \tIllegalAccessException, \n\t\t\tInstantiationException, \n\t\t\tClassNotFoundException,\n\t\t\tNoSuchMethodException,\n\t\t\tInvocationTargetException \n\t{\n\t\tswitch(args.length) \n\t\t{\n\t\tcase 1 : return Class.forName(typename).getConstructor(args[0].getClass()).newInstance(args[0]);\n\t\tcase 2 : return Class.forName(typename).getConstructor(args[0].getClass(), args[1].getClass()).\n\t\t\tnewInstance(args[0], args[1]);\n\t\t}\n\t\treturn null;\n\t}", "public abstract T create(T obj);", "Type() {\n }", "HarvestType createHarvestType();", "public <T extends RefObject> T createObject(Class<T> type) throws CreationException {\n\t\treturn this.<T>createObject(null, type, new Field[] {});\n\t}", "DomainType createDomainType();", "private static final Object newObjectFromString(Class<?> type, String message) {\r\n Constructor<?> constructor;\r\n try {\r\n constructor = type.getDeclaredConstructor(String.class);\r\n constructor.setAccessible(true);\r\n } catch (Exception ex) {\r\n throw new RuntimeException(String.format(MSG_MISSINGCONSTRUCTOR, type.getSimpleName(), ex.getMessage()), ex);\r\n }\r\n try {\r\n return constructor.newInstance(message);\r\n } catch (Exception ex) {\r\n throw new RuntimeException(String.format(MSG_COULDNOTINSTANTIATECLASS, type.getName(), type.getSimpleName()), ex);\r\n }\r\n }", "public abstract void create(T t);", "private Object createInstanceOfType(Class<?> propertyType)\n\t{\n\t\tObject typeInstance = null;\n\t\tif (propertyType.isArray())\n\t\t{\n\t\t\ttypeInstance = createArray(propertyType);\n\t\t}\n\t\telse if (propertyType.isPrimitive())\n\t\t{\n\t\t\ttypeInstance = primitiveTypeFactory.create(propertyType);\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttypeInstance = knownTypeFactory.create(propertyType);\n\t\t}\n\t\treturn typeInstance;\n\t}", "<T> T instanceFor(Class<T> type);", "public CMObject newInstance();", "static Sport newInstance(int type) {\n switch (type) {\n case 0:\n return new Football();\n case 1:\n return new Basketball();\n default:\n return () -> System.out.println(\"Undefined sport.\");\n }\n }", "TypeDef createTypeDef();", "public Type() {\n super();\n }", "public abstract <T> T create(Object object, Class<T> clazz);", "private T createInternalT(Class type) {\n\t\ttry {\n\t\t return (T)(type.newInstance());\n\t\t} catch( Exception e ) {\n\t\t return null;\n\t\t}\n\t}", "public AbstractShape create(ShapeType type) {\n if(type == TrominoType.I) {\n return new TrominoI();\n }\n if(type == TrominoType.J) {\n return new TrominoJ();\n }\n if(type == TrominoType.L) {\n return new TrominoL();\n }\n\n throw new IllegalArgumentException(String.format(\"Unknown how to create shape: %s.\", type.toString()));\n }", "private interface TypeCreator<T> {\n\t\tT createType();\n\t}", "FieldType createFieldType();", "public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t\treturn new Pause();\n\t\t\n\t\treturn null;\n\t\t\n\t}", "StructureType createStructureType();", "public abstract void create();", "public T create()\n {\n IProxyFactory<T> proxyFactory = getProxyFactory(type);\n T result = proxyFactory.createProxy();\n return result;\n }", "WallType createWallType();", "CsticModel createInstanceOfCsticModel();", "public static <T> T buildService(Class<T> type) {\n\n\n return retrofit.create(type);\n }", "ConceptType createConceptType();", "<U extends T> U create(String name, Class<U> type, Action<? super U> configuration) throws InvalidUserDataException;", "@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }", "UniqueType createUniqueType();", "public IntegerGenotype create() \r\n\t{\n\t\tIntegerGenotype genotype = new IntegerGenotype(1,3);\r\n\t\tgenotype.init(new Random(), Data.numeroCuardillas); \r\n\t\t\r\n\t\treturn genotype;\r\n\t}", "NamedType createNamedType();", "TypeInterface createTypeInterface();", "public abstract DataType<T> newInstance(String format);", "protected Object createObject( final String objectName, final String type )\n throws AntException\n {\n try\n {\n final Class clazz = Class.forName( objectName );\n return clazz.newInstance();\n }\n catch( final IllegalAccessException iae )\n {\n throw new AntException( \"Non-public constructor for \" + type + \" \" + objectName, \n iae );\n }\n catch( final InstantiationException ie )\n {\n throw new AntException( \"Error instantiating class for \" + type + \" \" + objectName, \n ie );\n }\n catch( final ClassNotFoundException cnfe )\n {\n throw new AntException( \"Could not find the class for \" + type + \" \" + objectName, \n cnfe );\n }\n }", "ObjectTypeDefinition createObjectTypeDefinition();", "public abstract boolean create(T newInstance);", "PagespeedType createPagespeedType();", "public void create() {\n\t\t\n\t}", "public static VendingMachine create(VendingMachineType type)\n {\n VendingMachine machine = null;\n\n if (type == VendingMachineType.STANDARD) {\n machine = new StandardVendingMachine();\n }\n\n return machine;\n }", "Object create(Object source);", "T crear(T obj);", "CategoryType createCategoryType();", "public static StaticFactoryInsteadOfConstructors type(Object object){\n return new StaticFactoryInsteadOfConstructors();\n }", "@SuppressWarnings(\"unchecked\")\n public T newInstance()\n throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n if (constructor_ == null) {\n constructor_ = getRawClass().getConstructor();\n }\n\n return (T)constructor_.newInstance();\n }", "public Counter create(Type type){\n Counter counter = Counter.builder(CounterPath+\".\"+type.getCounterName()).description(\"\").baseUnit(\"Counter\").register(meterRegistry);\r\n counters.put(type.getName(), counter);\r\n \r\n return counter;\r\n }", "Thing createThing();", "SettingType createSettingType();", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "public <T extends RefObject> T createObject(String mPackage, Class<T> type) throws CreationException {\n\t\treturn this.<T>createObject(mPackage, type, new Field[] {});\n\t}", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "public static <T> T createObject(Class<T> clas) throws InstantiationException {\n return createObject(clas, null); //If there's no arguments then it should be null.\n }", "public static Product createProduct(String type) {\n\n if (type.equals(\"A\")) {\n return new ConctreteProductA();\n }\n\n if (type.equals(\"B\")) {\n return new ConctreteProductB();\n }\n\n throw new UnsupportedOperationException(\"The type: \" + type + \" is incorrect!\");\n }", "@SuppressWarnings(\"rawtypes\")\n public static <T extends Object> T getInstance(Class<T> type, String... args) throws Exception {\n String className = (args.length > 1) ? String.format(args[0], args[1])\n : String.format(args[0], type.getSimpleName());\n Class cls = Class.forName(className);\n return type.cast(cls.newInstance());\n }", "T newInstance(Object... args);", "interface Create {}", "Simple createSimple();", "@Override\n\tpublic void create() {\n\t\t\n\t}", "public T getNewInstance() {\n T value = null;\n Class<T> tClass = (Class<T>) ((ParameterizedType) this.getClass().getGenericSuperclass()).getActualTypeArguments()[0];\n try {\n value = tClass.newInstance();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n return value;\n }", "public Object getNewInstance(String type, String tag) throws XCFException {\n\t\treturn getInstance(type, tag, false);\n\t}", "private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}", "public void create(T e);", "@Override\n\tpublic void create() {\n\n\t}", "DynamicInstance createDynamicInstance();", "public Object createObject() {\n return klass.__call__().__tojava__(interfaceType);\n }", "public static StaticFactoryInsteadOfConstructors newStaticFactoryInsteadOfContructors(Object type){\n return new StaticFactoryInsteadOfConstructors();\n }", "H create(Method method);", "Oracion createOracion();", "public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }", "ActorType createActorType();" ]
[ "0.7848592", "0.7769561", "0.7769561", "0.7769561", "0.7594579", "0.7332879", "0.7332879", "0.71689636", "0.70398194", "0.7019539", "0.683245", "0.68022376", "0.6799475", "0.67868364", "0.675929", "0.67492354", "0.67320824", "0.67063427", "0.6695477", "0.66675", "0.66626", "0.66359776", "0.65931004", "0.65634584", "0.6543326", "0.65361154", "0.65324426", "0.65085554", "0.647973", "0.6473139", "0.64652133", "0.6439004", "0.6438457", "0.6438009", "0.63867736", "0.63822967", "0.63778687", "0.63744015", "0.63672394", "0.63614804", "0.6359219", "0.6358084", "0.6348194", "0.6326699", "0.63213885", "0.6306331", "0.6304889", "0.6302406", "0.62987864", "0.6297439", "0.6294545", "0.62807035", "0.6239805", "0.6226376", "0.6222814", "0.62186384", "0.62184864", "0.61980337", "0.61832076", "0.61803174", "0.61747867", "0.61740804", "0.6168245", "0.61651117", "0.6154144", "0.6147745", "0.6144214", "0.614409", "0.6140756", "0.6136426", "0.613015", "0.6127527", "0.612688", "0.6124967", "0.6120856", "0.6114834", "0.6109501", "0.60972416", "0.6094706", "0.60836715", "0.60803586", "0.60794854", "0.60793245", "0.60619664", "0.605426", "0.60509056", "0.604668", "0.60458505", "0.6043922", "0.6036792", "0.6032412", "0.60281223", "0.6023657", "0.6022644", "0.6021994", "0.6008708", "0.6008548", "0.60072166", "0.5989438", "0.598843", "0.59881127" ]
0.0
-1
Created by yanisbourabaa on 17/02/2017.
public interface ImageClickedListener { void onImageClicked(int position); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\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 public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n public int describeContents() { return 0; }", "public void mo4359a() {\n }", "public Pitonyak_09_02() {\r\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "private void poetries() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void nadar() {\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\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void init() {\n }", "@Override\n void init() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "private TMCourse() {\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "Petunia() {\r\n\t\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo12930a() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void create() {\n\t\t\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "public final void mo91715d() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\n public void init() {}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\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 }", "public void mo6081a() {\n }", "private void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\r\n\tpublic void publierEnchere() {\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 public void initialize() { \n }", "@Override\r\n\tpublic void init() {}", "@Override\n public void initialize() {\n \n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override public int describeContents() { return 0; }", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n public String toString() {\n return \"\";\n }" ]
[ "0.61242384", "0.597112", "0.59578675", "0.57793146", "0.57763064", "0.57763064", "0.5760089", "0.57508016", "0.57455105", "0.5741328", "0.57051426", "0.5700705", "0.56750715", "0.5651326", "0.564479", "0.5610679", "0.5601671", "0.5599212", "0.5563033", "0.555589", "0.55557853", "0.5547546", "0.5544833", "0.5539277", "0.55319095", "0.55281574", "0.5524866", "0.5524866", "0.5524866", "0.5524866", "0.5524866", "0.5524866", "0.55239636", "0.55239636", "0.5520435", "0.54994196", "0.5495927", "0.549369", "0.549312", "0.5481298", "0.54671055", "0.5462179", "0.5455383", "0.544664", "0.54443127", "0.5442096", "0.5442096", "0.54324454", "0.54324454", "0.54324454", "0.54324454", "0.54324454", "0.54256874", "0.54077667", "0.54056764", "0.5404249", "0.5404249", "0.5404249", "0.5404249", "0.5404249", "0.5404249", "0.5404249", "0.54011965", "0.53949183", "0.5380106", "0.5379875", "0.53792816", "0.53761786", "0.5375987", "0.53756946", "0.53727704", "0.5367479", "0.5366755", "0.5363164", "0.535707", "0.53490394", "0.5348868", "0.5348868", "0.5348597", "0.5348472", "0.5346311", "0.5346311", "0.5346311", "0.5343434", "0.5326757", "0.5326757", "0.5326757", "0.5312306", "0.5308186", "0.5306576", "0.53035825", "0.53035825", "0.53035825", "0.5293395", "0.52926135", "0.5291048", "0.5288692", "0.52862877", "0.52856433", "0.5283258", "0.5280292" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
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(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { 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 // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // 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 int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\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\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.7904669", "0.78062934", "0.77666116", "0.7727495", "0.7631956", "0.7622029", "0.75855523", "0.7530999", "0.7488249", "0.74583405", "0.74583405", "0.74391454", "0.742199", "0.7403733", "0.73921114", "0.7387281", "0.73795027", "0.73708874", "0.7363864", "0.7356251", "0.73459506", "0.7342001", "0.73306113", "0.73286015", "0.7326429", "0.73191065", "0.7317039", "0.7313901", "0.73044896", "0.73044896", "0.7301832", "0.7298614", "0.72935665", "0.7286882", "0.72838604", "0.7281134", "0.7279026", "0.7260287", "0.72602856", "0.72602856", "0.72602856", "0.72597146", "0.7250437", "0.7224467", "0.7219954", "0.7217789", "0.7204917", "0.7200529", "0.72004616", "0.71939325", "0.71854734", "0.71783715", "0.7169028", "0.7168044", "0.7154098", "0.715406", "0.7136618", "0.7135388", "0.7135388", "0.71293885", "0.7129296", "0.71248746", "0.71238405", "0.71236056", "0.7122437", "0.71178895", "0.7117577", "0.7117577", "0.7117577", "0.7117577", "0.7117551", "0.7117253", "0.7115515", "0.7112961", "0.7110418", "0.7109445", "0.7106109", "0.710037", "0.7098831", "0.70961183", "0.7094036", "0.7094036", "0.7086734", "0.7083463", "0.7081277", "0.70808643", "0.7073911", "0.70687914", "0.70622855", "0.70609766", "0.7060495", "0.7051786", "0.7037978", "0.7037978", "0.7036548", "0.70358485", "0.70358485", "0.70334274", "0.7031107", "0.70302725", "0.70190936" ]
0.0
-1
Get Product Detail Obtain detailed information on a single product offered openly to the market
@Test public void getProductDetailTest() throws ApiException { String productId = null; ResponseBankingProduct response = api.getProductDetail(productId); // TODO: test validations }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Product getProductDetails(int idproduct) throws DataBaseException;", "public DisplayProductDetails getDisplayProductDetails(final Product product) {\n final DisplayProductDetails productDetails = new DisplayProductDetails();\n if (product != null) {\n // TODO Get product rating details from DB\n \tList<BreadCrumb> breadcrumbList = new LinkedList<BreadCrumb>();\n \t\n \tBreadCrumb breadcrumb1 = new BreadCrumb();\n \tbreadcrumb1.setDisplayText(product.getCategory().getParentCategory().getCategoryName());\n \tbreadcrumb1.setLinkUrl(\"category/\"+product.getCategory().getParentCategory().getCategoryPartNumber());\n \t\n \tBreadCrumb breadcrumb2 = new BreadCrumb();\n \tbreadcrumb2.setDisplayText(product.getCategory().getCategoryName());\n \tbreadcrumb2.setLinkUrl(\"category/\"+product.getCategory().getCategoryPartNumber());\n \t\n \tbreadcrumbList.add(breadcrumb1);\n \tbreadcrumbList.add(breadcrumb2);\n \t\n \tproductDetails.setBreadcrumb(breadcrumbList);\n \tproduct.getCategory().getParentCategory().getCategoryId();\n\n productDetails.setAverageProductRating(new BigDecimal(3));\n productDetails.setProductName(product.getProductName());\n productDetails.setProductId(product.getProductId());\n productDetails.setProductPartNumber(product.getProductPartNumber());\n // If product doesn't have a description use its category description.\n final String productDesc = (product.getProductDescription() != null && !product.getProductDescription().isEmpty()) ? product.getProductDescription()\n : product.getCategory().getDescription();\n productDetails.setProductDescription(productDesc);\n\n // Set the product image and image gallery details\n productDetails.setProductImageGallery(getDisplayProductGallery(product.getProductId()));\n\n // End of setting the product image gallery options .\n\n BigDecimal productPrice = null;\n String currencyCode = null;\n if (product.getProductPrice() != null) {\n productPrice = product.getProductPrice().getPrice();\n currencyCode = product.getProductPrice().getCurrency().getCurrencyCode();\n }\n productDetails.setProductPrice(productPrice);\n productDetails.setProductCurrency(currencyCode);\n // Set the product price options in other currencies .\n final List<ProductPriceOptions> priceOptionsList = getPriceOptionForProduct(product);\n productDetails.setProductPriceOptions(priceOptionsList);\n // End of setting the product price options in other currencies\n\n // Get the product availability info\n final String availability = product.isEnabled() ? ProductAvailability.INSTOCK.getStatusDescription()\n : ProductAvailability.OUTOFSTOCK.getStatusDescription();\n // End of setting the product availability info\n productDetails.setProductAvailablility(availability);\n\n // Get the product specifications\n productDetails.setProductSpecification(getDisplayProductSpecification(product.getProductSpecification()));\n\n }\n return productDetails;\n }", "@Test\n public void getProductDetailTest() throws ApiException {\n String productId = null;\n \n ResponseBankingProductById response = api.getProductDetail( productId );\n response.toString();\n // TODO: test validations\n }", "@RequestMapping(value = \"/products/{productId}\", method = RequestMethod.GET)\n\t public ResponseEntity<ProductData> getProductDetails(@PathVariable int productId){\t\t\t\t\t\n\t ProductData product = productService.getProduct(productId);\n\t return new ResponseEntity<>(product, HttpStatus.OK);\n\t }", "@GetMapping(VERSION + \"/product/{productId}\")\n public ResponseEntity<?> retrieveProductDetails(@PathVariable(\"productId\") String productId) {\n ProductDto productDto = productCompositeService.fetchProductById(productId);\n return ResponseEntity.ok().body(productDto);\n }", "DescribeProductResult describeProduct(DescribeProductRequest describeProductRequest);", "@GET\n\t@Path(\"{id}\") // http://localhost:8080/myretail-services/products/id/16696652\n\t@Produces(MediaType.TEXT_PLAIN)\n\tpublic String getProductInfo(@PathParam(\"id\") String id) throws JSONException {\n\t\t\n\t\tWebTarget target = ClientBuilder.newClient().target(\"http://redsky.target.com/v2/pdp/tcin/\" + id\n\t\t\t\t+ \"?excludes=taxonomy,price,promotion,bulk_ship,rating_and_review_reviews,rating_and_review_statistics,question_answer_statistics/\");\n\t\tResponse response = target.request().get();\n\t\tString pName = response.readEntity(String.class).toString();\n\n\t\tint b = pName.indexOf(\"general_description\") + BEGOFFSET;\n\t\tint e = pName.indexOf(\"}\", b) - 1;\n\n\t\tJSONObject json = new JSONObject();\n\n\t\tjson.put(\"name\", pName.substring(b, e));\n\t\tjson.put(\"id\", Integer.parseInt(id));\n\t\tjson.put(\"current_price\", new JSONObject(productPrice.getProductPrice(id)));\n\t\treturn json.toString();\n\t}", "public String getCartDetailonProductDetailPage()\n\t{\n\t\twaitForVisibility(cartDetailonProductDetailPage);\n\t\treturn cartDetailonProductDetailPage.getText();\n\t}", "public void retrieveProductFromDatabase(){\r\n // retrieve product from the database here\r\n System.out.println(\"Product Retrieved using ID --> \" + this.productId);\r\n \r\n }", "@ApiOperation(value = \"Get details of a Product\", response = ProductDetail.class)\n\t@ApiResponses(value = {\n @ApiResponse(code = 200, message = \"Return the total and a list of products\", response = ProductDetail.class ),\n @ApiResponse(code = 400, message = \"Return a error object\", response = error.class) })\n\t\n\t@GetMapping(path = \"/api/products/{product_id}/details\")\n\tpublic ResponseEntity<Optional<ProductDetail>> getDetailsProduct(\n\t\t\t@PathVariable(name = \"product_id\", required = true) Integer productId) {\n\t\treturn ResponseEntity.ok(productService.getProductDetails(productId));\n\t}", "public java.lang.String getProductInfo () {\n\t\treturn productInfo;\n\t}", "@Override\n\tpublic ProductVO detailProduct(int product_id) {\n\t\treturn null;\n\t}", "@Override\n public void onClick(Product product) {\n Log.i(\"MainActivity\", product.toString());\n Intent detailIntent = new Intent(this, DetailActivity.class);\n detailIntent.putExtra(Constants.Keys.PRODUCT_DETAIL.toString(), product);\n startActivity(detailIntent);\n }", "public ProductDetail getProductDetail(JSONObject jsonObject) {\n if (jsonObject != null) {\n try {\n boolean publishStatus = false, onSaleStatus = false, inStockStatus = false, isReviewAllow = false;\n int id = 0, categoryId = 0, totalSale = 0, totalRating = 0;\n float averageRating = 0, regularPrice = 0, sellPrice = 0;\n String name = null, shortDescription = null, linkAddress = null, categoryName = null, priceHtml = null, type = null, createdDateTime = null,\n modifiedDateTime = null, description = null;\n\n ArrayList<String> imageList = new ArrayList<>();\n ArrayList<Integer> relatedProdIds = new ArrayList<>();\n ArrayList<Category> relatedCategoryList = new ArrayList<>();\n ArrayList<ProductAttribute> attributeList = new ArrayList<>();\n\n if (jsonObject.has(ParserKey.KEY_ID)) {\n id = jsonObject.getInt(ParserKey.KEY_ID);\n }\n if (jsonObject.has(ParserKey.KEY_NAME)) {\n name = jsonObject.getString(ParserKey.KEY_NAME);\n }\n if (jsonObject.has(ParserKey.KEY_SHORT_DESC)) {\n shortDescription = jsonObject.getString(ParserKey.KEY_SHORT_DESC);\n }\n if (jsonObject.has(ParserKey.KEY_IMAGES)) {\n imageList.addAll(getImageList(jsonObject.getJSONArray(ParserKey.KEY_IMAGES)));\n }\n if (jsonObject.has(ParserKey.KEY_LINK_ADDRESS)) {\n linkAddress = jsonObject.getString(ParserKey.KEY_LINK_ADDRESS);\n }\n if (jsonObject.has(ParserKey.KEY_CATEGORIES)) {\n categoryId = getCategoryId(jsonObject.getJSONArray(ParserKey.KEY_CATEGORIES));\n categoryName = getCategoryName(jsonObject.getJSONArray(ParserKey.KEY_CATEGORIES));\n }\n if (jsonObject.has(ParserKey.KEY_RELATED_IDS)) {\n relatedProdIds.addAll(getProductIds(jsonObject.getJSONArray(ParserKey.KEY_RELATED_IDS)));\n }\n if (jsonObject.has(ParserKey.KEY_CATEGORIES)) {\n relatedCategoryList.addAll(getCategories(jsonObject.getJSONArray(ParserKey.KEY_CATEGORIES)));\n }\n if (jsonObject.has(ParserKey.KEY_REGULAR_PRICE)) {\n if (!jsonObject.getString(ParserKey.KEY_REGULAR_PRICE).isEmpty()) {\n regularPrice = Float.parseFloat(jsonObject.getString(ParserKey.KEY_REGULAR_PRICE));\n }\n }\n if (jsonObject.has(ParserKey.KEY_SELL_PRICE)) {\n if (!jsonObject.getString(ParserKey.KEY_SELL_PRICE).isEmpty()) {\n sellPrice = Float.parseFloat(jsonObject.getString(ParserKey.KEY_SELL_PRICE));\n }\n }\n if (jsonObject.has(ParserKey.KEY_TOTAL_SALE)) {\n totalSale = jsonObject.getInt(ParserKey.KEY_TOTAL_SALE);\n }\n if (jsonObject.has(ParserKey.KEY_PRICE_HTML)) {\n priceHtml = jsonObject.getString(ParserKey.KEY_PRICE_HTML);\n }\n if (jsonObject.has(ParserKey.KEY_TYPE)) {\n type = jsonObject.getString(ParserKey.KEY_TYPE);\n }\n if (jsonObject.has(ParserKey.KEY_CREATED_DATE)) {\n createdDateTime = jsonObject.getString(ParserKey.KEY_CREATED_DATE);\n }\n if (jsonObject.has(ParserKey.KEY_MODIFIED_DATE)) {\n modifiedDateTime = jsonObject.getString(ParserKey.KEY_MODIFIED_DATE);\n }\n if (jsonObject.has(ParserKey.KEY_DESCRIPTION)) {\n description = jsonObject.getString(ParserKey.KEY_DESCRIPTION);\n }\n if (jsonObject.has(ParserKey.KEY_TOTAL_RATING)) {\n totalRating = jsonObject.getInt(ParserKey.KEY_TOTAL_RATING);\n }\n if (jsonObject.has(ParserKey.KEY_AVERAGE_RATING)) {\n if (!jsonObject.getString(ParserKey.KEY_AVERAGE_RATING).isEmpty()) {\n averageRating = Float.parseFloat(jsonObject.getString(ParserKey.KEY_AVERAGE_RATING));\n }\n }\n if (jsonObject.has(ParserKey.KEY_PUBLISH_STATUS)) {\n publishStatus = jsonObject.getBoolean(ParserKey.KEY_PUBLISH_STATUS);\n }\n if (jsonObject.has(ParserKey.KEY_ON_SALE)) {\n onSaleStatus = jsonObject.getBoolean(ParserKey.KEY_ON_SALE);\n }\n if (jsonObject.has(ParserKey.KEY_IN_STOCK)) {\n inStockStatus = jsonObject.getBoolean(ParserKey.KEY_IN_STOCK);\n }\n if (jsonObject.has(ParserKey.KEY_REVIEW_ALLOW)) {\n isReviewAllow = jsonObject.getBoolean(ParserKey.KEY_REVIEW_ALLOW);\n }\n if (jsonObject.has(ParserKey.KEY_ATTRIBUTE)) {\n attributeList.addAll(getAttributes(jsonObject.getJSONArray(ParserKey.KEY_ATTRIBUTE)));\n }\n\n return new ProductDetail(id, name, shortDescription, categoryId, categoryName, linkAddress, imageList, relatedProdIds, relatedCategoryList,\n regularPrice, sellPrice, totalSale, priceHtml, type, createdDateTime, modifiedDateTime, description, totalRating,\n averageRating, publishStatus, onSaleStatus, inStockStatus, isReviewAllow, attributeList);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n return null;\n }", "java.lang.String getProductDescription();", "public String getProduct() {\r\n return this.product;\r\n }", "public String getProduct() {\n return this.product;\n }", "public String getProductDescription() {\r\n/* 221 */ return this._productDescription;\r\n/* */ }", "public String getProduct()\n {\n return product;\n }", "Object getProduct();", "void viewProductById(long id);", "ProductCatelogueResponse getProduct(int catelogueId,int productId);", "String getProduct();", "@RequestMapping(\"/product/{productId}\")\n public ProductAggregated getProduct(@PathVariable int productId) {\n\n \tLOG.info(\"Starting the product details call....\");\n\t\t//RX java implementation............\n\t\tProductAggregated pa = getProductDetails(productId);\n\t\tLOG.info(\"End of the product details call....\");\n\n \t\n \treturn pa;\n }", "public String getProduct() {\n return product;\n }", "public String getProduct() {\n return product;\n }", "public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}", "public String PrintProductInformation(int productId)\r\n {\r\n String productInformation = \"\";\r\n Double retail;\r\n boolean productFound = false;\r\n // check if product exists using id\r\n for (int i = 0; i < productArrayList.size(); i++)\r\n {\r\n if (productId == (productArrayList.get(i).getId()))\r\n {\r\n // set the retail price\r\n retail = (productArrayList.get(i).getCost() +\r\n (productArrayList.get(i).getMargin()*productArrayList.get(i).getCost()/100));\r\n // add product details to productInformation string\r\n productInformation += \"Id Name Cost Quantity Retail\\n\";\r\n productInformation += \"----------------------------------------------------\\n\";\r\n productInformation += productArrayList.get(i).getId() + \" \" + productArrayList.get(i).getName()\r\n + \" $\" + productArrayList.get(i).getCost() + \" \" + productArrayList.get(i).getQuantity() + \" $\"\r\n + retail;\r\n break;\r\n } else\r\n {\r\n System.out.println(\"Product not found.\");\r\n }\r\n }\r\n System.out.println(productInformation);\r\n return productInformation;\r\n }", "@Override\n public void openDetail(@NonNull Product product) {\n mMainView.openDetailUi(product);\n }", "@RequestMapping(method = RequestMethod.GET, value = \"/**\", produces = {MediaType.TEXT_HTML_VALUE})\n public String handleProductDetailPage(HttpServletRequest request, HttpServletResponse response) throws ContentProviderException {\n\n // TODO: How to handle variants ??\n\n // Path pattern for product detail pages: /p/[SEO name]/[second id]\n final String requestPath = webRequestContext.getRequestPath().replaceFirst(\"/p\", \"\");\n final String[] pathTokens = requestPath.split(\"/\");\n final String productSeoId;\n final String productId;\n if ( pathTokens.length == 3 ) {\n productSeoId = pathTokens[1];\n productId = pathTokens[2];\n }\n else if ( pathTokens.length == 2 ) {\n productSeoId = null;\n productId = pathTokens[1];\n }\n else {\n throw new PageNotFoundException(\"Invalid product detail URL.\");\n }\n\n //final Category category = fredhopperService.getCategoryByPath(requestPath);\n //final List<FacetParameter> facets = fredhopperService.getFacetParametersFromRequestMap(request.getParameterMap());\n ProductDetailResult detailResult = this.detailService.getDetail(productId);\n\n if ( detailResult != null && detailResult.getProductDetail() != null ) {\n\n request.setAttribute(PRODUCT_ID, productId);\n request.setAttribute(PRODUCT, detailResult.getProductDetail());\n request.setAttribute(RESULT, detailResult);\n request.setAttribute(URL_PREFIX, \"/c\");\n final PageModel templatePage = resolveTemplatePage(request, this.getSearchPath(productSeoId, productId));\n templatePage.setTitle(detailResult.getProductDetail().getName());\n\n final MvcData mvcData = templatePage.getMvcData();\n return this.viewResolver.resolveView(mvcData, \"Page\", request);\n }\n throw new PageNotFoundException(\"Product detail page not found.\");\n }", "public ProductDetails getProductDetails(Long productId) {\n\t\t// TODO Auto-generated method stub\t\t\n\t\t//do http get call\n ResponseEntity<String> productDetails = doRestTemplateCall(ConstantsUtil.BASE_URL+productId+ConstantsUtil.URL_ENDPOINT);\n ProductDetails pdtDetailsResponse = new ProductDetails();\n //To handle redirect from http to https\n HttpHeaders httpHeaders = productDetails.getHeaders();\n HttpStatus statusCode = productDetails.getStatusCode();\n if (statusCode.equals(HttpStatus.MOVED_PERMANENTLY) || statusCode.equals(HttpStatus.FOUND) || statusCode.equals(HttpStatus.SEE_OTHER)) {\n if (httpHeaders.getLocation() != null) {\n \tproductDetails = doRestTemplateCall(httpHeaders.getLocation().toString());\n } else {\n throw new RuntimeException();\n }\n }\n if(null!= productDetails) { //to check if productdetail response is received \n log.info(\"product details found:\"+productDetails.getBody());\n \n JsonNode node;\n ObjectMapper objectMapper = new ObjectMapper();\n try {\n\t\t\tnode = objectMapper.readValue(productDetails.getBody(), JsonNode.class);\n\t\t\tif(!myRetailAppDao.isProductDetailsPresent(productId))\t //check if product data is present in MongoDB\n\t\t\t\tmyRetailAppDao.saveToMongoDB(productDetails.getBody()); // if not, save product data to MongoDB\n\t\t\telse\n\t\t\t\tlog.info(\"Data for prductId \"+productId+\" is already present in DB, skipping insert\");\n\t\t\tJsonNode title = null;\n\t\t\t//get product title from the nested json\n\t\t\ttitle = node.get(ConstantsUtil.PRODUCT).get(ConstantsUtil.ITEM).get(ConstantsUtil.PDT_DESC).get(ConstantsUtil.TITLE);\n\t\t\tlog.info(\"title:\"+title.asText());\n\t\t\t//set the product details response\n\t\t\tpdtDetailsResponse.setName(title.asText());\n\t\t\tpdtDetailsResponse.setId(productId);\n\t\t\tCurrentPrice currentPrice = new CurrentPrice();\n\t\t\tPriceAndCurrency priceAndCurr = myRetailAppDao.getPriceAndCurrency(productId); //get price and currency details\n\t\t\tcurrentPrice.setCurrency_code(CurrencyMap.getCurrencyCode(priceAndCurr.getCurrency()));\n\t\t\tcurrentPrice.setValue(priceAndCurr.getPrice()); \n\t\t\tpdtDetailsResponse.setCurrentPrice(currentPrice);\n\t\t\t\n\t\t\tlog.info(\"pdtDetailsResponse:\"+pdtDetailsResponse.toString());\n\t\t} catch (IOException e) {\n\t\t\tlog.error(\"Error while calling external api for title\",e);\n\t\t}\n }\n \n \treturn pdtDetailsResponse;\n\t}", "public String getfirstVolumeDiscountonProductDetailPage()\n\t{\n\t\twaitForVisibility(firstVolumeDiscountonProductDetailPage);\n\t\treturn firstVolumeDiscountonProductDetailPage.getText();\n\t}", "public void printProduct() {\n System.out.println(\"nom_jeu : \" + name);\n System.out.println(\"price : \" + price);\n System.out.println(\"uniqueID : \" + identifier);\n System.out.println(\"stock : \" + stock);\n System.out.println(\"image : \" + image);\n System.out.println(\"genre : \" + genre);\n System.out.println(\"plateforme : \" + platform);\n System.out.println();\n }", "@RequestMapping(value = Constants.GET_PRODUCT_BY_ID, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity<String> getProductDetails(@PathVariable (Constants.ID) Integer id) {\n try {\n ResponseWrapper result = productService.getProductDetails(id);\n ObjectMapper mapper = new ObjectMapper().configure(SerializationFeature.WRITE_NULL_MAP_VALUES, false);\n mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);\n return new ResponseEntity<>(mapper.writeValueAsString(result), HttpStatus.OK);\n }\n catch (Exception e) {\n logger.error(Constants.EXCEPTION + e);\n return ExceptionHandler.handleException();\n }\n }", "public String productList(ProductDetails p);", "@Test\n\tpublic void getProductDetails() throws Exception {\n\n\t\tMockito.when(productService.getProductInfo(Mockito.anyLong())).thenReturn(mockProduct);\n\n\t\tRequestBuilder requestBuilder = MockMvcRequestBuilders.get(\"/products/\" + productID)\n\t\t\t\t.accept(MediaType.APPLICATION_JSON);\n\n\t\tMvcResult result = mockMvc.perform(requestBuilder).andReturn();\n\n\t\tSystem.out.println(result.getResponse());\n\n\t\tJSONAssert.assertEquals(expected, result.getResponse().getContentAsString(), true);\n\t\tSystem.out.println(\"UnitTestSuccessful\");\n\t}", "public void showAllProducts() {\n try {\n System.out.println(Constants.DECOR+\"ALL PRODUCTS IN STORE\"+Constants.DECOR_END);\n List<Product> products = productService.getProducts();\n System.out.println(Constants.PRODUCT_HEADER);\n for (Product product : products) { \n System.out.println((product.getName()).concat(\"\\t\\t\").concat(product.getDescription()).concat(\"\\t\\t\")\n .concat(String.valueOf(product.getId()))\n .concat(\"\\t\\t\").concat(product.getSKU()).concat(\"\\t\").concat(String.valueOf(product.getPrice()))\n .concat(\"\\t\").concat(String.valueOf(product.getMaxPrice())).concat(\"\\t\")\n .concat(String.valueOf(product.getStatus()))\n .concat(\"\\t\").concat(product.getCreated()).concat(\"\\t\\t\").concat(product.getModified())\n .concat(\"\\t\\t\").concat(String.valueOf(product.getUser().getUserId())));\n }\n } catch (ProductException ex) {\n System.out.println(ex);\n }\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.APDProduct getProduct();", "public String getsecondVolumeDiscountonProductDetailPage()\n\t{\n\t\twaitForVisibility(secondVolumeDiscountonProductDetailPage);\n\t\treturn secondVolumeDiscountonProductDetailPage.getText();\n\t}", "public java.lang.String getProduct() {\n return 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}", "@Override\n\tpublic Product getProduct() {\n\t\treturn product;\n\t}", "TradingProduct getTradingProduct();", "@Override\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }", "public DescribeProductInfoResponse DescribeProductInfo(DescribeProductInfoRequest req) throws TencentCloudSDKException{\n JsonResponseModel<DescribeProductInfoResponse> rsp = null;\n try {\n Type type = new TypeToken<JsonResponseModel<DescribeProductInfoResponse>>() {\n }.getType();\n rsp = gson.fromJson(this.internalRequest(req, \"DescribeProductInfo\"), type);\n } catch (JsonSyntaxException e) {\n throw new TencentCloudSDKException(e.getMessage());\n }\n return rsp.response;\n }", "private Observable<SearchResult> productDetails(Long productId) {\n\n Observable<Product> productObservable =\n retrieveProductFromProductSystem(productId);\n\n Observable<Long> quantityObservable =\n retrieveQuantityFromInventoryService(productId);\n\n return Observable.zip(productObservable,\n quantityObservable, SearchResult::new);\n }", "public ProductInfoType getProductInfo() {\n\t return this.productInfo;\n\t}", "@Override\n\tpublic void showDetails(Manufacturer entity) {\n\n\t}", "public ProductInfo getProductInfo(Element element) {\n ProductInfo productInfo=new ProductInfo();\n Element tmp;\n\n productInfo.setProductId(\n element.attr(\"data-pid\")\n );\n\n tmp=element.select(\"span.score*\").first();\n if(tmp!=null)\n productInfo.setProductScore(\n Double.parseDouble(\n element.select(\"span.score*\").first().text().replace(\",\",\".\")\n )\n );\n else\n productInfo.setProductScore(0);\n\n String urlI=element.select(\"img[data-src]\").first().attr(\"data-src\");\n productInfo.setProductImageUrl(\n urlI\n );\n\n try {\n urlI = urlI.split(\"/\")[5];\n }\n catch (Exception e){\n urlI=null;\n }\n\n if(urlI!=null)\n productInfo.setProductUrl(\n url + \"/\" +urlI\n );\n\n else\n\n productInfo.setProductUrl(\n element.select(\"a[href]\").first().attr(\"href\")\n );\n\n\n productInfo.setProductName(\n element.select(\"div.list-prod-name\").first().text()\n );\n\n productInfo.setProductBottom(\n Double.parseDouble(\n element.select(\"span.price-int\").first().text()+\n element.select(\"span.price-fraction\").first().text().replace(\",\",\".\")\n )\n );\n\n try{\n productInfo.setProductCategory(\n element.select(\".subcat-type-icon\").first().select(\"img\").first().attr(\"alt\")\n );\n }\n catch (Exception e){\n e.printStackTrace();\n productInfo.setProductCategory(\"Brak\");\n }\n\n\n productInfo.setStocks(\n element.select(\".listing-shops-number\").first().text()\n );\n\n return productInfo;\n }", "public String product() {\n return this.product;\n }", "public StringBuffer getSkuDetail() {\n List<CheckoutCommerceItemBean> commerceItems;\n productsInfo.append(\"\");\n if (null != reviewOrderBean) {\n if (null != reviewOrderBean.getComponent()) {\n if (null != reviewOrderBean.getComponent()\n .getPaymentDetails()) {\n if (null != reviewOrderBean.getComponent()\n .getPaymentDetails().getCommerceItems()) {\n commerceItems = reviewOrderBean.getComponent()\n .getPaymentDetails().getCommerceItems();\n for (int i = 0; i < commerceItems.size(); i++) {\n\n productsInfo.append(commerceItems.get(i)\n .getCatalogRefId());\n productsInfo.append(\";\");\n /* sku quantity\n productsInfo.append(commerceItems.get(i)\n .getQuantity());\n productsInfo.append(\";\");*/\n productsInfo.append(String.format(\n \"%.2f\", Double.valueOf(commerceItems.get(i)\n .getAmount())));\n if (i != commerceItems.size() - 1) //avoid adding \"|\" at last product\n productsInfo.append(\"|\");\n\n }\n\n\n }\n }\n }\n }\n return productsInfo;\n }", "x0401.oecdStandardAuditFileTaxPT1.ProductDocument.Product getProduct();", "public Product ProductDetail(int id){\n Product p = new Product();\n connect();\n ResultSet result = null;\n String sql = \"SELECT * FROM productos WHERE id_producto = ?\";\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n ps.setInt(1, id);\n result = ps.executeQuery();\n if(result != null){\n p.setProductId(\"\"+result.getInt(\"id_producto\"));\n p.setProductDescription(result.getString(\"descripcion\"));\n p.setProductPresentation(result.getString(\"presentacion\"));\n p.setProductCuantity(result.getInt(\"cantidad\"));\n p.setProductPrice(result.getFloat(\"precio\"));\n p.setProductProvider(result.getInt(\"proveedor\"));\n }\n connect.close();\n return p;\n }catch(SQLException ex){\n ex.printStackTrace();\n } \n return p;\n }", "public Product getProduct() {\n\t\treturn product;\n\t}", "DescribeProductViewResult describeProductView(DescribeProductViewRequest describeProductViewRequest);", "public String getProductReference() {\n return productReference;\n }", "private JSONObject gatherShopStyleProductInfo(String productId){\n try {\n //provides access to by sending requests through http protocol to other http servers\n HttpClient http = HttpClientBuilder.create().build();\n\n //address to call, port 80 is a default\n //port number 443 for https connection (usually)\n HttpHost host = new HttpHost(\"api.shopstyle.com\", 80, \"http\");\n\n //reference to location we are trying to retrieve data from\n //query here is for information on one specific product\n String productUrl = \"http://api.shopstyle.com/api/v2/products/\" + productId + \"?pid=uid5921-39054839-10\";\n HttpGet getPage = new HttpGet(productUrl);\n\n //execute HTTP request and get HTTP response back\n HttpResponse resp = http.execute(host, getPage);\n\n // Put the JSON to a string object\n String jsonString = EntityUtils.toString(resp.getEntity());\n JSONObject obj = new JSONObject(jsonString);\n\n return obj;\n\n }catch (java.io.IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n public void loadDetailProductData() {\n mDetailPresenter.loadDetailProductData();\n }", "@JsonGetter(\"product_details\")\n public ProductData getProductDetails ( ) { \n return this.productDetails;\n }", "Product getProductById(Integer productId);", "Product getProductById(Integer productId);", "public Product getProductDetails(String barCode) throws RetailException {\n\t\tProduct product = null;\n\t\tProduct clonedProduct = null;\n\t\tif (Objects.isNull(barCode)) {\n\t\t\tlogger.error(\"Product code to be looked up cannot be null..\");\n\t\t\tthrow new RetailException(ErrorCodes.ERR_PRODUCT_INVALID_PRODUCT_CODE_ERROR);\n\t\t}\n\t\tif (Objects.nonNull(productData) && !productData.isEmpty()) {\n\t\t\tproduct = productData.get(barCode);\n\t\t\tif (Objects.nonNull(product)) {\n\t\t\t\tclonedProduct = product.getClonedProduct();\n\t\t\t} else {\n\t\t\t\tthrow new RetailException(ErrorCodes.ERR_PRODUCT_INVALID_PRODUCT_CODE_ERROR);\n\t\t\t}\n\t\t}\n\t\treturn clonedProduct;\n\t}", "@Override\r\n\tpublic List<PayedProduct> getInfoProduct(int zid) {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct WHERE PayedProduct_id =? \";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class),zid);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "CafeProduct getProductById(final Integer productId);", "Product getProductById(Integer productID);", "@RequestMapping(method = RequestMethod.GET, produces = { MediaType.APPLICATION_JSON_UTF8_VALUE })\n\t@ResponseStatus(HttpStatus.OK)\n\tpublic PriceDetail findPriceDetailsByProductId(@PathVariable(\"id\") Long productId) {\n\t\tLOGGER.debug(\"PriceDetailResource.findPriceDetailsByProductId Finding price details by Product Id \" + productId);\n\t\tPriceDetail priceDetail = priceDetailService.findByProductId(productId);\n\t\tif(priceDetail == null){\n\t\t\tthrow new ProductNotFoundException(\"Price for product \" + productId + \" not found.\");\n\t\t}\n\t\treturn priceDetail;\n\t}", "public String getDatabaseProduct();", "public String productListForDetail() {\n return SUCCESS;\n }", "@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}", "@Override\r\n\tprotected String getPath() {\n\t\treturn \"/product/detail.do?param=\";\r\n\t}", "private void getTradeDetail() {\n\t\t\tsendData(\"<get></get>\");\n\t}", "public String getProductId();", "String getTheirProductId();", "@Test\n public void testFindProductShouldCorrect() throws Exception {\n // Mock method\n when(productRepository.findOne(product.getId())).thenReturn(product);\n\n testResponseData(RequestInfo.builder()\n .request(get(PRODUCT_DETAIL_ENDPOINT, product.getId()))\n .token(memberToken)\n .httpStatus(HttpStatus.OK)\n .build());\n }", "@RequestMapping(value = {\"/product_detail/{id}\"}, method = RequestMethod.GET)\n public String viewProductDetail(Model model, @PathVariable(\"id\") long id, HttpServletRequest request) {\n Product product = getProduct(id, request);\n model.addAttribute(\"product\", product);\n return \"product_detail\";\n }", "private void receiveData()\n {\n Intent i = getIntent();\n productSelected = Paper.book().read(Prevalent.currentProductKey);\n vendorID = i.getStringExtra(\"vendorID\");\n if (productSelected != null) {\n\n productName = i.getStringExtra(\"productName\");\n productImage = i.getStringExtra(\"imageUrl\");\n productLongDescription = i.getStringExtra(\"productLongDescription\");\n productCategory = i.getStringExtra(\"productCategory\");\n productPrice = i.getStringExtra(\"productPrice\");\n productSizesSmall = i.getStringExtra(\"productSizesSmall\");\n productSizesMedium = i.getStringExtra(\"productSizesMedium\");\n productSizesLarge = i.getStringExtra(\"productSizesLarge\");\n productSizesXL = i.getStringExtra(\"productSizesXL\");\n productSizesXXL = i.getStringExtra(\"productSizesXXL\");\n productSizesXXXL = i.getStringExtra(\"productSizesXXXL\");\n productQuantity = i.getStringExtra(\"productQuantity\");\n }\n }", "public Product seekProduct(int id) throws Exception {\n\t\treturn this.dao.showOne(id);\r\n\t}", "List<PriceInformation> getPriceForProduct(ProductModel product);", "private Product getProduct(ProductVO product) {\n return Product.builder()\n .id(product.getId())\n .description(product.getDescription())\n .name(product.getName())\n .price(product.getPrice())\n .stock(product.getStock())\n .build();\n }", "public void retrieveProduct(Product product) {\n // Place string values in TextFields.\n productIdField.setPromptText(String.valueOf(product.getId()));\n productNameField.setText(product.getName());\n productInvField.setText(String.valueOf(product.getStock()));\n productPriceField.setText(String.valueOf(product.getPrice()));\n productMaxField.setText(String.valueOf(product.getMax()));\n productMinField.setText(String.valueOf(product.getMin()));\n // load the TableViews after copying necessary values to instance.\n associatedPartsCopyMachine(product);\n this.product.setId(product.getId());\n super.initialize();\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \"Product [id=\" + id + \", code=\" + code + \", name=\" + name + \", brand=\" + brand + \", description=\"\r\n\t\t\t\t+ description + \", unitPrice=\" + unitPrice + \", quantity=\" + quantity + \", active=\" + active\r\n\t\t\t\t+ \", categoryId=\" + categoryId + \", supplierId=\" + supplierId + \", brandId=\" + brandId + \", typeId=\"\r\n\t\t\t\t+ typeId + \", purchases=\" + purchases + \", views=\" + views + \"]\";\r\n\t}", "public Optional<Product> getProduct(String productId);", "public String getProductId() ;", "@SuppressWarnings(\"unchecked\")\n private void fetchProductInformation() {\n // Query the App Store for product information if the user is is allowed\n // to make purchases.\n // Display an alert, otherwise.\n if (SKPaymentQueue.canMakePayments()) {\n // Load the product identifiers fron ProductIds.plist\n String filePath = NSBundle.getMainBundle().findResourcePath(\"ProductIds\", \"plist\");\n NSArray<NSString> productIds = (NSArray<NSString>) NSArray.read(new File(filePath));\n\n StoreManager.getInstance().fetchProductInformationForIds(productIds.asStringList());\n } else {\n // Warn the user that they are not allowed to make purchases.\n alert(\"Warning\", \"Purchases are disabled on this device.\");\n }\n }", "public String getProductName() {\n return productName;\n }", "public String getProductName() {\n return productName;\n }", "public String getProductName() {\n return productName;\n }", "public String getProductID() {\r\n return productID;\r\n }", "public String getProductid() {\n return productid;\n }", "private void displayProductDetails() {\n //loading picture offline\n Picasso.get().load(pImage).networkPolicy(NetworkPolicy.OFFLINE)\n .placeholder(R.drawable.warning).into(productImage, new Callback() {\n @Override\n public void onSuccess() {\n\n }\n\n @Override\n public void onError(Exception e) {\n Picasso.get().load(pImage)\n .placeholder(R.drawable.warning).into(productImage);\n }\n });\n productName.setText(pName);\n productPrize.setText(pPrice);\n\n try{\n if (pCategory.equalsIgnoreCase(\"Bulk Purchase\")){\n quantity.setText(pLimitedQty);\n }\n } catch (Exception ex){\n Log.i(\"error\", ex.getMessage());\n catchErrors.setErrors(ex.getMessage(), dateAndTime.getDate(), dateAndTime.getTime(),\n \"OrderProductActivity\", \"displayProductDetails\");\n }\n }", "Product getProductByID(Long id);", "public ProductModel getProduct()\n\t{\n\t\treturn product;\n\t}", "public String getDetailString()\n {\n short type = this.getType();\n StringBuffer buffer = new StringBuffer(PriceAdjustmentTypes.toString(type));\n switch(type)\n {\n case PriceAdjustmentTypes.SPLIT:\n buffer.append(\": \");\n buffer.append(this.getSplitNumerator()).append(\" for \").append(this.getSplitDenominator());\n break;\n // SYMBOL_CHANGE and MERGER only change the product symbol\n case PriceAdjustmentTypes.SYMBOL_CHANGE:\n case PriceAdjustmentTypes.MERGER:\n buffer.append(\": \");\n String symbol = getNewProductSymbol();\n if (symbol!=null && symbol.length() > 0)\n {\n buffer.append(\"New Symbol: \").append(symbol);\n }\n else\n {\n buffer.append(\"No Symbol Change.\");\n }\n break;\n case PriceAdjustmentTypes.DIVIDEND_CASH:\n buffer.append(\": \");\n buffer.append('$').append(this.getCashDividend().toString());\n break;\n case PriceAdjustmentTypes.DIVIDEND_STOCK:\n buffer.append(\": \");\n buffer.append(this.getStockDividend().toString()).append(\" shares.\");\n break;\n case PriceAdjustmentTypes.DIVIDEND_PERCENT:\n buffer.append(\": \");\n buffer.append(this.getStockDividend().toString()).append('%');\n break;\n case PriceAdjustmentTypes.COMMON_DISTRIBUTION:\n break;\n case PriceAdjustmentTypes.LEAP_ROLLOVER:\n break;\n default:\n break;\n }\n return buffer.toString();\n }", "@RequestMapping(value = \"/admin/account/renew/individual\", method = RequestMethod.GET)\n public String getCurrentIndividualProductInfoView() {\n return \"getCurrentIndividualProductInfo\";\n }", "public String getProductName() {\r\n return productName;\r\n }", "public void getProducts(String eId){\n // invoke getProductsById from ProductDatabse and assign products, productIds and productNames\n products = myDb.getProductsById(eId);\n productIds = new ArrayList<Integer>();\n ArrayList<String> productNames = new ArrayList<String>();\n for(Product product: products){\n productIds.add(Integer.parseInt(product.getProductId()));\n productNames.add(product.getProductName());\n }\n //if products exists in database then its displayed as a list else no products message is displayed\n if(products.size() > 0){\n productsadded.setVisibility(View.VISIBLE);\n noproducts.setVisibility(View.GONE);\n }else{\n productsadded.setVisibility(View.GONE);\n noproducts.setVisibility(View.VISIBLE);\n }\n otherProductAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_expandable_list_item_1, productNames);\n otherProductsList.setAdapter(otherProductAdapter);\n if(productNames.size() > 0){\n //invoked on click of the product\n otherProductsList.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Intent intent = new Intent(OtherEventsProductsActivity.this, PurchaseProductActivity.class);\n intent.putExtra(\"eventId\", eventId);\n intent.putExtra(\"productId\", \"\"+productIds.get(position));\n intent.putExtra(\"status\", \"view\");\n startActivity(intent);\n }\n });\n }\n }", "public T getProduct() {\n return this.product;\n }", "public org.mrk.grpc.catalog.Product getProduct() {\n return product_ == null ? org.mrk.grpc.catalog.Product.getDefaultInstance() : product_;\n }", "public List<Products> getProductsDetails() {\n\t\treturn productsRepo.findAll();\n\t}", "Product getPProducts();" ]
[ "0.7211518", "0.7208076", "0.71213025", "0.69963485", "0.6936376", "0.6909039", "0.68435454", "0.68266785", "0.67547745", "0.67284554", "0.67221326", "0.6717328", "0.670006", "0.66887265", "0.66638", "0.66448414", "0.6638544", "0.6584733", "0.6573761", "0.6551152", "0.6533774", "0.65115577", "0.65036106", "0.6498272", "0.64897555", "0.64897555", "0.64725375", "0.64526445", "0.64463294", "0.64086986", "0.63868344", "0.6379866", "0.6358124", "0.6345889", "0.6331488", "0.6308976", "0.6298962", "0.6285795", "0.6272232", "0.62582093", "0.62563443", "0.6253354", "0.6251955", "0.6248457", "0.6236956", "0.6228259", "0.6223143", "0.6219517", "0.6211738", "0.61959946", "0.6189433", "0.6185167", "0.61817485", "0.61779314", "0.61697316", "0.61688036", "0.61650956", "0.61550653", "0.61531293", "0.61373246", "0.61373246", "0.61361814", "0.6101222", "0.60984623", "0.6089984", "0.60832906", "0.60668087", "0.60611624", "0.60603005", "0.6051509", "0.6049196", "0.6040898", "0.60317844", "0.60313314", "0.6026518", "0.6025824", "0.60228395", "0.602055", "0.60129166", "0.59924364", "0.5988847", "0.5987202", "0.59829414", "0.59773755", "0.5977186", "0.5977186", "0.5977186", "0.59732085", "0.5972884", "0.5969081", "0.59639907", "0.5963923", "0.59614336", "0.5956971", "0.59525806", "0.59459424", "0.59430844", "0.5941481", "0.59397", "0.5928213" ]
0.754872
0
Get Products Obtain a list of products that are currently openly offered to the market
@Test public void listProductsTest() throws ApiException { String effective = null; String updatedSince = null; String brand = null; String productCategory = null; Integer page = null; Integer pageSize = null; ResponseBankingProducts response = api.listProducts(effective, updatedSince, brand, productCategory, page, pageSize); // TODO: test validations }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Product> getProducts();", "public List<Product> getProducts();", "public void showAllProducts() {\n try {\n System.out.println(Constants.DECOR+\"ALL PRODUCTS IN STORE\"+Constants.DECOR_END);\n List<Product> products = productService.getProducts();\n System.out.println(Constants.PRODUCT_HEADER);\n for (Product product : products) { \n System.out.println((product.getName()).concat(\"\\t\\t\").concat(product.getDescription()).concat(\"\\t\\t\")\n .concat(String.valueOf(product.getId()))\n .concat(\"\\t\\t\").concat(product.getSKU()).concat(\"\\t\").concat(String.valueOf(product.getPrice()))\n .concat(\"\\t\").concat(String.valueOf(product.getMaxPrice())).concat(\"\\t\")\n .concat(String.valueOf(product.getStatus()))\n .concat(\"\\t\").concat(product.getCreated()).concat(\"\\t\\t\").concat(product.getModified())\n .concat(\"\\t\\t\").concat(String.valueOf(product.getUser().getUserId())));\n }\n } catch (ProductException ex) {\n System.out.println(ex);\n }\n }", "List<Product> getProductsList();", "List<Product> retrieveProducts();", "public static List<Product> openInventoryDatabase() {\r\n\t\tdbConnect();\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tList<Product> prods = new ArrayList<>();\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\trs = stmt.executeQuery(GET_PRODUCTS_FROM_DB);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tint productCode = rs.getInt(\"product_code\");\r\n\t\t\t\tString productName = rs.getString(\"product_name\");\r\n\t\t\t\tString productUnit = rs.getString(4);\r\n\t\t\t\tString productDescription = rs.getString(5);\r\n\t\t\t\tdouble priceForPurchase = rs.getDouble(6);\r\n\t\t\t\tdouble priceForSales = rs.getDouble(7);\r\n\t\t\t\tint stockQuantity = rs.getInt(8);\r\n\t\t\t\tprods.add(new Product(productCode, productName, productUnit, productDescription, priceForPurchase,\r\n\t\t\t\t\t\tpriceForSales, stockQuantity));\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t\trs.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// dbClose();\r\n\t\treturn prods;\r\n\t}", "Product getPProducts();", "List<Product> getAllProducts();", "List<Product> getAllProducts();", "List<Product> getAllProducts();", "public List<Product> getProducts(ProductRequest request) throws IOException {\n if (request.isSingle()){\n List<Product> products = new ArrayList<>();\n products.add(parseResult(executeRequest(request),Product.class));\n return products;\n } else {\n return parseResults(executeRequest(request), Product.class);\n }\n }", "@GET\n @Path( \"products\" )\n void getProducts( @QueryParam( \"offset\" ) Integer offset,\n @QueryParam( \"limit\" ) Integer limit,\n @QueryParam( \"lightList\" ) boolean lightList,\n @HeaderParam( \"vnd.turnon.cloud.calc-pricing-items\" ) boolean calcPricingItems,\n SuccessCallback<Items<Product>> callback );", "public List<Product> getProductList(){\n List<Product> productList = mongoDbConnector.getProducts();\n return productList;\n }", "public List<ProductDto> getProducts() {\n return tradingSystemFacade.getProducts();\n }", "@GetMapping(\"/getproduct\")\n\t\tpublic List<Product> getAllProduct() {\n\t\t\tlogger.info(\"products displayed\");\n\t\t\treturn productService.getAllProduct();\n\t\t}", "@Override\n\tpublic List<Products> getProducts() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<Products> theQuery = currentSession.createQuery(\"from Products order by id\", Products.class);\n\n\t\t// execute query and get result list\n\t\tList<Products> products = theQuery.getResultList();\n\n\t\t// return the results\n\t\treturn products;\n\n\t}", "public List<Product> getAll() {\n List<Product> list = new ArrayList<>();\n String selectQuery = \"SELECT * FROM \" + PRODUCT_TABLE;\n SQLiteDatabase database = this.getReadableDatabase();\n try (Cursor cursor = database.rawQuery(selectQuery, null)) {\n if (cursor.moveToFirst()) {\n do {\n int id = cursor.getInt(0);\n String name = cursor.getString(1);\n String url = cursor.getString(2);\n double current = cursor.getDouble(3);\n double change = cursor.getDouble(4);\n String date = cursor.getString(5);\n double initial = cursor.getDouble(6);\n Product item = new Product(name, url, current, change, date, initial, id);\n list.add(item);\n }\n while (cursor.moveToNext());\n }\n }\n return list;\n }", "public List<Product> getProducts() {\n\t\treturn productRepository.findAll();\n\t}", "public List<Product> returnProducts() throws FlooringMasteryDaoException {\n\n List<Product> products = dao.loadProductInfo();\n return products;\n\n }", "public List<ProductDto> getProducts() {\n\t\tString url = URL_BASE + \"/list\";\n\n\t\tResponseEntity<List<ProductDto>> responseEntity = restTemplate.exchange(url, HttpMethod.GET, HttpEntity.EMPTY,\n\t\t\t\tnew ParameterizedTypeReference<List<ProductDto>>() {\n\t\t\t\t});\n\t\tList<ProductDto> playerList = responseEntity.getBody();\n\t\treturn playerList;\n\t}", "public List<Product> get() {\r\n return sessionFactory.getCurrentSession()\r\n .createCriteria(Product.class)\r\n .addOrder(Order.asc(\"name\"))\r\n .list();\r\n }", "public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.retail.v2beta.ListProductsResponse> listProducts(\n com.google.cloud.retail.v2beta.ListProductsRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getListProductsMethod(), getCallOptions()), request);\n }", "public List<Products> getProducts() {\n\t\treturn pdao.getProducts();\r\n\t}", "private void get_products_search()\r\n\r\n {\n MakeWebRequest.MakeWebRequest(\"get\", AppConfig.SALES_RETURN_PRODUCT_LIST,\r\n AppConfig.SALES_RETURN_PRODUCT_LIST + \"[\" + Chemist_ID + \",\"+client_id +\"]\", this, true);\r\n\r\n// MakeWebRequest.MakeWebRequest(\"out_array\", AppConfig.SALES_RETURN_PRODUCT_LIST, AppConfig.SALES_RETURN_PRODUCT_LIST,\r\n// null, this, false, j_arr.toString());\r\n //JSONArray jsonArray=new JSONArray();\r\n }", "public List<Product> getProducts() {\n return products;\n }", "public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }", "@Override\n\tpublic List<Product> getProducts() {\n\t\treturn productDao.getProducts();\n\t}", "private List<ProductView> fetchProducts(String developerId) {\n LOG.debug(\"Enter. developerId: {}.\", developerId);\n\n List<Product> products = productService.getByDeveloperId(developerId);\n\n List<ProductView> result = ProductMapper.toView(products);\n\n List<String> productIds = products.stream().map(Product::getId).collect(Collectors.toList());\n\n Map<String, List<ProductDataView>> productDataViews =\n restClient.getProductData(developerId, productIds);\n\n mergeProductData(result, productDataViews);\n\n cacheApplication.cacheProducts(developerId, result);\n\n LOG.trace(\"Product: {}.\", result);\n LOG.debug(\"Exit. product size: {}.\", result.size());\n\n return result;\n }", "@Override\n\tpublic List<ProductInfo> getProducts() {\n\t\treturn shoppercnetproducts;\n\t}", "public List<Product> getFullProductList(){\n\t\t/*\n\t\t * La lista dei prodotti da restituire.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\t\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella PRODOTTO.\n\t\t */\n\t\tStatement productStm = null;\n\t\tResultSet productRs = null;\n\t\t\n\t\ttry{\n\t\t\tproductStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM PRODOTTO;\";\n\t\t\tproductRs = productStm.executeQuery(sql);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tproductList = this.getProductListFromRs(productRs);\n\t\t\tproductStm.close(); // Chiude anche il ResultSet productRs\n\t\t\tConnector.releaseConnection(connection);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"ResultSet issue 2: failed to retrive data from ResultSet.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\treturn productList;\n\t}", "private void fetchProducts() {\n\t\t// Showing progress dialog before making request\n\n\t\tpDialog.setMessage(\"Fetching products...\");\n\n\t\tshowpDialog();\n\n\t\t// Making json object request\n\t\tJsonObjectRequest jsonObjReq = new JsonObjectRequest(Method.GET,\n\t\t\t\tConfig.URL_PRODUCTS, null, new Response.Listener<JSONObject>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onResponse(JSONObject response) {\n\t\t\t\t\t\tLog.d(TAG, response.toString());\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tJSONArray products = response\n\t\t\t\t\t\t\t\t\t.getJSONArray(\"products\");\n\n\t\t\t\t\t\t\t// looping through all product nodes and storing\n\t\t\t\t\t\t\t// them in array list\n\t\t\t\t\t\t\tfor (int i = 0; i < products.length(); i++) {\n\n\t\t\t\t\t\t\t\tJSONObject product = (JSONObject) products\n\t\t\t\t\t\t\t\t\t\t.get(i);\n\n\t\t\t\t\t\t\t\tString id = product.getString(\"id\");\n\t\t\t\t\t\t\t\tString name = product.getString(\"name\");\n\t\t\t\t\t\t\t\tString description = product\n\t\t\t\t\t\t\t\t\t\t.getString(\"description\");\n\t\t\t\t\t\t\t\tString image = product.getString(\"image\");\n\t\t\t\t\t\t\t\tBigDecimal price = new BigDecimal(product\n\t\t\t\t\t\t\t\t\t\t.getString(\"price\"));\n\t\t\t\t\t\t\t\tString sku = product.getString(\"sku\");\n\n\t\t\t\t\t\t\t\tProduct p = new Product(id, name, description,\n\t\t\t\t\t\t\t\t\t\timage, price, sku);\n\n\t\t\t\t\t\t\t\tproductsList.add(p);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// notifying adapter about data changes, so that the\n\t\t\t\t\t\t\t// list renders with new data\n\t\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\"Error: \" + e.getMessage(),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// hiding the progress dialog\n\t\t\t\t\t\thidepDialog();\n\t\t\t\t\t}\n\t\t\t\t}, new Response.ErrorListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onErrorResponse(VolleyError error) {\n\t\t\t\t\t\tVolleyLog.d(TAG, \"Error: \" + error.getMessage());\n\t\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\terror.getMessage(), Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t// hide the progress dialog\n\t\t\t\t\t\thidepDialog();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t// Adding request to request queue\n\t\tAppController.getInstance().addToRequestQueue(jsonObjReq);\n\t}", "@GetMapping(path =\"/products\")\n public ResponseEntity<List<Product>> getProducts() {\n return ResponseEntity.ok(productService.getAll());\n }", "public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}", "public Set<String> getAvailableProducts() {\n\t\treturn availableProducts.keySet();\n\t}", "public com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Products> getOrdersProductss()\n {\n return getOrdersProductss(false,false);\n }", "private void getAllProducts() {\n }", "List<Product> list();", "List<Product> getProducts(Order order);", "@CrossOrigin()\r\n @GetMapping(\"/products/discover\")\r\n Stream<ProductEntity> getDiscoveryProducts() {\n return productRepository\r\n .findAll(PageRequest.of(0, 3, Sort.by(\"numberOfPurchases\").descending()))\r\n .get();\r\n }", "@GetMapping(\"/view-all\")\r\n\tpublic List<ProductDetails> viewAllProducts() {\r\n\r\n\t\treturn productUtil.toProductDetailsList(productService.viewAllProducts());\r\n\t}", "@Override\r\n\tpublic List prodStockseach() {\n\t\treturn adminDAO.seachProdStock();\r\n\t}", "@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}", "@Override\n\t\tpublic List<ProductInfo> getProducts() {\n\t\t\treturn TargetProducts;\n\t\t}", "public com.google.cloud.retail.v2beta.ListProductsResponse listProducts(com.google.cloud.retail.v2beta.ListProductsRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListProductsMethod(), getCallOptions(), request);\n }", "@Override\r\n\tpublic List<Product> getProducts() {\n\t\treturn null;\r\n\t}", "public List<Product> readAll() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<Product> findAllProducts() {\n\t\treturn productRepository.findAllProducts();\r\n\t}", "public List<Product> getProducts() {\n\t\treturn this.products;\n\t}", "List<Product> getAllProducts() throws DataBaseException;", "public ArrayList<Product> getProducts() {\n\t\tArrayList<Product> scannedItems = new ArrayList<>();\n\n\t\tArrayList<Item> currentPurchases = purchaseList.getCurrentPurchases(); \n\n\t\tfor (Item item : currentPurchases) {\n\t\t\tProduct possibleProductToShow = this.getProductFromItem(item);\n\t\t\tif (possibleProductToShow != null) {\n\t\t\t\tscannedItems.add(possibleProductToShow);\n\t\t\t}\n\t\t}\n\n\t\treturn scannedItems;\n\t}", "@Override\r\n\tpublic List<Product> getallProducts() {\n\t\treturn dao.getallProducts();\r\n\t}", "@NonNull\n public List<Product> findAll() {\n return productRepository.findAll();\n }", "List<Product> getAllProducts() throws PersistenceException;", "@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}", "List<Product> getProductPage(int pageNumber, int pageSize);", "public List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\n\t}", "public List<Product> findHot() {\n\t\t\treturn productDao.findHot();\n\t\t}", "public ArrayList<Product> getAllProducts(){\r\n\t\tArrayList<Product> prods = new ArrayList<Product>();\r\n\t\tIterator<Integer> productCodes = inventory.keySet().iterator();\r\n\t\twhile(productCodes.hasNext()) {\r\n\t\t\tint code = productCodes.next();\r\n\t\t\tfor(Product currProduct : Data.productArr) {\r\n\t\t\t\tif(currProduct.getID() == code) {\r\n\t\t\t\t\tprods.add(currProduct);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn prods;\r\n\t}", "public List<Product> getAllProducts() {\n return new ArrayList<Product>(this.products.values());\n }", "public List<Product> getAll() {\n\t\treturn productRepository.findAll();\n\n\t}", "public static ObservableList<Product> getAllProducts() {\n return allProducts;\n }", "public void getProducts(String eId){\n // invoke getProductsById from ProductDatabse and assign products, productIds and productNames\n products = myDb.getProductsById(eId);\n productIds = new ArrayList<Integer>();\n ArrayList<String> productNames = new ArrayList<String>();\n for(Product product: products){\n productIds.add(Integer.parseInt(product.getProductId()));\n productNames.add(product.getProductName());\n }\n //if products exists in database then its displayed as a list else no products message is displayed\n if(products.size() > 0){\n productsadded.setVisibility(View.VISIBLE);\n noproducts.setVisibility(View.GONE);\n }else{\n productsadded.setVisibility(View.GONE);\n noproducts.setVisibility(View.VISIBLE);\n }\n otherProductAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_expandable_list_item_1, productNames);\n otherProductsList.setAdapter(otherProductAdapter);\n if(productNames.size() > 0){\n //invoked on click of the product\n otherProductsList.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Intent intent = new Intent(OtherEventsProductsActivity.this, PurchaseProductActivity.class);\n intent.putExtra(\"eventId\", eventId);\n intent.putExtra(\"productId\", \"\"+productIds.get(position));\n intent.putExtra(\"status\", \"view\");\n startActivity(intent);\n }\n });\n }\n }", "@Override\r\n\tpublic List<DemoProduct> getProducts(String color, Integer howMany) throws Exception {\n\t\tHttpCall.HttpRequest request = new HttpCall.HttpRequest();\r\n\t\trequest.path = QUERY_PRODUCTS_URL;\r\n\t\tMap<String, String> params = new HashMap<>();\r\n\t\tparams.put(\"color\",color);\r\n\t\tparams.put(\"howMany\",howMany.toString());\r\n\t\trequest.params = params;\r\n\t\t\r\n\t\tException error = null;\r\n\t\tString json = null;\r\n\t\tList<DemoProduct> prods = new ArrayList<>();\r\n\t\t\r\n\t\ttry{\r\n\t\t json = get (request);\r\n\t\t prods = gson.fromJson(json, new TypeToken<List<DemoProductImpl>>(){}.getType());\r\n\t\t}catch(Exception e){\r\n\t\t\tif(e instanceof com.google.gson.JsonSyntaxException) {\r\n\t\t\t\terror = (new Gson()).fromJson(json, Exception.class);\r\n\t\t\t} else {\r\n\t\t\t\terror =e;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(prods == null){\r\n\t\t\tif(error == null) error = (new Gson()).fromJson(json, Exception.class);\r\n\t\t\t if(error!=null) throw new Exception(error.getLocalizedMessage());\r\n\t\t}\r\n\r\n\t\treturn prods;\r\n\t}", "public List<Products> getProductsDetails() {\n\t\treturn productsRepo.findAll();\n\t}", "@Override\n\tpublic List<Product> getProducts() {\n\t\treturn null;\n\t}", "public List<productmodel> getproductbyname(String name);", "@Override\n\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}", "private List<Product> extractProducts() {\r\n\t\t//load products from hidden fields\r\n\t\tif (this.getListProduct() != null){\r\n\t\t\tfor(String p : this.getListProduct()){\r\n\t\t\t\tProduct product = new Product();\r\n\t\t\t\tproduct.setId(Long.valueOf(p));\r\n\t\t\t\tthis.products.add(product);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn this.products;\r\n\t}", "@GetMapping(\"/findAllProduct\")\n @ResponseBody\n public ResponseEntity<List<ProductEntity>> findAllProduct() {\n List<ProductEntity> productResponse = productService.viewProduct();\n return new ResponseEntity<>(productResponse, HttpStatus.OK);\n }", "public ArrayList<Product> viewAllProduct() throws ProductException{\r\n\t\t\tArrayList<Product> products=new ArrayList<Product>();\r\n\t\t\tif(ProductRepository.productsList.isEmpty()) {\r\n\t\t\t\tthrow new ProductException(\"there are no products in the store\");\r\n\t\t\t\t\r\n\t\t\t}else {\r\n\t\t\t\r\n\t\t\tproducts.addAll(pDoa.viewProductsDoa());\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\treturn products;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "@CrossOrigin()\r\n @GetMapping(\"/products/all\")\r\n List<ProductEntity> getAllProducts() {\r\n // TODO add error if there are not enough products\r\n return productRepository.findAll();\r\n }", "public List<ProductWithStockItemTO> getProductsWithLowStock(long storeID);", "@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}", "@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}", "@GetMapping(\"/products\")\n\t@HystrixCommand(fallbackMethod = \"getFallBackAllProducts\")\n\tpublic Products getAllProducts(){\n\t\tList<Product> pList=restTemplate.getForObject(\"http://product-service/products\", List.class);\n\t\tProducts p=new Products();\n\t\tp.setProductList(pList);\n\t\treturn p;\n\t}", "public Product[] getConsumerVisibleProducts () {\n return null;\n }", "List<ProductDto> getProducts();", "@Test\n public void listProductsTest() throws ApiException {\n ParamEffective effective = null;\n String updatedSince = null;\n String brand = null;\n ParamProductCategory productCategory = null;\n Integer page = null;\n Integer pageSize = null;\n \n ResponseBankingProductList response = api.listProducts( effective, updatedSince, brand, productCategory, page, pageSize );\n response.toString();\n // TODO: test validations\n }", "public static List<Product> getProductList() {\n\n ArrayList<Product> list = new ArrayList<>();\n\n //Creating Products\n Product product1 = new Product(1, \"Call of Duty 1\");\n Product product2 = new Product(2, \"Call of Duty 2\");\n Product product3 = new Product(3, \"Final Fantasy XVI\");\n Product product4 = new Product(5, \"Final Fantasy X\");\n Product product5 = new Product(6, \"XCOM\");\n Product product6 = new Product(7, \"Borderland 2\");\n Product product7 = new Product(8, \"Red Dead Redemption 2\");\n Product product8 = new Product(9, \"Uncharted: The Lost Legacy\");\n\n //Populating the ArrayList with Product objects\n list.add(product1);\n list.add(product2);\n list.add(product3);\n list.add(product4);\n list.add(product5);\n list.add(product6);\n list.add(product7);\n list.add(product8);\n\n return list;\n }", "public List<Product> getAllProducts()\n {\n SQLiteDatabase db = this.database.getWritableDatabase();\n\n // Creates a comma-separated string of all columns in the shopping list table\n String values = TextUtils.join(\", \", ShoppingListTable.COLUMNS);\n\n // Constructs the SQL query\n String sql = String.format(\"SELECT %s FROM %s\", values, ShoppingListTable.TABLE_NAME);\n\n Cursor query = db.rawQuery(sql, null);\n\n Product product = null;\n List<Product> products = new ArrayList<>();\n\n // Check whether there are any products\n if (query.moveToFirst())\n {\n do\n {\n int tpnb = Integer.parseInt(query.getString(0));\n String name = query.getString(1);\n String description = query.getString(2);\n float cost = Float.parseFloat(query.getString(3));\n float quantity = Float.parseFloat(query.getString(4));\n String superDepartment = query.getString(5);\n String department = query.getString(6);\n String imageURL = query.getString(7);\n Boolean isChecked = query.getString(8).equals(\"1\");\n int amount = Integer.parseInt(query.getString(9));\n int position = Integer.parseInt(query.getString(10));\n\n product = new Product(tpnb, name, description, cost, quantity, superDepartment, department, imageURL);\n\n product.setChecked(isChecked);\n product.setAmount(amount);\n product.setPosition(position);\n\n products.add(product);\n }\n while (query.moveToNext());\n }\n\n return products;\n }", "private void viewProducts(){\n Database manager = new Database(this, \"Market\", null, 1);\n\n SQLiteDatabase market = manager.getWritableDatabase();\n\n Cursor row = market.rawQuery(\"select * from products\", null);\n\n if (row.getCount()>0){\n while(row.moveToNext()){\n listItem.add(row.getString(1));\n listItem.add(row.getString(2));\n listItem.add(row.getString(3));\n listItem.add(row.getString(4));\n }\n adapter = new ArrayAdapter(\n this, android.R.layout.simple_list_item_1, listItem\n );\n productList.setAdapter(adapter);\n } else {\n Toast.makeText(this, \"No hay productos\", Toast.LENGTH_SHORT).show();\n }\n }", "public List<Product> getProductByName() {\n \n List<Product> listProduct= productBean.getProductByName(productName);\n return listProduct;\n }", "public List<ProductDetails> retrieveOffers() throws MISPException {\n\n\t\tlogger.entering(\"retrieveOffers\");\n\n\t\tList<ProductDetails> productsList = null;\n\n\t\ttry {\n\n\t\t\tproductsList = this.offerDetailsMgr.retrieveOffers();\n\n\t\t} catch (DBException exception) {\n\n\t\t\tlogger.error(\n\t\t\t\t\t\"An exception occured while retrieving offer details.\",\n\t\t\t\t\texception);\n\t\t\tthrow new MISPException(exception);\n\t\t}\n\n\t\tlogger.exiting(\"retrieveOffers\", productsList);\n\n\t\treturn productsList;\n\n\t}", "public com.mozu.api.contracts.productadmin.ProductCollection getProducts() throws Exception\r\n\t{\r\n\t\treturn getProducts( null, null, null, null, null, null, null, null);\r\n\t}", "public ObservableList<Product> getProduct(){\n ObservableList<Product> products = FXCollections.observableArrayList();\n products.add(new Product(\"Laptop\", 859.00, 20));\n products.add(new Product(\"Bouncy Ball\", 2.49, 198));\n products.add(new Product(\"Toilet\", 99.00, 74));\n products.add(new Product(\"The Notebook DVD\", 19.99, 12));\n products.add(new Product(\"Corn\", 1.49, 856));\n return products;\n }", "ArrayList<Product> ListOfProducts();", "@GetMapping(produces=\"application/json\" )\n public ResponseEntity<PaginatedResponse> getAllProducts(@RequestParam Map<String, String> requestParams) {\n \n int limit = DEFAULT_LIMIT;\n if (requestParams.containsKey(\"limit\")) {\n limit = Integer.parseInt(requestParams.get(\"limit\"));\n }\n \n int page = FIRST_PAGE;\n if (requestParams.containsKey(\"page\")) {\n page = Integer.parseInt(requestParams.get(\"page\"));\n }\n \n List<Product> products = productDao.findAll(requestParams);\n int numberOfProducts = products.size();\n \n int endValue = (page * limit) + limit;\n if (endValue > numberOfProducts) {\n endValue = numberOfProducts;\n }\n \n LOGGER.debug(\"total: {} page: {} end: {}\", numberOfProducts, page, endValue);\n\n // only provide a page worth of data\n products = products.subList(page * limit, endValue);\n \n // add self links to each product\n products.forEach(p -> {\n p.add(linkTo(methodOn(ProductSearchService.class).getProduct(p.getProductId())).withSelfRel());\n });\n \n return new ResponseEntity<>(new PaginatedResponse(numberOfProducts, requestParams, products, page, limit), HttpStatus.OK);\n }", "public PagingList getProductsList() {\n\t\treturn productsList;\n\t}", "List<transactionsProducts> purchasedProducts();", "@Override\r\n\tpublic List prodAllseach() {\n\t\treturn adminDAO.seachProdAll();\r\n\t}", "@GetMapping(\"/retrieve\")\n public ResponseEntity<List<Product>> getProdAll(final HttpSession session) {\n log.info(session.getId() + \" : Retrieving all products\");\n return ResponseEntity.status(HttpStatus.OK).body(prodService.getAll());\n }", "@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }", "public List<MarketObject<?>> getAvailableProducts(Player customer) {\n\t\tList<MarketObject<?>> available = new ArrayList<>();\n\t\tfor(MarketObject<?> o: products)\n\t\t\tif(o.getSellingPlayer().getPlayerID() != customer.getPlayerID())\n\t\t\t\tavailable.add(o);\n\t\treturn available;\n\t}", "public ObservableList<Product> getAllProducts() {\n return allProducts;\n }", "@Override\r\n\tpublic List<Product> showAll() throws Exception {\n\t\treturn this.dao.showAll();\r\n\t}", "public List<Product> getProductList() {\n\t\treturn productList;\n\t}", "@Override\r\n\tpublic List<Product> findAllProductsWithPage(int startIndex, int pageSize) throws Exception {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}", "@RequestMapping(value =\"/customer/product\", method = RequestMethod.GET)\n public String showAvailableProducts(ModelMap model){\n logger.info(\"*** OrderController - showAvailableProducts ***\");\n List<Product> products = productService.getAllProducts();\n model.put(\"products\",products);\n return \"customer_product_list\";\n }", "@Override\n\tpublic List<ProductDTO> viewAllProducts() throws ProductException {\n\t\tCollection<Product> products = ProductStore.map.values();\n\t\tList<ProductDTO> list = new ArrayList();\n\n\t\tfor (Product product : products) {\n\t\t\tProductDTO product1 = ProductUtil.convertToProductDto(product);\n\t\t\tlist.add(product1);\n\t\t}\n\n\t\treturn list;\n\t}" ]
[ "0.6970214", "0.6970214", "0.6956387", "0.69081855", "0.68880403", "0.68299735", "0.6829683", "0.6711751", "0.6711751", "0.6711751", "0.6680163", "0.66220623", "0.66007346", "0.6563422", "0.6551456", "0.6528926", "0.6504187", "0.64938", "0.64930373", "0.6469466", "0.64690524", "0.64654046", "0.64487267", "0.64427435", "0.64170605", "0.641291", "0.63728064", "0.63583356", "0.63368106", "0.63312846", "0.6330408", "0.6328087", "0.6320365", "0.6308494", "0.6307452", "0.6297456", "0.629006", "0.6287353", "0.62625134", "0.625934", "0.62586373", "0.6252661", "0.6240751", "0.6240256", "0.6235869", "0.6221341", "0.62196785", "0.6218673", "0.6217365", "0.6216625", "0.62094694", "0.6207605", "0.6199223", "0.6197118", "0.61918926", "0.61860013", "0.6185774", "0.6183815", "0.61826205", "0.6181077", "0.6176963", "0.61658156", "0.6151099", "0.6149066", "0.6142431", "0.61420816", "0.61340225", "0.6130677", "0.61275804", "0.6106723", "0.60998327", "0.6093712", "0.6090521", "0.6090521", "0.60902333", "0.6086824", "0.6075686", "0.6074352", "0.6072186", "0.6068667", "0.6066506", "0.6059968", "0.60563606", "0.6048186", "0.60331565", "0.6026015", "0.60254323", "0.60154337", "0.6013249", "0.60088885", "0.60063195", "0.6005329", "0.60018593", "0.5999169", "0.5990569", "0.59813166", "0.5981025", "0.59777325", "0.5973429", "0.59692425" ]
0.6209105
51
Instantiates a new studente.
public Studente(String nome, String cognome, String matricola, String email, Date nascita, int annoIscrizione, CorsoDiStudi corso) { this.nome = nome; this.cognome = cognome; this.matricola = matricola; this.email = email; this.nascita = nascita; this.annoIscrizione = annoIscrizione; this.corso = corso; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Student()\n {\n lname = \"Tantiviramanond\";\n fname = \"Anchalee\";\n grade = 12;\n studentNumber = 2185;\n }", "public Student() {\n \n }", "public Student(){}", "public Student() {\r\n }", "public Student() {\n }", "public Student() {\n }", "public Student() {\n }", "public Student() {\r\n\t\timePrezime = \"Petar Petrovic\";\r\n\t\tfakultet = \"Matematicki\";\r\n\t\tgodina = 1;\r\n\t}", "Student createStudent();", "public Student(){\n firstName = \"\";\n lastName = \"\";\n bootcamp = \"\";\n id = 42;\n grade = 1.0;\n }", "public Student( String name ) {\n sname=name;\n }", "public StudentDemo(){\r\n \r\n \r\n \r\n }", "public Student() \r\n {\r\n studentId = 0;\r\n studentName = \"\";\r\n studentMajor = \"\";\r\n }", "public StudentRecord() {}", "Student(int i, String n) {\n id = i;\n name = n;\n }", "StudenteImpl(String nome, String cognome, Cdl corso, int annoCorso, String matricola) {\n super(nome, cognome);\n initialize(corso, annoCorso, matricola);\n }", "Student4(int i, String n) {\n id = i;\n name = n;\n\n }", "public Student(String requiredStudentName)\n {\n studentName = requiredStudentName;\n }", "public Student(String studentId){\n id = studentId;\n }", "private void addStudent() {\n\t\t\n\t\tString lastName = sLastNameTF.getText();\n\t\tString firstName = sFirstNameTF.getText();\n\t\tString schoolName = sSchoolNameTF.getText();\n\t\tchar[] password = sPasswordPF1.getPassword();\n\t\tString sA1 = sSecurityQ1TF.getText();\n\t\tString sQ1 = (String)sSecurityList1.getSelectedItem();\n\t\tString sA2 = sSecurityQ2TF.getText();\n\t\tString sQ2 = (String)sSecurityList2.getSelectedItem();\n\t\tString grade = (String)sGradeList.getSelectedItem();\n\t\t\n\t\tstudent = new Student(lastName, firstName, schoolName, password, sA1, sQ1, sA2, sQ2, grade);\n\t\t\n\t\t//Add student to database\n\t\t\n\t}", "public Student() {\r\n\t\tScanner in=new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter Student first name: \");\r\n\t\tthis.firstName=in.nextLine();\r\n\t\tSystem.out.print(\"Enter Student last name: \");\r\n\t\tthis.lastName=in.nextLine();\r\n\t\tSystem.out.print(\"1.Infant\\n2.child\\n3.junior\\n4.senior\\nEnter student class level: \");\r\n\t\tthis.gradeYear=in.nextInt();\r\n\t\r\n\t\tsetStudentId();\r\n\t\t\r\n\t\t\r\n\t}", "public Student(String name, String SSN) {\n this.name = name;\n this.SSN = SSN;\n System.out.println(\"Student: \" + name + \", email: \" + generateEmail(name) + \", ID: \" + generateID(SSN));\n }", "Student4(int i, String n, int t) {\n id = i;\n name = n;\n age = t;\n\n }", "public Student(String name) {\n this.name = name;\n }", "public Student()\r\n {\r\n //This is intended to be empty\r\n }", "public Student(String name, String gender, String email){\n this.name = name;\n this.gender = gender;\n this.email = email;\n this.course1 = new Course();\n this.course2 = new Course();\n this.course3 = new Course();\n }", "public Student(String name) {\n\n this.name = name;\n }", "public Student(int studentId) \r\n {\r\n\r\n this.studentId = studentId;\r\n studentName = \"\";\r\n studentMajor = \"\";\r\n }", "public Student() { //Default Constructor\n\t\tthis.roll_no=0;\n\t\tthis.full_name=\"\";\n\t\tthis.grade=\"\";\n\t}", "public Student(String name) { // constructor\n\t\tthis.name = name; \n\t}", "Student(String name){\n this.name = name;\n }", "public TeamStudent() {\r\n\t\t// Default constructor\r\n\t}", "public Student(Person person) {\r\n\t\tsuper(person);\r\n\t}", "public StudentFee() {\n }", "public Student( String name , String address ){//constructor with arguments \r\n \tID_COUNTER++;\r\n \tstudentNum = ID_COUNTER;\r\n getFirstAndLastName( name );\r\n this.address = address ;\r\n loginID = makeLoginID() ;\r\n numCredits = 0;\r\n totalGradePoints = 0;\r\n }", "public Student(String studentID) {\r\n\t\tthis.studentID = studentID;\r\n\t}", "public StudentAthlete() {\n }", "private Student createStudent(Element studentNode) {\n String serialNumber = studentNode.getAttribute(\"serialNumber\");\n Student b = new Student();\n b.setSerialNumber(serialNumber);\n\n b.setName(getTextFromTagName(studentNode, \"name\"));\n b.setGroup(Integer.valueOf(getTextFromTagName(studentNode, \"group\")));\n b.setId(Long.valueOf(getTextFromTagName(studentNode, \"id\")));\n\n return b;\n }", "public Student(){//default constructor \r\n ID_COUNTER++;\r\n studentNum = ID_COUNTER;\r\n firstName = \"\";\r\n lastName = \"\";\r\n address = \"\";\r\n loginID = \"\";\r\n numCredits = 0;\r\n totalGradePoints = 0;\r\n }", "public Student() {\n\t\tthis.firstName = \"no name entered\";\n\t\tthis.lastName = \"no name entered\";\n\t\tthis.wId = \"no WID\";\n\t\tthis.labScore = 0;\n\t\tthis.projScore = 0;\n\t\tthis.examScore = 0;\n\t\tthis.codeLabScore = 0;\n\t\tthis.finalExamScore = 0;\n\t\tthis.scorePercent = 0;\n\t}", "public Student(String nume, int varsta) {\n\t\tthis.nume = nume;\n\t\tthis.varsta = varsta;\n\t}", "public Student insertStudent() {\n\t\tSystem.out.print(\"\\n--- 학생 정보 등록 ---\\n\");\n\t\tSystem.out.print(\"학생 이름 입력 \");\n\t\tString name = sc.next();\n\t\tSystem.out.print(\"학생 나이 입력 \");\n\t\tint age = sc.nextInt();\n\t\tSystem.out.print(\"학생 주소 입력 \");\n\t\tString addr= sc.next();\n\t\tStudent st = new Student(name, age, addr);\n\t\treturn st;\n\t}", "public Student() {\r\n\t\t\r\n\t\t//populating country options\r\n\t\t//can also be done using a properties file\r\n\t\t\r\n\t\t/*\r\n\t\t * countryOptions = new LinkedHashMap<String, String>();\r\n\t\t * \r\n\t\t * countryOptions.put(\"BR\", \"Brazil\"); countryOptions.put(\"IN\", \"India\");\r\n\t\t * countryOptions.put(\"US\", \"United States\"); countryOptions.put(\"CA\",\r\n\t\t * \"Canada\");\r\n\t\t */\r\n\t\t\r\n\t\t\r\n\t}", "public Course()\n\t{\n\t\tstudents = new Student[30];\n\t\tnumStudents = 0;\n\t}", "Student() {\n // Set all to \"undefined\"/0, but assign unique student ID\n this.firstName = \"Undefined\";\n this.lastName = \"Undefined\";\n this.grade = 0;\n\n // Unique student IDs - increment lastStudentID and set it as this student's student ID\n lastStudentID++;\n this.studentID = lastStudentID;\n }", "Student(String name, double cgpa, int token){\n this.name=name;\n this.cgpa=cgpa;\n this.token=token;\n }", "public Student (String first, String last, String id)\r\n\t{\r\n\t\tthis.firstName = first;\r\n\t\tthis.lastName = last;\r\n\t\tthis.studentId = id;\r\n\t}", "public Student(String id, String fname, String lname, String email, String phone, String dob) {\r\n\t\tsuper(fname, lname, email, phone);\r\n\t\t//id++;\r\n\t\tthis.dob = dob;\r\n\t\tmgList = new ModuleGradeList();\r\n\t\tthis.studentId = id;\r\n\t}", "public Student(\n int userId, String firstName, String lastName, String email, String password, int\n schoolId,\n double gpa)\n {\n super(firstName, lastName, email, password, schoolId);\n this.setUserId(userId);\n this.setFirstName(firstName);\n this.setLastName(lastName);\n this.setEmail(email);\n this.setPassword(password);\n this.setSchoolId(schoolId);\n this.setGpa(gpa);\n }", "public Student(String name, String emailAddress, String matriculationNumber) {\n this.name = name;\n this.emailAddress = emailAddress;\n this.matriculationNumber = matriculationNumber;\n }", "public Student(int userId, String firstName, String lastName, String email, String password, int schoolId)\n {\n super(firstName, lastName, email, password, schoolId);\n this.setUserId(userId);\n this.setFirstName(firstName);\n this.setLastName(lastName);\n this.setEmail(email);\n this.setPassword(password);\n this.setSchoolId(schoolId);\n }", "public School() {\r\n }", "public Student(String studentID, String passwordHash, String name, String matricNum, String nationality,\r\n\t\t\tchar gender, ArrayList<String> school, ArrayList<String> courseList, ArrayList<Integer> indexGroupList,\r\n\t\t\tArrayList<String> exemptionCoursesList, ArrayList<String> completedCoursesList,\r\n\t\t\tArrayList<Integer> waitListIDList, Schedule schedule, Calendar startTime, Calendar endTime, String email,\r\n\t\t\tString mobileNum, String notifMode) {\r\n\t\tthis.studentID = studentID;\r\n\t\tthis.passwordHash = passwordHash;\r\n\t\tthis.name = name;\r\n\t\tthis.matricNum = matricNum;\r\n\t\tthis.nationality = nationality;\r\n\t\tthis.gender = gender;\r\n\t\tthis.school = school;\r\n\t\tthis.courseList = courseList;\r\n\t\tthis.indexGroupList = indexGroupList;\r\n\t\tthis.exemptionCoursesList = exemptionCoursesList;\r\n\t\tthis.completedCoursesList = completedCoursesList;\r\n\t\tthis.waitListIDList = waitListIDList;\r\n\t\tthis.schedule = schedule;\r\n\t\tthis.startTime = startTime;\r\n\t\tthis.endTime = endTime;\r\n\t\tthis.email = email;\r\n\t\tthis.mobileNum = mobileNum;\r\n\t\tthis.notifMode = notifMode;\r\n\t}", "public void createStudent(String name, String ID){}", "public Student(String myname, int myid){ \r\n\t\tname = myname;\r\n\t\tid = myid;\r\n\t\tgrades[0]= -1;\r\n\t\tgrades[1]= -1;\r\n\t\tgrades[2]= -1;\r\n\r\n\t// use the static variable from StudentArray Class to keep count of the number of student object\r\n\t\tnumberOfStudents++; \r\n\t}", "public Student(int id) {\n\t\tthis.id = id;\n\t}", "public Professor()\n\t{\n\t\t//stuff\n\t}", "public Student(String name, String gender,String rollNumber,String mobileNumber){\n this.name = name;\n this.gender = gender;\n this.rollNumber = rollNumber;\n this.mobileNumber = mobileNumber;\n }", "Student(String name) {\n\t\tthis.name = name;\n\t\tregisteredCourses = new Course[30];\n\t}", "public Student(String imePrezime, String fakultet, int godina) {\r\n\t\tthis.imePrezime = imePrezime;\r\n\t\tthis.fakultet = fakultet;\r\n\t\tthis.godina = godina;\r\n\t}", "public Student(String id, String fname, String mname, String lname, String email, String phone, String dob) {\r\n\t\tsuper(fname, mname, lname, email, phone);\r\n\t\t//id++;\r\n\t\tthis.dob = dob;\r\n\t\tmgList = new ModuleGradeList();\r\n\t\tthis.studentId = id;\r\n\t}", "public StudentRecord(Student s, Department dep, Degree deg, Term tb, List<Professor> a, List<Professor> c,\r\n List<CourseTaken> ct, List<String> n){\r\n student = s;\r\n department = dep;\r\n degreeSought = deg;\r\n termBegan = tb;\r\n advisors = a;\r\n committee = c;\r\n coursesTaken = ct;\r\n notes = n;\r\n }", "public Student(String firstName, String lastName, String email) {\r\n\t\tthis.firstName = firstName;\r\n\t\tthis.lastName = lastName;\r\n\t\tthis.email = email;\r\n\t}", "public Student(String firstName, String familyName, int identityNumber) {\r\n this.Student = new StudentInfo (firstName, familyName, identityNumber, 120);\r\n }", "public Student() {\n//\t\tname = \"\";\n//\t\tage = 0;\n\t\t\n\t\t\n\t\t//call constructors inside of other constructors\n\t\tthis(999,0);\n\t}", "public Student(int num) {\n//\t\tstuNum = num;\n//\t\tgpa = 0.0;\n\t\tthis(num, 0.0);\n\t}", "public static Student getRandomStudentObject() {\n return new Student(\"Abc\", \"99\", \"10th\");\n }", "public Student(String firstName, String lastName, int age, double gpa, String major, String department, List<Course> courses) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.age = age;\n this.gpa = gpa;\n this.major = major;\n this.department = department;\n this.courses = courses;\n }", "public Student(String nm, int day, int month, int year){\r\n\t\tthis.name = nm;\r\n//\t\tthis.username = createUsername(nm); //creates unique username from Student's name\r\n\r\n\t dateofbirth = LocalDate.of(year, month, day);\r\n\t\tthis.age = getAge();\r\n\t\tStudent.userID = userID++; //ID increments for each new User\r\n\t\t\r\n\t\tthis.username = getUsername();\r\n\t}", "Student(String firstName, String lastName, int grade) {\n // Standard constructor assignments\n this.firstName = firstName;\n this.lastName = lastName;\n this.grade = grade;\n\n // Unique student IDs - increment lastStudentID and set it as this student's student ID\n lastStudentID++;\n this.studentID = lastStudentID;\n }", "public Student(String name, String address, String facNumber) {\r\n super(name, address);\r\n this.facultyNumber = facNumber;\r\n courses = new HashMap<String, Double>();\r\n }", "public StudentCourse() {\n this(\"student_course\", null);\n }", "public Student(String in_name, double in_gpa)\n {\n name = in_name;\n gpa = in_gpa;\n getQuizzes();\n }", "public Student(String myname, int myid , double[] theGradeArray){ \r\n\r\n\t\tname = myname;\r\n\t\tid = myid;\r\n\t\tgrades = theGradeArray;\r\n\t\t\r\n\t// use the static variable from StudentArray Class to keep count of the number of student object\r\n\t\tnumberOfStudents++;\r\n\t}", "public Student(String id, String firstName, String lastName, String email, String username, String password) {\n super(id, firstName, lastName, email, username, password, \"student\");\n }", "public Education() {}", "public Nurse()\r\n {\r\n firstName = \"\";\r\n familyName = \"\";\r\n ID = IDCreator;\r\n\t\t\tIDCreator++;\r\n }", "public Student (String first, String last)\n {\n firstName = first;\n lastName = last;\n testScore1 = 0;\n testScore2 = 0;\n testScore3 = 0;\n }", "public Student(int sem, double gpa, String firstName, String lastName) {\n super(firstName, lastName);\n this.sem = sem;\n this.gpa = gpa;\n }", "public Student(String name, int studentId) {\n this.name = name;\n this.studentId = studentId;\n this.numberOfCredits = 0;\n this.gpa = 0.0;\n }", "public Student(String firstName, String lastName, int grade) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.grade = grade; \n studentNumber = totalStudents++; // the new student's number is equal the total number of students, therefore, each student number will be unique\n }", "public Student(String userName) {\n loggedUser = userName;\n initComponents();\n Toolkit toolKit = getToolkit();\n Dimension size = toolKit.getScreenSize();\n setLocation(size.width/2 - getWidth()/2, size.height/2 - getHeight()/2);\n }", "Schulleiter createSchulleiter();", "public Salle() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public College()\r\n {\r\n students = new ArrayList<Student>();\r\n }", "public StudentChoresAMImpl() {\n }", "public SchoolPerson() {\n }", "public Student(int level, String first, String last, long gnum, String major, \n String degree) {\n // TODO initialize the instance variables\n // Also use the parameter variable \"level\" as follows\n // 1) use its value to initialized the PROGRAM constant\n // 2) create the transcripts array to be of size [50] if is level 0, \n // or to be of size [15] if level is 1. \n // note that level refers to the student type and we use a value of 0 for \n // an undergrad and a value of 1 for a grad\n PROGRAM = level;\n this.first = first;\n this.last = last;\n this.gnum = gnum;\n this.major = major;\n this.degree = degree;\n if (PROGRAM == 0){\n transcripts = new TranscriptEntry[50];\n }\n else{\n transcripts = new TranscriptEntry[15];\n }\n }", "void create(Student entity);", "public Student(String name, String gender, String email, Course course1, \n Course course2, Course course3){\n this.name = name;\n this.gender = gender;\n this.email = email;\n this.course1 = course1;\n this.course2 = course2;\n this.course3 = course3;\n }", "Student(int id, String name, int grade){\r\n\t\tthis.id=id;\r\n\t\tthis.studentName=name;\r\n\t\tthis.studentGrade=grade;\r\n\t\tthis.feesPaid=0;\r\n\t\tthis.feesTotal=30000;\t\r\n\t\t\r\n\t}", "public static void testStudent() {\n Student test = new Student(-1930026144, \"Simon\");\r\n // test the id number\r\n System.out.println(test.getID() == 0);\r\n System.out.println(test.getName() == \"Simon\");\r\n // reset a name\r\n test.setName(\"John\");\r\n // test the new name\r\n System.out.println(test.getName() == \"John\");\r\n // set a grade\r\n test.setGrade('A');\r\n System.out.println(test.getGrade() == 'A');\r\n }", "public CourseRegInstance newInstance(String edma_name, SchoolInfo schoolInfo) throws IOException;", "public StudentInteraction() {\n//\t\tsuper();\n\t\tsfCon = new StudentFunctionalityController();\n\t}", "public Student(String firstName, String lastName, int age, int number) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.age = age;\n this.studentNumber = number;\n this.grades = new int[0];\n }", "student(){\r\n \r\n //constructor\r\n //always same as class name\r\n //we can also have code here\r\n //this will be the first method to be intialised\r\n //can never return a value\r\n number++;// default initialisation\r\n }", "public students(int id, String name, int grade){\n this.id = id;\n this.name = name;\n this.grade = grade;\n /// initializing fees attributes\n feesPaid = 0;\n feesTotal = 30000;\n }", "Klassenstufe createKlassenstufe();", "static void initializeStudentSystem() {\r\n\r\n Course math = new Course(\"1000\", \"Mathematics\", \"College of Science\");\r\n Course computing = new Course(\"1001\", \"Computing\", \"College of Engineering\");\r\n Course english = new Course(\"1002\", \"English\", \"College of Liberal Arts\");\r\n Course history = new Course(\"1003\", \"History\", \"College of Liberal Arts\");\r\n Course biology = new Course(\"1004\", \"Biology\", \"College of Science\");\r\n courses.put(math.getCRN(), math);\r\n courses.put(computing.getCRN(), computing);\r\n courses.put(english.getCRN(), english);\r\n courses.put(history.getCRN(), history);\r\n courses.put(biology.getCRN(), biology);\r\n //\r\n User admin = new User();\r\n admin.setUsername(\"admin\");\r\n admin.setPassword(\"admin\");\r\n admin.setAccountType(4);\r\n accounts.put(admin.getUsername(), admin);\r\n //\r\n Student defaultStudent = new Student();\r\n defaultStudent.setName(\"Jose Cabrera\");\r\n defaultStudent.setUsername(\"John1\");\r\n defaultStudent.setPassword(\"123\");\r\n defaultStudent.setId(\"80539934\");\r\n defaultStudent.setMajor(\"CS\");\r\n defaultStudent.setAccountType(1);\r\n defaultStudent.setGraduationStatus(21);\r\n accounts.put(\"John1\", defaultStudent);\r\n //\r\n Student defaultStudent2 = new Student();\r\n defaultStudent2.setName(\"Raul Hinostroza\");\r\n defaultStudent2.setUsername(\"John2\");\r\n defaultStudent2.setPassword(\"123\");\r\n defaultStudent2.setId(\"805393\");\r\n defaultStudent2.setMajor(\"CS\");\r\n defaultStudent2.setAccountType(1);\r\n accounts.put(\"John2\", defaultStudent2);\r\n //\r\n Student defaultStudent3 = new Student();\r\n defaultStudent3.setName(\"Max Morales\");\r\n defaultStudent3.setUsername(\"John3\");\r\n defaultStudent3.setPassword(\"123\");\r\n defaultStudent3.setId(\"8053923\");\r\n defaultStudent3.setMajor(\"CS\");\r\n defaultStudent3.setAccountType(1);\r\n accounts.put(\"John3\", defaultStudent3);\r\n defaultStudent.addCourses(\"1000\");\r\n defaultStudent2.addCourses(\"1000\");\r\n defaultStudent3.addCourses(\"1000\");\r\n //\r\n Faculty defaultFaculty = new Faculty();\r\n defaultFaculty.setAccountType(2);\r\n defaultFaculty.setName(\"Smith\");\r\n defaultFaculty.setUsername(\"Smith1\");\r\n defaultFaculty.setPassword(\"123\");\r\n accounts.put(defaultFaculty.getUsername(), defaultFaculty);\r\n //\r\n Staff defaultStaff = new Staff();\r\n defaultStaff.setAccountType(3);\r\n defaultStaff.setName(\"Smith\");\r\n defaultStaff.setUsername(\"Smith2\");\r\n defaultStaff.setPassword(\"123\");\r\n accounts.put(defaultStaff.getUsername(), defaultStaff);\r\n }", "public Student(int studentId, String studentName, String studentMajor) \r\n {\r\n\r\n setId(studentId);\r\n setName(studentName);\r\n setMajor(studentMajor);\r\n\r\n }" ]
[ "0.7837541", "0.78234774", "0.7801871", "0.77716357", "0.7721981", "0.7721981", "0.7721981", "0.7641771", "0.7601391", "0.7512748", "0.7409358", "0.7367729", "0.7361514", "0.72569025", "0.7215559", "0.7212593", "0.72083247", "0.71416336", "0.7125912", "0.70466435", "0.70301086", "0.7003898", "0.7001213", "0.69949144", "0.69929415", "0.6983651", "0.6967015", "0.6934567", "0.6931516", "0.6922264", "0.69156814", "0.6871501", "0.68566984", "0.6846735", "0.68355566", "0.6831343", "0.68230623", "0.6811064", "0.68073803", "0.6791994", "0.67762154", "0.6735462", "0.6727272", "0.67115027", "0.6706972", "0.67003345", "0.6682194", "0.66738605", "0.66731125", "0.66679716", "0.6667578", "0.666321", "0.6653075", "0.6647144", "0.6645086", "0.6639198", "0.66272104", "0.6626645", "0.6624859", "0.662307", "0.6617071", "0.65761036", "0.6562315", "0.65599877", "0.65581924", "0.65540123", "0.6553214", "0.6552014", "0.6539518", "0.6535493", "0.6532702", "0.65285707", "0.6526327", "0.6503509", "0.64978963", "0.6494013", "0.6493922", "0.64872676", "0.6470092", "0.646227", "0.64560235", "0.6452663", "0.64485884", "0.6431015", "0.6401813", "0.64003634", "0.63930625", "0.6385767", "0.6385684", "0.638009", "0.6369759", "0.6367985", "0.6352473", "0.6351122", "0.6348166", "0.63477576", "0.6342931", "0.6342254", "0.63318354", "0.6310757" ]
0.65198964
73
Gets the anno iscrizione.
public int getAnnoIscrizione() { return annoIscrizione; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getAnnoCorso() {\r\n return this.annoCorso;\r\n }", "public void setAnnoIscrizione(int annoIscrizione) {\n\t\tthis.annoIscrizione = annoIscrizione;\n\t}", "public Integer getAnnoCorso() {\r\n return this.annoCorso;\r\n }", "public String getIcao() { return Icao; }", "public String getAnnotation();", "Annotation getAnnotation();", "public java.lang.String getIdioma() {\n return idioma;\n }", "public String getAnnotation () {\n return annotation;\n }", "public String getIvaFlag() {\n return (String) getAttributeInternal(IVAFLAG);\n }", "public String getAnnotation() {\n return annotation;\n }", "public int getAnio()\r\n {\r\n return this._anio;\r\n }", "public int getIcon()\n\t{\n\t\treturn getClass().getAnnotation(AccuAction.class).icon();\n\t}", "public String getRagione_sociale() {\r\n return ragione_sociale;\r\n }", "public void setAnnoCorso(Integer annoCorso) {\r\n this.annoCorso = annoCorso;\r\n }", "public String getImie() {\n return this.imie;\n }", "public Annotation getAnnotation() {\n return annotation;\n }", "public String getAnfitrion() {\r\n\t\treturn anfitrion;\r\n\t}", "@Override\n public String getIsimImpi() {\n return mIsimImpi;\n }", "public int getAnio() { return this.anio; }", "public String getattribut() \n\t{\n\t\treturn attribut;\n\t}", "public Impiegato getInfoImpiegato() throws SQLException,AziendaException,ParseException {\n\t\tUserQuery uq = ProxyDB.getIstance();\n\t\treturn uq.getInfoImpiegato(utente.getUsername());\n\t}", "public java.lang.String getReturnedACI() {\n return returnedACI;\n }", "@Override\n public String getAnnotation() {\n return annotation;\n }", "public FSIcon getIcon() {\n return icon;\n }", "public String getApodo(){\n\t\treturn apodo;\n\t}", "public String getImei() {\n return imei;\n }", "public String getImei() {\n return imei;\n }", "public int getAno() {\n\t\t\treturn ano;\n\t\t}", "public AwesomeIcon icon() {\n\t\treturn icon;\n\t}", "public AutorizacionAutoimpresorSRI getAutorizacionAutoimpresorSRI()\r\n/* 120: */ {\r\n/* 121:146 */ return this.autorizacionAutoimpresorSRI;\r\n/* 122: */ }", "public static int getAisId() {\n return aisId;\n }", "public String getNomIcone() {\n\t\treturn nomIcone;\n\t}", "public char getIcon() {\n return this.icon;\n }", "public java.lang.String getCodigo_agencia();", "public String getAccession() {\n return accession;\n }", "public int getAno(){\n return ano;\n }", "public String getAisle() {\n return this.aisle;\n }", "public String annaNimi()\n\t{\n\t\treturn this.nimi;\n\t}", "public int getAnio(){\r\n \r\n \r\n return this.anio;\r\n \r\n }", "public int getNiveauIA() {\n\t\treturn niveauIA;\r\n\t}", "public int getIdAmigo() {\n\t\treturn idAmigo;\n\t}", "public Integer getAxiom(){\n\t\treturn axiom;\n\t}", "public int getNilaiBtn() {\n return nilaiBtn;\n }", "public int getCampoIdentificacao() {\r\n return campoIdentificacao;\r\n }", "public int getPantallaApunta() {\r\n return this.iPantallaApunta;\r\n }", "public String getIcon() {\n return icon;\n }", "public String getIcon() {\n return icon;\n }", "public String getIcon() {\n return icon;\n }", "public String getIcon() {\n return icon;\n }", "public Annotation getAnnotation(long j) {\n return this.annotations.obtainBy(j);\n }", "public JavaAnnotation getAnnotation( String name );", "public String annotation() {\n return this.innerProperties() == null ? null : this.innerProperties().annotation();\n }", "String getISOPref();", "public int getIntentos() {\r\n return intentos;\r\n }", "public Annuaire annuaire() {\n return annuaire;\n }", "public String getIndicate() {\n return indicate;\n }", "public String getIndicative() {\n\t\treturn null;\r\n\t}", "@Override\n public String[] getIsimImpu() {\n return (mIsimImpu != null) ? mIsimImpu.clone() : null;\n }", "@Override\r\n\tpublic String getImei() {\n\t\treturn this.imei;\r\n\t}", "public boolean isIndicadorImpreso()\r\n/* 170: */ {\r\n/* 171:186 */ return this.indicadorImpreso;\r\n/* 172: */ }", "public int getIva() {\n\t\treturn producto.getIva();\n\t}", "public DrawingComponent getAnnotation()\n\t{\n\t\treturn this.annotation;\n\t}", "public String getTranno() {\n return tranno;\n }", "public int getIntelligence() {\n \t\treturn intelligence;\n \t}", "public boolean isAnnotation() {\n return cut.isAnnotation();\n }", "public IIcon method_2681() {\r\n return this.field_2146;\r\n }", "public EntityIcon getIcon() {\r\n return icon;\r\n }", "public Boolean getIcAtivo() {\n\t\treturn icAtivo;\n\t}", "public String getItalics() {\n return italics.getText(); /*FAULT:: return \"y\"; */\n }", "public Idioma getIdiomaOriginal() {\n\t\treturn this.getParrafo().getDocumento().getIdioma();\n\t}", "public PDAnnotation getInReplyTo() throws IOException {\n/* 260 */ COSBase base = getCOSObject().getDictionaryObject(\"IRT\");\n/* 261 */ if (base instanceof COSDictionary)\n/* */ {\n/* 263 */ return PDAnnotation.createAnnotation(base);\n/* */ }\n/* 265 */ return null;\n/* */ }", "public int getIntelligence() {\n return Intelligence;\n }", "public String getAzione() {\n return azione;\n }", "public java.lang.String getIpto() {\n return ipto;\n }", "public Integer getIdInstituicao() {\n\t\treturn idInstituicao;\n\t}", "public int getIconId(){\n return mIconId;\n }", "public String getIMEI() {\n return this.IMEI;\n }", "java.lang.String getAoisId();", "public String getImsi() {\r\n return imsi;\r\n }", "public String getAesthetic() {\n return aesthetic;\n }", "public String getIdentificacao() {\n\t\treturn identificacao;\n\t}", "public String getLOAI()\n {\n return this.LOAI;\n }", "public String getOriginAirportIataCode() {\n return origin.getIataCode();\n }", "@Nullable\n // Safe as we want to provide all getters being public for POJOs\n @SuppressWarnings({\"unused\", \"WeakerAccess\"})\n public final String getIconId() {\n return iconId;\n }", "@Override\n\tpublic long getIconId() {\n\t\treturn _scienceApp.getIconId();\n\t}", "public String getInoId();", "public int getIndice() {\n\t\treturn this.indice;\n\t}", "public static Object getImei() {\n\t\treturn null;\n\t}", "public boolean getAmAI()\n\t{\n\t\tif (myAmAI)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public String getTipoAnexoSRI()\r\n/* 612: */ {\r\n/* 613:676 */ this.tipoAnexoSRI = ParametrosSistema.getTipoAnexoSRI(AppUtil.getOrganizacion().getId());\r\n/* 614:677 */ return this.tipoAnexoSRI;\r\n/* 615: */ }", "public String getInscricaoPossuidor() {\n return inscricaoPossuidor;\n }", "public String getOkulIsmi() {\n\t\t\n\t\t\n\t\treturn okulIsmi;\n\t}", "public java.lang.String getInstrucciones() {\n return instrucciones;\n }", "public String getCampoDeInteresse() {\n return campoDeInteresse;\n }", "public int getAncho() {\n return animacion.getImagen().getIconWidth();\n }", "public int getAtt() {\n\t\treturn att;\n\t}", "public int getIdenti() {\r\n return identi;\r\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"\")\n\n public Integer getNaicsCode() {\n return naicsCode;\n }", "public static IIcon method_2666() {\r\n return class_1192.field_6027.field_2131;\r\n }", "public ListaAttributi getExtra() {\r\n return this.extra;\r\n }" ]
[ "0.6800627", "0.6748485", "0.67475796", "0.65620434", "0.6410081", "0.62299377", "0.6164713", "0.6158304", "0.6071351", "0.6003172", "0.59515077", "0.5942932", "0.59257144", "0.58661693", "0.58657265", "0.5864167", "0.58467084", "0.5842424", "0.5797927", "0.57843685", "0.5780783", "0.57673496", "0.57418424", "0.570536", "0.56613404", "0.5640291", "0.5640291", "0.5640195", "0.5623582", "0.56221294", "0.5571267", "0.5561918", "0.5555377", "0.55442417", "0.55227983", "0.55185527", "0.55158013", "0.55118185", "0.55026907", "0.550197", "0.54976684", "0.5480221", "0.54784954", "0.5476606", "0.5468792", "0.5464719", "0.5464719", "0.5464719", "0.5464719", "0.544874", "0.5442527", "0.54393196", "0.5435499", "0.5430995", "0.54267967", "0.54081005", "0.54074043", "0.5403176", "0.53927374", "0.53883195", "0.5384875", "0.53767", "0.53724974", "0.5370278", "0.53683317", "0.5366822", "0.5356524", "0.53546494", "0.53494793", "0.53457546", "0.53387165", "0.53355145", "0.5333341", "0.53332484", "0.5326077", "0.53170913", "0.53166556", "0.53116065", "0.5304287", "0.530055", "0.5297038", "0.529665", "0.5295381", "0.5294232", "0.52914995", "0.5290629", "0.5282797", "0.52823377", "0.5278945", "0.52752274", "0.5269337", "0.5269082", "0.5263578", "0.5260002", "0.5253495", "0.52507037", "0.524341", "0.52423364", "0.5236632", "0.5236415" ]
0.7870668
0
Sets the anno iscrizione.
public void setAnnoIscrizione(int annoIscrizione) { this.annoIscrizione = annoIscrizione; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAnnoCorso(Integer annoCorso) {\r\n this.annoCorso = annoCorso;\r\n }", "public void setAnnoCorso(int annoCorso) {\r\n int oldAnnoCorso = this.annoCorso;\r\n this.annoCorso = annoCorso;\r\n propertyChangeSupport.firePropertyChange (\"annoCorso\", new Integer (oldAnnoCorso), new Integer (annoCorso));\r\n }", "void setAnnoPubblicazione(String annoPubblicazione);", "public int getAnnoIscrizione() {\n\t\treturn annoIscrizione;\n\t}", "public void setAnio(int anio){\r\n \r\n \r\n this.anio = anio;\r\n \r\n }", "public void setAnio(int anio)\r\n {\r\n this._anio = anio;\r\n this._has_anio = true;\r\n }", "public void setAutorizacionAutoimpresorSRI(AutorizacionAutoimpresorSRI autorizacionAutoimpresorSRI)\r\n/* 125: */ {\r\n/* 126:150 */ this.autorizacionAutoimpresorSRI = autorizacionAutoimpresorSRI;\r\n/* 127: */ }", "public void setAnio(int p) { this.anio = p; }", "public void setIcone(String icone) {\n this.icone = icone;\n }", "public void setIndicadorImpreso(boolean indicadorImpreso)\r\n/* 175: */ {\r\n/* 176:190 */ this.indicadorImpreso = indicadorImpreso;\r\n/* 177: */ }", "public void setAI ( boolean ai ) {\n\t\ttry {\n\t\t\tinvoke ( \"setAI\" , new Class[] { boolean.class } , ai );\n\t\t} catch ( NoSuchMethodException e ) {\n\t\t\thandleOptional ( ).ifPresent ( handle -> EntityReflection.setAI ( handle , ai ) );\n\t\t}\n\t}", "public void setAno( int ano ){\n this.ano = ano;\n }", "public void setIdioma(java.lang.String idioma) {\n this.idioma = idioma;\n }", "public static void setImei(Object imei) {\n\t\t\n\t}", "public void setI(boolean i) {\n\tthis.i = i;\n }", "public void setIdAmigo(int idAmigo) {\n\t\tthis.idAmigo = idAmigo;\n\t}", "public void setAnnoScolasticoId(int annoScolasticoId) {\r\n this.annoScolasticoId = annoScolasticoId;\r\n }", "public String setImie(String i) {\n return this.imie = i;\n }", "private static void setCoor(String text, Annotation anotacion) {\r\n\t\tString[] trozo = text.split(\"\\\\|\");\r\n\r\n\t\tint puntero = -1;\r\n\r\n\t\tif (trozo[0].indexOf(\"subrayado\") > 0) {\r\n\t\t\tanotacion.setTipo(Annotation.SUB);\r\n\t\t} else if (text.indexOf(\"nota\") > 0) {\r\n\t\t\tanotacion.setTipo(Annotation.NOT);\r\n\t\t} else if (trozo[0].indexOf(\"marcador\") > 0) {\r\n\t\t\tanotacion.setTipo(Annotation.MAR);\r\n\t\t}\r\n\r\n\t\tif ((puntero = trozo[0].indexOf(\"página\")) > 0) {\r\n\t\t\tanotacion.setPaginaIni(Integer.parseInt(trozo[0].substring(puntero + 7, trozo[0].length()).trim()));\r\n\t\t}\r\n\r\n\t\tif ((puntero = trozo[1].indexOf(\"posición\")) > 0) {\r\n\t\t\tString[] coor = trozo[1].substring(puntero + 9, trozo[1].length()).trim().split(\"-\");\r\n\t\t\tanotacion.setPosIni(Integer.parseInt(coor[0]));\r\n\t\t\tif (coor.length > 1) {\r\n\t\t\t\tanotacion.setPosFin(Integer.parseInt(coor[1]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString fecha = trozo[trozo.length - 1];\r\n\t\tanotacion.setFecha(getDate(fecha));\r\n\t}", "public static void setInsta(boolean i) {\n insta = i;\n }", "public void setIvaFlag(String value) {\n setAttributeInternal(IVAFLAG, value);\n }", "public void setNomeAluno(String nome, int posicao)\n\t{\n\t\tif( (posicao > numAlunos) || posicao < 0 )\n\t\t{\n\t\t\tSystem.out.printf(\"Posição %d incorreta\", posicao);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgradeNomes[posicao] = nome;\n\t\t}\n\t}", "public void setIcon(FSIcon icon) {\n this.icon = icon;\n }", "public void setIdAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI(int idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI)\r\n/* 85: */ {\r\n/* 86:118 */ this.idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI = idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI;\r\n/* 87: */ }", "public void setIcon(Integer icon) {\n switch (icon) {\n case 0:\n this.icon = Icon.Schutzengel;\n break;\n case 1:\n this.icon = Icon.Person;\n break;\n case 2:\n this.icon = Icon.Institution;\n break;\n case 3:\n this.icon = Icon.Krankenhaus;\n break;\n case 4:\n this.icon = Icon.Polizei;\n break;\n default:\n this.icon = Icon.Feuerwehr;\n break;\n }\n }", "public void setObstaculo(int avenida, int calle);", "@Override\n public void setAiIsOn(boolean aiIsOn)\n {\n this.aiIsOn = aiIsOn;\n }", "public void setTipoDocumento(int tipoDocumento);", "public void setAtt(int att){\r\n this.att = att;\r\n }", "public void setPantallaApunta(int iPantallaApunta) {\r\n this.iPantallaApunta = iPantallaApunta;\r\n }", "@Override\r\n\tpublic void setIzena(String izena) {\n\t\tsuper.setIzena(izena);\r\n\t}", "public void setTipoAnexoSRI(String tipoAnexoSRI)\r\n/* 618: */ {\r\n/* 619:687 */ this.tipoAnexoSRI = tipoAnexoSRI;\r\n/* 620: */ }", "public void setCgg_jur_anticipo(com.besixplus.sii.objects.Cgg_jur_anticipo inCgg_jur_anticipo){\n\t\tthis.myCgg_jur_anticipo = inCgg_jur_anticipo;\n\t}", "public void setAtores(Iterator<IPessoa> atores);", "public void setAI(boolean ai) {\r\n this.ai = ai;\r\n }", "@Override\n\tpublic void setAtoresDoFilme(int idFilme, Iterator<IPessoa> atores) throws SQLException {\n\t\tIFilme filme = this.buscarFilmePorId(idFilme);\n\t\tif(filme!=null)\n\t\t\tfilme.setAtores(atores);\n\t}", "public void setAutorizacion(String autorizacion)\r\n/* 139: */ {\r\n/* 140:236 */ this.autorizacion = autorizacion;\r\n/* 141: */ }", "public void asignarAutomovilPersona(){\r\n persona.setAutomovil(automovil);\r\n }", "public void setCodigo_agencia(java.lang.String newCodigo_agencia);", "public void setIdempresa(String idempresa) {\n\t\tthis.idempresa = idempresa;\n\t}", "public void setIdempresa(String idempresa) {\n\t\tthis.idempresa = idempresa;\n\t}", "public void setIdempresa(String idempresa) {\n\t\tthis.idempresa = idempresa;\n\t}", "public void setIdAutorizacionEmpresaSRI(int idAutorizacionEmpresaSRI)\r\n/* 79: */ {\r\n/* 80:122 */ this.idAutorizacionEmpresaSRI = idAutorizacionEmpresaSRI;\r\n/* 81: */ }", "public abstract void setApellido(java.lang.String newApellido);", "public void setIva(int iva) {\n\t\tproducto.setIva(iva);\n\t}", "public void setNom(String p_onom);", "public Builder setAoisId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n aoisId_ = value;\n onChanged();\n return this;\n }", "public void setIdInstituicao(Integer idInstituicao) {\n\t\tthis.idInstituicao = idInstituicao;\n\t}", "public void setIcAtivo(Boolean icAtivo) {\n\t\tthis.icAtivo = icAtivo;\n\t}", "public void setIdentificacion(String identificacion)\r\n/* 128: */ {\r\n/* 129:233 */ this.identificacion = identificacion;\r\n/* 130: */ }", "public String getIcao() { return Icao; }", "public void setIDEMPRESA(Integer idempresa) {\n\t\tthis.IDEMPRESA = idempresa;\n\t}", "public Integer getAnnoCorso() {\r\n return this.annoCorso;\r\n }", "private void jogarIa() {\n\t\tia = new IA(this.mapa,false);\r\n\t\tia.inicio();\r\n\t\tthis.usouIa = true;\r\n\t\tatualizarBandeirasIa();//ATUALIZA AS BANDEIRAS PARA DEPOIS QUE ELA JOGOU\r\n\t\tatualizarNumeroBombas();//ATUALIZA O NUMERO DE BOMBAS PARA DPS QUE ELA JOGOU\r\n\t\tatualizarTela();\r\n\t\tif(ia.isTaTudoBem() == false)\r\n\t\t\tJOptionPane.showMessageDialog(this, \"IMPOSSIVEL PROSSEGUIR\", \"IMPOSSIVEL ENCONTRAR CASAS CONCLUSIVAS\", JOptionPane.INFORMATION_MESSAGE);\r\n\t}", "@Setteri\n public void asetaLiite(Tiedosto liite){\n this.liite = liite;\n }", "public void setIpto(java.lang.String ipto) {\n this.ipto = ipto;\n }", "public void setIdacesso(int pIdacesso){\n this.idacesso = pIdacesso;\n }", "public void setAttenuator(int[] param) {\n validateAttenuator(param);\n if (param != null) {\n localAttenuatorTracker = true;\n } else {\n localAttenuatorTracker = true;\n }\n this.localAttenuator = param;\n }", "public void setImei(String imei) {\n this.imei = imei == null ? null : imei.trim();\n }", "public void setImei(String imei) {\n this.imei = imei == null ? null : imei.trim();\n }", "private void setTipo(int tipo) {\r\n\t\tthis.tipo = tipo;\r\n\t}", "public void setIndicadorNuevo(boolean indicadorNuevo)\r\n/* 215: */ {\r\n/* 216:222 */ this.indicadorNuevo = indicadorNuevo;\r\n/* 217: */ }", "public void setOcena(int value) {\n this.ocena = value;\n }", "public int getAnnoCorso() {\r\n return this.annoCorso;\r\n }", "public void setId_anneeScolaire(int id_anneeScolaire) {this.id_anneeScolaire = id_anneeScolaire;}", "public void setCodigoImputacion(String p) { this.codigoImputacion = p; }", "void setIndirizzo(String indirizzo);", "public static void setContribuicaoUmidadeEquip(Integer alteracao) {\r\n\t\ttry {\r\n\t\t\tFileWriter fw = new FileWriter(getArqContribuicaoUmidade());\r\n\t\t\tBufferedWriter buffWrite = new BufferedWriter(fw);\r\n\t\t\tbuffWrite.append(alteracao.toString() + String.valueOf('\\n'));\r\n\t\t\tbuffWrite.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public abstract void setAcma_cierre(java.lang.String newAcma_cierre);", "public Cgg_jur_anticipo(\n\t\tcom.besixplus.sii.objects.Cgg_jur_anticipo inCgg_jur_anticipo\n\t){\n\t\tthis.setCgg_jur_anticipo(inCgg_jur_anticipo);\n\t}", "@Override\n\tpublic void setIcon(Drawable icon) {\n\t\t\n\t}", "public void setAncho(Integer ancho) {\r\n this.ancho = ancho;\r\n }", "void setCognome(String cognome);", "public void setActivo(boolean activo)\r\n/* 149: */ {\r\n/* 150:255 */ this.activo = activo;\r\n/* 151: */ }", "public abstract void setCod_tecnico(java.lang.String newCod_tecnico);", "public void setIcon(Image i) {icon = i;}", "public void setNombreCodigoImputacion(String p) { this.nombreCodigoImputacion = p; }", "public void setTipo(String tipo);", "public void setGiro(boolean izda){\n\t\tthis.izquierda = izda;\n\t}", "public void setIncrementoInteligencia(int incrementoInteligencia) {\n\t\tthis.incrementoInteligencia = incrementoInteligencia;\n\t}", "public void setActivo(boolean activo)\r\n/* 115: */ {\r\n/* 116:142 */ this.activo = activo;\r\n/* 117: */ }", "@SuppressLint(\"NewApi\")\n\tvoid changeIcon()\n\t{\n\n\t\tif (CropImage.isExplicitCameraPermissionRequired(this)) {\n\t\t\trequestPermissions(new String[]{Manifest.permission.CAMERA,Manifest.permission.WRITE_EXTERNAL_STORAGE}, CropImage.CAMERA_CAPTURE_PERMISSIONS_REQUEST_CODE);\n\t\t} else {\n\t\t\tCropImage.startPickImageActivity(this);\n\t\t}\n\n\n\t}", "public void setIdAeroporto(String idAeroporto)\n {\n this.idAeroporto = idAeroporto;\n }", "public void setIcon(@DrawableRes final int icon) {\n post(() -> {\n Drawable drawable = ResourcesCompat.getDrawable(getResources(),icon,null);\n int padding = (getWidth() / 2) - (drawable.getIntrinsicWidth() / 2);\n setCompoundDrawablesWithIntrinsicBounds(icon, 0, 0, 0);\n setPadding(padding, 0, 0, 0);\n });\n }", "public void setEtiqueta(String etiqueta)\n/* 32: */ {\n/* 33:48 */ this.etiqueta = etiqueta;\n/* 34: */ }", "public final void mo1245a(int i) {\n this.f1768l.icon = i;\n }", "public abstract void setInChI(String inchi);", "@Override\n public void mudarIcone(String enderecoImg, int botao) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public void setActivo(boolean activo)\r\n/* 178: */ {\r\n/* 179:328 */ this.activo = activo;\r\n/* 180: */ }", "public void annotate(CoreDocument document){\r\n for(int i=0;i<document.tokens().size();i++){\r\n CoreLabel token = document.tokens().get(i);\r\n if(token.word().equals(sch))\r\n token.set(SearchAnnotation.class,i);\r\n }\r\n }", "public void setCodProd(IProduto codigo);", "public void save(IntentionCriminelle ic) {\n em.persist(ic);\n }", "public void setNotifica(Set<Notifica> aNotifica) {\n notifica = aNotifica;\n }", "public void setApellidoMaterno(String apellidoMaterno);", "public void setIdAlumno(int value) {\n this.idAlumno = value;\n }", "private void setIva(IVA iva) throws IvaInvalidoException {\n if (iva == null) {\n throw new IvaInvalidoException(\"El IVA debe ser válido.\");\n }\n this.iva = iva;\n }", "@Override\n\tpublic void atirou() {\n\n\t\t\tatirou=true;\n\t\t\t\n\t\t\n\t}", "public Builder setAois(\n int index, com.example.grpc.SimpleServiceOuterClass.Aois value) {\n if (aoisBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureAoisIsMutable();\n aois_.set(index, value);\n onChanged();\n } else {\n aoisBuilder_.setMessage(index, value);\n }\n return this;\n }", "public void setIdbultoOri(Number value)\n {\n setAttributeInternal(IDBULTOORI, value);\n }", "@Override\n public void setQualifiers(final Annotation[] annos) {\n }" ]
[ "0.6714817", "0.6642442", "0.649625", "0.6248772", "0.6192396", "0.615886", "0.6146311", "0.60488683", "0.5951408", "0.5871296", "0.58463615", "0.58187294", "0.57643837", "0.5641892", "0.5633694", "0.5632202", "0.56052035", "0.5577154", "0.5522052", "0.5517055", "0.54917514", "0.54586756", "0.5447526", "0.5444128", "0.5440347", "0.5439024", "0.54273176", "0.54018754", "0.5366635", "0.5361177", "0.535948", "0.5358775", "0.53495896", "0.5335737", "0.52984107", "0.5291346", "0.5281317", "0.52796984", "0.52729726", "0.5269297", "0.5269297", "0.5269297", "0.52581143", "0.5251215", "0.52501875", "0.5226086", "0.5223576", "0.52221274", "0.52199495", "0.52187014", "0.5201081", "0.5198416", "0.5194501", "0.51868933", "0.5182385", "0.51743233", "0.5168826", "0.51626295", "0.5161909", "0.5161909", "0.5149871", "0.51477754", "0.51446295", "0.5144273", "0.51378495", "0.51200575", "0.5112725", "0.50982916", "0.50982046", "0.5065469", "0.5064517", "0.50600594", "0.5058895", "0.5055605", "0.5052143", "0.5048708", "0.5036519", "0.5036312", "0.5035951", "0.5035194", "0.50336015", "0.50300795", "0.5028479", "0.5026551", "0.50133955", "0.50131184", "0.5012891", "0.50044364", "0.50035286", "0.5000029", "0.49997315", "0.49934873", "0.4989912", "0.49894485", "0.4988832", "0.49861297", "0.49859568", "0.49795485", "0.49793163", "0.4977522" ]
0.8037769
0
Reads from the stream.
public int read() throws IOException { if ( position == this.buffer.length() ) { return -1; } return this.buffer.charAt( this.position++ ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void read(InStream inStream) {\n\t}", "@Override\n public int read() throws IOException {\n if (stream.available() > 0) {\n return stream.read();\n } else {\n layer.receiveMoreDataForHint(getHint());\n // either the stream is now filled, or we ran into a timeout\n // or the next stream is available\n return stream.read();\n }\n }", "@Override\n public int read() throws IOException {\n return input.read();\n }", "public void doRead() throws IOException {\n if (sc.read(bbin) == -1) {\n closed = true;\n }\n processIn();\n updateInterestOps();\n }", "public void readData(InputStream inStream);", "void read(StreamOption streamOpt);", "public void read() {\n\t\tthis.isRead = true;\n\t}", "@Override\n\tpublic int read() {\n\t\treturn super.read();\n\t}", "InputStream getDataStream();", "abstract void read();", "private void doRead() throws IOException {\n\t\t\tvar res = sc.read(bb);\n\n\t\t\tif ( res == -1 ) {\n\t\t\t\tlogger.info(\"Connection closed with the client.\");\n\t\t\t\tclosed = true;\n\t\t\t}\n\n\t\t\tupdateInterestOps();\n\t\t}", "public int read() throws IOException {\n if (closed)\n throw new IOException(\"requestStream.read.closed\");\n\n // Have we read the specified content length already?\n if ((length >= 0) && (count >= length))\n return (-1); // End of file indicator\n\n // Read and count the next byte, then return it\n int b = stream.read();\n if (b >= 0)\n count++;\n return (b);\n }", "public byte[] read();", "@Override\n\tpublic void read() {\n\n\t}", "@Override\n public void doRead() throws IOException {\n if (sc.read(bbin) == -1) {\n state = State.CLOSED;\n }\n processIn();\n updateInterestOps();\n }", "public void read(final InputStream stream)\r\n throws IOException, DataFormatException {\r\n decoder.read(stream);\r\n }", "@Override\n public Ini read(InputStream in) throws IOException {\n return read(new InputStreamReader(in));\n }", "public void read(DataInputStream in) throws IOException;", "protected abstract Reader read() throws IOException;", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "@Override\n\tpublic int read() throws IOException {\n\t\tif (buf.isReadable()) {\n return buf.readByte() & 0xff;\n }\n return -1;\n\t}", "@Override\r\n\tpublic void read() {\n\r\n\t}", "Read createRead();", "InputStream getInputStream() throws IOException;", "InputStream getInputStream() throws IOException;", "InputStream getInputStream() throws IOException;", "public void read() throws IOException {\n\t\twhile (this.in.getReadBytes() != size) {\n\t\t\tString chunkID;\n\t\t\ttry {\n\t\t\t\tchunkID = readString(4);\n\t\t\t} catch (EmptyReadException e) {\n\t\t\t\t/**\n\t\t\t\t * T4L bug 15259: Some encoders must write a byte \"0\" to signify\n\t\t\t\t * EOF?\n\t\t\t\t */\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlong chunkSize = readLong(4);\n\t\t\treadChunk(chunkID, chunkSize);\n\t\t}\n\t}", "public void read(CCompatibleInputStream is) throws Exception {\n header.read(is);\n super.read(is);\n }", "@Override\n\tpublic boolean getCanRead()\n\t{\n\t\treturn inputStream.CanRead;\n\t}", "@Override\n public int read() throws IOException {\n int r = -1;\n \n if (encryptedDataBuffer!=null && pos>=encryptedDataBuffer.length && !closed)\n fillBuffer();\n \n if (encryptedDataBuffer!=null && pos<encryptedDataBuffer.length)\n r = (int)encryptedDataBuffer[pos++]; // next element in the buffer\n return r;\n }", "public String read() throws IOException {\n return reader.readLine();\n }", "public final int read() throws IOException {\r\n\t\treturn f.read();\r\n\t}", "int readFrom(byte[] iStream, int pos, ORecordVersion version);", "@Override\n public int read(byte[] bytes, int offset, int count) throws IOException {\n return updateBytesRead(super.read(bytes, offset, count));\n }", "public InputStream getStream();", "public String read();", "public void doReads(Reader reader) throws IOException;", "protected void readPayload() throws IOException {\n _dataStream.skipBytes(PushCacheProtocol.COMMAND_LEN);\n int rlen = _dataStream.readInt();\n if (rlen == 0) {\n return;\n }\n if (rlen > PushCacheProtocol.MAX_PAYLOAD_LEN) {\n throw new IOException(\"Payload length \" + rlen + \" exceeds maximum length \" + PushCacheProtocol.MAX_PAYLOAD_LEN);\n }\n _textBuffer = new byte[rlen];\n int sofar = 0;\n int toread = rlen;\n sofar = 0;\n toread = rlen;\n int rv = -1;\n edu.hkust.clap.monitor.Monitor.loopBegin(142);\nwhile (toread > 0) { \nedu.hkust.clap.monitor.Monitor.loopInc(142);\n{\n rv = _stream.read(_textBuffer, sofar, toread);\n if (rv < 0) {\n throw new IOException(\"read returned \" + rv + \" after reading \" + sofar + \" bytes\");\n }\n sofar += rv;\n toread -= rv;\n }} \nedu.hkust.clap.monitor.Monitor.loopEnd(142);\n\n _dataStream = new DataInputStream(new ByteArrayInputStream(_textBuffer));\n }", "private void readFromStream(InputStream in) throws IOException {\n\n\t\tdataValue = null;\t// allow gc of the old value before the new.\n\t\tbyte[] tmpData = new byte[32 * 1024];\n\n\t\tint off = 0;\n\t\tfor (;;) {\n\n\t\t\tint len = in.read(tmpData, off, tmpData.length - off);\n\t\t\tif (len == -1)\n\t\t\t\tbreak;\n\t\t\toff += len;\n\n\t\t\tint available = Math.max(1, in.available());\n\t\t\tint extraSpace = available - (tmpData.length - off);\n\t\t\tif (extraSpace > 0)\n\t\t\t{\n\t\t\t\t// need to grow the array\n\t\t\t\tint size = tmpData.length * 2;\n\t\t\t\tif (extraSpace > tmpData.length)\n\t\t\t\t\tsize += extraSpace;\n\n\t\t\t\tbyte[] grow = new byte[size];\n\t\t\t\tSystem.arraycopy(tmpData, 0, grow, 0, off);\n\t\t\t\ttmpData = grow;\n\t\t\t}\n\t\t}\n\n\t\tdataValue = new byte[off];\n\t\tSystem.arraycopy(tmpData, 0, dataValue, 0, off);\n\t}", "private String readStream(InputStream is) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader r = new BufferedReader(new InputStreamReader(is),1000);\n for (String line = r.readLine(); line != null; line =r.readLine()){\n sb.append(line);\n }\n is.close();\n return sb.toString();\n }", "public boolean read() {\n return so;\n }", "public void _read(org.omg.CORBA.portable.InputStream istream)\r\n {\r\n value = PropositionHelper.read(istream);\r\n }", "protected void readPayload() throws IOException {\n _data_stream.skipBytes(PushCacheProtocol.COMMAND_LEN);\n int rlen = _data_stream.readInt();\n if (rlen == 0) {\n return;\n }\n _text_buffer = new byte[rlen];\n int sofar = 0;\n int toread = rlen;\n sofar = 0;\n toread = rlen;\n int rv = -1;\n edu.hkust.clap.monitor.Monitor.loopBegin(752);\nwhile (toread > 0) { \nedu.hkust.clap.monitor.Monitor.loopInc(752);\n{\n rv = _in.read(_text_buffer, sofar, toread);\n if (rv < 0) {\n throw new IOException(\"read returned \" + rv);\n }\n sofar += rv;\n toread -= rv;\n }} \nedu.hkust.clap.monitor.Monitor.loopEnd(752);\n\n _data_stream = new DataInputStream(new ByteArrayInputStream(_text_buffer));\n }", "private int readFill(InputStream stream, byte[] buffer)\n throws IOException {\n int r = buffer.length;\n while (r > 0) {\n int p = buffer.length - r;\n int c = stream.read(buffer, p, r);\n if (c == -1) {\n break;\n }\n r -= c;\n }\n return buffer.length - r;\n\n }", "public void sensorReader() {\n try {\n Log.i(TAG, \"wants to read from Arduino\");\n this.inputStream = socket.getInputStream();\n this.inputStreamReader = new InputStreamReader(inputStream);\n Log.i(TAG, \"inputstream ready\");\n this.bufferedReader = new BufferedReader(inputStreamReader);\n Log.i(TAG, \"buffered reader ready\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void read(DataInput in) throws IOException {\n\t\t\r\n\t}", "public Asn1Object read() throws IOException {\n\n\t\t\tint tag = this.in.read();\n\n\t\t\tif (tag == -1) {\n\t\t\t\tthrow new IllegalStateException(\"Invalid DER: stream too short, missing tag\");\n\t\t\t}\n\n\t\t\tint length = getLength();\n\n\t\t\tif (tag == BIT_STRING) {\n\t\t\t\t// Not sure what to do with this one.\n\t\t\t\tint padBits = this.in.read();\n\t\t\t\tlength--;\n\t\t\t}\n\n\t\t\tbyte[] value = new byte[length];\n\t\t\tint n = this.in.read(value);\n\t\t\tif (n < length) {\n\t\t\t\tthrow new IllegalStateException(\"Invalid DER: stream too short, missing value\");\n\t\t\t}\n\n\t\t\treturn new Asn1Object(tag, length, value);\n\t\t}", "public abstract void read(DataInput input) throws IOException;", "public boolean read() {\n return this.read;\n }", "private static String readIt(InputStream stream) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(stream));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = br.readLine()) != null) {\n sb.append(line+\"\\n\");\n }\n br.close();\n return sb.toString();\n\t}", "private String readStream(InputStream is) {\n try {\n ByteArrayOutputStream bo = new ByteArrayOutputStream();\n int i = is.read();\n while(i != -1) {\n bo.write(i);\n i = is.read();\n }\n return bo.toString();\n } catch (IOException e) {\n return \"\";\n }\n }", "public void read(final EntityID sender, final int time, final BitArrayInputStream stream);", "private void read() throws IOException {\n // The first byte of every data frame\n int firstByte;\n\n // Loop until end of stream is reached.\n while ((firstByte = bis.read()) != -1) {\n // Data contained in the first byte\n // int fin = (firstByte << 24) >>> 31;\n // int rsv1 = (firstByte << 25) >>> 31;\n // int rsv2 = (firstByte << 26) >>> 31;\n // int rsv3 = (firstByte << 27) >>> 31;\n int opcode = (firstByte << 28) >>> 28;\n\n // Reads the second byte\n int secondByte = bis.read();\n\n // Data contained in the second byte\n // int mask = (secondByte << 24) >>> 31;\n int payloadLength = (secondByte << 25) >>> 25;\n\n // If the length of payload data is less than 126, that's the\n // final\n // payload length\n // Otherwise, it must be calculated as follows\n if (payloadLength == 126) {\n // Attempts to read the next 2 bytes\n byte[] nextTwoBytes = new byte[2];\n for (int i = 0; i < 2; i++) {\n byte b = (byte) bis.read();\n nextTwoBytes[i] = b;\n }\n\n // Those last 2 bytes will be interpreted as a 16-bit\n // unsigned\n // integer\n byte[] integer = new byte[]{0, 0, nextTwoBytes[0], nextTwoBytes[1]};\n payloadLength = Utils.fromByteArray(integer);\n } else if (payloadLength == 127) {\n // Attempts to read the next 8 bytes\n byte[] nextEightBytes = new byte[8];\n for (int i = 0; i < 8; i++) {\n byte b = (byte) bis.read();\n nextEightBytes[i] = b;\n }\n\n // Only the last 4 bytes matter because Java doesn't support\n // arrays with more than 2^31 -1 elements, so a 64-bit\n // unsigned\n // integer cannot be processed\n // Those last 4 bytes will be interpreted as a 32-bit\n // unsigned\n // integer\n byte[] integer = new byte[]{nextEightBytes[4], nextEightBytes[5], nextEightBytes[6],\n nextEightBytes[7]};\n payloadLength = Utils.fromByteArray(integer);\n }\n\n // Attempts to read the payload data\n byte[] data = new byte[payloadLength];\n for (int i = 0; i < payloadLength; i++) {\n byte b = (byte) bis.read();\n data[i] = b;\n }\n\n // Execute the action depending on the opcode\n switch (opcode) {\n case OPCODE_CONTINUATION:\n // Should be implemented\n break;\n case OPCODE_TEXT:\n notifyOnTextReceived(new String(data, Charset.forName(\"UTF-8\")));\n break;\n case OPCODE_BINARY:\n notifyOnBinaryReceived(data);\n break;\n case OPCODE_CLOSE:\n closeInternal();\n notifyOnCloseReceived();\n return;\n case OPCODE_PING:\n notifyOnPingReceived(data);\n sendPong(data);\n break;\n case OPCODE_PONG:\n notifyOnPongReceived(data);\n break;\n default:\n closeInternal();\n Exception e = new UnknownOpcodeException(\"Unknown opcode: 0x\" + Integer.toHexString(opcode));\n notifyOnException(e);\n return;\n }\n }\n\n // If there are not more data to be read,\n // and if the connection didn't receive a close frame,\n // an IOException must be thrown because the connection didn't close\n // gracefully\n throw new IOException(\"Unexpected end of stream\");\n }", "public int read() throws IOException {\n if (!started) {\n start();\n }\n if (buffer == null)\n return -1;\n if (bufpos == buflen) {\n buffer = refreshBuffer();\n if (buffer == null)\n return -1;\n }\n return 0xFF & buffer[bufpos++];\n }", "@Override\n public void read(byte[] bytes) {\n }", "@Override\n public void readFrom(InputStream in) throws IOException {\n }", "public T read() throws IOException;", "@Override\n public int read() throws IOException {\n if (pos >= count) {\n fill();\n if (pos >= count) {\n return -1;\n }\n }\n checkIfClosed();\n return buf[pos++] & 0xFF;\n }", "private void read(){\n try {\n if (c != -1) c = r.read();\n } catch (IOException e){\n throw new IOError(e);\n }\n }", "void read ();", "protected void doBeginRead() throws Exception {}", "abstract protected boolean read();", "public void read() {\n\t\tthis.jtfSoundReaderServ = new JtfSoundReaderServ(this.audioFormat, this.targetDataLine);\n\t\tthis.readerThread = new Thread(this.jtfSoundReaderServ);\n\t\tthis.readerThread.start();\n\t}", "@Override\n\tpublic void readData() {\n\t\t\n\t}", "public int read() throws IOException {\n if(available() == 0) throw new EOFException(\"No data available.\");\n int ret = data.getFirst().get();\n updateBufferList();\n return ret;\n }", "boolean getRead();", "@Override\n\t\tprotected void readStreamHeader() throws IOException {\n\t\t}", "public int streamRead(long offset, byte[] buffer, int bufferOffset, int nrOfBytes) throws VlException\n {\n VStreamReadable rfile = (VStreamReadable) (this);\n InputStream istr = rfile.getInputStream();\n\n if (istr==null)\n return -1; \n\n // implementation move to generic StreamUtil: \n return nl.uva.vlet.io.StreamUtil.syncReadBytes(istr,offset,buffer,bufferOffset,nrOfBytes); \n\n }", "private void readMoreBytesFromStream() throws IOException {\n if (!innerStreamHasMoreData) {\n return;\n }\n\n int bufferSpaceAvailable = buffer.length - bytesInBuffer;\n if (bufferSpaceAvailable <= 0) {\n return;\n }\n\n int bytesRead =\n stream.read(buffer, bytesInBuffer, bufferSpaceAvailable);\n\n if (bytesRead == -1) {\n innerStreamHasMoreData = false;\n } else {\n bytesInBuffer += bytesRead;\n }\n }", "String read();", "String read();", "void read(Buffer buffer);", "@Override\r\n\tpublic void reading() {\n\t\tSystem.out.println(\"reading\");\r\n\t}", "public boolean read() throws IOException\n\t{\n\t\treturn this.read(this.socket);\n\t}", "byte[] readBytes();", "@Override\n\tpublic long bytesRead() {\n\t\treturn 0;\n\t}", "public abstract SeekInputStream getRawInput();", "private String read() {\n\n String s = \"\";\n\n try {\n // Check if there are bytes available\n if (inStream.available() > 0) {\n\n // Read bytes into a buffer\n byte[] inBuffer = new byte[1024];\n int bytesRead = inStream.read(inBuffer);\n\n // Convert read bytes into a string\n s = new String(inBuffer, \"ASCII\");\n s = s.substring(0, bytesRead);\n }\n\n } catch (Exception e) {\n Log.e(TAG, \"Read failed!\", e);\n }\n\n return s;\n }", "@Override\n synchronized public void run() {\n try {\n BufferedReader bufferedReader = new BufferedReader(\n new InputStreamReader(inputStream, Charset.defaultCharset())\n );\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n this.result.add(line);\n }\n } catch (IOException ex) {\n log.error(\"Failed to consume and display the input stream of type \" + streamType + \".\", ex);\n } finally {\n this.isStopped = true;\n notify();\n }\n }", "public abstract byte[] read() throws IOException, IllegalArgumentException , IllegalStateException;", "public int read() throws IOException;", "public void processStreamInput() {\n }", "private void read() throws IOException {\n\n ByteBuffer buffer = ByteBuffer.allocate(ProjectProperties.BYTE_BUFFER_SIZE);\n int read = 0;\n // Keep trying to write until all bytes are read\n while (buffer.hasRemaining() && read != -1) {\n read = channel.read(buffer);\n }\n checkIfClosed(read);// check for error\n\n // convert byte[] to hash string\n String rt = RandomByteAndHashCode.SHA1FromBytes(buffer.array());\n if(ProjectProperties.DEBUG_FULL){\n System.out.println(\"Read: \" + rt );\n }\n\n write(rt.getBytes()); // write hash string\n }", "@Override\n public int read() throws IOException\n {\n if (_tmpBuffer == null) {\n _tmpBuffer = new char[1];\n }\n if (read(_tmpBuffer, 0, 1) < 1) {\n return -1;\n }\n return _tmpBuffer[0];\n }", "@Override\r\n\tpublic InputStream getInputStream() throws IOException {\n\t\treturn this.s.getInputStream();\r\n\t}", "@Override\n public boolean read() throws Exception {\n if (count >= size) return true;\n if (source == null) source = new ChannelInputSource(channel);\n while (count < size) {\n final int n = location.transferFrom(source, false);\n if (n <= 0) break;\n count += n;\n channelCount = count;\n if (debugEnabled) log.debug(\"read {} bytes for {}\", n, this);\n }\n return count >= size;\n }", "public void read() {\n synchronized (this) {\n while (events.size() == 0) {\n try {\n wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n System.out.printf(\"Read :%d,%s\\n\",\n events.size(), events.poll());\n notify();\n }\n }", "InputStream openStream() throws IOException;", "public static String readIt(InputStream stream, int len) throws IOException, UnsupportedEncodingException {\n BufferedReader br = null;\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n\n br = new BufferedReader(new InputStreamReader(stream));\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n return sb.toString();\n }", "static void readRequest(InputStream is) throws IOException {\n out.println(\"starting readRequest\");\n byte[] buf = new byte[1024];\n String s = \"\";\n while (true) {\n int n = is.read(buf);\n if (n <= 0)\n throw new IOException(\"Error\");\n s = s + new String(buf, 0, n);\n if (s.indexOf(\"\\r\\n\\r\\n\") != -1)\n break;\n }\n out.println(\"returning from readRequest\");\n }", "public boolean getRead() {\n return read_;\n }", "private int readStream(final DataInputStream dis)\n\t\tthrows IOException {\n\t\tif(dis.readInt() > MAX_PROTOCOL_VERSION) {\n\t\t\treturn E_UNSUPPORTED_PROTOCOL_VERSION;\n\t\t}\n\n\t\tint length = dis.readInt();\n\t\tLog.i(\"PhoneLink\", \"Received a \"+length+\" byte parcel\");\n\t\tbyte[] data = new byte[length];\n\t\tint position = 0;\n\t\tdo {\n\t\t\tposition += dis.read(data, position, length-position);\n\t\t} while(position < length);\n\n\t\tParcel parcel = Parcel.obtain();\n\t\tparcel.unmarshall(data, 0, length);\n\t\tparcel.setDataPosition(0);\n\t\tIntent newIntent = (Intent) parcel.readValue(Intent.class.getClassLoader());\n\t\tmIntentHandler.processIntent(newIntent);\n\t\treturn OK;\n\t}", "boolean hasRead();", "public abstract InputStream getInputStream();", "public abstract InputStream getInputStream();", "StreamReader underlyingReader();", "public Object read() throws IOException, RecordIOException;", "@Override\n\tpublic int read(byte[] array) throws IOException {\n\t\treturn read(array, 0, array.length);\n\t}", "public boolean getRead() {\n return read_;\n }", "public StreamReader() {}", "public void read(DataInputStream reader) throws Exception\r\n\t{\n\r\n\t}" ]
[ "0.7436617", "0.7174387", "0.6736149", "0.66065", "0.65840584", "0.6581325", "0.65688515", "0.6554596", "0.65143126", "0.64800125", "0.6452115", "0.64435095", "0.6443187", "0.64391965", "0.6408092", "0.6404665", "0.6398956", "0.63021964", "0.62945896", "0.6284112", "0.62727815", "0.6263871", "0.6232017", "0.6220238", "0.6220238", "0.6220238", "0.6206943", "0.62011313", "0.6201096", "0.61730224", "0.6167278", "0.6156669", "0.6136225", "0.6130777", "0.61263096", "0.61229175", "0.6117457", "0.6097267", "0.60960144", "0.6086026", "0.60851467", "0.6081688", "0.6079099", "0.6056822", "0.6052833", "0.60483736", "0.6045984", "0.60432196", "0.6037864", "0.6035141", "0.60301244", "0.6006688", "0.6000569", "0.5994225", "0.59905463", "0.599012", "0.5969591", "0.5965645", "0.59647095", "0.5958836", "0.59352547", "0.5935185", "0.5926843", "0.5921038", "0.5909482", "0.59083134", "0.5906648", "0.5903757", "0.5893044", "0.58868384", "0.58868384", "0.5876665", "0.5874094", "0.58737", "0.58695155", "0.5868959", "0.5868721", "0.5868134", "0.58610934", "0.5858177", "0.5850168", "0.58479124", "0.584437", "0.5842036", "0.58404315", "0.58372986", "0.5824139", "0.581373", "0.5813587", "0.5811754", "0.5807135", "0.5806137", "0.5805711", "0.5802747", "0.5802747", "0.5794569", "0.5791732", "0.57916117", "0.5790548", "0.57618403", "0.5759511" ]
0.0
-1
/ 686 1 3 1 1 2 5 1 2 2 1 5 4 4 2 1 1 3 1 4 4 1 1 3 2 1 1 2 4 3 3 2 3 1 4 4 1 1 2 1 2 1 2 1 3 2 1 3 3 2 2 2 1 1 1 4 1 1 3 1 1 1 2 5 2 1 1 3 1 1 3 1 2 1 1 1 3 3 1 2 3 2 3 1 2 1 3 1 2 1 1 4 2 3 1 1 1 6 2 1 6 3 6 3 3 1 1 1 1 1 2 2 1 3 1 2 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 2 3 1 1 1 5 1 2 2 1 1 1 2 2 1 4 2 1 1 4 1 4 1 1 2 1 2 2 2 2 2 2 3 2 1 1 1 1 5 1 3 1 1 2 4 3 1 2 1 4 1 2 2 3 4 1 3 2 1 2 3 1 2 4 2 1 1 3 1 4 4 2 4 2 7 1 2 4 3 1 3 1 5 2 1 1 1 2 3 1 1 1 4 1 1 5 1 1 2 1 1 5 3 1 3 2 2 1 1 3 1 1 1 3 2 4 1 1 3 3 3 1 1 1 4 2 2 5 1 6 1 1 1 5 1 2 1 5 5 1 1 3 4 3 1 2 3 2 3 3 5 1 1 2 1 1 1 6 1 1 4 1 1 2 1 1 1 2 1 2 2 1 1 1 1 3 2 1 2 2 1 1 2 2 1 5 3 1 1 3 4 6 1 2 4 1 3 1 2 1 1 1 5 1 1 5 1 2 2 3 1 1 1 2 1 2 1 2 1 1 2 4 2 1 1 2 2 1 4 2 1 1 1 5 3 1 4 2 2 3 2 1 1 3 2 1 2 1 1 2 1 2 3 2 3 2 2 4 4 5 1 2 1 2 1 1 1 1 4 1 1 1 6 2 1 2 3 4 1 2 1 1 3 1 4 1 3 1 1 2 1 2 1 2 2 2 4 2 4 2 1 1 1 1 1 1 2 2 1 4 1 1 4 1 3 1 4 1 2 3 1 1 3 1 1 1 2 2 1 1 1 2 1 5 5 2 2 1 3 6 3 1 4 1 1 4 1 1 2 1 2 2 3 1 7 1 3 1 1 1 1 2 1 3 1 1 2 2 1 1 4 2 3 1 2 1 1 1 3 3 2 1 1 2 1 1 1 5 2 4 5 4 2 2 1 1 2 5 1 1 2 6 1 4 2 3 1 3 2 2 4 5 1 1 2 4 1 3 4 1 1 4 1 1 1 2 5 2 4 1 2 1 2 5 2 2 4 1 1 1 1 4 1 1 1 1 1 3 1 1 4 1 4 2 4 1 1 3 1 1 3 2 1 1 1 1 1 1 2 1 4 1 1 1 1 4 1 1 7 1 3 2 1 3 1 3 5 3 3 3 2 3 2 7 3 1 4 5 1 2 1 2 2 1 1 1 3 4 4 2 2 1 1 1 5 6 2 6 1 2 4 4 3 1 2 6 5 2 4 3 1 2 3 3 1 1 1 2 1 1 3 3 1 5 1 6 2 2 2 1 2 2 1 5 1
public static void main(String[] args) { Scanner sc = new Scanner(System.in); // int m = sc.nextInt(); int n = sc.nextInt(); Tree[] tree = new Tree[n]; for (int i = 0; i < n; i++) { tree[i] = new Tree(i + 1, sc.nextInt()); } // System.out.println(Arrays.toString(tree)); // Arrays.sort(tree,(a,b)->b.num-a.num); StringBuilder sb = new StringBuilder(); int first = 0; boolean shibai = false; while (first < n) { while (first < n && tree[first].num == 0) { first++; } int idx = first + 1; out: while (idx < n) { while (idx < n && tree[idx].num == 0) { idx++; } while (idx < n && first < n && tree[idx].num > 0 && tree[first].num > 0) { sb.append(tree[first].type) .append(" ") .append(tree[idx].type) .append(" "); tree[idx].num--; tree[first].num--; if (tree[first].num == 0) { first++; break out; } } } // System.out.println(Arrays.toString(tree)); // System.out.println(idx); if (idx > n - 1) { if (tree[first].num == 0) break; if (tree[first].num == 1) { sb.append(tree[first].type); break; } else { System.out.println("-"); shibai = true; break; } } } // while (true){ // if(tree[0].num==1){ // sb.append(tree[0].type); // break; // } // if(tree[1].num==0){ // System.out.println("-"); // shibai=true; // break; // } // while (tree[1].num>0){ // sb.append(tree[0].type).append(" ").append(tree[1].type).append(" "); // tree[0].num--; // tree[1].num--; // } // //System.out.println(sb.toString()); // // System.out.println(Arrays.toString(tree)); // // Arrays.sort(tree,(a,b)->b.num-a.num); // // } if (!shibai) { System.out.println(sb.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString input1=sc.nextLine();\r\ninput1=input1.toLowerCase();\r\nint l=input1.length();\r\nchar a[]=input1.toCharArray();\r\nint d[]=new int[1000];\r\nString str=\"\";\r\nint i=0,k1=0,k2=0,m=0,c1=0,c2=0,c3=0,l1=0,u=0,u1=0;\r\nchar b[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};\r\nfor(i=0;i<l;i++)\r\n{ c3=0;\r\n\tif(a[i]==' ')\r\n\t{u=i;c3=0;\r\n\t\tfor(k1=u1,k2=i-1;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tu1=i+1;\r\n\t\tc3=0;\r\n\t}\r\n\tif(i==l-1)\r\n\t{\r\n\t\tfor(k1=u+1,k2=i;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tk1=i+1;\r\n\t}\r\n}\r\n\r\n for(i=0;i<l1;i++)\r\n {\r\n\t str=str+Integer.toString(d[i]);\r\n }\r\n int ans=Integer.parseInt(str);\r\n System.out.print(ans);\r\n}", "public static void main(String[] args) throws UnsupportedEncodingException {\n var res2 = old.MD4.MD4.hash(\"The quick brown fox jumps over the lazy dogshdkasjhflksdjhflkasjhdflkjshdfkljasdhlfkjajhjhhldfkjashldf\".getBytes());\n// var res1 = cyph.digest(\"\".getBytes());\n\n System.out.println(encodeHexString(res2));\n// System.out.println(new BitUtils(res1).getNextLong(25) + \"\\n\");\n\n System.exit(0);\n\n var secPreimg8 = secondPreimage(\"test\", 8, 1000);\n System.out.println(\"Second preimage avg over 8 bits: \" + secPreimg8);\n dumpData(\"preimg.txt\", true, \"8 \" + secPreimg8 + \"\\n\");\n\n var secPreimg12 = secondPreimage(\"test\", 12, 1000);\n System.out.println(\"Second preimage avg over 12 bits: \" + secPreimg12);\n dumpData(\"preimg.txt\", false, \"12 \" + secPreimg12 + \"\\n\");\n\n var secPreimg16 = secondPreimage(\"test\", 16, 500);\n System.out.println(\"Second preimage avg over 16 bits: \" + secPreimg16);\n dumpData(\"preimg.txt\", false, \"16 \" + secPreimg16 + \"\\n\");\n\n var secPreimg20 = secondPreimage(\"test\", 20, 50);\n System.out.println(\"Second preimage avg over 20 bits: \" + secPreimg20);\n dumpData(\"preimg.txt\", false, \"20 \" + secPreimg20 + \"\\n\");\n\n var secPreimg24 = secondPreimage(\"test\", 24, 10);\n System.out.println(\"Second preimage avg over 24 bits: \" + secPreimg24);\n dumpData(\"preimg.txt\", false, \"24 \" + secPreimg24 + \"\\n\");\n\n var coll8 = collisions(8, 1000);\n System.out.println(\"\\nCollisions for 8 bits: \" + coll8);\n dumpData(\"coll.txt\", true, \"8 \" + coll8 + \"\\n\");\n\n var coll12 = collisions(12, 1000);\n System.out.println(\"Collisions for 12 bits: \" + coll12);\n dumpData(\"coll.txt\", false, \"12 \" + coll12 + \"\\n\");\n\n var coll16 = collisions(16, 1000);\n System.out.println(\"Collisions for 16 bits: \" + coll16);\n dumpData(\"coll.txt\", false, \"16 \" + coll16 + \"\\n\");\n\n var coll20 = collisions(20, 1000);\n System.out.println(\"Collisions for 20 bits: \" + coll20);\n dumpData(\"coll.txt\", false, \"20 \" + coll20 + \"\\n\");\n\n var coll24 = collisions(24, 1000);\n System.out.println(\"Collisions for 24 bits: \" + coll24);\n dumpData(\"coll.txt\", false, \"24 \" + coll24 + \"\\n\");\n }", "public static void main(final String[] args) throws IOException {\r\n\r\n final byte[] ar = {0, 0, 5, 0, 70, 68, 8, 0, 0, 0, 0, 0, 0, 26, 117, 64, 0, 0, 6, 0, 70, 68, 8, 0, 41, 92,\r\n -113, -62, -11, -88, 18, 64, 0, 0, 7, 0, 83, 76, 4, 0, -69, 3, 0, 0, 0, 0, 8, 0, 83, 76, 4, 0, -56, 0,\r\n 0, 0, 0, 0, 13, 0, 83, 76, 4, 0, 2, 0, 0, 0, 0, 0, 14, 0, 83, 76, 4, 0, 4, 0, 0, 0, 0, 0, 19, 0, 83,\r\n 76, 4, 0, 81, 1, 0, 0, 0, 0, 20, 0, 83, 76, 4, 0, 1, 0, 0, 0, 0, 0, 22, 0, 83, 76, 4, 0, 50, 0, 0, 0,\r\n 0, 0, 24, 0, 83, 76, 4, 0, -96, 2, 0, 0, 0, 0, 29, 0, 76, 84, 14, 0, 65, 0, 66, 0, 68, 0, 79, 0, 77, 0,\r\n 69, 0, 78, 0, 0, 0, 30, 0, 70, 68, 8, 0, 0, 0, 0, 0, 0, 64, 127, 64, 0, 0, 31, 0, 70, 68, 8, 0, 0, 0,\r\n 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 70, 68, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 83, 76, 4, 0, 1, 0,\r\n 0, 0, 0, 0, 34, 0, 83, 76, 4, 0, 3, 0, 0, 0, 0, 0, 37, 0, 83, 76, 4, 0, 1, 0, 0, 0, 0, 0, 38, 0, 70,\r\n 68, 8, 0, 0, 0, 0, 0, 0, 112, 124, 64, 0, 0, 39, 0, 70, 68, 8, 0, 0, 0, 0, 0, 0, 0, 78, 64, 0, 0, 40,\r\n 0, 83, 76, 4, 0, 38, 1, 0, 0, 0, 0, 41, 0, 83, 76, 4, 0, 0, 0, 0, 0, 0, 0, 44, 0, 83, 76, 4, 0, -44, 0,\r\n 0, 0, 0, 0, 45, 0, 83, 76, 4, 0, 0, 0, 0, 0, 0, 0, 46, 0, 83, 76, 4, 0, 1, 0, 0, 0, 0, 0, 47, 0, 70,\r\n 68, 8, 0, 0, 0, 0, 0, 0, 0, 4, 64, 0, 0, 48, 0, 76, 84, 8, 0, 80, 0, 50, 0, 48, 0, 65, 0, 0, 0, 51, 0,\r\n 83, 76, 4, 0, 3, 0, 0, 0, 0, 0, 1, 1, 70, 68, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 70, 68, 8, 0,\r\n 14, 45, -78, -99, -17, -89, -18, 63, 0, 0, 3, 1, 70, 68, 8, 0, -123, -21, 81, -72, 30, -123, -21, 63,\r\n 0, 0, 5, 1, 73, 83, 2, 0, 48, 32, -1, -1, -1, -1, 67, 83, 10, 0, 69, 78, 68, 33, 32, 32, 32, 32, 32, 32};\r\n\r\n final String str = new String(ar);\r\n System.out.println(\"The string is:\");\r\n System.out.println(str);\r\n\r\n /*\r\n * File[] f = new File[1];\r\n * \r\n * f[0] = new File(args[0]); String[] s = new String[1]; s[0] = \"\";\r\n * \r\n * PlugInAlgorithmAnonymizeDicom p = new PlugInAlgorithmAnonymizeDicom (f, s, \"\", \"\"); p.runAlgorithm();\r\n * p.finalize();\r\n * \r\n * //For now inTest and inCopy should be identical, final implementation will have inTest and inCopy identical\r\n * except for anonymized images System.out.println(\"Reading in \"+args[0]); DataInputStream inTest = new\r\n * DataInputStream(new FileInputStream(new File(args[0]))); System.out.println(\"Reading in \"+args[1]);\r\n * DataInputStream inCopy = new DataInputStream(new FileInputStream(new File(args[1]))); int maxSize =\r\n * inTest.available(); byte[] b = new byte[maxSize], c = new byte[maxSize]; inTest.readFully(b);\r\n * inCopy.readFully(c); System.out.println(\"Size compare: \"+b.length+\"\\t\"+c.length); boolean cons = true;\r\n * for(int i=0; i<b.length; i++) { if(b[i] != c[i]) { System.out.println(\"Data corruption at \"+i); cons =\r\n * false; } } if(cons) { System.out.println(\"Program passed validation.\"); }\r\n */\r\n\r\n }", "void procedure()\n {\n try\n {\n fkey=new FileInputStream(file2);\n }\n catch(Exception e)\n {\n System.out.println(e);\n }\n keybuf= new byte[16];\n try\n {\n fkey.read(keybuf);\n z= new int[52];\n j1=0;\n i1=0;\n for(i=0;i<52;i++)\n z[i]=0;\n while( i1<8)\n {\n if((j1+1)%2==0)\n {\n z[i1]|=keybuf[j1]; // dividing 64 bit cypher block into four 16 bit registers\n\t i1++;\n }\n else\n \t {\n\t z[i1]=keybuf[j1];\n\t z[i1]<<=8;\n }\n\t j1++;\n }\n i=0;\n\t for(j1=1;j1<=5;j1++)\n\t {\n\t i++;\n\t z[i+7]=((z[i]<<9)&0xfe00)|((z[i+1]>>7)&0x1ff);\n\t z[i+8]=((z[i+1]<<9)&0xfe00)|((z[i+2]>>7)&0x1ff);\n\t z[i+9]=((z[i+2]<<9)&0xfe00)|((z[i+3]>>7)&0x1ff);\n\t z[i+10]=((z[i+3]<<9)&0xfe00)|((z[i+4]>>7)&0x1ff);\n\t z[i+11]=((z[i+4]<<9)&0xfe00)|((z[i+5]>>7)&0x1ff);\n\t z[i+12]=((z[i+5]<<9)&0xfe00)|((z[i+6]>>7)&0x1ff);\n z[i+13]=((z[i+6]<<9)&0xfe00)|((z[i-1]>>7)&0x1ff);\n\t z[i+14]=((z[i-1]<<9)&0xfe00)|((z[i]>>7)&0x1ff);\n\t i=i+7;\n\t }\n i1=41;\n\t z[48]=((z[i1]<<9)&0xfe00)|((z[i1+1]>>7)&0x1ff);\n\t z[49]=((z[i1+1]<<9)&0xfe00)|((z[i1+2]>>7)&0x1ff);\n\t z[50]=((z[i1+2]<<9)&0xfe00)|((z[i1+3]>>7)&0x1ff);\n\t z[51]=((z[i1+3]<<9)&0xfe00)|((z[i1+4]>>7)&0x1ff);\n}\ncatch(Exception e)\n{\nSystem.out.println(e);\n}\n}", "public static int Main()\n\t{\n\tint[] b = new int[12];\n\tint w;\n\tint i;\n\tint[] a = {13, 44, 72, 103, 133, 164, 194, 225, 256, 286, 317, 347};\n\tString tempVar = ConsoleInput.scanfRead();\n\tif (tempVar != null)\n\t{\n\t\tw = Integer.parseInt(tempVar);\n\t}\n\tfor (i = 0;i < 12;i++)\n\t{\n\t\tb[i] = a[i] % 7 - 1;\n\t\tb[i] = (b[i] + w) % 7;\n\t}\n\tfor (i = 0;i < 12;i++)\n\t{\n\t\tif (b[i] == 5)\n\t\t{\n\t\t\tSystem.out.printf(\"%d\\n\",i + 1);\n\t\t}\n\t}\n\treturn 0;\n\t}", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n Nucleotide nucleotide0 = Nucleotide.Pyrimidine;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray0 = defaultNucleotideCodec1.encode((Collection<Nucleotide>) set0);\n Nucleotide nucleotide1 = defaultNucleotideCodec0.decode(byteArray0, 0L);\n assertEquals(Nucleotide.Cytosine, nucleotide1);\n \n defaultNucleotideCodec1.getNumberOfGapsUntil(byteArray0, 1717986918);\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.getUngappedLength(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n int int0 = defaultNucleotideCodec4.getUngappedOffsetFor(byteArray0, (-1209));\n assertEquals((-1209), int0);\n \n int int1 = defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, (-1209));\n assertEquals(2, int1);\n \n defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, 1717986918);\n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec5.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec6 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec7 = DefaultNucleotideCodec.INSTANCE;\n int int2 = defaultNucleotideCodec7.getGappedOffsetFor(byteArray0, 0);\n int int3 = defaultNucleotideCodec6.getNumberOfGapsUntil(byteArray0, 5);\n assertTrue(int3 == int2);\n assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)2, (byte) (-34)}, byteArray0);\n assertEquals(0, int3);\n }", "public static void main(String[] args) throws FileNotFoundException, IOException{\n\tScanner sc=new Scanner(new BufferedReader(new InputStreamReader (new FileInputStream(\"CodeJam2014/r1c_a/A-large.in\"))));\r\n\t\t//Scanner sc=new Scanner(new BufferedReader(new InputStreamReader(System.in)));\r\n\t\tPrintWriter ou=new PrintWriter(new FileWriter(\"CodeJam2014/r1c_a/testal.out\"));\r\n\t\tint res,rep,i,j;\r\n\t\tlong p,q,tp,tq,cp,cq;\r\n\t\tboolean vis;\r\n\t\tString s;\r\n\t\tString[] s2=new String[3];\r\n\t\tString out=\"\";\r\n\t\t\r\n\t\tres=sc.nextInt();\r\n\t\ts=sc.nextLine();\r\n\t\tfor(rep=1;rep<=res;rep++){\r\n\t\t\ts=sc.nextLine();\r\n\t\t\ts2=s.split(\"/\");\r\n\t\t\tp=0; q=0;\r\n\t\t\tfor(i=0;i<s2[0].length();i++){\r\n\t\t\t\tp*=10;\r\n\t\t\t\tp+=(int)s2[0].charAt(i)-(int)'0';\r\n\t\t\t}\r\n\t\t\tfor(i=0;i<s2[1].length();i++){\r\n\t\t\t\tq*=10;\r\n\t\t\t\tq+=(int)s2[1].charAt(i)-(int)'0';\r\n\t\t\t}\r\n\t\t\t//p=Integer.parseInt(s2[0]); q=Integer.parseInt(s2[1]);\r\n\t\t\t//p=sc.nextInt(); q=sc.nextInt();\r\n\t\t\ttp=p/gcd(p,q); tq=q/gcd(p,q);\r\n\t\t\tSystem.out.println(tp);\r\n\t\t\tcp=0; cq=0;\r\n\t\t\tvis=true;\r\n\t\t\twhile(tp!=1){\r\n\t\t\t\ttp=tp>>1;\r\n\t\t\t\tcp++;\r\n\t\t\t}\r\n\t\t\twhile(tq!=1){\r\n\t\t\t\tif (tq%2==1) {vis=false; break;}\r\n\t\t\t\ttq/=2;\r\n\t\t\t\tcq++;\r\n\t\t\t}\r\n\t\t\tou.print(\"Case #\"+rep+\": \");\r\n\t\t\tif (!vis) ou.print(\"impossible\");\r\n\t\t\telse ou.print(cq-cp);\r\n\t\t\tif (res!=rep) ou.println();\r\n\t\t\tSystem.out.println(cq-cp);\r\n\t\t}\r\n\t\tou.close();\r\n\t}", "public static void main(String[] args) throws Exception {\n\t\tScanner scn = new Scanner(System.in);\r\n\t\tint tc = scn.nextInt();\r\n\t\tfor(int t=1; t<=tc; t++) {\r\n\t\t\tint n = scn.nextInt();\r\n\t\t\tint k = scn.nextInt();\r\n\t\t\tString str = scn.next();\r\n\t\t\tString arr[] = new String[n];\r\n\t\t\tarr = str.split(\"\");\r\n\t\t\tLinkedList<String> list = new LinkedList<>();\r\n\t\t\tLinkedList<Integer> result = new LinkedList<>();\r\n\t\t\tfor(int i=0; i<n; i++) {\r\n\t\t\t\tlist.add(arr[i]);\r\n\t\t\t}\r\n\t\t\tint comeback = 0;\r\n\t\t\twhile(comeback<4) {\r\n\t\t\t\tint cnt = 0;\r\n\t\t\t\tcomeback = 0;\r\n\t\t\t\tString st = \"\";\r\n\t\t\t\tfor(int i=0; i<n; i++) {\r\n\t\t\t\t\tif(cnt==(n/4)-1) {\r\n\t\t\t\t\t\tcnt = 0;\r\n\t\t\t\t\t\tst += list.get(i);\r\n\t\t\t\t\t\tint tmp = Integer.parseInt(st, 16);\r\n\t\t\t\t\t\tif(!isHave(result,tmp) && (result.size()>0)) {\r\n\t\t\t\t\t\t\tresult.add(tmp);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(result.size() == 0){\r\n\t\t\t\t\t\t\tresult.add(tmp);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tcomeback++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tst = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tst+= list.get(i);\r\n\t\t\t\t\t\tcnt++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\trotate(list);\r\n\t\t\t}\r\n\t\t\tCollections.sort(result);\r\n\t\t\tint cnt = 0;\r\n\t\t\tSystem.out.println(\"#\"+t+\" \"+result.get(result.size()-k));\t\t\t\r\n\t\t}\r\n\t}", "void solve() {\n num = new ArrayList<>();\n num.add(BigInteger.valueOf(4));\n for (int len = 2; len <= 100; len++)\n generate(\"4\", 1, len, false);\n Collections.sort(num);\n for (int tc = ii(); tc > 0; tc--) {\n long x = il();\n BigInteger X = BigInteger.valueOf(x);\n for (int i = 0; i < num.size(); i++) {\n if (num.get(i).mod(X).equals(BigInteger.ZERO)) {\n String z = num.get(i).toString();\n int end = z.lastIndexOf('4');\n int len = z.length();\n int a = 2 * (end+1);\n int b = len - end;\n out.println(a + b);\n break;\n }\n }\n }\n }", "public static void main(String[] args) {\n \tString s = \"[94,93,95,92,94,96,94,93,93,93,95,97,97,95,95,92,94,94,94,92,94,94,96,98,98,96,98,96,94,94,96,91,91,93,95,93,95,95,95,91,93,93,95,95,93,97,97,97,97,97,99,95,97,97,99,95,97,93,95,null,95,95,95,90,92,90,92,92,94,94,96,94,null,96,94,94,94,96,null,90,92,null,null,94,null,94,96,null,null,null,null,96,null,null,null,96,98,96,96,96,96,100,100,94,94,98,96,96,96,98,100,94,96,98,98,94,94,94,96,null,null,94,96,94,94,89,91,null,93,91,91,91,91,null,91,null,null,null,null,null,null,93,95,95,95,93,95,null,null,95,93,null,null,null,null,null,93,null,95,93,95,null,97,95,97,95,95,97,99,97,97,null,97,95,null,95,97,101,101,99,99,95,null,93,null,97,99,95,97,97,97,95,95,99,97,101,99,93,93,95,97,97,99,99,null,null,null,null,95,95,95,97,95,null,null,95,null,null,95,null,null,88,88,92,null,null,94,90,92,92,92,90,90,90,92,90,92,null,null,null,94,94,96,null,null,null,94,null,null,null,null,94,null,null,null,94,null,null,null,96,null,96,96,94,94,null,null,null,96,96,94,96,96,100,100,96,98,96,96,null,96,94,null,94,96,null,null,100,102,100,null,null,100,98,98,94,96,92,94,96,98,98,98,94,94,96,98,96,98,96,98,null,96,96,94,98,98,96,98,100,102,98,null,92,94,92,94,96,null,null,null,96,98,98,100,100,100,94,96,94,null,null,96,96,98,null,null,null,null,96,94,null,null,87,89,91,null,null,null,89,89,null,91,93,93,null,93,89,91,89,91,91,89,93,null,91,null,null,null,null,93,null,null,null,null,null,null,null,null,null,null,null,null,null,95,97,null,95,null,null,95,95,97,95,97,95,null,95,95,97,97,101,101,101,101,95,95,97,99,95,null,95,97,97,null,95,null,93,95,null,null,null,null,101,103,99,null,null,101,null,null,null,null,null,93,97,97,null,91,null,95,97,97,97,null,97,null,97,99,95,95,93,null,null,97,97,null,95,null,null,99,95,97,97,99,95,97,95,97,93,95,99,97,97,99,95,97,97,99,99,99,101,101,null,99,91,null,null,null,null,null,null,93,null,97,95,95,97,null,97,97,101,99,null,99,99,null,null,null,97,97,null,null,null,null,97,97,null,null,null,95,null,null,null,null,null,null,null,null,null,null,null,null,92,null,null,null,null,null,null,94,88,null,null,null,90,90,null,null,null,null,88,88,null,null,null,90,null,null,null,null,null,null,null,null,96,96,96,96,96,96,96,94,null,null,96,96,94,null,94,96,96,null,98,96,100,102,null,null,102,102,null,100,94,96,94,null,96,98,98,null,94,96,96,null,98,null,null,null,96,94,null,null,null,94,null,null,null,104,null,100,null,102,null,null,96,96,96,96,null,92,null,96,null,96,null,null,96,null,null,null,null,null,98,null,null,null,94,94,null,null,null,98,null,96,null,null,100,null,96,96,96,98,96,98,98,100,94,null,null,null,null,null,null,98,94,92,96,96,null,100,96,null,98,null,98,100,94,94,96,98,null,96,98,100,98,98,100,100,102,100,100,null,null,null,null,92,92,null,null,null,96,94,null,96,98,98,96,98,96,null,102,null,98,null,null,null,100,100,null,null,null,null,96,98,96,98,null,94,null,null,95,null,87,null,null,91,91,91,87,null,null,89,91,null,null,null,null,null,null,null,null,null,97,95,95,97,null,null,null,null,97,95,null,null,93,null,95,93,null,null,95,null,97,99,95,95,99,null,null,103,101,null,null,103,null,99,95,95,null,95,95,93,null,97,null,null,null,null,93,95,95,97,null,null,null,null,97,null,null,null,null,null,null,null,101,null,101,103,97,97,95,null,null,null,null,97,null,null,95,null,null,null,null,97,null,null,93,93,null,null,97,null,null,null,99,null,95,95,null,null,97,95,null,null,95,null,97,null,97,99,99,null,null,null,null,99,93,95,91,93,97,97,95,95,101,99,null,null,null,null,99,null,null,null,93,null,93,95,97,95,97,99,95,95,97,99,99,101,97,null,null,99,99,99,null,null,103,103,101,101,null,101,null,93,null,91,null,95,null,95,null,97,99,99,97,99,97,97,97,null,95,95,null,null,null,97,101,99,99,101,null,null,null,null,95,null,null,null,93,null,null,null,null,88,null,null,null,null,null,null,null,null,88,null,90,92,null,null,94,96,null,null,96,96,98,null,96,96,null,null,94,96,92,null,94,null,96,98,100,100,null,96,94,null,null,null,102,null,null,null,null,102,null,null,94,94,94,96,null,96,null,null,92,94,96,null,94,null,94,94,null,96,null,98,null,null,null,100,100,102,null,null,98,null,96,98,null,null,null,null,null,null,null,null,94,94,null,94,null,null,null,null,94,96,96,96,96,96,null,96,null,null,96,96,98,98,null,100,98,100,null,null,null,94,94,96,92,92,92,94,null,98,null,98,94,96,94,96,null,null,null,100,null,null,92,null,92,94,null,96,98,96,96,null,98,98,98,null,96,null,96,96,null,null,null,100,98,null,null,100,96,98,null,null,98,98,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,96,96,98,null,null,100,100,96,98,100,98,null,null,96,98,98,98,96,null,94,null,null,null,null,100,98,null,100,null,null,102,null,null,null,null,null,null,87,null,null,null,null,null,95,95,null,97,null,null,null,97,97,null,95,97,95,97,95,null,null,null,null,null,null,null,95,null,null,null,null,null,null,101,97,null,93,null,null,null,null,103,null,null,95,null,95,93,95,95,95,null,null,93,null,93,null,null,null,null,95,95,null,null,95,97,97,99,null,null,null,null,103,null,null,null,95,95,99,null,93,null,null,null,null,null,93,95,97,95,95,97,null,97,97,null,95,null,null,null,null,null,95,97,99,97,97,99,null,null,99,97,101,null,95,null,null,93,97,97,91,93,91,93,93,91,93,93,null,null,99,97,93,93,95,97,93,null,null,95,null,null,null,93,91,93,95,95,95,97,null,null,null,null,null,null,99,null,null,null,null,null,97,null,95,null,null,null,null,null,99,null,null,null,95,95,null,97,97,null,99,99,95,null,null,null,null,null,null,101,99,null,95,95,null,null,null,null,97,99,null,95,99,null,97,null,null,null,97,null,null,null,101,null,99,null,null,null,103,null,null,null,null,null,94,94,null,null,null,null,null,98,94,94,null,null,null,null,96,null,96,null,null,96,null,102,null,98,null,null,null,null,null,null,null,null,94,94,null,94,96,94,null,null,null,null,null,null,null,94,94,null,null,null,null,null,null,null,null,100,null,null,96,94,null,96,null,null,null,null,94,null,null,null,null,96,null,null,94,null,null,96,null,null,96,null,null,null,null,null,96,null,null,null,96,96,null,98,null,null,98,null,null,null,null,102,null,null,92,94,96,null,96,96,null,90,null,null,92,92,null,92,92,null,null,92,null,92,94,92,null,100,96,null,94,null,null,94,96,null,98,null,92,94,94,96,null,null,92,90,null,null,94,null,94,96,94,96,98,96,null,null,null,null,94,96,null,null,94,null,94,94,null,null,null,98,98,null,null,100,null,null,null,102,null,null,96,null,null,96,null,null,null,null,96,null,100,null,null,null,null,null,null,102,null,null,104,104,null,null,null,null,null,97,null,95,95,null,95,97,null,null,95,null,null,103,null,97,95,95,null,null,93,93,null,null,null,95,null,null,null,93,null,null,97,null,93,null,null,null,null,null,95,null,null,null,null,null,null,null,95,97,95,null,95,null,97,99,null,null,null,null,91,93,null,95,null,null,null,97,95,null,89,null,null,91,null,null,null,null,null,null,null,null,91,null,93,95,93,91,null,null,95,null,93,null,95,null,null,null,null,null,null,93,null,null,null,95,null,null,null,null,89,null,null,95,null,null,95,null,95,93,null,null,null,97,95,null,null,null,95,null,null,null,null,95,null,95,99,null,97,null,null,null,null,103,95,null,95,null,null,97,null,null,null,null,null,null,null,null,null,null,null,96,94,null,null,null,98,null,null,null,104,null,null,null,null,null,null,null,null,null,94,94,null,null,null,94,null,98,94,null,null,96,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,94,null,null,null,null,null,null,null,null,null,92,null,null,null,null,94,null,94,null,92,null,94,92,94,94,96,94,92,null,null,null,null,94,94,null,null,96,null,92,null,96,null,null,null,null,null,null,null,94,null,null,null,96,null,null,102,null,null,null,null,null,null,null,null,null,null,null,null,null,null,93,null,93,null,null,null,99,null,null,null,null,null,null,null,null,null,null,null,null,null,null,91,null,null,null,91,null,null,null,null,null,97,null,null,null,91,null,95,null,null,null,null,null,null,null,97,null,null,null,null,101,null,94,null,null,null,null,null,null,92,null,null,null,96,null,null,94,null,null,96,null,null,93,null,null,null,null,null,null,null,97]\";\r\n\t\tTreeNode one = TreeNode.str2tree(s);\r\n \tFindDuplicateSubtrees3 findDuplicateSubtrees = new FindDuplicateSubtrees3();\r\n\t\tList<TreeNode> result = findDuplicateSubtrees.findDuplicateSubtrees(one);\r\n\t\tfor (TreeNode treeNode : result) {\r\n\t\t\tSystem.out.println(treeNode);\r\n\t\t}\r\n\t}", "static void d() {\n\t\t\t\tint B[] = new int[12];\n\t\t\t\tint tam = 0, tam1 = 0;\n\t\t\t\tB[0] = 12;\n\t\t\t\tB[1] = 21;\n\t\t\t\tB[2] = 47;\n\t\t\t\tB[3] = 9;\n\t\t\t\tB[4] = 56;\n\t\t\t\tB[5] = 43;\n\t\t\t\tB[6] = 50;\n\t\t\t\tB[7] = 54;\n\t\t\t\tB[8] = 51;\n\t\t\t\tB[9] = 41;\n\t\t\t\tB[10] = 97;\n\t\t\t\tB[11] = 12;\n\t\t\t\tint max = B[0];\n\t\t\t\tfor (int i = 1; i < B.length; i++) {\n\t\t\t\t\tif (B[i] > max) {\n\t\t\t\t\t\tmax = B[i];\n\t\t\t\t\t\ttam = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (int i = tam; i > 0; i--) {\n\t\t\t\t\tB[i] = B[i - 1];\n\t\t\t\t}\n\t\t\t\tB[0] = max;\n\n\t\t\t\tinMang(B);\n\n\t\t\t\tmax = B[1];\n\t\t\t\ttam = 0;\n\t\t\t\tfor (int i = 2; i < B.length; i++) {\n\t\t\t\t\tif (B[i] > max) {\n\t\t\t\t\t\tmax = B[i];\n\t\t\t\t\t\ttam = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (int i = tam; i > 1; i--) {\n\t\t\t\t\tB[i] = B[i - 1];\n\t\t\t\t}\n\t\t\t\tB[1] = max;\n\t\t\t\tinMang(B);\n\n\t\t\t\tmax = B[2];\n\t\t\t\ttam = 0;\n\t\t\t\tfor (int i = 3; i < B.length; i++) {\n\t\t\t\t\tif (B[i] > max) {\n\t\t\t\t\t\tmax = B[i];\n\t\t\t\t\t\ttam = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (int i = tam; i > 2; i--) {\n\t\t\t\t\tB[i] = B[i - 1];\n\t\t\t\t}\n\t\t\t\tB[2] = max;\n\t\t\t\tinMang(B);\n\t}", "public static void main(String[] args) {\n\tString NUM = \"73167176531330624919225119674426574742355349194934\" +\n \"96983520312774506326239578318016984801869478851843\" +\n \"85861560789112949495459501737958331952853208805511\" +\n \"12540698747158523863050715693290963295227443043557\" +\n \"66896648950445244523161731856403098711121722383113\" +\n \"62229893423380308135336276614282806444486645238749\" +\n \"30358907296290491560440772390713810515859307960866\" +\n \"70172427121883998797908792274921901699720888093776\" +\n \"65727333001053367881220235421809751254540594752243\" +\n \"52584907711670556013604839586446706324415722155397\" +\n \"53697817977846174064955149290862569321978468622482\" +\n \"83972241375657056057490261407972968652414535100474\" +\n \"82166370484403199890008895243450658541227588666881\" +\n \"16427171479924442928230863465674813919123162824586\" +\n \"17866458359124566529476545682848912883142607690042\" +\n \"24219022671055626321111109370544217506941658960408\" +\n \"07198403850962455444362981230987879927244284909188\" +\n \"84580156166097919133875499200524063689912560717606\" +\n \"05886116467109405077541002256983155200055935729725\" +\n \"71636269561882670428252483600823257530420752963450\";\n\n //greatest combo array\n int[] greatestCombo = new int[13];\n //array to iterate through NUMS\n int[] combos = new int[13];\n //adjacency\n boolean adjacent = true;\n //product\n long product = 1;\n //maxProduct\n long maxProduct = 0;\n\n\t//iterating through the entire NUM string\n\tfor(int i = 0 ; i < NUM.length()-13; i++){\n\t //make a temporary array with the combination of the three numbers\n\t for(int c = 0; c < 13; c++){\n\t combos[c] = NUM.charAt(i+c);\n }\n\n\t //loop to determine if the numbers are adjacent\n for(int k = 1; k < 13; k++){\n if(abs(combos[k-1]-combos[k])>1){\n adjacent = false;\n break;\n }\n }\n\n //now that we have an adjacent 13-number array\n if(adjacent){\n //find the product\n for(int r = 0; r < 13; r++){\n product *= combos[r];\n }\n\n if(product > maxProduct){\n maxProduct = product;\n for(int p = 0; p < 13; p++){\n greatestCombo[p]=combos[p];\n }\n }\n }\n\n }\n System.out.println(maxProduct);\n\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.valueOf(\"INSTANCE\");\n byte[] byteArray0 = new byte[7];\n byteArray0[0] = (byte) (-50);\n byteArray0[1] = (byte) (-38);\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec1.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec2.getUngappedLength(byteArray0);\n Nucleotide nucleotide0 = Nucleotide.NotGuanine;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray1 = defaultNucleotideCodec0.encode((Collection<Nucleotide>) set0);\n Nucleotide nucleotide1 = defaultNucleotideCodec0.decode(byteArray0, 0L);\n assertEquals(Nucleotide.Gap, nucleotide1);\n \n defaultNucleotideCodec0.getNumberOfGapsUntil(byteArray0, 1717986918);\n long long0 = defaultNucleotideCodec1.getUngappedLength(byteArray0);\n assertEquals((-824573952L), long0);\n \n defaultNucleotideCodec1.getUngappedOffsetFor(byteArray1, (-651));\n defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, (byte) (-38));\n defaultNucleotideCodec0.getGappedOffsetFor(byteArray0, (byte) (-50));\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.decodedLengthOf(byteArray1);\n defaultNucleotideCodec3.decodedLengthOf(byteArray1);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n int int0 = defaultNucleotideCodec4.getGappedOffsetFor(byteArray1, (byte) (-38));\n assertEquals(3, int0);\n \n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n int int1 = defaultNucleotideCodec5.getNumberOfGapsUntil(byteArray1, (byte) (-38));\n assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)3, (byte)29, (byte) (-32)}, byteArray1);\n assertEquals(0, int1);\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 main(String[] args) {\n\t\tRandom rnd = new Random();\n\t\tint[]data = new int[1];\n\t\tint i=0;\n\t\tfor(i=0;i<1;i++){\n\t\t\tdata[i]=rnd.nextInt(1000)+1;\n\t\t\tSystem.out.println(data[i]);\n\t\t\t\tint v1 = data[i]/500;\n\t\t\t\tdata[i] = data[i]%500;\n\t\t\t\tif(v1!=0){\n\t\t\t\t\tSystem.out.println(\"共有\"+v1+\"個500元\");\n\t\t\t\t}\n\t\t\t\tint v2 = data[i]/100;\n\t\t\t\tdata[i] = data[i]%100;\n\t\t\t\tif(v2!=0){\n\t\t\t\t\tSystem.out.println(\"共有\"+v2+\"個100元\");\n\t\t\t\t}\n\t\t\t\tint v3 = data[i]/50;\n\t\t\t\tdata[i] = data[i]%50;\n\t\t\t\tif(v3!=0){\n\t\t\t\t\tSystem.out.println(\"共有\"+v3+\"個50元\"); \n\t\t\t\t}\n\t\t\t\tint v4 = data[i]/10;\n\t\t\t\tdata[i] = data[i]%10;\n\t\t\t\tif(v4!=0){\n\t\t\t\t\tSystem.out.println(\"共有\"+v4+\"個10元\");\n\t\t\t\t}\n\t\t\t\tint v5 = data[i]/5;\n\t\t\t\tdata[i] = data[i]%5;\n\t\t\t\tif(v5!=0){\n\t\t\t\t\tSystem.out.println(\"共有\"+v5+\"個5元\");\n\t\t\t\t}\n\t\t\t\n\t\t\t\tint v6 = data[i]/1;\n\t\t\t\tdata[i] = data[i]%1;\n\t\t\t\tif(v6!=0){\n\t\t\t\t\tSystem.out.println(\"共有\"+v6+\"個1元\");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t \n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}", "private static void test3() {\n for (int noteNumber = 0; noteNumber < 128; noteNumber++) {\n double frequency = 440 * Math.pow(2, (noteNumber - 69) / 12.0);\n \n boolean clipMax = false;\n int block = 0;\n \n if (frequency <= 48.503) {\n block = 0;\n }\n else if (frequency <= 97.006) {\n block = 1;\n }\n else if (frequency <= 194.013) {\n block = 2;\n }\n else if (frequency <= 388.026) {\n block = 3;\n }\n else if (frequency <= 776.053) {\n block = 4;\n }\n else if (frequency <= 1552.107) {\n block = 5;\n }\n else if (frequency <= 3104.215) {\n block = 6;\n }\n else if (frequency <= 6208.431) {\n block = 7;\n \n }\n else {\n //throw new RuntimeException(\"invalid frequency !\");\n //System.out.println(\"unsupported frequency \" + frequency + \" !\");\n //System.exit(-1);\n block = 7;\n clipMax = true;\n }\n \n double f_num = frequency * Math.pow(2, (20 - block)) / 49716;\n if (clipMax) {\n f_num = 1023;\n }\n String f_num_hex = \"0000\" + Integer.toHexString((int) f_num);\n f_num_hex = f_num_hex.substring(f_num_hex.length() - 4, f_num_hex.length());\n //System.out.println(noteNumber + \" = \" + frequency + \" ---> block: \" + block + \" f_num_hex = \" + f_num_hex);\n //System.out.println(noteNumber + \" = \" + frequency);\n \n String block_hex = \"000\" + Integer.toHexString(block);\n block_hex = block_hex.substring(block_hex.length() - 3, block_hex.length());\n\n if (noteNumber % 4 == 0) {\n System.out.print(\"\\r\\n\\t\\t\\tdb \");\n }\n System.out.print(block_hex + \"h, 000h, 0\" + f_num_hex.subSequence(2, 4) + \"h, 0\" + f_num_hex.substring(0, 2) + \"h\" + ((noteNumber % 4 != 3) ? \", \" : \"\"));\n \n }\n System.out.println(\"\");\n }", "public static void main(String[] args) {\n // write your code here\n\n /**=====================================\n * Global variables\n =====================================*/\n String keyboard = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n /**\n * Rotors https://en.wikipedia.org/wiki/Enigma_rotor_details\n */\n\n String rotorName1 = \"I\";\n String rotor1 = \"EKMFLGDQVZNTOWYHXUSPAIBRCJ\";\n String rotorStep1 = \"Q\";\n\n String rotorName2 = \"II\";\n String rotor2 = \"AJDKSIRUXBLHWTMCQGZNPYFVOE\";\n String rotorStep2 = \"E\";\n\n String rotorName3 = \"III\";\n String rotor3 = \"BDFHJLCPRTXVZNYEIWGAKMUSQO\";\n String rotorStep3 = \"V\";\n\n String rotorName4 = \"IV\";\n String rotor4 = \"ESOVPZJAYQUIRHXLNFTGKDCMWB\";\n String rotorStep4 = \"J\";\n\n String rotorName5 = \"V\";\n String rotor5 = \"VZBRGITYUPSDNHLXAWMJQOFECK\";\n String rotorStep5 = \"Z\";\n\n String rotorName6 = \"VI\";\n String rotor6 = \"JPGVOUMFYQBENHZRDKASXLICTW\";\n String rotorStep6 = \"MZ\";\n\n String rotorName7 = \"VII\";\n String rotor7 = \"NZJHGRCXMYSWBOUFAIVLPEKQDT\";\n String rotorStep7 = \"MZ\";\n\n String rotorName8 = \"VIII\";\n String rotor8 = \"FKQHTLXOCBJSPDZRAMEWNIUYGV\";\n String rotorStep8 = \"MZ\";\n\n\n /**\n * Reflectors\n */\n\n String reflectorName1 = \"BETA\";\n String reflector1 = \"LEYJVCNIXWPBQMDRTAKZGFUHOS\";\n\n String reflectorName2 = \"GAMMA\";\n String reflector2 = \"FSOKANUERHMBTIYCWLQPZXVGJD\";\n\n String reflectorName3 = \"A\";\n String reflector3 = \"EJMZALYXVBWFCRQUONTSPIKHGD\";\n\n String reflectorName4 = \"B\";\n String reflector4 = \"YRUHQSLDPXNGOKMIEBFZCWVJAT\";\n\n String reflectorName5 = \"C\";\n String reflector5 = \"FVPJIAOYEDRZXWGCTKUQSBNMHL\";\n\n String reflectorName6 = \"B THIN\";\n String reflector6 = \"ENKQAUYWJICOPBLMDXZVFTHRGS\";\n\n String reflectorName7 = \"C THIN\";\n String reflector7 = \"RDOBJNTKVEHMLFCWZAXGYIPSUQ\";\n\n String reflectorName8 = \"ETW\";\n String reflector8 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n /**=====================================\n * Initialisation\n =====================================*/\n\n System.out.println(\"Initialising...\");\n\n System.out.println(\"Loading keyboard...\");\n\n for (int i = 0; i < 26; i++) {\n\n System.out.println(\"Allocate \" + keyboard.charAt(i) + \" key to position \" + (i));\n\n }\n\n System.out.println(\"\");\n\n System.out.println(\"Looking for rotors...\");\n\n String[] rotorSet = {rotor1, rotor2, rotor3, rotor4, rotor5, rotor6, rotor7, rotor8,};\n String[] rotorNames = {rotorName1, rotorName2, rotorName3, rotorName4, rotorName5, rotorName6, rotorName7, rotorName8,};\n String[] rotorSteppingPositions = {rotorStep1, rotorStep2, rotorStep3, rotorStep4, rotorStep5, rotorStep6, rotorStep7, rotorStep8};\n String rotorNameList = java.util.Arrays.toString(rotorNames);\n System.out.println(\"Found rotors \" + rotorNameList + \".\");\n System.out.println(\"\");\n\n for (int i = 0; i < 8; i++) {\n\n System.out.println(\"Rotor \" + rotorNames[i] + \":\" + \"\\t\" + rotorSet[i] + \"\\t Stepping position \" + rotorSteppingPositions[i]);\n\n }\n\n System.out.println(\"\");\n\n System.out.println(\"Looking for reflectors...\");\n\n String[] reflectorSet = {reflector1, reflector2, reflector3, reflector4, reflector5, reflector6, reflector7, reflector8,};\n String[] reflectorNames = {reflectorName1, reflectorName2, reflectorName3, reflectorName4, reflectorName5, reflectorName6, reflectorName7, reflectorName8,};\n String reflectorNameList = java.util.Arrays.toString(reflectorNames);\n System.out.println(\"Found reflectors \" + reflectorNameList + \".\");\n System.out.println(\"\");\n\n for (int i = 0; i < 8; i++) {\n\n System.out.println(reflectorNames[i] + \":\" + \"\\t\" + reflectorSet[i]);\n\n }\n\n System.out.println(\"\");\n\n /**=====================================\n * Setup\n =====================================*/\n\n /*\n Setup reflector\n */\n\n System.out.println(\"Please enter reflector, selecting from \" + reflectorNameList + \".\");\n int[] reflector = selectWheel(reflectorSet, reflectorNames, keyboard);\n\n /*\n Setup rotors\n */\n\n //Setup left rotor\n System.out.println(\"Please enter left rotor, selecting from \" + rotorNameList + \".\");\n\n int[] rotorLeft = selectWheel(rotorSet, rotorNames, keyboard);\n int[] steppingLeft = getSteppingPosition(rotorLeft, rotorSet, rotorSteppingPositions, keyboard);\n\n //Setup middle rotor\n System.out.println(\"Please enter middle rotor, selecting from \" + rotorNameList + \".\");\n\n int[] rotorMiddle = selectWheel(rotorSet, rotorNames, keyboard);\n int[] steppingMiddle = getSteppingPosition(rotorMiddle, rotorSet, rotorSteppingPositions, keyboard);\n\n //Setup right rotor\n System.out.println(\"Please enter right rotor, selecting from \" + rotorNameList + \".\");\n\n int[] rotorRight = selectWheel(rotorSet, rotorNames, keyboard);\n int[] steppingRight = getSteppingPosition(rotorRight, rotorSet, rotorSteppingPositions, keyboard);\n\n /*\n Setup letter ring\n */\n\n //Setup left letter ring\n System.out.println(\"Please enter left letter ring position, single alphabet only.\");\n int ringLeft = getPosition(keyboard);\n\n //Setup left middle ring\n System.out.println(\"Please enter middle letter ring position, single alphabet only.\");\n int ringMiddle = getPosition(keyboard);\n\n //Setup right letter ring\n System.out.println(\"Please enter right letter ring position, single alphabet only.\");\n int ringRight = getPosition(keyboard);\n\n /*\n Setup rotor position\n */\n\n //Setup left letter ring\n System.out.println(\"Please enter left window position, single alphabet only.\");\n int windowLeft = getPosition(keyboard);\n\n //Setup left middle ring\n System.out.println(\"Please enter middle window position, single alphabet only.\");\n int windowMiddle = getPosition(keyboard);\n\n //Setup right letter ring\n System.out.println(\"Please enter right window position, single alphabet only.\");\n int windowRight = getPosition(keyboard);\n\n /*\n Setup plug-board\n */\n\n System.out.println(\"Please enter plug-board setting, even number of alphabets only.\");\n char[] plugboard = insertPlugs(keyboard);\n\n boolean loop = true;\n\n while(loop) {\n\n /**=====================================\n * Read message into char[]\n =====================================*/\n\n //request input\n System.out.println(\"Please enter your message, maximum 500 characters, alphabets only.\");\n char[] messageInput = readMessage(keyboard);\n\n /**=====================================\n * run message through Enigma Machine\n =====================================*/\n\n //run through plugboard\n char[] messageInProgress = runPlugboard(messageInput, plugboard);\n\n //Casting into number array\n String messageBeforeRotorString = new String(messageInProgress);\n int[] messageNumberArray = getNumberArray(messageBeforeRotorString, keyboard);\n\n //run through rotors one number by one number\n\n int messageSize = Array.getLength(messageNumberArray);\n\n for (int i = 0; i < messageSize; i++) {\n\n //stepping\n\n /*\n Right rotor always step. Middle rotor steps whenever right rotor stepped at right stepping position and\n at middle rotor at stepping position itself. Left rotor steps whenever middle rotor steps at middle\n stepping position\n variables involved: int windowRight/Middle/Left, int[] steppingRight/Middle\n */\n\n //check if double stepping available.\n\n int middleSteppingSize = Array.getLength(steppingMiddle);\n\n for (int j = 0; j < middleSteppingSize; j++) {\n\n if (windowMiddle == steppingMiddle[j]) {\n\n windowMiddle++;\n\n if (windowMiddle > 25) {\n\n windowMiddle = windowMiddle - 26;\n\n }\n\n //Stepping left as well\n\n windowLeft++;\n\n if (windowLeft > 25) {\n\n windowLeft = windowLeft - 26;\n\n }\n\n System.out.println(\"Middle stepping to \" + windowMiddle);\n System.out.println(\"\");\n System.out.println(\"Left stepping to \" + windowLeft);\n System.out.println(\"\");\n break;\n\n }\n\n }\n\n //check if right stepped on stepping position.\n\n int rightSteppingSize = Array.getLength(steppingRight);\n\n for (int j = 0; j < rightSteppingSize; j++) {\n\n if (windowRight == steppingRight[j]) {\n\n windowMiddle++;\n\n if (windowMiddle > 25) {\n\n windowMiddle = windowMiddle - 26;\n\n }\n\n System.out.println(\"Middle stepping to \" + windowMiddle);\n System.out.println(\"\");\n break;\n\n }\n\n }\n\n //right rotor always steps\n\n windowRight++;\n\n if (windowRight > 25) {\n\n windowRight = windowRight - 26;\n\n }\n\n System.out.println(\"Right stepping to \" + windowRight);\n System.out.println(\"\");\n\n //run number through right rotor\n messageNumberArray[i] = runRotor(messageNumberArray[i], rotorRight, ringRight, windowRight);\n\n //run number through middle rotor\n messageNumberArray[i] = runRotor(messageNumberArray[i], rotorMiddle, ringMiddle, windowMiddle);\n\n //run number through left rotor\n messageNumberArray[i] = runRotor(messageNumberArray[i], rotorLeft, ringLeft, windowLeft);\n\n //run number through reflector\n messageNumberArray[i] = runRotor(messageNumberArray[i], reflector, 0, 0);\n\n //run number through left rotor reversed\n messageNumberArray[i] = runRotorReversed(messageNumberArray[i], rotorLeft, ringLeft, windowLeft);\n\n //run number through middle rotor reversed\n messageNumberArray[i] = runRotorReversed(messageNumberArray[i], rotorMiddle, ringMiddle, windowMiddle);\n\n //run number through right rotor reversed\n messageNumberArray[i] = runRotorReversed(messageNumberArray[i], rotorRight, ringRight, windowRight);\n\n }\n\n\n //casting output message into char[]\n String messageAfterRotor = getAlphabeticalString(messageNumberArray, keyboard);\n char[] messageAfterRotorArray = messageAfterRotor.toCharArray();\n\n //run plugboard again\n char[] messageOutputArray = runPlugboard(messageAfterRotorArray, plugboard);\n\n //casting final message into String and print\n String messageOutput = new String(messageOutputArray);\n System.out.println(\"message output is: \" + messageOutput + \".\");\n System.out.println(\"\");\n\n }\n\n }", "public static void main(String[] args) {\n int[][] bn = new int[127][];\n \n for(int i = 1; i <128; i++)\n {\n int m = (int) (Math.log10(i)/Math.log10(2));\n \n int l = i, j = 2*m; int[] b = new int[2*m+1]; \n \n while(l >= 1)\n {\n int k = l;\n l = l/2;\n \n b[j] = k - l*2; j--;\n }\n \n bn[i-1] = b;\n }\n \n /*int[] ds = new int[255*255*8];*/ int[] df = new int[14]; Arrays.fill(df, 0);\n //int l = 0;\n \n for(int i = 0; i <127; i++)\n {\n for(int j = 0; j<127; j++)\n {\n int k, d = 0;\n for(k = 0; k < bn[i].length; k++)\n { \n if(bn[i][k] == 0)\n {\n d++;\n }\n else if(d > 0)\n {\n //System.out.print(d+\",\");\n df[d-1]++; d = 0;\n }\n }\n \n for(k = 0; k < bn[j].length; k++)\n {\n if(bn[j][k] == 0)\n {\n d++;\n }\n else if(d > 0)\n {\n //System.out.print(d+\",\");\n df[d-1]++; d = 0;\n }\n }\n \n if(d > 0)\n {\n //System.out.print(d+\",\");\n df[d-1]++; d = 0;\n }\n }\n }\n double sum = sum(df); int[] numb = {1,3,3,5,5,5,5,7,7,7,7,7,7,7,7}; int tb = 0;\n \n for(int i = 0; i < 14; i++)\n {\n tb = tb + (int)((df[i]*100/sum) + 0.5)*numb[i];\n \n System.out.print((int)((df[i]*100/sum) + 0.5)+\",\");\n }\n System.out.println();\n System.out.println(tb);\n }", "@Test\n public void subSequencesTest3() {\n String text = \"wnylazlzeqntfpwtsmabjqinaweaocfewgpsrmyluadlybfgaltgljrlzaaxvjehhygggdsrygvnjmpyklvyilykdrphepbfgdspjtaap\"\n + \"sxrpayholutqfxstptffbcrkxvvjhorawfwaejxlgafilmzrywpfxjgaltdhjvjgtyguretajegpyirpxfpagodmzrhstrxjrpirlbfgkhhce\"\n + \"wgpsrvtuvlvepmwkpaeqlstaqolmsvjwnegmzafoslaaohalvwfkttfxdrphepqobqzdqnytagtrhspnmprtfnhmsrmznplrcijrosnrlwgds\"\n + \"bylapqgemyxeaeucgulwbajrkvowsrhxvngtahmaphhcyjrmielvqbbqinawepsxrewgpsrqtfqpveltkfkqiymwtqssqxvchoilmwkpzermw\"\n + \"eokiraluaammkwkownrawpedhcklrthtftfnjmtfbftazsclmtcssrlluwhxahjeagpmgvfpceggluadlybfgaltznlgdwsglfbpqepmsvjha\"\n + \"lwsnnsajlgiafyahezkbilxfthwsflgkiwgfmtrawtfxjbbhhcfsyocirbkhjziixdlpcbcthywwnrxpgvcropzvyvapxdrogcmfebjhhsllu\"\n + \"aqrwilnjolwllzwmncxvgkhrwlwiafajvgzxwnymabjgodfsclwneltrpkecguvlvepmwkponbidnebtcqlyahtckk\";\n\n String[] expected = new String[6];\n expected[0] = \"wlfaafrdarvgypipgaputcjflmftgepfmrrhpvwllnfofdqqtmhnjlyeewvxhceqpgftysopelkrhhjtmlapcagllpasazflfthohdtrrvobliwnhazafeevpnlk\";\n expected[1] = \"nzpbwemllljggylhdaatprhwgzxdttypzxlhslksmeohkronrpmprwlmubovmylispqkmqizouwactmatlhmedagfmlafktgmfhcjlhxoagjullcrfxbslceoeyk\";\n expected[2] = \"yewjewyytzegvkyespyqtkoaarjhyaiarjbcrvptsgsatpbyhrslogaycawnajvnxspfwxlekakwkftzcujgglldbswjybhktxcizpypppchanlxwawjctgpnba\";\n expected[3] = \"lqtqaglbgahdnlkppshffxrefygjgjrghrfeveaavmllthqtstrrsdpxgjsgprqarrvktvmriaopltfsswevgytwpvslaiwirjfricwgzxmhqjzvljnglrumbth\";\n expected[4] = \"ansiopuflahsjvdbjxoxfvajiwavuepospgwtpeqjzavfezapfmcnsqeurrthmbweqeqqcwmrmwerfbcshaflbzsqjnghlswabsbibwvvdfsrowgwvyowpvwict\";\n expected[5] = \"ztmncsagjxyrmyrftrlsbvwxlpljrgxdtikgumqowaawxpdgnnzirbgalkhahibewtlishkwamndtnflrxgpufngehniexfgwbykxcncyrelwlmkigmdnklkdqc\";\n int keyLen = 6;\n String[] owns = this.ic.subSequences(text, keyLen);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint tc=sc.nextInt();\n\t\twhile(tc-->0)\n\t\t{\n\t\t\tString s=sc.next();\n\t\t\tchar ch[]=s.toCharArray();\n\t\t\tint first=-1;\n\t\t\tint last=-1;\n\t\t\tint crash=0;\n\t\t\tint d=0;\n\t\t\tfor(int i=0,j=ch.length;i<j-1;i++)\n\t\t\t{\n\t\t\t\tif(ch[i]=='r'&&ch[i+1]=='l')\n\t\t\t\t{\n\t\t\t\t\tch[i]='d';\n\t\t\t\t\tch[i+1]='d';\n\t\t\t\t\tcrash+=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i=0,j=ch.length;i<j;i++)\n\t\t\t{\n\t\t\t\tif(ch[i]=='d')\n\t\t\t\t{\n\t\t\t\t\td+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(d==0)\n\t\t\t{\n\t\t\t\tSystem.out.println(0);\n\t\t\t}else\n\t\t\t{\n\t\t\t\tfor(int i=0,j=ch.length;i<j;i++)\n\t\t\t\t{\n\t\t\t\t\tif(ch[i]=='d')\n\t\t\t\t\t{\n\t\t\t\t\t\tfirst=i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor(int i=ch.length-1;i>=0;i--)\n\t\t\t\t{\n\t\t\t\t\tif(ch[i]=='d')\n\t\t\t\t\t{\n\t\t\t\t\t\tlast=i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(first==last)\n\t\t\t\t{\n\t\t\t\t\tfor(int i=0;i<first;i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(ch[i]=='r')\n\t\t\t\t\t\t\tcrash+=1;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int i=ch.length-1;i>=first;i--)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(ch[i]=='l')\n\t\t\t\t\t\t\tcrash+=1;\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(crash);\n\t\t\t\t}else{\n\t\t\t\t\tfor(int i=0;i<first;i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(ch[i]=='r')\n\t\t\t\t\t\t\tcrash+=1;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int i=ch.length-1;i>=last;i--)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(ch[i]=='l')\n\t\t\t\t\t\t\tcrash+=1;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int i=first;i<=last;i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(ch[i]!='d')\n\t\t\t\t\t\t\tcrash+=1;\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(crash);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test17() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[9];\n defaultNucleotideCodec0.toString(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.getUngappedLength(byteArray0);\n Nucleotide nucleotide0 = Nucleotide.Gap;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray1 = defaultNucleotideCodec0.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec1.decode(byteArray0, 0);\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray2 = defaultNucleotideCodec2.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.toString(byteArray1);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec5.toString(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec6 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec6.getNumberOfGapsUntil(byteArray1, 4);\n DefaultNucleotideCodec.values();\n defaultNucleotideCodec1.isGap(byteArray2, 0);\n defaultNucleotideCodec4.getGappedOffsetFor(byteArray1, (-16908803));\n defaultNucleotideCodec0.getNumberOfGapsUntil(byteArray0, 1497825280);\n // Undeclared exception!\n try { \n DefaultNucleotideCodec.valueOf(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.residue.nt.DefaultNucleotideCodec.\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "private static byte[] m17790a(Bitmap bitmap) {\n int i;\n int i2;\n int i3;\n int width = bitmap.getWidth();\n int height = bitmap.getHeight();\n OutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n for (i = 0; i < 32; i++) {\n byteArrayOutputStream.write(0);\n }\n int[] iArr = new int[(width - 2)];\n bitmap.getPixels(iArr, 0, width, 1, 0, width - 2, 1);\n Object obj = iArr[0] == -16777216 ? 1 : null;\n Object obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n int length = iArr.length;\n width = 0;\n int i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n int i5 = i4;\n int i6 = i5 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i3 = i - 1;\n } else {\n i3 = i;\n }\n iArr = new int[(height - 2)];\n bitmap.getPixels(iArr, 0, 1, 0, 1, 1, height - 2);\n obj = iArr[0] == -16777216 ? 1 : null;\n obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n length = iArr.length;\n width = 0;\n i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n i6 = i4 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i--;\n }\n for (i6 = 0; i6 < i3 * i; i6++) {\n C5225r.m17788a(byteArrayOutputStream, 1);\n }\n byte[] toByteArray = byteArrayOutputStream.toByteArray();\n toByteArray[0] = (byte) 1;\n toByteArray[1] = (byte) i5;\n toByteArray[2] = (byte) i4;\n toByteArray[3] = (byte) (i * i3);\n C5225r.m17787a(bitmap, toByteArray);\n return toByteArray;\n }", "private int m3423z(int i, int i2) {\n int i3;\n int i4;\n for (int size = this.f4373c.size() - 1; size >= 0; size--) {\n C0933b bVar = this.f4373c.get(size);\n int i5 = bVar.f4379a;\n if (i5 == 8) {\n int i6 = bVar.f4380b;\n int i7 = bVar.f4382d;\n if (i6 < i7) {\n i4 = i6;\n i3 = i7;\n } else {\n i3 = i6;\n i4 = i7;\n }\n if (i < i4 || i > i3) {\n if (i < i6) {\n if (i2 == 1) {\n bVar.f4380b = i6 + 1;\n bVar.f4382d = i7 + 1;\n } else if (i2 == 2) {\n bVar.f4380b = i6 - 1;\n bVar.f4382d = i7 - 1;\n }\n }\n } else if (i4 == i6) {\n if (i2 == 1) {\n bVar.f4382d = i7 + 1;\n } else if (i2 == 2) {\n bVar.f4382d = i7 - 1;\n }\n i++;\n } else {\n if (i2 == 1) {\n bVar.f4380b = i6 + 1;\n } else if (i2 == 2) {\n bVar.f4380b = i6 - 1;\n }\n i--;\n }\n } else {\n int i8 = bVar.f4380b;\n if (i8 <= i) {\n if (i5 == 1) {\n i -= bVar.f4382d;\n } else if (i5 == 2) {\n i += bVar.f4382d;\n }\n } else if (i2 == 1) {\n bVar.f4380b = i8 + 1;\n } else if (i2 == 2) {\n bVar.f4380b = i8 - 1;\n }\n }\n }\n for (int size2 = this.f4373c.size() - 1; size2 >= 0; size2--) {\n C0933b bVar2 = this.f4373c.get(size2);\n if (bVar2.f4379a == 8) {\n int i9 = bVar2.f4382d;\n if (i9 == bVar2.f4380b || i9 < 0) {\n this.f4373c.remove(size2);\n mo7620a(bVar2);\n }\n } else if (bVar2.f4382d <= 0) {\n this.f4373c.remove(size2);\n mo7620a(bVar2);\n }\n }\n return i;\n }", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.1 ===============\\n\");\n\t\t/*\n\t\tO X O X O X O \n\t\tX O X O X O X \n\t\tO X O X O X O \n\t\tX O X O X O X \n\t\tO X O X O X O \n\t\tX O X O X O X \n\t\tO X O X O X O \n\t\t*/\n\t\t// Pattern1 Start\n\t\tint size = 7;\n\t\n\t\tfor (int j=0;j<size;j++) {\n\t\t\tfor (int i=0;i<size;i++) {\n\t\t\t\tif((i+j)%2==0) \n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"O \");\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.print(\"X \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\t\n\t\t// Pattern1 End\n\t\tSystem.out.println(\"\\n============== Prog.2 ===============\\n\");\n\t\t/*\n\t\t* * * * * * * * * \n\t\t* * * * * * * \n\t\t * * * * * * \n\t\t * * * * * \n\t\t * * * * \n\t\t * * * \n\t\t * * * \n\t\t * * \n\t\t * \n\t\t * \n\t\t *\n\t\t * */\n\t\t// Pattern 2 Start\n\t\tint maxNum;\n\t\tint arr[] = {8,2,4,1,13,7,5,3};\n\t\tSystem.out.print(\"Length of array: \"+arr.length+\"\\nValues in Array:\");\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\tSystem.out.print(arr[i]+\" \");\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\t\n\t\tfor (int i=0;i<arr.length-1;i++) {\n\t\t\tif (arr[i]>arr[i+1]) {\n\t\t\t\tint tmp=arr[i+1]; // small value in tmp\n\t\t\t\tarr[i+1]=arr[i]; // large value\n\t\t\t\tarr[i]=tmp;\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\tSystem.out.print(arr[i]+\" \");\n\t\t}\n\t\tmaxNum=Array.getInt(arr, arr.length-1);\n\t\tSystem.out.print(\"\\nMax number in array: \"+maxNum+\"\\n\\n\");\n\t\t\n\t\t\n\t\tfor (int j=0;j<maxNum;j++) {\n\t\t\tfor (int i=0;i<arr.length;i++) {\n\t\t\t\tif (j>=arr[i]) {\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.print(\"* \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\n\t\t// Pattern 2 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.3 ===============\\n\");\n\t\t\n\t\t// Pattern 3 Start\n\t\t\n\t\t// Find missing value without using sorting\n\t\tint arr2[] = {4,5,10,2,9,3,1,11,6,8};\n\t\tint total=0;\n\t\tfor (int i=0;i<arr2.length;i++) {\n\t\t\ttotal=total+arr2[i];\n\t\t}\n\t\tSystem.out.print(\"Array size: \"+arr2.length+\" & Array sum is: \"+total);\n\t\t\n\t\t// Pattern 3 End\n\t\tSystem.out.println(\"\\n============== Prog.4 ===============\\n\");\n\t\t// Pattern 4 Start\n\t\t/*\n\t\t *\n\t\t **\n\t\t ***\n\t\t ****\n\t\t ******\n\t\t * */\n\t\tint range=5;\n\t\tfor (int i=0;i<range;i++) {\n\t\t\tfor (int j=0;j<=i;j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\t\n\t\t// Pattern 4 End\n\t\tSystem.out.println(\"\\n============== Prog.5 ===============\\n\");\n\t\t// Pattern 5 Start\n\t\t/*\n\t\t *\n\t\t * *\n\t\t * * *\n\t\t * * * *\n\t\t * * * * *\n\t\t * */\n\t\tint prog5Length=5;\n\t\tfor (int i=1;i<=prog5Length;i++) {\n\t\t\tfor (int j=4;j>=i;j--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int j=1;j<=i;j++) {\n\t\t\t\tSystem.out.print(\" *\");\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\t\n\t\t// Pattern 5 End\n\t\tSystem.out.println(\"\\n============== Prog.6 ===============\\n\");\n\t\t/*\n\t\t *\n\t\t * *\n\t\t * * *\n\t\t * * * * \n\t\t* * * * *\n\t\t * * * *\n\t\t * * *\n\t\t * *\n\t\t * \n\t\t * */\n\t\t// Pattern 6 Start\n\t\tint prog6Size=15;\n\t\tfor(int i=1;i<=prog6Size/2;i++) {\n\t\t\tfor(int j=(prog6Size/2)-1;j>=i;j--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int k=1;k<=i;k++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\t\n\t\t}\n\t\tfor(int i=1;i<=(prog6Size/2)-1;i++) {\n\t\t\tfor(int j=1;j<=i;j++) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int k=(prog6Size/2)-1;k>=i;k--) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\t\n\t\t}\n\t\t// Pattern 6 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.7 ===============\\n\");\n\t\t/*\n\t\t * Print integer line using 2D array, Ex.\n\t\t * 1\n\t\t * 2\n\t\t * 3\n\t\t * 4\n\t\t * 5\n\t\t * */\n\t\t// Pattern 7 Start\n\t\tint row=5,col=1;\n\t\tint[][] my2DArray=new int[row][col];\n\t\tmy2DArray[0][0]=1;\n\t\tmy2DArray[1][0]=2;\n\t\tmy2DArray[2][0]=3;\n\t\tmy2DArray[3][0]=4;\n\t\tmy2DArray[4][0]=5;\n\t\tfor(int i=0;i<row;i++) {\n\t\t\tSystem.out.println(my2DArray[i][0]);\n\t\t}\n\t\t// Pattern 7 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.8 ===============\\n\");\n\t\t/*\n\t\t *\n *\n *\n *\n *\n\t\t* */\n\t\t// Pattern 8 Start\n\t\tint prog8Size=5;\n\t\tfor (int m=1;m<=prog8Size;m++) {\n\t\t\tfor (int i=prog8Size-1;i>m-1;i--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}System.out.print(\" *\\n\");\n\t\t}\n\t\t// Pattern 8 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.9 ===============\\n\");\n\t\t// Pattern 9 Start\n\t\t\n\t\t// Pattern 9 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.10 ===============\\n\");\n\t\t// Pattern 10 Start\n\t\t\n\t\t// Pattern 10 End\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint[][] numArr = new int[][] {\r\n\t\t\t{1,1,1,1},\r\n\t\t\t{1,1,1,1,1,1,1},\r\n\t\t\t{1,1,1,1,1,1},\r\n\t\t\t{1,1},\r\n\t\t\t{1,1,1,1,1}\r\n\t\t};\r\n\t\t\r\n\t\t//1\r\n\t\tfor (int i = 0; i < numArr.length; i++) {\r\n\t\t\tfor (int j = 0; j < numArr[i].length; j++) {\r\n\t\t\t\tnumArr[i][j] = (int)(Math.random() * 101);\r\n\t\t\t\tSystem.out.println(numArr[i][j]);\r\n\t\t\t}\r\n\t\t} \r\n\t\tSystem.out.println(\"++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\r\n\t\t\r\n\t\t// 2\r\n\t\tint sum = 0;\r\n\t\tint count = 0;\r\n\r\n\t\tfor ( int i = 0 ; i <numArr.length; i++){\r\n\t\t\tfor (int j = 0; j < numArr[i].length; j++){\r\n\t\t\t\tsum += numArr[i][j];\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.printf(\"%d, %.2f\\n\", sum, (double)sum / count);\r\n\t\t\r\n\t\tSystem.out.println(\"++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\r\n\t\t\r\n\t\t// 3\r\n\t\tfor (int i = 0; i < numArr.length; i++) {\r\n\t\t\tsum = 0;\r\n\t\t\tfor (int j = 0; j < numArr[i].length; j++) {\r\n\t\t\t\tsum += numArr[i][j];\r\n\t\t\t}\r\n\t\t\tSystem.out.printf(\"%d행의 합계: %d\\n\", i, sum);\r\n\t\t}\r\n\t\t\r\n\t\t// 배열 편하게 출력하기\r\n\t\t// System.out.printf(Arrays.toString(numArr));\r\n\t\tSystem.out.println(\"++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\r\n\t\t\r\n\t\t// 4\r\n\t\t// 제일 긴 배열 찾기\r\n\t\tint longest = 0;\r\n\t\tfor (int i = 0; i < numArr.length; i++) {\r\n\t\t\tlongest = Math.max(longest, numArr[i].length);\r\n\t\t}\r\n\t\tint[] colsum = new int[longest];\r\n\t\t\r\n\t\tfor (int i = 0; i < numArr.length; i++) {\r\n\t\t\tsum = 0;\r\n\t\t\tfor (int j = 0; j < numArr[i].length; j++) {\t\t\r\n\t\t\t\tcolsum[j] += numArr[i][j];\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"열의 합 : \" + Arrays.toString(colsum));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t/*\tfor (int i = 0; i < colsum.length; i++) {\r\n\t\t\tsum = 0;\r\n\t\t\tfor (int j = 0; j < numArr.length; j++) {\r\n\t\t\t\tif(numArr[j].length > i) {\r\n\t\t\t\t\tcolsum[i] += numArr[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"열의 합 : \" + Arrays.toString(colsum));\r\n\t\t}*/\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while(true){\n try{\n \tint n=sc.nextInt();\t\n }\n catch(Exception e){\n break;\n }\n String p=sc.next();\n String t1=sc.next();\n char text[]=t1.toCharArray();\n char pat[]=p.toCharArray();\n if(p.length()>t1.length()){\n System.out.println();\n }\n else {\n int f[]=new int[pat.length];\n f[0]=0;\n int j=0;\n for(int i=1;i<pat.length;){\n if(pat[i]==pat[j]){\n f[i]=j+1;\n i++;\n j++;\n }\n else {\n if(j>0){\n j=f[j-1];\n }\n else {\n f[i]=0;\n i++;\n }\n }\n }\n int i=0;\n j=0;\n boolean b=false;\n while(i<text.length&&j<pat.length){\n if(pat[j]==text[i]){ \n i++;\n j++;\n if(j==pat.length){\n System.out.println(i-pat.length);\n b=true;\n j=f[j-1];\n }\n }\n else if(j>0){ \n j=f[j-1];\n }\n else {\n i++;\n }\n }\n if(!b) {\n System.out.println();\n }\n System.out.println();\n \n }\n }\n }", "protected static void endPartial(long[] h) {\n h[11] += h[1]; \n h[2] ^= h[11]; \n h[1] = (h[1] << 44) | (h[1] >>> 20);\n h[0] += h[2]; \n h[3] ^= h[0]; \n h[2] = (h[2] << 15) | (h[2] >>> 49);\n h[1] += h[3]; \n h[4] ^= h[1]; \n h[3] = (h[3] << 34) | (h[3] >>> 30);\n h[2] += h[4]; \n h[5] ^= h[2]; \n h[4] = (h[4] << 21) | (h[4] >>> 43);\n h[3] += h[5]; \n h[6] ^= h[3]; \n h[5] = (h[5] << 38) | (h[5] >>> 26);\n h[4] += h[6]; \n h[7] ^= h[4]; \n h[6] = (h[6] << 33) | (h[6] >>> 31);\n h[5] += h[7]; \n h[8] ^= h[5]; \n h[7] = (h[7] << 10) | (h[7] >>> 54);\n h[6] += h[8]; \n h[9] ^= h[6]; \n h[8] = (h[8] << 13) | (h[8] >>> 51);\n h[7] += h[9]; \n h[10] ^= h[7]; \n h[9] = (h[9] << 38) | (h[9] >>> 26);\n h[8] += h[10]; \n h[11] ^= h[8]; \n h[10] = (h[10] << 53) | (h[10] >>> 11);\n h[9] += h[11]; \n h[0] ^= h[9]; \n h[11] = (h[11] << 42) | (h[11] >>> 22);\n h[10] += h[0]; \n h[1] ^= h[10]; \n h[0] = (h[0] << 54) | (h[0] >>> 10);\t\t\n\t}", "public static void main(String[] args) {\n\t\tint p[]=new int[200];\n\t\tint n;int count=0;\n\t\tint pp=0;\n\t\tfor(int i=2;i<1000;i++) {\n\t\t\tint flag=1;\n\t\t\tfor(int j=2;j<i;j++) {\n\t\t\t\tif(i%j==0) {\n\t\t\t\t\tflag++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t//checking if flag is 0 or not\t\n\t\t\t}if(flag==1) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(i);\n\t\t\t \n\t\t\t\tp[pp]=i;\n\t\t\t pp++;\n\t\t\t count++;\n\t\t\t}\n\t}\n\t\tn=count;\n\t//for(int i=0;i<p.length;i++) {\n\t//if(p[i]!=0)\n\t //System.out.println(p[i]);\n\t//}\n\tint k=0;\n\tint count1=0;\n\tboolean b=false;\n\tint aa[]=new int[200];\t\n\t//calling my stack class \n\tMyStack m=new MyStack();\n\n\tfor(int i=0;i<p.length-2;i++) {\n\t\tfor(int j=i+1;j<p.length;j++) {\n\t\tif(p[i]!=0&&p[j]!=0)\n\t\t//calling check method anagram calss\t\n\t\t\tb=AnaQueue.check(p[i],p[j]);\n\t\tif(b==true) {\n\t\t\tSystem.out.println(p[i]+\" \"+p[j]);\n\t\t\taa[k]=p[i];\n\t\t\tm.push(p[i]);\n\t\t//\tSystem.out.println(aa[k]);\n\t\t\tk++; \n\t\t\taa[k]=p[j];\n\t\t\tk++;\n\t\t\tm.push(p[j]);\n\t\t\tcount1++;\n//\t\t\tif(p[i]==aa[k-2]) {\n//\t\t\t\tSystem.out.println(p[i]+\" \"+aa[k-2]);\n//\t\t\t}\n\t\t//\tSystem.out.println(aa[k]);\n\t\t//\tSystem.out.println(aa[k-1]+\" \"+aa[k-2]);\n\t\t\t\t}\n\t\t}\n\n\n\t}\n\t//for(int i=0;i<count1*2;i++)\n\t//{int a=m.popint();\n\t//if(p[i]!=0)\n\t\t//System.out.println(a);\n\t//}\n\t//for(int t=0;t<aa.length;t++) {\n\t\t//if(aa[t]!=0) {\n\t\t//\tSystem.out.println(aa[t]);\n\t\t//}\n\t//}\n\tSystem.out.println(\"this is for stack\");\n\tSystem.out.println(\" ************************\");\n\n\tm.reverse();\n\t System.out.println(count1); \n\tSystem.out.println(\"this for queue\");\n\tSystem.out.println(\" ************************\");\n\tMyQueue mq=new MyQueue(count1*2);\n\tfor(int i=0;i<p.length-2;i++) {\n\t\tfor(int j=i+1;j<p.length;j++) {\n\t\tif(p[i]!=0&&p[j]!=0)\n\t\t\tb=AnaQueue.check(p[i],p[j]);\n\t\tif(b==true) {\n\t\t\t//System.out.println(p[i]+\" \"+p[j]);\n\t\t\t//aa[k]=p[i];\n\t\t\tmq.enqueue(p[i]);\n\t\t//\tSystem.out.println(aa[k]);\n\t\t\t//k++; \n\t\t\t//aa[k]=p[j];\n\t\t\t//k++;\n\t\t\tmq.enqueue(p[j]);\n\t\t\t\n//\t\t\tif(p[i]==aa[k-2]) {\n//\t\t\t\tSystem.out.println(p[i]+\" \"+aa[k-2]);\n//\t\t\t}\n\t\t//\tSystem.out.println(aa[k]);\n\t\t//\tSystem.out.println(aa[k-1]+\" \"+aa[k-2]);\n\t\t\t\t}\n\t\t}\n\n\n\t}\n\t//for(int i=0;i<(count1*2)-1;i++);\n\t//{\n\t//int a=mq.dequeue();\n\t//System.out.println(a);\n\t//}\n\tSystem.out.println(mq);\n\n\n\t}", "public static void main(String[] args) {\n\r\n\t\tint n,i,j;\r\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tn=sc.nextInt();\r\n\t\t//System.out.println(\"n is: \"+n);\r\n\t\tBigInteger [] arr=new BigInteger[n];\r\n\t\tBeast be=new Beast();\r\n\t\tfor( i=0;i<n;i++)\r\n\t\t{arr[i]=BigInteger.valueOf(0);\r\n\t\t\tint h=sc.nextInt();\r\n\t\t\tif(h<3)\r\n\t\t\t{\r\n\t\t\t\tarr[i]=new BigInteger(\"-1\");\r\n\t\t\t}\r\n\t\t\telse if((h%3)==0)\r\n\t\t\t{\r\n\t\t\t\tfor(j=0;j<h;j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tlong x=5*(be.power(10,j));\r\n\t\t\t\t\tarr[i]=arr[i].add(BigInteger.valueOf(x));\r\n\t\t\t\t//\tSystem.out.println(arr[i]);\r\n\t\t\t\t}\r\n\t\t\t\t//System.out.println(arr[i]);\r\n\t\t\t}\r\n\t\t\telse if((h%5)==0)\r\n\t\t\t{\r\n\t\t\t\tfor(j=0;j<h;j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tlong x=3*(be.power(10,j));\r\n\t\t\t\t\tarr[i]=arr[i].add(BigInteger.valueOf(x));\r\n\t\t\t\t//\tSystem.out.println(arr[i]);\r\n\t\t\t\t}\r\n\t\t\t\t//System.out.println(arr[i]);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tint o=3;\r\n\t\t\t\twhile(o<h)\r\n\t\t\t\t{\r\n\t\t\t\t\tif((h-o)%5==0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//System.out.println(\"O is:\"+o+\"\\nH is:\"+h);\r\n\t\t\t\t\t\tfor(j=h;j>h-o;j--)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tlong x=5*(be.power(10,j-1));\r\n\t\t\t\t\t\t\tarr[i]=arr[i].add(BigInteger.valueOf(x));\r\n\t\t\t\t\t\t//\tSystem.out.println(\"array is:\"+arr[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\tfor(j=h-o-1;j>=0;j--)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tlong x=3*(be.power(10,j));\r\n\t\t\t\t\t\t\tarr[i]=arr[i].add(BigInteger.valueOf(x));\r\n\t\t\t\t\t\t//\tSystem.out.println(\"array is:\"+arr[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\to=h;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\to=o+3;}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(i=0;i<n;i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(arr[i]);\r\n\t\t}\r\n\t\t\r\n\t}", "private static int zzaz(java.lang.String r5) {\n /*\n int r0 = r5.hashCode()\n r1 = 0\n r2 = 3\n r3 = 2\n r4 = 1\n switch(r0) {\n case -1095064472: goto L_0x002a;\n case 187078296: goto L_0x0020;\n case 1504578661: goto L_0x0016;\n case 1505942594: goto L_0x000c;\n default: goto L_0x000b;\n }\n L_0x000b:\n goto L_0x0034\n L_0x000c:\n java.lang.String r0 = \"audio/vnd.dts.hd\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 3\n goto L_0x0035\n L_0x0016:\n java.lang.String r0 = \"audio/eac3\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 1\n goto L_0x0035\n L_0x0020:\n java.lang.String r0 = \"audio/ac3\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 0\n goto L_0x0035\n L_0x002a:\n java.lang.String r0 = \"audio/vnd.dts\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 2\n goto L_0x0035\n L_0x0034:\n r5 = -1\n L_0x0035:\n if (r5 == 0) goto L_0x0045\n if (r5 == r4) goto L_0x0043\n if (r5 == r3) goto L_0x0041\n if (r5 == r2) goto L_0x003e\n return r1\n L_0x003e:\n r5 = 8\n return r5\n L_0x0041:\n r5 = 7\n return r5\n L_0x0043:\n r5 = 6\n return r5\n L_0x0045:\n r5 = 5\n return r5\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.zzio.zzaz(java.lang.String):int\");\n }", "public static void main(String[] args) {\n \tlong[] fact = new long[MAXDOMINOES+1];\r\n \tfact[0] = 1;\r\n \tfor (int i=1; i<=MAXDOMINOES; i++)\r\n \t\tfact[i] = (fact[i-1]*i)%MOD;\r\n\r\n Scanner stdin = new Scanner(System.in);\r\n int numCases = stdin.nextInt();\r\n\r\n // Process each case.\r\n for (int loop=0; loop<numCases; loop++) {\r\n\r\n // Read in this case.\r\n n = stdin.nextInt();\r\n list = new int[n][2];\r\n for (int i=0; i<n; i++)\r\n for (int j=0; j<2; j++)\r\n list[i][j] = stdin.nextInt();\r\n\r\n // Special case - if all the dominoes are the same, all orderings work.\r\n if (same(list)) {\r\n \tSystem.out.println(fact[n]);\r\n \tcontinue;\r\n }\r\n\r\n // dp[mask][last][orientation] will store the number of permutations using the dominoes indicated by\r\n // mask, with the last domino last facing in the direction dictated by orientation. If orientation is 0,\r\n // this is the original input orientation, if it is 1, it's flipped.\r\n long[][][] dp = new long[1<<n][n][2];\r\n\r\n // Always 1 way to place one domino in a fixed orientation.\r\n for (int i=0; i<n; i++) {\r\n dp[1<<i][i][0] = 1;\r\n dp[1<<i][i][1] = 1;\r\n }\r\n\r\n // Outer DP loop, solve all problem instances for each subset of dominoes.\r\n for (int mask=3; mask<(1<<n); mask++) {\r\n\r\n // Now, try each domino as the last domino in mask.\r\n for (int last=0; last<n; last++) {\r\n\r\n // Not a valid state.\r\n if ((mask&(1<<last)) == 0) continue;\r\n\r\n int prevmask = mask - (1<<last);\r\n\r\n for (int i=0; i<n; i++) {\r\n\r\n if ((prevmask&(1<<i)) == 0) continue;\r\n\r\n // Both i and last are in regular orientation.\r\n if (list[i][1] == list[last][0])\r\n dp[mask][last][0] = (dp[mask][last][0]+dp[prevmask][i][0])%MOD;\r\n\r\n // Here i is flipped and last is regular.\r\n else if (list[i][0] == list[last][0])\r\n dp[mask][last][0] = (dp[mask][last][0]+dp[prevmask][i][1])%MOD;\r\n\r\n // i is regular but last is flipped.\r\n if (list[i][1] == list[last][1])\r\n dp[mask][last][1] = (dp[mask][last][1]+dp[prevmask][i][0])%MOD;\r\n\r\n // Both i and last are flipped.\r\n else if (list[i][0] == list[last][1])\r\n dp[mask][last][1] = (dp[mask][last][1]+dp[prevmask][i][1])%MOD;\r\n }\r\n } // end last loop\r\n } // end mask loop\r\n\r\n // Sum up result - all ways to place all dominoes over all possible last dominoes in either orientation.\r\n // Since we screened out our special case, no over-counting will occur here.\r\n long res = 0L;\r\n for (int last=0; last<n; last++) {\r\n \tres = (res + dp[(1<<n)-1][last][0])%MOD;\r\n \tif (list[last][0] != list[last][1])\r\n \t\tres = (res + dp[(1<<n)-1][last][1])%MOD;\r\n }\r\n System.out.println(res);\r\n }\r\n }", "private void m24355f() {\n String[] strArr = this.f19529f;\n int length = strArr.length;\n int i = length + length;\n if (i > 65536) {\n this.f19531h = 0;\n this.f19528e = false;\n this.f19529f = new String[64];\n this.f19530g = new C4216a[32];\n this.f19533j = 63;\n this.f19535l = false;\n return;\n }\n C4216a[] aVarArr = this.f19530g;\n this.f19529f = new String[i];\n this.f19530g = new C4216a[(i >> 1)];\n this.f19533j = i - 1;\n this.f19532i = m24353e(i);\n int i2 = 0;\n int i3 = 0;\n for (String str : strArr) {\n if (str != null) {\n i2++;\n int c = mo29675c(mo29670a(str));\n String[] strArr2 = this.f19529f;\n if (strArr2[c] == null) {\n strArr2[c] = str;\n } else {\n int i4 = c >> 1;\n C4216a aVar = new C4216a(str, this.f19530g[i4]);\n this.f19530g[i4] = aVar;\n i3 = Math.max(i3, aVar.f19539c);\n }\n }\n }\n int i5 = length >> 1;\n for (int i6 = 0; i6 < i5; i6++) {\n for (C4216a aVar2 = aVarArr[i6]; aVar2 != null; aVar2 = aVar2.f19538b) {\n i2++;\n String str2 = aVar2.f19537a;\n int c2 = mo29675c(mo29670a(str2));\n String[] strArr3 = this.f19529f;\n if (strArr3[c2] == null) {\n strArr3[c2] = str2;\n } else {\n int i7 = c2 >> 1;\n C4216a aVar3 = new C4216a(str2, this.f19530g[i7]);\n this.f19530g[i7] = aVar3;\n i3 = Math.max(i3, aVar3.f19539c);\n }\n }\n }\n this.f19534k = i3;\n this.f19536m = null;\n int i8 = this.f19531h;\n if (i2 != i8) {\n throw new IllegalStateException(String.format(\"Internal error on SymbolTable.rehash(): had %d entries; now have %d\", Integer.valueOf(i8), Integer.valueOf(i2)));\n }\n }", "public static void main(String[] args) {\n\n pairsSum();\n\n printAllSubArrays();\n\n tripletZero();\n\n // int[][] sub = subsets();\n\n PairsSum sum = new PairsSum();\n int[] arr = { 10, 1, 2, 3, 4, 5, 6, 1 };\n boolean flag = sum.almostIncreasingSequence(arr);\n System.out.println(flag);\n\n String s = \"\";\n for (int i = 0; i < 100000; i++) {\n // s += \"CodefightsIsAwesome\";\n }\n long start = System.currentTimeMillis();\n // int k = subStr(s, \"IsA\");\n System.out.println(System.currentTimeMillis() - start);\n // System.out.println(k);\n\n String[] a = { \"aba\", \"aa\", \"ad\", \"vcd\", \"aba\" };\n String[] b = sum.allLongestStrings(a);\n System.out.println(Arrays.deepToString(b));\n\n List<String> al = new ArrayList<>();\n al.toArray();\n\n Map<Integer, Integer> map = new HashMap<>();\n Set<Integer> keySet = map.keySet();\n for (Integer integer : keySet) {\n\n }\n\n String st = reverseBracksStack(\"a(bc(de)f)g\");\n System.out.println(st);\n\n int[] A = { 1, 2, 3, 2, 2, 3, 3, 33 };\n int[] B = { 1, 2, 2, 2, 2, 3, 2, 33 };\n\n System.out.println(sum.isIPv4Address(\"2.2.34\"));\n\n Integer[] AR = { 5, 3, 6, 7, 9 };\n int h = sum.avoidObstacles(AR);\n System.out.println(h);\n\n int[][] image = { { 36, 0, 18, 9 }, { 27, 54, 9, 0 }, { 81, 63, 72, 45 } };\n int[][] im = { { 7, 4, 0, 1 }, { 5, 6, 2, 2 }, { 6, 10, 7, 8 }, { 1, 4, 2, 0 } };\n int[][] res = sum.boxBlur(im);\n\n for (int i = 0; i < res.length; i++) {\n for (int j = 0; j < res[0].length; j++) {\n System.out.print(res[i][j] + \" \");\n }\n System.out.println();\n }\n\n boolean[][] ms = { { true, false, false, true }, { false, false, true, false }, { true, true, false, true } };\n int[][] mines = sum.minesweeper(ms);\n for (int i = 0; i < mines.length; i++) {\n for (int j = 0; j < mines[0].length; j++) {\n System.out.print(mines[i][j] + \" \");\n }\n System.out.println();\n }\n\n System.out.println(sum.variableName(\"var_1__Int\"));\n\n System.out.println(sum.chessBoard());\n\n System.out.println(sum.depositProfit(100, 20, 170));\n\n String[] inputArray = { \"abc\", \"abx\", \"axx\", \"abx\", \"abc\" };\n System.out.println(sum.stringsRearrangement(inputArray));\n\n int[][] queens = { { 1, 1 }, { 3, 2 } };\n int[][] queries = { { 1, 1 }, { 0, 3 }, { 0, 4 }, { 3, 4 }, { 2, 0 }, { 4, 3 }, { 4, 0 } };\n boolean[] r = sum.queensUnderAttack(5, queens, queries);\n\n }", "public void mo35665a() {\n int i = 0;\n int i2 = 0;\n while (true) {\n byte[] bArr = this.f31120b;\n if (i2 >= bArr.length) {\n break;\n }\n bArr[i2] = -1;\n i2++;\n }\n while (true) {\n byte[] bArr2 = this.f31119a;\n if (i < bArr2.length) {\n this.f31120b[bArr2[i]] = (byte) i;\n i++;\n } else {\n byte[] bArr3 = this.f31120b;\n bArr3[65] = bArr3[97];\n bArr3[66] = bArr3[98];\n bArr3[67] = bArr3[99];\n bArr3[68] = bArr3[100];\n bArr3[69] = bArr3[101];\n bArr3[70] = bArr3[102];\n return;\n }\n }\n }", "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) throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new FileReader(\"3.in\"));\n\t\tint base = 26;\n\t\tlong subHash = 0;\n\t\tstring = br.readLine();\n\t\tsubstring = br.readLine();\n\t\tSystem.out.println(substring.length());\n\t\tfor (int i = 0; i < substring.length(); i++)\n\t\t{\n\t\t\tstring = \"`\" + string;\n\t\t\tsubHash += Math.pow(base, substring.length()-1-i)*(substring.charAt(i)-96);\n\t\t}\n\t\thashes = new long[string.length()];\n\t\t//rolling hash\n\t\tlong prevHash = 0;\n\t\tlong hash;\n\t\tlong subtract;\n\t\tfor (int i = 0; i < string.length()-substring.length(); i++)\n\t\t{\n\t\t\tsubtract = (long) ((string.charAt(i)-96)*Math.pow(base, substring.length()-1));\n\t\t\thash = (long) (26*(prevHash - subtract) + (string.charAt(i + substring.length())-96));\n\t\t\thashes[i+1] = hash;\n\t\t\tif (hash == subHash)\n\t\t\t{\n\t\t\t\tstring = string.substring(0, i+1) + string.substring(i+1+substring.length());\n\t\t\t\ti -= substring.length();\n\t\t\t\tif (i < 0) i = -1;\n\t\t\t}\n\t\t\tprevHash = hashes[i+1];\n\t\t\tSystem.out.println(hash);\n\t\t}\n\t\t\n\t\t/*for (long el: hashes)\n\t\t\tSystem.out.println(el);\n\t\tSystem.out.println(subHash);*/\n\t\tSystem.out.println(string.substring(substring.length()));\n\t\t\n\t\t\n\t\t//PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(\"censor.out\")));\n\t\t//pw.println(string.substring(substring.length()));\n\t\t//pw.close();\n\t}", "public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br= new BufferedReader(new FileReader(\"C-small-attempt7.in\"));\n\t\t//BufferedReader br= new BufferedReader(new FileReader(\"A-large-practice(2).in\"));\n\t\t\n\t\t// TODO WRITER\n\t\tPrintWriter pw = new PrintWriter(\"Dijkstra.txt\", \"UTF-8\");\n\t\tint T=Integer.parseInt(br.readLine());\n\t\t\n\t\t\n\t\tfor(int i = 0; i < T; i++){\n\t\t\tString[] tab =br.readLine().split(\" \");\n\t\t\tint L = Integer.parseInt(tab[0]);\n\t\t\t//int X=Integer.parseInt(tab[1].length()>2 ? tab[1].substring(tab[1].length()-2) : tab[1]);\n\t\t\tlong X=Long.parseLong(tab[1]);\n\t\t\tString str = br.readLine();\n\t\n\t\t\t\n\t\t\t\t\n\t\t\tString a=\"NO\";\n\t\t\tchar current = '1';\n\t\t\tboolean minus = false;\n\t\t\tint finish=0;\n\t\t\tfor(long j=0; j<X*L; j++){\n\t\t\t\tchar temp = str.charAt((int)(j%L));\n\t\t\t\t\n\t\t\t\tif(current==temp){\n\t\t\t\t\tcurrent='1';\n\t\t\t\t\tminus = !minus;\n\t\t\t\t}\n\t\t\t\telse if(current=='1')current=temp;\n\t\t\t\telse if(current=='i'&&temp=='j') current='k';\n\t\t\t\telse if(current=='i'&&temp=='k'){\n\t\t\t\t\tcurrent='j';\n\t\t\t\t\tminus=!minus;\n\t\t\t\t}\n\t\t\t\telse if(current=='j'&&temp=='i'){\n\t\t\t\t\tcurrent='k';\n\t\t\t\t\tminus=!minus;\n\t\t\t\t}\n\t\t\t\telse if(current=='j'&&temp=='k') current='i';\n\t\t\t\telse if(current=='k'&&temp=='i') current='j';\n\t\t\t\telse if(current=='k'&&temp=='j'){\n\t\t\t\t\tcurrent='i';\n\t\t\t\t\tminus=!minus;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(current=='i'&&finish==0){\n\t\t\t\t\tfinish++;\n\t\t\t\t\tcurrent='1';\n\t\t\t\t}\n\t\t\t\telse if(current=='j'&&finish==1){\n\t\t\t\t\tfinish++;\n\t\t\t\t\tcurrent='1';\n\t\t\t\t}\n\t\t\t\telse if(current=='k'&&finish==2){\n\t\t\t\t\tfinish++;\n\t\t\t\t\tcurrent='1';\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t//&&X%2==1 &&X%4==2 ||(current!='1'&&finish==3)\n\t\t\tif((current=='1'&&!minus&&finish==3))a=\"YES\";\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"current \"+(minus?\"-\":\"\")+current+\" finish \"+finish +\" X \"+X);//+\" str: \"+str);\n\t\n\t\t\tSystem.out.print(\"Case #\"+(i+1)+\": \"+a+\"\\n\");\n\t\t\tpw.write(\"Case #\"+(i+1)+\": \"+a+\"\\n\");\n\n\t\t}\n\t\tpw.close();\n\t}", "public static void decode() {\n int first = BinaryStdIn.readInt();\n String t = BinaryStdIn.readString();\n int n = t.length();\n int[] count = new int[256 + 1];\n int[] next = new int[n];\n int i = 0;\n while (i < n) {\n count[t.charAt(i) + 1]++;\n i++;\n }\n i = 1;\n while (i < 256 + 1) {\n count[i] += count[i - 1];\n i++;\n }\n i = 0;\n while (i < n) {\n next[count[t.charAt(i)]++] = i;\n i++;\n }\n i = next[first];\n int c = 0;\n while (c < n){\n BinaryStdOut.write(t.charAt(i));\n i = next[i];\n c++;\n }\n BinaryStdOut.close();\n }", "public static void main(String[] args) {\n String textToDecode = \"j5jqktt5tsk559tsskjssjttsjksts5998tsskst8q59kttt59skqj5sktqj5559skst5t59sjk8sqtst5jqqjss99jqj5qj59jsjq5559ktsqsjqj55st59jsqjksjq55k559ktqjks59ktttj55tts595sjq5559k8tst5jqqjk5995tktts59jsjq55595sktsqstjsjq559559k8sjjq5559tkjq555tksts555559ktt55559t559jsst55qjsk59tssjk8ts55jqqj99t5jqk8sj5559jq59tstkjq5ss8sk55k55955ts59kt555s5tksjq5559tkts59ktts55jqqj95\";\n\n //enter secret code characters\n String secretCode = \"58sjtkq9\";\n\n char[] secretCode_Split = secretCode.toCharArray();\n\n\n char[][] secretTable =\n {{'b', '0', 's', '_', 'k', '{','$',' '},\n {'/', '4', 'h', '<', ']', '9','!',':'},\n {'-', 'u', ';', 'z', 'a', 'j','r','_'},\n {'l', '3', 'c', '8', '#', '\"','i','1'},\n {'w', '7', 'o', '2', 'y', 'p','(','}'},\n {',', 'd', 'n', '*', 't', '%','g','['},\n {'x', '?', '=', 'e', '+', '6',')','q'},\n {'.', 'm', '@', '>', '5', '&','f','\\n'}};\n\n\n String[] textToDecode_Split_1 = textToDecode.split(\"(?<=\\\\G.{2})\");\n\n int[] result_row;\n result_row = new int[(textToDecode.length()/2)];\n\n int[] result_column;\n result_column = new int[(textToDecode.length()/2)];\n\n for (int i = 0; i < (textToDecode.length()/2) ; i++) {\n char[] textToDecode_Split_2 = textToDecode_Split_1[i].toCharArray();\n for (int j = 0; j <= 1; j++) {\n char textToDecode_Split_3 = textToDecode_Split_2[j];\n for (int k = 0; k < secretCode.length() ; k++) {\n if (j == 0) {\n if (textToDecode_Split_3 == secretCode_Split[k]) {\n result_row[i] = k;\n }\n } else if (j == 1) {\n if (textToDecode_Split_3 == secretCode_Split[k]) {\n result_column[i] = k;\n }\n }\n }\n }\n }\n\n for (int i = 0; i < result_row.length ; i++) {\n System.out.print(secretTable[result_row[i]][result_column[i]]);\n\n }\n}", "@Test\n public void serialDecomposition_test1()\n {\n // The function:\n // i2 i4 i7 Q | o0 o2 o3\n // 1 1 0 G0 | 1 - -\n // 1 1 - G6 | - - 1\n // 0 0 0 G7 | - 1 -\n // 1 0 1 G0 | - 1 1\n // 1 1 1 G2 | - 1 1\n // 1 1 1 G5 | - 1 1\n // 0 1 0 G0 | - 1 1\n // 1 1 0 G2 | - 1 -\n // 1 - - G1 | - - 1\n // 1 0 0 G5 | 1 1 -\n // 0 1 1 G5 | - - 1\n // 0 - - G1 | - 1 -\n // 0 0 1 G0 | - - 1\n // 0 0 1 G2 | - - 1\n // 1 1 1 G7 | - 1 -\n // 0 0 0 G0 | - - 1\n // 1 1 0 G7 | - 1 1\n // 1 0 1 G2 | - 1 1\n // 0 1 0 G5 | - - 1\n // 1 1 0 G5 | - 1 1\n // 1 0 0 G2 | - 1 1\n // 1 0 0 G0 | - 1 1\n // 1 0 0 G7 | - 1 1\n // 1 0 1 G7 | - 1 -\n // 0 0 1 G5 | - - 1\n // 1 0 1 G5 | - 1 1\n // 0 0 1 G7 | 1 1 1\n // 1 1 - G0 | - 1 1\n // 0 0 0 G2 | 1 1 1\n // 1 - - G3 | - 1 -\n // 0 - - G3 | - - 1\n // 0 - - G5 | 0 - -\n // 0 - 0 G7 | 0 - -\n // 0 - - G0 | 0 - -\n // - - 1 G0 | 0 - -\n // - - 1 G2 | 0 - -\n // 1 0 - G0 | 0 - -\n // 1 0 - G2 | 0 - -\n // 1 0 - G7 | 0 - -\n // - 1 - G7 | 0 - -\n // - 1 - G5 | 0 - -\n // - 1 - G2 | 0 - -\n // 1 - 1 G5 | 0 - -\n // - - - G1 | 0 - -\n // - - - G3 | 0 - -\n // - - - G4 | 0 - -\n // - - - G0 | - - -\n // - - - G2 | - - -\n // - - - G6 | - - -\n // - - - G7 | - - -\n // - - - G5 | - - -\n // - - - G4 | - - -\n // - - - G6 | 0 - -\n // 0 0 0 G5 | 0 0 0\n // 0 - 1 G2 | - 0 -\n // 0 - 1 G5 | - 0 -\n // 0 1 - G2 | 0 0 0\n // 0 1 - G4 | 0 0 0\n // 0 1 - G2 | 0 0 -\n // 0 1 - G5 | 0 0 -\n // 0 1 - G4 | 0 0 -\n // 0 - 0 G7 | 0 - 0\n // 0 1 - G7 | 0 0 0\n // 0 0 - G0 | 0 0 -\n // 0 0 - G4 | 0 0 -\n // 0 1 1 G0 | 0 0 0\n // 0 - - G4 | 0 0 0\n // 0 - - G3 | - 0 -\n // 0 - - G4 | - 0 -\n // 0 - - G1 | 0 - 0\n // 0 - - G4 | 0 - 0\n // - 0 0 G6 | - - 0\n // - 0 0 G5 | - - 0\n // - 0 0 G4 | - - 0\n // 1 0 1 G6 | - - 0\n // - 0 - G6 | 0 0 0\n // 1 - 1 G7 | - - 0\n // 1 - - G1 | 0 0 -\n // 1 - - G6 | 0 0 -\n // 1 - - G4 | 0 0 -\n // - 1 0 G2 | - - 0\n // - 1 0 G4 | - - 0\n // - - - G4 | 0 0 0\n // 1 - - G3 | - - 0\n // 1 - - G4 | - - 0\n // - - - G3 | - - -\n // - - - G1 | - - -\n\n // Y = {o0o2o3}, U = {i7}, V = {i2i4}\n // Iv = i2i4\n Blanket βIv = Blanket.create(\"1,2,5,6,8,9,15,17,20,28,30,35,36,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,78,79,80,81,82,83,84,85,86,87; 3,12,13,14,16,25,27,29,31,32,33,34,35,36,44,45,46,47,48,49,50,51,52,53,54,55,56,62,64,65,67,68,69,70,71,72,73,74,76,83,86,87; 4,9,10,18,21,22,23,24,26,30,35,36,37,38,39,43,44,45,46,47,48,49,50,51,52,53,72,73,74,75,76,77,78,79,80,83,84,85,86,87; 7,11,12,19,31,32,33,34,35,36,40,41,42,44,45,46,47,48,49,50,51,52,53,55,56,57,58,59,60,61,62,63,66,67,68,69,70,71,81,82,83,86,87;\");\n // Iu = i7\n Blanket βIu = Blanket.create(\"1,2,3,7,8,9,10,12,16,17,19,20,21,22,23,28,29,30,31,32,33,34,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,76,78,79,80,81,82,83,84,85,86,87; 2,4,5,6,9,11,12,13,14,15,18,24,25,26,27,28,30,31,32,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,55,56,57,58,59,60,61,63,64,65,66,67,68,69,70,71,75,76,77,78,79,80,83,84,85,86,87;\");\n Blanket βQ = Blanket.create(\"G0:1,4,7,13,16,22,28,34,35,37,47,64,66; G1:9,12,44,70,78,87; G2:5,8,14,18,21,29,36,38,42,48,55,57,59,81; G3:30,31,45,68,84,86; G4:46,52,58,61,65,67,69,71,74,80,82,83,85; G5:6,10,11,19,20,25,26,32,41,43,51,54,56,60,73; G6:2,49,53,72,75,76,79; G7:3,15,17,23,24,27,33,39,40,50,62,63,77;\");\n Blanket βY = Blanket.create(\"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,47,48,49,50,51,52,86,87; 1,2,9,11,13,14,16,19,25,31,47,48,49,50,51,52,55,56,68,69,86,87; 1,3,8,10,12,15,24,30,47,48,49,50,51,52,72,73,74,75,77,81,82,84,85,86,87; 1,47,48,49,50,51,52,55,56,68,69,72,73,74,75,77,81,82,84,85,86,87; 2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,86,87; 2,9,11,13,14,16,19,25,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,55,56,59,60,61,64,65,68,69,78,79,80,86,87; 3,8,12,15,24,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,62,70,71,72,73,74,75,77,81,82,84,85,86,87; 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87;\");\n DecompositionBlankets decomposition = Decompositions.serialDecomposition(βIv, βIu, βQ, βY, 0, false);\n Assertions.assertThat(decomposition).isNotNull();\n\n Blanket βQv = decomposition.QvJoinedWithQu ? decomposition.Qu.BxB(decomposition.QvPartial) : decomposition.Qv;\n Blanket βQu = decomposition.QuJoinedWithQv ? decomposition.Qv.BxB(decomposition.QuPartial) : decomposition.Qu;\n\n Assertions.assertThat(decomposition.Iv.BxB(βQv).BleB(decomposition.G)).isTrue(); // βIv x βQv <= βG - true\n Assertions.assertThat(decomposition.G.BxB(decomposition.Iu != null ? decomposition.Qu.BxB(decomposition.Iu) : βQu).BleB(decomposition.H)).isTrue(); // βIu x βG x βQu <= βY - true\n Assertions.assertThat(decomposition.Qv.BxB(decomposition.Qu).BeqB(decomposition.Q)).isTrue(); // βQv x βQu = βQ - true\n Assertions.assertThat(decomposition.Qv.BxB(decomposition.Qu).BeqB(βQ)).isTrue(); // βQv x βQu = βQ - true\n }", "void encrypt()\n {\n try\n {\n size=fin.available();\n p=size%8;\n if(p!=0)\n np=8-p;\n size+=np;\n if(p==0)\n nl=size/8;\n else\n nl=size/8+1;\n buf=new byte[8];\n buf1=new byte[size+10];\n fin.read(buf1);\n int enc[]=new int[size];\n mark=-8;\n k2=0;\n for(k=0;k<nl;k++)\n {\n mark+=8;\n for(int k1=0;k1<8;k1++)\n buf[k1]=buf1[mark+k1];\n i=0;\n\t for(i=0;i<4;i++)\n x[i]=0;\n\t j1=0;i1=0;\n while( i1<=3)\n {\n\t if((j1+1)%2==0)\n\t {\n\t x[i1]|=buf[j1]; // dividing 64 bit cipher block into four 16 bit registers\n\t i1++;\n\t\t }\n\t else\n {\n\t x[i1]=buf[j1];\n\t x[i1]<<=8;\n }\n j1++;\n\t }\n // 7 rounds and 14 steps\n for(i=0 ; i <48 ; )\n {\n step1=mul(x[0],z[i+0]);\n step2=(x[1]+z[i+1])%65536;\n step3=(x[2]+z[i+2])%65536;\n step4=mul(x[3],z[i+3]);\n step5=step1^step3;\n step6=step2^step4;\n step7=mul(step5,z[i+4]);\n step8=(step6+step7)%65536;\n step9=mul(step8,z[i+5]);\n step10=(step7+step9)%65536;\n step11=step1^step9;\n step12=step3^step9;\n step13=step2^step10;\n step14=step4^step10;\n x[0]=step11;\n x[1]=step13;\n x[2]=step12;\n x[3]=step14;\n i=i+6;\n }\n x[0]=mul(x[0],z[48]);\n x[1]=(x[1]+z[49])%65536;\n x[2]=(x[2]+z[50])%65536;\n x[3]=mul(x[3],z[51]);\n for(int t=0;t<4;t++)\n {\n ft1 =x[t]&255;\n ft=x[t]>>8;\n fenc.write((char)ft);\n fenc.write((char)ft1);\n }\n}\nfin.close();\n }\n catch(Exception e)\n {\n System.out.println(e);\n }\n}", "public final void mo4383c(long j) {\n try {\n byte[] bArr = this.f20653b;\n int i = this.f20656e;\n this.f20656e = i + 1;\n bArr[i] = (byte) ((int) j);\n bArr = this.f20653b;\n i = this.f20656e;\n this.f20656e = i + 1;\n bArr[i] = (byte) ((int) (j >> 8));\n bArr = this.f20653b;\n i = this.f20656e;\n this.f20656e = i + 1;\n bArr[i] = (byte) ((int) (j >> 16));\n bArr = this.f20653b;\n i = this.f20656e;\n this.f20656e = i + 1;\n bArr[i] = (byte) ((int) (j >> 24));\n bArr = this.f20653b;\n i = this.f20656e;\n this.f20656e = i + 1;\n bArr[i] = (byte) ((int) (j >> 32));\n bArr = this.f20653b;\n i = this.f20656e;\n this.f20656e = i + 1;\n bArr[i] = (byte) ((int) (j >> 40));\n bArr = this.f20653b;\n i = this.f20656e;\n this.f20656e = i + 1;\n bArr[i] = (byte) ((int) (j >> 48));\n bArr = this.f20653b;\n i = this.f20656e;\n this.f20656e = i + 1;\n bArr[i] = (byte) ((int) (j >> 56));\n } catch (long j2) {\n throw new zzc(String.format(\"Pos: %d, limit: %d, len: %d\", new Object[]{Integer.valueOf(this.f20656e), Integer.valueOf(this.f20655d), Integer.valueOf(1)}), j2);\n }\n }", "int reps() {\n\tint b[] = new int[64];\n\tint c = 0; /*\n\t* count of squares that are different from the current\n\t* position\n\t*/\n\tint r = 0; /* number of repetitions */\n\n\t/* is a repetition impossible? */\n\tif (fifty <= 3)\n\treturn 0;\n\n\t/* loop through the reversible moves */\n\tfor (int i = hply - 1; i >= hply - fifty - 1; --i) {\n\tif (++b[histDat[i].m.getFrom()] == 0)\n\t--c;\n\telse\n\t++c;\n\tif (--b[histDat[i].m.getTo()] == 0)\n\t--c;\n\telse\n\t++c;\n\tif (c == 0)\n\t++r;\n\t}\n\n\treturn r;\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tint N = sc.nextInt();\r\n\t\tint[] arr = new int[N+1];\r\n\t\tfor (int i = 1; i < arr.length; i++) {\r\n\t\t\tarr[i] = sc.nextInt();\r\n\t\t}\r\n\r\n\t\tint num = sc.nextInt();\r\n\r\n\t\tfor (int i = 0; i < num; i++) {\r\n\t\t\tint s = sc.nextInt(); // 성별\r\n\t\t\tint n = sc.nextInt(); // 받은 수\r\n\r\n\t\t\tif (s == 1) { // 남자\r\n\t\t\t\tfor (int j = 1; j < arr.length; j++) {\r\n\t\t\t\t\tif (j % n == 0) { // 자기가 받은 수의 배수이면\r\n\t\t\t\t\t\tarr[j] = Math.abs(arr[j] - 1); // 스위치 상태 변경\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else { // 여자\r\n\t\t\t\tarr[n] = Math.abs(arr[n] - 1); // 스위치 상태 변경\r\n\t\t\t\tint left = n - 1;\r\n\t\t\t\tint right = n + 1;\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tif (left <= 0 || right >= arr.length || arr[left] != arr[right])\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tarr[left] = Math.abs(arr[left] - 1); // 스위치 상태 변경\r\n\t\t\t\t\tarr[right] = Math.abs(arr[right] - 1); // 스위치 상태 변경\r\n\t\t\t\t\tleft -= 1;\r\n\t\t\t\t\tright += 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i = 1; i < arr.length; i++) {\r\n\t\t\tSystem.out.print(arr[i] + \" \");\r\n\t\t\tif(i % 20 == 0) {\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private BigInteger squareToomCook3() {\n int len = mag.length;\n\n // k is the size (in ints) of the lower-order slices.\n int k = (len+2)/3; // Equal to ceil(largest/3)\n\n // r is the size (in ints) of the highest-order slice.\n int r = len - 2*k;\n\n // Obtain slices of the numbers. a2 is the most significant\n // bits of the number, and a0 the least significant.\n BigInteger a0, a1, a2;\n a2 = getToomSlice(k, r, 0, len);\n a1 = getToomSlice(k, r, 1, len);\n a0 = getToomSlice(k, r, 2, len);\n BigInteger v0, v1, v2, vm1, vinf, t1, t2, tm1, da1;\n\n v0 = a0.square();\n da1 = a2.add(a0);\n vm1 = da1.subtract(a1).square();\n da1 = da1.add(a1);\n v1 = da1.square();\n vinf = a2.square();\n v2 = da1.add(a2).shiftLeft(1).subtract(a0).square();\n\n // The algorithm requires two divisions by 2 and one by 3.\n // All divisions are known to be exact, that is, they do not produce\n // remainders, and all results are positive. The divisions by 2 are\n // implemented as right shifts which are relatively efficient, leaving\n // only a division by 3.\n // The division by 3 is done by an optimized algorithm for this case.\n t2 = v2.subtract(vm1).exactDivideBy3();\n tm1 = v1.subtract(vm1).shiftRight(1);\n t1 = v1.subtract(v0);\n t2 = t2.subtract(t1).shiftRight(1);\n t1 = t1.subtract(tm1).subtract(vinf);\n t2 = t2.subtract(vinf.shiftLeft(1));\n tm1 = tm1.subtract(t2);\n\n // Number of bits to shift left.\n int ss = k*32;\n\n return vinf.shiftLeft(ss).add(t2).shiftLeft(ss).add(t1).shiftLeft(ss).add(tm1).shiftLeft(ss).add(v0);\n }", "public static void generateRoundKeys(String input){\n int i =0;\n\t\tfor (int col1 = 0; col1 <=3; col1++) {\t\t\t\n for (int row1 = 0; row1 <=3; row1 = row1+1) {\n\t\t\toriginalKey[row1][col1] = input.substring(i,i+2);\n\t\t\ti=i+2;\n } \n\t\t} \n //take the original key and make it be the first four columns of W\n for(int row2 = 0; row2<=3; row2++){\n for(int col2 = 0; col2 < 4; col2++){\n W[row2][col2] = originalKey[row2][col2];\n }\n } \n //Starting to create next 40 columns of W\n //temporary matrix temp_w for processing\n String[][] temp_w = null;\n for(int column = 4; column<=43; column++){\n /*Part 1 : if the index of column is not divisible by 4, \n XOR the fourth past and last column with respect to column index*/\n if(column % 4 != 0){\n for(int row = 0; row<=3; row++){\n W[row][column] = performXOR(W[row][column-4], W[row][column-1]); \n }\n }\n else {\n /*Part 2 : if the index of column is divisible by 4,\n step 1: Use temp matrix temp_w to store previous column values.\n Tanspose previous column values to row values\n step 2 : Shif to the left of column values of temp_w*/\n temp_w = new String[1][4]; \n \n temp_w[0][0] = W[1][column - 1];\n temp_w[0][1] = W[2][column - 1];\n temp_w[0][2] = W[3][column - 1];\n temp_w[0][3] = W[0][column - 1];\n \n //step 3 : transform each of the four bytes in temp_w using an S-box function\n for(int m =0 ; m<1; m++){\n for(int n =0; n<=3 ; n++){\n int x = Integer.parseInt(temp_w[m][n].split(\"\")[0],16);\n int y = Integer.parseInt(temp_w[m][n].split(\"\")[1],16);\n temp_w[m][n] = SBOX[x][y]; \n\t\t\t}\n }\n \n //step 4 : Getting RCon coefficient values and performing XOR operation\n //find number of round\n int numRound = column/4;\n //get RCon of the same column number form Rcon table and xOR with first element\n temp_w[0][0] = performXOR(RCON[0][numRound],temp_w[0][0]);\n \n //step 5 : Perform final XOR\n for(int row3 = 0; row3<=3; row3++){\n W[row3][column] = performXOR(W[row3][column-4], temp_w[0][row3]);\n }\n \n }\n }\n \n //Printing Round Keys\n int Rounds = 1;\n int k = 0;\n while (Rounds <=11){ \n for(int column1 = 0; column1<=3; k++, column1++){\n for(int row =0; row<=3; row++){\n System.out.print(W[row][k]);\n }\n } \n System.out.println();\n Rounds++;\n } \n System.out.println(\"\");\n }", "public static void main(String[] args) {\n\t\tScanner keyboard = new Scanner(System.in);\r\n\t\tRandom r = new Random();\r\n\t\tint frames = 0;\r\n\t\tint fault = 0;\r\n\t\tint pointer = 0;\r\n\t\tint ref_len = 100;\r\n\t\tint buffer[];\r\n\t\tint reference[];\r\n\t\treference = new int [ref_len];\r\n\t\tint mem_layout[][];\r\n\t\t\r\n\t\t//get number of frames\r\n\t\tSystem.out.println(\"Enter number of page frames available\");\r\n\t\tframes = keyboard.nextInt();\r\n\t\t\r\n\t\t//validate number of frames is between 2 and 7\r\n\t\twhile(frames > 7 || frames < 2){\r\n\t\t\tSystem.out.println(\"Please enter a valid number\");\r\n\t\t\tframes = keyboard.nextInt();\r\n\t\t}\r\n\t\t\r\n\t\tmem_layout = new int[ref_len][frames];\r\n\t\tbuffer = new int[frames];\r\n\t\t\r\n\t\t//fill reference with pages\r\n\t\tfor(int i = 0; i < ref_len; i++)\r\n {\r\n\t\t\tint address = r.nextInt(65536);\r\n\t\t\tint page = address / 4096;\r\n reference[i] = page;\r\n }\r\n\t\t\r\n\t\tSystem.out.println();\r\n for(int i = 0; i < ref_len; i++)\r\n {\r\n int search = -1;\r\n for(int j = 0; j < frames; j++) //sets search to be equal to page if no page is available to replace and moves to next frame\r\n {\r\n if(buffer[j] == reference[i])\r\n {\r\n search = j;\r\n break;\r\n } \r\n }\r\n if(search == -1) //replaces page and increments fault \r\n {\r\n buffer[pointer] = reference[i]; \r\n fault++;\r\n pointer++;\r\n if(pointer == frames)\r\n pointer = 0;\r\n }\r\n for(int j = 0; j < frames; j++)\r\n mem_layout[i][j] = buffer[j];\r\n }\r\n System.out.println(\"Page Reference\");\r\n for(int i = 0; i < ref_len; i++){\r\n \tSystem.out.printf(\"%3d \", reference[i]);\r\n }\r\n System.out.println();\r\n System.out.println();\r\n System.out.println(\"Frames\");\r\n //output layout of frames and how they change\r\n for(int i = 0; i < frames; i++)\r\n {\r\n for(int j = 0; j < ref_len; j++)\r\n System.out.printf(\"%3d \",mem_layout[j][i]);\r\n System.out.println();\r\n }\r\n \r\n System.out.println(\"The number of Faults: \" + fault);\r\n keyboard.close();\r\n\t}", "public static void main(String[] args) {\n\t\tbyte c = 20; //0x14\r\n\t\tbyte d = -8; //0xf8\r\n\t\t\r\n\t\tSystem.out.println(\"[시프트 연산 결과]\");\r\n\t\tSystem.out.println(c<<2);//c값을 2비트 왼쪽 시프트\r\n\t\tSystem.out.println(c>>2);//c값을 2비트 오른쪽 시프트, 왼쪽에 최상위 비트 0삽입(양수)\r\n\t\tSystem.out.println(d>>2);//d값을 2비트 오른쪽 시프트, 왼쪽에 최상위 비트 1삽입(음수)\r\n\r\n\t\r\n\t\tSystem.out.printf(\"%04x\\n\", d);//shift이전의 값 00 f \t 8\r\n\t\t\t\t\t\t\t\t\t //\t\t\t \t1111 1000 ->(00삽입)0011 1110(삭제00\r\n\t\t\r\n\t\tSystem.out.printf(\"%x\\n\", (byte)(d>>>2));\r\n\t\t\r\n\t\tSystem.out.printf(\"%x\\n\", (int)d);//fffffff8\r\n\t\tSystem.out.printf(\"%x\\n\", (d>>>2));\r\n\t\tSystem.out.printf(\"%x\\n\", (d>>>2));//d를 2비트 오른쪽 시프트, 왼쪽에 무조건 0이 삽입됨\r\n\t\t// 3 f f f f f f e (int타입으로 변환됨)\r\n\t\t//0011 1111 1111 1111 1111 1111 1111 1110\r\n\t\t//1111\t1111 1111 1111 1111 1111 1111 1000((int)d)\r\n\t\t//0011\t1111 1111 1111 1111 1111 1111 1110(d>>>2)\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"1. Dialing code for Tucson, AZ: \" + 520);\r\n\t\tSystem.out.println(\"2. Dialing code for Tempe, AZ: \" + 480);\r\n\t\tSystem.out.println(\"3. It is good to be \" + 9 + 9);\r\n\t\tSystem.out.println(\"4. It is good to be \" + (9 + 9));\r\n\t\tSystem.out.println(\"5. \" + 15.0 / 4.0);\r\n\t\tSystem.out.println(\"6. \" + 15.0 / 4);\r\n\t\tSystem.out.println(\"7. \" + 15 / 4.0);\r\n\t\tSystem.out.println(\"8. \" + 15 / 4);\r\n\t\tSystem.out.println(\"9. \" + 27 % 5);\r\n\t\tSystem.out.println(\"10. \" + 43 % 11);\r\n\t\tSystem.out.println(\"11. \" + -20 % 6);\r\n\t\tSystem.out.println(\"12. \" + (11 + 7 * 4));\r\n\t\tSystem.out.println(\"13. \" + ((11 + 7) * 4));\r\n\t\tSystem.out.println(\"14. \" + (8 * 4 + 10 / 2 + 7));\r\n\t\tSystem.out.println(\"15. \" + (28 % 6 + 9 % 4));\r\n\t\tSystem.out.println(\"16. \" + ((3 + 56 % 9) / 4));\r\n\t\tSystem.out.println(\"17. \" + ((3 + 56 % 9) / 4.0));\r\n\t\tSystem.out.println(\"18. \" + (150 / 2 / 2 / 2));\r\n\t\tSystem.out.println(\"19. \" + (150.0 / 2 / 2 / 2));\r\n\t\tSystem.out.println(\"20. \" + (150 / (2 / 2) / 2));\r\n\t\tint num;\r\n\t\tnum = 4;\r\n\t\tnum = num * 3;\r\n\t\tSystem.out.println(\"21. \" + num);\r\n\t\tint ber;\r\n\t\tber = 4;\r\n\t\tber = ber / 5;\r\n\t\tSystem.out.println(\"22. \" + ber);\r\n\t\tdouble total;\r\n\t\ttotal = 67;\r\n\t\ttotal = total + 2;\r\n\t\ttotal = total * 3;\r\n\t\ttotal = total / 9.0;\r\n\t\tSystem.out.println(\"23. \" + total);\r\n\t\tdouble width;\r\n\t\twidth = 1.8;\r\n\t\twidth = (43 - width * 10);\r\n\t\twidth = width / 6;\r\n\t\tSystem.out.println(\"24. \" + width);\r\n\t\tint count;\r\n\t\tdouble frac;\r\n\t\tcount = 17;\r\n\t\tfrac = 3.0 / 4.0;\r\n\t\tfrac = count * frac;\r\n\t\tcount = ((count + 7) / 3);\r\n\t\tfrac = count + frac;\r\n\t\tSystem.out.println(\"25. \" + count);\r\n\t\tSystem.out.println(\" \" + frac);\r\n\t\t\t\t\t\r\n\t}", "public static void main(String[] args) throws java.lang.Exception {\n\t\tScanner s = new Scanner(System.in);\n\t\tint a = s.nextInt();\n\t\t// output the sum of divisors of numbers in an array having exactly 4 divisors.\n\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tint len = s.nextInt();\n\t\t\tint[] subsequence = new int[len];\n\t\t\tint key = 0;\n\t\t\tint[] div = new int[len];\n\t\t\tint[] div1 = new int[len];\n\t\t\tint sum = 0;\n\t\t\tfor (int j = 0; j < len; j++) {\n\n\t\t\t\tsubsequence[j] = s.nextInt();\n\t\t\t\tint d = (int) Math.sqrt(subsequence[j]);\n\t\t\t\tif (d * d == subsequence[j])\n\t\t\t\t\tcontinue;\n\t\t\t\tboolean f = false;\n\t\t\t\tfor (int k = 2; k <= d; k++) {\n\t\t\t\t\tif (subsequence[j] % k == 0) {\n\t\t\t\t\t\tif (div1[key] == 0) {\n\t\t\t\t\t\t\tdiv1[key] = k;\n\t\t\t\t\t\t\tdiv[key] = subsequence[j];\n\t\t\t\t\t\t\tf = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tf = false;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif (f) {\n\t\t\t\t\tkey++;\n\t\t\t\t}\n\n\t\t\t\t\n\n\t\t\t}\n\t\t\tint n = 0;\n\t\t\tfor (int k = 0; k < key; k++) {\n\t\t\t\tn = div[k] / div1[k];\n\t\t\t\tsum += 1 + div[k] + div1[k] + n;\n\t\t\t}\n\t\t\tSystem.out.println(sum);\n\n\t\t}\n\n\t\ts.close();\n\n\t}", "public static void main(String[] args)\n {\n int n = 20011;\n int m = 20011;\n double sum = 0;\n //HashTable ht = new HashTable(m);\n int[] a = new int[n];\n Arrays.fill(a,(-1)); \n \n Scanner s = new Scanner(System.in);\n System.out.println(\"Enter a function , hashWorst/hash1/hash2/hash3 :\");\n String hash = s.next();\n try { \n HashTable ht = new HashTable(m);\n\n //String hash = \"hash3\";\n BufferedReader inputStream = new BufferedReader(new FileReader(\"data.tar-1-1\")); \n //PrintWriter outputStream = new PrintWriter(new FileOutputStream(\"numbered.txt\")); \n int count = 0; \n String line = inputStream.readLine();\n int hashVal;\n while (line != null){\n //outputStream.println(count + \" \" + line);\n line = inputStream.readLine();\n //System.out.println( ht.hash3(line));\n \n if(hash.equals(\"hash3\")){\n hashVal = ht.hash3(line);\n String z = \"\" +ht.hash3(line);\n if(z != null){\n //System.out.println(z);\n a[count] = hashVal;\n }\n else\n //a[count] = z;\n \n System.out.println(\"wwww\");}\n \n else if(hash.equals(\"hash1\")){\n hashVal = ht.hash1(line);\n String z = \"\" +ht.hash1(line);\n if(z != null)\n {\n //System.out.println(z);\n a[count] = hashVal;\n }\n else\n //a[count] = z;\n \n System.out.println(\"wwww\");}\n\n else if(hash.equals(\"hash2\")){\n hashVal = ht.hash2(line);\n String z = \"\" +ht.hash2(line);\n if(z != null)\n {\n //System.out.println(z);\n a[count] = hashVal;\n }\n else\n //a[count] = z;\n \n System.out.println(\"wwww\");}\n\n /*else if(hash.equals(\"hash1\")){\n hashVal = ht.hashWorst(line);\n a[count] = hashVal;}*/\n else if(hash.equals(\"hashWorst\")){\n hashVal = 1;\n a[1] = hashVal;\n }\n else \n System.out.print(\"Enter The correct function !!\");\n count++;\n\n\n }\n int[] Na = new int[n];\n Arrays.fill(Na,(-1));\n int[] control = new int[n];\n Arrays.fill(control,(-1));\n \n \n System.out.println(\"\\nHash values | Counts | Probability | -P(x)log10(P(x)):\\n\");\n for(int i = 0; i < n;i++){\n // HashTable gt = null;\n int c = 0;\n if(ht.contains(control,a[i]) == false){\n //int c = 0;\n for(int j =0;j<n;j++){\n if(a[j] == a[i] && a[i] != -1)// && j != i)\n c++;\n }\n\n double p = (double)c/10000;\n double e;\n if( p != 0)\n e = -p*Math.log(p);\n else \n e = 0;\n sum +=e;\n double x = (double)a[i];\n System.out.printf(\"%11.5f |\",x);//ln(a[i]+\" | \"+c + \" | \"+p +\" | \" + e );\n System.out.printf(\"%7.5f |\", (double)c);\n System.out.printf(\"%12.5f |\", (double)p);\n System.out.printf(\"%17.5f |\", (double)e);\n System.out.println();\n control[i] = a[i];\n if(a[i]>0)\n Na[a[i]] = c;\n else if(a[i]<0 && Na[(-1)*a[i]] == -1)\n Na[(-1)*a[i]] = c;\n }\n }\n System.out.println(\"Enthropy H(X) is \" + sum);\n // System.out.println(\"\\nNumber of #val counts:\\n\");\n //for(int k : Na){\n //System.out.println(k);\n //}\n\n inputStream.close();\n //outputStream.close();\n } \n catch(FileNotFoundException e) {\n System.out.println(\"Problem opening files.\"); } \n catch(IOException e)\n { \n System.out.println(\"Error reading from original.txt.\");\n }\n \n }", "public static void main(String[] args){\n float w = 11.56E2f;\n int hh = (int)w;\n System.out.println(hh);\n \n System.out.println((int)11.56);\n int cents = (int)(11.56 * 100);\n System.out.println(cents);\n System.out.println(4/7.0);\n System.out.println(Math.random());\n \n System.out.println(Toolkit.getDefaultToolkit().getScreenSize());\n int width=1366,height=768;\n Toolkit.getDefaultToolkit().getScreenSize();\n System.out.println(\"Loop to print first 10 numbers\");\n \n int [] number = {1,2,3,4,5,6,7,8,9,10};\n int total = 0;\n for(int n:number){\n total = total + n;\n }\n System.out.println(total);\n\n System.out.println(\"Loop to print first 10 numbers without arrays\");\n int counter = 0;\n for(int i = 0; i<=10; i++){\n counter = counter + i;\n }\n System.out.println(counter);\n }", "public byte[] initialValue() {\n return new byte[]{(byte) -1, (byte) -40, (byte) -1, (byte) -37, (byte) 0, (byte) 67, (byte) 0, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -1, (byte) -64, (byte) 0, (byte) 17, (byte) 8, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 3, (byte) 1, (byte) 34, (byte) 0, (byte) 2, (byte) 17, (byte) 0, (byte) 3, (byte) 17, (byte) 0, (byte) -1, (byte) -60, (byte) 0, (byte) 31, (byte) 0, (byte) 0, (byte) 1, (byte) 5, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 9, (byte) 10, (byte) 11, (byte) -1, (byte) -60, (byte) 0, (byte) -75, (byte) 16, (byte) 0, (byte) 2, (byte) 1, (byte) 3, (byte) 3, (byte) 2, (byte) 4, (byte) 3, (byte) 5, (byte) 5, (byte) 4, (byte) 4, (byte) 0, (byte) 0, (byte) 1, (byte) 125, (byte) 1, (byte) 2, (byte) 3, (byte) 0, (byte) 4, (byte) 17, (byte) 5, (byte) 18, (byte) 33, (byte) 49, (byte) 65, (byte) 6, (byte) 19, (byte) 81, (byte) 97, (byte) 7, (byte) 34, (byte) 113, (byte) 20, (byte) 50, (byte) -127, (byte) -111, (byte) -95, (byte) 8, (byte) 35, (byte) 66, (byte) -79, (byte) -63, (byte) 21, (byte) 82, (byte) -47, (byte) -16, (byte) 36, (byte) 51, (byte) 98, (byte) 114, (byte) -126, (byte) 9, (byte) 10, (byte) 22, (byte) 23, (byte) 24, (byte) 25, (byte) 26, (byte) 37, (byte) 38, (byte) 39, (byte) 40, (byte) 41, (byte) 42, (byte) 52, (byte) 53, (byte) 54, (byte) 55, (byte) 56, (byte) 57, (byte) 58, (byte) 67, (byte) 68, (byte) 69, (byte) 70, (byte) 71, (byte) 72, (byte) 73, (byte) 74, (byte) 83, (byte) 84, (byte) 85, (byte) 86, (byte) 87, (byte) 88, (byte) 89, (byte) 90, (byte) 99, (byte) 100, (byte) 101, (byte) 102, (byte) 103, (byte) 104, (byte) 105, (byte) 106, (byte) 115, (byte) 116, (byte) 117, (byte) 118, (byte) 119, (byte) 120, (byte) 121, (byte) 122, (byte) -125, (byte) -124, (byte) -123, (byte) -122, (byte) -121, (byte) -120, (byte) -119, (byte) -118, (byte) -110, (byte) -109, (byte) -108, (byte) -107, (byte) -106, (byte) -105, (byte) -104, (byte) -103, (byte) -102, (byte) -94, (byte) -93, (byte) -92, (byte) -91, (byte) -90, (byte) -89, (byte) -88, (byte) -87, (byte) -86, (byte) -78, (byte) -77, (byte) -76, (byte) -75, (byte) -74, (byte) -73, (byte) -72, (byte) -71, (byte) -70, (byte) -62, (byte) -61, (byte) -60, (byte) -59, (byte) -58, (byte) -57, (byte) -56, (byte) -55, (byte) -54, (byte) -46, (byte) -45, (byte) -44, (byte) -43, (byte) -42, (byte) -41, (byte) -40, (byte) -39, (byte) -38, (byte) -31, (byte) -30, (byte) -29, (byte) -28, (byte) -27, (byte) -26, (byte) -25, (byte) -24, (byte) -23, (byte) -22, (byte) -15, (byte) -14, (byte) -13, (byte) -12, (byte) -11, (byte) -10, (byte) -9, (byte) -8, (byte) -7, (byte) -6, (byte) -1, (byte) -60, (byte) 0, (byte) 31, (byte) 1, (byte) 0, (byte) 3, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 9, (byte) 10, (byte) 11, (byte) -1, (byte) -60, (byte) 0, (byte) -75, (byte) 17, (byte) 0, (byte) 2, (byte) 1, (byte) 2, (byte) 4, (byte) 4, (byte) 3, (byte) 4, (byte) 7, (byte) 5, (byte) 4, (byte) 4, (byte) 0, (byte) 1, (byte) 2, (byte) 119, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 17, (byte) 4, (byte) 5, (byte) 33, (byte) 49, (byte) 6, (byte) 18, (byte) 65, (byte) 81, (byte) 7, (byte) 97, (byte) 113, (byte) 19, (byte) 34, (byte) 50, (byte) -127, (byte) 8, (byte) 20, (byte) 66, (byte) -111, (byte) -95, (byte) -79, (byte) -63, (byte) 9, (byte) 35, (byte) 51, (byte) 82, (byte) -16, (byte) 21, (byte) 98, (byte) 114, (byte) -47, (byte) 10, (byte) 22, (byte) 36, (byte) 52, (byte) -31, (byte) 37, (byte) -15, (byte) 23, (byte) 24, (byte) 25, (byte) 26, (byte) 38, (byte) 39, (byte) 40, (byte) 41, (byte) 42, (byte) 53, (byte) 54, (byte) 55, (byte) 56, (byte) 57, (byte) 58, (byte) 67, (byte) 68, (byte) 69, (byte) 70, (byte) 71, (byte) 72, (byte) 73, (byte) 74, (byte) 83, (byte) 84, (byte) 85, (byte) 86, (byte) 87, (byte) 88, (byte) 89, (byte) 90, (byte) 99, (byte) 100, (byte) 101, (byte) 102, (byte) 103, (byte) 104, (byte) 105, (byte) 106, (byte) 115, (byte) 116, (byte) 117, (byte) 118, (byte) 119, (byte) 120, (byte) 121, (byte) 122, (byte) -126, (byte) -125, (byte) -124, (byte) -123, (byte) -122, (byte) -121, (byte) -120, (byte) -119, (byte) -118, (byte) -110, (byte) -109, (byte) -108, (byte) -107, (byte) -106, (byte) -105, (byte) -104, (byte) -103, (byte) -102, (byte) -94, (byte) -93, (byte) -92, (byte) -91, (byte) -90, (byte) -89, (byte) -88, (byte) -87, (byte) -86, (byte) -78, (byte) -77, (byte) -76, (byte) -75, (byte) -74, (byte) -73, (byte) -72, (byte) -71, (byte) -70, (byte) -62, (byte) -61, (byte) -60, (byte) -59, (byte) -58, (byte) -57, (byte) -56, (byte) -55, (byte) -54, (byte) -46, (byte) -45, (byte) -44, (byte) -43, (byte) -42, (byte) -41, (byte) -40, (byte) -39, (byte) -38, (byte) -30, (byte) -29, (byte) -28, (byte) -27, (byte) -26, (byte) -25, (byte) -24, (byte) -23, (byte) -22, (byte) -14, (byte) -13, (byte) -12, (byte) -11, (byte) -10, (byte) -9, (byte) -8, (byte) -7, (byte) -6, (byte) -1, (byte) -38, (byte) 0, (byte) 12, (byte) 3, (byte) 1, (byte) 0, (byte) 2, (byte) 17, (byte) 3, (byte) 17, (byte) 0, (byte) 63, (byte) 0, (byte) -114, (byte) -118, (byte) 40, (byte) -96, (byte) 15, (byte) -1, (byte) -39};\n }", "public static void main(String[] args) {\n\t\tint i=0;\r\n\t\tint j=0;\r\n\t\tint cnt=0;\r\n\t\t\r\n while(true) {//무한 반복\r\n i=(int)(Math.random()*6)+1;//첫번째 주사위 1<=i<=6\r\n j=(int)(Math.random()*6)+1;//두번째 주사위 1<=j<=6\r\n if(i+j==5) break;//무한 반복을 빠져나가는 조건\r\n cnt++;\r\n }\r\n \r\n System.out.println(\"(\"+i+\",\"+j+\")\");\r\n\t System.out.println(\"총반복횟수:\"+cnt);\r\n\t\t\r\n\t}", "public static void main(String[] args)\n {\n int[][] ints;\n int[][] ints1;\n\n\n\n\n ints = new int[][]{\n {1, 2, 3, 4, 5, 6, 7, 8, 9},\n {10, 11, 12, 13, 14, 15, 16, 17, 18},\n {19, 20, 21, 22, 23, 24, 25, 26, 27},\n {28, 29, 30, 31, 32, 33, 34, 35, 36},\n {37, 38, 39, 40, 41, 42, 43, 44, 45},\n {46, 47, 48, 49, 50, 51, 52, 53, 54},\n {55, 56, 57, 58, 59, 60, 61, 62, 63},\n {64, 65, 66, 67, 68, 69, 70, 0, 71},\n {73, 74, 75, 76, 77, 78, 79, 80, 72}\n };\n\n ints = new int[][]{\n {1,0},\n {2,3},\n };\n ints1 = new int[][]{\n {1, 2, 3},\n {4, 5, 6},\n {7, 0, 8}\n };\n\n ints1 = new int[][]{\n {1, 2, 3},\n {4, 8, 5},\n {7, 0, 6}\n };\n ints = new int[][]{\n {5, 0, 4},\n {2, 3, 8},\n {7,1,6}\n };\n ints1 = new int[][]{\n {1, 6, 4},\n {7, 0, 8},\n {2, 3, 5}\n };\n\n ints1 = new int[][]{\n {6, 0, 5},\n {8, 7, 4},\n {3, 2, 1}\n };\n ints1 = new int[][]{\n {11, 0, 4, 7},\n {2, 15, 1, 8},\n {5, 14, 9, 3},\n {13, 6, 12, 10 }\n };\n\n\n ints1 = new int[][]{\n {14, 13, 5, 3},\n {0, 1, 8, 12},\n {6, 2, 4, 10},\n {11, 9, 15, 7 }\n };\n\n ints1 = new int[][]{\n {8, 4, 7},\n {1,5,6},\n {3,2,0}\n };\n\n\n ints1 = new int[][]{\n {8, 4, 7},\n {1,5,6},\n {3,2,0}\n };\n\n\n ints = new int[][]{\n {1, 2, 3},\n {4, 6,5},\n {7, 8,0}\n };\n ints1 = new int[][]{\n {8, 4, 7},\n {1,5,6},\n {3,2,0}\n };\n ints = new int[][]{\n {1,0},\n {2,3},\n };\n System.out.println(System.currentTimeMillis());\n Board board = new Board(ints);\n Solver solution = new Solver(board);\n\n for (Board el :solution.solution())\n {\n System.out.println(el);\n }\n System.out.println(System.currentTimeMillis());\n\n\n }", "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\t\tint lotto_com[] = new int[6]; int lotto_user[] = new int[6]; int i;\n\t\tint count=0;\n\t\tint match_count=0;\n\t\twhile(count<lotto_com.length){\n\t\t\tlotto_com[count] =((int)(Math.random()*2000)%45)+1;\n\t\t\tfor(i=0;i<count;i++){\n\t\t\t\tif(lotto_com[i]==lotto_com[count]){\n\t\t\t\t\tlotto_com[count]=0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(lotto_com[count]>0){\n\t\t\t\tcount++;\n\t\t\t}\n\n\t}\n\t\tcount=0;\n\t\twhile(count<lotto_user.length){\n\t\t\twhile((lotto_user[count] =getInput().readInt(\"원하는 \"+(count+1)+\"번째 로또 숫자를 입력하세요 \"))<1||lotto_user[count]>45){\n\t\t\t\tprintline(\"=> 잘못 입력하셨습니다.\");\n\t\t\t}\n\t\t\tfor(i=0;i<count;i++){\n\t\t\t\tif(lotto_user[i]==lotto_user[count]){\n\t\t\t\t\tlotto_user[count]=0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(lotto_user[count]>0){\n\t\t\t\tfor(i=0;i<=count;i++){\n\t\t\t\t\tif(lotto_user[count]==lotto_com[i]){\n\t\t\t\t\t\tmatch_count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tprintline(\"=> 잘못 입력하셨습니다.\");\n\t\t\t}\n\n\t}\n\t\tprintline(\"\");\n\t\tprint(\"이번 주의 로또 당첨 번호는 \");\n\t\tfor(i=0;i<lotto_com.length;i++){\n\t\t\tprint(lotto_com[i]+\" \");\n\t\t}\n\t\tprintline(\"입니다.\\n\");\nprintf(\"일치하는 로또 번호는 %d개 입니다.\",match_count);\n\t}", "private byte[] m1034b(java.lang.String r8) {\n /*\n r7 = this;\n r6 = 2\n r4 = 6\n r2 = 0\n java.lang.String r0 = \":\"\n java.lang.String[] r0 = r8.split(r0)\n byte[] r1 = new byte[r4]\n if (r0 == 0) goto L_0x0010\n int r3 = r0.length // Catch:{ Throwable -> 0x0043 }\n if (r3 == r4) goto L_0x001e\n L_0x0010:\n r0 = 6\n java.lang.String[] r0 = new java.lang.String[r0] // Catch:{ Throwable -> 0x0043 }\n r3 = r2\n L_0x0014:\n int r4 = r0.length // Catch:{ Throwable -> 0x0043 }\n if (r3 >= r4) goto L_0x001e\n java.lang.String r4 = \"0\"\n r0[r3] = r4 // Catch:{ Throwable -> 0x0043 }\n int r3 = r3 + 1\n goto L_0x0014\n L_0x001e:\n int r3 = r0.length // Catch:{ Throwable -> 0x0043 }\n if (r2 >= r3) goto L_0x0041\n r3 = r0[r2] // Catch:{ Throwable -> 0x0043 }\n int r3 = r3.length() // Catch:{ Throwable -> 0x0043 }\n if (r3 <= r6) goto L_0x0033\n r3 = r0[r2] // Catch:{ Throwable -> 0x0043 }\n r4 = 0\n r5 = 2\n java.lang.String r3 = r3.substring(r4, r5) // Catch:{ Throwable -> 0x0043 }\n r0[r2] = r3 // Catch:{ Throwable -> 0x0043 }\n L_0x0033:\n r3 = r0[r2] // Catch:{ Throwable -> 0x0043 }\n r4 = 16\n int r3 = java.lang.Integer.parseInt(r3, r4) // Catch:{ Throwable -> 0x0043 }\n byte r3 = (byte) r3 // Catch:{ Throwable -> 0x0043 }\n r1[r2] = r3 // Catch:{ Throwable -> 0x0043 }\n int r2 = r2 + 1\n goto L_0x001e\n L_0x0041:\n r0 = r1\n L_0x0042:\n return r0\n L_0x0043:\n r0 = move-exception\n java.lang.String r1 = \"Req\"\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n java.lang.String r3 = \"getMacBa \"\n java.lang.StringBuilder r2 = r2.append(r3)\n java.lang.StringBuilder r2 = r2.append(r8)\n java.lang.String r2 = r2.toString()\n com.amap.loc.C0310c.m956a(r0, r1, r2)\n java.lang.String r0 = \"00:00:00:00:00:00\"\n byte[] r0 = r7.m1034b(r0)\n goto L_0x0042\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.amap.loc.C0321cj.m1034b(java.lang.String):byte[]\");\n }", "public static void main(String[] args) {\n\r\n\t\tScanner sc = new Scanner(System.in);\r\n\r\n\t\tint num = sc.nextInt();\r\n\t\tint snum[] = new int[4];\r\n\t\tint count = 0;\r\n\t\tint k1 = 0;\r\n\t\tint k2 = 0;\r\n\r\n\t\twhile (num != 6174) { // 반복\r\n\r\n\t\t\tcount++;\r\n\r\n\t\t\tsnum[0] = num / 1000; // 1000의자리수\r\n\t\t\tsnum[1] = (num - (snum[0] * 1000)) / 100; // 100의 자리수\r\n\t\t\tsnum[2] = (num - ((snum[0] * 1000) + (snum[1] * 100))) / 10; // 10의자리수\r\n\t\t\tsnum[3] = num % 10; // 1의자리수\r\n\r\n\t\t\tint temp;\r\n\t\t\tfor (int i = 0; i < snum.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < snum.length; j++) {\r\n\t\t\t\t\ttemp = snum[i];\r\n\t\t\t\t\tif (snum[i] >= snum[j]) { // 큰수부터 정렬\r\n\t\t\t\t\t\tsnum[i] = snum[j];\r\n\t\t\t\t\t\tsnum[j] = temp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tk1 = Integer.parseInt(Integer.toString(snum[0]) + snum[1] + snum[2] + snum[3]); // 큰\r\n\t\t\tk2 = Integer.parseInt(Integer.toString(snum[3]) + snum[2] + snum[1] + snum[0]); // 작은\r\n\r\n\t\t\tnum = k1 - k2; // 뺀\r\n\r\n\t\t}\r\n\t\tSystem.out.println(count);\r\n\t}", "public static void main(String[] args) {\n\t\tString s1 = \"234\";\n\t\tint fd = 0;\n\t\tint fd1 = 0;\n\t\tint fd2 = 1;\n\t\tfor (int df = s1.length() - 1; df >= 0; df--) {\n\t\t\tString firstLetter7 = String.valueOf(s1.charAt(df));\n\t\t\tif (firstLetter7.equals(\"0\"))\n\t\t\t\tfd1 = 0;\n\t\t\telse if (firstLetter7.equals(\"1\"))\n\t\t\t\tfd1 = 1;\n\t\t\telse if (firstLetter7.equals(\"2\"))\n\t\t\t\tfd1 = 2;\n\t\t\telse if (firstLetter7.equals(\"3\"))\n\t\t\t\tfd1 = 3;\n\t\t\telse if (firstLetter7.equals(\"4\"))\n\t\t\t\tfd1 = 4;\n\t\t\telse if (firstLetter7.equals(\"5\"))\n\t\t\t\tfd1 = 5;\n\t\t\telse if (firstLetter7.equals(\"6\"))\n\t\t\t\tfd1 = 6;\n\t\t\telse if (firstLetter7.equals(\"7\"))\n\t\t\t\tfd1 = 7;\n\t\t\telse if (firstLetter7.equals(\"8\"))\n\t\t\t\tfd1 = 8;\n\t\t\telse if (firstLetter7.equals(\"9\"))\n\t\t\t\tfd1 = 9;\n\t\t\tfd = fd + fd2 * fd1;\n\t\t\tfd2 = fd2 * 10;\n\t\t}\n\t\tint a = fd - 1;\n\t\tfor (int i = a; i > 1; i--) {\n\t\t\tint qw = 0;\n\t\t\tint qw1 = i;\n\t\t\tString s2 = \"\";\n\t\t\twhile (qw1 > 0) {\n\t\t\t\tqw = qw1 % 10;\n\t\t\t\tif (qw == 0)\n\t\t\t\t\ts2 = \"0\" + s2;\n\t\t\t\telse if (qw == 1)\n\t\t\t\t\ts2 = \"1\" + s2;\n\t\t\t\telse if (qw == 2)\n\t\t\t\t\ts2 = \"2\" + s2;\n\t\t\t\telse if (qw == 3)\n\t\t\t\t\ts2 = \"3\" + s2;\n\t\t\t\telse if (qw == 4)\n\t\t\t\t\ts2 = \"4\" + s2;\n\t\t\t\telse if (qw == 5)\n\t\t\t\t\ts2 = \"5\" + s2;\n\t\t\t\telse if (qw == 6)\n\t\t\t\t\ts2 = \"6\" + s2;\n\t\t\t\telse if (qw == 7)\n\t\t\t\t\ts2 = \"7\" + s2;\n\t\t\t\telse if (qw == 8)\n\t\t\t\t\ts2 = \"8\" + s2;\n\t\t\t\telse if (qw == 9)\n\t\t\t\t\ts2 = \"9\" + s2;\n\t\t\t\tqw1 = qw1 / 10;\n\t\t\t}\n\t\t\tSystem.out.println(s1);\n\t\t\tSystem.out.println(s2);\n\t\t\tExp11 ur = new Exp11();\n\t\t\ts1 = ur.emp11(s1, s2);\n\t\t}\n\t\tSystem.out.println(s1);\n\t}", "public static void main(String[] args) throws IOException {\n BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n StringTokenizer st = new StringTokenizer(f.readLine());\n int a = Integer.parseInt(st.nextToken());\n int b = Integer.parseInt(st.nextToken());\n int c = Integer.parseInt(st.nextToken());\n int d = Integer.parseInt(st.nextToken());\n int x = -1;\n int y = -1;\n for(int i = 1; i < 45000; i++) {\n if(i*(i-1)/2 == a) {\n x = i;\n }\n if(i*(i-1)/2 == d) {\n y = i;\n }\n }\n if(x == -1 || y == -1) {\n out.println(\"Impossible\");\n } else {\n if(x*y == b+c) {\n int w = c/x;\n int z = c%x;\n out.println(\"1\".repeat(w)+\"0\".repeat(x-z)+\"1\".repeat(z > 0 ? 1 : 0)+\"0\".repeat(z)+\"1\".repeat(y-w-(z > 0 ? 1 : 0)));\n } else {\n if(b+c > 0) {\n out.println(\"Impossible\");\n } else if(x == 1) {\n out.println(\"1\".repeat(y));\n } else if(y == 1) {\n out.println(\"0\".repeat(x));\n } else {\n out.println(\"Impossible\");\n }\n }\n }\n f.close();\n out.close();\n }", "private UInteger[] getHashValues() {\n int hashWindowSize = 48;\n UInteger[] hashValues = new UInteger[this.fileContent.length];\n int shiftAmount = this.getShiftAmount(hashWindowSize);\n int i = 0;\n\n int[] lookupTable =\n {0x5e3f7c48, 0x796a0d2b, 0xbecd4e32, 0x6f16159c, 0x687312bc, 0x12a6f30a, 0x8fca2662,\n 0x79b83d14, 0x3fab3f30, 0x984d6ca2, 0x4df5fe6c, 0x4acd3196, 0x6245ad21,\n 0x3a15e5ba, 0x90db6499, 0x05aacb6b, 0x791cf724, 0x504cd910, 0x98093570,\n 0x090392df, 0xf193e5b8, 0x42023c5b, 0x80a95c6a, 0x11e676be, 0xc70f2117,\n 0xeed4587f, 0x6479e9bd, 0x1b0c427c, 0x410486ba, 0x30f5b837, 0xf957d307,\n 0x1535f121, 0xabe45e90, 0x7a1ab8f0, 0x1c6887e4, 0x4170b7ba, 0x8b491bed,\n 0x5c920e73, 0x1b1ed791, 0x7a0ed482, 0xcce86619, 0x45dc7290, 0x57e71362,\n 0x2e24f01c, 0x0a0637f3, 0x0e8c5565, 0x15944012, 0x34f7eeea, 0xbc628141,\n 0x1e200874, 0xe9244379, 0x3e63aeca, 0x7a3b3cce, 0x73f8a245, 0xd734e215,\n 0x834fa434, 0xf96a0904, 0xfb39a424, 0x0bfa963a, 0x9b236ee2, 0xa2131005,\n 0x3eb70acf, 0x2907bcd8, 0x3f685f3a, 0x3765fd37, 0x1c1c34d2, 0x03a95179,\n 0x024be6c3, 0x06128960, 0x844e7490, 0xe2b371a3, 0x3382909c, 0x3d519a77,\n 0x90971ec9, 0x6ea745e5, 0x490b3a5c, 0x7f3916f7, 0xbc150351, 0x241a7ba0,\n 0xec93c2bb, 0x6c7083aa, 0xf3937751, 0xe6aa1df1, 0x129fc001, 0xb90709b9,\n 0x7e59a4fc, 0x4509e58a, 0x8a93ed43, 0x6934ce62, 0x8ec6af1a, 0xf36581a9,\n 0x53d01d93, 0xb34eef69, 0x08494a84, 0x0f6dff34, 0x74729aa3, 0x48b5475f,\n 0xb986dc84, 0xd0424c8d, 0xb72ad089, 0x0adbbdb8, 0x824fdbe8, 0x99ad1058,\n 0x98faec38, 0xe746242b, 0x2b7ee7fc, 0x2e151fa7, 0x6413270f, 0x68ed7239,\n 0x7729e2d3, 0x5697b3a5, 0x0b90a6c3, 0xdf7cefcf, 0xded46a48, 0x46956888,\n 0xb3bb6dc4, 0xe987578f, 0xf82e74b7, 0xc8eeeba4, 0xdd960ff9, 0x482ed28d,\n 0x4f343078, 0x563ab8a4, 0x3ec7aa0d, 0x2481d448, 0x5fe98704, 0x5aafc580,\n 0x841d81ec, 0xae7fe8fd, 0x6b31ccb6, 0x911ebdd4, 0x75f4703d, 0xe6855a0f,\n 0x6184b42e, 0x147a4a95, 0x39528e48, 0xe975b416, 0x3cba13d3, 0x1e23e544,\n 0xf7955286, 0xa5f96b7f, 0xaaa697aa, 0x29e794e3, 0x87628c09, 0xfeebf5f1,\n 0xf8b070cd, 0xe361b627, 0x8c7a8682, 0x69cab331, 0xca867ad1, 0xd0151a96,\n 0xfc19a6b9, 0x6d7439e7, 0x64cd62ac, 0x4a650747, 0x9ddbfa28, 0x337c8bed,\n 0xf12a6860, 0x3767ffd3, 0x13559ced, 0x71ac2011, 0xc11dc687, 0x260b7105,\n 0xc13bca0c, 0xcd0af893, 0x793b54e6, 0x89d27fc3, 0xc6bd1c88, 0xe3337313,\n 0x387bc671, 0x61280de4, 0x76941a36, 0xaa52a2b9, 0x6d7cb52c, 0x18ff4d70,\n 0x8987cf38, 0x306e47ed, 0xf7df8135, 0x18a8e024, 0xc9eb085f, 0xc1a7c769,\n 0xd5667a12, 0x9c8be93a, 0x028781b1, 0x6213dada, 0x07fef4f5, 0x5e6bf91d,\n 0x469ea798, 0xb9654a37, 0x1cb5e74e, 0x525d502d, 0xe805ec68, 0xdd8c4320,\n 0x7890848f, 0x61e59c8e, 0x1d99f9ef, 0x25b60b20, 0x2f198088, 0xe01b6926,\n 0xffa4917f, 0xb2fa0f22, 0xee8ac924, 0x18a1c5a7, 0xb76d8d7f, 0x88ad5e0d,\n 0x7b3fb12b, 0xc8a91add, 0x762a6f4e, 0x056fad31, 0xebecfab8, 0xea54cd17,\n 0x71f5af9f, 0xfaececa1, 0x08a52f4d, 0xbb5efebe, 0x5bcb04c2, 0xcb2530b0,\n 0x01bb862b, 0xbb5d54f0, 0x404deb4b, 0x038658bd, 0x09399005, 0xddd862c8,\n 0x8985776f, 0xcfcfd717, 0xbec756cb, 0x52aecc5a, 0x09ac3f62, 0x62c1c6fb,\n 0x76cc3221, 0xcde6d028, 0x844d9291, 0xc143eeac, 0x0ea5e772, 0x8855456e,\n 0xeb03a426, 0x3398475d, 0x73dc8107, 0x681605d0, 0xd18b6264, 0x934e43eb,\n 0x59e76d21, 0xd3ce2b77, 0x4ccfee1c, 0x2f4af76d, 0x8b12a309, 0x849bb415,\n 0xf45ad809, 0xc7bccae7, 0xac891c35, 0x59db2274, 0xbcd71393, 0x2c9b1705,\n 0xcb536a69, 0xb2800f00, 0x111313fc};\n\n while (i < this.fileContent.length) {\n UInteger hashValue = i == 0 ? uint(0) : hashValues[i - 1];\n int trailingEdgeData = i < hashWindowSize ? ubyte(0).intValue() :\n ubyte(this.fileContent[i - hashWindowSize]).intValue();\n int leadingEdgeData = ubyte(this.fileContent[i]).intValue();\n UInteger val = hashValue.xor(uint(lookupTable[trailingEdgeData]))\n .xor(uint(lookupTable[leadingEdgeData]));\n hashValues[i] =\n val.leftShift(2).inclusiveOr(val.rightShift(Integer.SIZE - shiftAmount));\n i++;\n }\n\n return hashValues;\n }", "public int m7468c() {\n if (!this.f5790b.f5950m) {\n return 0;\n }\n C2302k c2302k;\n int i;\n C2101h e = m7462e();\n if (e.f5936d != 0) {\n c2302k = this.f5790b.f5954q;\n i = e.f5936d;\n } else {\n byte[] bArr = e.f5937e;\n this.f5798j.m8383a(bArr, bArr.length);\n c2302k = this.f5798j;\n i = bArr.length;\n }\n boolean z = this.f5790b.f5951n[this.f5793e];\n this.f5797i.f6929a[0] = (byte) ((z ? ProfileEditingConfig.DEFAULT_MAX_LENGTH : 0) | i);\n this.f5797i.m8388c(0);\n this.f5789a.sampleData(this.f5797i, 1);\n this.f5789a.sampleData(c2302k, i);\n if (!z) {\n return i + 1;\n }\n C2302k c2302k2 = this.f5790b.f5954q;\n int h = c2302k2.m8396h();\n c2302k2.m8390d(-2);\n h = (h * 6) + 2;\n this.f5789a.sampleData(c2302k2, h);\n return (i + 1) + h;\n }", "public static void main(String[] args) {\n\t\tfor (int i = 1; i < 101; i++) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tSystem.out.println(\"Next Program\");\n\t\tfor (int i = 100; i > 0; i--) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tSystem.out.println(\"Next Program.\");\n\t\tfor (int i = 2; i < 101; i = i + 2) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tSystem.out.println(\"Next Program.\");\n\t\tfor (int i = 1; i < 100; i = i + 2) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tSystem.out.println(\"Next Program.\");\n\t\tfor (int i = 0; i < 501; i++) {\n\t\t\tif (i % 2 == 0) {\n\t\t\t\tSystem.out.println(i + \" is even.\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(i + \" is odd.\");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Next Program.\");\n\t\tfor (int i = 0; i < 778; i = i + 7) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tSystem.out.println(\"Next Program.\");\n\t\tfor (int i = 2006; i < 2019; i++) {\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println(\"Next Program.\");\n\t\tfor (int i = 0; i < 3; i++) {\n\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tSystem.out.println(i + \" \" + \" \" + j);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Next Program.\");\n\t\tfor (int i = 0; i < 9; i += 3) {//rows \n\t\t\tfor (int j = 1; j < 4; j++) {//how many \n\t\t\t\tSystem.out.print(j + i);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println(\"Next Program.\");\n\t\tfor (int i = 0; i < 100; i += 10) {\n\t\t\tfor (int j = 1; j <11; j++) {\n\t\t\t\tSystem.out.print(j + i+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println(\"Next Program.\");\n\t\nfor (int i = 1; i < 7; i++) {\n\tfor (int j = 0; j < i; j++) {\n\t\tSystem.out.print(\"* \");\n\t}\n\tSystem.out.println();\n}\t\n\n\t\n\t\n\t\n\t}", "public static long D(long n) {\n\t\tlong count = 0;\n\t\n\t\tlong m = 9;\n\t\t// F(7) = 138, F(8) = 362\n\t\tlong recPrev=138;\n\t\tlong recCurrent=362;\n\n\t\twhile (n >= m) {\t\n\t\t\tif (m %6 == 0) {\n\t\t\t\tlong current = recCurrent;\n\t\t\t\trecCurrent = 3L*recCurrent-2*recPrev + 38L;\n\t\t\t\trecPrev = current;\n\t\t\t} else if (m%6== 1) {\n\t\t\t\tlong current = recCurrent;\n\t\t\t\trecCurrent = 3L*recCurrent-2*recPrev + 36L;\n\t\t\t\trecPrev = current;\n\t\t\t} else if (m%6==2 || m%6==3 || m%6==5) {\n\t\t\t\tlong current = recCurrent;\n\t\t\t\trecCurrent = 3L*recCurrent-2*recPrev + 32L;\n\t\t\t\trecPrev = current;\n\t\t\t} else /*(m%6==4)*/{\n\t\t\t\tlong current = recCurrent;\n\t\t\t\trecCurrent = 3L*recCurrent-2*recPrev + 30L;\n\t\t\t\trecPrev = current;\n\t\t\t}\n\t\t\trecPrev = recPrev % 87654321;\n\t\t\trecCurrent = recCurrent % 87654321;\t\n\t\t\tif (recCurrent == 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tm +=1;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\treturn count;\n\n\t}", "public static void main(String[] args) {\n\n int n = 20;\n int[] input = {0, 6, 0, 6, 4, 0, 6, 0, 6, 0, 4, 3, 0, 1, 5, 1, 2, 4, 2, 4};\n String[] inStr = {\"ab\", \"cd\", \"ef\", \"gh\", \"ij\", \"ab\", \"cd\", \"ef\", \"gh\", \"ij\", \"that\", \"be\", \"to\", \"be\", \"question\", \"or\", \"not\", \"is\", \"to\", \"the\"};\n int[] count = new int[100];\n for (int i = 0; i < n; i++) {\n// String line = in.nextLine();\n// String[] elem = line.split(\"\\\\s\");\n// System.out.println(elem[0]+\" - \"+elem[1]);\n// input[i] = Integer.parseInt(elem[0]);\n// inStr[i] = elem[1];\n// count[input[i]] ++;\n }\n\n for (int i = n / 2; i < input.length; i++)\n count[input[i]]++;\n\n// for (int i = 0; i < count.length; i++)\n// System.out.print(count[i]);\n// System.out.println();\n\n int printed = 0;\n int i = 0;\n StringBuffer buffer = new StringBuffer();\n while (count[i] > 0){\n// for (int i = 0; i < count.length; i++) {\n// for (Integer st : findIndex(input, i,count[i])) {\n// System.out.print(findStr(inStr, st) + \" \");\n for (String st : findIndex(input,inStr, i,count[i])) {\n // System.out.print( st + \" \");\n buffer.append(st+\" \");\n printed++;\n }\n i++;\n }\n for (int idx = printed; idx<n;idx++)\n buffer.append(\"- \");\n // System.out.print(\"- \");\n System.out.println(buffer);\n\n\n }", "static int getNumPatterns() { return 64; }", "public void init24()\n {\n\t \twidth= p[21]<<24 | p[20]<<16 | p[19]<<8 | p[18];\n\t\theight= p[25]<<24 | p[24]<<16 | p[23]<<8 | p[22];\n\t\tint extra=(width*3)%4;\n \tif(extra!=0)\n \tpadding=4-extra;\n int x,z=54;\n l=0;\n int j=0;\n for(int q=0;q<height;q++)\n {\n x=0;\n \t while(x<width)\n \t {\n \t b=p[z]&0xff;\n if(j<maxbinary)\n {\n if(binary[j]!=0)\n {\n p1[z]=p[z]&0xff|binary[j++];\n b1=p1[z]&0xff;\n }\n else\n {\n p1[z]=p[z]&0xff & (binary[j++]|0xfe);\n b1=p1[z]&0xff;\n }\n }\n else\n b1=p[z]&0xff;\n \tg=p[z+1]&0xff;\n if(j<maxbinary)\n {\n if(binary[j]!=0)\n {\n p1[z+1]=p[z+1]&0xff|binary[j++];\n g1=p[z+1]&0xff;\n }\n else\n {\n p1[z+1]=p[z+1]&0xff & (binary[j++]|0xfe);\n g1=p1[z+1]&0xff;\n }\n }\n else\n g1=p[z]&0xff;\n r=p[z+2]&0xff;\n if(j<maxbinary)\n {\n if(binary[j]!=0)\n {\n p1[z+2]=p[z+2]&0xfe|binary[j++];\n r1=p[z+2]&0xff;\n }\n else\n {\n p1[z+2]=p[z+2]&0xff & (binary[j++]|0xfe);\n r1=p1[z+2]&0xff;\n }\n }\n else\n r1=p[z]&0xff;\n\tz=z+3;\n\tpix[l]= 255<<24 | r<<16 | g<<8 | b;\n pix1[l]= 255<<24 | r1<<16 | g1<<8 | b1;\n\tl++;\n\tx++;\n\t}\nz=z+padding;\n}\nint k;\nx=0;\n\tfor(i=l-width;i>=0;i=i-width) //l=WIDTH * height\n\t{\n\t\tfor(k=0;k<width;k++)\n\t\t{\n\t\tpixels[x]=pix[i+k];\n pixels1[x]=pix[i+k];\n\t\tx++;\n\t\t}\n\t}\n }", "public final void mo4376b(int i) {\n byte[] bArr;\n int i2;\n if (!zzut.f17550c || mo4375b() < 10) {\n while ((i & -128) != 0) {\n bArr = this.f20653b;\n i2 = this.f20656e;\n this.f20656e = i2 + 1;\n bArr[i2] = (byte) ((i & 127) | 128);\n i >>>= 7;\n }\n try {\n bArr = this.f20653b;\n i2 = this.f20656e;\n this.f20656e = i2 + 1;\n bArr[i2] = (byte) i;\n return;\n } catch (int i3) {\n throw new zzc(String.format(\"Pos: %d, limit: %d, len: %d\", new Object[]{Integer.valueOf(this.f20656e), Integer.valueOf(this.f20655d), Integer.valueOf(1)}), i3);\n }\n }\n while ((i3 & -128) != 0) {\n bArr = this.f20653b;\n i2 = this.f20656e;\n this.f20656e = i2 + 1;\n dp.m11753a(bArr, (long) i2, (byte) ((i3 & 127) | 128));\n i3 >>>= 7;\n }\n bArr = this.f20653b;\n i2 = this.f20656e;\n this.f20656e = i2 + 1;\n dp.m11753a(bArr, (long) i2, (byte) i3);\n }", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n char[] t = br.readLine().toCharArray();\n char[] p = br.readLine().toCharArray();\n int tLength = t.length;\n int pLength = p.length;\n // 1. 실패함수 만들기\n int[] fail = new int[pLength];\n for (int i = 1,j=0; i < pLength; i++) { // i를 접미사 포인터, j를 접두사 포인터\n while(j>0 && p[i]!=p[j]) {\n j=fail[j-1];\n }\n \n if (p[i] == p[j]) fail[i] = ++j;\n }\n \n int cnt=0;\n ArrayList<Integer> list = new ArrayList<Integer>();\n for(int i=0,j=0; i<tLength; ++i) { //i=텍스트 포인터, j: 패턴 포인터\n while (j>0 && t[i]!=p[j]) j=fail[j-1];\n \n if (t[i]==p[j]) { //두 글자 일치\n if (j==pLength-1) { //일치한 문자가 패턴의 끝이면\n list.add(i-pLength+2);\n cnt++; //결과 카운트 증가\n j=fail[j]; //j까지 맞은 경우이므로 실패함수 fail[j] 이용하여 j포인터 이동\n }else j++;\n }\n }\n System.out.println(cnt);\n for(int i=0;i<list.size();++i) {\n \tSystem.out.println(list.get(i));\n }\n\t}", "@SuppressWarnings(\"unlikely-arg-type\")\r\n\tpublic static void main(String[] args) throws InterruptedException, ExecutionException, IOException {\r\n\t\t// TODO Auto-generated method stub\r\n\r\n\t\t// System.out.println(\"what\");\r\n\t\tint k = 7;\r\n\r\n\t\tchar[] set = { 'a', 'b', 'c' };\r\n\t\tchar[] str = new char[k];\r\n \r\n\t\tenumeratePaths(k, set, str, 0); // call function to generate the paths\r\n\t back_Up();// function to back up set of paths\r\n\t\t\t\t\t\t// information\r\n\t\t \r\n\r\n\t\tint[] lb = new int[R];// lower bound\r\n\t\tint[] ub = new int[R];// upper bound\r\n\r\n\t\tfor (int j = 0; j < R; j++) { // the sample range of integers is between 1 and 100\r\n\t\t\tlb[j] = -1000; // lower bound\r\n\t\t\tub[j] = 1000; // upper bound\r\n\r\n\t\t}\r\n\r\n\t\tfor (int run = 0; run < RUN; run++) {\r\n\r\n\t\t\tint[][] x = new int[pop_num][R];\r\n\t\t\tint[][] v = new int[pop_num][R];\r\n\t\t\t //id = 0;\r\n\t\t\t\r\n\t\t\t//paths.put(new String(str) , false);\r\n\t\t\tobj_total = 0;\r\n\t\t\t group_1_count = 0;\r\n\t\t group_2_count = 0;\r\n\t\t\t group_3_count = 0;\r\n\t\t\t group_4_count = 0;\r\n\t\t\t group_5_count = 0;\r\n\t\t\t group_6_count = 0;\r\n\t\t\t group_7_count = 0;\r\n\t\t\t group_8_count = 0;\r\n\t\t\t group_9_count = 0;\r\n\t\t\t\r\n\t\t\t group_10_count = 0;\r\n\t\t\t group_11_count = 0;\r\n\t\t\t group_12_count = 0;\r\n\t\t\t group_13_count = 0;\r\n\t\t\t group_14_count = 0;\r\n\t\t\t group_15_count = 0;\r\n\t\t\t group_16_count = 0;\r\n\t\t\t group_17_count = 0;\r\n\t\t\t group_18_count = 0;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// pick_counter_1 = 0;\r\n\t\t\t \r\n\t\t\t group_19_count = 0;\r\n\t\t\t group_20_count = 0;\r\n\t\t\t group_21_count = 0;\r\n\t\t\t group_22_count = 0;\r\n\t\t\t group_23_count = 0;\r\n\t\t\t group_24_count = 0;\r\n\t\t\t group_25_count = 0;\r\n\t\t\t group_26_count = 0;\r\n\t\t\t group_27_count = 0;\r\n\t\t\t\r\n\t\t\t group_28_count = 0;\r\n\t\t\t group_29_count = 0;\r\n\t\t\t group_30_count = 0;\r\n\t\t\t group_31_count = 0;\r\n\t\t\t group_32_count = 0;\r\n\t\t\t group_33_count = 0;\r\n\t\t\t group_34_count = 0;\r\n\t\t\t group_35_count = 0;\r\n\t\t\t group_36_count = 0;\r\n\t\t\t\r\n\t\t\t group_37_count = 0;\r\n\t group_38_count = 0;\r\n\t\t\t group_39_count = 0;\r\n\t\t\t group_40_count = 0;\r\n\t\t\t group_41_count = 0;\r\n\t\t\t group_42_count = 0;\r\n\t\t\t group_43_count = 0;\r\n\t\t\t group_44_count = 0;\r\n\t\t\t group_45_count = 0;\r\n\t\t\t\r\n\t\t group_46_count = 0;\r\n\t\t\t group_47_count = 0;\r\n\t\t\t group_48_count = 0;\r\n\t\t\t group_49_count = 0;\r\n\t\t\t group_50_count = 0;\r\n\t\t group_51_count = 0;\r\n\t\t\t group_52_count = 0;\r\n\t\t\t group_53_count = 0;\r\n\t\t\t group_54_count = 0;\r\n\t\t\t\r\n\t\t\t group_55_count = 0;\r\n\t\t\t group_56_count = 0;\r\n\t\t\t group_57_count = 0;\r\n\t\t\t group_58_count = 0;\r\n\t\t\t group_59_count = 0;\r\n\t\t\t group_60_count = 0;\r\n\t\t\t group_61_count = 0;\r\n\t\t group_62_count = 0;\r\n\t\t\t group_63_count = 0;\r\n\t\t group_64_count = 0;\r\n\t\t\t\r\n\t\t solution_1 = new int[500][R];\r\n\t\t\t\tsolution_2 = new int[500][R];\r\n\t\t\t\tsolution_3 = new int[500][R];\r\n\t\t\t\tsolution_4 = new int[500][R];\r\n\t\t\t\tsolution_5 = new int[500][R];\r\n\t\t\t\tsolution_6 = new int[500][R];\r\n\t\t\t\tsolution_7 = new int[500][R];\r\n\t\t\t\tsolution_8 = new int[500][R];\r\n\t\t\t\tsolution_9 = new int[500][R];\r\n\t\t\t\tsolution_10 = new int[500][R];\r\n\t\t\t\tsolution_11 = new int[500][R];\r\n\t\t\t\tsolution_12 = new int[500][R];\r\n\t\t\t\tsolution_13 = new int[500][R];\r\n\t\t\t\tsolution_14 = new int[500][R];\r\n\t\t\t\tsolution_15 = new int[500][R];\r\n\t\t\t\tsolution_16 = new int[500][R];\r\n\t\t\t\tsolution_17 = new int[500][R];\r\n\t\t\t\tsolution_18 = new int[500][R];\r\n\t\t\t\tsolution_19 = new int[500][R];\r\n\t\t\t\tsolution_20 = new int[500][R];\r\n\t\t\t\tsolution_21 = new int[500][R];\r\n\t\t\t\tsolution_22 = new int[500][R];\r\n\t\t\t\tsolution_23 = new int[500][R];\r\n\t\t\t\tsolution_24 = new int[500][R];\r\n\t\t\t\tsolution_25 = new int[500][R];\r\n\t\t\t\tsolution_26 = new int[500][R];\r\n\t\t\t\tsolution_27 = new int[500][R];\r\n\t\t\t\tsolution_28 = new int[500][R];\r\n\t\t\t\tsolution_29 = new int[500][R];\r\n\t\t\t\tsolution_30 = new int[500][R];\r\n\t\t\t\tsolution_31 = new int[500][R];\r\n\t\t\t\tsolution_32 = new int[500][R];\r\n\t\t\t\tsolution_33 = new int[500][R];\r\n\r\n\t\t\t\tsolution_34 = new int[500][R];\r\n\t\t\t\tsolution_35 = new int[500][R];\r\n\t\t\t\tsolution_36 = new int[500][R];\r\n\t\t\t\tsolution_37 = new int[500][R];\r\n\t\t\t\tsolution_38 = new int[500][R];\r\n\t\t\t\tsolution_39 = new int[500][R];\r\n\t\t\t\tsolution_40 = new int[500][R];\r\n\t\t\t\tsolution_41 = new int[500][R];\r\n\t\t\t\tsolution_42 = new int[500][R];\r\n\t\t\t\tsolution_43 = new int[500][R];\r\n\t\t\t\tsolution_44 = new int[500][R];\r\n\t\t\t\tsolution_45 = new int[500][R];\r\n\t\t\t\tsolution_46 = new int[500][R];\r\n\t\t\t\tsolution_47 = new int[500][R];\r\n\t\t\t\tsolution_48 = new int[500][R];\r\n\t\t\t\tsolution_49 = new int[500][R];\r\n\t\t\t\tsolution_50 = new int[500][R];\r\n\t\t\t\tsolution_51 = new int[500][R];\r\n\t\t\t\tsolution_52 = new int[500][R];\r\n\t\t\t\tsolution_53 = new int[500][R];\r\n\t\t\t\tsolution_54 = new int[500][R];\r\n\t\t\t\tsolution_55 = new int[500][R];\r\n\t\t\t\tsolution_56 = new int[500][R];\r\n\t\t\t\tsolution_57 = new int[500][R];\r\n\t\t\t\tsolution_58 = new int[500][R];\r\n\t\t\t\tsolution_59 = new int[500][R];\r\n\t\t\t\tsolution_60 = new int[500][R];\r\n\t\t\t\tsolution_61 = new int[500][R];\r\n\t\t\t\tsolution_62 = new int[500][R];\r\n\t\t\t\tsolution_63 = new int[500][R];\r\n\t\t\t\tsolution_64 = new int[500][R];\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t crossover_count = 0;\r\n boolean statusChecker =false;\r\n\t\t\tLinkedHashMap<String, List<Double>> parent_maps = new LinkedHashMap<String, List<Double>>();\r\n\t\t\t\r\n\t\t\tLinkedHashMap<String, List<Double>> offspring_maps = new LinkedHashMap<String, List<Double>>();\r\n\t\t\t\r\n\t\t\tLinkedHashMap<String, List<Double>> combined_maps = new LinkedHashMap<String, List<Double>>();\r\n\t\t//\tLinkedHashMap<String, List<Double>> fitnessmaps = new LinkedHashMap<String, List<Double>>();\r\n\r\n\t\t\tLinkedHashMap<String, Integer> setrank1 = new LinkedHashMap<String, Integer>();\r\n\t\t\r\n\r\n\t\t\tList<String> updated_population = new ArrayList<String>();\r\n\t\t\t\r\n\t\t\tList<String> combined_population = new ArrayList<String>();\r\n\t\t\tList<String> offspring_population = new ArrayList<String>();\r\n\t\t\t//List<String> parent_population = new ArrayList<String>();\r\n\t\t\tList<String> single_population = new ArrayList<String>();\r\n\r\n\t\t\tList<String> combined_population_list = new ArrayList<String>();\r\n\t\t\t\r\n\t\t\tList<String> temporary_path_holder = new ArrayList<String>();\r\n\t\t\t\r\n\t\t\tList<String> parents_population = new ArrayList<String>();\r\n\t\t\t\r\n\t\t\tList<String> parents_population_copy = new ArrayList<String>();\r\n\t\t\t\r\n\t\t//\tString traverse_template;\r\n\r\n\t\t\t// the 2d arrays below hold the solutions to each respective group\r\n\t\t\tint [][] solution = new int[500][R];\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t//\tboolean [] statu = new boolean [PATHNUM];\r\n\t\t\t\t\r\n\r\n\t\t\tint totalpathcounter = 0;\r\n\r\n\t\t\tint obj_total = 0;\r\n\r\n\t\t\tString getfinalpath = null;\r\n\t\t\t//String getfinalpath;\r\n\r\n\t\t\tif (run > 0) { // in each run reset the number counter of the paths covered in each group\r\n\r\n\t\t\t\treset_All();\r\n\t\t\t\tpaths.clear();\r\n\t\t\t\tupdated_population.clear();\r\n\t\t\t\tcombined_population.clear();\r\n\t\t\t\toffspring_population.clear();\r\n\t\t\t\tsingle_population.clear();\r\n\t\t\t\toffspring_maps.clear();\r\n\t\t\t\tsetrank1.clear();\r\n\t\t\t\t//setrank2.clear();\r\n\t\t\t\t//offspring_maps.clear();\r\n\t\t\t\tparents_population_copy.clear();\r\n\t\t\t\tcombined_maps.clear();\r\n\t\t\t\tparent_maps.clear();\r\n\t\t\t\tpaths.putAll(temporay_paths); \r\n\t\t\t}\r\n\r\n\t\t\tfor (int i = 0; i < pop_num; i++) // initialize the population with the dimension of R values/inputs\r\n\t\t\t{\r\n\r\n\t\t\t\tfor (int j = 0; j < R; j++) {\r\n\t\t\t\t\r\n\t\t\t\t\tx[i][j] = (int)(Math.random()*((ub[j] - lb[j])+1))+ lb[j];\r\n\r\n\t\t\t\t} //initial random population\r\n\r\n\t\t\t\tgetfinalpath = pathnum(x[i]); \r\n\t\t\t\t//archiving( String check_path_group , int num, int[][] offspring)\r\n int pickPaths= 0;\r\n\t\t\t\t\r\n\t\t\t\tSet<String> keyz = paths.keySet();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tfor (String key : keyz) {\r\n\r\n\t\t\t\t\tif (pickPaths < 50) { //pick subset of N paths\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\ttarget_subset.put(key + \" \" + \"new\", false);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tpickPaths++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\tparents_population.add(\"parent\" + \" \" + i);\r\n\t\t\t\t//record covered path and find group where it belongs\r\n\t\t\t\t//save test case in corresponding path group\r\n\t\t\t\tarchiving( getfinalpath , i, x);\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\tparents_population_copy.addAll(parents_population);\r\n\t\t\t\r\n\t\t\tcombined_population_list.addAll(parents_population_copy);\t\r\n\t\t\t///offspring_population.addAll(parents_population_copy);\r\n\t\t\t//Cycle[run] = 1;\r\n\r\n\t\t\t\tlong start_time = System.currentTimeMillis();\r\n\t\t\t\tlong wait_time = 1518750;\r\n\t\t\t\tlong end_time = start_time + wait_time;\r\n\t\t\t\tList<Double> temp_2 = new ArrayList<Double>();\r\n\t\t\t\t\r\n\t\t\t // int generation = 0;\r\n\t\t\t\t\r\n\t\t\t\twhile ((System.currentTimeMillis() < end_time) && obj_total < PATHNUM_NUMBER) // not exceeded the set\r\n\r\n\t\t\t\t{\r\n\t\t\t\t//LinkedHashMap<String, List<Double>> parent_maps_init = new LinkedHashMap<String, List<Double>>(); \r\n\t\t\t\t//initial random population tournament selection\r\n\t\t\t\r\n\t\t\t\t\t//List<Double> temp = new ArrayList<Double>();\r\n\t\t\t\t\tif (crossover_count == 0) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tRandom random = new Random();\r\n\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (int i = 0; i < 25; i++) {\r\n\t\t\t\t\r\n\t\t\t\t\t\t//pick two parents to cross\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tString randomKey_1 = parents_population_copy.get( random.nextInt(parents_population_copy.size())) ;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tparents_population_copy.remove(randomKey_1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tString randomKey_2 = parents_population_copy.get( random.nextInt(parents_population_copy.size())) ;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tparents_population_copy.remove(randomKey_2);\r\n\t\t\t\t\t\t//access parent via parent_maps_init\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//split the string\r\n\t\t\t\t\t\t//parents_population.add(\"parent\" + \" \" + i);\r\n\t\t\t\t\t\tString [] parent_1_string = randomKey_1.split(\" \");\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tString par_1;\r\n\r\n\t\t\t\t\t\tint pos_1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tpar_1 = parent_1_string[0];\r\n\t\t\t\t\t\tpos_1 = Integer.parseInt(parent_1_string[1]);\r\n\t\t\t\t\t\t\r\n // String [] parent_2_string = randomKey_2.split(\" \");\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tString [] parent_2_string = randomKey_1.split(\" \");\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tString par_2;\r\n\r\n\t\t\t\t\t\tint pos_2;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tpar_2 = parent_2_string[0];\r\n\t\t\t\t\t\tpos_2 = Integer.parseInt(parent_2_string[1]);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t //System.out.println(\"Random number 1 : \"+Math.random()\r\n\t\t\t\t\t\t//crossover nbased on probability\r\n\t\t\t\t \tRandom rand = new Random();\r\n\t\t\t\t\t//\tdouble rdm = rand.nextDouble();\t\t \r\n\t\t\t\t\t\tdouble rdm = Math.random();\r\n\t\t\t\t\t\t if(rdm < 0.75) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//single-point crossover\r\n\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t \t//randomly find a position and exchange the tails\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\tint parent_1_random = rand.nextInt(R);\r\n\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t int new_point = parent_1_random; \r\n\t\t\t\t\t\t //exchange elements with parent_2\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t //\tint[][] temporal = new int[pop_num][R];\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t for (int j = 0 ; j < R; j++) {\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 \tv[pos_1][j] = x[pos_1][j];\r\n\t\t\t\t\t\t \tv[pos_2][j] = x[pos_2][j];\r\n\t\t\t\t\t \t\t\r\n\t\t\t\t\t \t}\r\n\t\t\t\t\t \t\r\n\t\t\t\t\t\t int g = new_point;\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t // for (int g = new_point ; new_point < R; new_point++) {\r\n\t\t\t\t\t \t\t\r\n\t\t\t\t\t \twhile (g <= R){\t\r\n\t\t\t\t\t \t\t//switch the tails of parent one and parent two\r\n\t\t\t\t\t\t \tv[pos_1][g] = x[pos_2][g];\r\n\t\t\t\t\t\t \tv[pos_2][g] = x[pos_1][g];\r\n\r\n\t\t\t\t\t \t g++;\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\t\tdouble mutate = Math.random();\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t if(mutate < (1/R)) { \r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t int child_1 = (int) (Math.random() * R);\r\n\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t \tint child_2 = (int) (Math.random() * R);\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 \tv[pos_1][child_1] = (int)(Math.random()*((ub[child_1] - lb[child_1])+1))+ lb[child_1];\r\n\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t \toffspring_population.add(\"child\" + \" \" + pos_1);\r\n\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t \tv[pos_2][child_2] = (int)(Math.random()*((ub[child_2] - lb[child_2])+1))+ lb[child_2]; \r\n\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t \toffspring_population.add(\"child\" + \" \" + pos_2);\r\n\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t else {\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t offspring_population.add(\"child\" + \" \" + pos_1);\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t offspring_population.add(\"child\" + \" \" + pos_2);\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\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 \t\r\n\t\t\t\t\t \t\tfor (int j = 0 ; j < R; j++) {\r\n\t\t\t\t\t\t \t\t\r\n\t\t\t\t\t\t \t\t\r\n\t\t\t\t\t\t \t\tv[pos_1][j] = x[pos_1][j];\r\n\t\t\t\t\t\t \t\tv[pos_2][j] = x[pos_2][j];\r\n\t\t\t\t\t\t \t\t\r\n\t\t\t\t\t\t \t}\r\n\t\t\t\t\t \t\t\r\n\t\t\t\t\t \t\t\r\n\t\t\t\t\t \t\t//mutate\r\n\t\t\t\t\t \t\t\r\n\r\n\t\t\t\t\t \t// Random mut = new Random();\r\n\t\t\t\t\t\t\t\tdouble mutate = Math.random();\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t if(mutate < (1/R)) { \r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t int child_1 = (int) (Math.random() * R);\r\n\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t \tint child_2 = (int) (Math.random() * R);\r\n\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t \tv[pos_1][child_1] = (int)(Math.random()*((ub[child_1] - lb[child_1])+1))+ lb[child_1];\r\n\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t \toffspring_population.add(\"child\" + \" \" + pos_1);\r\n\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t \tv[pos_2][child_2] = (int)(Math.random()*((ub[child_2] - lb[child_2])+1))+ lb[child_2]; \r\n\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t \toffspring_population.add(\"child\" + \" \" + pos_2);\r\n\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t }\r\n\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\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 //mutation (1/size of test case input vector)\r\n\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//get path traversed by offsprings\r\n\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (int i = 0; i < offspring_population.size(); i++) {// initialize the population with the dimension of R values/inputs\r\n\t\t\t\t\r\n\t\t\t\t String [] get_index = offspring_population.get(i).split(\" \");\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t String off_1;\r\n\r\n\t\t\t\t\tint index_1;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\toff_1 = get_index[0];\r\n\t\t\t\t\tindex_1 = Integer.parseInt(get_index[1]);\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tgetfinalpath = pathnum(v[index_1]);\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tarchiving( getfinalpath , index_1, v);\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\t // if ()\r\n\t\t\t\t\t\r\n\t\t\t\t \t\tRandom random = new Random();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//\tLinkedHashMap<String, Boolean> changed_status = new LinkedHashMap<String, Boolean>();\r\n\t\t\t\t\t\t\t//\tLinkedHashMap<String, Boolean> child_status = new LinkedHashMap<String, Boolean>();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t \t\tparents_population_copy.clear();\r\n\t\t\t\t \t\tfor (int i = 0; i < 50; i++) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tparents_population_copy.add( \"parent\" + \" \" + i);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t \t\t\r\n\t\t\t\t \t\t\r\n\t\t\t\t\t\t\t\tfor (int i = 0; i < 25; i++) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tString randomKey_1 = parents_population_copy.get( random.nextInt(parents_population_copy.size())) ;\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tparents_population_copy.remove(randomKey_1);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tString randomKey_2 = parents_population_copy.get( random.nextInt(parents_population_copy.size())) ;\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tparents_population_copy.remove(randomKey_2);\r\n\t\t\t\t\t\t\t\t\t//access parent via parent_maps_init\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t//split the string\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tString [] parent_1_string = randomKey_1.split(\" \");\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tString par_1;\r\n\r\n\t\t\t\t\t\t\t\t\tint pos_1;\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tpar_1 = parent_1_string[0];\r\n\t\t\t\t\t\t\t\t\tpos_1 = Integer.parseInt(parent_1_string[1]);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t // String [] parent_2_string = randomKey_2.split(\" \");\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tString par_2;\r\n\r\n\t\t\t\t\t\t\t\t\tint pos_2;\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tString [] parent_2_string = randomKey_2.split(\" \");\r\n\t\t\t\t\t\t\t\t\tpar_2 = parent_2_string[0];\r\n\t\t\t\t\t\t\t\t\tpos_2 = Integer.parseInt(parent_2_string[1]);\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\t\t//crossover nbased on probability\r\n\t\t\t\t\t\t\t\t\tRandom rand = new Random();\r\n\t\t\t\t\t\t\t\t\tdouble rdm = Math.random();\t\t \r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t if(rdm < 0.75) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t//single-point crossover\r\n\t\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t \t//randomly find a position nad exchange the tails\r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\tint parent_1_random = rand.nextInt(R);\r\n\t\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t int single_point = parent_1_random; \r\n\t\t\t\t\t\t\t\t\t //exchange elements with parent_2\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t //\tint[][] temporal = new int[pop_num][R];\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t for (int j = 0 ; j < R; j++) {\r\n\t\t\t\t\t\t\t\t \t\t\r\n\t\t\t\t\t\t\t\t \t\t\r\n\t\t\t\t\t\t\t\t\t \tv[pos_1][j] = x[pos_1][j];\r\n\t\t\t\t\t\t\t\t\t \tv[pos_2][j] = x[pos_2][j];\r\n\t\t\t\t\t\t\t\t \t\t\r\n\t\t\t\t\t\t\t\t \t}\r\n\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t int s = single_point;\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t while (s <= R) {\r\n\t\t\t\t\t\t\t\t \t\t\r\n\t\t\t\t\t\t\t\t \t\t\r\n\t\t\t\t\t\t\t\t \t\t//switch the tails of parent one and parent two\r\n\t\t\t\t\t\t\t\t\t \tv[pos_1][s] = x[pos_2][s];\r\n\t\t\t\t\t\t\t\t\t \tv[pos_2][s] = x[pos_1][s];\r\n\r\n\t\t\t\t\t\t\t\t \t s++;\r\n\t\t\t\t\t\t\t\t \t}\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t \t Random mut = new Random();\r\n\t\t\t\t\t\t\t\t\t\tdouble mutate = Math.random();\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t if(mutate < (1/R)) { \r\n\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t int child_1 = (int) (Math.random() * R);\r\n\t\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t \tint child_2 = (int) (Math.random() * R);\r\n\t\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t \tv[pos_1][child_1] = (int)(Math.random()*((ub[child_1] - lb[child_1])+1))+ lb[child_1];\r\n\t\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t \toffspring_population.add(\"child\" + \" \" + pos_1);\r\n\t\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t \tv[pos_2][child_2] = (int)(Math.random()*((ub[child_2] - lb[child_2])+1))+ lb[child_2]; \r\n\t\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t \toffspring_population.add(\"child\" + \" \" + pos_2);\r\n\t\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t else {\r\n\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t\t offspring_population.add(\"child\" + \" \" + pos_1);\r\n\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t\t offspring_population.add(\"child\" + \" \" + pos_2);\r\n\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t \t\tfor (int j = 0 ; j < R; j++) {\r\n\t\t\t\t\t\t\t\t\t \t\t\r\n\t\t\t\t\t\t\t\t\t \t\t\r\n\t\t\t\t\t\t\t\t\t \t\tv[pos_1][j] = x[pos_1][j];\r\n\t\t\t\t\t\t\t\t\t \t\tv[pos_2][j] = x[pos_2][j];\r\n\t\t\t\t\t\t\t\t\t \t\t\r\n\t\t\t\t\t\t\t\t\t \t}\r\n\t\t\t\t\t\t\t\t \t\t\r\n\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t\t\tdouble mutate = Math.random();\r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t\t if(mutate < (1/R)) { \r\n\t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t int child_1 = (int) (Math.random() * R);\r\n\t\t\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t\t \tint child_2 = (int) (Math.random() * R);\r\n\t\t\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t\t \tv[pos_1][child_1] = (int)(Math.random()*((ub[child_1] - lb[child_1])+1))+ lb[child_1];\r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t \toffspring_population.add(\"child\" + \" \" + pos_1);\r\n\t\t\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t\t \tv[pos_2][child_2] = (int)(Math.random()*((ub[child_2] - lb[child_2])+1))+ lb[child_2]; \r\n\t\t\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t\t \toffspring_population.add(\"child\" + \" \" + pos_2);\r\n\t\t\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\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}\r\n\t\t\t\r\n\t\t\t\t\t \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor (int i_ = 0; i_ < offspring_population.size(); i_++) {// initialize the population with the dimension of R values/inputs\r\n\t\t\t\t\t\r\n\t\t\t\t\t String [] get_index = offspring_population.get(i_).split(\"\");\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t String off_1;\r\n\r\n\t\t\t\t\t\tint index_1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\toff_1 = get_index[0];\r\n\t\t\t\t\t\tindex_1 = Integer.parseInt(get_index[1]);\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t \r\n\t\t\t\t\t\tgetfinalpath = pathnum(v[index_1]); //get path traversed by offspring test case \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tarchiving( getfinalpath , i_, v);//add test case to archive\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t //match the paths traversed\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\r\n\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t\t\tcrossover_count++;\r\n\t\t\t\t\r\n\t\t\t\t\t//combined_population_list.addAll(parents_population_copy);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (int i = 0; i < offspring_population.size(); i++) // add all offpsings to parent and form final combined population\r\n\t\t\t\t\t{\r\n\t\t\t\r\n\t\t\t\t\t\t\tcombined_population_list.add(offspring_population.get(i));\r\n\t\t\t\t }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tList<String> final_combined_population = new ArrayList<String>();\r\n\r\n\t\t\t\t\t// temp.clear();\r\n\r\n\t\t\t\t\tfinal_combined_population.addAll(combined_population_list);\t\r\n\t\t\t\t\t\r\n\t\t\t\t//fit.add(target_path_+ \" \" + path_status +\" \" + nonsimple_unmatched2);\r\n\t\t\t\t//evaluate parent and child population\r\n\t\t\t\t\tArrayList <String> offspring_fitness = new ArrayList<String>();\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (int i = 0; i < final_combined_population.size(); i++) // contains both parent and offspring test cases\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\r\n String checkString = final_combined_population.get(i);\t\r\n \r\n String [] getType = checkString.split(\" \");\r\n \r\n\t\t\t\t\t\tString typeName = getType[0];\r\n\r\n\t\t\t\t\t\tint typeId = Integer.parseInt(getType[1]);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//\tfit.add(target_path_+ \" \" + path_status +\" \" + nonsimple_unmatched2);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (typeName.equals(\"parent\")) {\r\n\r\n\t\t\t\t\t \toffspring_fitness = benchmarkfunction(x[typeId]);\r\n\t\t\t\t\t \t//extract path and fitness\r\n\t\t\t\t\t \tcheck_fitness.put( \"parent\" + \" \" + typeId , offspring_fitness);\r\n\t\t\t\t\t \t\r\n\t\t\t\t\t \t//static LinkedHashMap<String, ArrayList<String>> check_fitness = new LinkedHashMap<String, ArrayList<String>>();\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 \r\n\t\t\t\t\t\telse {\r\n//\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//fit.add(target_path_+ \" \" + path_status +\" \" + nonsimple_unmatched2);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\toffspring_fitness = benchmarkfunction(v[typeId]);\r\n\t\t\t\t\t\t\tcheck_fitness.put( \"child\" + \" \" + typeId , offspring_fitness);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tint colum_sizes = 0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor ( String get_keys : check_fitness.keySet() ) {\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcolum_sizes = ( check_fitness.get(get_keys).size());\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\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//process remove_objective_routine\r\n\t\t\t\t\t//process map first\r\n\t\t\t\t\t//static LinkedHashMap<String, ArrayList<String>> check_fitness = new LinkedHashMap<String, ArrayList<String>>();\r\n\t\t\t\t\tList<String> average_calculator = new ArrayList<String>();\r\n\t\t\t\t\t\r\n\t\t\t\t//\tint offspring_fitness_size = offspring_fitness.size();\r\n\t\t\t\t\r\n\t\t\t\t//\tIterator<Map.Entry<String, ArrayList<String>>> iteration_ = check_fitness.entrySet()\r\n\t\t\t\t\t\t\t//.iterator();\r\n\t\t\t\t\tString actualpath = \"\";\r\n\t\t\t\t\tString process_1 = \"\";\r\n\t\t\t\t\tString process_2 = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t//String updated_value_2 = \"\";\r\n\t\t\t\t\t//\"child\" + \" \" + typeId , offspring_fitness\r\n\t\t\t\t\t//String updated_value = \"\";\r\n\t\t\t\t\t\r\n//\t\t\t\t\tfit.add(target_path_+ \" \" + path_status +\" \" + nonsimple_unmatched2);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\tint pid = 0;\t\t\r\n\t\t\t\t\t\r\n\t\t\tfor (int i = 0 ; i < colum_sizes; i++ )\t{\r\n\t\t\t\t\t\r\n\t\t\t\tdouble add_objective_scores = 0.0;\r\n\t\t\t\tdouble sum_at_column = 0.0;\r\n\r\n\t\t\t\tfor ( String get_keys : check_fitness.keySet() ) {\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n // int pid = 0;\r\n \r\n\t\t\t\t\t\t//Map.Entry<String, ArrayList<String>> entry = iteration_.next();\r\n\r\n\t\t\t\t\t\taverage_calculator = check_fitness.get(get_keys);\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//entry.getValue();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tString get_objective_score = average_calculator.get(i);\r\n\t\t\t \r\n\t\t\t //calculate average fitness\r\n\t\t\t \r\n\t\t\t\t\t\t//\tupdated_population.add(entry.getKey());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//50 is the number of test cases\r\n\t\t\t\t\t\t//while (pid < 50) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t///String checkString = final_combined_population.get(i);\t\r\n\t \r\n\t String [] getDetails = get_objective_score.split(\" \");\r\n\t\t\t\t\t\t actualpath = getDetails[0];\r\n double objective_scores = Double.parseDouble(getDetails[1]);\r\n \r\n add_objective_scores = add_objective_scores + objective_scores ;\r\n \r\n //total fitness at colum i\r\n sum_at_column = (add_objective_scores / check_fitness.size());\r\n //get total fitness \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//int old_value = remove_objective[actualpath]\r\n\t\t\t\t\t//if(remove_objective.contiansKey(actualpath))\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\tfor ( String entry_1 : target_subset.keySet() ) {\t//update path status\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif (entry_1.equals(actualpath)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t String [] processPath = actualpath.split(\" \");\r\n\t\t\t\t\t\t\t process_1 = processPath[0];\r\n\t\t\t\t\t\t\t process_2 = processPath[1];\r\n\t\t\t\t\t\t\t \r\n\t //Double objective_scores = Double.parseDouble(getDetails[1]);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (process_2.equals(\"new\")) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\ttarget_subset.put(process_1 + \" \" + \"old\" , false );\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tremove_objective.put( actualpath, sum_at_column);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//remove_objective.put( actualpath, max_1 + \" \" + add_objective_scores );\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tdouble previous_value = remove_objective.get(actualpath);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//double get_First = Double.parseDouble(get_Path[0]);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//double get_Second = Double.parseDouble(get_Path[1]);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ( previous_value > sum_at_column ) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tremove_objective.put( actualpath, sum_at_column);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\telse {\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\t\t// Update status to true\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\ttemporary_path_holder.add(actualpath); \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tpaths.put(actualpath, true);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\ttarget_subset.remove(actualpath);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t//\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tArrayList<String> remove_objectives_1 = new ArrayList<String>();\r\n\t\t\t\r\n\t\t\tfor ( String entry_2 : check_fitness.keySet() ) {\t//process test case // update their fitness vectors by deleting the removed objectives\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\tString [] process_to_remove = entry_2.split(\" \");\r\n\t\t\t\t\r\n\t\t\t\tString processes_1 = process_to_remove[0];\r\n\t\t\t\tint index_2 = Integer.parseInt(process_to_remove[1]);\r\n\t\t\t\t\r\n\t\t\t\tremove_objectives_1 = check_fitness.get(entry_2);\r\n\t\t\t\t\r\n\t\t\t\tfor (int i = 0; i < remove_objectives_1.size(); i++) // process the fitness vector and delete the worst values\r\n\t\t\t\t{\r\n\t\t\t\t\t//fit.add(target_path_+ \" \" + path_status +\" \" + nonsimple_unmatched2);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//target_subset.remove(actualpath);\r\n\t\t\t\t\t//temporary_path_holder.add(actualpath); \r\n\t\t\t\t\t\r\n\t\t\t\t\tString [] process_paths_to_remove = remove_objectives_1.get(i).split(\" \");\r\n\t\t\t\t\t\r\n\t\t\t\t\tString process_path_1 = process_paths_to_remove[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (temporary_path_holder.contains(process_path_1) ) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tremove_objectives_1.remove(process_path_1);\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}\r\n\t\t\t\t\r\n\t\t\t\tcheck_fitness.put( processes_1 + \" \" + index_2, remove_objectives_1);\r\n\t\t\t\t\r\n\t\t\t\tremove_objectives_1.clear( );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//target_subset.put(process_1 + \" \" + \"old\" , false );\r\n\t\t\t\r\n\t\t\t Set<String> remainingPath = target_subset.keySet();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\tfor (String keyss : remainingPath) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\t\t String [] get_Remaining = keyss.split(\" \");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t String remaining_1 = get_Remaining[0];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t still_remaining_targets.add(remaining_1); //back-up set of remaining targets\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 \r\n\t\t\t\t\t\r\n\t\t\t\tif (target_subset.size()!=0)\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tif ((obj_total) == PATHNUM_NUMBER ) { // if all paths covered break out of while loop\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t if ((obj_total) < PATHNUM_NUMBER ) { // if not all paths covered perform\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t if ((target_subset.size() == 1)) { \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t \t\r\n\t\t\t\t \t LinkedHashMap<String, ArrayList<Double>> updated_maps_ = new LinkedHashMap<String, ArrayList<Double>>();\r\n\t\t\t\t \t\r\n\t\t\t\t\t ArrayList<String> updated_fit_ = new ArrayList<String>();\t\r\n\t\t\t\t\t \r\n\t\t\t\t\t ArrayList<Double> updated_1 = new ArrayList<Double>();\r\n\t\t\t\t\t \t\r\n\t\t\t\t\t \tfor ( String key_10 : check_fitness.keySet() ) {\r\n\t\t\t\t\t\t\t \t\t\r\n\t\t\t\t\t\t\t \t\t\r\n\t\t\t\t\t \t\tupdated_fit_ = check_fitness.get(key_10);\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\tfor (int r= 0; r < updated_fit_.size(); r++) {\r\n\t\t\t\t\t \t\t\r\n\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t String [] get_list = updated_fit_.get(r).split(\" \");\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t double objective_score = Double.parseDouble(get_list[2]);\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t updated_1.add(objective_score);\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\tupdated_maps_.put(key_10, updated_1);\r\n\t\t\t\t\t \t\t\r\n\t\t\t\t\t \t\tupdated_fit_.clear();\r\n\t\t\t\t\t \t\t\r\n\t\t\t\t\t \t\tupdated_1.clear();\r\n\t\t\t\t\t \t\r\n\t\t\t\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 \tint counter = 0;\r\n\t\t\t\t\t\t\twhile (counter < 50) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t List<Double> value_holder = new ArrayList<Double>();\r\n\t\t\t\t\t\t\t\t List<String> keys = new ArrayList<String>(updated_maps_.keySet());\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t Random rand = new Random();\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t String key_ss = keys.get(rand.nextInt(keys.size()));\r\n\t\t\t\t\t\t\t\t String key_holder = null;\r\n\t\t\t\t\t\t\t\t value_holder.addAll(updated_maps_.get(key_ss));\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t double min = value_holder.get(0);\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t value_holder.clear();\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t for (int i = 1 ; i < 10; i++) {\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t String key = keys.get(rand.nextInt(keys.size()));\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t value_holder.addAll(updated_maps_.get(key));\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t double checker = value_holder.get(0);\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t if (checker < min) {\r\n\t\t\t\t\t\t min = checker;\r\n\t\t\t\t\t\t key_holder = key;\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t value_holder.clear();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t parents_population_copy.add(key_holder);\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\r\n\t\t\t\t \t\r\n\t\t\t\t\t\r\n\t\t\t\t\t statusChecker = true;\r\n\t\t\t\t }//if only one uncovered path\r\n\t\t\t\t\t\t\r\n\t\t\t\t else { \r\n\t\t\t\t\t if (target_subset.size() > 1) { //if many remaining uncovered paths\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t LinkedHashMap<String, ArrayList<Double>> updated_maps = new LinkedHashMap<String, ArrayList<Double>>();\r\n\t\t\t\t\t \t\r\n\t\t\t\t\t ArrayList<String> updated_fit = new ArrayList<String>();\t\r\n\t\t\t\t\t \r\n\t\t\t\t\t ArrayList<Double> updated_ = new ArrayList<Double>();\r\n\t\t\t\t\t \t\r\n\t\t\t\t\t \tfor ( String key_10 : check_fitness.keySet() ) {\r\n\t\t\t\t\t\t\t \t\t\r\n\t\t\t\t\t\t\t \t\t\r\n\t\t\t\t\t \t\tupdated_fit = check_fitness.get(key_10);\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\tfor (int r= 0; r < updated_fit.size(); r++) {\r\n\t\t\t\t\t \t\t\r\n\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\t String [] get_list = updated_fit.get(r).split(\" \");\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t double objective_score = Double.parseDouble(get_list[2]);\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t updated_.add(objective_score);\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\tupdated_maps.put(key_10, updated_);\r\n\t\t\t\t\t \t\t\r\n\t\t\t\t\t \t\tupdated_fit.clear();\r\n\t\t\t\t\t \t\t\r\n\t\t\t\t\t \t\tupdated_.clear();\r\n\t\t\t\t\t \t\t\r\n\t\t\t\t\t \t\t\r\n\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t \t\r\n\t\t\t\t\t \t\r\n\t\t\t\t\t //updated_maps.put(key_10, updated_); perform preference sorting on this map\r\n\t\t\t\t\t \t\r\n\t\t\t\t\t \tint updated_sizes = 0;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tfor ( String get_keys : updated_maps.keySet() ) {\t\r\n\t\t\t\t\t\t\t\t\t updated_sizes = ( updated_maps.get(get_keys).size());\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t} \t\r\n\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tDouble[][] offspring_fitness_full = new Double[final_combined_population\r\n\t\t\t\t\t\t\t\t\t.size()][updated_sizes]; // n x m matrix of combined parents and offspring test cases\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tint updates = 0;\r\n\r\n\t\t\t\t\t\t\t// List<String> traverse_group = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//List<String> best_column = new ArrayList<String>();\r\n\t\t\t\t\t\t\tint fitss = 0;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile (updates < final_combined_population.size()) {\r\n\r\n\t\t\t\t\t\t\t\tList<Double> fitness_objectives_updated = new ArrayList<Double>();\r\n\t\t\t\t\t\t\t\t// fitness_objectives_updated.clear();\r\n\r\n\t\t\t\t\t\t\t\tfitness_objectives_updated = (updated_maps.get(final_combined_population.get(updates)));\r\n\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\tList<Double> temp_3 = new ArrayList<Double>();\r\n\r\n\t\t\t\t\t\t\t\t// temp.clear();\r\n\r\n\t\t\t\t\t\t\t\ttemp_3.addAll(fitness_objectives_updated);\r\n\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tfor (int ups = 0; ups < temp_3.size(); ups++) {\r\n\r\n\t\t\t\t\t\t\t\t\toffspring_fitness_full[updates][ups] = fitness_objectives_updated.get(ups);\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tfitness_objectives_updated.clear();\r\n\t\t\t\t\t\t\t\tupdates++;\r\n\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\r\n\t\t\t\t\t \t//check if paths is covered , plus check replaced status\r\n\t\t\t \t// average objective score calculation.....\r\n\t\t\t\t\t\t\t// removing objectives\r\n\t\t\t\t\t\t\t// check current generation vs previous generation\r\n\t\t\t \t// update replaced status in main set of uncovered paths\r\n\t\t\t \r\n\t\t\t \t\r\n\t\t\t \t// update population by replacing the other targets\r\n\t\t\t \t\r\n\t\t\t \t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tList<String> best_column = new ArrayList<String>();\r\n\t\t\t\t\r\n\t\t\t\t\t\t\tint sizes = temp_2.size();\r\n\r\n\t\t\t\t\t\t\t//double row_fit;\r\n\t\t\t\t\t\t\tint colums = 0;\r\n\t\t\t\t\t\t\tString test_case;\r\n\t\t\t\t\t\t\tdouble fit_rowfit;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\tLinkedHashMap<String, Double> row_getter = new LinkedHashMap<String, Double>();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile (colums < sizes) {\r\n\r\n\t\t\t\t\t\t\t\tfor (int get_row = 0; get_row < (final_combined_population.size()); get_row++) {\r\n\r\n\t\t\t\t\t\t\t\t\tfit_rowfit = (offspring_fitness_full[get_row][colums]);\r\n\r\n\t\t\t\t\t\t\t\t\tdouble row_fitter = fit_rowfit;\r\n\r\n\t\t\t\t\t\t\t\t\trow_getter.put(final_combined_population.get(get_row), row_fitter);\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tMap<String, Double> result = row_getter.entrySet().stream() //get test case with minimum objective score for each objective\r\n\t\t\t\t\t\t\t\t\t\t.sorted(Map.Entry.comparingByValue())\r\n\t\t\t\t\t\t\t\t\t\t.collect(toMap(Map.Entry::getKey, Map.Entry::getValue,\r\n\t\t\t\t\t\t\t\t\t\t\t\t(oldValue, newValue) -> oldValue, LinkedHashMap::new));\r\n\t\t\t\t\t\t\t\t// System.out.println(\"Map yino\" +result );\r\n\r\n\t\t\t\t\t\t\t\tIterator<Map.Entry<String, Double>> best_col = result.entrySet().iterator();\r\n\r\n\t\t\t\t\t\t\t\twhile (best_col.hasNext()) {\r\n\r\n\t\t\t\t\t\t\t\t\tMap.Entry<String, Double> entry = best_col.next();\r\n\r\n\t\t\t\t\t\t\t\t\ttest_case = entry.getKey();\r\n\r\n\t\t\t\t\t\t\t\t\tif (!best_column.contains(test_case)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\tbest_column.add(test_case);\r\n\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tresult.clear();\r\n\t\t\t\t\t\t\t\trow_getter.clear();\r\n\t\t\t\t\t\t\t\tcolums++;\r\n\r\n\t\t\t\t\t\t\t}\r\n \r\n\t\t\t\t\t\t\t//Go straight to computing crowding distance for Font 0\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tint distance_zero;\r\n\r\n\t\t\t\t\t\t\t/************************************************************************************************************************************************************/\r\n\r\n\t\t\t\t\t\t\tdouble[][] distance_matrix_zero = new double[best_column.size()][best_column.size()];\r\n\r\n\t\t\t\t\t\t\tif ((best_column.size()) > 1) {\r\n\r\n\t\t\t\t\t\t\t\tfor (int best = 0; best < (best_column.size()); best++) {\r\n\r\n\t\t\t\t\t\t\t\t\tList<Double> front_0_1 = new ArrayList<Double>();\r\n\r\n\t\t\t\t\t\t\t\t\tfront_0_1 = updated_maps.get(best_column.get(best));\r\n\r\n\t\t\t\t\t\t\t\t\tfor (int ind_d = 0; ind_d < best_column.size(); ind_d++) {\r\n\r\n\t\t\t\t\t\t\t\t\t\tif (!((best_column.get(best).equals(best_column.get(ind_d))))) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tList<Double> front_0_2 = new ArrayList<Double>();\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tfront_0_2 = updated_maps.get(best_column.get(ind_d));\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tdistance_zero = get_count(front_0_1, front_0_2);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tint temp_dis = distance_zero;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tdistance_matrix_zero[best][ind_d] = temp_dis;\r\n\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tLinkedHashMap<String, Double> setdistance_zero_2 = new LinkedHashMap<String, Double>();\r\n\r\n\t\t\t\t\t\t\t\tfor (int font_ = 0; font_ < best_column.size(); font_++) {\r\n\r\n\t\t\t\t\t\t\t\t\tdouble zeros = 0.0;\r\n\r\n\t\t\t\t\t\t\t\t\tsetdistance_zero_2.put(best_column.get(font_), zeros);\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tfor (int font_i = 0; font_i < (best_column.size()); font_i++) {\r\n\r\n\t\t\t\t\t\t\t\t\tfor (int font_j = 0; font_j < best_column.size(); font_j++) {\r\n\r\n\t\t\t\t\t\t\t\t\t\tif (!((best_column.get(font_i).equals(best_column.get(font_j))))) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (setdistance_zero_2.get(best_column\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.get(font_i)) < distance_matrix_zero[font_i][font_j]) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tdouble dis = (distance_matrix_zero[font_i][font_j]);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tsetdistance_zero_2.put(best_column.get(font_i), dis);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tMap<String, Double> result = setdistance_zero_2.entrySet().stream()\r\n\t\t\t\t\t\t\t\t\t\t.sorted(Map.Entry.comparingByValue())\r\n\t\t\t\t\t\t\t\t\t\t.collect(toMap(Map.Entry::getKey, Map.Entry::getValue,\r\n\t\t\t\t\t\t\t\t\t\t\t\t(oldValue, newValue) -> oldValue, LinkedHashMap::new));\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tfor (Map.Entry<String, Double> entry : result.entrySet()) {\r\n\r\n\t\t\t\t\t\t\t\t\tif (updated_population.size() < pop_num) { //updated_population holds the selected population for next generation\r\n\t\t\t\t\t\t\t\t\t\tupdated_population.add(entry.getKey());\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tresult.clear();\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//updated population has best performing test cases sorted in descending order\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\telse { // process the only item in the best set\r\n\r\n\t\t\t\t\t\t\t\tif (!best_column.isEmpty()) {\r\n\r\n\t\t\t\t\t\t\t\t\tString item_one = best_column.get(0);\r\n\r\n\t\t\t\t\t\t\t\t\tif (updated_population.size() < pop_num) {\r\n\r\n\t\t\t\t\t\t\t\t\t\tupdated_population.add(item_one);\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t//Establish other fonts\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tList<String> fitness_objectives_comparator = new ArrayList<String>();\r\n\t\t\t\t\t\t\t// List<Double> fitness_objectives_p = new ArrayList<Double>();\r\n\t\t\t\t\t\t\t// List<Double> fitness_objectives_q= new ArrayList<Double>();\r\n\r\n\t\t\t\t\t\t\tfor (int next_front = 0; next_front < final_combined_population.size(); next_front++) {\r\n\r\n\t\t\t\t\t\t\t\tif (!best_column.contains(final_combined_population.get(next_front))) {\r\n\r\n\t\t\t\t\t\t\t\t\tfitness_objectives_comparator.add(final_combined_population.get(next_front));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ((fitness_objectives_comparator.size()) > 1) {\r\n\r\n\t\t\t\t\t\t\t\tint[] dominateMe = new int[fitness_objectives_comparator.size()];\r\n\r\n\t\t\t\t\t\t\t\t// front[i] contains the list of individuals belonging to the front i\r\n\t\t\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\t\t\t\t\tList<Integer>[] front = new List[(fitness_objectives_comparator.size() + 1)];\r\n\r\n\t\t\t\t\t\t\t\t// iDominate[k] contains the list of solutions dominated by k\r\n\r\n\t\t\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\t\t\t\t\tList<Integer>[] iDominate = new List[fitness_objectives_comparator.size()];\r\n\r\n\t\t\t\t\t\t\t\tint flagDominate;\r\n\r\n\t\t\t\t\t\t\t\tfor (int i = 0; i < ((front.length)); i++) {\r\n\t\t\t\t\t\t\t\t\tfront[i] = new LinkedList<Integer>();\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tfor (int p = 0; p < fitness_objectives_comparator.size(); p++) {\r\n\t\t\t\t\t\t\t\t\t// Initialize the list of individuals that i dominate and the number\r\n\t\t\t\t\t\t\t\t\t// of individuals that dominate me\r\n\t\t\t\t\t\t\t\t\tiDominate[p] = new LinkedList<Integer>();\r\n\t\t\t\t\t\t\t\t\tdominateMe[p] = 0;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t// int secondary_size =0 ;\r\n\t\t\t\t\t\t\t\tint N = fitness_objectives_comparator.size();\r\n\t\t\t\t\t\t\t\t// int[][] dominanceChecks = new int[N][N];\r\n\r\n\t\t\t\t\t\t\t\tfor (int p = 0; p < (N - 1); p++) {\r\n\r\n\t\t\t\t\t\t\t\t\tList<Double> fitness_temporary_p = new ArrayList<Double>();\r\n\r\n\t\t\t\t\t\t\t\t\tfitness_temporary_p = updated_maps.get((fitness_objectives_comparator.get(p)));\r\n\r\n\t\t\t\t\t\t\t\t\t// secondary_size = fitness_temporary_p.size();\r\n\r\n\t\t\t\t\t\t\t\t\tfor (int q = p + 1; q < N; q++) {\r\n\t\t\t\t\t\t\t\t\t\t// if (p != q) {\r\n\t\t\t\t\t\t\t\t\t\tList<Double> fitness_temporary_q = new ArrayList<Double>();\r\n\r\n\t\t\t\t\t\t\t\t\t\tfitness_temporary_q = updated_maps\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get((fitness_objectives_comparator.get(q)));\r\n\r\n\t\t\t\t\t\t\t\t\t\tflagDominate = frontdominace_Comparison(fitness_temporary_p,\r\n\t\t\t\t\t\t\t\t\t\t\t\tfitness_temporary_q);\r\n\r\n\t\t\t\t\t\t\t\t\t\tif (flagDominate == -1) {\r\n\t\t\t\t\t\t\t\t\t\t\t// System.out.println(\"p---dominates>>>>>\" );\r\n\t\t\t\t\t\t\t\t\t\t\tiDominate[p].add(q);\r\n\t\t\t\t\t\t\t\t\t\t\tdominateMe[q]++;\r\n\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\telse if (flagDominate == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t// System.out.println(\"q---dominates>>>>>\" );\r\n\t\t\t\t\t\t\t\t\t\t\tiDominate[q].add(p);\r\n\t\t\t\t\t\t\t\t\t\t\tdominateMe[p]++;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tList<Double> fitness_temporary_qq = new ArrayList<Double>();\r\n\t\t\t\t\t\t\t\t\t\t\tList<Double> fitness_temporary_pp = new ArrayList<Double>();\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tCollections.sort(fitness_temporary_p);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tfitness_temporary_pp.addAll(fitness_temporary_p);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tCollections.sort(fitness_temporary_q);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tfitness_temporary_qq.addAll(fitness_temporary_q);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (fitness_temporary_pp.get(0) < fitness_temporary_qq.get(0)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// System.out.println(\"p---dominates>>>>>\" );\r\n\t\t\t\t\t\t\t\t\t\t\t\tiDominate[p].add(q);\r\n\t\t\t\t\t\t\t\t\t\t\t\tdominateMe[q]++;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\telse if (fitness_temporary_qq.get(0) < fitness_temporary_pp.get(0)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// System.out.println(\"q---dominates>>>>>\" );\r\n\t\t\t\t\t\t\t\t\t\t\t\tiDominate[q].add(p);\r\n\t\t\t\t\t\t\t\t\t\t\t\tdominateMe[p]++;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tfor (int p = 0; p < ((fitness_objectives_comparator.size())); p++) {\r\n\r\n\t\t\t\t\t\t\t\t\tif (dominateMe[p] == 0) {\r\n\t\t\t\t\t\t\t\t\t\tfront[0].add(p);\r\n\r\n\t\t\t\t\t\t\t\t\t\t// setrank.put(Integer.parseInt(fitness_objectives_comparator.get(p)), 1);\r\n\t\t\t\t\t\t\t\t\t\tint val = 0;\r\n\t\t\t\t\t\t\t\t\t\tsetrank1.put(fitness_objectives_comparator.get(p), val);\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n/*****************************************************************************************************************************************************************************************/\r\n\r\n\t\t\t\t\t\t\t\tint font_s = 0;\r\n\t\t\t\t\t\t\t\t// if((front[font_s].size() != 0)) {\r\n\r\n\t\t\t\t\t\t\t\tIterator<Integer> it1, it2; // Iterators\r\n\t\t\t\t\t\t\t\twhile (front[font_s].size() != 0) {\r\n\t\t\t\t\t\t\t\t\t/// System.out.println(\"we got here\" + front[font_s]);\r\n\t\t\t\t\t\t\t\t\tfont_s++;\r\n\t\t\t\t\t\t\t\t\tit1 = front[font_s - 1].iterator();\r\n\t\t\t\t\t\t\t\t\twhile (it1.hasNext()) {\r\n\t\t\t\t\t\t\t\t\t\tit2 = iDominate[(it1.next())].iterator();\r\n\t\t\t\t\t\t\t\t\t\twhile (it2.hasNext()) {\r\n\t\t\t\t\t\t\t\t\t\t\tint index = it2.next();\r\n\t\t\t\t\t\t\t\t\t\t\tdominateMe[index]--;\r\n\t\t\t\t\t\t\t\t\t\t\tif (dominateMe[index] == 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tfront[font_s].add(index);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// System.out.println(\"Block_1: \" +front[font_s]);\r\n\t\t\t\t\t\t\t\t\t\t\t\tsetrank1.put(fitness_objectives_comparator.get(index), font_s);\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tLinkedHashMap<String, Double> setdistance = new LinkedHashMap<String, Double>();\r\n\r\n\t\t\t\t\t\t\t\tLinkedHashMap<String, Double> setdistance_one = new LinkedHashMap<String, Double>();\r\n\r\n\t\t\t\t\t\t\t\tMap<Integer, ArrayList<String>> reverseMap = new HashMap<>();\r\n\r\n\t\t\t\t\t\t\t\tfor (Map.Entry<String, Integer> entry : setrank1.entrySet()) {\r\n\t\t\t\t\t\t\t\t\tif (!reverseMap.containsKey(entry.getValue())) {\r\n\t\t\t\t\t\t\t\t\t\treverseMap.put(entry.getValue(), new ArrayList<>());\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tArrayList<String> keys = reverseMap.get(entry.getValue());\r\n\t\t\t\t\t\t\t\t\tkeys.add(entry.getKey());\r\n\t\t\t\t\t\t\t\t\treverseMap.put(entry.getValue(), keys);\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t// process fonts\r\n\r\n\t\t\t\t\t\t\t\tint smaller;\r\n\t\t\t\t\t\t\t\tint smaller_one;\r\n\t\t\t\t\t\t\t//\tint remaining;\r\n\t\t\t\t\t\t\t\t// int smaller_two;\r\n\r\n\t\t\t\t\t\t\t\tint fronts = 0;\r\n\t\t\t\t\t\t\t\t// System.out.println(\"map's size\" + reverseMap.size());\r\n\t\t\t\t\t\t\t\twhile (fronts < (reverseMap.size())) {\r\n\r\n\t\t\t\t\t\t\t\t\t// if (updated_population.size()== pop_num) {\r\n\t\t\t\t\t\t\t\t\t// break;\r\n\t\t\t\t\t\t\t\t\t// }\r\n\r\n\t\t\t\t\t\t\t\t\tif (fronts != (reverseMap.size() - 1)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\tList<String> front_list = new ArrayList<String>();\r\n\r\n\t\t\t\t\t\t\t\t\t\tfront_list = reverseMap.get(fronts);\r\n\r\n\t\t\t\t\t\t\t\t\t\tif ((front_list.size()) > 1) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tdouble[][] distance_matrix = new double[front_list.size()][front_list\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.size()];\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tfor (int ind_d = 0; ind_d < (front_list.size()); ind_d++) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tList<Double> front_getter1 = new ArrayList<Double>();\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tfront_getter1 = updated_maps.get((front_list.get(ind_d)));\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tfor (int d = 0; d < front_list.size(); d++) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!(front_list.get(ind_d).equals(front_list.get(d)))) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tList<Double> front_getter2 = new ArrayList<Double>();\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfront_getter2 = updated_maps.get((front_list.get(d)));\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsmaller = get_count(front_getter1, front_getter2);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tint sma = smaller;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdistance_matrix[ind_d][d] = sma;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tfor (int font_ = 0; font_ < front_list.size(); font_++) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tdouble valz = 0.0;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tsetdistance.put(front_list.get(font_), valz);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// all distances set\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tfor (int font_i = 0; font_i < (front_list.size()); font_i++) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t// distance_matrix\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tfor (int font_j = 0; font_j < front_list.size(); font_j++) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!(front_list.get(font_i).equals(front_list.get(font_j)))) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (setdistance.get(front_list\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(font_i)) < distance_matrix[font_i][font_j]) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdouble dist = (distance_matrix[font_i][font_j]);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetdistance.put(front_list.get(font_i), dist);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tMap<String, Double> result = setdistance.entrySet().stream()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.sorted(Map.Entry.comparingByValue())\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.collect(toMap(Map.Entry::getKey, Map.Entry::getValue,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(oldValue, newValue) -> oldValue, LinkedHashMap::new));\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tIterator<Map.Entry<String, Double>> iteration = result.entrySet()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.iterator();\r\n\r\n\t\t\t\t\t\t\t\t\t\t\twhile (iteration.hasNext()) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tMap.Entry<String, Double> entry = iteration.next();\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (updated_population.size() < pop_num) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tupdated_population.add(entry.getKey());\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tresult.clear();\r\n\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tString best_1;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tbest_1 = front_list.get(0);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (updated_population.size() < (pop_num)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tupdated_population.add(best_1);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tif (fronts == (reverseMap.size() - 1)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\tList<String> front_list_one = new ArrayList<String>();\r\n\r\n\t\t\t\t\t\t\t\t\t\tfront_list_one = reverseMap.get(reverseMap.size() - 1);\r\n\r\n\t\t\t\t\t\t\t\t\t\t// System.out.println(\"hahahq\" +front_list_one);\r\n\r\n\t\t\t\t\t\t\t\t\t\tdouble[][] distance_matrix_one = new double[front_list_one\r\n\t\t\t\t\t\t\t\t\t\t\t\t.size()][front_list_one.size()];\r\n\r\n\t\t\t\t\t\t\t\t\t\tfor (int ind_w = 0; ind_w < (front_list_one.size()); ind_w++) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tList<Double> front_getter_one = new ArrayList<Double>();\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tfront_getter_one = updated_maps.get((front_list_one.get(ind_w)));\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tfor (int dw = 0; dw < front_list_one.size(); dw++) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (!(front_list_one.get(ind_w).equals(front_list_one.get(dw)))) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tList<Double> front_getter_two = new ArrayList<Double>();\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tfront_getter_two = updated_maps.get((front_list_one.get(dw)));\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsmaller_one = get_count(front_getter_one, front_getter_two);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tint sm = smaller_one;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdistance_matrix_one[ind_w][dw] = sm;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tfor (int font_ = 0; font_ < front_list_one.size(); font_++) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tdouble dit = 0.0;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tsetdistance_one.put(front_list_one.get(font_), dit);\r\n\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t// all distances set\r\n\r\n\t\t\t\t\t\t\t\t\t\tfor (int font_i = 0; font_i < (front_list_one.size()); font_i++) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tfor (int font_j = 0; font_j < front_list_one.size(); font_j++) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (!(front_list_one.get(font_i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.equals(front_list_one.get(font_j)))) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (setdistance_one.get(front_list_one\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(font_i)) < distance_matrix_one[font_i][font_j]) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdouble dst = (distance_matrix_one[font_i][font_j]);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetdistance_one.put(front_list_one.get(font_i), dst);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\tint remaining_ = (pop_num - updated_population.size());\r\n\r\n\t\t\t\t\t\t\t\t\t\tif (setdistance_one.size() <= remaining_) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tMap<String, Double> result = setdistance_one.entrySet().stream()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.sorted(Map.Entry.comparingByValue())\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.collect(toMap(Map.Entry::getKey, Map.Entry::getValue,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(oldValue, newValue) -> oldValue, LinkedHashMap::new));\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tIterator<Map.Entry<String, Double>> iteration = result.entrySet()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.iterator();\r\n\r\n\t\t\t\t\t\t\t\t\t\t\twhile (iteration.hasNext()) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tMap.Entry<String, Double> entry = iteration.next();\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (updated_population.size() < pop_num) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tupdated_population.add(entry.getKey());\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t// System.out.println( \"remaining---\" +remaining);\r\n\t\t\t\t\t\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tMap<String, Double> sortedByValueDesc = setdistance_one.entrySet()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.stream()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.sorted(Map.Entry.<String, Double>comparingByValue().reversed())\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.collect(toMap(Map.Entry::getKey, Map.Entry::getValue,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(e1, e2) -> e1, LinkedHashMap::new));\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tList<String> front_remove = new ArrayList<String>();\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tSet<String> keytest = sortedByValueDesc.keySet();\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tint final_size = sortedByValueDesc.size();\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// while(sortedByValueDesc.size() > remaining) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tfor (String keysss : keytest) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (final_size > remaining_) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tfront_remove.add(keysss);\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\tfinal_size--;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// System.out.println( \"sorted map after---\" +sortedByValueDesc.size());\r\n\t\t\t\t\t\t\t\t\t\t\tSet<String> keytests = sortedByValueDesc.keySet();\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tfor (String key_sss : keytests) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (updated_population.size() < pop_num) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!front_remove.contains(key_sss)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tupdated_population.add(key_sss);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tsetdistance.clear();\r\n\t\t\t\t\t\t\t\t\tsetdistance_one.clear();\r\n\r\n\t\t\t\t\t\t\t\t\tfronts++;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t\tif (!fitness_objectives_comparator.isEmpty()) {\r\n\r\n\t\t\t\t\t\t\t\t\tif (updated_population.size() < pop_num) {\r\n\r\n\t\t\t\t\t\t\t\t\t\tString get_item = (fitness_objectives_comparator.get(0));\r\n\r\n\t\t\t\t\t\t\t\t\t\tupdated_population.add(get_item);\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n}\r\n}\r\n}}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t \t\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tcatch(IndexOutOfBoundsException e) {}\r\n\r\n\t\t\t\t\t\t\t//updated_population.clear();\r\n\t\t\t\t\t\t\tcombined_population.clear();\r\n\t\t\t\t\t\t\t//combined_population2.clear();\r\n\t\t\t\t\t\t\tsetrank1.clear();\r\n\t\t\t\t\t\t\t//setrank2.clear();\r\n\t\t\t\t\t\t\t//setrank3.clear();\r\n\t\t\t\t\t\t\tcombined_maps.clear();\r\n\t\t\t\t\t\t\t//child_maps.clear();\r\n\r\n\t\t\t\t\t\t\r\n Set<String> add_target = paths.keySet();\r\n\t \t\r\n\t \t//replaced_status_2.put(id + new String(str), false);\r\n\t \tint true_count = 0;\r\n\t \t// get status of removal\r\n\t \tfor (String key_ss : add_target) { \r\n\t \t\r\n\t \t//pick path whose status is false\r\n\t \t\tif ( paths.get(key_ss) ){\r\n\t \t\t\t\r\n\t \t\t\t true_count++;\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\telse {\r\n\t \t\t\t\r\n\t \t\t\tbreak;\r\n\t \t\t}\r\n\t \t \t \r\n\t \t} \r\n\t \t\r\n\t \tif ( true_count == paths.size() ) {\r\n\t \t\t\r\n\t \t\t//if all paths have true as replaced status\r\n\t \t\t\r\n\t \t\t//set them to false\r\n\t \t\t\r\n\t \t\t//pick subset of paths not previously removed at previous generation\r\n\t \t\r\n\t \t\tSet<String> add_new_entry = paths.keySet();\r\n\t \t \t\r\n\t \t \t//replaced_status_2.put(id + new String(str), false);\r\n\t \t \tint entry_count = 0;\r\n\t \t \t// get status of removal\r\n\t \t \tfor (String enrty_ss : add_new_entry ) { \r\n\t \t\t\r\n\t \t \t\t paths.put(enrty_ss , false);\r\n\t \t \t\t\r\n\t \t \t}\r\n\t \t \t\r\n\t \t \tif (paths.size() > 50) {\r\n\t \t \t\r\n\t \t \tint counter_add_paths = 0;\r\n\t \t \t\t\r\n Set<String> add_target_from_Path_1 = paths.keySet();\r\n\t\t \t\r\n\t\t \t//replaced_status_2.put(id + new String(str), false);\r\n\t\t \t\r\n\t\t \t// get status of removal\r\n\t\t \t for (String from_Path_1: add_target_from_Path_1) {\r\n\t \t \t\r\n\t \t \t\r\n\t \t \t\r\n\t \t\t if (still_remaining_targets.contains(from_Path_1) ) {\r\n\t \t \t\t\r\n\t \t \t\t continue;\r\n\t \t \t }\r\n\t \t\t\r\n\t \t\t else {\r\n\t \t\t\t \r\n\t \t\t\t \r\n\t \t\t\t if (counter_add_paths < 50) {\r\n\t \t\t\t\r\n\t \t\t\t if ( !temporary_path_holder.contains(from_Path_1) ){\r\n\t \t \t \t\t\r\n\t \t\t\t\t target_subset.put(from_Path_1 + \" \" + \"new\", false);\r\n\t\t \t \t\t\t\r\n\t \t\t\t\t counter_add_paths++;\r\n\t \t\t\t\t \r\n\t \t\t\t\t// retrieve test case from archive\r\n\t\t \t \t\t\t//updatePopulation(from_Path_1)..//return test case not previously added to temporary population\r\n\t \t\t\t\t \r\n\t\t \t \t\t}\r\n\t \t\t\t\r\n\t \t\t\t }\r\n\t \t\t\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 \r\n\t\t \t }\r\n\t \t \t}\r\n\t\t \t \r\n\t\t \t else {\r\n\t\t \t \t \r\n\t\t \t \t \r\n\t\t \t \tSet<String> add_target_from_Path_7 = paths.keySet();\r\n\t\t\t \t\r\n\t\t\t \t//replaced_status_2.put(id + new String(str), false);\r\n\t\t\t \t\r\n\t\t\t \t// get status of removal\r\n\t\t\t \t for (String from_Path_7: add_target_from_Path_7) { // contains(Object)\r\n\t\t\t \t\r\n\t\t\t \t //get current path set..the paths already in subset should not be picked again....\r\n\t\t\t \t\t\r\n\t\t\t \t \t//\ttarget_subset.put(key + \" \" + \"new\", false);\t\r\n\t\t\t \t \t\r\n\t\t\t if (still_remaining_targets.contains(from_Path_7) ) {\r\n\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t \t \t\tcontinue;\r\n\t\t\t\t\t \t \t}\r\n\t\t\t else { \r\n\t \t \t\tif ( !temporary_path_holder.contains(from_Path_7) ){\r\n\t \t \t\t\t\r\n\t \t \t\t\ttarget_subset.put(from_Path_7 + \" \" + \"new\", false);\r\n\t \t \t\t\t\r\n\t \t \t\t\t// retrieve test case from archive\r\n\t \t \t\t// retrieve test case from archive\r\n\t \t \t\t\t//updatePopulation(from_Path_7)..//return test case not previously added to temporary population\r\n\t \t \t\t}}\r\n\t\t \t \t \r\n\t\t\t \t }\t \r\n\t\t \t \t \r\n\t\t \t \t \r\n\t\t \t }\r\n\t }\r\n\t \t\t\r\n\t \telse {\r\n\t \t\t\r\n\t \t\t// pick paths with false status and add them to subset of targets\r\n\t \t\t\r\n\t \t\tint path_to_add_counter = 0;\r\n\t \t\t\r\n\t \tif (paths.size() > 50) {\r\n\t \t\tSet<String> add_target_from_Path = paths.keySet();\r\n\t\t \t\r\n\t\t \t//replaced_status_2.put(id + new String(str), false);\r\n\t\t \t\r\n\t\t \t// get status of removal\r\n\t\t \t for (String from_Path: add_target_from_Path) { // contains(Object)\r\n\t\t \t\r\n\t\t \t //get current path set..the paths already in subset should not be picked again....\r\n\t\t \t\t\r\n\t\t \t \t//\ttarget_subset.put(key + \" \" + \"new\", false);\t\r\n\t\t \t \t\r\n\t\t \t \t\tif (still_remaining_targets.contains(from_Path) ) {\r\n\t\t\t\t \t \t\t\r\n\t\t\t\t \t \t\tcontinue;\r\n\t\t\t\t \t \t}\r\n\t\t \t \t\t\telse {\t\r\n\t\t \t \t\t\r\n\t\t \t \t\t if (path_to_add_counter < 50) {\r\n\t\t \t \t\t \r\n\t\t \t \t if ( !paths.get(from_Path) && (!temporary_path_holder.contains(from_Path) ) ){\r\n\t\t \t \t\t\r\n\t\t \t \t\t target_subset.put(from_Path + \" \" + \"new\", false);\r\n\t\t \t \t\t\t\r\n\t\t \t \t\t\tpath_to_add_counter++;\r\n\t\t \t \t\t\t\r\n\t\t \t \t\t\t// retrieve test case from archive\r\n\t\t \t \t\t// retrieve test case from archive\r\n\t\t \t \t\t\t//updatePopulation(from_Path)..//return test case not previously added to temporary population\r\n\t\t \t \t\t }\r\n\t\t \t \t\t \r\n\t\t \t \t\t \r\n\t\t \t \t\t}\r\n\t\t \t \t\t\t}\r\n\t\t \t \t}\r\n\t \t}\r\n\t \t\r\n\t \t\r\n\t\t \t else {\r\n\t\t \t \t\t \r\n\t\t \t \t\tSet<String> add_target_from_Path_4 = paths.keySet();\r\n\t\t\t\t \t\r\n\t\t\t\t \t//replaced_status_2.put(id + new String(str), false);\r\n\t\t\t\t \t\r\n\t\t\t\t \t// get status of removal\r\n\t\t\t\t \t for (String from_Path_4: add_target_from_Path_4) { // contains(Object)\r\n\t\t\t\t \t\r\n\t\t\t\t \t //get current path set..the paths already in subset should not be picked again....\r\n\t\t\t\t \t\t\r\n\t\t\t\t \t \t//\ttarget_subset.put(key + \" \" + \"new\", false);\t\r\n\t\t\t\t \t \t\r\n\t\t\t\t \r\n\t\t\t\t \t \t\t\tif (still_remaining_targets.contains(from_Path_4) ) {\r\n\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t \t \t\tcontinue;\r\n\t\t\t\t\t\t \t \t}\r\n\t\t \t \t\t \r\n\t\t\t\t \t \t\t\telse {\r\n\t\t \t \t\t\t\r\n\t\t \t \t\tif ( !paths.get(from_Path_4) && (!temporary_path_holder.contains(from_Path_4) ) ){\r\n\t\t \t \t\t\t\r\n\t\t \t \t\t\ttarget_subset.put(from_Path_4 + \" \" + \"new\", false);\r\n\t\t \t \t\t\t\r\n\t\t \t \t\t\t// retrieve test case from archive\r\n\t\t \t \t\t\t//updatePopulation(from_Path_4)..//return test case not previously added to temporary population\r\n\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\t\r\n\t\t \t \t\t}\r\n\t\t \t \t}\r\n\t\t \t\r\n\t \t}\r\n\t \t\r\n\t \t\r\n\t \tparents_population_copy.clear();\r\n\t \t\r\n\t \tfor (int i = 0; i < 50 ; i++) // updated population \r\n\t \t\t\t{\r\n\r\n\t \t\t\t\t//for (int j = 0; j < R; j++) {\r\n\t \t\t\t\t\r\n\t \t\t\t\t//\tx[i][j] = (int)(Math.random()*((ub[j] - lb[j])+1))+ lb[j];\r\n\r\n\t \t\t\t\t//update set x\r\n\t \t\t\t\tparents_population_copy.add(\"parent\" + \" \" + i);\r\n\t \t\r\n\t \t\r\n\t \t\r\n\t \t\r\n\t\t\t\t}\r\n\t \t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse { //proceed to add paths if subset of target objectives is empty\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n Set<String> add_target = paths.keySet();\r\n\t \t\r\n\t \t//replaced_status_2.put(id + new String(str), false);\r\n\t \tint true_count = 0;\r\n\t \t// get status of removal\r\n\t \tfor (String key_ss : add_target) { \r\n\t \t\r\n\t \t//pick path whose status is false\r\n\t \t\tif ( paths.get(key_ss) ){\r\n\t \t\t\t\r\n\t \t\t\t true_count++;\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\telse {\r\n\t \t\t\t\r\n\t \t\t\tbreak;\r\n\t \t\t}\r\n\t \t \t \r\n\t \t} \r\n\t \t\r\n\t \tif ( true_count == paths.size() ) {\r\n\t \t\t\r\n\t \t\t//if all paths have true as replaced status\r\n\t \t\t\r\n\t \t\t//set them to false\r\n\t \t\t\r\n\t \t\t//pick subset of paths not previously removed at previous generation\r\n\t \t\r\n\t \t\tSet<String> add_new_entry = paths.keySet();\r\n\t \t \t\r\n\t \t \t//replaced_status_2.put(id + new String(str), false);\r\n\t \t \tint entry_count = 0;\r\n\t \t \t// get status of removal\r\n\t \t \tfor (String enrty_ss : add_new_entry ) { \r\n\t \t\t\r\n\t \t \t\t paths.put(enrty_ss , false);\r\n\t \t \t\t\r\n\t \t \t}\r\n\t \t \t\r\n\t \t \tif (paths.size() > 50) {\r\n\t \t \t\r\n\t \t \tint counter_add_paths = 0;\r\n\t \t \t\t\r\n Set<String> add_target_from_Path_1 = paths.keySet();\r\n\t\t \t\r\n\t\t \t//replaced_status_2.put(id + new String(str), false);\r\n\t\t \t\r\n\t\t \t// get status of removal\r\n\t\t \t for (String from_Path_1: add_target_from_Path_1) {\r\n\t \t \t\r\n\t \t \t\r\n\t \t \t\r\n\t \t\t if (still_remaining_targets.contains(from_Path_1) ) {\r\n\t \t \t\t\r\n\t \t \t\t continue;\r\n\t \t \t }\r\n\t \t\t\r\n\t \t\t else {\r\n\t \t\t\t \r\n\t \t\t\t \r\n\t \t\t\t if (counter_add_paths < 50) {\r\n\t \t\t\t\r\n\t \t\t\t if ( !temporary_path_holder.contains(from_Path_1) ){\r\n\t \t \t \t\t\r\n\t \t\t\t\t target_subset.put(from_Path_1 + \" \" + \"new\", false);\r\n\t\t \t \t\t\t\r\n\t \t\t\t\t counter_add_paths++;\r\n\t \t\t\t\t \r\n\t \t\t\t\t// retrieve test case from archive\r\n\t\t \t \t\t\t//updatePopulation(from_Path_1)..//return test case not previously added to temporary population\r\n\t \t\t\t\t \r\n\t\t \t \t\t}\r\n\t \t\t\t\r\n\t \t\t\t }\r\n\t \t\t\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 \r\n\t\t \t }\r\n\t \t \t}\r\n\t\t \t \r\n\t\t \t else {\r\n\t\t \t \t \r\n\t\t \t \t \r\n\t\t \t \tSet<String> add_target_from_Path_7 = paths.keySet();\r\n\t\t\t \t\r\n\t\t\t \t//replaced_status_2.put(id + new String(str), false);\r\n\t\t\t \t\r\n\t\t\t \t// get status of removal\r\n\t\t\t \t for (String from_Path_7: add_target_from_Path_7) { // contains(Object)\r\n\t\t\t \t\r\n\t\t\t \t //get current path set..the paths already in subset should not be picked again....\r\n\t\t\t \t\t\r\n\t\t\t \t \t//\ttarget_subset.put(key + \" \" + \"new\", false);\t\r\n\t\t\t \t \t\r\n\t\t\t if (still_remaining_targets.contains(from_Path_7) ) {\r\n\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t \t \t\tcontinue;\r\n\t\t\t\t\t \t \t}\r\n\t\t\t else { \r\n\t \t \t\tif ( !temporary_path_holder.contains(from_Path_7) ){\r\n\t \t \t\t\t\r\n\t \t \t\t\ttarget_subset.put(from_Path_7 + \" \" + \"new\", false);\r\n\t \t \t\t\t\r\n\t \t \t\t\t// retrieve test case from archive\r\n\t \t \t\t// retrieve test case from archive\r\n\t \t \t\t\t//updatePopulation(from_Path_7)..//return test case not previously added to temporary population\r\n\t \t \t\t}}\r\n\t\t \t \t \r\n\t\t\t \t }\t \r\n\t\t \t \t \r\n\t\t \t \t \r\n\t\t \t }\r\n\t }\r\n\t \t\t\r\n\t \telse {\r\n\t \t\t\r\n\t \t\t// pick paths with false status and add them to subset of targets\r\n\t \t\t\r\n\t \t\tint path_to_add_counter = 0;\r\n\t \t\t\r\n\t \tif (paths.size() > 50) {\r\n\t \t\tSet<String> add_target_from_Path = paths.keySet();\r\n\t\t \t\r\n\t\t \t//replaced_status_2.put(id + new String(str), false);\r\n\t\t \t\r\n\t\t \t// get status of removal\r\n\t\t \t for (String from_Path: add_target_from_Path) { // contains(Object)\r\n\t\t \t\r\n\t\t \t //get current path set..the paths already in subset should not be picked again....\r\n\t\t \t\t\r\n\t\t \t \t//\ttarget_subset.put(key + \" \" + \"new\", false);\t\r\n\t\t \t \t\r\n\t\t \t \t\tif (still_remaining_targets.contains(from_Path) ) {\r\n\t\t\t\t \t \t\t\r\n\t\t\t\t \t \t\tcontinue;\r\n\t\t\t\t \t \t}\r\n\t\t \t \t\t\telse {\t\r\n\t\t \t \t\t\r\n\t\t \t \t\t if (path_to_add_counter < 50) {\r\n\t\t \t \t\t \r\n\t\t \t \t if ( !paths.get(from_Path) && (!temporary_path_holder.contains(from_Path) ) ){\r\n\t\t \t \t\t\r\n\t\t \t \t\t target_subset.put(from_Path + \" \" + \"new\", false);\r\n\t\t \t \t\t\t\r\n\t\t \t \t\t\tpath_to_add_counter++;\r\n\t\t \t \t\t\t\r\n\t\t \t \t\t\t// retrieve test case from archive\r\n\t\t \t \t\t// retrieve test case from archive\r\n\t\t \t \t\t\t//updatePopulation(from_Path)..//return test case not previously added to temporary population\r\n\t\t \t \t\t }\r\n\t\t \t \t\t \r\n\t\t \t \t\t \r\n\t\t \t \t\t}\r\n\t\t \t \t\t\t}\r\n\t\t \t \t}\r\n\t \t}\r\n\t \t\r\n\t \t\r\n\t\t \t else {\r\n\t\t \t \t\t \r\n\t\t \t \t\tSet<String> add_target_from_Path_4 = paths.keySet();\r\n\t\t\t\t \t\r\n\t\t\t\t \t//replaced_status_2.put(id + new String(str), false);\r\n\t\t\t\t \t\r\n\t\t\t\t \t// get status of removal\r\n\t\t\t\t \t for (String from_Path_4: add_target_from_Path_4) { // contains(Object)\r\n\t\t\t\t \t\r\n\t\t\t\t \t //get current path set..the paths already in subset should not be picked again....\r\n\t\t\t\t \t\t\r\n\t\t\t\t \t \t//\ttarget_subset.put(key + \" \" + \"new\", false);\t\r\n\t\t\t\t \t \t\r\n\t\t\t\t \r\n\t\t\t\t \t \t\t\tif (still_remaining_targets.contains(from_Path_4) ) {\r\n\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t \t \t\tcontinue;\r\n\t\t\t\t\t\t \t \t}\r\n\t\t \t \t\t \r\n\t\t\t\t \t \t\t\telse {\r\n\t\t \t \t\t\t\r\n\t\t \t \t\tif ( !paths.get(from_Path_4) && (!temporary_path_holder.contains(from_Path_4) ) ){\r\n\t\t \t \t\t\t\r\n\t\t \t \t\t\ttarget_subset.put(from_Path_4 + \" \" + \"new\", false);\r\n\t\t \t \t\t\t\r\n\t\t \t \t\t\t// retrieve test case from archive\r\n\t\t \t \t\t\t//updatePopulation(from_Path_4)..//return test case not previously added to temporary population\r\n\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\t\r\n\t\t \t \t\t}\r\n\t\t \t \t}\r\n\t\t \t\r\n\t \t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t \t\r\n\t \t\r\n\t\t\t\tString updated_id;\r\n\r\n\t\t\t\tint updated_val;\r\n\r\n\t\t\t\t// int rem;\r\n\r\n\t\t\t\tfor (int pop = 0; pop < updated_population.size(); pop++) {\r\n\r\n\t\t\t\t\tif (pop == 50) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tString[] updated_pop = (updated_population.get(pop).split(\" \"));\r\n\t\t\t\t\tupdated_id = updated_pop[0];\r\n\t\t\t\t\tupdated_val = Integer.parseInt(updated_pop[1]);\r\n\r\n\t\t\t\t\tif (updated_id.equals(\"parent\")) {\r\n\t\t\t\t\t\tfor (int update_parent = 0; update_parent < R; update_parent++) {\r\n\t\t\t\t\t\t\t// x[i][j] = v[i][j] ;\r\n\r\n\t\t\t\t\t\t\tx[pop][update_parent] = x[updated_val][update_parent];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (updated_id.equals(\"child\")) {\r\n\t\t\t\t\t\tfor (int update_child = 0; update_child < R; update_child++) {\r\n\t\t\t\t\t\t\t// x[i][j] = v[i][j] ;\r\n\r\n\t\t\t\t\t\t\tx[pop][update_child] = v[updated_val][update_child];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t \t\r\n\t \t\r\n\t\t\t\t} \t\r\n\t // \tremoved_at_previous_iteration.clear();\r\n\t\t\t\t//}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t//\tfor (Map.Entry<String, ArrayList<String>> entry : names.entrySet()) {\r\n\t\t\t\t//\tString key = entry.getKey();\r\n\t\t\t\t//\tArrayList<String> value = entry.getValue();\r\n\t\t\t\t//\t}\r\n\r\n\t\t\t\r\n\t\t//\tSystem.out.println(\"NO. of cycles=\" + (Cycle[run] - 1)); // ���Number of Cycle\r\n\t\t\tcoverage[run] = obj_total * 100 / PATHNUM_NUMBER ; // percentage of paths covered per run\r\n\t\t\tSystem.out.println(\"Path coverage=\" + coverage[run] + \"%\");\r\n\t\t\tSystem.out.println(\"The optimal solution is\");\r\n\t\t\tSystem.out.println(\"template 1(bbbb): \");\r\n\t\t\t/*for (int a = 0; a < PATHNUM; a++) // Output the result\r\n\t\t {\r\n\t\t\t\tif (statu[a]) {\r\n\t\t\t\t\tSystem.out.print(\"path\" + a + \":\");\r\n\t\t\t\t\tfor (int j = 0; j < R; j++)\r\n\t\t\t\t\t\tSystem.out.print(solution[a][j] + \" \");\r\n\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t} else\r\n\t\t\t\t\tSystem.out.println(\"path\" + a + \"Not covered.\");\r\n\t\t\t}*/\r\n\r\n\t\t\t \r\n\r\n\t\t} \r\n\r\n\t\tdouble time_sum = 0, time_average;\r\n\t\tfloat coverage_sum = 0, coverage_average, cycle_sum = 0, cycle_average, case_average;\r\n\t\tint case_sum = 0;\r\n\t\tfor (int run = 0; run < RUN; run++) {\r\n\t\t\ttime_sum = time_sum + runtime[run];\r\n\t\t//\tcycle_sum = cycle_sum + (Cycle[run] - 1);\r\n\t\t//\tcase_sum = case_sum + total_case_num[run];\r\n\t\t\tcoverage_sum = coverage_sum + coverage[run];\r\n\t\t }\r\n\t\t\r\n\t\ttime_average = time_sum / RUN;\r\n\t\tcycle_average = cycle_sum / RUN;\r\n\t\tcase_average = case_sum / RUN;\r\n\t\tcoverage_average = coverage_sum / RUN;\r\n\r\n\t\tSystem.out.println(\"time_sum = \" + time_sum + \"ms\");\r\n\t\tSystem.out.println(\"time_average = \" + time_average + \"ms\");\r\n\t\tSystem.out.println(\"cycle_sum = \" + cycle_sum);\r\n\t\tSystem.out.println(\"cycle_average = \" + cycle_average);\r\n\t\tSystem.out.println(\"case_sum = \" + case_sum);\r\n\t\tSystem.out.println(\"case_average = \" + case_average);\r\n\t\tSystem.out.println(\"coverage_sum = \" + coverage_sum + \"%\");\r\n\t\tSystem.out.println(\"coverage_average = \" + coverage_average + \"%\");\r\n\r\n\t\r\n\t\t\r\n\t\t//test case number statistics\r\n\t\ttry \r\n\t\t{ \r\n//\t\t\tWritableWorkbook wbook= \r\n//\t\t\tWorkbook.createWorkbook(new File(\"E:/result0106.xls\")); \r\n//\t\t\t//生成名为“Ramdom”的工作表,参数0表示这是第一页 \r\n//\t\t\tWritableSheet sheet=wbook.createSheet(\"DE1\",0); \r\n\t\t\t\r\n\t\t\tFile file = new java.io.File(\"C:/Users/scybe/eclipse-workspace/TestData/Test_whole.xls\"); \r\n\t\t\tWorkbook book = Workbook.getWorkbook(file); \r\n\t\t\tWritableWorkbook wbook = Workbook.createWorkbook(file, book); \r\n \t WritableSheet sheet = wbook.getSheet(0); // 写入数据 sheet \r\n\t\t\t\r\n\t\t\tfor(int run=0 ; run<RUN; run++)\r\n\t\t\t{\r\n\t\t\t\tint q = run;\r\n\t\t\t\tjxl.write.Number number = new jxl.write.Number(col, q,total_case_num[run]); \r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tsheet.addCell(number); \r\n\t\t\t\tSystem.out.println(total_case_num[run]);\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//total_case_num[run]\r\n\t\t\t\r\n\t\t \tdouble case_ave = getAverage(total_case_num , RUN);\r\n\t\t\tjxl.write.Number number1 = new jxl.write.Number(col, 25 ,case_ave); \r\n\t\t\tsheet.addCell(number1);\r\n\t\t\t\r\n\t\t\t \t\t\r\n\t\t\twbook.write(); \t\r\n\t\t\twbook.close();\r\n\t\t\t \r\n\t\t}catch(Exception e) \r\n\t\t{ \r\n\t\tSystem.out.println(e); \r\n\t\t} \r\n\t\t\t\t\t\t\r\n\t\t\r\n\t\t//coverage statistics \r\n\t\t\r\n\t\t//test case number statistics\r\n\t\t\t\t\r\n\t\t\r\n\t\t\r\n\t\ttry \r\n\t\t\t{ \r\n//\t\t\t\t\t\r\n\t\t\t\t\tFile file = new java.io.File(\"C:/Users/scybe/eclipse-workspace/TestData/Coverage_whole.xls\"); \r\n\t\t\t\t\tWorkbook book = Workbook.getWorkbook(file); \r\n\t\t\t\t\tWritableWorkbook wbook = Workbook.createWorkbook(file, book); \r\n\t\t \t WritableSheet sheet = wbook.getSheet(0); // 写入数据 sheet \r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(int run=0 ; run<RUN; run++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint q=run;\r\n\t\t\t\t\t\tjxl.write.Number number = new jxl.write.Number(col, q,coverage[run]); \r\n\t\t\t\t\t\tsheet.addCell(number); \r\n\t\t\t\t\t\t\r\n \r\n\t\t\t\t\t\t//写入数据并关闭文件 \t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//total_case_num[run]\r\n\t\t\t\t\t\r\n\t\t\t\t\tdouble case_ave = getAverages(coverage , RUN);\r\n\t\t\t\t\tjxl.write.Number number1 = new jxl.write.Number(col,25,case_ave); \r\n\t\t\t\t\tsheet.addCell(number1);\r\n\t\t\t\t\t\r\n\t\t\t\t\twbook.write(); \t\r\n\t\t\t\t\twbook.close();\r\n\t\t\t\t\t \r\n\t\t\t\t}catch(Exception e) \r\n\t\t\t\t{ \r\n\t\t\t\tSystem.out.println(e); \r\n\t\t\t\t} \r\n\t\t\t\t\r\n\t\t\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n Nucleotide nucleotide0 = Nucleotide.Pyrimidine;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n defaultNucleotideCodec1.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n Set<Nucleotide> set1 = nucleotide0.getBasesFor();\n defaultNucleotideCodec0.encode((Collection<Nucleotide>) set1);\n DefaultNucleotideCodec.values();\n byte[] byteArray0 = new byte[8];\n byteArray0[0] = (byte)102;\n byteArray0[1] = (byte)0;\n byteArray0[2] = (byte)8;\n byteArray0[3] = (byte) (-37);\n byteArray0[4] = (byte) (-11);\n byteArray0[5] = (byte)40;\n byteArray0[6] = (byte)5;\n byteArray0[7] = (byte) (-42);\n // Undeclared exception!\n try { \n defaultNucleotideCodec2.getGappedOffsetFor(byteArray0, (-2398));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "private int m14719r() {\n int s = m14720s();\n if (s > 0) {\n try {\n if (this.f10949d == null) {\n this.f10949d = this.f10962q.mo12209b(255);\n }\n int i = this.f10951f - this.f10952g;\n if (i >= s) {\n System.arraycopy(this.f10950e, this.f10952g, this.f10949d, 0, s);\n this.f10952g += s;\n } else if (this.f10948c.remaining() + i >= s) {\n System.arraycopy(this.f10950e, this.f10952g, this.f10949d, 0, i);\n this.f10952g = this.f10951f;\n m14721t();\n int i2 = s - i;\n System.arraycopy(this.f10950e, 0, this.f10949d, i, i2);\n this.f10952g += i2;\n } else {\n this.f10965t = 1;\n }\n } catch (Exception e) {\n C3111h1.m14932d(f10944y, \"Error Reading Block\", e);\n this.f10965t = 1;\n }\n }\n return s;\n }", "private static void test1() {\n\n\tint n=10000;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint val=rand7();\n\t\t\tcount[val]++;\n\t\t}\n\t\t\n\t\tfor(int i:count)\n\t\t\tSystem.out.println(i);\n\t}", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "static void method_6447() {\r\n String[] var5 = new String[3];\r\n int var3 = 0;\r\n String var2 = \"ûÄ È̺°ˆ¼KÈ\u0007Îá\u0013”íå\u0002ä \";\r\n int var4 = \"ûÄ È̺°ˆ¼KÈ\u0007Îá\u0013”íå\u0002ä \".length();\r\n char var1 = 11;\r\n int var0 = -1;\r\n\r\n while(true) {\r\n ++var0;\r\n String var10002 = var2.substring(var0, var0 + var1);\r\n boolean var10000 = true;\r\n char[] var10003 = var10002.toCharArray();\r\n Object var10004 = var10003.length;\r\n Object var9 = true;\r\n char[] var8 = var10003;\r\n char[] var10001 = (char[])var10004;\r\n int var6 = 0;\r\n\r\n while(true) {\r\n var10003 = var8;\r\n var8 = var10001;\r\n var10001 = var10003;\r\n char[] var11 = var8;\r\n var8 = var10003;\r\n if(var10003 <= var6) {\r\n var5[var3++] = (new String((char[])var9)).intern();\r\n if((var0 += var1) >= var4) {\r\n field_6229 = var5;\r\n String[] var10 = field_6229;\r\n field_6228 = \"CL_00000440\";\r\n return;\r\n }\r\n\r\n var1 = var2.charAt(var0);\r\n break;\r\n }\r\n\r\n char var10007 = (char)((Object[])var9)[var6];\r\n short var10009;\r\n switch(var6 % 7) {\r\n case 0:\r\n var10009 = 124;\r\n break;\r\n case 1:\r\n var10009 = 76;\r\n break;\r\n case 2:\r\n var10009 = 187;\r\n break;\r\n case 3:\r\n var10009 = 60;\r\n break;\r\n case 4:\r\n var10009 = 56;\r\n break;\r\n case 5:\r\n var10009 = 78;\r\n break;\r\n default:\r\n var10009 = 68;\r\n }\r\n\r\n ((Object[])var9)[var6] = (char)(var10007 ^ var11 ^ var10009);\r\n ++var6;\r\n }\r\n }\r\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[9];\n defaultNucleotideCodec0.toString(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.getUngappedLength(byteArray0);\n Nucleotide nucleotide0 = Nucleotide.Gap;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray1 = defaultNucleotideCodec0.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec1.decode(byteArray0, 0);\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray2 = defaultNucleotideCodec2.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.toString(byteArray1);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec4.isGap(byteArray0, 1553);\n defaultNucleotideCodec0.getNumberOfGapsUntil(byteArray2, (-3166));\n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec5.isGap(byteArray0, 75);\n DefaultNucleotideCodec defaultNucleotideCodec6 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray3 = new byte[0];\n // Undeclared exception!\n try { \n defaultNucleotideCodec6.isGap(byteArray3, (-1));\n fail(\"Expecting exception: BufferUnderflowException\");\n \n } catch(BufferUnderflowException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.nio.Buffer\", e);\n }\n }", "public static void main(String[] args) throws FileNotFoundException {\n Scanner cin = new Scanner(new File(\"A-large-practice.in\"));\n PrintStream cout = new PrintStream(\"A-large-practice.out\");\n// Scanner cin = new Scanner(System.in);\n// PrintStream cout = System.out;\n\n int _case = 0;\n\n for (int T = cin.nextInt(); T > 0; T--) {\n _case++;\n StringBuilder ans = new StringBuilder();\n\n final String[] digits = {\"ZERO\", \"ONE\", \"TWO\", \"THREE\", \"FOUR\", \"FIVE\", \"SIX\", \"SEVEN\", \"EIGHT\", \"NINE\"};\n double[][] a = new double[26][11];\n for (char ch : cin.next().toCharArray()) a[ch - 'A'][10]++;\n for (int i = 0; i < 10; i++)\n for (char ch : digits[i].toCharArray())\n a[ch - 'A'][i]++;\n\n// print(a);\n for (int i = 0; i < 10; i++) {\n int row = i;\n for (int j = i; j < 26; j++)\n if (Math.abs(a[j][i]) > Math.abs(a[row][i])) row = j;\n\n double[] tmp = a[row];\n a[row] = a[i];\n a[i] = tmp;\n\n for (int j = 10; j >= i; j--) a[i][j] /= a[i][i];\n for (int ii = i + 1; ii < 26; ii++)\n for (int j = 10; j >= i; j--)\n a[ii][j] -= a[i][j] * a[ii][i];\n\n// System.out.println();\n// print(a);\n }\n for (int ii = 8; ii >= 0; ii--) {\n for (int j = ii + 1; j < 10; j++)\n a[ii][10] -= a[ii][j] * a[j][10];\n }\n\n for (int i = 0; i < 10; i++)\n for (int j = 0; j < Math.round(a[i][10]); j++)\n ans.append(i);\n\n cout.printf(\"Case #%d: %s%n\", _case, ans);\n }\n\n cin.close();\n cout.close();\n }", "@Test\n public void calculationOnElevenDigitMsgIsCorrect() {\n final String msg = \"00110001110\";\n final int[] expectedMsg = {0,0,1,0, 1,0,1,1, 1,0,0,0, 1,1,1,0};\n\n // When\n int[] transformedMsg = HammingAlgorithm.calculate(msg);\n\n // Then\n assertThat(transformedMsg).isEqualTo(expectedMsg);\n }", "public static void main(String[] aArg) {\n int j = 1214740;\n int i;\n int z = 0;\n \n \n while (j > 5) {\n i = j;\n j--;\n Console.write(\"Badum\"); // + j +\"\\n\");\n \n \n while (i > 5) {\n if ((i % 2) == 0) {\n i = i / 2;\n } else {\n i = 1 + (i * 3);\n z++;\n }\n }\n \n \n }\n //System.out.println(z);\n if (z == 52591218)\n Console.write(\"Yahy!\");\n else\n Console.write(\"Nahy!\");\n }", "private int mo115245l() {\n int i = 0;\n while (i < this.f119298r) {\n int i2 = 0;\n while (i2 < this.f119297q.length && this.f119297q[i2] != i) {\n i2++;\n }\n if (i2 == this.f119297q.length) {\n return i;\n }\n i++;\n }\n return i;\n }", "public int mo9761x() {\n /*\n r5 = this;\n int r0 = r5.f9074i\n int r1 = r5.f9072g\n if (r1 != r0) goto L_0x0007\n goto L_0x006a\n L_0x0007:\n byte[] r2 = r5.f9070e\n int r3 = r0 + 1\n byte r0 = r2[r0]\n if (r0 < 0) goto L_0x0012\n r5.f9074i = r3\n return r0\n L_0x0012:\n int r1 = r1 - r3\n r4 = 9\n if (r1 >= r4) goto L_0x0018\n goto L_0x006a\n L_0x0018:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 7\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x0024\n r0 = r0 ^ -128(0xffffffffffffff80, float:NaN)\n goto L_0x0070\n L_0x0024:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r1 = r1 << 14\n r0 = r0 ^ r1\n if (r0 < 0) goto L_0x0031\n r0 = r0 ^ 16256(0x3f80, float:2.278E-41)\n L_0x002f:\n r1 = r3\n goto L_0x0070\n L_0x0031:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 21\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x003f\n r2 = -2080896(0xffffffffffe03f80, float:NaN)\n r0 = r0 ^ r2\n goto L_0x0070\n L_0x003f:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r4 = r1 << 28\n r0 = r0 ^ r4\n r4 = 266354560(0xfe03f80, float:2.2112565E-29)\n r0 = r0 ^ r4\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r2 = r2[r3]\n if (r2 >= 0) goto L_0x0070\n L_0x006a:\n long r0 = r5.mo9763z()\n int r0 = (int) r0\n return r0\n L_0x0070:\n r5.f9074i = r1\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p213q.p217b.p301c.p302a.p311j0.p312a.C3656k.C3658b.mo9761x():int\");\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 void stringcon()\n {\n int i,j,k;\n int temp[]=new int[8];\n int a[]=new int[32];\n i=0;\n j=0;\n for(i=0;i<10000;i++)\n bytes[i]=0;\n i=0;\n maxbinary1=0;\n for(i=0;i<24;i++)\n a[i]=binary[i];\n for(i=0;i<24;i++)\n maxbinary1+=a[i]*Math.pow(2,23-i);\n maxbinary2=maxbinary1*8;\n ivalue=0;\n for(i=24,j=0;i<32;i++,j++)\n {\n a[j]=binary[i];\n ivalue+=a[j]*Math.pow(2,7-j);\n }\n if(ivalue==73)\n {\n i=32;\n while(i<maxbinary2)\n {\n for(k=0;k<=7;k++)\n temp[k]=binary[i++];\n for(k=0;k<=7;k++)\n bytes[j]+=temp[k]*Math.pow(2,7-k);\n j++;\n }\n String s=JOptionPane.showInputDialog(this,\"Enter key with 16 letters\");\n char ch[]=new char[s.length()];\n ch=s.toCharArray();\n try\n {\n FileOutputStream f=new FileOutputStream(\"key1.txt\");\n for(i=0;i<ch.length;i++)\n f.write(ch[i]);\n f.close();\n FileOutputStream fout=new FileOutputStream(\"enc1.txt\");\n DataOutputStream d=new DataOutputStream(fout);\n \t\ti=8;\n while(i<(maxbinary1))\n \t\t {\n \t\t\td.write(bytes[i]);\n\t\t i++;\n \t\t }\n fout.close();\n }\n catch(Exception e)\n {\n System.out.println(e);\n }\n\n ideaalgo b=new ideaalgo();\n b.procedure();\n b.decryption(\"enc1.txt\");\n try\n {\n BufferedReader d;\n StringBuffer sb=new StringBuffer();\n d=new BufferedReader(new FileReader(\"dec.txt\"));\n String line;\n while((line=d.readLine())!=null)\n sb.append(line+\"\\n\");\n ta.setText(sb.toString());\n d.close();\n }\ncatch(Exception e)\n {\n System.out.println(e);\n }\n }\n}", "public static void main(String[] args) {\n Arrayss arrayss = new Arrayss();\n arrayss.infiniteArray(new int[]{3,5,6,7,8,10,12,14,15,16,17,18,20,34,56,78,24}, 20);\n// SlidingWindow slidingWindow = new SlidingWindow();\n//// System.out.println(slidingWindow.longestSubstring(\"AAAHHIBC\", 2));\n// Strings s = new Strings();\n// s.reverseString(\"hello\");\n// Binary binary = new Binary();\n// binary.solution(1041);\n// Arrayss arrays = new Arrayss();\n//\n// arrays.rotateByK(new int[]{3,5,6,7,8}, 3);\n//\n// BinarySearch binarySearch = new BinarySearch();\n// binarySearch.search(new int[]{3,5,6,7,8}, 9);\n// System.out.println(s.palindrome(\"civic\"));\n\n// Node node1 = new Node(1);\n// Node node2 = new Node(2);\n// Node node3 = new Node(3);\n// Node node4 = new Node(4);\n\n// node1.next = node2;\n// node2.next = node3;\n// node3.next = node4;\n// node4.next = null;\n//\n// Node head = new List().reverseRecursively(node1);\n DynamicProgramming dynamicProgramming = new DynamicProgramming();\n dynamicProgramming.fibo(5);\n dynamicProgramming.recursiveStairCaseBottomUp(3, new int[]{1,3,5});\n// System.out.println( dynamicProgramming.recursiveStairCaseBottomUp(3, new int[]{1,3,5}));\n//\n// Arrays arrays = new Arrays();\n// System.out.println(arrays.infiniteArray(new int[]{1,3,5,6,7,8,9,10,12,13}, 9));\n//\n// MicrosoftQuestions microsoftQuestions = new MicrosoftQuestions();\n// System.out.println(microsoftQuestions.twoSum(new int[]{2,4,5,7,6,8}, 14)[0]);\n\n\n\n// List list = new List();\n// Node head;\n// list.insert(5);\n// list.insert(12);\n// list.insert(20);\n// list.insertAtStart(34);\n// list.show();\n\n// ArrayList<Status> statuses = new ArrayList<>();\n// Status status1 = new Status(1);\n// Status status2 = new Status(2);\n// Status status3 = new Status(3);\n// statuses.add(status1);\n// statuses.add(status2);\n// statuses.add(status3);\n//\n// ArrayList<Holder> container = new ArrayList<>();\n// Holder holder = new Holder(\"jackie\", 1);\n// Holder holder1 = new Holder(\"tosh\", 2);\n// Holder holder2 = new Holder(\"kesh\", 3);\n// Holder holder3 = new Holder(\"tev\", 4);\n// container.add(holder);\n// container.add(holder1);\n// container.add(holder2);\n// container.add(holder3);\n//\n// List<Integer> statuseses = statuses.stream()\n// .map(Status::getStatus)\n// .collect(Collectors.toList());\n//\n// List<Holder> res = container.stream()\n// .filter(e -> !statuseses.contains(e.getStatus()))\n// .collect(Collectors.toList());\n//\n// res.forEach(e -> System.out.println(e.name));\n\n\n\n\n }", "public void a()\r\n/* 49: */ {\r\n/* 50: 64 */ HashSet<BlockPosition> localHashSet = Sets.newHashSet();\r\n/* 51: */ \r\n/* 52: 66 */ int m = 16;\r\n/* 53: 67 */ for (int n = 0; n < 16; n++) {\r\n/* 54: 68 */ for (int i1 = 0; i1 < 16; i1++) {\r\n/* 55: 69 */ for (int i2 = 0; i2 < 16; i2++) {\r\n/* 56: 70 */ if ((n == 0) || (n == 15) || (i1 == 0) || (i1 == 15) || (i2 == 0) || (i2 == 15))\r\n/* 57: */ {\r\n/* 58: 74 */ double d1 = n / 15.0F * 2.0F - 1.0F;\r\n/* 59: 75 */ double d2 = i1 / 15.0F * 2.0F - 1.0F;\r\n/* 60: 76 */ double d3 = i2 / 15.0F * 2.0F - 1.0F;\r\n/* 61: 77 */ double d4 = Math.sqrt(d1 * d1 + d2 * d2 + d3 * d3);\r\n/* 62: */ \r\n/* 63: 79 */ d1 /= d4;\r\n/* 64: 80 */ d2 /= d4;\r\n/* 65: 81 */ d3 /= d4;\r\n/* 66: */ \r\n/* 67: 83 */ float f2 = this.i * (0.7F + this.d.rng.nextFloat() * 0.6F);\r\n/* 68: 84 */ double d6 = this.e;\r\n/* 69: 85 */ double d8 = this.f;\r\n/* 70: 86 */ double d10 = this.g;\r\n/* 71: */ \r\n/* 72: 88 */ float f3 = 0.3F;\r\n/* 73: 89 */ while (f2 > 0.0F)\r\n/* 74: */ {\r\n/* 75: 90 */ BlockPosition localdt = new BlockPosition(d6, d8, d10);\r\n/* 76: 91 */ Block localbec = this.d.getBlock(localdt);\r\n/* 77: 93 */ if (localbec.getType().getMaterial() != Material.air)\r\n/* 78: */ {\r\n/* 79: 94 */ float f4 = this.h != null ? this.h.a(this, this.d, localdt, localbec) : localbec.getType().a((Entity)null);\r\n/* 80: 95 */ f2 -= (f4 + 0.3F) * 0.3F;\r\n/* 81: */ }\r\n/* 82: 98 */ if ((f2 > 0.0F) && ((this.h == null) || (this.h.a(this, this.d, localdt, localbec, f2)))) {\r\n/* 83: 99 */ localHashSet.add(localdt);\r\n/* 84: */ }\r\n/* 85:102 */ d6 += d1 * 0.300000011920929D;\r\n/* 86:103 */ d8 += d2 * 0.300000011920929D;\r\n/* 87:104 */ d10 += d3 * 0.300000011920929D;\r\n/* 88:105 */ f2 -= 0.225F;\r\n/* 89: */ }\r\n/* 90: */ }\r\n/* 91: */ }\r\n/* 92: */ }\r\n/* 93: */ }\r\n/* 94:111 */ this.j.addAll(localHashSet);\r\n/* 95: */ \r\n/* 96:113 */ float f1 = this.i * 2.0F;\r\n/* 97: */ \r\n/* 98:115 */ int i1 = MathUtils.floor(this.e - f1 - 1.0D);\r\n/* 99:116 */ int i2 = MathUtils.floor(this.e + f1 + 1.0D);\r\n/* 100:117 */ int i3 = MathUtils.floor(this.f - f1 - 1.0D);\r\n/* 101:118 */ int i4 = MathUtils.floor(this.f + f1 + 1.0D);\r\n/* 102:119 */ int i5 = MathUtils.floor(this.g - f1 - 1.0D);\r\n/* 103:120 */ int i6 = MathUtils.floor(this.g + f1 + 1.0D);\r\n/* 104:121 */ List<Entity> localList = this.d.b(this.h, new AABB(i1, i3, i5, i2, i4, i6));\r\n/* 105:122 */ Vec3 localbrw = new Vec3(this.e, this.f, this.g);\r\n/* 106:124 */ for (int i7 = 0; i7 < localList.size(); i7++)\r\n/* 107: */ {\r\n/* 108:125 */ Entity localwv = (Entity)localList.get(i7);\r\n/* 109:126 */ if (!localwv.aV())\r\n/* 110: */ {\r\n/* 111:129 */ double d5 = localwv.f(this.e, this.f, this.g) / f1;\r\n/* 112:131 */ if (d5 <= 1.0D)\r\n/* 113: */ {\r\n/* 114:132 */ double d7 = localwv.xPos - this.e;\r\n/* 115:133 */ double d9 = localwv.yPos + localwv.getEyeHeight() - this.f;\r\n/* 116:134 */ double d11 = localwv.zPos - this.g;\r\n/* 117: */ \r\n/* 118:136 */ double d12 = MathUtils.sqrt(d7 * d7 + d9 * d9 + d11 * d11);\r\n/* 119:137 */ if (d12 != 0.0D)\r\n/* 120: */ {\r\n/* 121:141 */ d7 /= d12;\r\n/* 122:142 */ d9 /= d12;\r\n/* 123:143 */ d11 /= d12;\r\n/* 124: */ \r\n/* 125:145 */ double d13 = this.d.a(localbrw, localwv.getAABB());\r\n/* 126:146 */ double d14 = (1.0D - d5) * d13;\r\n/* 127:147 */ localwv.receiveDamage(DamageSource.a(this), (int)((d14 * d14 + d14) / 2.0D * 8.0D * f1 + 1.0D));\r\n/* 128: */ \r\n/* 129:149 */ double d15 = EnchantmentProtection.a(localwv, d14);\r\n/* 130:150 */ localwv.xVelocity += d7 * d15;\r\n/* 131:151 */ localwv.yVelocity += d9 * d15;\r\n/* 132:152 */ localwv.zVelocity += d11 * d15;\r\n/* 133:154 */ if ((localwv instanceof EntityPlayer)) {\r\n/* 134:155 */ this.k.put((EntityPlayer)localwv, new Vec3(d7 * d14, d9 * d14, d11 * d14));\r\n/* 135: */ }\r\n/* 136: */ }\r\n/* 137: */ }\r\n/* 138: */ }\r\n/* 139: */ }\r\n/* 140: */ }", "public static int Main()\n\t{\n\t\tint n; //????\n\t\tint k;\n\t\tint i = 1;\n\t\tint j;\n\t\tn = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tk = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tint[] f = new int[n + 1]; //????\n\t\twhile (i > 0) //??????????\n\t\t{\n\t\t\tf[0] = (n - 1) * i; //?????\n\t\t\tfor (j = 1;j < n + 1;j++) //????\n\t\t\t{\n\t\t\t\tif (f[j - 1] % (n - 1) != 0)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tf[j] = f[j - 1] * n / (n - 1) + k;\n\t\t\t}\n\t\t\tif (j == n + 1)\n\t\t\t{\n\t\t\t\tbreak; //???????\n\t\t\t}\n\t\t\ti = i + 1;\n\t\t}\n\t\tSystem.out.print(f[n]);\n\t\tSystem.out.print(\"\\n\");\n\t\treturn 0;\n\t}", "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 static int Main()\n\t{\n\t\tint[] num = new int[16];\n\t\tint i;\n\t\tint k;\n\t\tint j;\n\t\tint count;\n\t\tfor (;;) //????\n\t\t{\n\t\t\ti = -1; //?????i?count\n\t\t\tcount = 0;\n\t\t\tdo\n\t\t\t{\n\t\t\t\ti++;\n\t\t\t\tnum[i] = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\t\t\tif (num[0] == -1) //?????????-1???\n\t\t\t\t{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t} while (num[i] != 0); //????0??\n\t\t\tfor (j = 0 ; j <= i - 1 ; j++)\n\t\t\t{\n\t\t\t\tfor (k = j ; k <= i - 1 ; k++)\n\t\t\t\t{\n\t\t\t\t\tif ((num[j] == 2 * num[k]) || (num[j] * 2 == num[k])) //????\n\t\t\t\t\t{\n\t\t\t\t\t\tcount++; //??\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.print(count);\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\n\t}", "public static void main(String[] args) {\r\n\r\n\t\tint n=439;\r\n\r\n\t\tint count = 1;\r\n\t\tint binary[] = new int[32];\r\n\t\tint i = 0;\r\n\t\twhile (n > 0) {\r\n\t\t\tbinary[i] = n % 2;\r\n\t\t\tn = n / 2;\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\tfor (int j = i - 1; j >= 0; j--) {\r\n\r\n\t\t\tString str = String.valueOf(i);\r\n\t\t\t\r\n\t\tString ar[]=str.split(\"0\");\r\n\t\t\t\r\n\t\tif(ar.length>1)\r\n\t\t{\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\t/*\t\r\n\t\t\tif (binary[j] == 1 && binary[j + 1] == 1) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.print(binary[j]);\r\n*/\r\n\t\t}\r\n\t\tSystem.out.print(count);\r\n\t\t/*scanner.close();*/\r\n\t}", "public void copiedMeasureDecoder(Integer chordNote,Integer[]previousChord, Integer[] playedChord){\n /* int c=0;\n int a=0;\n int b=0;\n int x0=0;\n int x1=0;*/\n int d1=0;\n int d2=0;\n\n\n\n for (int i=0;i<melodyNotes.length;i++){\n if(melodyNotes[i]==chordNote)\n d1=i;\n }\n for (int i=0;i<melodyNotes.length;i++){\n if(melodyNotes[i]==melody.get(melodyCounter))\n d2=i;\n /* if(melodyNotes[i]==playedChord[1])\n a=i;\n if(melodyNotes[i]==previousChord[1])\n b=i;*/\n }\n /*if(a<b){\n x0=a-b;\n x1=7+x1;\n }else{\n x0=a-b;\n x1=x0-7;\n }*/\n if(d1>d2) {\n binaryOutput += \"0\";\n }else {\n binaryOutput += \"1\";\n }\n for(int i = 0;i<4;i++){\n for(int j =0; j < rhytm.get(beatCounter).length;j++){\n if(rhytm.get(beatCounter)[j]!=null)\n if ((!rhytm.get(beatCounter)[j].equals(\"Ri\")) && (!rhytm.get(beatCounter)[j].equals(\"Rs\"))) {\n melodyCounter++;\n }\n }\n beatCounter++;\n }\n\n\n}", "public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\r\n\t\tint n=s.nextInt();\r\n\t\tlong md=s.nextLong();\r\n\t\tlong mr=s.nextLong();\r\n\t\tString a=binGen(0,n);\r\n\t\tString MR;\r\n\t\tString MD;\r\n\t\tif(md<0) { MD=binGen(md,n); }\r\n\t\telse { MD=binGen(md,n);}\r\n\t\tif(mr<0) {MR=binGen(mr,n);}\r\n\t\telse { MR=binGen(mr,n);}\r\n\t\tSystem.out.println(\"MULTIPLICAND=\"+MD);System.out.println(\"MULTIPLIER=Q=\"+MR);\r\n\t\tString[] A=new String[n]; \r\n\t\tString[] Q=new String[n]; \r\n\t\tfor(int i=0;i<n-1;i++)\r\n\t\t{\r\n\t\t\tA[i]=a.substring(i,i+1);\r\n\t\t}\r\n\t\tA[n-1]=a.substring(n-1);\r\n\t\tfor(int i=0;i<n-1;i++)\r\n\t\t{\r\n\t\t\tQ[i]=MR.substring(i,i+1);\r\n\t\t}\r\n\t\tQ[n-1]=MR.substring(n-1);\r\n\t\tString[] C=new String[2*n+1];\r\n\t\tfor(int i=0;i<A.length;i++)\r\n \t{\r\n \t\tC[i]=A[i];\r\n \t}\r\n \tfor(int i=A.length;i<C.length-1;i++)\r\n \t{\r\n \t\tC[i]=Q[i-Q.length];\r\n \t}\r\n\t\tC[C.length-1]=\"0\";\r\n\t\tSystem.out.println(\"A\"+\" \"+\"Q\"+\" \"+\"Q0\");\r\n\t\t for(int i=0;i<Q.length;i++) {System.out.print(A[i]);} System.out.print(\" \");\r\n\t\t for(int i=0;i<Q.length;i++) {System.out.print(Q[i]);}System.out.print(\" \"); System.out.print(C[C.length-1]);System.out.println();\r\n\t\t \t\r\n\t\twhile(n!=0)\r\n\t\t{\r\n\t\t\tString str=C[C.length-2]+C[C.length-1];\r\n\t\t\tif(str.contentEquals(\"00\")|| str.contentEquals(\"11\"))\r\n\t\t\t\t{\r\n\t\t\t\t C=ASR(A,Q,C);\r\n\t\t\t\t for(int i=0;i<A.length;i++) {A[i]=C[i];}\r\n\t\t\t\t for(int i=0;i<Q.length;i++) {Q[i]=C[i+A.length];}\r\n\t\t\t\t for(int i=0;i<Q.length;i++) {System.out.print(A[i]);} System.out.print(\" \");\r\n\t\t\t\t for(int i=0;i<Q.length;i++) {System.out.print(Q[i]);}System.out.print(\" \"); System.out.print(C[C.length-1]);System.out.println();\r\n\t\t\t\t \t}\r\n\t\t\telse if(str.contentEquals(\"01\"))\r\n\t\t\t{\r\n\t\t\t\tA=binAdd(A,MD);\r\n\t\t\t\tC=ASR(A,Q,C);\r\n\r\n\t\t\t\t for(int i=0;i<A.length;i++) {A[i]=C[i];}\r\n\t\t\t\t for(int i=0;i<Q.length;i++) {Q[i]=C[i+A.length];}\r\n\t\t\t\t for(int i=0;i<Q.length;i++) {System.out.print(A[i]);} System.out.print(\" \");\r\n\t\t\t\t for(int i=0;i<Q.length;i++) {System.out.print(Q[i]);} System.out.print(\" \"); System.out.print(C[C.length-1]);System.out.println();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tA=binSub(A,MD);\r\n\t\t\t\tC=ASR(A,Q,C);\r\n\t\t\t\t\r\n\t\t\t\t for(int i=0;i<A.length;i++) {A[i]=C[i];}\r\n\t\t\t\t for(int i=0;i<Q.length;i++) {Q[i]=C[i+A.length];}\r\n\t\t\t\t for(int i=0;i<Q.length;i++) {System.out.print(A[i]);}\r\n\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t for(int i=0;i<Q.length;i++) {System.out.print(Q[i]);}System.out.print(\" \"); System.out.print(C[C.length-1]); System.out.println();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tn--;\r\n\t\t}\r\n\t\tString st1=\"\";\r\n\t\tString st2=\"\";\r\n\t\tfor(int i=0;i<A.length;i++) {st1=st1+A[i];st2=st2+Q[i];}\r\n\t\tSystem.out.println(\"FINAL ANSWER :-\");\r\n\t\tSystem.out.println(st1+st2);\r\n\t\tif((md<0 && mr<0)|| (md>=0 && mr>=0) ) {System.out.println(Long.parseLong(st1+st2,2));}\r\n\t\telse if((md<0 && mr>0)||(md>0&&mr<0)) {System.out.println(0-Long.parseLong((twocomp(st1+st2)),2));}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\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.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\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.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "public static void main(String[] args) {\n String res = \"1\";\r\n for (int i = 0; i < 100; i++) res += '0';\r\n MAX = new BigInteger(res);\r\n generate(\"1\", 1, 1);\r\n generate(\"2\", 1, 4);\r\n generate(\"3\", 1, 9);\r\n Arrays.sort(values);\r\n// System.out.println(count);\r\n\r\n// for (int i = 0; i < 100; i++) {\r\n// System.out.println(values[i]);\r\n// }\r\n\r\n\r\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n try {\r\n String line = br.readLine();\r\n int K = Integer.parseInt(line);\r\n for (int i = 1; i <= K; i++) {\r\n String[] v = br.readLine().split(\" \");\r\n BigInteger A = new BigInteger(v[0]);\r\n BigInteger B = new BigInteger(v[1]);\r\n\r\n int p1 = Arrays.binarySearch(values, A);\r\n if (p1 < 0) {\r\n p1 = -p1 - 1;\r\n }\r\n int p2 = Arrays.binarySearch(values, B);\r\n if (p2 < 0) {\r\n p2 = -p2 - 1;\r\n } else {\r\n p2++;\r\n }\r\n int result = p2 - p1;\r\n //System.out.println(p1 + \" \" + p2);\r\n System.out.println(\"Case #\" + i + \": \" + result);\r\n\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\r\n }\r\n }", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n HashMap<Integer, Character> hashMap = new HashMap<Integer, Character>();\n hashMap.put(0,'F');hashMap.put(1,'G');hashMap.put(2,'R');\n hashMap.put(3,'S');hashMap.put(4,'T');hashMap.put(5,'L');\n hashMap.put(6,'M');hashMap.put(7,'N');hashMap.put(8,'O');\n hashMap.put(9,'P');hashMap.put(10,'Q');hashMap.put(11,'W');\n hashMap.put(12,'X');hashMap.put(13,'Y');hashMap.put(14,'Z');\n hashMap.put(15,'U');hashMap.put(16,'A');hashMap.put(17,'G');\n hashMap.put(18,'H');hashMap.put(19,'I');hashMap.put(20,'J');\n hashMap.put(21,'K');hashMap.put(22,'B');hashMap.put(23,'C');\n hashMap.put(24,'D');hashMap.put(25,'E');hashMap.put(26,'l');\n hashMap.put(27,'m');hashMap.put(28,'n');hashMap.put(29,'o');\n hashMap.put(30,'p');hashMap.put(31,'i');hashMap.put(32,'j');\n hashMap.put(33,'k');hashMap.put(34,'f');hashMap.put(35,'g');\n hashMap.put(36,'h');hashMap.put(37,'a');hashMap.put(38,'b');\n hashMap.put(39,'c');hashMap.put(40,'d');hashMap.put(41,'e');\n hashMap.put(42,'q');hashMap.put(43,'r');hashMap.put(44,'w');\n hashMap.put(45,'x');hashMap.put(46,'y');hashMap.put(47,'z');\n hashMap.put(48,'s');hashMap.put(49,'t');hashMap.put(50,'u');\n hashMap.put(51,'v');\n while(in.hasNext()){\n String str = in.next();\n\n String[] arr = str.split(\"[#]+\");\n\n StringBuffer ss = new StringBuffer();\n\n for (int i = 0; i < arr.length; i++) {\n\n //System.out.println(arr[i]);\n\n StringBuffer sb = new StringBuffer();\n\n for (int j = 0; j < arr[i].length(); j++) {\n\n int a = arr[i].charAt(j)=='-'?0:1;\n sb.append(a);\n }\n\n long b = Long.valueOf(sb.toString(),2);\n\n if (b>51||b<0){\n ss.replace(0,ss.length(),\"\");\n ss.append(\"ERROR\");\n break;\n }else {\n ss.append(hashMap.get((int)b));\n }\n }\n System.out.println(ss);\n\n }\n }", "static void runIt() throws IOException {\n\t\t String inFName = \"resource/C-large.in\";\n//\t\tString outFName = \"resource/C-small.out\";\n\t\t String outFName = \"resource/C-large.out\";\n\n\t\tBufferedReader in = new BufferedReader(new FileReader(inFName));\n\t\tPrintWriter out = new PrintWriter(new File(outFName));\n\n\t\tint testCases = Integer.parseInt(in.readLine());\n\n\t\tfor (int i = 0; i < testCases; ++i) {\n\n\t\t\tString line[] = in.readLine().split(\" \");\n//\t\t\tSystem.out.println(line);\n\t\t\tStringBuilder output = new StringBuilder();\n\t\t\toutput.append(\"Case #\" + (i + 1) + \": \");\n\n\t\t\tint R = Integer.parseInt(line[0]);\n\t\t\tint K = Integer.parseInt(line[1]);\n\t\t\tlong euros = 0;\n\t\t\tint pass = 0;\n\t\t\tline = in.readLine().split(\" \");\n\t\t\tVector<Integer> queue = new Vector<Integer>();\n\t\t\tVector<Integer> first = new Vector<Integer>();\n\t\t\tfor (String string : line) {\n\t\t\t\tqueue.add(Integer.parseInt(string));\n\t\t\t\tfirst.add(Integer.parseInt(string));\n\t\t\t\t\n\t\t\t}\n\n\n\t\t\tfor (int time = 0; time < R; ++time) {\n\t\t\t\tint p = 0;\n\t\t\t\twhile (true) {\n\t\t\t\t\tif (p < queue.size()) {\n\t\t\t\t\t\tInteger g = queue.elementAt(p++);\n\t\t\t\t\t\tif (pass + g <= K) {\n\t\t\t\t\t\t\tpass += g;\n\t\t\t\t\t\t} else {\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\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tfor (int kk = 1; kk < p; ++kk) {\n\t\t\t\t\tInteger m = queue.remove(0);\n\t\t\t\t\tqueue.add(m);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\teuros += pass;\n\t\t\t\tpass=0;\n\t\t\t\tif(queue.equals(first)){\n\t\t\t\t\tint s = R/(time+1);\n\t\t\t\t\teuros*=s;\n\t\t\t\t\ttime *=s;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\toutput.append(euros);\n\t\t\tSystem.out.println(output);\n\t\t\tout.println(output);\n\t\t}\n\n\t\tin.close();\n\t\tout.flush();\n\t\tout.close();\n\t}", "private static long m133353n() {\n C41940c c = C35574k.m114859a().mo70094i().mo102932c();\n String str = C39811er.f103468d;\n C7573i.m23582a((Object) str, \"ShortVideoConfig2.sDir\");\n File a = c.mo102928a(str);\n long j = 0;\n if (a.exists() && a.isDirectory()) {\n Set a2 = C41911c.m133283a();\n File[] listFiles = a.listFiles();\n C7573i.m23582a((Object) listFiles, \"filesRoot.listFiles()\");\n Iterable c2 = C7519g.m23444c((T[]) listFiles);\n Collection arrayList = new ArrayList();\n Iterator it = c2.iterator();\n while (true) {\n boolean z = false;\n if (!it.hasNext()) {\n break;\n }\n Object next = it.next();\n File file = (File) next;\n if (file.exists() && file.isFile()) {\n z = true;\n }\n if (z) {\n arrayList.add(next);\n }\n }\n for (File file2 : (List) arrayList) {\n String name = file2.getName();\n C7573i.m23582a((Object) name, \"undeleted.name\");\n if (!C7634n.m23721b(name, \"synthetise_\", false)) {\n String name2 = file2.getName();\n C7573i.m23582a((Object) name2, \"undeleted.name\");\n if (!C7634n.m23723c(name2, \"-concat-v\", false)) {\n String name3 = file2.getName();\n C7573i.m23582a((Object) name3, \"undeleted.name\");\n if (!C7634n.m23723c(name3, \"-concat-a\", false)) {\n }\n }\n Iterator it2 = a2.iterator();\n int i = 0;\n while (true) {\n if (!it2.hasNext()) {\n i = -1;\n break;\n }\n Object next2 = it2.next();\n if (i < 0) {\n C7525m.m23465b();\n }\n String str2 = (String) next2;\n String path = file2.getPath();\n C7573i.m23582a((Object) path, \"undeleted.path\");\n if (C7634n.m23721b(path, str2, false)) {\n break;\n }\n i++;\n }\n if (-1 == i) {\n j += file2.length();\n }\n }\n }\n }\n return j;\n }", "private static int getBytes(long r23) {\n /*\n java.lang.ThreadLocal<byte[]> r0 = TEMP_NUMBER_BUFFER\n java.lang.Object r0 = r0.get()\n byte[] r0 = (byte[]) r0\n r1 = 20\n if (r0 != 0) goto L_0x0013\n byte[] r0 = new byte[r1]\n java.lang.ThreadLocal<byte[]> r2 = TEMP_NUMBER_BUFFER\n r2.set(r0)\n L_0x0013:\n r2 = -9223372036854775808\n r4 = 54\n r5 = 57\n r6 = 45\n r7 = 53\n r8 = 56\n r9 = 55\n r10 = 51\n r11 = 50\n r12 = 0\n r13 = 48\n r14 = 1\n int r15 = (r23 > r2 ? 1 : (r23 == r2 ? 0 : -1))\n if (r15 != 0) goto L_0x0076\n r0[r12] = r6\n r0[r14] = r5\n r2 = 2\n r0[r2] = r11\n r2 = 3\n r0[r2] = r11\n r2 = 4\n r0[r2] = r10\n r2 = 5\n r0[r2] = r10\n r2 = 6\n r0[r2] = r9\n r2 = 7\n r0[r2] = r11\n r2 = 8\n r0[r2] = r13\n r2 = 9\n r0[r2] = r10\n r2 = 10\n r0[r2] = r4\n r2 = 11\n r0[r2] = r8\n r2 = 12\n r0[r2] = r7\n r2 = 13\n r3 = 52\n r0[r2] = r3\n r2 = 14\n r0[r2] = r9\n r2 = 15\n r0[r2] = r9\n r2 = 16\n r0[r2] = r7\n r2 = 17\n r0[r2] = r8\n r2 = 18\n r0[r2] = r13\n r2 = 19\n r0[r2] = r8\n return r1\n L_0x0076:\n r1 = 0\n int r3 = (r23 > r1 ? 1 : (r23 == r1 ? 0 : -1))\n if (r3 != 0) goto L_0x007f\n r0[r12] = r13\n return r14\n L_0x007f:\n if (r3 >= 0) goto L_0x0088\n r0[r12] = r6\n long r15 = java.lang.Math.abs(r23)\n goto L_0x008b\n L_0x0088:\n r14 = 0\n r15 = r23\n L_0x008b:\n r17 = 9\n r19 = 10\n r21 = 1\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0099\n r17 = r21\n goto L_0x017e\n L_0x0099:\n r17 = 99\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00a3\n r17 = r19\n goto L_0x017e\n L_0x00a3:\n r17 = 999(0x3e7, double:4.936E-321)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00ad\n r17 = 100\n goto L_0x017e\n L_0x00ad:\n r17 = 9999(0x270f, double:4.94E-320)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00b7\n r17 = 1000(0x3e8, double:4.94E-321)\n goto L_0x017e\n L_0x00b7:\n r17 = 99999(0x1869f, double:4.9406E-319)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00c2\n r17 = 10000(0x2710, double:4.9407E-320)\n goto L_0x017e\n L_0x00c2:\n r17 = 999999(0xf423f, double:4.94065E-318)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00ce\n r17 = 100000(0x186a0, double:4.94066E-319)\n goto L_0x017e\n L_0x00ce:\n r17 = 9999999(0x98967f, double:4.940656E-317)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00da\n r17 = 1000000(0xf4240, double:4.940656E-318)\n goto L_0x017e\n L_0x00da:\n r17 = 99999999(0x5f5e0ff, double:4.9406564E-316)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00e6\n r17 = 10000000(0x989680, double:4.9406565E-317)\n goto L_0x017e\n L_0x00e6:\n r17 = 999999999(0x3b9ac9ff, double:4.940656453E-315)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00f2\n r17 = 100000000(0x5f5e100, double:4.94065646E-316)\n goto L_0x017e\n L_0x00f2:\n r17 = 9999999999(0x2540be3ff, double:4.940656458E-314)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0100\n r17 = 1000000000(0x3b9aca00, double:4.94065646E-315)\n goto L_0x017e\n L_0x0100:\n r17 = 99999999999(0x174876e7ff, double:4.94065645836E-313)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0110\n r17 = 10000000000(0x2540be400, double:4.9406564584E-314)\n goto L_0x017e\n L_0x0110:\n r17 = 999999999999(0xe8d4a50fff, double:4.940656458408E-312)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x011f\n r17 = 100000000000(0x174876e800, double:4.9406564584E-313)\n goto L_0x017e\n L_0x011f:\n r17 = 9999999999999(0x9184e729fff, double:4.940656458412E-311)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x012e\n r17 = 1000000000000(0xe8d4a51000, double:4.94065645841E-312)\n goto L_0x017e\n L_0x012e:\n r17 = 99999999999999(0x5af3107a3fff, double:4.9406564584124E-310)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x013d\n r17 = 10000000000000(0x9184e72a000, double:4.9406564584125E-311)\n goto L_0x017e\n L_0x013d:\n r17 = 999999999999999(0x38d7ea4c67fff, double:4.94065645841246E-309)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x014c\n r17 = 100000000000000(0x5af3107a4000, double:4.94065645841247E-310)\n goto L_0x017e\n L_0x014c:\n r17 = 9999999999999999(0x2386f26fc0ffff, double:5.431165199810527E-308)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x015b\n r17 = 1000000000000000(0x38d7ea4c68000, double:4.940656458412465E-309)\n goto L_0x017e\n L_0x015b:\n r17 = 99999999999999999(0x16345785d89ffff, double:5.620395787888204E-302)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x016a\n r17 = 10000000000000000(0x2386f26fc10000, double:5.431165199810528E-308)\n goto L_0x017e\n L_0x016a:\n r17 = 999999999999999999(0xde0b6b3a763ffff, double:7.832953389245684E-242)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0179\n r17 = 100000000000000000(0x16345785d8a0000, double:5.620395787888205E-302)\n goto L_0x017e\n L_0x0179:\n r17 = 1000000000000000000(0xde0b6b3a7640000, double:7.832953389245686E-242)\n L_0x017e:\n long r1 = r15 / r17\n int r3 = (int) r1\n switch(r3) {\n case 0: goto L_0x01b6;\n case 1: goto L_0x01af;\n case 2: goto L_0x01aa;\n case 3: goto L_0x01a5;\n case 4: goto L_0x019e;\n case 5: goto L_0x0199;\n case 6: goto L_0x0194;\n case 7: goto L_0x018f;\n case 8: goto L_0x018a;\n case 9: goto L_0x0185;\n default: goto L_0x0184;\n }\n L_0x0184:\n goto L_0x01bb\n L_0x0185:\n int r3 = r14 + 1\n r0[r14] = r5\n goto L_0x01ba\n L_0x018a:\n int r3 = r14 + 1\n r0[r14] = r8\n goto L_0x01ba\n L_0x018f:\n int r3 = r14 + 1\n r0[r14] = r9\n goto L_0x01ba\n L_0x0194:\n int r3 = r14 + 1\n r0[r14] = r4\n goto L_0x01ba\n L_0x0199:\n int r3 = r14 + 1\n r0[r14] = r7\n goto L_0x01ba\n L_0x019e:\n int r3 = r14 + 1\n r6 = 52\n r0[r14] = r6\n goto L_0x01ba\n L_0x01a5:\n int r3 = r14 + 1\n r0[r14] = r10\n goto L_0x01ba\n L_0x01aa:\n int r3 = r14 + 1\n r0[r14] = r11\n goto L_0x01ba\n L_0x01af:\n int r3 = r14 + 1\n r6 = 49\n r0[r14] = r6\n goto L_0x01ba\n L_0x01b6:\n int r3 = r14 + 1\n r0[r14] = r13\n L_0x01ba:\n r14 = r3\n L_0x01bb:\n int r3 = (r17 > r21 ? 1 : (r17 == r21 ? 0 : -1))\n if (r3 != 0) goto L_0x01c0\n goto L_0x01d8\n L_0x01c0:\n java.lang.Long.signum(r17)\n long r1 = r1 * r17\n long r15 = r15 - r1\n r1 = 0\n int r3 = (r15 > r1 ? 1 : (r15 == r1 ? 0 : -1))\n if (r3 != 0) goto L_0x01d9\n L_0x01cc:\n int r1 = (r17 > r21 ? 1 : (r17 == r21 ? 0 : -1))\n if (r1 <= 0) goto L_0x01d8\n int r1 = r14 + 1\n r0[r14] = r13\n long r17 = r17 / r19\n r14 = r1\n goto L_0x01cc\n L_0x01d8:\n return r14\n L_0x01d9:\n long r17 = r17 / r19\n goto L_0x017e\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.unboundid.util.ByteStringBuffer.getBytes(long):int\");\n }", "public static void main(String[] args) throws IOException {\n\t\tScanner sc = new Scanner(System.in);\n//\t\tint T = stoi(br.readLine());\n\t\tint T = sc.nextInt();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor(int Tcase=1; Tcase <= T; Tcase++){\n\t\t\tint ans=0;\n\t\t\tsb.append(\"#\").append(Tcase).append(\" \");\n\t\t\t//오름차순 //내림차순\n\t\t\tint N = sc.nextInt();\n\t\t\tint[] dataSet = new int[N];\n\t\t\tfor (int count = 0; count < N; count++) {\n\t\t\t\tdataSet[count] = sc.nextInt();\n\t\t\t}\n\t\t\t\n\t\t\t//시작상태 0 //오름차순 1// 내림차순 2\n\t\t\tint swit = 0;\n\t\t\tint leftIdx = 0;\n\t\t\tint rightIdx = 0;\n\t\t\tint midIdx = 0;\n\t\t\tint preData = dataSet[0];\n\t\t\tint hi;\n\t\t\tfor (int idx = 1; idx < dataSet.length; idx++) {\n\t\t\t\thi = dataSet[idx];\n\t\t\t\tif(preData < hi) { //오름차순 1\n\t\t\t\t\tif(swit == 2) {\n\t\t\t\t\t\trightIdx = idx-1;\n\t\t\t\t\t\tans += (midIdx-leftIdx)*(rightIdx-midIdx);\n\t\t\t\t\t\tleftIdx = idx-1;\n\t\t\t\t\t}\n\t\t\t\t\tswit = 1;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//같은경우 고려 안함\n\t\t\t\telse {//내림차순 2\n\t\t\t\t\tif(swit == 1) midIdx = idx-1;\n\t\t\t\t\t\n\t\t\t\t\tswit = 2;\n\t\t\t\t\tif(idx == dataSet.length-1){\n\t\t\t\t\t\trightIdx = idx;\n\t\t\t\t\t\tans += (midIdx-leftIdx)*(rightIdx-midIdx);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpreData = hi;\n\t\t\t}\n\t\t\t\n\t\t\tsb.append(ans).append(\"\\n\");\n\t\t}\n\t\tSystem.out.print(sb);\n\t\t\n\t}", "public final void mo4369a(long j) {\n byte[] bArr;\n if (!zzut.f17550c || mo4375b() < 10) {\n while ((j & -128) != 0) {\n bArr = this.f20653b;\n int i = this.f20656e;\n this.f20656e = i + 1;\n bArr[i] = (byte) ((((int) j) & 127) | 128);\n j >>>= 7;\n }\n try {\n bArr = this.f20653b;\n int i2 = this.f20656e;\n this.f20656e = i2 + 1;\n bArr[i2] = (byte) ((int) j);\n return;\n } catch (long j2) {\n throw new zzc(String.format(\"Pos: %d, limit: %d, len: %d\", new Object[]{Integer.valueOf(this.f20656e), Integer.valueOf(this.f20655d), Integer.valueOf(1)}), j2);\n }\n }\n while ((j2 & -128) != 0) {\n bArr = this.f20653b;\n i = this.f20656e;\n this.f20656e = i + 1;\n dp.m11753a(bArr, (long) i, (byte) ((((int) j2) & 127) | 128));\n j2 >>>= 7;\n }\n bArr = this.f20653b;\n i2 = this.f20656e;\n this.f20656e = i2 + 1;\n dp.m11753a(bArr, (long) i2, (byte) ((int) j2));\n }", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t//사람의 수 -> n\n\t\tint n = sc.nextInt();\n\t\t//놀이기구의 수 -> m\n\t\tint m = sc.nextInt();\n\t\t//play에 개수를 넣는다.\n\t/*\tdouble[] play =new double[m];*/\n\t\tdouble[] play = new double[10001];\n\t\t//운행시간\n\t\tint time;\n\t\tdouble lo=0, hi=2e9*31, mid, sum;\n\t\tfor(int i=1; i<m; i++) {\n\t\t\tplay[i]=i;\n\t\t}\n\t\t//놀이기구보다 사람 수가 적으면 n을 출력한다. 마지막으로 탄 아이의 놀이기구 번호는 자기의 번호이다.\n\t\tif(n<=m) {\n\t\t\tSystem.out.println(n);\n\t\t}\n\t\t\n\n\t\twhile(lo+1!=hi) {\n\t\t\tmid =(lo+hi)/2;\n\t\t\t\n\t\t\tsum=m;\n\t\t\tfor(int i=0; i<m;i++) {\n\t\t\t\tsum +=mid/play[i];\n\t\t\t}\n\t\t\tif(sum>=n) hi =mid;\n\t\t\telse lo= mid;\n\t\t}\n\t\t\n\t\tsum= m;\n\t\tfor(int i=0; i<m; i++)\n\t\t\tsum +=lo/play[i];\n\t\t\n\t\tif(sum>=n) {\n\t\t\tlo--;\n\t\t\tsum=m;\n\t\t\tfor(int i=0; i<m; i++)\n\t\t\t\tsum+=lo/play[i];\n\t\t}\n\t\t\n\t\tlo++;\n\t\t\n\t\tif(sum==n) {\n\t\t\tSystem.out.println(m);\n\t\t}\n\t\tif(lo==0) {\n\t\t\tSystem.out.println(n);\n\t\t}\n\t\tfor(int i=0; i<m; i++) {\n\t\t\tif(lo%play[i]==0) {\n\t\t\t\tsum++;\n\t\t\t\tif(sum==n) {\n\t\t\t\t\tSystem.out.println(i+1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.5734304", "0.57030535", "0.556181", "0.55374557", "0.54831845", "0.54625756", "0.5447683", "0.5428776", "0.54002357", "0.53924966", "0.538841", "0.53184354", "0.5270276", "0.52485526", "0.5226749", "0.5224761", "0.5223501", "0.52223444", "0.52103037", "0.5203462", "0.5146894", "0.51460314", "0.5140762", "0.5132226", "0.51196873", "0.5118502", "0.5115962", "0.5115725", "0.51078725", "0.51048934", "0.50881696", "0.50816256", "0.5078037", "0.50695294", "0.5050418", "0.503523", "0.5027978", "0.5018751", "0.50153196", "0.500677", "0.5000299", "0.49991757", "0.49986315", "0.49980003", "0.49978283", "0.49891382", "0.4970092", "0.49676168", "0.49647123", "0.49634174", "0.4960312", "0.49476326", "0.4944088", "0.4922474", "0.49180284", "0.49162942", "0.49157032", "0.49023533", "0.4901723", "0.48991755", "0.48987517", "0.48945647", "0.48895848", "0.48872915", "0.48850578", "0.48814657", "0.4880947", "0.4874741", "0.48742333", "0.48732278", "0.48713374", "0.48681003", "0.4864071", "0.48604813", "0.4859593", "0.48595202", "0.48569727", "0.4856969", "0.4856617", "0.48544237", "0.48539424", "0.48536056", "0.48524615", "0.48490345", "0.48472244", "0.48461923", "0.48437715", "0.48430982", "0.48385406", "0.48383868", "0.48357433", "0.48315683", "0.4830839", "0.4823848", "0.48234805", "0.48148397", "0.48133743", "0.48101982", "0.48091096", "0.4806786", "0.48035702" ]
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.view_issues, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
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(); //noinspection SimplifiableIfStatement switch (id) { case R.id.action_edit_comic: addComic(); return true; case R.id.add_range: new DialogCreator(ViewIssues.this).createRangeDialog(strSeries, strPublisher); return true; case R.id.action_remove_series: new DialogCreator(ViewIssues.this).createDeleteSeriesDialog(strSeries, this); 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 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 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 int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.7904536", "0.78052336", "0.7766536", "0.7727363", "0.76318616", "0.7621916", "0.7584545", "0.7530609", "0.74878335", "0.74571276", "0.74571276", "0.7438656", "0.7422694", "0.7403604", "0.73918706", "0.7387049", "0.7379379", "0.73706305", "0.7362634", "0.7356091", "0.7345742", "0.7341655", "0.7330208", "0.73284286", "0.7325726", "0.7319205", "0.731691", "0.73137385", "0.7304247", "0.7304247", "0.73017776", "0.7298307", "0.72933966", "0.7286999", "0.7283511", "0.72811604", "0.72787315", "0.7259994", "0.7259994", "0.7259994", "0.72595567", "0.72595537", "0.72501904", "0.7224887", "0.7219672", "0.7217532", "0.72043973", "0.72010916", "0.7199519", "0.71928704", "0.71855384", "0.7177209", "0.71689284", "0.7167426", "0.715412", "0.71537405", "0.7135554", "0.7134872", "0.7134872", "0.7129713", "0.7129041", "0.71240187", "0.7123551", "0.7123167", "0.71221936", "0.71173894", "0.71173894", "0.71173894", "0.71173894", "0.71170884", "0.7116871", "0.7116271", "0.7114722", "0.7112311", "0.7109584", "0.7108896", "0.7105745", "0.70993924", "0.70979136", "0.7095834", "0.70936936", "0.70936936", "0.70863414", "0.7083095", "0.7081166", "0.70801973", "0.7073687", "0.7068324", "0.7061727", "0.7060408", "0.7060199", "0.7051346", "0.70376796", "0.70376796", "0.7035851", "0.70354784", "0.70354784", "0.7032029", "0.70307976", "0.70294225", "0.70193213" ]
0.0
-1
Handle navigation view item clicks here.
@SuppressWarnings("StatementWithEmptyBody") @Override public boolean onNavigationItemSelected(MenuItem item) { int id = item.getItemId(); HelperFunctions.activityMenu(this, ViewIssues.this, id); DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); drawer.closeDrawer(GravityCompat.START); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }", "void onDialogNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tracks, getAdapterPosition());\n }", "@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }", "@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }", "@Override\n public void onClick(View view) {\n listener.menuButtonClicked(view.getId());\n }", "@Override\r\n\tpublic boolean onNavigationItemSelected(int itemPosition, long itemId) {\n\t\tLog.d(\"SomeTag\", \"Get click event at position: \" + itemPosition);\r\n\t\tswitch (itemPosition) {\r\n\t\tcase 1:\r\n\t\t\tIntent i = new Intent();\r\n\t\t\ti.setClass(getApplicationContext(), MainActivity.class);\r\n\t\t\tstartActivity(i);\r\n\t\t\t//return true;\r\n\t\t\tbreak;\r\n\t\tcase 2 :\r\n\t\t\tIntent intent = new Intent(this,WhiteListActivity.class);\r\n\t\t\tstartActivity(intent);\r\n\t\t\t//return true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String name = navDrawerItems.get(position).getListItemName();\n // call a helper method to perform a corresponding action\n performActionOnNavDrawerItem(name);\n }", "@Override\n\tpublic void rightNavClick() {\n\t\t\n\t}", "@Override\n public void OnItemClick(int position) {\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (itemClicked != null)\n\t\t\t\t\titemClicked.OnItemClicked((BusinessType)item.getTag(), item);\n\t\t\t}", "@Override\n public void onClick(View view) {\n clickListener.onItemClicked(getBindingAdapterPosition());\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\thandleClick(position);\n\t\t\t}", "@Override\n public void onItemClicked(int itemPosition, Object dataObject) {\n }", "@Override\n public void onItemClick(int pos) {\n }", "@Override\n public void onClick(View v) {\n if (listener != null)\n listener.onItemClick(itemView, getPosition());\n }", "private void handleNavClick(View view) {\n final String label = ((TextView) view).getText().toString();\n if (\"Logout\".equals(label)) {\n logout();\n }\n if (\"Profile\".equals(label)) {\n final Intent intent = new Intent(this, ViewProfileActivity.class);\n startActivity(intent);\n }\n if (\"Search\".equals(label)){\n final Intent intent = new Intent(this, SearchActivity.class);\n startActivity(intent);\n }\n if (\"Home\".equals(label)) {\n final Intent intent = new Intent(this, HomeActivity.class);\n startActivity(intent);\n }\n }", "void onMenuItemClicked();", "@Override\n public void onClick(View view) {\n\n switch (view.getId()) {\n case R.id.tvSomeText:\n listener.sendDataToActivity(\"MainActivity: TextView clicked\");\n break;\n\n case -1:\n listener.sendDataToActivity(\"MainActivity: ItemView clicked\");\n break;\n }\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\tMainActivity sct = (MainActivity) act;\n\t\t\t\t\t\t\t\t\tsct.onItemClick(posit2, 11);\n\t\t\t\t\t\t\t\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t\t\t}", "@Override\n public void onClick(View v) {\n listener.onItemClick(v, position);\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\n\t}", "@Override\n public void onItemClick(View view, String data) {\n }", "abstract public void onSingleItemClick(View view);", "@Override\n public void onClick(View v) {\n this.itemClickListener.onItemClick(v, getLayoutPosition());\n }", "@Override\n public void itemClick(int pos) {\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {\n TextView textView = (TextView)view;\n switch(textView.getText().toString()){\n case \"NavBar\":\n Intent nav = new Intent(this, NavDrawerActivity.class);\n startActivity(nav);\n break;\n }\n\n //Toast.makeText(MainActivity.this,\"Go to \" + textView.getText().toString() + \" page.\",Toast.LENGTH_LONG).show();\n }", "@Override\r\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\r\n\t}", "@Override\n\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\tlong arg3) {\n\t\t\t\n\t\t}", "@Override\n public void onItemClick(Nson parent, View view, int position) {\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\t\t\t\t\tlong arg3) {\n\t\t\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void onClick(View view) {\n int position = getAdapterPosition();\n\n // Check if listener!=null bcz it is not guarantee that we'll call setOnItemClickListener\n // RecyclerView.NO_POSITION - Constant for -1, so that we don't click item at Invalid position (safety measure)\n if (listener != null && position != RecyclerView.NO_POSITION) {\n //listener.onItemClick(notes.get(position)); - used in RecyclerView.Adapter\n listener.onItemClick(getItem(position)); // getting data from superclass\n }\n }", "@Override\n public void onClick(View v) {\n itemClickListener.itemClicked(movieId, v);\n }", "@Override\n\t\tpublic void onClick(View view) {\n\t\t\tif (iOnItemClickListener != null) {\n\t\t\t\tiOnItemClickListener.onItemClick(view, null, getAdapterPosition());\n\t\t\t}\n\t\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}", "public void onItemClick(View view, int position);", "@Override\n public void onClick(View v) {\n if (mListener != null){\n mListener.onItemClick(itemView, getLayoutPosition());\n }\n }", "@Override\n public void onItemClick(int position) {\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\titemClickListener.Callback(itemInfo);\n\t\n\t\t\t}", "@Override\n public void onItemClick(View view, int position) {\n }", "@Override\n public void onItemClick(View view, int position) {\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t}", "@Override\n public void onItemOfListClicked(Object o) {\n UserProfileFragmentDirections.ActionUserProfileFragmentToEventProfileFragment action = UserProfileFragmentDirections.actionUserProfileFragmentToEventProfileFragment((MyEvent) o);\n navController.navigate(action);\n }", "@Override\n public void onClick(View view) {\n if(mFrom.equals(NetConstants.BOOKMARK_IN_TAB)) {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), NetConstants.G_BOOKMARK_DEFAULT,\n bean.getArticleUrl(), position, bean.getArticleId());\n }\n else {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), mFrom,\n bean.getArticleUrl(), position, bean.getArticleId());\n }\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_ds_note) {\n // Handle the camera action\n } else if (id == R.id.nav_ds_todo) {\n\n } else if (id == R.id.nav_ql_the) {\n\n } else if (id == R.id.nav_tuychinh) {\n Intent intent = new Intent(this, CustomActivity.class);\n startActivity(intent);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\t\t\t\t\t\tint position, long id) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}", "@Override\n public void onItemClick(View view, ListItem obj, int position) {\n }", "@Override\n\tpublic void onItemClick(Object o, int position) {\n\n\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}", "void onLinkClicked(@Nullable ContentId itemId);", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:\n Intent homeIntent = new Intent(this, MainActivity.class);\n startActivity(homeIntent);\n break;\n case R.id.send_email:\n Intent mailIntent = new Intent(this, ContactActivity.class);\n startActivity(mailIntent);\n break;\n case R.id.send_failure_ticket:\n Intent ticketIntent = new Intent(this, TicketActivity.class);\n startActivity(ticketIntent);\n break;\n case R.id.position:\n Intent positionIntent = new Intent(this, LocationActivity.class);\n startActivity(positionIntent);\n break;\n case R.id.author:\n UrlRedirect urlRed = new UrlRedirect(this.getApplicationContext(),getString(R.string.linkedinDeveloper));\n urlRed.redirect();\n break;\n default:\n break;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout_main_activity);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@SuppressWarnings(\"ConstantConditions\")\n public void onItemClicked(@NonNull Item item) {\n getView().openDetail(item);\n }", "void onItemClick(View view, int position);", "@Override\n public void onClick(View v) {\n startNavigation();\n }", "void onItemClick(int position);", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_logs) {\n startActivity(new Intent(this, LogView.class));\n } else if (id == R.id.nav_signOut) {\n signOut();\n }\n\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onClick(View v) {\n if(listener!=null & getLayoutPosition()!=0)\n listener.onItemClick(itemView, getLayoutPosition());\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\t\tpresenter.onItemClicked(position);\n\t}", "@Override\n public void onClick(View view) {\n listener.onMenuButtonSelected(view.getId());\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tHashMap<String, Object> item = (HashMap<String, Object>) arg0\n\t\t\t\t\t\t.getAdapter().getItem(arg2);\n\n\t\t\t\tIntent intent = new Intent(ViewActivity.this,\n\t\t\t\t\t\tContentActivity.class);\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putString(\"_id\", item.get(\"_id\").toString());\n\t\t\t\tbundle.putString(\"_CityEventID\", item.get(\"_CityEventID\")\n\t\t\t\t\t\t.toString());\n\t\t\t\tbundle.putString(\"_type\", String.valueOf(_type));\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onClick(View view) {\n Navigation.findNavController(view).navigate(R.id.addEventFragment);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Log.w(TAG , \"POSITION : \" + position);\n\n itemClick(position);\n }", "void clickItem(int uid);", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_categories) {\n Intent intent = new Intent(getApplicationContext(), CategoryActivity.class);\n startActivity(intent, compat.toBundle());\n newsHere.setSourceActivity(\"search\");\n newsHere.setTargetActivity(\"category\");\n\n } else if (id == R.id.nav_top_headlines) {\n newsHere.setSourceActivity(\"search\");\n newsHere.setTargetActivity(\"home\");\n Intent intent = new Intent(getApplicationContext(), HomeActivity.class);\n startActivity(intent, compat.toBundle());\n } else if (id == R.id.nav_search) {\n // Do nothing\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onItemClick(View view, int position) {\n\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_orders) {\n\n Intent orderStatusIntent = new Intent(Home.this , OrderStatus.class);\n startActivity(orderStatusIntent);\n\n } else if (id == R.id.nav_banner) {\n\n Intent bannerIntent = new Intent(Home.this , BannerActivity.class);\n startActivity(bannerIntent);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n }", "public void onItemClick(View view, int position) {\n\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}", "@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\r\n\t\t\t\t\tlong arg3) {\n\r\n\t\t\t}", "void onClick(View item, View widget, int position, int which);", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n\n\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n Intent intent;\n switch(item.getItemId()){\n case R.id.nav_home:\n finish();\n intent = new Intent(this, NavigationActivity.class);\n startActivity(intent);\n return true;\n case R.id.nav_calendar:\n finish();\n intent = new Intent(this, EventHome.class);\n startActivity(intent);\n return true;\n case R.id.nav_discussion:\n return true;\n case R.id.nav_settings:\n intent = new Intent(this, SettingsActivity.class);\n startActivity(intent);\n return true;\n case R.id.nav_app_blocker:\n intent = new Intent(this, AppBlockingActivity.class);\n startActivity(intent);\n return true;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case R.id.nav_home:\n break;\n\n case R.id.nav_favourites:\n\n if (User.getInstance().getUser() == null) {\n Intent intent = new Intent(getApplicationContext(), LoginActivity.class);\n startActivity(intent);\n }\n\n Intent intent = new Intent(getApplicationContext(), PlaceItemListActivity.class);\n startActivity(intent);\n\n break;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tonRgtRgtMenuClick(v);\n\t\t\t}", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_camera) {\n // Handle the camera action\n } else if (id == R.id.nav_gallery) {\n Toast.makeText(this, \"gallery is clicked!\", Toast.LENGTH_LONG).show();\n\n } else if (id == R.id.nav_slideshow) {\n\n } else if (id == R.id.nav_manage) {\n\n } else if (id == R.id.nav_share) {\n\n } else if (id == R.id.nav_send) {\n\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "public void menuClicked(MenuItem menuItemSelected);", "@Override\n public void onItemClick(int position) {\n }", "@Override\n public void onItemClick(int position) {\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_my_account) {\n startActivity(new Intent(this, MyAccountActivity.class));\n } else if (id == R.id.nav_message_inbox) {\n startActivity(new Intent(this, MessageInboxActivity.class));\n } else if (id == R.id.nav_view_offers) {\n //Do Nothing\n } else if (id == R.id.nav_create_listing) {\n startActivity(new Intent(this, CreateListingActivity.class));\n } else if (id == R.id.nav_view_listings) {\n startActivity(new Intent(this, ViewListingsActivity.class));\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\r\n\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\t\tint position, long id) {\n\t\t\t\t}" ]
[ "0.7882029", "0.7235578", "0.6987005", "0.69458413", "0.6917864", "0.6917864", "0.6883472", "0.6875181", "0.68681556", "0.6766498", "0.67418456", "0.67207", "0.6716157", "0.6713947", "0.6698189", "0.66980195", "0.66793925", "0.66624063", "0.66595167", "0.6646381", "0.6641224", "0.66243863", "0.6624042", "0.66207093", "0.6602551", "0.6602231", "0.6599443", "0.65987265", "0.65935796", "0.6585869", "0.658491", "0.65811735", "0.65765643", "0.65751576", "0.65694076", "0.6561757", "0.65582377", "0.65581614", "0.6552827", "0.6552827", "0.6549224", "0.65389794", "0.65345114", "0.65337104", "0.652419", "0.652419", "0.6522521", "0.652146", "0.6521068", "0.6519354", "0.65165275", "0.65159816", "0.65028816", "0.6498054", "0.6498054", "0.64969087", "0.64937705", "0.6488544", "0.64867324", "0.64866185", "0.64865905", "0.6484047", "0.6481108", "0.6474686", "0.64628965", "0.64551884", "0.6446893", "0.64436555", "0.64436555", "0.64436555", "0.64436555", "0.64436555", "0.64386237", "0.643595", "0.64356565", "0.64329195", "0.6432562", "0.6429554", "0.64255124", "0.64255124", "0.64121485", "0.64102405", "0.64095175", "0.64095175", "0.64094734", "0.640727", "0.64060104", "0.640229", "0.6397359", "0.6392996", "0.63921124", "0.63899696", "0.63885015", "0.63885015", "0.63873845", "0.6368818", "0.6368818", "0.63643163", "0.63643163", "0.63643163", "0.6358884" ]
0.0
-1
Map data = jwtTokenProvider.getData(token); Integer userNo = (Integer) data.getOrDefault("userNo", 1);
@GetMapping(value = "/") public ResultDTO getOneCall(@RequestHeader(value = "X-Auth-Token", required = false) String token, @RequestParam(defaultValue = "36") Double lat, @RequestParam(defaultValue = "128") Double lon) { Map result = weatherService.getOneCall(lat, lon); return new ResultDTO(1, "", result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getUserIdFromToken(String token) {\n\t\t//Extract claims\n\t\tClaims claims= Jwts.parser().setSigningKey(SecurityConstants.SECRET).parseClaimsJws(token).getBody();\n\t\t//return ID\n\t\treturn Long.parseLong((String)claims.get(\"id\"));\t\t\n\t}", "@Override\r\n public UserInfo getByToken(String token) {\n return null;\r\n }", "public long getUserIdFromJWT(String jwtToken) {\n LOG.info(\"Checking JWT token\");\n Claims claims;\n try {\n claims = appUtils.decodeJWT(jwtToken);\n } catch (Exception e) {\n LOG.info(\"Invalid JWT token: {}\", e.getMessage());\n throw new ServiceException(\"Invalid JWT token\", e);\n }\n\n try {\n return Long.parseLong(claims.getId());\n } catch (NumberFormatException e) {\n LOG.error(\"JWT token contains id with invalid format for long values: {}\", e.getMessage());\n throw new ServiceException(\"Invalid JWT token\", e);\n }\n }", "public Map<String, Object> get(String token) {\n\t\tString jwt = token;\n\t\tJws<Claims> claims = null;\n\t\ttry {\n\t\t\tclaims = Jwts.parser()\n\t\t\t\t\t\t .setSigningKey(SECRET_KEY.getBytes(\"UTF-8\"))\n\t\t\t\t\t\t .parseClaimsJws(jwt);\n\t\t} catch (Exception e) {\n e.printStackTrace();\n\t\t\t/*개발환경\n\t\t\tMap<String,Object> testMap = new HashMap<>();\n\t\t\ttestMap.put(\"memberId\", 2);\n\t\t\treturn testMap;*/\n\t\t}\n\t\tMap<String, Object> value = (Map<String, Object>)claims.getBody();\n\t\treturn value;\n\t}", "User getUserByToken(HttpServletResponse response, String token) throws Exception;", "public static UserIdentity parseToken(String token) {\n try {\n Claims body = Jwts.parser()\n .setSigningKey(JwtUtils.jwtSecret)\n .parseClaimsJws(token)\n .getBody();\n \n if( log.isDebugEnabled() ) \n {\n \tlog.debug( body.toString() );\n }\n \n System.out.println( body.toString() );\n \n UserIdentity domainUser = new UserIdentity( (String)body.get(\"idmToken\"), body.getSubject() );\n return domainUser;\n\n } catch ( JwtException | ClassCastException e ) { \t\n \tlog.error( e.getMessage() );\n throw e;\n }\n }", "public String getUserId() {\n if (this.isTokenValide()) {\n JWT jwt = new JWT(getToken());\n Claim claim = jwt.getClaim(\"user_id\");\n return claim.asString();\n } else {\n return \"\";\n }\n }", "@Override\r\n\tpublic Map<String, Claim> verifyJWT(String token) {\n\t\treturn null;\r\n\t}", "public int getUserId(User user) throws Exception;", "Pokemon.RequestEnvelop.AuthInfo.JWT getToken();", "UserInfo getUserById(Integer user_id);", "int getUnapprovedUserNumber();", "@Test\n public void testJwtIsUsedInTokenKeyEndPoint() throws Exception {\n ResultActions result = this.mockMvc\n .perform(MockMvcRequestBuilders.get(\"/oauth/token_key\")\n .principal(new UsernamePasswordAuthenticationToken(testClientId, \"\",\n Arrays.asList(new SimpleGrantedAuthority(\"ROLE_USER\")))))\n // we expect a 200 success\n .andExpect(MockMvcResultMatchers.status().is(200));\n Map<?, ?> tokenKey = new ObjectMapper().readValue(result.andReturn().getResponse().getContentAsString(),\n Map.class);\n System.out.println(\"Got response: \" + result.andReturn().getResponse().getContentAsString());\n Assert.assertEquals(tokenKey.get(\"value\"), TestJWTConfig.SignKey);\n }", "@Override\n public AppUserTO getByResetPasswordToken(String token){\n AppUser user=appUserRepository.findAppUsersByTpToken(token);\n if(user.getExpiryDate().toInstant().toEpochMilli()< Instant.now().toEpochMilli())\n throw new ApplicationException(\"Token has expired or invalid,kindly try again\");\n else\n return mapper.convert(user,AppUserTO.class);\n }", "@Override\n\tpublic ResponseData getUserByToken(String token) {\n\t\tString json = jedisClient.get(REDIS_SESSION_KEY+\":\"+token);\n\t\t//没有取到用户信息\n\t\tif (StringUtil.isEmpty(json)) {\n\t\t\treturn new ResponseData(false,\"用户已过期\");\n\t\t}\n\t\t//把json数据转换成对象\n\t\tObject user = JacksonUtil.json2Bean(json, Object.class);\n\t\t//更新session过期时间\n\t\tjedisClient.expire(REDIS_SESSION_KEY+\":\"+token, REDIS_SESSION_EXPIRE);\n\t\treturn new ResponseData(user);\n\t}", "private Optional<Identificacion> validarToken(final String token) {\n\t\tif (token != null && !token.isEmpty()) {\n\t\t\t// TODO Obtener el ID del token de keycloak\n\t\t\treturn Optional.of(new Identificacion(0));\n\t\t} else {\n\t\t\treturn Optional.empty();\n\t\t}\n\t}", "public JwtUserDto parseToken(String token) {\n JwtUserDto u = null;\n\n if (token == null) {\n return new JwtUserDto();\n }\n try {\n Claims body = Jwts.parser()\n .setSigningKey(secret)\n .parseClaimsJws(token)\n .getBody();\n\n u = new JwtUserDto();\n u.setUsername(body.getSubject());\n u.setId(Long.parseLong((String) body.get(\"userId\")));\n u.setRole((String) body.get(\"role\"));\n Map<String, Integer> rMap = (Map<String, Integer>) body.get(\"refreshToken\");\n Map<String, Integer> eMap = (Map<String, Integer>) body.get(\"expireToken\");\n\n LocalDateTime rLocalDateTime = getLocalDateTimeFromLinkedHashMap(rMap);\n LocalDateTime eLocalDateTime = getLocalDateTimeFromLinkedHashMap(eMap);\n u.setRefreshToken(rLocalDateTime);\n u.setExpireToken(eLocalDateTime);\n } catch (JwtException e) {\n // Simply print the exception and null will be returned for the userDto\n LOGGER.error(e.getMessage());\n }\n return u;\n }", "User getUserDetails(int userId);", "public Map<String,Object> getCustomClaims();", "public static Task<String> getUserToken(String userId) {\n return FirebaseFirestore.getInstance()\n .collection(Const.USERS_COLLECTION)\n .document(userId)\n .get()\n .continueWith(new Continuation<DocumentSnapshot, String>() {\n @Override\n public String then(@NonNull Task<DocumentSnapshot> task) {\n DocumentSnapshot result = task.getResult();\n if (result != null && result.contains(Const.USER_TOKEN_KEY)) {\n return (String) result.get(Const.USER_TOKEN_KEY);\n }\n return \"\";\n }\n });\n }", "public static String getTeacherToken() {\n\n RestAssured.baseURI = \"https://cybertek-reservation-api-qa.herokuapp.com\";\n\n Response response = given().log().all().\n param(\"email\", \"[email protected]\").\n param(\"password\", \"maxpayne\").\n get(\"/sign\");\n response.then().log().all().\n assertThat().statusCode(200);\n\n return response.jsonPath().get(\"accessToken\");\n\n }", "private boolean validateToken(String token, String user) {\n System.out.println(\"Userid is: \" + user);\n System.out.println(\"The token is \" + token);\n return user.equals(Jwts.parser().setSigningKey(SIGNING_KEY).parseClaimsJws(token).getBody().getSubject());\n\n }", "String getUsernameFromToken(String token);", "@Test\n public void testValidToken() {\n try {\n int coachId = authBO.getUserIdAndValidateToken(\"thisisaworkingtoken\");\n Assert.assertTrue(coachId == 1);\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }", "public String authByToken (String token){\n if (token.equals(\"ripcpsrlro3mfdjsaieoppsaa\")){\n return \"admin\";\n }\n else {\n Document query = new Document();\n query.put(\"token\", token);\n MongoCursor<Document> cursor = Security.find(query).iterator();\n if (cursor==null || !cursor.hasNext()) {\n System.out.println(\"here fails ! token used: \"+token);\n return \"none\";\n }\n else {\n Document c = cursor.next();\n String tnp = c.get(\"token\").toString();\n String admin = c.get(\"admin\").toString();\n if (tnp.equals(token)){\n if (admin.equals(\"true\")){\n return \"admin\";\n }\n else return \"user\";\n }\n else return \"none\";\n }\n //return \"none\";\n }\n }", "@Override\n\tpublic User getUserByToken(String token) {\n\t\treturn userMapper.getUserByToken(token);\n\t}", "Map<String, Object> getUserProfile();", "protected abstract T extractClaims(BearerTokenAuthenticationToken bearer);", "SecurityToken loadByTokenValue(String tokenValue);", "String convertToJwt (SsoUserDetails uerDetails);", "public String getJwtFromRequest(HttpServletRequest request) {\n String authHeader = request.getHeader(jwtConfig.getAuthorizationHeader());\n System.out.println(\"auth header is :\" + authHeader);\n System.out.println(\"jwt token is being prepared\");\n if (authHeader != null && authHeader.startsWith(\"Bearer \")) {\n System.out.println(\"jwt token is valid\");\n return authHeader.replace(\"Bearer \", \"\");\n }else{\n System.out.println(\"jwt token is not valid and is null\");\n return null;\n }\n }", "Integer getUserId();", "public long getResponsedByUserId();", "public static Result token(String body) {\n\t\t\r\n\t\tArrayList<String> data = new Gson().fromJson(body, ArrayList.class);\r\n\t\tif(data == null) {\r\n\t\t\treturn new BadRequest(\"No payload data\");\r\n\t\t}\r\n\t\t\r\n\t\tString token = data.get(0);\r\n\t\tif(token == null || token.trim().equals(\"\")) {\r\n\t\t\treturn new BadRequest(\"Invalid payload data\");\r\n\t\t}\r\n\r\n\t\tString uname = data.get(1);\r\n\t\tif(uname == null || uname.trim().equals(\"\")) {\r\n\t\t\treturn new BadRequest(\"Invalid payload data\");\r\n\t\t}\r\n\t\t\r\n\t\tUser loggedUser = User.find(\"byUsername\", uname).first();\r\n\t\tif (loggedUser == null) {\r\n\t\t\treturn new BadRequest(\"Invalid payload data\");\r\n\t\t}\r\n\t\t\r\n\t\tif(!CsrfTokenUtils.checkToken(uname, token)) {\r\n\t\t\treturn new BadRequest(\"Invalid token\");\r\n\t\t}\r\n\r\n\t\tLong msgNum = userMsgNum.get(loggedUser.username);\r\n\t\tif(msgNum == null) {\r\n\t\t\tloggedUser.msgNum = 0L;\r\n\t\t\tuserMsgNum.put(loggedUser.username, loggedUser.msgNum);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tloggedUser.msgNum = Long.parseLong(msgNum.toString());\r\n\t\t}\r\n\r\n\t\tsession.put(\"user\", loggedUser.username);\r\n\t\tsession.put(\"userRole\", loggedUser.role.name);\r\n\t\tsession.put(\"userMsgNum\", loggedUser.msgNum);\r\n\t\t\r\n\t\ttoken = JWTUtils.generateJWT(loggedUser.username);\r\n\t\tString json = \"{\\\"role\\\": \\\"\" + loggedUser.role.name\r\n\t\t\t\t\t\t+ \"\\\", \\\"username\\\": \\\"\" + loggedUser.username\r\n\t\t\t\t\t\t+ \"\\\", \\\"msgNum\\\": \" + loggedUser.msgNum\r\n\t\t\t\t\t\t+ \", \\\"token\\\": \\\"\" + token + \"\\\"}\";\r\n\t\treturn new RenderText(json);\r\n\t}", "private int tokenVal()\n\t{\n\t\t//check that token is keyword or special\n\t\tif( core.containsKey(token))\t\t\t\n\t\t{ \n\t\t\t//return the value\n\t\t\treturn core.get(token); \n\t\t}\n\t\telse\n\t\t{\n\t\t\t try{ //see if token is integer\n\t\t\t\t Integer.parseInt(token);\n\t\t\t return INTEGER;\n\t\t\t }\n\t\t\t catch(NumberFormatException e){\n\t\t\t \t //token must be an identifier\n\t\t\t \t return IDENTIFIER;\t \n\t\t\t }\n\t\t}\t\n\t}", "private JSONObject getUserData(String aToken) {\r\n HttpClient client = new DefaultHttpClient();\r\n HttpGet hGet = new HttpGet(USER_INFO_FB + aToken);\r\n HttpResponse response = null;\r\n JSONObject userData = null;\r\n try {\r\n response = client.execute(hGet);\r\n HttpEntity entity;\r\n entity = response.getEntity();\r\n userData = parseData(EntityUtils.toString(entity, Charset.forName(\"UTF-8\")));\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoginController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return userData;\r\n }", "@GetMapping(value = \"/{userId}\")\n public User getUser(@PathVariable String userId, @RequestHeader Map<String , String> header){\n\n return userServices.getUser(userId);\n }", "@Override\n\tpublic User getUserWithToken(String token) {\n\t\tString email = tokenRepository.getEmail(token);\n\t\tif (email != null){\n\t\t\treturn userDatabase.get(email);\n\t\t}\n\t\treturn null;\n\t}", "UserWithPersistedAuth getUserWithToken();", "private Map<String, Object> generateJWTToken(Customer user) {\n long timestamp = System.currentTimeMillis();\n String token = Jwts.builder().signWith(SignatureAlgorithm.HS256, Constant.API_SECRET_KEY)\n .setIssuedAt(new Date(timestamp))\n .setExpiration(new Date(timestamp + Constant.TOKEN_VALIDITY))\n .claim(\"userId\", user.getId())\n// .claim(\"email\", user.getEmail())\n// .claim(\"password\", user.getPassword())\n .compact();\n Map<String, Object> map = new HashMap();\n map.put(\"token\", token);\n map.put(\"customer\", user);\n return map;\n\t}", "public String getUserByToken(String token) throws SQLException;", "private String getUserId(JSONObject input) throws JSONException {\n String userId;\n\n if(input.has(\"user_id\")) { //$NON-NLS-1$\n userId = input.getString(\"user_id\"); //$NON-NLS-1$\n } else {\n userId = userSessionService.getUser().getUsername();\n }\n\n return userId;\n }", "@PostMapping(\"/token\")\n public ResponseEntity<Object> validateToken(@RequestParam(\"token\") String token) { \t\n \t\tUserLog userlog = authenticationService.authenticateByToken(token); \n \t\tif(userlog == null) {\n \t\t\t// risp.: 401\n \t\t\treturn new ResponseEntity<>(new UserLog(), HttpStatus.NOT_FOUND);\n \t\t}\n \t\treturn new ResponseEntity<>(userlog, HttpStatus.OK); \t\n }", "@GetMapping(\"/getaccesstoken1\")\n public Map<String, Object> getAccessToken1(){\n Map<String, Object> mapResponse=new HashMap<String, Object>();\n String accessToken=transAccessService.getAccessToken();\n mapResponse.put(\"key\", \"200\");\n mapResponse.put(\"status\", \"success\");\n mapResponse.put(\"access_token\", accessToken);\n return mapResponse;\n }", "private String newToken(String token) {\n UserDetails userDetails = new UserDetails();\r\n userDetails.setEmail(jwtUtils.extractEmail(token));\r\n userDetails.setUserType((String) jwtUtils.extractAllClaims(token).get(\"userType\"));\r\n return jwtUtils.generateToken(userDetails);\r\n }", "@Test\r\n\tpublic void TestvalidateTokenWithuserId() {\r\n\t\tlog.info(env.getProperty(\"log.start\"));\r\n\t\tudetails = new User(\"admin\", \"admin\", new ArrayList<>());\r\n\t\tString generateToken = jwtutil.generateToken(udetails);\r\n\t\tBoolean validateToken = jwtutil.validateToken(generateToken, udetails);\r\n\t\tassertEquals(true, validateToken);\r\n\t\tlog.info(env.getProperty(\"log.end\"));\r\n\r\n\t}", "User getUserInformation(Long user_id);", "@Override\n\t\tpublic User getUserInNo(int userNo) throws Exception {\n\t\t\treturn sqlSession.selectOne(\"UserMapper.getUserInNo\", userNo);\n\t\t}", "@Override\n\tpublic Map<String, Object> getGradeMyStu(String token) {\n\t\treturn null;\n\t}", "private String getUserId(AuthenticationContext context) throws AuthenticationFailedException {\n String userId = null;\n String username = getUsername(context);\n if (username != null) {\n UserRealm userRealm = getUserRealm(username);\n username = MultitenantUtils.getTenantAwareUsername(String.valueOf(username));\n if (userRealm != null) {\n try {\n Map<String, String> userClaimValues = userRealm.getUserStoreManager()\n .getUserClaimValues(username, new String[]{Token2Constants.USERID_CLAIM}, null);\n userId = userClaimValues.get(Token2Constants.USERID_CLAIM);\n } catch (UserStoreException e) {\n throw new AuthenticationFailedException(\"Cannot find the user claim for userId \" + e.getMessage(),\n e);\n }\n }\n }\n if (StringUtils.isEmpty(userId)) {\n throw new AuthenticationFailedException(\"Token2 UserId is null\");\n }\n return userId;\n }", "Optional<User> get(String userName);", "@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}", "Pokemon.RequestEnvelop.AuthInfo.JWTOrBuilder getTokenOrBuilder();", "AuthenticationTokenInfo authenticationTokenInfo(String headerToken);", "public Token getTokenByEmail(String email)throws Exception;", "public String getUsernameFromToken() {\n\t\tHttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();\n\t\tfinal String requestTokenHeader = request.getHeader(AUTH);\n\t\tString jwtToken = requestTokenHeader.substring(BEARER.length());\n\t\treturn getClaimFromToken(jwtToken, Claims::getSubject);\n\t}", "private User authenticate(JSONObject data) {\r\n UserJpaController uJpa = new UserJpaController(Persistence.createEntityManagerFactory(\"MovBasePU\"));\r\n\r\n long fbId = Long.parseLong((String) data.remove(\"id\"));\r\n User user = uJpa.findByFbId(fbId);\r\n if (user != null) {\r\n return user;\r\n } else {\r\n user = new User(fbId, (String) data.remove(\"name\"), (String) data.remove(\"email\"), new Date(), \"u\");\r\n try {\r\n uJpa.create(user);\r\n } catch (Exception ex) {\r\n Logger.getLogger(LoginController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return user;\r\n }\r\n\r\n }", "@Override\n public Optional<ApiSession> findApiSessionToken(String token) {\n // log.debug(\"findApiSessionToken({})\", token);\n if (null == this.hashOperations) {\n log.warn(\"hash is null\");\n return Optional.empty();\n }\n if (null == token) {\n log.warn(\"token is null\");\n return Optional.empty();\n }\n try {\n return Optional.ofNullable((ApiSession) hashOperations.get(HASH_KEY, token));\n } catch (Exception e) {\n log.warn(\"token is null \", e);\n return Optional.empty();\n }\n }", "@Test(expected = InvalidDataException.class)\n public void nullTokenAtGettingUsername4Token(){\n \tGetUsername4Token service = new GetUsername4Token(null);\n service.execute();\n }", "@Override\n public UserIdentity getUserIdentityByToken(String token) {\n log.debug(\"MockAuthService.getUserIdentityByToken entered. {}\", token);\n\n UserIdentity user = tokenMap.get(token);\n if (user == null) {\n // For backward compatibility, no token == admin privilege.\n user = createUserIdentity();\n user.addRole(AuthRole.ADMIN);\n }\n\n log.debug(\"MockAuthService.getUserIdentityByToken exiting. {}\", user);\n return user;\n }", "private AbstractAuthenticationToken authUserByToken(String token) {\n\t\tif (StringUtils.isBlank(token)) {\n\t\t\tlogger.debug(\"[unauthorized] access token is empty\");\n\t\t\treturn null;\n\t\t}\n\t\tAbstractAuthenticationToken authToken = new AuthenticationToken(token);\n\t\ttry {\n\t\t\treturn authToken;\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Authenticate user by token error: \", e);\n\t\t}\n\t\treturn authToken;\n\t}", "String getPrimaryToken();", "GetToken.Res getGetTokenRes();", "java.lang.String getUserIdOne();", "int getInt(String key);", "public AuthToken loginUser(){\n return null;\n }", "private String readHeader(RoutingContext ctx) {\n String tok = ctx.request().getHeader(XOkapiHeaders.TOKEN);\n if (tok != null && ! tok.isEmpty()) {\n return tok;\n }\n return null;\n }", "private UsernamePasswordAuthenticationToken getAuthtication(HttpServletRequest request){\n // Get token from request header.\n String token = request.getHeader(\"Authorization\");\n if (token != null){\n //Get the username from the jwt token\n String username = JwtUtil.getUsernameByToken(token);\n //Check the existence of the username.\n Optional<User> userTry = userRepository.findByUsername(username);\n Collection<GrantedAuthority> authorities = new ArrayList<>();\n if (userTry.isPresent()){\n User user = userTry.get();\n authorities.add(new SimpleGrantedAuthority(user.getRole().getName()));\n return new UsernamePasswordAuthenticationToken(user,token,authorities);\n }\n }\n return null;\n }", "private Claims getClaimsFromToken(String authToken) {\n Claims claims = null;\n try {\n claims = Jwts.parser()\n .setSigningKey(SECRET)\n .parseClaimsJws(authToken)\n .getBody();\n } catch (Exception e){\n claims = null;\n }\n return claims;\n }", "Object getAuthInfoKey();", "@Test\n public void transnoTest() {\n assertEquals(Integer.valueOf(74875), authResponse.getTransno());\n }", "public Integer saveGetId(UserData userData) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic long getUserId() {\n\t\treturn _dictData.getUserId();\n\t}", "UUID getUserId(String userName) throws UserNotFoundException;", "public User getRegUserFromId(int userId){\n for (int i = 0; i < regUsers.size(); i++){\n if (regUsers.get(i).getUserId() == userId){\n return regUsers.get(i);\n }\n }\n\n return null;\n }", "String createToken(User user);", "@Test\n public void jsonTest(){\n String token = \"eyJEZXZlbG9wZWQgQnkiOiJlLUhlYWx0aCBSZXNlYXJjaCBDZW50ZXIsIElJSVQgQmFuZ2Fsb3JlIiwiSG9zdCI6Ikthcm5hdGFrYSBNZW50YWwgSGVhbHRoIE1hbmFnZW1lbnQgU3lzdGVtIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJwcm9mZXNzaW9uIjoiTUhNU1BzeWNoaWF0cmlzdCIsInN1YiI6Ik1ITVMgU2VjdXJpdHkgVG9rZW4iLCJsYXN0TG9naW5PcmdJZCI6ImU2NDE3NGI0LWI3NzctNGRlYS04NmUyLTNmMGQ1NDgwYTI2MiIsInNlc3Npb25FbmRUaW1lIjoxNTg1MzQxMzYxLCJpc3MiOiJLTUhNUyIsInNlc3Npb25TdGFydFRpbWUiOjE1ODUyOTgxNjEsInNlc3Npb25JZCI6ImZlMmE5NzY2LTQ1MmYtNDdlYy1iMjUwLTI2YzQ5NjNiNjFkZSIsInVzZXJOYW1lIjoidGVzdDAxIiwibGFzdExvZ2luU3RhcnQiOiIxNTg1Mjk0ODg2NTY4Iiwib3JnVVVJRCI6ImU2NDE3NGI0LWI3NzctNGRlYS04NmUyLTNmMGQ1NDgwYTI2MiIsIm5iZiI6MTU4NTI5ODE2MSwib3JnUm9sZSI6Ik1IRUFkbWluIiwic2Vzc2lvblRva2VuIjoiU2Vzc2lvbklkOjE3Mi4zMS4xLjIyNCN0ZXN0MDE6ZTY0MTc0YjQtYjc3Ny00ZGVhLTg2ZTItM2YwZDU0ODBhMjYyOk1ITVM6TUhFQWRtaW4jMTU4NTI5ODE2MDczMyMtNzIzOTM2MzUzIzEwMCIsInBlcnNvbklkIjoiNjI3NzMwODEtZGE4OS00NjYzLThiNmYtOWMwMGU5NDMyOTYwIiwidXNlclVVSUQiOiI1YzI0ZjU5Ni0wZjM0LTQxYTYtYWFmNS1lMzAwMmVhMmM0Y2UiLCJleHAiOjE1ODUzMzQxNjEsImlhdCI6MTU4NTI5ODE2MX0.TFWVdCZYuUysbZ2gmQc5H2Eig4jwXcuiC_FTbDTUNis\";\n try {\n DecodedJWT jwt = JWT.decode(token);\n System.out.println(\"jwt token \"+jwt.getPayload());\n\n } catch (JWTDecodeException exception){\n //Invalid token\n exception.printStackTrace();\n }\n\n\n /* try {\n mhp.getJson(\"\");\n }catch (Exception e){\n e.printStackTrace();\n }*/\n }", "public JWT getIDToken() {\n return idToken;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "String extractUserNameFromData(String userInfoDataFromServer);", "@Test\n public void getUser() throws Exception {\n String tokenLisa = authenticationService.authorizeUser(userCredentialsLisa);\n User lisa = service.getUser(tokenLisa, \"1\");\n User peter = service.getUser(tokenLisa, \"2\");\n\n assertNotNull(lisa);\n assertNotNull(peter);\n\n\n String tokenPeter = authenticationService.authorizeUser(userCredentialsPeter);\n lisa = service.getUser(tokenPeter, \"1\");\n peter = service.getUser(tokenPeter, \"2\");\n\n assertNull(lisa);\n assertNotNull(peter);\n }", "@Test\n public void testExtractAppleUserinfoFromIDTokenNoPayload() {\n String idToken = \"aksdjh15a6s1kjh..ert45p6md4l6\";\n AppleUserInfo appleUserInfo = null;\n try {\n appleUserInfo = appleIDTokenValidator.extractAppleUserinfoFromIDToken(idToken);\n Assert.fail();\n\n } catch (IDTokenException e) {\n Assert.assertEquals(IDTokenErrorEnum.INVALID_ID_TOKEN, e.getErrorEnum());\n }\n\n }", "long getUserId();", "long getUserId();", "public String getNombreUsuarioFromToken(String token){\n return Jwts.parser().setSigningKey(secret).parseClaimsJws(token).getBody().getSubject();\n }", "@Test\n public void identifierTest() {\n assertEquals(\"ident1\", authResponse.getIdentifier());\n }", "public String getNombreUsuarioFromToken(String token){\n\t\treturn Jwts.parser().setSigningKey(secret).parseClaimsJws(token).getBody().getSubject();\n\t}", "private void parseJWT(String jwt, String apiKey) {\n\n //This line will throw an exception if it is not a signed JWS (as expected)\n Jws<Claims> claims = Jwts.parser()\n .setSigningKey(DatatypeConverter.parseBase64Binary(apiKey))\n .parseClaimsJws(jwt);\n // Claims claims = Jwts.parser()\n // .setSigningKey(DatatypeConverter.parseBase64Binary(apiKey))\n // .parseClaimsJws(jwt).getBody();\n\n System.out.println(claims);\n System.out.println(\"ID: \" + claims.getBody().getId());\n System.out.println(\"Subject: \" + claims.getBody().getSubject());\n System.out.println(\"Issuer: \" + claims.getBody().getIssuer());\n System.out.println(\"Expiration: \" + claims.getBody().getExpiration());\n }", "@RequestMapping(value = \"/findByUid\",method = RequestMethod.POST)\n public BaseResponse findByUid(@RequestBody Map map){\n return service.findByUid((Integer)map.get(\"userId\"));\n }", "public MetaUser getMetaUser(int iUser);" ]
[ "0.62455326", "0.6229724", "0.61056185", "0.6069179", "0.5937974", "0.5839659", "0.5834805", "0.57604694", "0.56617963", "0.56248045", "0.55816245", "0.555628", "0.5545003", "0.5534166", "0.55311424", "0.5528737", "0.5467064", "0.5462409", "0.5413627", "0.53639483", "0.5356664", "0.53508353", "0.53481215", "0.5346626", "0.53435963", "0.5331446", "0.53164417", "0.53115183", "0.5292244", "0.5290787", "0.5269926", "0.52373856", "0.5224705", "0.5223645", "0.5217467", "0.519884", "0.5190197", "0.5189682", "0.51699114", "0.5166825", "0.51648104", "0.51584864", "0.5152477", "0.5146859", "0.5144309", "0.5139042", "0.513825", "0.5133393", "0.5113188", "0.5103738", "0.5092503", "0.50767803", "0.5074505", "0.50706667", "0.50676095", "0.50666285", "0.5063693", "0.50618136", "0.50589323", "0.50529695", "0.50488", "0.504871", "0.5047994", "0.5046756", "0.502679", "0.50125515", "0.50110775", "0.50094527", "0.5007125", "0.4998588", "0.49955553", "0.4994026", "0.4991173", "0.4988714", "0.49883696", "0.4980892", "0.49806023", "0.49794585", "0.49740127", "0.49740127", "0.49740127", "0.49740127", "0.49740127", "0.49740127", "0.49740127", "0.49740127", "0.49740127", "0.49740127", "0.49740127", "0.49740127", "0.49727565", "0.49699923", "0.49658027", "0.49634364", "0.49634364", "0.49556518", "0.49508464", "0.49504185", "0.49497366", "0.49495053", "0.4947561" ]
0.0
-1
Create an operate function The operate function has two arguments FlowProcess and BufferCall
public void operate(FlowProcess flowProcess, BufferCall bufferCall) { // Init long sum = 0; // Holds a day = 60 * 24 minutes long[] sums = new long[ 60 * 24 ]; long[] nums = new long[ 60 * 24 ]; Queue<Long> window = new LinkedList<Long>(); // Get all the current argument values for this daily grouping Iterator<TupleEntry> arguments = bufferCall.getArgumentsIterator(); boolean init = true; int c = 0; while ( arguments.hasNext() ) { // Get the arguments TupleEntry TupleEntry entry = arguments.next(); // Get size for Tuple int size = entry.getInteger( 0 ); // Get time for Tuple long time = entry.getLong( 1 ); // Modulo for every min int i = ( int ) (time / (1000 * 60)) % (60 * 24); // Init, 1st min of the day might be different than zero if ( init ) { c = i; init = false; } // For every new min if ( c != i ) { sum += sums[ c ] / nums[ c ]; window.add( sums[ c ] / nums[ c ] ); c = i; if ( window.size() > period ) { sum -= window.remove(); } // create a Tuple to hold our result values Tuple result = new Tuple( time / (1000 * 60), sum / window.size() ); // return the result Tuple bufferCall.getOutputCollector().add( result ); } sums[ i ] += size; nums[ i ]++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract int process(Buffer input, Buffer output);", "public void operate(FlowProcess flowProcess, FunctionCall functionCall) {\n TupleEntry arguments = functionCall.getArguments();\n\n // creates a Tuple to hold our result values\n Tuple result = new Tuple();\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeZone( TimeZone.getTimeZone( \"UTC\" ) );\n calendar.setTimeInMillis( arguments.getLong( 0 ) );\n int day = calendar.get( java.util.Calendar.DAY_OF_MONTH );\n\n // adds the day value to the result Tuple\n result.add( day );\n\n // returns the result Tuple\n functionCall.getOutputCollector().add( result );\n }", "public interface ProcessCall\n{\n\t/**\n\t * Start the process.\n\t * Called when pressing the ... button in ...\n\t * It should only return false, if the function could not be performed\n\t * as this causes the process to abort.\n\t *\n\t * @param ctx Context\n\t * @param pi\t\t\t\tProcess Info\n\t * @return true if the next process should be performed\n\t */\n\tpublic boolean startProcess (Properties ctx, ProcessInfo pi, Trx trx);\n\n}", "public void operate(FlowProcess flowProcess, FunctionCall<NullContext> funcCall) {\n Tuple tuple = funcCall.getArguments().getTuple();\n TupleEntryCollector collector = funcCall.getOutputCollector();\n Tuple outTuple = new Tuple();\n String inKey = tuple.getString(0);\n String inValue = tuple.getString(1);\n int outKey;\n int outValue;\n HashMap<String, Integer> index = ExportPinterestPrefsWorkflow.getIndex();\n int highestID = ExportPinterestPrefsWorkflow.getHighestID();\n if( index.containsKey(inKey) ){\n outKey = index.get(inKey);\n } else { //new id-string mapping\n outKey = highestID;\n index.put(inKey, outKey);\n highestID += 1;\n }\n if( index.containsKey(inValue) ){\n outValue = index.get(inValue);\n } else { //new id-string mapping\n outValue = highestID;\n index.put(inValue, outValue);\n highestID += 1;\n }\n outTuple.add(outKey);\n outTuple.add(outValue+\"\\t1.0\");\n collector.add(outTuple);\n ExportPinterestPrefsWorkflow.setHighestID(highestID);\n ExportPinterestPrefsWorkflow.setIndex(index);//todo not sure this is needed if index is a reference to enclosing class's index it's already modified. If it's a deep copy yikes, copied with every get?????\n }", "public interface Operation {\n int operate(int args1, int args2);\n}", "public void operate(FlowProcess flowProcess, FunctionCall<NullContext> funcCall) {\n HashMap<String, Integer> index = ExportPinterestPrefsWorkflow.getIndex();\n Tuple tuple = funcCall.getArguments().getTuple();\n TupleEntryCollector collector = funcCall.getOutputCollector();\n Integer hashedPersonId1 = index.get(tuple.getString(0));\n Integer hashedPersonId2 = index.get(tuple.getString(1));\n Tuple tuple1 = new Tuple();\n tuple1.add(hashedPersonId1);\n //tuple1.add(index.get(tuple.getString(0)));//assumes it is already in the index!!!\n tuple1.add(tuple.getString(0));\n\n Tuple tuple2 = new Tuple();\n tuple2.add(hashedPersonId2);\n //tuple2.add(index.get(tuple.getString(1)));//assumes it is already in the index!!!\n tuple2.add(tuple.getString(1));\n\n IndexDatum id1 = new IndexDatum( tuple1 );\n IndexDatum id2 = new IndexDatum( tuple2 );\n collector.add(id1.getTuple());\n collector.add(id2.getTuple());\n }", "@Override\n\tpublic void execute(ByteBuffer buff) {\n\t\t\n\t}", "Operations operations();", "public void doCall(){\n CalculatorPayload operation = newContent();\n\n ((PBFTClient)getProtocol()).syncCall(operation);\n }", "public RealBuffer process( RealBuffer buffer )\n\t{\n\t\tfloat[] samples = buffer.getSamples();\n\n\t\tfor( int x = 0; x < samples.length; x++ )\n\t\t{\n\t\t\tsamples[ x ] = process( samples[ x ] );\n\t\t}\n\t\t\n\t\treturn new RealBuffer( samples );\n\t}", "public interface Operation {\n\tpublic Message doOperation(Message message);\n\n}", "public abstract void operation();", "@Override\n\tsynchronized void execute() {\n\t\t_dataOUTPipe.dataIN(op1.getText());\n\t\t_dataOUTPipe.dataIN(op2.getText());\n\t\t_dataOUTPipe.dataIN(op.getText());\n\t}", "BOperation createBOperation();", "public void process();", "public interface PYCreditJsCallAppProcess extends JsCallAppProcess {\n /**\n * 拍照\n *\n * @param js2AppInfo\n * @param parser\n * @param callback\n */\n void cameraGetImage(PYCreditJs2AppInfo js2AppInfo, PYCreditJsParser parser, JsCallAppCallback callback);\n\n /**\n * 原图预览\n *\n * @param js2AppInfo\n * @param parser\n * @param callback\n */\n void previewImage(PYCreditJs2AppInfo js2AppInfo, PYCreditJsParser parser, JsCallAppCallback callback);\n\n /**\n * 拉起 App\n *\n * @param js2AppInfo\n * @param parser\n * @param callback\n */\n void openPayApp(PYCreditJs2AppInfo js2AppInfo, PYCreditJsParser parser, JsCallAppCallback callback);\n\n /**\n * 获取广告图片地址\n *\n * @param js2AppInfo\n * @param parser\n * @param callback\n */\n void getAdBannerURL(PYCreditJs2AppInfo js2AppInfo, PYCreditJsParser parser, JsCallAppCallback callback);\n\n /**\n * 广告图片点击事件\n *\n * @param js2AppInfo\n * @param parser\n * @param callback\n */\n void adClick(PYCreditJs2AppInfo js2AppInfo, PYCreditJsParser parser, JsCallAppCallback callback);\n\n /**\n * 获取SDK版本信息\n *\n * @param js2AppInfo\n * @param parser\n * @param callback\n */\n void getAppInfo(PYCreditJs2AppInfo js2AppInfo, PYCreditJsParser parser, JsCallAppCallback callback);\n\n /**\n * 申请权根(拍照、拍视频)\n *\n * @param js2AppInfo\n * @param parser\n * @param callback\n */\n void authorization(PYCreditJs2AppInfo js2AppInfo, PYCreditJsParser parser, JsCallAppCallback callback);\n\n /**\n * 检查是否支持视频录制\n *\n * @param js2AppInfo\n * @param parser\n * @param callback\n */\n void checkVideoRecording(PYCreditJs2AppInfo js2AppInfo, PYCreditJsParser parser, JsCallAppCallback callback);\n\n /**\n * 代理网络请求\n *\n * @param js2AppInfo\n * @param parser\n * @param callback\n */\n void request(PYCreditJs2AppInfo js2AppInfo, PYCreditJsParser parser, JsCallAppCallback callback);\n}", "Flow createFlow();", "public interface Operation {\n /**\n * Executes given operation\n *\n * @param file file for executing operation\n * @param printerOK method for printing OK things\n * @param printerError method for printing error things\n */\n void execute(FitsFile file, PrintOutputMethod printerOK, PrintOutputMethod printerError);\n}", "OperationCallExp createOperationCallExp();", "public abstract void runOperation();", "protected abstract Buffer doCreateBuffer(byte[] data)\n throws BadParameterException, NoSuccessException;", "interface BufferSupplier<T> {\n ReplayBuffer<T> call();\n }", "void process();", "void process();", "abstract public Buffer createBuffer();", "FunCall createFunCall();", "OpFunction createOpFunction();", "<C, O> OperationCallExp<C, O> createOperationCallExp();", "public interface Process{\n /**\n * process()\n *\n * Allows the image to be processed.\n **/\n public void process();\n\n /**\n * getXY()\n *\n * Gets the value of an ARGB pixel in the X and Y position, given the width\n * and height.\n *\n * @param x The X position of the pixel to be retrieved.\n * @param y The Y position of the pixel to be retrieved.\n * @return The ARGB pixel.\n **/\n public int getXY(int x, int y);\n}", "public void process() {\n\n }", "protected void send(O operation)\n {\n }", "void createRenderableOp(Long id, String opName, ParameterBlock pb)\n\tthrows RemoteException;", "public abstract void execute(InputCalc input, Calculator calculator);", "public interface BFOperatorInterface extends NodeInterface, BFNodeInterface {\n\n /**\n * Initiates the operator state.\n * Is called before any of the other functions.\n *\n * @param frame\n */\n void open(VirtualFrame frame);\n\n /**\n * Executes the operator for one input record.\n * Is called multiple times.\n *\n * @param frame\n */\n void execute(VirtualFrame frame);\n\n /**\n * Terminates this operator.\n * Is called exactly once.\n *\n * @param frame\n */\n void close(VirtualFrame frame);\n\n\n}", "public interface PerformOperation {\n\n\tpublic String performOperation(int i);\n}", "public abstract void onProcess();", "Operation createOperation();", "Operation createOperation();", "public interface Operation{\r\n\tpublic void operate(Integer[] a);\r\n\tpublic String getOperationName();\r\n}", "@SuppressWarnings(\"unchecked\")\n\t\tpublic Operation createOperation(String opName, String[] params, OperationCallback caller) {\n\t\t\tthrow new RuntimeException(\"Method 'createOperation' in class 'DummyNode' not yet implemented!\");\n\t\t\t//return null;\n\t\t}", "public interface Process<R> {\n R run();\n}", "public void processProtocolFunction(Sink sink, ArgumentList arguments,\n FactContext context);", "public interface Operation {\n}", "public interface IProcessor {\n\n Object onMsgHandle(int cmdId, Object... arg);\n}", "protected abstract void execute(INPUT input);", "public interface IOperationExecutor {\n /**\n * execute operations with MixTape file.\n * @param mixTape the content of MixTape.json\n * @param operations action to be execute on MixTape file.\n * @throws Exception exceptions\n */\n void execute(\n final MixTape mixTape,\n final IOperation[] operations) throws Exception;\n}", "private void processOpsAccessRequested(String remoteAddr,String remoteName, byte opCode,\n String fileName,String pType,int mimeType, int fileSize) {\n\n\n boolean handover = BluetoothOppManager.getInstance(this).isWhitelisted(remoteAddr);\n\n if(V){\n Log.v(TAG, \"processOpsAccessRequested\");\n Log.v(TAG, \"remoteAddr is : \" + remoteAddr);\n Log.v(TAG, \"remoteName is : \" + remoteName);\n Log.v(TAG, \"fileName is : \" + fileName);\n Log.v(TAG, \"mimeType = \" + mimeType + \" fileSize = \" +fileSize);\n }\n\n if (opCode == OPP_OPER_PUSH) {\n\n ContentValues values = new ContentValues();\n values.put(BluetoothShare.FILENAME_HINT, fileName);\n values.put(BluetoothShare.TOTAL_BYTES, fileSize);\n values.put(BluetoothShare.DESTINATION, remoteAddr);\n values.put(BluetoothShare.DIRECTION, BluetoothShare.DIRECTION_INBOUND);\n values.put(BluetoothShare.TIMESTAMP, mTimestamp);\n\n /*This case is hit for multiple incoming shares*/\n if(mOpsObj && !mOpsClose){\n if(V) Log.d(TAG, \"Handling multiple incoming shares\");\n if(!handover){\n OppReceiveFileInfo recieveFileInfo =\n OppReceiveFileInfo.genAbsPathAndMime(fileName,fileSize);\n if(recieveFileInfo.mStatus == 0){\n values.put(BluetoothShare._DATA, recieveFileInfo.mAbsFileName);\n values.put(BluetoothShare.MIMETYPE, recieveFileInfo.mMimeType);\n values.put(BluetoothShare.USER_CONFIRMATION,\n BluetoothShare.USER_CONFIRMATION_AUTO_CONFIRMED);\n }else{\n Log.e(TAG,\n \"fileSystem err occured during multple incoming shares \");\n OpsAccessRsp((byte)OPP_OPER_PUSH ,\n false ,\n fileName);\n }\n }\n }\n\n if(handover){\n Log.d(TAG, \"The device is whitelisted for NFC Transfer\");\n OppReceiveFileInfo recieveFileInfo =\n OppReceiveFileInfo.genAbsPathAndMime(fileName,fileSize);\n if(recieveFileInfo.mStatus == 0){\n values.put(BluetoothShare._DATA, recieveFileInfo.mAbsFileName);\n values.put(BluetoothShare.MIMETYPE, recieveFileInfo.mMimeType);\n values.put(BluetoothShare.USER_CONFIRMATION,\n BluetoothShare.USER_CONFIRMATION_HANDOVER_CONFIRMED);\n OpsAccessRsp((byte)OPP_OPER_PUSH ,\n true ,\n recieveFileInfo.mAbsFileName);\n handover = true;\n }else{\n Log.e(TAG,\"During Nfc handover fileSystem error occured\");\n OpsAccessRsp((byte)OPP_OPER_PUSH ,\n false ,\n fileName);\n return;\n }\n\n }\n Uri contentUri =\n this.getContentResolver().insert(BluetoothShare.CONTENT_URI, values);\n\n /*if more than one file is a part of a incoming batch , we have to auto confirm\n with out calling the incomingFileConfirm activity\n Below is the Logic :\n For multiple incoming files , we recieve the stack events as followsadb reb\n OPS_OPEN>> OPS_ACCESS>> OPS_PROG>>OPS_OBJ>>OPS_ACESS>>OPS_OBj>>OPS_CLOSE\n so by checking if we get ACESS request after OBJ ,then it means the\n incoming file is for the same batch*/\n if(V){\n Log.v(TAG, \"Current value of mOpsclose = \" + mOpsClose);\n Log.v(TAG, \"Current value of mOpsObj = \" + mOpsObj);\n }\n if(mOpsClose && !mOpsObj && !handover)\n {\n if(V) Log.v(TAG, \"Calling incomingFileConfirmActivity\");\n Intent in =\n new Intent(BluetoothShare.INCOMING_FILE_CONFIRMATION_REQUEST_ACTION);\n in.setClassName(Constants.THIS_PACKAGE_NAME,\n BluetoothOppReceiver.class.getName());\n this.sendBroadcast(in);\n }\n\n int localShareInfoId = Integer.parseInt(contentUri.getPathSegments().get(1));\n if(V)Log.v(TAG, \"insert contentUri: \" + contentUri);\n if(V)Log.v(TAG, \"mLocalShareInfoId = \" + localShareInfoId);\n\n } else if (opCode == OPP_OPER_PULL) {\n\n Log.e(TAG, \"Currently we dont support pull\");\n\n }\n\n }", "public static int executarOperacao(Calculo calculo, int a, int b){\n\n return calculo.calcular(a,b);\n }", "ProcedureCall createProcedureCall();", "public int calculateUsingFactory(int a ,int b ,String operator) {\n\t\tOperation targetOperation = OperatorFactory.getOperationNull(operator);\n\t\tif(targetOperation instanceof Addition) {\n\t\t\tSystem.out.println(\"Addiction Object\");\n\t\t}else if(targetOperation instanceof Subtraction) {\n\t\t\tSystem.out.println(\"Subtraction Object\");\n\t\t}\n\t\treturn targetOperation.apply(a, b);\n\t}", "public interface Process extends Serializable\n{\n\tpublic static final String NAME = \"Process Name\";\n\tpublic static final String TYPE = \"Process Type\";\n\t\n\tpublic static final String previousProcess = \"previousProcess\";\n\t\n\n\t/* initialization */\n\tpublic void init(Process process,Network network);\n\tpublic void init(Process process,List inputPorts,List outputPorts,Network network);\n\tpublic Network getNetwork();\n\tpublic Map getProperties();\n\tpublic void updateProperties(Map properties);\n\tpublic String getID();\n\t\n\t\n\n\t/* activity */\n\tpublic void preFire();\n\tpublic boolean isFireable(Map data);\n\tpublic void fire(Map data);\n\tpublic Map getData();\n\tpublic void updateData(Map change);\n\n\n\t/* communication management */\n\tpublic InputPort getInputPort(int index);\n\tpublic InputPort inputPortObject(int index);\n\tpublic int getInputPortCount();\n\tpublic List getInputPortList();\n\tpublic OutputPort getOutputPort(int index);\n\tpublic OutputPort outputPortObject(int index);\n\tpublic int getOutputPortCount();\n\tpublic List getOutputPortList();\n\n\tpublic void setPreviousProcess(Process pro1);\n\tpublic void setPrevProcessObj(Process prevProcessObj);\n}", "public ProcessRunnable(I_FabSystem sys, Process process, I_Method waitForMethod) {\n processLinesOut_ = sys.newConcurrentLinkedQueue(String.class);\n processDataIn_ = sys.newConcurrentLinkedQueue(ProcessOutputData.class);\n \n process_ = process;\n \n waitForMethod_ = waitForMethod;\n processInput_ = process_.getOutputStream();\n processOutput_ = process_.getInputStream();\n }", "public interface RpcProcessorFactory {\n\n\n RpcProcessor getProcessor(\n String rpcMethod\n );\n\n\n}", "public interface Operation {\n String description();\n void command();\n}", "public interface CalculatorFunction {\r\n CalculatorNode calculate(CalculatorNode[] arguments);\r\n}", "public <O extends FighterOperation> O apply(O operation);", "public interface Operation {\n Double execute(Double[] numbers) throws InvalidCalcOpeartionException;\n}", "protected abstract Buffer doCreateBuffer(int size)\n throws BadParameterException, NoSuccessException;", "void execute(\n final MixTape mixTape,\n final IOperation[] operations) throws Exception;", "Operations createOperations();", "public abstract boolean process();", "public String visit(MessageSend n, LLVMRedux argu) throws Exception {\n int i=0;\n String primex_res = n.f0.accept(this, argu);\n Function f = scopeSearch(u.getRegType(primex_res)).getFunction(n.f2.accept(this, argu));\n\n ArrayList<String> localArgList;\n //bitcast\n String bitcast = u.getReg();\n u.println(bitcast+\" = bitcast i8* \"+primex_res+\" to i8***\");\n //load bitcasted to new reg (vtable)\n String load = u.getReg();\n u.println(load+\" = load i8**, i8*** \"+bitcast);\n //getelemntptr from above reg and the functoffset\n String gepr = u.getReg();\n u.println(gepr+\" = getelementptr i8*, i8** \"+load+\", i32 \"+f.offset);\n //get actual funct ptr load new ptr i8* above ptr\n String loader2 = u.getReg();\n u.println(loader2+\" = load i8*, i8** \"+gepr);\n //String functId = ;\n String bitcast2 = u.getReg();\n //if has only one argument copy paste command below without comma and closed parentheses\n if(f.arguments.size()==0){\n u.println(bitcast2+\" = bitcast i8* \"+loader2+\" to \"+u.javaTypeToLLVMType(f.returnType)+\"(i8*)*\");\n }else{\n u.print(bitcast2+\" = bitcast i8* \"+loader2+\" to \"+u.javaTypeToLLVMType(f.returnType)+\"(i8*, \");\n //else c&c c&v comm above & loop\n for (Variable v: f.arguments){\n u.simpleInlinePrint(u.javaTypeToLLVMType(v.type));\n if (!(i==f.arguments.size()-1))u.simpleInlinePrint(\", \");\n i++;\n }\n u.simplePrint(\")*\");\n }\n\n argStack.add(new ArrayList<>());\n argStackIndex++;\n n.f4.accept(this, argu);\n String rvalue= u.getReg(f.returnType);\n if(f.arguments.size()==0){\n u.println(rvalue+\" = call \"+u.javaTypeToLLVMType(f.returnType)+\" \"+bitcast2+\"(i8* \"+primex_res+\")\");\n }else{\n\n u.print(rvalue+\" = call \"+u.javaTypeToLLVMType(f.returnType)+\" \"+bitcast2+\"(i8* \"+primex_res+\", \");\n localArgList = argStack.get(argStackIndex);\n for (i=0;i<f.arguments.size();i++){\n u.simpleInlinePrint(u.javaTypeToLLVMType(f.arguments.get(i).type)+\" \"+localArgList.get(i));\n if (!(i==f.arguments.size()-1))u.simpleInlinePrint(\", \");\n }\n u.simplePrint(\")\");\n }\n\n argStackIndex--;\n argStack.remove(argStack.size()-1);\n return rvalue;\n }", "public Arginfo visit(MessageSend n, Arginfo argu) {\n Arginfo _ret=null;\n \n int a=prectr++;\n int b=prectr++;\n int c=prectr++;\n int d=prectr++;\n int e=prectr++;\n \n System.out.println(\"BEGIN\\n \");\n System.out.println(\"MOVE TEMP \"+e+\" CALL\\n BEGIN MOVE TEMP \"+a+\" \");\n argu.isreq=1;\n Arginfo temp1=n.f0.accept(this, argu);\n argu.isreq=0;\n \n if(temp1==null){\n \t System.err.println(\"noo \"+n.f2.f0.tokenImage+\" \"+argu.classname+\" \"+argu.methodname);\n \t System.exit(1);\n }\n String classname=temp1.str;\n String classname2=temp1.str;\n String methodname=n.f2.f0.tokenImage;\n while(true){\n \t if(finaltable.symboltable.get(classname).funcdec.containsKey(methodname)){\n \t\t break;\n \t }\n \t else{\n \t\t classname=finaltable.symboltable.get(classname).parent;\n \t\t if(classname==temp1.str||classname==null) break;\n \t }\n }\n String name=classname+\"_\"+methodname;\n //System.err.println(name+\" \"+);\n int dist=finaltable.symboltable.get(classname2).methodnum.get(name);\n \n n.f1.accept(this, argu);\n n.f2.accept(this, argu);\n n.f3.accept(this, argu);\n \n System.out.println(\"HLOAD TEMP \"+b+\" TEMP \"+a+\" 0\");\n System.out.println(\"HLOAD TEMP \"+c+\" TEMP \"+b+\" \"+dist);\n System.out.println(\"RETURN TEMP \"+c+\"\\nEND\\n\");\n System.out.println(\"( TEMP \"+a+\" \");\n \n n.f4.accept(this, argu);\n n.f5.accept(this, argu);\n \n \n System.out.println(\" )\\n\"+\"RETURN TEMP \"+e+\"\\nEND\\n\");\n\n \n temp1.str=finaltable.symboltable.get(classname).funcdec.get(methodname).get(0);\n return temp1;\n }", "public T processData(CreatedCharacter p);", "public Command createOperationCommand(int operator, Operand operand1, Operand operand2);", "public void process() {\n\t}", "abstract public void execute(FunctionContext context) throws Exception;", "public interface OperatorInterface {\n public Object call(Engine engine, List<?> args);\n}", "public interface Operation {\n\tdouble evaluate(double x, double y);\n}", "public abstract void runProcess();", "public int operation(int number1,int number2,String operator)", "OpFunctionArg createOpFunctionArg();", "public interface Operation<T> {\n\t\tvoid apply(final T parameter);\n\t}", "public T process(T input, ScopeInformation scopeInfo);", "public interface OpProcessor {\n static final Logger opProcessorLogger = LoggerFactory.getLogger(OpProcessor.class);\n static final Counter errorCounter = MetricManager.INSTANCE.getCounter(name(GremlinServer.class, \"errors\"));\n\n /**\n * The name of the processor which requests must refer to \"processor\" field on a request.\n */\n public String getName();\n\n /**\n * Given the context (which contains the RequestMessage), return back a Consumer function that will be\n * executed with the context. A typical implementation will simply check the \"op\" field on the RequestMessage\n * and return the Consumer function for that particular operation.\n */\n public Consumer<Context> select(final Context ctx);\n\n /**\n * Writes a response message as text.\n */\n public static Consumer<Context> text(final String message) {\n return (context) -> context.getChannelHandlerContext().channel().write(\n new TextWebSocketFrame(String.format(\"%s>>%s\", context.getRequestMessage().requestId, message)));\n }\n\n /**\n * Writes an error response message. All errors should be written to the client via this method as it increments\n * the error counter metrics for Gremlin Server.\n */\n public static Consumer<Context> error(final String message) {\n opProcessorLogger.warn(\"Error handled with this response: {}\", message);\n errorCounter.inc();\n return (context) -> context.getChannelHandlerContext().channel().write(new TextWebSocketFrame(message));\n }\n}", "public void invokeOutFlowHandlers(ProcessContext processContext) throws GFacException;", "boolean process(Param param, JsrCallable callable) throws InvalidSignatureException;", "Process createProcess();", "DataFlow createDataFlow();", "@Override\n public abstract void runOpMode();", "private interface OperationOverNodes {\n\t\tvoid operate(Node node);\n\t}", "public IBuffer newBuffer();", "private void Perform_CALL() throws RuntimeException\n {\n PCToStack();\n \n int k = Utils.GetOperand_XXXXXXX11111XXX1(mMBR);\n mPC = k + mMBR2;\n \n if (PC_BIT_SIZE == 22)\n clockTick();\n clockTick();\n clockTick();\n clockTick();\n \n return;\n }", "void createRenderedOp(Long id, String opName,\n\t\t\t ParameterBlock pb,\n\t\t\t SerializableState hints) throws RemoteException;", "public interface ProcessOutputHandler\n{\n /**\n * Updates the fax job based on the data from the process output.\n * \n * @param faxClientSpi\n * The fax client SPI\n * @param faxJob\n * The fax job object\n * @param processOutput\n * The process output\n * @param faxActionType\n * The fax action type\n */\n public void updateFaxJob(FaxClientSpi faxClientSpi,FaxJob faxJob,ProcessOutput processOutput,FaxActionType faxActionType);\n \n /**\n * This function extracts the fax job status from the process output.\n * \n * @param faxClientSpi\n * The fax client SPI\n * @param processOutput\n * The process output\n * @return The fax job status\n */\n public FaxJobStatus getFaxJobStatus(FaxClientSpi faxClientSpi,ProcessOutput processOutput);\n}", "Long tempProcessPoint(OrderDTO orderDTO, RouteDTO routeDTO, RoutePointDTO routePointDTO);", "public static ObjectInstance getMultiplyToAddOperationCallObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 4);\n properties.put(\"sourceEndpoint\", StringMangler\n .EncodeForJmx(getMultiplyEndpointMBean().getUrl()));\n properties.put(\"sourceOperation\", getMultiplyOperationMBean()\n .getName());\n properties.put(\"targetEndpoint\", StringMangler\n .EncodeForJmx(getAddEndpointMBean().getUrl()));\n properties.put(\"targetOperation\", getAddOperationMBean().getName());\n properties.put(\"jmxType\", new OperationCall().getJmxType());\n o = new ObjectName(_domain, properties);\n }\n catch (Exception e)\n {\n Assert\n .fail(\"Creation of 'Divide-Subtract' OperationCall ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new OperationCall().getClass().getName());\n }", "public abstract List<C_result> processJob(C_request processing_cmd);", "public interface LongProcessOperations \n{\n ServoConRemote.LongProcessPackage.Status Completed ();\n\n //message is empty on success\n String Message ();\n double Progress ();\n void Detach ();\n}", "Flow.Processor<T, Ack> processor();", "public interface Operator {\n public Object operate(List<LispStatement> operands);\n\n}", "void testBP()\n {\n try\n {\n init();\n accessComplete.reset();\n FormTestID(TestNo,SubNo++,\"FUN\");\n\n op1 = sequance.new Operation();\n addOpSequenceBP(op1,ACCESS_OPERATION_CODE.ACCESS_OPERATION_BLOCK_PERMALOCK );\n psLog.println(\"\\n<br><a>TestCase No:\"+TestID+\"</a> <br>\");\n psLog.println(\"\\n<b>Description</b>:\"+logText+\" \"+ACCESS_OPERATION_CODE.ACCESS_OPERATION_BLOCK_PERMALOCK);\n psLog.println(\"\\n<b> Expected: Block permalock memory Bank\"+\"</b><br>\");\n psLog.println(\"\\n<b> Actual Result is :</b><br>\");\n\n// //access sequence perform.\n// byte[] tp = { (byte)0xBE,(byte)0xDD};\n//\n// accessfilter.TagPatternA.setTagPattern(tp);\n\n reader.Actions.TagAccess.OperationSequence.performSequence(accessfilter, tInfo, antInfo);\n accessComplete.waitOne();\n int successCount[] = new int[1];int failureCount[] = new int[1];\n reader.Actions.TagAccess.getLastAccessResult(successCount, failureCount);\n reader.Actions.TagAccess.OperationSequence.delete(op1);\n if( successCount[0] == 0 )\n {\n psLog.println(\"\\n Test Result :PASS\");\n psResult.println(TestID+\" \"+logText+\" :PASS\");\n\n }\n else\n {\n psLog.println(\"\\n Test Result :FAIL\");\n psResult.println(TestID+\" \"+logText+\" :FAIL\");\n }\n if( ReadMemory() )\n {\n psLog.println(\"\\n Test Result :PASS\");\n psResult.println(TestID+\" \"+logText+\" :PASS\");\n// successCount++;\n }\n else\n {\n psLog.println(\"\\n Test Result :FAIL\");\n psResult.println(TestID+\" \"+logText+\" :FAIL\");\n// failureCount++;\n }\n }\n catch(InvalidUsageException exp)\n {\n System.out.print(\"\\nInvalidUsageException\"+exp.getInfo()+exp.getVendorMessage());\n }\n catch(OperationFailureException exp)\n {\n CleanupPendingSequence();\n System.out.print(\"\\nOperationFailureException\"+exp.getMessage()+exp.getStatusDescription());\n }\n catch(InterruptedException e)\n {\n\n }\n }", "public abstract void process(int input);", "public static void run_op(int formact) {\n switch (formact) {\n case 2:\n switch (op.toInt()) {\n case 144: //case ADDR\n addr(select_reg(r1), select_reg(r2));\n break;\n case 4: //case CLEAR\n clear(select_reg(r1));\n break;\n case 160: //case COMPR\n compr(select_reg(r1), select_reg(r2));\n break;\n case 156: //case DIVR\n divr(select_reg(r1), select_reg(r2));\n break;\n case 152: //case MULR\n mulr(select_reg(r1), select_reg(r2));\n break;\n case 172: //case RMO\n rmo(select_reg(r1), select_reg(r2));\n break;\n case 164: //case SHIFTL\n shiftl(select_reg(r1), r2.toInt());\n break;\n case 168: //case SHIFTR\n shiftr(select_reg(r1), r2.toInt());\n break;\n case 148: //case SUBR\n subr(select_reg(r1), select_reg(r2));\n break;\n case 184: //case TIXR\n tixr(select_reg(r1));\n break;\n }\n break;\n case 3:\n case 4:\n switch (op.toInt()) {\n case 24: //case ADD\n add(address.toInt());\n break;\n case 64: //case AND\n and(address.toInt());\n break;\n case 40: //case COMP\n comp(address.toInt());\n break;\n case 36: //case DIV\n div(address.toInt());\n break;\n case 60: //case J\n j(address.toInt());\n break;\n case 48: //case JEQ\n jeq(address.toInt());\n break;\n case 52: //case JGT\n jgt(address.toInt());\n break;\n case 56: //case JLT\n jlt(address.toInt());\n break;\n case 72: //case JSUB\n jsub(address.toInt());\n break;\n case 0: //case LDA\n lda(address.toInt());\n break;\n case 104: //case LDB\n ldb(address.toInt());\n break;\n case 80: //case LDCH\n ldch(address.toInt());\n break;\n case 8: //case LDL\n ldl(address.toInt());\n break;\n case 108: //case LDS\n lds(address.toInt());\n break;\n case 116: //case LDT\n ldt(address.toInt());\n break;\n case 4: //case LDX\n ldx(address.toInt());\n break;\n case 32: //case MUL\n mul(address.toInt());\n break;\n case 68: //case OR\n or(address.toInt());\n break;\n case 76: //case RSUB\n rsub();\n break;\n case 12: //case STA\n sta(address.toInt(), formact);\n break;\n case 120: //case STB\n stb(address.toInt(), formact);\n break;\n case 84: //case STCH\n stch(address.toInt(), formact);\n break;\n case 20: //case STL\n stl(address.toInt(), formact);\n break;\n case 124: //case STS\n sts(address.toInt(), formact);\n break;\n case 132: //case STT\n stt(address.toInt(), formact);\n break;\n case 16: //case STX\n stx(address.toInt(), formact);\n break;\n case 28: //case SUB\n sub(address.toInt());\n break;\n case 44: //case TIX\n tix(address.toInt());\n break;\n }\n }\n }", "public abstract void call();", "public interface COPSPdpOSDataProcess extends COPSDataProcess {\r\n\r\n /**\r\n * Gets the policies to be uninstalled\r\n * @param man The associated request state manager\r\n * @return A <tt>Vector</tt> holding the policies to be uninstalled\r\n */\r\n public List<COPSDecision> getRemovePolicy(COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Gets the policies to be installed\r\n * @param man The associated request state manager\r\n * @return A <tt>Vector</tt> holding the policies to be uninstalled\r\n */\r\n public List<COPSDecision> getInstallPolicy(COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Makes a decision from the supplied request data\r\n * @param man The associated request state manager\r\n * @param reqSIs Client specific data suppplied in the COPS request\r\n */\r\n public void setClientData(COPSPdpOSReqStateMan man, List<COPSClientSI> reqSIs);\r\n\r\n /**\r\n * Builds a failure report\r\n * @param man The associated request state manager\r\n * @param reportSIs Report data\r\n */\r\n public void failReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);\r\n\r\n /**\r\n * Builds a success report\r\n * @param man The associated request state manager\r\n * @param reportSIs Report data\r\n */\r\n public void successReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);\r\n\r\n /**\r\n * Builds an accounting report\r\n * @param man The associated request state manager\r\n * @param reportSIs Report data\r\n */\r\n public void acctReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);\r\n\r\n /**\r\n * Notifies that no accounting report has been received\r\n * @param man The associated request state manager\r\n */\r\n public void notifyNoAcctReport (COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Notifies a keep-alive timeout\r\n * @param man The associated request state manager\r\n */\r\n public void notifyNoKAliveReceived (COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Notifies that the connection has been closed\r\n * @param man The associated request state manager\r\n * @param error Reason\r\n */\r\n public void notifyClosedConnection (COPSPdpOSReqStateMan man, COPSError error);\r\n\r\n /**\r\n * Notifies that a request state has been deleted\r\n * @param man The associated request state manager\r\n */\r\n public void notifyDeleteRequestState (COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Notifies that a request state has been closed\r\n * @param man The associated request state manager\r\n */\r\n public void closeRequestState(COPSPdpOSReqStateMan man);\r\n\r\n}", "void transactTo_execCommand(int code, String transactName, ComponentName who, Map param1, String param2, int userId) {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n IBinder binder = ServiceManager.getService(\"device_policy\");\n if (binder != null) {\n if (HWFLOW) {\n Log.i(TAG, \"Transact:\" + transactName + \" to device policy manager service. code is \" + code);\n }\n _data.writeInterfaceToken(ConstantValue.DESCRIPTOR);\n if (who != null) {\n _data.writeInt(1);\n who.writeToParcel(_data, 0);\n } else {\n _data.writeInt(0);\n }\n _data.writeMap(param1);\n _data.writeString(param2);\n _data.writeInt(userId);\n binder.transact(code, _data, _reply, 0);\n _reply.readException();\n }\n _reply.recycle();\n _data.recycle();\n } catch (RemoteException localRemoteException) {\n Log.e(TAG, \"transactTo \" + transactName + \" failed: \" + localRemoteException.getMessage());\n } catch (Throwable th) {\n _reply.recycle();\n _data.recycle();\n }\n }", "public BasicActivityFactory(BPMNDiagram diagram, Document document, Output output, Element processElement) {\n\t\tthis.diagram = diagram;\n\t\tthis.document = document;\n\t\tthis.output = output;\n\t\tthis.supportingFactory = new SupportingFactory(diagram, document, this.output, processElement);\n\t\tthis.structuredElementsFactory = \n\t\t\tnew StructuredElementsFactory(diagram, document, this.output);\n\t}", "public interface OIMBizLocal {\n \n public void localOp();\n \n public void processEvent(BusinessEvent event);\n}", "public void runFIFO() {\n\n //init\n ArrayList<Processus> localProcess = new ArrayList<>(); //Creation of a local list of process\n for (Processus cpy : listOfProcess) { //Copy the list of process in the local list\n localProcess.add(cpy);\n }\n int size = listOfProcess.size(); //variable used to save the initial size of the list of process\n\n Processus executedProc = null; //ExecutedProc is the current process that is being execute\n Processus tmpProc = localProcess.get(0); //The tmpProc is the previous process executed\n\n //Variable we need to calcul\n double occupancyRate = 0;\n double averageWaitingTime = 0;\n double averageReturnTime = 0;\n int currentTime = 0;\n int occupancyTime = 0;\n int counter = 1;\n\n //beginning of the algo\n while (!localProcess.isEmpty()) { //As long as there are processes that are not done yet we keep going on\n\n //Determines the next process that will be executed\n for (Processus proc : localProcess) { //flow all remaining processes\n if (proc.getTime() <= currentTime) { //check if the currentTime of the process is below the currentTime\n if (localProcess.size() == 1) { //if there is only one process left\n executedProc = proc;\n } else if (proc.getCurrentOrder() <= tmpProc.getCurrentOrder()) { //selection of the older process (FIFO selection)\n executedProc = proc;\n tmpProc = proc;\n }\n }\n }\n\n //Check if the current process is assigned\n if (executedProc != null) {\n\n //execute the current ressource\n int tmpTime = 0;\n while (executedProc.getRessource(executedProc.getCurrentStep()) > tmpTime) { //As long as there is a resource\n for (Processus proc : localProcess) {\n if (proc.getTime() <= currentTime && !proc.equals(executedProc)) { //checking if there is another process waiting and set the new waiting time\n proc.setWaitingTime(1);\n }\n }\n currentTime++; //currentTime is updating at each loop\n occupancyTime++; //occupancyTime is updating at each loop\n tmpTime++;\n }\n\n executedProc.setCurrentStep(executedProc.getCurrentStep() + 1); //Update the currentStep to the next one (index of the lists of UC and inOut)\n\n if (executedProc.getCurrentStep() >= executedProc.getlistOfResource().size()) {//if it is the end of the process\n averageReturnTime += executedProc.getExecutedTime(); //update the average return time by adding the time that the process took\n localProcess.remove(executedProc); //remove the process from the list of process that needs to run\n }\n\n if (executedProc.getCurrentStep() <= executedProc.getListOfInOut().size()) { //If there is another inOut, it set the new time\n executedProc.setTime(executedProc.getInOut(executedProc.getCurrentStep() - 1) + currentTime);\n }\n\n //put the process at the end of the list (fifo order)\n executedProc.setCurrentOrder(counter);\n counter++;\n executedProc = null;\n } else {\n currentTime++;\n }\n }\n //end of the algo\n\n //Calculation of the variables\n occupancyRate = ((double) occupancyTime / (double) currentTime) * 100;\n for (Processus proc : listOfProcess) {\n averageWaitingTime += proc.getWaitingTime();\n }\n averageWaitingTime = averageWaitingTime / size;\n averageReturnTime = averageReturnTime / size;\n\n //Updating the global variables\n currentAverageReturnTime = averageReturnTime;\n logger.trace(\"Current average return time : \" + currentAverageReturnTime);\n currentAverageWaitingTime = averageWaitingTime;\n logger.trace(\"Current average waiting time : \" + currentAverageWaitingTime);\n currentOccupancyRate = occupancyRate;\n logger.trace(\"Current occupancy rate : \" + currentOccupancyRate);\n currentOccupancyTime = occupancyTime;\n logger.trace(\"Current occupancy time : \" + currentOccupancyTime);\n\n restList(); //reset the list to the origin values so the user can test another algo\n }" ]
[ "0.62582415", "0.59376466", "0.58490473", "0.57811004", "0.5482487", "0.54189295", "0.5409006", "0.532261", "0.53034884", "0.5283378", "0.526248", "0.52345216", "0.51646227", "0.5150759", "0.5119336", "0.5113014", "0.5107658", "0.50918955", "0.5066975", "0.50502634", "0.50145173", "0.5014003", "0.5011355", "0.5011355", "0.50078076", "0.4989467", "0.49853978", "0.49806982", "0.49641883", "0.4954846", "0.49455136", "0.49085286", "0.48953217", "0.48938152", "0.4891251", "0.48911536", "0.48711535", "0.48711535", "0.48662335", "0.48657838", "0.4846397", "0.48443842", "0.48393553", "0.4835281", "0.4805419", "0.47986394", "0.4797049", "0.479446", "0.4789784", "0.47834092", "0.47798616", "0.47731796", "0.47662032", "0.4761512", "0.47605458", "0.475643", "0.4752661", "0.47466135", "0.47416636", "0.4733405", "0.47293398", "0.47246137", "0.4708526", "0.47061092", "0.46988854", "0.468924", "0.4685856", "0.4684317", "0.46804172", "0.46789443", "0.46764222", "0.46743968", "0.4671319", "0.46682215", "0.46609652", "0.46587837", "0.4653415", "0.46511486", "0.464677", "0.46412933", "0.4633659", "0.46214777", "0.46174163", "0.46161237", "0.46128747", "0.4610114", "0.46083406", "0.460644", "0.46041203", "0.46023697", "0.46010783", "0.45983875", "0.45981187", "0.4591532", "0.45911863", "0.45889273", "0.45880806", "0.4587742", "0.45796713", "0.45786464" ]
0.5970494
1
gets the arguments TupleEntry
public void operate(FlowProcess flowProcess, FunctionCall functionCall) { TupleEntry arguments = functionCall.getArguments(); // creates a Tuple to hold our result values Tuple result = new Tuple(); Calendar calendar = Calendar.getInstance(); calendar.setTimeZone( TimeZone.getTimeZone( "UTC" ) ); calendar.setTimeInMillis( arguments.getLong( 0 ) ); int day = calendar.get( java.util.Calendar.DAY_OF_MONTH ); // adds the day value to the result Tuple result.add( day ); // returns the result Tuple functionCall.getOutputCollector().add( result ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Sequence<? extends String> getArguments() {\n return Entry.getArguments();\n }", "java.lang.String getArgs(int index);", "java.lang.String getArgs(int index);", "java.lang.String getArgs(int index);", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();", "String getArguments();", "public @NonNull Pair<String, String> getLastArgumentData()\n {\n final String[] parts = input.getArgs().get(input.size() - 1).split(separator, 2);\n if (parts.length == 2)\n return new Pair<>(parts[0] + separator, parts[1]);\n return new Pair<>(\"\", parts[0]);\n\n }", "private static List<Pair<OvsDbConverter.Entry, Object>> parseArguments(\n Deque<String> arguments) {\n\n List<Pair<OvsDbConverter.Entry, Object>> args = new ArrayList<>();\n\n for (String arg; null != (arg = arguments.peek()); ) {\n arguments.pop();\n if (arg.startsWith(\"~\")) {\n arg = arg.substring(1).replace('-', '_').toLowerCase(\n Locale.ROOT);\n // Get the converter entry for this argument type.\n OvsDbConverter.Entry entry = OvsDbConverter.get(arg);\n\n // If there is no entry, thrown an exception.\n if (null == entry) {\n throw new IllegalArgumentException(\n \"Unknown argument type: \" + arg);\n }\n\n // Add the entry to the arguments list.\n if (entry.hasConverter()) {\n args.add(new Pair<>(entry, entry.convert(arguments.pop())));\n } else {\n args.add(new Pair<>(entry, null));\n }\n\n } else throw new IllegalArgumentException(\n \"Unknown argument type: \" + arg);\n }\n\n return args;\n }", "java.util.List<godot.wire.Wire.Value> \n getArgsList();", "Object[] getArguments();", "Object[] getArguments();", "java.util.List<java.lang.String>\n getArgsList();", "public String getArguments() {\r\n return key.getArguments();\r\n }", "godot.wire.Wire.Value getArgs(int index);", "private static Map<String, String> getArgMap(String[] args) {\n \t\r\n Map<String,String> argMap = new HashMap<String,String>();\r\n for (int i = 0; i < args.length; i++) {\r\n \tlogger.info(\"arg[\"+i+\"]=\"+args[i]);\r\n String[] argArray = args[i].split(\"=\"); //$NON-NLS-1$\r\n\r\n if (argArray.length == 2) {\r\n argMap.put(argArray[0], argArray[1]);\r\n }\r\n }\r\n return argMap;\r\n }", "public Object[] getArguments() { return args;}", "ImmutableList<String> mainArgs();", "java.util.List<java.lang.String>\n getArgsList();", "com.google.protobuf.ByteString getArguments(int index);", "public Map<String, String> arguments() {\n if (this.arguments.isEmpty()) {\n for (final String argument : this.args) {\n final Matcher keys = KEY.matcher(argument);\n if (keys.find()) {\n final String identifier = keys.group(\"identifier\");\n final String value = keys.group(\"value\");\n if (!this.arguments.containsKey(identifier)) {\n this.arguments.put(identifier, value);\n } else {\n throw new IllegalArgumentException(\"duplicated keys\");\n }\n }\n }\n }\n return Collections.unmodifiableMap(this.arguments);\n }", "java.util.List<java.lang.String>\n\t\tgetArgsList();", "@java.lang.Override\n public godot.wire.Wire.Value getArgs(int index) {\n return args_.get(index);\n }", "public @NonNull List<@NonNull String> getArgs()\n {\n return input.getArgs();\n }", "java.lang.String getArg();", "int getArgIndex();", "public java.lang.String getArgs(int index) {\n return args_.get(index);\n }", "public java.lang.String getArgs(int index) {\n return args_.get(index);\n }", "public java.lang.String getArgs(int index) {\n\t\t\t\treturn args_.get(index);\n\t\t\t}", "public java.lang.String getArgs(int index) {\n return args_.get(index);\n }", "public java.lang.String getArgs(int index) {\n return args_.get(index);\n }", "public java.lang.String getArgs(int index) {\n\t\t\treturn args_.get(index);\n\t\t}", "com.google.protobuf.ByteString\n\t\tgetArgBytes();", "public Object getArguments() {\n return m_args;\n }", "default String args() {\n return (String) metadata().get(\"x-uri-args\");\n }", "private static TaskResultAnalysis extractArguments(String[] args) {\r\n\t\tif (args == null || args.length < 1)\r\n\t\t\treturn null;\r\n\t\tFile directory = null;\r\n\t\tFile output = null;\r\n\t\tString workflow = null;\r\n\t\tString header = null;\r\n\t\tboolean printTasks = false;\r\n\t\tfor (int i=0; i<args.length; i++) {\r\n\t\t\tString argument = args[i];\r\n\t\t\tif (argument == null)\r\n\t\t\t\treturn null;\r\n\t\t\telse if (argument.equals(\"-printTasks\"))\r\n\t\t\t\tprintTasks = true;\r\n\t\t\telse {\r\n\t\t\t\ti++;\r\n\t\t\t\tif (i >= args.length)\r\n\t\t\t\t\treturn null;\r\n\t\t\t\tString value = args[i];\r\n\t\t\t\tif (argument.equals(\"-directory\"))\r\n\t\t\t\t\tdirectory = new File(value);\r\n\t\t\t\telse if (argument.equals(\"-output\"))\r\n\t\t\t\t\toutput = new File(value);\r\n\t\t\t\telse if (argument.equals(\"-workflow\"))\r\n\t\t\t\t\tworkflow = value;\r\n\t\t\t\telse if (argument.equals(\"-header\"))\r\n\t\t\t\t\theader = value;\r\n\t\t\t\telse return null;\r\n\t\t\t}\r\n\t\t}\r\n\t\ttry {\r\n\t\t\treturn new TaskResultAnalysis(\r\n\t\t\t\toutput, directory, workflow, header, printTasks);\r\n\t\t} catch (Throwable error) {\r\n\t\t\tSystem.err.println(error.getMessage());\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "ArgList createArgList();", "private static Object[] getValues(\n List<Pair<OvsDbConverter.Entry, Object>> args, Node node) {\n Object[] values = new Object[args.size()];\n for (int index = 0; index < args.size(); index++) {\n if (Node.class.equals(args.get(index).first.type)) {\n values[index] = node;\n } else {\n values[index] = args.get(index).second;\n }\n }\n return values;\n }", "public com.google.protobuf.ByteString getArguments(int index) {\n return arguments_.get(index);\n }", "Optional<String[]> arguments();", "public com.google.protobuf.ByteString getArguments(int index) {\n return arguments_.get(index);\n }", "public java.util.List<java.lang.String>\n getArgsList() {\n return java.util.Collections.unmodifiableList(args_);\n }", "@VTID(13)\r\n java.lang.String getTuple();", "List<ArgumentEntity> getArgumentsByUser(UUID id);", "public List<Expression> getArgs()\n {\n return args;\n }", "static Stream<Arguments> args() {\n\t\treturn Stream.of(\n\t\t\tArguments.of(0, 1, 0, 0, \"one\"),\n\t\t\tArguments.of(3, 1, 0, 3, \"one \"),\n\t\t\tArguments.of(4, 2, 1, 0, \"one \"),\n\n\t\t\tArguments.of(0, 2, 0, 0, \"one two\"),\n\t\t\tArguments.of(1, 2, 0, 1, \"one two\"),\n\t\t\tArguments.of(2, 2, 0, 2, \"one two\"),\n\t\t\tArguments.of(3, 2, 0, 3, \"one two\"),\n\t\t\tArguments.of(7, 2, 1, 3, \"one two\"),\n\t\t\tArguments.of(7, 2, 1, 3, \"one two \"),\n\t\t\tArguments.of(8, 3, 2, 0, \"one two \"),\n\n\t\t\tArguments.of(0, 1, 0, 0, \"'one'\"),\n\t\t\t// Arguments.of(5, 1, 0, 3, \"'one' \"),\n\t\t\tArguments.of(6, 2, 1, 0, \"'one' \"),\n\n\t\t\tArguments.of(0, 1, 0, 0, \"'one'\"),\n\t\t\tArguments.of(1, 1, 0, 0, \"'one'\"),\n\t\t\tArguments.of(2, 1, 0, 1, \"'one'\"),\n\t\t\tArguments.of(3, 1, 0, 2, \"'one'\"),\n\t\t\tArguments.of(4, 1, 0, 3, \"'one'\"),\n\t\t\t// Arguments.of(5, 1, 0, 3, \"'one'\"),\n\n\t\t\tArguments.of(0, 1, 0, 0, \"'one' \"),\n\t\t\tArguments.of(1, 1, 0, 0, \"'one' \"),\n\t\t\tArguments.of(2, 1, 0, 1, \"'one' \"),\n\t\t\tArguments.of(3, 1, 0, 2, \"'one' \"),\n\t\t\tArguments.of(4, 1, 0, 3, \"'one' \"),\n\t\t\t// Arguments.of(5, 1, 0, 3, \"'one' \"),\n\t\t\tArguments.of(6, 2, 1, 0, \"'one' \"),\n\n\t\t\tArguments.of(0, 1, 0, 0, \"\\\"one\\\"\"),\n\t\t\tArguments.of(1, 1, 0, 0, \"\\\"one\\\"\"),\n\t\t\tArguments.of(2, 1, 0, 1, \"\\\"one\\\"\"),\n\t\t\tArguments.of(3, 1, 0, 2, \"\\\"one\\\"\"),\n\t\t\tArguments.of(4, 1, 0, 3, \"\\\"one\\\"\"),\n\t\t\t// Arguments.of(5, 1, 0, 3, \"\\\"one\\\"\"),\n\n\t\t\tArguments.of(0, 1, 0, 0, \"\\\"one\\\" \"),\n\t\t\tArguments.of(1, 1, 0, 0, \"\\\"one\\\" \"),\n\t\t\tArguments.of(2, 1, 0, 1, \"\\\"one\\\" \"),\n\t\t\tArguments.of(3, 1, 0, 2, \"\\\"one\\\" \"),\n\t\t\tArguments.of(4, 1, 0, 3, \"\\\"one\\\" \"),\n\t\t\t// Arguments.of(5, 1, 0, 3, \"\\\"one\\\" \"),\n\t\t\tArguments.of(6, 2, 1, 0, \"\\\"one\\\" \")\n\t\t\t);\n\t}", "Astro tuple(AstroArg args);", "public java.lang.Object[] getArgs() {\n return args;\n }", "List<IArgumentBuilder> getArguments();", "public Map<String, String> getArgList() {\n return argMap;\n }", "private Object[] computeKeyValuePairOfTuple(AttrName asName, Entry<List<Object>, ? extends Aggregator<?>> item, AttrList byNameAttrs){\n List<Object> list = new ArrayList<Object>();\n List<AttrName> attrs = byNameAttrs.toList();\n for(int i = 0; i < attrs.size(); i++){\n list.add(attrs.get(i).getName());\n list.add((item.getKey().get(i)));\n }\n Aggregator<?> value = item.getValue();\n list.add(asName);\n list.add(value.finish());\n return list.stream().toArray();\n }", "public ArgumentPair getByArgumentKey(String argument) {\n return this.stream().filter(a -> a.getArgument().equals(argument)).findFirst().orElse(null);\n }", "public java.lang.String getArgs() {\n return args;\n }", "private static HashMap<String, String> parseArgs(String... args)\n {\n final HashMap<String, String> map = new HashMap();\n //TODO convert args to map\n String lastArg = null;\n for (String string : args)\n {\n //Store new arg\n if (string.startsWith(\"-\"))\n {\n lastArg = string.trim().replaceFirst(\"-\", \"\");\n if (lastArg.contains(\"=\"))\n {\n String[] split = lastArg.split(\"=\");\n lastArg = split[0];\n map.put(lastArg, split[1].replace(\"\\\\\\\"\", \"\"));\n continue;\n }\n map.put(lastArg, null);\n }\n else\n {\n //Store arg value, or append value\n String v = map.get(lastArg);\n if (v == null)\n {\n v = string;\n }\n else\n {\n v += \",\" + string;\n }\n map.put(lastArg, v);\n }\n }\n return map;\n }", "@Override\n public int getArgent() {\n return _argent;\n }", "@Override\r\n\tpublic List<String> getArguments()\r\n\t{\n\t\treturn null;\r\n\t}", "@java.lang.Override\n public java.util.List<godot.wire.Wire.Value> getArgsList() {\n return args_;\n }", "public godot.wire.Wire.Value getArgs(int index) {\n if (argsBuilder_ == null) {\n return args_.get(index);\n } else {\n return argsBuilder_.getMessage(index);\n }\n }", "public ProgramExp getArgument() {\n return argument;\n }", "public HashMap<String, String> getArgsDict() {\n return argsDict;\n }", "public List<Argument> getArguments() {\n return arguments;\n }", "public final EObject entryRuleArguments() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleArguments = null;\n\n\n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2448:2: (iv_ruleArguments= ruleArguments EOF )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2449:2: iv_ruleArguments= ruleArguments EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getArgumentsRule()); \n }\n pushFollow(FOLLOW_ruleArguments_in_entryRuleArguments5736);\n iv_ruleArguments=ruleArguments();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleArguments; \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleArguments5746); if (state.failed) return current;\n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public Vector<Argument> getAllArguments() {\r\n \t\tVector<Argument> args = new Vector<Argument>();\r\n \t\targs.addAll(argumentsFor);\r\n \t\targs.addAll(argumentsAgainst);\r\n \t\targs.addAll(relationships);\r\n \t\treturn args;\r\n \t}", "public java.util.List<java.lang.String>\n getArgsList() {\n return args_;\n }", "godot.wire.Wire.ValueOrBuilder getArgsOrBuilder(\n int index);", "public java.lang.String getArgs() {\n return args;\n }", "Object[] args();", "public Map<String, Object> processArgs(String[] args)\n {\n for (int ii=0; ii<args.length; ii++) {\n String token = args[ii];\n char firstC = token.charAt(0);\n if (firstC != '-' && firstC != '+') {\n return null;\n }\n // look up the token\n token = token.substring(1);\n String type = _meta.get(token);\n if (type == null) {\n return null;\n }\n\n // most types expect a following token - check\n Object argument = null;\n if (StringArg.equals(type) || ListArg.equals(type) || IntegerArg.equals(type)) {\n if (args.length < ii+2) {\n return null;\n }\n if (firstC != '-') {\n // these types all expect a - in front of the token\n return null;\n }\n argument = args[ii+1];\n ii++;\n }\n if (DoubleListArg.equals(type)) {\n if (args.length < ii+3) {\n return null;\n }\n if (firstC != '-') {\n return null;\n }\n String[] a2 = new String[2];\n a2[0] = args[ii+1];\n a2[1] = args[ii+2];\n argument = a2;\n ii += 2;\n }\n\n Object old;\n if (StringArg.equals(type)) {\n old = _result.put(token, argument);\n if (old != null) {\n return null;\n }\n }\n else if (ListArg.equals(type)) {\n List<String> oldList = (List<String>)_result.get(token);\n if (oldList == null) {\n oldList = new ArrayList<String>();\n _result.put(token, oldList);\n }\n oldList.add((String)argument);\n }\n else if (DoubleListArg.equals(type)) {\n List<String[]> oldList = (List<String[]>)_result.get(token);\n if (oldList == null) {\n oldList = new ArrayList<String[]>();\n _result.put(token, oldList);\n }\n oldList.add((String[])argument);\n }\n else if (IntegerArg.equals(type)) {\n Integer val = Integer.parseInt((String)argument);\n old = _result.put(token, val);\n if (old != null) {\n return null;\n }\n }\n else if (FlagArgFalse.equals(type) || FlagArgTrue.equals(type)) {\n // note that we always have a default value for flag args\n Boolean val = (firstC == '-');\n _result.put(token, val);\n }\n }\n\n return _result;\n }", "public Document getArguments() {\n return arguments;\n }", "@Nullable\n private Object getValueFromArgList(@NotNull List<? extends GradleDslElement> args) {\n if (args.size() == 1 && args.get(0) instanceof GradleDslSimpleExpression) {\n return ((GradleDslSimpleExpression)args.get(0)).getValue();\n }\n\n PsiElement psiElement = getPsiElement();\n return psiElement != null ? getPsiText(psiElement) : null;\n }", "public String[] getArguments(){\r\n\t\treturn args.toArray(new String[args.size()]);\r\n\t}", "public List<Element> getArguments()\n {\n List<Element> args = new ArrayList<>(getSigChildren());\n\n // remove the \"use\", \"no\", or \"require\"\n args.remove(0);\n\n // remove the terminator - ha! - he'll be back!\n if (ElementUtils.isSemiColonToken(args.get(args.size() - 1)))\n {\n args.remove(args.size() - 1);\n }\n\n // remove the module name or version dependency\n args.remove(0);\n\n if (args.isEmpty())\n {\n return Collections.emptyList();\n }\n\n // do we have a required version...\n if (args.get(0) instanceof NumberToken)\n {\n // yup, and that's it...\n if (args.size() == 1)\n {\n return Collections.emptyList();\n }\n\n // yes, and additional arguments\n if (!(args.get(1) instanceof OperatorToken))\n {\n args.remove(0);\n }\n }\n\n return args;\n }", "public Object[] getArguments()\n {\n return __m_Arguments;\n }", "uicargs createuicargs();", "public Object[] getArguments() {\n return arguments;\n }", "public List<String> getArguments()\n\t{\n\t\treturn mArgs;\n\t}", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getElementList();", "public void getParms(String args[]) {\n\n // get the argument values\n stationID = ec.getArgument(args, sc.STATIONID );\n newStationID = ec.getArgument(args, sc.NEWSTATIONID);\n latitude = ec.getArgument(args, sc.LATITUDE );\n longitude = ec.getArgument(args, sc.LONGITUDE );\n name = ec.getArgument(args, sc.NAME );\n clientCode = Integer.parseInt(ec.getArgument(args, sc.CLIENTCODE));\n action = ec.getArgument(args, sc.ACTION );\n clientName = ec.getArgument(args, sc.CLIENTNAME );\n surveyID = ec.getArgument(args, sc.SURVEYID ); // ub02\n\n\n if (dbg) System.out.println(\"<br> gp stationID : \" + stationID);\n }", "public CellTable<CQLFunctionArgument> getArgumentListTable() {\n\t\treturn argumentListTable;\n\t}", "private static ConvertTSVToSQLiteOperation extractArguments(String[] args) {\r\n\t\tif (args == null || args.length < 1)\r\n\t\t\treturn null;\r\n\t\tFile tsvFile = null;\r\n\t\tFile sqliteDBFile = null;\r\n\t\tfor (int i=0; i<args.length; i++) {\r\n\t\t\tString argument = args[i];\r\n\t\t\tif (argument == null)\r\n\t\t\t\treturn null;\r\n\t\t\telse {\r\n\t\t\t\ti++;\r\n\t\t\t\tif (i >= args.length)\r\n\t\t\t\t\treturn null;\r\n\t\t\t\tString value = args[i];\r\n\t\t\t\tif (argument.equals(\"-input\"))\r\n\t\t\t\t\ttsvFile = new File(value);\r\n\t\t\t\telse if (argument.equals(\"-output\"))\r\n\t\t\t\t\tsqliteDBFile = new File(value);\r\n\t\t\t\telse return null;\r\n\t\t\t}\r\n\t\t}\r\n\t\ttry {\r\n\t\t\treturn new ConvertTSVToSQLiteOperation(tsvFile, sqliteDBFile);\r\n\t\t} catch (Throwable error) {\r\n\t\t\tSystem.err.println(error.getMessage());\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@java.lang.Override\n public godot.wire.Wire.ValueOrBuilder getArgsOrBuilder(\n int index) {\n return args_.get(index);\n }", "public abstract T getTuple(int aPosition);", "@Override\n\tprotected GATKArgumentCollection getArgumentCollection() {\n\t\treturn argCollection;\n\t}", "public ArrayList<LogVar> getArgs() {\n\t\treturn this.args;\n\t}", "public java.util.List<godot.wire.Wire.Value> getArgsList() {\n if (argsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(args_);\n } else {\n return argsBuilder_.getMessageList();\n }\n }", "private ParameterInformation processArgumentReference(Argument argument,\n List<NameDescriptionType> argTypeSet,\n SequenceEntryType seqEntry,\n int seqIndex)\n {\n ParameterInformation argumentInfo = null;\n\n // Initialize the argument's attributes\n String argName = argument.getName();\n String dataType = null;\n String arraySize = null;\n String bitLength = null;\n BigInteger argBitSize = null;\n String enumeration = null;\n String description = null;\n UnitSet unitSet = null;\n String units = null;\n String minimum = null;\n String maximum = null;\n\n // Step through each command argument type\n for (NameDescriptionType argType : argTypeSet)\n {\n // Check if this is the same command argument referenced in the argument list (by\n // matching the command and argument names between the two)\n if (argument.getArgumentTypeRef().equals(argType.getName()))\n {\n boolean isInteger = false;\n boolean isUnsigned = false;\n boolean isFloat = false;\n boolean isString = false;\n\n // Check if this is an array parameter\n if (seqEntry instanceof ArrayParameterRefEntryType)\n {\n arraySize = \"\";\n\n // Store the reference to the array parameter type\n ArrayDataTypeType arrayType = (ArrayDataTypeType) argType;\n argType = null;\n\n // Step through each dimension for the array variable\n for (Dimension dim : ((ArrayParameterRefEntryType) seqEntry).getDimensionList().getDimension())\n {\n // Check if the fixed value exists\n if (dim.getEndingIndex().getFixedValue() != null)\n {\n // Build the array size string\n arraySize += String.valueOf(Integer.valueOf(dim.getEndingIndex().getFixedValue()) + 1)\n + \",\";\n }\n }\n\n arraySize = CcddUtilities.removeTrailer(arraySize, \",\");\n\n // The array parameter type references a non-array parameter type that\n // describes the individual array members. Step through each data type in the\n // parameter type set in order to locate this data type entry\n for (NameDescriptionType type : argTypeSet)\n {\n // Check if the array parameter's array type reference matches the data\n // type name\n if (arrayType.getArrayTypeRef().equals(type.getName()))\n {\n // Store the reference to the array parameter's data type and stop\n // searching\n argType = type;\n break;\n }\n }\n }\n\n // Check if a data type entry for the parameter exists in the parameter type set\n // (note that if the parameter is an array the steps above locate the data type\n // entry for the individual array members)\n if (argType != null)\n {\n long dataTypeBitSize = 0;\n\n // Check if the argument is an integer data type\n if (argType instanceof IntegerArgumentType)\n {\n IntegerArgumentType icmd = (IntegerArgumentType) argType;\n\n // Get the number of bits occupied by the argument\n argBitSize = icmd.getSizeInBits();\n\n // Get the argument units reference\n unitSet = icmd.getUnitSet();\n\n // Check if integer encoding is set to 'unsigned'\n if (icmd.getIntegerDataEncoding().getEncoding().equalsIgnoreCase(\"unsigned\"))\n {\n isUnsigned = true;\n }\n\n // Determine the smallest integer size that contains the number of bits\n // occupied by the argument\n dataTypeBitSize = 8;\n\n while (argBitSize.longValue() > dataTypeBitSize)\n {\n dataTypeBitSize *= 2;\n }\n\n // Get the argument alarm\n IntegerArgumentType.ValidRangeSet alarmType = icmd.getValidRangeSet();\n\n // Check if the argument has an alarm\n if (alarmType != null)\n {\n // Get the alarm range\n List<IntegerRangeType> alarmRange = alarmType.getValidRange();\n\n // Check if the alarm range exists\n if (alarmRange != null)\n {\n // Store the minimum alarm value\n minimum = alarmRange.get(0).getMinInclusive();\n\n // Store the maximum alarm value\n maximum = alarmRange.get(0).getMaxInclusive();\n }\n }\n\n isInteger = true;\n }\n // Check if the argument is a floating point data type\n else if (argType instanceof FloatArgumentType)\n {\n // Get the float argument attributes\n FloatArgumentType fcmd = (FloatArgumentType) argType;\n dataTypeBitSize = fcmd.getSizeInBits().longValue();\n unitSet = fcmd.getUnitSet();\n\n // Get the argument alarm\n FloatArgumentType.ValidRangeSet alarmType = fcmd.getValidRangeSet();\n\n // Check if the argument has an alarm\n if (alarmType != null)\n {\n // Get the alarm range\n List<FloatRangeType> alarmRange = alarmType.getValidRange();\n\n // Check if the alarm range exists\n if (alarmRange != null)\n {\n // Get the minimum value\n Double min = alarmRange.get(0).getMinInclusive();\n\n // Check if a minimum value exists\n if (min != null)\n {\n // Get the minimum alarm value\n minimum = String.valueOf(min);\n }\n\n // Get the maximum value\n Double max = alarmRange.get(0).getMaxInclusive();\n\n // Check if a maximum value exists\n if (max != null)\n {\n // Get the maximum alarm value\n maximum = String.valueOf(max);\n }\n }\n }\n\n isFloat = true;\n }\n // Check if the argument is a string data type\n else if (argType instanceof StringDataType)\n {\n // Get the string argument attributes\n StringDataType scmd = (StringDataType) argType;\n dataTypeBitSize = Integer.valueOf(scmd.getStringDataEncoding()\n .getSizeInBits()\n .getFixed()\n .getFixedValue());\n unitSet = scmd.getUnitSet();\n isString = true;\n }\n // Check if the argument is an enumerated data type\n else if (argType instanceof EnumeratedDataType)\n {\n EnumeratedDataType ecmd = (EnumeratedDataType) argType;\n EnumerationList enumList = ecmd.getEnumerationList();\n\n // Check if any enumeration parameters are defined\n if (enumList != null)\n {\n // Step through each enumeration parameter\n for (ValueEnumerationType enumType : enumList.getEnumeration())\n {\n // Check if this is the first parameter\n if (enumeration == null)\n {\n // Initialize the enumeration string\n enumeration = \"\";\n }\n // Not the first parameter\n else\n {\n // Add the separator for the enumerations\n enumeration += \", \";\n }\n\n // Begin building this enumeration\n enumeration += enumType.getValue() + \" | \" + enumType.getLabel();\n }\n\n argBitSize = ecmd.getIntegerDataEncoding().getSizeInBits();\n unitSet = ecmd.getUnitSet();\n\n // Check if integer encoding is set to 'unsigned'\n if (ecmd.getIntegerDataEncoding().getEncoding().equalsIgnoreCase(\"unsigned\"))\n {\n isUnsigned = true;\n }\n\n // Determine the smallest integer size that contains the number of bits\n // occupied by the argument\n dataTypeBitSize = 8;\n\n while (argBitSize.longValue() > dataTypeBitSize)\n {\n dataTypeBitSize *= 2;\n }\n\n isInteger = true;\n }\n }\n\n // Get the name of the data type from the data type table that matches the base\n // type and size of the parameter\n dataType = getMatchingDataType(dataTypeBitSize / 8,\n isInteger,\n isUnsigned,\n isFloat,\n isString,\n dataTypeHandler);\n\n // Check if the description exists\n if (argType.getLongDescription() != null)\n {\n // Store the description\n description = argType.getLongDescription();\n }\n\n // Check if the argument bit size exists\n if (argBitSize != null && argBitSize.longValue() != dataTypeBitSize)\n {\n // Store the bit length\n bitLength = argBitSize.toString();\n }\n\n // Check if the units exists\n if (unitSet != null)\n {\n List<UnitType> unitType = unitSet.getUnit();\n\n // Check if the units is set\n if (!unitType.isEmpty())\n {\n // Store the units\n units = unitType.get(0).getContent();\n }\n }\n\n argumentInfo = new ParameterInformation(argName,\n dataType,\n arraySize,\n bitLength,\n enumeration,\n units,\n minimum,\n maximum,\n description,\n 0,\n seqIndex);\n }\n\n break;\n }\n }\n\n return argumentInfo;\n }", "@Override\n public Map<String, String> getInputArgs() {\n Log.w(TAG, \"Test input args is not supported.\");\n return new HashMap<>();\n }", "public String getArgumentLine() {\n return \"\";\n }", "@Override\n protected String[] getArguments() {\n String[] args = new String[1];\n args[0] = _game_file_name;\n return args;\n }", "public String[] getArguments() {\n return this.arguments;\n }", "public String args(int n)\r\n {\r\n if (n >= 0 && n < numArgs)\r\n return args[n];\r\n else\r\n return null;\r\n }", "java.util.List<com.google.protobuf.ByteString> getArgumentsList();", "final String[] args() {\n return args;\n }", "private java.util.Hashtable addParams(String[] args, int index){\n \t// create an array to store sub arguments\n \tjava.util.List<String> subArgs = new java.util.ArrayList();\n \tint n = index + 1;\n \ttry {\n \t\twhile(!args[n].startsWith(\"-\")){\n \t\t\tsubArgs.add(args[n]);\n \t\t\tn++;\n \t\t}\n \t}catch(Exception e){}\n \tjava.util.Hashtable returnVal = new java.util.Hashtable();\n \treturnVal.put(args[index], subArgs);\n \treturn returnVal;\n }", "private String[] getArgs()\n {\n return cmd.getArgs();\n }", "private static ArgumentsPair parseArgs(String args[]) {\n String allArgs[] = new String[] {\n PARAMETER_NEW_FORMAT,\n PARAMETER_TRANSFORM,\n PARAMETER_BASE,\n PARAMETER_BITS,\n PARAMETER_BYTES,\n PARAMETER_DIFFERENCE,\n PARAMETER_STRENGTH,\n PARAMETER_TIME\n };\n Set<String> allArgsSet = new HashSet<>(Arrays.asList(allArgs));\n ArgumentsPair argumentsPair = new ArgumentsPair();\n\n for (int i = 0; i < args.length; i++) {\n String param = args[i].substring(1);\n if (allArgsSet.contains(param)) {\n argumentsPair.paramsAdd(param);\n } else if (param.equals(PARAMETER_ALL)) {\n argumentsPair.paramsAddAll(allArgsSet);\n argumentsPair.getParams().remove(PARAMETER_NEW_FORMAT);\n argumentsPair.getParams().remove(PARAMETER_TRANSFORM);\n } else if (param.equals(PARAMETER_GENERATE)) {\n if (args.length <= i + 1) {\n System.err.println(\"Wrong -\" + PARAMETER_GENERATE + \" parameter. Use -\" + PARAMETER_GENERATE + \" keyBitLength. (keyBitLength = 512|1024)\");\n }\n else {\n int keyBitLength = Integer.valueOf(args[++i]);\n switch (keyBitLength) {\n case 1024:\n GENERATE_KEYS = true;\n GENERATED_PRIME_BIT_LENGTH = 512;\n break;\n case 512:\n GENERATE_KEYS = true;\n GENERATED_PRIME_BIT_LENGTH = 256;\n break;\n default:\n System.err.println(\"Wrong -\" + PARAMETER_GENERATE + \" parameter. Use -\" + PARAMETER_GENERATE + \" keyBitLength. (keyBitLength = 512|1024)\");\n }\n }\n } else {\n argumentsPair.filesAdd(args[i]);\n }\n }\n return argumentsPair;\n }", "@Test\n public void mapEntry() {\n check(MAPENTRY);\n query(EXISTS.args(MAPENTRY.args(\"A\", \"B\")), true);\n query(EXISTS.args(MAPENTRY.args(1, 2)), true);\n query(EXISTS.args(MAPNEW.args(MAPENTRY.args(1, 2))), \"true\");\n error(EXISTS.args(MAPENTRY.args(\"()\", 2)), Err.XPTYPE);\n error(EXISTS.args(MAPENTRY.args(\"(1,2)\", 2)), Err.XPTYPE);\n }", "org.tensorflow.proto.framework.FullTypeDef getArgs(int index);", "com.google.protobuf.ByteString\n\t\tgetArgsBytes(int index);", "public static ArrayList getArgumentList() {\n return (ArrayList) Launch.blackboard.get(\"ArgumentList\");\n }", "public MapEntryArgInfo(Type[] types, Activity activity, AbstractController controller, int padding) {\n super(null, activity, controller, padding);\n this.types = types;\n }" ]
[ "0.68981403", "0.6187381", "0.6187381", "0.6187381", "0.61850965", "0.61850965", "0.5976776", "0.59666735", "0.5894541", "0.5886578", "0.58006096", "0.58006096", "0.5792236", "0.57885605", "0.57746595", "0.5773982", "0.5772929", "0.577211", "0.5766287", "0.57528365", "0.5696328", "0.56719214", "0.5655569", "0.560141", "0.5575955", "0.55438584", "0.5541198", "0.5541198", "0.55234426", "0.5517976", "0.5517976", "0.5509708", "0.5479536", "0.54446244", "0.54167014", "0.54166985", "0.54085857", "0.54035026", "0.53970855", "0.53744787", "0.53655696", "0.533072", "0.5329181", "0.5316702", "0.5292777", "0.52834564", "0.5275991", "0.5268833", "0.52684265", "0.5262801", "0.5258454", "0.52577823", "0.52562237", "0.52494174", "0.5243478", "0.5229802", "0.52006537", "0.5200479", "0.5198037", "0.51972044", "0.519382", "0.5193366", "0.5182344", "0.51819456", "0.5175589", "0.517278", "0.51709694", "0.5164168", "0.5152247", "0.51412946", "0.5141077", "0.51311237", "0.51258993", "0.5125501", "0.512184", "0.5120585", "0.51115555", "0.5090388", "0.5088924", "0.5085852", "0.50830567", "0.50792795", "0.50778043", "0.507734", "0.50770444", "0.50647044", "0.506171", "0.50584203", "0.5049776", "0.5046709", "0.5045166", "0.50430703", "0.50375676", "0.5021986", "0.50144935", "0.50094855", "0.500543", "0.4998877", "0.4983449", "0.49762672", "0.49716914" ]
0.0
-1
Contains all ids for features that were deleted before endVersion (a feature may be both in this set and in created if it was created and then deleted)
public Set getDeleted() { return Collections.unmodifiableSet(deleted); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Set getFeatureIDs (FeatureType ft, Filter filter,\r\n DBAccess osa) throws Exception {\r\n \r\n StringBuffer query = new StringBuffer (\r\n \"SELECT \" + ft.getMasterTable().getIdField());\r\n AbstractSQLBuilder sqlBuilder = new GMLDBSQLBuilder (ft);\r\n \r\n if (filter != null) {\r\n query.append (sqlBuilder.filter2SQL (filter));\r\n } else {\r\n query.append (\" FROM \" + ft.getMasterTable().getTargetName());\r\n }\r\n \r\n java.sql.Connection con = osa.getConnection ();\r\n Statement stmt = con.createStatement ();\r\n ResultSet rs = stmt.executeQuery (query.toString ()); \r\n\r\n TreeSet fIDs = new TreeSet ();\r\n\r\n // extract all affected Feature-IDs (as Strings)\r\n while (rs.next()) {\r\n String fID = rs.getString (1);\r\n fIDs.add (fID);\r\n }\r\n\r\n rs.close ();\r\n stmt.close ();\r\n return fIDs;\r\n }", "public Collection getDeletedObjectIds() {\n if (_payload == PAYLOAD_EXTENTS)\n throw new UserException(s_loc.get(\"extent-only-event\"));\n return (_deletes == null) ? Collections.EMPTY_LIST : _deletes;\n }", "protected Set<String> getUserDeactivatedGroupIds()\n {\n Set<String> historyIds = getActiveHistoryList().stream().map(rec -> rec.getId()).collect(Collectors.toSet());\n Set<String> userActivatedGroupIds = getUserActivatedGroupIds();\n return New.set(CollectionUtilities.difference(historyIds, userActivatedGroupIds));\n }", "boolean hasStableIds();", "@Override\n public boolean hasStableIds() {\n return true;\n }", "@Override\n public synchronized Set<FeatureType> getFeatureInstances() {\n return featureInstances = nonNullSet(featureInstances, FeatureType.class);\n }", "java.util.List<java.lang.Integer> getOtherIdsList();", "@Override\n\t\tpublic boolean hasStableIds() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean hasStableIds() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean hasStableIds() {\n\t\t\treturn false;\n\t\t}", "@Override\r\n public boolean hasStableIds() {\n return true;\r\n }", "@Override\n public boolean hasStableIds() {\n return true;\n }", "@Override\n public boolean hasStableIds() {\n return true;\n }", "public FeatureCursor queryFeatures() {\n return featureDao.queryIn(queryIdsSQL());\n }", "@Override\n public boolean hasStableIds() {\n return false;\n }", "@Override\n public boolean hasStableIds() {\n return false;\n }", "@Override\n public boolean hasStableIds() {\n return false;\n }", "@Override\n \t\tpublic boolean hasStableIds() {\n \t\t\treturn false;\n \t\t}", "Set<II> getIds();", "@Override\n public boolean hasStableIds()\n {\n return false;\n }", "public String [] _truncatable_ids()\r\n {\r\n return _ids_list;\r\n }", "public Set<ObjRef> getAddedRefs() {\n return Sets.newHashSet(addedObjRefToLineageRefs.keySet());\n }", "public DeletedOccurrenceInfoCollection getDeletedOccurrences()\n\t\t\tthrows ServiceLocalException {\n\t\treturn (DeletedOccurrenceInfoCollection) this.getPropertyBag()\n\t\t\t\t.getObjectFromPropertyDefinition(\n\t\t\t\t\t\tAppointmentSchema.DeletedOccurrences);\n\t}", "@Override\r\n\tpublic boolean hasStableIds() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean hasStableIds() {\n\t\treturn false;\r\n\t}", "LinkedHashSet<String> getOrderedBeanIds();", "public FeatureCollection getLastEditedFeatures(){\n return fcLastEdits;\n }", "@Override\n\tpublic boolean hasStableIds() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean hasStableIds() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean hasStableIds() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean hasStableIds() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean hasStableIds() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean hasStableIds() {\n\t\treturn true;\n\t}", "public Set<T> getRemoveEntities() {\n return unmodifiableSet(removeEntities);\n }", "public java.util.List<java.lang.Integer>\n getOtherIdsList() {\n return otherIds_;\n }", "int[] normalizedRemovedRows() {\r\n IntegerVector list = new IntegerVector();\r\n int size = entries();\r\n for (int i = 0; i < size; ++i) {\r\n byte tc = getCommand(i);\r\n if (tc == TABLE_REMOVE) {\r\n // If removed add to the list.\r\n int row_index = getRowIndex(i);\r\n list.addInt(row_index);\r\n }\r\n }\r\n return list.toIntArray();\r\n }", "@Override\n\tpublic Object[] getIds() {\n\t\treturn null;\n\t}", "public DataSourceVector getDeletedRows()\r\n throws IllegalStateException {\r\n DataSourceVector dataDeletedV = new DataSourceVector();\r\n dataDeletedV.setColumnName(columnNames);\r\n dataDeletedV.setData(dataDeleted);\r\n return dataDeletedV;\r\n }", "protected Set<String> getUserActivatedGroupIds()\n {\n Set<String> result = New.set();\n DataGroupInfoActiveSet initialActiveSet = myActiveSetConfig.getSetByName(USER_ACTIVATED_SET_NAME);\n if (initialActiveSet != null)\n {\n result.addAll(initialActiveSet.getGroupIds());\n }\n return result;\n }", "@Override\n public Set<ReferenceIdentifier> getIdentifiers() {\n return Collections.emptySet();\n }", "public java.util.List<java.lang.Integer>\n getOtherIdsList() {\n return java.util.Collections.unmodifiableList(otherIds_);\n }", "@Override\n public synchronized Set<FeatureType> getFeatures() {\n return features = nonNullSet(features, FeatureType.class);\n }", "private static Set<String> getCurrentStableIdentifiers(MySQLAdaptor dba) throws Exception {\n\t\tCollection<GKInstance> stableIdentifierInstances = dba.fetchInstancesByClass(ReactomeJavaConstants.StableIdentifier);\n\t\tSet<String> currentStableIdentifiersSet = new HashSet<>();\n\t\tfor (GKInstance stableIdentifierInst : stableIdentifierInstances) {\n\t\t\tcurrentStableIdentifiersSet.add(stableIdentifierInst.getAttributeValue(ReactomeJavaConstants.identifier).toString());\n\t\t}\n\t\treturn currentStableIdentifiersSet;\n\t}", "public List<K> getSavedIds() {\n if (dbObjects.length > 0 && dbObjects[0] instanceof JacksonDBObject) {\n throw new UnsupportedOperationException(\n \"Generated _id retrieval not supported when using stream serialization\");\n }\n\n List<K> ids = new ArrayList<K>();\n for (DBObject dbObject : dbObjects) {\n ids.add(jacksonDBCollection.convertFromDbId(dbObject.get(\"_id\")));\n }\n\n return ids;\n }", "private TreeSet<Long> getIds(Connection connection) throws Exception {\n\t\tTreeSet<Long> result = new TreeSet<Long>();\n\t\tPreparedStatement ps = null;\n\t\ttry {\n\t\t\tps = connection\n\t\t\t\t\t.prepareStatement(\"select review_feedback_id from \\\"informix\\\".review_feedback\");\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tresult.add(rs.getLong(1));\n\t\t\t}\n\t\t} finally {\n\t\t\tps.close();\n\t\t}\n\t\treturn result;\n\t}", "int getOtherIds(int index);", "@SuppressWarnings(\"unchecked\")\n\tpublic void onDeleteFeatures(ControllerEvent event) {\n\n\t\tList<String> ids = (List<String>) event.getParams().get(\"featureIds\");\n\t\tif (ids.size() > 0) {\n\t\t\t((AnderProbleem) object.getProbleem()).setGeom(null);\n\t\t}\n\t}", "public FeatureSet getFeatures() {\n\treturn features;\n }", "public Collection getPersistedObjectIds() {\n if (_payload != PAYLOAD_OIDS_WITH_ADDS) {\n if (_payload == PAYLOAD_OIDS)\n throw new UserException(s_loc.get(\"no-added-oids\"));\n throw new UserException(s_loc.get(\"extent-only-event\"));\n }\n return (_addIds == null) ? Collections.EMPTY_LIST : _addIds;\n }", "java.util.List<java.lang.Integer> getReceivingMinorFragmentIdList();", "public Vector<Integer> getDeletedNodes() throws MapsException {\n Connection conn = createConnection();\n try {\n final String sqlQuery = \"SELECT nodeid FROM node where nodetype='D'\";\n\n Statement statement = conn.createStatement();\n ResultSet rs = statement.executeQuery(sqlQuery);\n Vector<Integer> elements = new Vector<Integer>();\n while (rs.next()) {\n int nId = rs.getInt(1);\n elements.add(new Integer(nId));\n }\n rs.close();\n statement.close();\n // conn.close();\n return elements;\n } catch (Throwable e) {\n log.error(\"Exception while getting deleted nodes\");\n throw new MapsException(e);\n } finally {\n releaseConnection(conn);\n }\n }", "@Override\n\tpublic String[] getIds() {\n\t\treturn null;\n\t}", "public abstract List<QualifiedName> getAffectedFeatureTypes();", "java.util.List<java.lang.Long> getIdsList();", "protected Set<Integer> getToReplace() {\r\n \r\n Set<Integer> toReplace = new HashSet<>();\r\n double distance;\r\n Individual a, b;\r\n \r\n for(int i = 0; i < this.P.size()-1; i++) {\r\n \r\n a = this.P.get(i);\r\n \r\n for(int j = i+1; j < this.P.size(); j++) {\r\n \r\n b = this.P.get(j);\r\n \r\n distance = this.getSquaredEuclideanDistance(a.vector, b.vector);\r\n \r\n if(distance < this.minDifference) {\r\n \r\n if(a.fitness < b.fitness) {\r\n toReplace.add(j);\r\n } else {\r\n toReplace.add(i);\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n \r\n return toReplace;\r\n \r\n }", "List<Integer> getIdUsersWithExpiredLifeTimeList( Timestamp currentTimestamp );", "public int getOtherIdsCount() {\n return otherIds_.size();\n }", "public boolean hasStableIds()\n\t{\n\t\tLog.d( TAG, \"hasStableIds\" );\n\t\treturn true;\n\t}", "public synchronized Set<String> getIncomingEdges(String currentEdge) {\n\t\tif (currentEdge == null) {\n\t\t\treturn new HashSet<String>();\n\t\t}\n\t\t\n\t\tSumoEdge currentSumoEdge = getEdge(currentEdge);\n\t\tif (currentSumoEdge == null) {\n\t\t\treturn new HashSet<String>();\n\t\t}\n\t\t\n\t\tString currentEdgeEnd = graph.getEdgeTarget(currentSumoEdge);\n\t\tSet<SumoEdge> edges = graph.incomingEdgesOf(currentEdgeEnd);\n\t\t\n\t\tSet<String> edgeIds = new HashSet<String>();\n\t\tfor (SumoEdge edge: edges) {\n\t\t\tedgeIds.add(edge.getId());\n\t\t}\n\t\t\n\t\treturn edgeIds;\n\t}", "public int getOtherIdsCount() {\n return otherIds_.size();\n }", "public Collection getUpdatedObjectIds() {\n if (_payload == PAYLOAD_EXTENTS)\n throw new UserException(s_loc.get(\"extent-only-event\"));\n return (_updates == null) ? Collections.EMPTY_LIST : _updates;\n }", "public Set<String> getUnFinishedToken() {\n Set<String> unFinishedList = new HashSet<>();\n synchronized (statusMap) {\n Iterator<String> iterator = statusMap.keySet().iterator();\n while (iterator.hasNext()) {\n String token = iterator.next();\n ZipStatus zipStatus = statusMap.get(token);\n if (zipStatus == ZipStatus.CREATE || zipStatus == ZipStatus.UNZIPPING) {\n unFinishedList.add(token);\n }\n }\n }\n return unFinishedList;\n }", "List<Category> getDeletedCategories();", "@Override\n public Collection<ContextKey> getContextKeys() {\n Collection<ContextKey> result = Sets.newHashSet();\n for (ContextualFilter filter : steps) {\n result.addAll(filter.getContextKeys());\n }\n return result;\n }", "String[] _truncatable_ids();", "@NoProxy\n @NoDump\n public Set<String> getTimeZoneIds() {\n Set<String> ids = new TreeSet<>();\n\n BwDateTime dt = getDtstart();\n if ((dt != null) && (dt.getTzid() != null)) {\n ids.add(dt.getTzid());\n }\n\n dt = getDtend();\n if ((dt != null) && (dt.getTzid() != null)) {\n ids.add(dt.getTzid());\n }\n\n Set<BwDateTime> dts = getRdates();\n if (dts != null) {\n for (BwDateTime rdt: dts) {\n if (rdt.getTzid() != null) {\n ids.add(rdt.getTzid());\n }\n }\n }\n\n dts = getExdates();\n if (dts != null) {\n for (BwDateTime rdt: dts) {\n if (rdt.getTzid() != null) {\n ids.add(rdt.getTzid());\n }\n }\n }\n\n List<BwFreeBusyComponent> fbcs = getFreeBusyPeriods();\n if (fbcs != null) {\n for (BwFreeBusyComponent fbc: fbcs) {\n for (Period p: fbc.getPeriods()) {\n DateTime fdt = p.getStart();\n if (fdt.getTimeZone() != null) {\n ids.add(fdt.getTimeZone().getID());\n }\n\n fdt = p.getEnd();\n if (fdt.getTimeZone() != null) {\n ids.add(fdt.getTimeZone().getID());\n }\n }\n }\n }\n\n return ids;\n }", "public Set<String> getActiveGroupIds()\n {\n return myActiveGroups.stream().filter(g -> !g.activationProperty().isActivatingOrDeactivating()).map(g -> g.getId())\n .collect(Collectors.toSet());\n }", "public List<FeatureDataBean> getAllFeatures() throws GenericDatabaseException {\n List<String> ids = new ArrayList<>();\n ids.add(UMFeatureDao.PARENT);\n \n Map<String,Object> equals=new HashMap<>();\n equals.put(UMFeatureDao.IS_ACTIVE, Boolean.TRUE);\n \n Map<QueryOperators, Object> criteria = new HashMap<>();\n criteria.put(QueryOperators.IS_NULL, ids);\n criteria.put(QueryOperators.EQUAL, equals);\n \n return (convertFeatureDataBeanToFeatureModel(featureService.retrieveFeatures(null, criteria, null)));\n }", "java.util.List<iet.distributed.telemetry.Feature> \n getFeatureList();", "public Long [] getDropManagedIds() {\n return this.DropManagedIds;\n }", "public Set<String> getFeatures();", "public Set<URI> getMemberIdentities() {\n\t\tSet<URI> result = new HashSet<>();\n\t\tfor (URI memberURI : members) {\n\t\t\tTopLevel member = this.getSBOLDocument().getTopLevel(memberURI);\n\t\t\tif(member != null) {\n\t\t\t\tresult.add(member.getIdentity());\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public Set<Long> allInfoProductIds() {\n return new HashSet<Long>( );\n }", "public String[] getIDs() {\n return impl.getIDs();\n }", "public java.util.List<String> getIds() {\n return ids;\n }", "public ArrayList<Integer> getOutsideFaceIndices()\n\t{\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faces.size(); i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(getFace(i).getNoOfFacesToOutside() == 0)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public Vector getServiceIds() throws ServiceException {\n return namingService.getServiceIds();\n }", "protected Collection getRemovableAttributeKeys()\r\n\t\t\tthrows IOException, ParsingException, AlgorithmExecutionException {\r\n\t\treturn CollectionUtils.subtract(edgeSchema.keySet(), NWBFileProperty.NECESSARY_EDGE_ATTRIBUTES.keySet());\r\n\t}", "public String getIds() {\n return ids;\n }", "public String getIds() {\n return ids;\n }", "int[] selectEmbeddings(int cutoff) {\n\n Matrix input_ = model_.wi_;\n List<L2NormData> normIndexes = new ArrayList<>(input_.m_);\n int eosid = dict_.getId(Dictionary.EOS); // we want to retain EOS\n for (int i = 0; i < input_.m_; i++) {\n if (i == eosid) {\n continue;\n }\n normIndexes.add(new L2NormData(i, input_.l2NormRow(i)));\n }\n normIndexes.sort((a, b) -> Float.compare(b.l2Norm, a.l2Norm));\n\n int[] result = new int[cutoff];\n for (int i = 0; i < cutoff - 1; i++) {\n result[i] = normIndexes.get(i).index;\n }\n // add EOS.\n result[cutoff - 1] = eosid;\n return result;\n }", "List<ArgumentEntity> getArgumentsByUser(UUID id, boolean includeDeleted);", "public List<Car> getReadyForDeletion() {\n\n \tList<Car> listDeletedCars = em.createNamedQuery(\"Car.findCarsToBeDeleted\", Car.class).getResultList();\n \treturn listDeletedCars;\n \t\n }", "FeatureId getFeatureId();", "public Long[] getQueryIDs(){\n\t\treturn DataStructureUtils.toArray(ids_ranks.keySet(), Long.class);\n\t}", "public void evt_DeleteCurrent()\r\n {\r\n rh4PickFlags[0] = -1;\r\n rh4PickFlags[1] = -1;\r\n rh4PickFlags[2] = -1;\r\n rh4PickFlags[3] = -1;\r\n\r\n int oil;\r\n CObjInfo oilPtr;\r\n for (oil = 0; oil < rhPtr.rhMaxOI; oil++)\r\n {\r\n oilPtr = rhPtr.rhOiList[oil];\r\n oilPtr.oilEventCount = rh2EventCount;\r\n oilPtr.oilListSelected = -1;\r\n oilPtr.oilNumOfSelected = 0;\r\n }\r\n }", "@Override\r\n\tpublic Integer[] getTabsRemoved() {\n\t\treturn null;\r\n\t}", "void deleteFeature(Integer id);", "int getOtherIdsCount();", "public Set<Long> getExistingBackFileIndexSet() {\n final Set<Long> indexSet = new HashSet<Long>();\n final File[] pageFiles = this.pageDirFile.listFiles();\n if (pageFiles != null && pageFiles.length > 0)\n for (final File pageFile : pageFiles) {\n final String fileName = pageFile.getName();\n if (fileName.endsWith(PAGE_FILE_SUFFIX)) {\n final long index = this.getIndexByFileName(fileName);\n indexSet.add(index);\n }\n }\n return indexSet;\n }", "private void purgeObsoleteExposureIDs( long now) {\n\t\tassert( this.getAppType() == Beacon.AppType.APPLE_GOOGLE_CONTACT_TRACING);\n\t\tlong beforeTS = now - getDurationKeepExposureIDs();\n\t\tif ( !this.idStore.purge( new Date( beforeTS))) {\n\t\t\tlogger.warning( \"failure to purge old exposures\");\n\t\t} else {\n\t\t\tsetPurgedObsoleteExposureIDsTS( now);\n\t\t}\n\t}", "List<Feature> getFeatures();", "@Nonnull\r\n public Set<Feature> getFeatures() {\r\n return features;\r\n }", "public java.util.List<java.lang.String> getVariantSetIds() {\n return variantSetIds;\n }", "public java.lang.String[] getDeletedFiles(){\r\n return localDeletedFiles;\r\n }", "Feature delete(Long featureId);", "public void clean() {\n Long now = System.currentTimeMillis();\n for (Iterator<Long> iterator = this.deleted.iterator(); iterator.hasNext();) {\n Long l = iterator.next();\n if (l < now) {\n iterator.remove();\n }\n }\n }", "public Vector getDependencyIdrefs()\n {\n return mDependencyIdrefs;\n }", "void compareDeletion();", "public ZYSet<ElementType> difference(ZYSet<ElementType> otherSet){\n ZYSet<ElementType> result = new ZYArraySet<ElementType>();\n for(ElementType e :this){\n if(!otherSet.contains(e)){\n result.add(e);\n }\n }\n return result;\n }" ]
[ "0.6085936", "0.5902112", "0.5722713", "0.54058903", "0.5323928", "0.5238871", "0.5237597", "0.5193852", "0.5193852", "0.5193852", "0.51659644", "0.51643443", "0.51643443", "0.51619184", "0.51581347", "0.51581347", "0.51581347", "0.5132235", "0.5126154", "0.51208776", "0.5099956", "0.5093433", "0.5088038", "0.5074036", "0.5074036", "0.50567245", "0.5048304", "0.50441396", "0.50441396", "0.50441396", "0.50441396", "0.50368696", "0.50368696", "0.50105023", "0.50047475", "0.49961403", "0.4990458", "0.49858007", "0.4976006", "0.4970402", "0.4966439", "0.49553302", "0.4940128", "0.49323717", "0.4893329", "0.48847225", "0.48841903", "0.4884021", "0.48672867", "0.4848519", "0.48359933", "0.48348784", "0.4833583", "0.48305786", "0.48303378", "0.48254198", "0.4802487", "0.47976425", "0.47794244", "0.4769797", "0.4769794", "0.47688618", "0.4758531", "0.4754779", "0.47506505", "0.4746478", "0.47335798", "0.473007", "0.47258258", "0.47207925", "0.47085324", "0.47030848", "0.47015765", "0.4701114", "0.46975616", "0.46924493", "0.46788064", "0.46754634", "0.46682635", "0.46682635", "0.4663097", "0.46607858", "0.4660505", "0.4633783", "0.46320266", "0.46294966", "0.46283647", "0.46273693", "0.4613185", "0.46117923", "0.46100146", "0.46035087", "0.46027505", "0.4602609", "0.46012735", "0.45977828", "0.45966947", "0.4593979", "0.45904034", "0.45899284" ]
0.55852085
3
Contains all ids for features that were created after startVersion (a feature may be both in this set and in deleted if it was created and then deleted)
public Set getCreated() { return Collections.unmodifiableSet(created); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Set getFeatureIDs (FeatureType ft, Filter filter,\r\n DBAccess osa) throws Exception {\r\n \r\n StringBuffer query = new StringBuffer (\r\n \"SELECT \" + ft.getMasterTable().getIdField());\r\n AbstractSQLBuilder sqlBuilder = new GMLDBSQLBuilder (ft);\r\n \r\n if (filter != null) {\r\n query.append (sqlBuilder.filter2SQL (filter));\r\n } else {\r\n query.append (\" FROM \" + ft.getMasterTable().getTargetName());\r\n }\r\n \r\n java.sql.Connection con = osa.getConnection ();\r\n Statement stmt = con.createStatement ();\r\n ResultSet rs = stmt.executeQuery (query.toString ()); \r\n\r\n TreeSet fIDs = new TreeSet ();\r\n\r\n // extract all affected Feature-IDs (as Strings)\r\n while (rs.next()) {\r\n String fID = rs.getString (1);\r\n fIDs.add (fID);\r\n }\r\n\r\n rs.close ();\r\n stmt.close ();\r\n return fIDs;\r\n }", "@Override\n public synchronized Set<FeatureType> getFeatureInstances() {\n return featureInstances = nonNullSet(featureInstances, FeatureType.class);\n }", "public FeatureCursor queryFeatures() {\n return featureDao.queryIn(queryIdsSQL());\n }", "public FeatureSet getFeatures() {\n\treturn features;\n }", "@Override\n public synchronized Set<FeatureType> getFeatures() {\n return features = nonNullSet(features, FeatureType.class);\n }", "@Override\n public boolean hasStableIds() {\n return true;\n }", "List<Feature> getFeatures();", "boolean hasStableIds();", "java.util.List<iet.distributed.telemetry.Feature> \n getFeatureList();", "@Nonnull\r\n public Set<Feature> getFeatures() {\r\n return features;\r\n }", "FeatureId getFeatureId();", "public Set<String> getFeatures();", "@Override\n public boolean hasStableIds() {\n return true;\n }", "@Override\n public boolean hasStableIds() {\n return true;\n }", "@Override\r\n public boolean hasStableIds() {\n return true;\r\n }", "public static List<Feature> getList(int id) throws SQLException {\r\n\t\tString VideoIdColumnName = \"VIDEO_ID\";\r\n\t\tResultSet rs = operation.getRow(\"VENDOR_MODEL\", VideoIdColumnName, id);\r\n\t\t\t\t\r\n\t\tList<Feature> list = new ArrayList<Feature>();\r\n\r\n\t\twhile (rs.next()) {\r\n\t\t\t\r\n\t\t\tFeature feature = new Feature()\r\n\t\t\t\t\t.setFeatureId(rs.getString(\"FEATURE_ID\"))\r\n\t\t\t\t\t.setVideoId(rs.getString(\"VIDEO_ID\"))\r\n\t\t\t\t\t.setFeatureName(rs.getString(\"FEATURE_NAME\"))\r\n\t\t\t\t\t.setFeatureVector(rs.getString(\"FEATURE_VECTOR\"))\r\n\t\t\t\t\t.setCreationDate(rs.getString(\"CREATION_DATE\"));\r\n\r\n\t\t\tlist.add(feature);\r\n\t\t}\r\n\r\n\t\tSystem.out.println(list.size());\r\n\t\treturn list;\r\n\t}", "@Override\n public Class<? extends Feature> getFeatureClass() {\n\treturn VersionFeatures.class;\n }", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "public List<FeatureDataBean> getAllFeatures() throws GenericDatabaseException {\n List<String> ids = new ArrayList<>();\n ids.add(UMFeatureDao.PARENT);\n \n Map<String,Object> equals=new HashMap<>();\n equals.put(UMFeatureDao.IS_ACTIVE, Boolean.TRUE);\n \n Map<QueryOperators, Object> criteria = new HashMap<>();\n criteria.put(QueryOperators.IS_NULL, ids);\n criteria.put(QueryOperators.EQUAL, equals);\n \n return (convertFeatureDataBeanToFeatureModel(featureService.retrieveFeatures(null, criteria, null)));\n }", "Set<II> getIds();", "public static void identifyFeaturesSelectedForCID()\n {\n MSRun run = (MSRun) ApplicationContext.getProperty(SharedProperties.MS_RUN);\n FeatureSet runMs2Features = run.getTandemFeatureSet(2);\n runMs2Features.setSourceFile(new File(run.getFile().getPath() + \".ms2.tsv\"));\n// runMs2Features.setSourceFile(new File(\"generated_features_for_cid\"));\n ClusteringFeatureSetMatcher cFSM =\n new ClusteringFeatureSetMatcher(.1f, FeatureSetMatcher.DELTA_MASS_TYPE_ABSOLUTE, 5);\n cFSM.setElutionMode(ClusteringFeatureSetMatcher.ELUTION_MODE_SCAN);\n cFSM.setUseMassInsteadOfMz(false);\n cFSM.setElutionBucketIncrement(1);\n cFSM.setMassBucketIncrement(.025);\n\n List<FeatureSet> featureSets =\n (List<FeatureSet>) ApplicationContext.getProperty(SharedProperties.FEATURE_SETS);\n FeatureSet ms1Features = null;\n\n boolean noFeatureSetToMine = false;\n if (featureSets == null)\n noFeatureSetToMine = true;\n if (!noFeatureSetToMine)\n for (FeatureSet fs : featureSets)\n {\n if (fs.isDisplayed())\n ms1Features = fs;\n }\n if (ms1Features == null)\n noFeatureSetToMine = true;\n\n if (noFeatureSetToMine)\n {\n //make this translatable\n //not really necessary since we make this inaccessible if no features are displayed\n ApplicationContext.infoMessage(\"You must select and display a set of features in order to find the ones selected for CID\");\n return;\n }\n\n\n FeatureSetMatcher.FeatureMatchingResult featureMatchingResult =\n cFSM.matchFeatures(ms1Features, runMs2Features);\n\n Feature[] ms1FeaturesSelectedForCID = new Feature[featureMatchingResult.size()];\n\n\n //first set CID scan of all ms1 features to not-found\n for (Feature feature : ms1Features.getFeatures())\n {\n feature.setProperty(\"cidscan\",-1);\n }\n //set CID scan of all matched ms1 features to the MS2 feature's scan number\n int i=0;\n for (Feature ms1Feature : featureMatchingResult.getMasterSetFeatures())\n {\n ms1Feature.setProperty(\"cidscan\",featureMatchingResult.getBestMatch(ms1Feature));\n ms1FeaturesSelectedForCID[i++] = ms1Feature;\n }\n\n FeatureSet ms1FeatureSetForCID = new FeatureSet(ms1FeaturesSelectedForCID,\n FeatureSelectionFrame.FeatureSelectionDialog.nextColor());\n// ms1FeatureSetForCID.setSourceFile(new File(\"generated_features_for_cid\"));\n\n //copy the feature set list because otherwise the main panel doesn't update\n ArrayList<FeatureSet> featureSetListCopy = new ArrayList<FeatureSet>(featureSets.size());\n featureSetListCopy.addAll(featureSets);\n featureSetListCopy.add(ms1FeatureSetForCID);\n featureSetListCopy.add(runMs2Features);\n\n ApplicationContext.setProperty(SharedProperties.FEATURE_SETS, featureSetListCopy);\n ApplicationContext.setProperty(SharedProperties.FEATURE_RANGES, featureSetListCopy);\n\n ResultsDialog resultsDialog =\n new ResultsDialog(ms1Features, ms1FeatureSetForCID, runMs2Features, featureMatchingResult);\n resultsDialog.setVisible(true);\n }", "public TreeMap<String,VersionID> \n getVersionIDs()\n {\n TreeMap<String,VersionID> versions = new TreeMap<String,VersionID>();\n for(String name : pVersionFields.keySet()) {\n JCollectionField field = pVersionFields.get(name);\n versions.put(name, pVersionIDs.get(name).get(field.getSelectedIndex()));\n }\n return versions;\n }", "public static HashSet<org.cidarlab.raven.datastructures.Part> phoenixFeaturesToRavenParts(List<Feature> features) {\n \n HashSet<org.cidarlab.raven.datastructures.Part> ravenParts = new HashSet();\n \n //For each module, make a Raven blank basic part\n for (Feature f : features) { \n if (!f.getRole().equals(Feature.FeatureRole.VECTOR)) {\n \n String name = f.getName().replaceAll(\".ref\", \"\");\n String type = f.getRole().toString().toLowerCase();\n if (type.contains(\"cds\")) {\n if (type.contains(\"fluorescent\")) {\n type = \"reporter\";\n } else {\n type = \"gene\";\n }\n } else if (type.contains(\"promoter\")) {\n type = \"promoter\";\n }\n String sequence = f.getSequence().getSequence();\n \n ArrayList<String> dirF = new ArrayList();\n dirF.add(\"+\");\n ArrayList<String> dirR = new ArrayList();\n dirR.add(\"-\");\n ArrayList<String> typeL = new ArrayList();\n typeL.add(type);\n \n //Forward version\n org.cidarlab.raven.datastructures.Part newBasicPart = org.cidarlab.raven.datastructures.Part.generateBasic(name, sequence, null, typeL, dirF, \"\", \"\");\n newBasicPart.setTransientStatus(false);\n\n //Reverse version\n org.cidarlab.raven.datastructures.Part newReverseBasicPart = org.cidarlab.raven.datastructures.Part.generateBasic(name, PrimerDesign.reverseComplement(sequence), null, typeL, dirR, \"\", \"\");\n newReverseBasicPart.setTransientStatus(false);\n \n ravenParts.add(newBasicPart);\n ravenParts.add(newReverseBasicPart);\n }\n }\n \n return ravenParts;\n }", "@Override\n\tpublic boolean hasStableIds() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean hasStableIds() {\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean hasStableIds() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean hasStableIds() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean hasStableIds() {\n\t\t\treturn false;\n\t\t}", "@Override\n public Set<ReferenceIdentifier> getIdentifiers() {\n return Collections.emptySet();\n }", "public org.landxml.schema.landXML11.FeatureDocument.Feature[] getFeatureArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(FEATURE$14, targetList);\r\n org.landxml.schema.landXML11.FeatureDocument.Feature[] result = new org.landxml.schema.landXML11.FeatureDocument.Feature[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "@Override\n \t\tpublic boolean hasStableIds() {\n \t\t\treturn false;\n \t\t}", "public org.landxml.schema.landXML11.FeatureDocument.Feature[] getFeatureArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(FEATURE$6, targetList);\r\n org.landxml.schema.landXML11.FeatureDocument.Feature[] result = new org.landxml.schema.landXML11.FeatureDocument.Feature[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "public org.landxml.schema.landXML11.FeatureDocument.Feature[] getFeatureArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(FEATURE$6, targetList);\r\n org.landxml.schema.landXML11.FeatureDocument.Feature[] result = new org.landxml.schema.landXML11.FeatureDocument.Feature[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "public abstract List<QualifiedName> getAffectedFeatureTypes();", "private TreeSet<Long> getIds(Connection connection) throws Exception {\n\t\tTreeSet<Long> result = new TreeSet<Long>();\n\t\tPreparedStatement ps = null;\n\t\ttry {\n\t\t\tps = connection\n\t\t\t\t\t.prepareStatement(\"select review_feedback_id from \\\"informix\\\".review_feedback\");\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tresult.add(rs.getLong(1));\n\t\t\t}\n\t\t} finally {\n\t\t\tps.close();\n\t\t}\n\t\treturn result;\n\t}", "public Set<Long> allInfoProductIds() {\n return new HashSet<Long>( );\n }", "@Override\n public boolean hasStableIds() {\n return false;\n }", "@Override\n public boolean hasStableIds() {\n return false;\n }", "@Override\n public boolean hasStableIds() {\n return false;\n }", "protected Set<String> getUserActivatedGroupIds()\n {\n Set<String> result = New.set();\n DataGroupInfoActiveSet initialActiveSet = myActiveSetConfig.getSetByName(USER_ACTIVATED_SET_NAME);\n if (initialActiveSet != null)\n {\n result.addAll(initialActiveSet.getGroupIds());\n }\n return result;\n }", "@Override\n public boolean hasStableIds()\n {\n return false;\n }", "@Override\r\n\tpublic boolean hasStableIds() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean hasStableIds() {\n\t\treturn false;\r\n\t}", "private static Set<String> getCurrentStableIdentifiers(MySQLAdaptor dba) throws Exception {\n\t\tCollection<GKInstance> stableIdentifierInstances = dba.fetchInstancesByClass(ReactomeJavaConstants.StableIdentifier);\n\t\tSet<String> currentStableIdentifiersSet = new HashSet<>();\n\t\tfor (GKInstance stableIdentifierInst : stableIdentifierInstances) {\n\t\t\tcurrentStableIdentifiersSet.add(stableIdentifierInst.getAttributeValue(ReactomeJavaConstants.identifier).toString());\n\t\t}\n\t\treturn currentStableIdentifiersSet;\n\t}", "public List<String> getFeatures() {\n return features;\n }", "@Override\n\tpublic boolean hasStableIds() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean hasStableIds() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean hasStableIds() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean hasStableIds() {\n\t\treturn false;\n\t}", "public List<K> getSavedIds() {\n if (dbObjects.length > 0 && dbObjects[0] instanceof JacksonDBObject) {\n throw new UnsupportedOperationException(\n \"Generated _id retrieval not supported when using stream serialization\");\n }\n\n List<K> ids = new ArrayList<K>();\n for (DBObject dbObject : dbObjects) {\n ids.add(jacksonDBCollection.convertFromDbId(dbObject.get(\"_id\")));\n }\n\n return ids;\n }", "public java.util.List getFeature() \n {\n \tModelFacade instance = ModelFacade.getInstance(this.refOutermostPackage().refMofId());\n \tif (instance != null && \n \t\tinstance.isRepresentative(this.refMofId())&&\n \t\tinstance.hasRefObject(this.refMofId()))\n \t{ \t\n \t\tList list = instance.getFeature(this.refMofId());\n \t\tlist.addAll(super_getFeature());\n \t\t\n \t\treturn list; \t\t\n \t}\n \n \treturn super_getFeature();\n }", "@Override\n\tpublic Object[] getIds() {\n\t\treturn null;\n\t}", "public Integer getProductFeatureId() {\r\n\t\treturn productFeatureId;\r\n\t}", "public String [] _truncatable_ids()\r\n {\r\n return _ids_list;\r\n }", "public Feature[] getFeatures() {\n Feature[] features = new Feature[rows.size()];\n for(int i=0;i<features.length;i++){\n features[i] = (Feature)rows.elementAt(i);\n }\n return features;\n }", "protected Vector getFeatureSet()\n {\n // get the superclass' vector\n Vector v = super.getFeatureSet();\n\n // add the features\n\n // return the vector\n return v;\n }", "public DasFeature[] getAllFeatures() {\n Vector feats = new Vector();\n while (iXml.indexOf(\"<FEATURE\", lastFeatureEndPosition + 9) != -1) {\n String feature = iXml.substring(iXml.indexOf(\"<FEATURE\", lastFeatureEndPosition + 9), iXml.indexOf(\"</FEATURE>\", lastFeatureEndPosition + 9) + 10);\n lastFeatureEndPosition = iXml.indexOf(\"</FEATURE>\", lastFeatureEndPosition + 9);\n if (feature.indexOf(\"<NOTE>No features found for the segment</NOTE>\") < 0) {\n DasFeature f = new DasFeature(feature);\n feats.add(f);\n }\n }\n DasFeature[] features = new DasFeature[feats.size()];\n feats.toArray(features);\n return features;\n }", "public String[] getIDs() {\n return impl.getIDs();\n }", "public <LabelType> void loadFeaturesID(Model<T, LabelType> model) {\n\t\tfeaturesID.clear();// remove all elements before\n\t\tfor (T feature : features) {\n\t\t\tfeaturesID.add(model.getDictionary().indexOf(feature));\n\t\t}\n\t\tfeaturesIdLoaded = true;\n\t}", "Collection<Feature> getReference();", "java.util.List<java.lang.Long> getIdsList();", "LinkedHashSet<String> getOrderedBeanIds();", "public Set<ObjRef> getAddedRefs() {\n return Sets.newHashSet(addedObjRefToLineageRefs.keySet());\n }", "java.util.List<java.lang.Integer> getOtherIdsList();", "public java.util.List<String> getReservedInstancesIds() {\n if (reservedInstancesIds == null) {\n reservedInstancesIds = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();\n reservedInstancesIds.setAutoConstruct(true);\n }\n return reservedInstancesIds;\n }", "public Set<URI> getMemberIdentities() {\n\t\tSet<URI> result = new HashSet<>();\n\t\tfor (URI memberURI : members) {\n\t\t\tTopLevel member = this.getSBOLDocument().getTopLevel(memberURI);\n\t\t\tif(member != null) {\n\t\t\t\tresult.add(member.getIdentity());\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public Iterator<Feature> featureIterator(){\n\t\treturn indexByFeature.keySet().iterator();\n\t}", "private FeatureCollection<SimpleFeatureType, SimpleFeature> findFeatures( FeatureStore<SimpleFeatureType, SimpleFeature> store, List<String> fidList ) throws SOProcessException {\n \n\n try {\n FidFilter filter = FILTER_FACTORY.createFidFilter();\n filter.addAllFids(fidList);\n \n FeatureCollection<SimpleFeatureType, SimpleFeature> features = store.getFeatures(filter);\n return features;\n \n } catch (IOException e) {\n final String msg = e.getMessage();\n LOGGER.severe(msg);\n throw new SOProcessException(msg);\n }\n }", "public boolean hasStableIds()\n\t{\n\t\tLog.d( TAG, \"hasStableIds\" );\n\t\treturn true;\n\t}", "Set<String> getIdentifiers();", "public Vector getServiceIds() throws ServiceException {\n return namingService.getServiceIds();\n }", "public Vector<String> getIdentifiers()\n\t{\n\t\tfinal Vector<String> rets = new Vector<String>();\n\t\trets.add(identifier);\n\t\treturn rets;\n\t}", "Iterable<Long> vertices() {\n //YOUR CODE HERE, this currently returns only an empty list.\n return world.keySet();\n }", "public Collection getPersistedObjectIds() {\n if (_payload != PAYLOAD_OIDS_WITH_ADDS) {\n if (_payload == PAYLOAD_OIDS)\n throw new UserException(s_loc.get(\"no-added-oids\"));\n throw new UserException(s_loc.get(\"extent-only-event\"));\n }\n return (_addIds == null) ? Collections.EMPTY_LIST : _addIds;\n }", "List<Integer> getIdUsersWithExpiredLifeTimeList( Timestamp currentTimestamp );", "List<IFeature> getFeatureList();", "protected Set<Integer> getInnovations() {\n\t\treturn genes.keySet();\n\t}", "@Override\n public Collection<ContextKey> getContextKeys() {\n Collection<ContextKey> result = Sets.newHashSet();\n for (ContextualFilter filter : steps) {\n result.addAll(filter.getContextKeys());\n }\n return result;\n }", "public Set<Long> allActorIds() {\n return new HashSet<Long>( );\n }", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return IntersectionImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { IntersectionImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return IntersectionImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public java.util.List<java.lang.String> getVariantSetIds() {\n return variantSetIds;\n }", "public FeatureCollection getLastEditedFeatures(){\n return fcLastEdits;\n }", "public int getIdSet() {\r\n return idSet;\r\n }", "@Override\n\tpublic String[] getIds() {\n\t\treturn null;\n\t}", "private static Map<String, FeatureType> buildAvailableFeatureMap(List<FeatureType> features){\r\n\t\tMap<String, FeatureType> featureMap = new HashMap<String, FeatureType>();\r\n\t\tfor(FeatureType feature : features){\r\n\t\t\tfeatureMap.put(feature.getExternalId(), feature);\r\n\t\t}\r\n\t\treturn featureMap;\r\n\t}", "@Override public Collection<String> getServerIds() {\n return getTrackedBranches().getServerIds();\n }", "private void migrateFeaturesStep_1(Context context, Map featObjMap)\r\n throws Exception{\r\n\r\n \t mqlLogRequiredInformationWriter(\"Inside method migrateFeaturesStep_1 \"+ \"\\n\");\r\n \t //These selectables are for Parent Feature\r\n \t StringList featureObjSelects = new StringList();\r\n\t\t featureObjSelects.addElement(SELECT_TYPE);\r\n\t\t featureObjSelects.addElement(SELECT_NAME);\r\n\t\t featureObjSelects.addElement(SELECT_REVISION);\r\n\t\t featureObjSelects.addElement(SELECT_VAULT);\r\n\t\t featureObjSelects.addElement(SELECT_ID);\r\n\r\n\t\t featureObjSelects.addElement(\"attribute[\"+ATTRIBUTE_NEW_FEATURE_TYPE+\"]\");\r\n\t\t featureObjSelects.addElement(\"attribute[\"+ATTRIBUTE_FTRMigrationConflict+\"]\");\r\n\r\n\t\t featureObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT+\"]\");//goes into LF or MF type\r\n\t\t featureObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_DUPLICATE_PART_XML+\"]\");//goes into LF,MF,CF type\r\n\t\t featureObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_NAME+\"]\");//goes into LF,MF,CF type\r\n\t\t featureObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_TEXT+\"]\");//goes into LF,MF,CF type\r\n\t\t featureObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_ORIGINATOR+\"]\");//goes into LF,MF,CF type\r\n\r\n\t\t String featureObjId = \"\";\r\n String strType = \"\";\r\n String strName = \"\";\r\n String strRevision = \"\";\r\n String strNewRelId = \"\";\r\n \t featureObjId = (String) featObjMap.get(SELECT_ID);\r\n\r\n\r\n \t String isConflictFeature = (String)featObjMap.get(\"attribute[\"+ATTRIBUTE_FTRMigrationConflict+\"]\");\r\n\t\t String strContextUsage = (String)featObjMap.get(\"attribute[\"+ATTRIBUTE_NEW_FEATURE_TYPE+\"]\");\r\n\r\n\t\t StringList sLFLToDelete = new StringList(); //FLs list to delete\r\n\r\n\t\t strType = (String) featObjMap.get(SELECT_TYPE);\r\n\t\t strName = (String) featObjMap.get(SELECT_NAME);\r\n\t\t strRevision = (String) featObjMap.get(SELECT_REVISION);\r\n\r\n\r\n\t\t if((strType!=null\r\n\t\t\t\t &&(mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)\r\n\t || mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n\t || mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_STRUCTURES))))\r\n {\r\n\t\t\t isConflictFeature = \"No\";\r\n\t\t }\r\n\r\n\t\t if(isConflictFeature.equalsIgnoreCase(\"No\")\r\n\t\t || mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)\r\n\t\t\t || mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n\t\t\t || mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_STRUCTURES))\r\n\t\t {\r\n\r\n\r\n\t\t DomainObject domFeatureObj = new DomainObject(featureObjId);\r\n\r\n\t\t HashMap mapAttribute = new HashMap();\r\n\r\n\t\t //check whether feature is standalone or Toplevel or is in the Structure\r\n\t\t //String relPattern = ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO;\r\n\r\n\t\t StringBuffer sbRelPattern1 = new StringBuffer(50);\r\n\t\t\tsbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO);\r\n\t\t\tsbRelPattern1.append(\",\");\r\n\t\t\tsbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_CANDIDATE_ITEM);\r\n\r\n\t\t\tStringBuffer sbTypePattern2 = new StringBuffer(50);\r\n\t\t\t\tsbTypePattern2.append(ConfigurationConstants.TYPE_FEATURE_LIST);\r\n\t\t\t\tsbTypePattern2.append(\",\");\r\n\t\t\t\tsbTypePattern2.append(ConfigurationConstants.TYPE_MODEL);\r\n\r\n\r\n\r\n\r\n\t\t StringList flObjSelects = new StringList();\r\n\t\t flObjSelects.addElement(ConfigurationConstants.SELECT_ID);\r\n\t\t flObjSelects.addElement(DomainObject.SELECT_FROM_ID);\r\n\t\t flObjSelects.addElement(DomainObject.SELECT_TO_ID);\r\n\r\n\t\t StringList flRelSelects = new StringList();\r\n\t\t flRelSelects.addElement(ConfigurationConstants.SELECT_RELATIONSHIP_ID);\r\n\t\t flRelSelects.addElement(\"from.from[\" + ConfigurationConstants.RELATIONSHIP_RESOURCE_USAGE + \"].id\");\r\n\r\n\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_CANDIDATE_ITEM+\"].from.id\");\r\n\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_CANDIDATE_ITEM+\"].id\");\r\n\r\n\t\t //Get the Feature Ids,Type and New Feature Type attribute values... when \"Feature List To\" rel traversed\r\n\t\t flObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.id\");\r\n\t\t flObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.type\");\r\n\t\t flObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.attribute[\"+ATTRIBUTE_NEW_FEATURE_TYPE+\"]\");\r\n\r\n\t\t //Get the Feature Ids,Type and New Feature Type attribute values... when \"Feature List From\" rel traversed\r\n\t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.id\");\r\n\t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.type\");\r\n\t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.attribute[\"+ATTRIBUTE_NEW_FEATURE_TYPE+\"]\");\r\n\r\n\t\t //In DV id Inactive in context of Product or Invalid in context of PV\r\n\t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+\"].id\");\r\n\t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+\"].from.id\");\r\n\t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+\"].from.type\");\r\n\t\t //flObjSelects.addElement(\"from[\" + ConfigurationConstants.RELATIONSHIP_RESOURCE_USAGE + \"].id\");\r\n\t\t //selectables of all attributes on FL which are to be migrated\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_CHILD_MARKETING_NAME+\"]\"); //goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_CHILD_OBJECT_NAME+\"]\"); //goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_PARENT_MARKETING_NAME+\"]\"); //goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_PARENT_OBJECT_NAME+\"]\"); //goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_USAGE+\"]\"); //goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_QUANTITY+\"]\"); //goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_COMPONENT_LOCATION+\"]\"); //goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_REFERENCE_DESIGNATOR+\"]\");//goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FORCE_PART_REUSE+\"]\");//goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FIND_NUMBER+\"]\");//goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_LIST_PRICE+\"]\");//goes on to CF and CO relationship\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MAXIMUM_QUANTITY+\"]\"); //goes on to CF and CO relationship\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MINIMUM_QUANTITY+\"]\");//goes on to CF and CO relationship\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_DEFAULT_SELECTION+\"]\");//goes on to CF and CO relationship\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_RULE_TYPE+\"]\");//goes on to CF,LF,MF relationship\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_KEY_IN_TYPE+\"]\"); //goes on to CF type\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_INHERITED+\"]\"); //will go as interface attribute onto relationship mentioned in PES\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MANDATORY_FEATURE+\"]\");//this will be used as described in PES\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FEATURE_SELECTION_TYPE+\"]\"); //will get split\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+\"]\"); //will get split\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_ACTIVE_COUNT+\"]\");\r\n \t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_INACTIVE_COUNT+\"]\");\r\n\r\n \t\t //selectables of attribute on FLF relationship\r\n \t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_SEQUENCE_ORDER+\"]\");\r\n\r\n \t\t //selectables to determine if the Feature can have Key-In Type = Input\r\n \t\t flObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].to.attribute[\"+ConfigurationConstants.ATTRIBUTE_KEY_IN_TYPE+\"]\");\r\n \t\t flObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].to.attribute[\"+ConfigurationConstants.ATTRIBUTE_FEATURE_SELECTION_TYPE+\"]\");\r\n\r\n \t\t //selectable to get Key-In Value on Selected Option Relationship\r\n \t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].from.id\");\r\n \t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_KEY_IN_VALUE+\"]\");\r\n \t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].id\");\r\n \t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].from.id\");\r\n\r\n \t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_CONFIGURATION_FEATURES+\"].tomid[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].id\");\r\n \t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_CONFIGURATION_FEATURES+\"].tomid[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].from.id\");\r\n\r\n \t\t //flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.id\");\r\n \t\t //flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].from.id\");\r\n\r\n\r\n \t\t mqlLogRequiredInformationWriter(\"Database query on the given Feature Id started ----->\"+\" --- \"+now()+\"\\n\");\r\n\r\n \t\t MapList FL_List = domFeatureObj.getRelatedObjects(context,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //relPattern, //relationshipPattern\r\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t sbRelPattern1.toString(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //ConfigurationConstants.TYPE_FEATURE_LIST, //typePattern\r\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t sbTypePattern2.toString(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t flObjSelects, //objectSelects\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t flRelSelects, //relationshipSelects\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t true, //getTo\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t false, //getFrom\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t (short)1, //recurseToLevel\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t null, //objectWhere,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t null, //relationshipWhere\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t (int)0, //limit\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t null , //includeType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t null, //includeRelationship\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t null); //includeMap\r\n\r\n\r\n \t\t mqlLogRequiredInformationWriter(\"Database query on the given Feature Id end ----->\"+\" --- \"+now()+\"\\n\");\r\n\t\t //To check whether the \"Feature Selection Type\" has any conflict for this Feature\r\n\t\t boolean bConflictSelType = false;\r\n\t\t String strFST =\"\";\r\n\t\t StringList sLFST = new StringList();\r\n\t\t for(int iCntFL=0;iCntFL<FL_List.size();iCntFL++){\r\n\t\t\t Map flMap = (Map)FL_List.get(iCntFL);\r\n\t\t\t strFST = (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FEATURE_SELECTION_TYPE+\"]\");\r\n\t\t\t if(sLFST.size()>0){\r\n\t\t\t\t if(!sLFST.contains(strFST)){\r\n\t\t\t\t\t bConflictSelType = true;\r\n\t\t\t\t\t break;\r\n\t\t\t\t }else{\r\n\t\t\t\t\t sLFST.add(strFST);\r\n\t\t\t\t }\r\n\t\t\t }else{\r\n\t\t\t\t if(strFST!=null && !strFST.equals(\"\")){\r\n\t\t\t\t\t sLFST.add(strFST);\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }\r\n\r\n\t\t //If FL object is absent\r\n\t\t if(FL_List.size()==0)\r\n\t\t {\r\n\t\t\t mqlLogRequiredInformationWriter(\"For given Feature id there are no 'Feature List From' and 'Feature List To' connections.\"+\"\\n\");\r\n\t\t\t if(strType!=null\r\n\t\t\t\t &&(!mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)\r\n\t\t\t\t &&!mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n\t\t\t\t &&!mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_STRUCTURES))||\r\n\t\t\t\t isOfDerivationChangedType(context, strType)) {\r\n\t\t\t\t if(strType!=null && !isOfDerivationChangedType(context, strType)){\r\n\r\n\r\n\t\t\t\t //Get the new Feature Type\r\n\t\t\t\t String newFeatureType = (String)featObjMap.get(\"attribute[\"+ATTRIBUTE_NEW_FEATURE_TYPE+\"]\");\r\n\r\n\r\n\t\t\t\t //String newFeatureChangeType = PropertyUtil.getSchemaProperty(context,newFeatureType);\r\n\t\t\t\t String newFeatureChangeType = getSchemaProperty(context,newFeatureType);\r\n\r\n\t\t\t\t //Get the new Feature Policy\r\n\t\t\t\t Map mNewFeaturePolicy = mxType.getDefaultPolicy(context, newFeatureChangeType, true);\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"New Feature Change Type :: \"+ newFeatureChangeType +\"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"New Feature Policy \t :: \"+ mNewFeaturePolicy +\"\\n\");\r\n\r\n\t\t\t\t String newFeaturePolicy = (String) mNewFeaturePolicy.get(ConfigurationConstants.SELECT_NAME);\r\n\t\t\t\t //change the feature to new type\r\n\t\t\t\t //BusinessObject featureBO = changeType(context,featObjMap,featureObjId,newFeatureChangeType,newFeaturePolicy);\r\n\t\t\t\t BusinessObject boFeatureObj = new DomainObject(featureObjId);\r\n\t\t\t\t boFeatureObj.change(context,\r\n\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\tnewFeatureChangeType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(String) featObjMap.get(DomainConstants.SELECT_NAME),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(String) featObjMap.get(DomainConstants.SELECT_REVISION),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(String) featObjMap.get(DomainConstants.SELECT_VAULT),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnewFeaturePolicy);\r\n\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Object id \t\t\t\t:: \"+featureObjId +\"\\n\");\r\n\t\t \t\t mqlLogRequiredInformationWriter(\"Object changed from type :: \"\r\n\t\t \t\t\t\t\t\t\t\t\t\t\t+ strType\r\n\t\t \t\t\t\t\t\t\t\t\t\t\t+ \" to new type \"\r\n\t\t \t\t\t\t\t\t\t\t\t\t\t+ newFeatureChangeType\r\n\t\t \t\t\t\t\t\t\t\t\t\t + \" new policy \"\r\n\t\t \t\t\t\t\t\t\t\t\t\t + newFeaturePolicy\r\n\t\t \t\t\t\t\t\t\t\t\t\t\t+ \"\\n\");\r\n\r\n\r\n\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_VARIANT_DISPLAY_TEXT,\r\n\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_TEXT+\"]\"));\r\n\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_DISPLAY_NAME,\r\n\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_NAME+\"]\"));\r\n\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT,\r\n\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT+\"]\"));\r\n\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_ORIGINATOR,\r\n\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_ORIGINATOR+\"]\"));\r\n\t\t\t\t if(newFeatureChangeType!=null &&\r\n\t\t\t\t\t\t (newFeatureChangeType.equalsIgnoreCase(ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n\t\t\t\t\t\t\t\t ||newFeatureChangeType.equalsIgnoreCase(ConfigurationConstants.TYPE_MANUFACTURING_FEATURE)\r\n\t\t\t\t\t\t\t\t )){\r\n\t\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_DUPLICATE_PART_XML,\r\n\t\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_DUPLICATE_PART_XML+\"]\"));\r\n\t\t\t\t }\r\n\t\t\t\t //Set the new Feat Type attribute values when Feat is standalone\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Object id \t\t\t\t\t :: \"+ featureObjId + \"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Attribute value set for this id :: \"+ mapAttribute +\"\\n\");\r\n\t\t\t\t domFeatureObj.setAttributeValues(context,mapAttribute);\r\n\t\t\t\t }else{\r\n\t\t\t\t Map mNewFeaturePolicy = mxType.getDefaultPolicy(context, strType, true);\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"New Feature Change Type \t\t:: \"+ strType +\"\\n\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"New Feature Policy \t\t\t:: \"+ mNewFeaturePolicy +\"\\n\");\r\n\r\n\t\t\t\t\t String newFeaturePolicy = (String) mNewFeaturePolicy.get(ConfigurationConstants.SELECT_NAME);\r\n\t\t\t\t\t DomainObject boFeatureObj = new DomainObject(featureObjId);\r\n\t\t\t\t\t boFeatureObj.setPolicy(context, newFeaturePolicy);\r\n\t\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_VARIANT_DISPLAY_TEXT,\r\n\t\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_TEXT+\"]\"));\r\n\t\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_DISPLAY_NAME,\r\n\t\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_NAME+\"]\"));\r\n\t\t\t\t\t domFeatureObj.setAttributeValue(context, ConfigurationConstants.ATTRIBUTE_VARIANT_DISPLAY_TEXT,\r\n\t\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_TEXT+\"]\"));\r\n\t\t\t\t\t //Set the attribute values for \"software Feature\" when Feat is standalone\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Object id :: \"+ featureObjId + \"\\n\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Attribute value set for this id :: \"+ mapAttribute +\"\\n\");\r\n\t\t\t\t\t domFeatureObj.setAttributeValues(context,mapAttribute);\r\n\t\t\t\t }\r\n\t\t\t }\r\n\r\n\t\t }else //if feature is not standalone\r\n\t\t {\r\n\t\t\t MapList FLInfoList = new MapList(); // FLs info MapList to pass to external migrations\r\n\t\t\t \r\n\t\t\t mqlLogRequiredInformationWriter(\"\\n\\n\");\r\n\t\t\t mqlLogRequiredInformationWriter(\"For given Feature id there are 'Feature List From' and 'Feature List To' connections.\"+\"\\n\");\r\n\t\t\t mqlLogRequiredInformationWriter(\"Traverse through the given list of 'Feature List' object start .\"+\"\\n\\n\");\r\n\r\n\t\t\t for(int i=0;i<FL_List.size();i++)\r\n\t\t\t {\r\n\t\t\t\t Map flMap = (Map)FL_List.get(i);\r\n\t\t\t\t String strFLId = (String)flMap.get(DomainConstants.SELECT_ID);\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Feature List id in process :: \"+ strFLId +\"\\n\");\r\n\r\n\t\t\t\t try{\r\n\t\t\t\t\t String strRelType = (String)flMap.get(\"relationship\");\r\n\t\t\t\t\t if(strRelType!=null && strRelType.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_CANDIDATE_ITEM)){\r\n\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Feature List id related 'Candiadate Item' rel in process ---> relName \"+ strRelType +\"\\n\");\r\n\t\t\t\t\t\t String strNewRelType = \"\";\r\n\t\t\t\t\t\t //String strManAttr =(String) flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MANDATORY_FEATURE+\"]\");\r\n\t\t\t\t\t\t //Use case related to Candidate Item\r\n\t\t\t\t\t\t String strCandItemRel = (String)flMap.get(ConfigurationConstants.SELECT_RELATIONSHIP_ID);\r\n\t\t\t\t\t\t DomainRelationship domrel = new DomainRelationship(strCandItemRel);\r\n\t\t\t\t\t\t Map attributeMap = new HashMap();\r\n\t\t\t\t\t\t attributeMap = domrel.getAttributeMap(context,true);\r\n\t\t\t\t\t\t String strManAttr = (String) attributeMap.get(ConfigurationConstants.ATTRIBUTE_MANDATORY_FEATURE);\r\n\t\t\t\t\t\t String strInheritedAttr = (String) attributeMap.get(ConfigurationConstants.ATTRIBUTE_INHERITED);\r\n\t\t\t\t\t\t String newFeatureChangeType =\"\";\r\n\r\n \t\t\t\t\t\t if(strType!=null\r\n \t\t\t\t\t\t\t &&!mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)\r\n \t\t\t\t\t &&!mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n \t\t\t\t\t &&!mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_STRUCTURES))\r\n \t\t\t\t\t\t {\r\n \t\t\t\t\t\t\t //Get the new Feature Type\r\n \t\t\t\t\t\t\t String newFeatureType = (String)featObjMap.get(\"attribute[\"+ATTRIBUTE_NEW_FEATURE_TYPE+\"]\");\r\n \t\t\t\t\t\t\t //String newFeatureChangeType = PropertyUtil.getSchemaProperty(context,newFeatureType);\r\n \t\t\t\t\t\t\t newFeatureChangeType = getSchemaProperty(context,newFeatureType);\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t //Get the new Feature Policy\r\n \t\t\t\t\t\t \t\t\t\t\t\t Map mNewFeaturePolicy = mxType.getDefaultPolicy(context, newFeatureChangeType, true);\r\n \t\t\t\t\t\t \t\t\t\t\t\t mqlLogRequiredInformationWriter(\"New Feature Change Type :: \"+newFeatureChangeType +\"\\n\");\r\n \t\t\t\t\t\t \t\t\t\t\t\t mqlLogRequiredInformationWriter(\"New Feature Policy :: \"+mNewFeaturePolicy +\"\\n\");\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t String newFeaturePolicy = (String) mNewFeaturePolicy.get(ConfigurationConstants.SELECT_NAME);\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t //change the feature to new type\r\n \t\t\t\t\t\t \t\t\t\t\t\t BusinessObject boFeatureObj = new DomainObject(featureObjId);\r\n\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t boFeatureObj.change(context,\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\tnewFeatureChangeType,\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(String) featObjMap.get(DomainConstants.SELECT_NAME),\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(String) featObjMap.get(DomainConstants.SELECT_REVISION),\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(String) featObjMap.get(DomainConstants.SELECT_VAULT),\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnewFeaturePolicy);\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Object id :: \"+featureObjId +\"\\n\");\r\n\t\t\t \t\t\t\t\t\t \t\t\t mqlLogRequiredInformationWriter(\"Object changed from type :: \"\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t+ strType\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t+ \" to new type \"\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t+ newFeatureChangeType\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t + \" new policy \"\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t + newFeaturePolicy\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t+ \"\\n\");\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_VARIANT_DISPLAY_TEXT,\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_TEXT+\"]\"));\r\n \t\t\t\t\t\t \t\t\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_DISPLAY_NAME,\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_NAME+\"]\"));\r\n \t\t\t\t\t\t \t\t\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT,\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT+\"]\"));\r\n \t\t\t\t\t\t \t\t\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_ORIGINATOR,\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_ORIGINATOR+\"]\"));\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t if(newFeatureChangeType!=null\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t && (newFeatureChangeType.equalsIgnoreCase(TYPE_CONFIGURATION_FEATURE))\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t && (strManAttr!=null && strManAttr.equalsIgnoreCase(\"Yes\"))\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t && (strInheritedAttr!=null && strInheritedAttr.equalsIgnoreCase(\"False\")))\r\n \t\t\t\t\t\t \t\t\t\t\t {\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t strNewRelType = ConfigurationConstants.RELATIONSHIP_MANDATORY_CONFIGURATION_FEATURES;\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t }\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\tif(newFeatureChangeType!=null\r\n \t\t\t\t\t\t\t \t\t\t\t\t\t\t && (newFeatureChangeType.equalsIgnoreCase(TYPE_CONFIGURATION_FEATURE))\r\n \t\t\t\t\t\t\t \t\t\t\t\t\t\t && (strManAttr!=null && strManAttr.equalsIgnoreCase(\"No\")))\r\n \t\t\t\t\t\t\t \t\t\t\t\t {\r\n \t\t\t\t\t\t\t \t\t\t\t\t\t\t strNewRelType = ConfigurationConstants.RELATIONSHIP_CANDIDTAE_CONFIGURATION_FEATURES;\r\n \t\t\t\t\t\t\t \t\t\t\t\t }\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t if(newFeatureChangeType!=null\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t &&(newFeatureChangeType.equalsIgnoreCase(ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t ||newFeatureChangeType.equalsIgnoreCase(ConfigurationConstants.TYPE_MANUFACTURING_FEATURE)))\r\n \t\t\t\t\t\t \t\t\t\t\t\t {\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t strNewRelType = ConfigurationConstants.RELATIONSHIP_CANDIDTAE_LOGICAL_FEATURES;\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_DUPLICATE_PART_XML,\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_DUPLICATE_PART_XML+\"]\"));\r\n \t\t\t\t\t\t \t\t\t\t\t\t }\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t //Set the new Feat Type attribute values when Feat is standalone\r\n \t\t\t\t\t\t \t\t\t\t\t\t if(ProductLineCommon.isNotNull(strNewRelType)\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t && !strNewRelType.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_MANDATORY_CONFIGURATION_FEATURES)){\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Object id :: \"+ featureObjId + \"\\n\");\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Attribute value set for this id :: \"+ mapAttribute +\"\\n\");\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t domFeatureObj.setAttributeValues(context,mapAttribute);\r\n \t\t\t\t\t\t\t \t\t\t\t\t\t DomainRelationship.setType(context, strCandItemRel,strNewRelType);\r\n \t\t\t\t\t\t \t\t\t\t\t\t }\r\n\r\n \t\t\t\t\t\t }else{\r\n\r\n \t\t\t\t\t\t\tnewFeatureChangeType = strType;\r\n\r\n \t\t\t\t\t\t }\r\n\r\n\r\n\t\t\t\t\t \t\t\t\t\t\t/* if(strNewRelType!=null && strNewRelType.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_MANDATORY_CONFIGURATION_FEATURES)){\r\n\t\t\t\t\t \t\t\t\t\t\t\t HashMap mapRelAttributes = new HashMap();\r\n\r\n\r\n\t\t\t\t\t \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_CONFIGURATION_TYPE,\r\n\t\t\t\t\t \t\t\t\t\t\t\t\t\t \tConfigurationConstants.RANGE_VALUE_SYSTEM);\r\n\r\n\t\t\t\t\t \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_INHERITED, strInheritedAttr);\r\n\r\n\t\t\t\t\t \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_ROLLED_UP,\r\n\t\t\t\t\t \t\t\t\t\t\t\t\t\t \tConfigurationConstants.RANGE_VALUE_FALSE);\r\n\r\n\t\t\t\t\t \t\t\t\t\t\t\t domrel.setAttributeValues(context, mapRelAttributes);\r\n\r\n\t\t\t\t\t \t\t\t\t\t\t }*/\r\n\r\n\t\t\t\t\t \t\t\t\t\t\t if(newFeatureChangeType!=null\r\n\t\t\t\t\t\t \t\t\t\t\t\t\t && (newFeatureChangeType.equalsIgnoreCase(TYPE_CONFIGURATION_FEATURE))\r\n\t\t\t\t\t\t \t\t\t\t\t\t\t && (strManAttr!=null && strManAttr.equalsIgnoreCase(\"Yes\"))\r\n\t\t\t\t\t\t \t\t\t\t\t\t\t && (strInheritedAttr!=null && strInheritedAttr.equalsIgnoreCase(\"True\")))\r\n\t\t\t\t\t\t \t\t\t\t\t {\r\n\t\t\t\t\t \t\t\t\t\t\t\t DomainRelationship.disconnect(context, strCandItemRel);\r\n\t\t\t\t\t\t \t\t\t\t\t\t }\r\n\r\n\r\n\t\t\t\t\t }else if(strRelType!=null && strRelType.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO)){\r\n\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Feature List id related 'Feature list To' rel in process ---> relName \"+ strRelType +\"\\n\\n\");\r\n\t\t\t\t\t\t //Get the \"From Side\" info of FL object\r\n\t\t\t\t\t String strParentFeatureId =\"\";\r\n\t\t\t\t\t String strParentFeatureType =\"\";\r\n\t\t\t\t\t \r\n\t\t\t\t\t if((String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.id\")!=null){\r\n\t\t\t\t\t\t strParentFeatureId = (String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.id\");\r\n\t\t\t\t\t\t strParentFeatureType = (String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.type\");\r\n\t\t\t\t\t }else if((String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+\"].from.id\")!=null){\r\n\t\t\t\t\t\t strParentFeatureId = (String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+\"].from.id\");\r\n\t\t\t\t\t\t strParentFeatureType = (String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+\"].from.type\");\r\n\t\t\t\t\t }else if((String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+\"].from.id\")!=null){\r\n\t\t\t\t\t\t strParentFeatureId = (String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+\"].from.id\");\r\n\t\t\t\t\t\t strParentFeatureType = (String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+\"].from.type\");\r\n\t\t\t\t\t }else if((String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_COMMITED_ITEM+\"].from.id\")!=null){\r\n\t\t\t\t\t }\r\n\r\n\t\t\t\t\t//Use Case related to hanging FL Objects\r\n\t\t\t\t\t if(strParentFeatureId!=null && strParentFeatureId.length()!=0){\r\n\t\t\t\t\t String isConflictParentFeature =\"No\";\r\n\t\t\t\t\t DomainObject domParentFeat = new DomainObject(strParentFeatureId);\r\n\t\t\t\t\t Map htParentObjData = (Map) domParentFeat.getInfo(context, featureObjSelects);\r\n\r\n\t\t\t\t\t if(mxType.isOfParentType(context,strParentFeatureType, ConfigurationConstants.TYPE_FEATURES)){\r\n\r\n\t\t\t\t\t\t isConflictParentFeature = (String)htParentObjData.get(\"attribute[\"+ATTRIBUTE_FTRMigrationConflict+\"]\");\r\n\r\n\t\t\t\t\t }\r\n\r\n\r\n\t\t\t\t\t //Both the side Objects of FL should be convertible\r\n \t\t\t if(isConflictFeature.equalsIgnoreCase(\"No\")&& isConflictParentFeature.equalsIgnoreCase(\"No\")){\r\n\r\n\t\t\t\t\t /* First ...Check if Parent is already converted to New Type or not\r\n\t\t\t\t\t * If Not then convert it to the new Type then continue\r\n\t\t\t\t\t * Attributes will be set later ..whenever the Feature comes as child in the list.*/\r\n\t\t\t\t\t if(strParentFeatureType!=null\r\n\t\t\t\t\t\t && !mxType.isOfParentType(context,strParentFeatureType, ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)\r\n\t\t\t\t\t\t && !mxType.isOfParentType(context,strParentFeatureType, ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n\t\t\t\t\t\t && !mxType.isOfParentType(context,strParentFeatureType, ConfigurationConstants.TYPE_LOGICAL_STRUCTURES)\r\n\t\t\t\t\t\t && !mxType.isOfParentType(context,strParentFeatureType, ConfigurationConstants.TYPE_PRODUCTS)\r\n\t\t\t\t\t\t && !mxType.isOfParentType(context,strParentFeatureType, ConfigurationConstants.TYPE_PRODUCT_LINE)){\r\n\r\n\t\t\t\t\t\t //Get the new Feature Type\r\n\t\t\t\t\t\t String newParentFeatureType = (String)htParentObjData.get(\"attribute[\"+ATTRIBUTE_NEW_FEATURE_TYPE+\"]\");\r\n\r\n\r\n\t\t\t\t\t\t //String newParentFeatureChangeType = PropertyUtil.getSchemaProperty(context,newParentFeatureType);\r\n\t\t\t\t\t\t String newParentFeatureChangeType = getSchemaProperty(context,newParentFeatureType);\r\n\r\n\t\t\t\t\t\t //Get the new Feature Policy\r\n\t\t\t\t\t\t Map mNewParentFeatPolicy = mxType.getDefaultPolicy(context, newParentFeatureChangeType, true);\r\n\t\t\t\t\t\t String strNewParentFeatPolicy = (String) mNewParentFeatPolicy.get(ConfigurationConstants.SELECT_NAME);\r\n\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Feature New Type :: \"+ newParentFeatureChangeType +\"\\n\");\r\n\t \t\t\t\t\t mqlLogRequiredInformationWriter(\"Feature New Policy :: \"+ strNewParentFeatPolicy +\"\\n\");\r\n\r\n\t \t\t\t\t\tString MarketTextPar = (String)htParentObjData.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_TEXT+\"]\");\r\n\t \t\t\t\t String MarketNamePar = (String)htParentObjData.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_NAME+\"]\");\r\n\t \t\t\t\t \r\n\t \t\t\t\t \r\n\t \t\t\t\t\t \r\n\t \t\t\t\t\t//Set the necessary Text and name attribute values of new Type Parent Feature object which will be lost once type is changed below.\r\n\t \t\t\t\t\t HashMap mapParentFeatAttribute = new HashMap();\r\n\t \t\t\t\t\tif(MarketTextPar!=null && !MarketTextPar.equals(\"\")){\r\n\t \t\t\t\t\tmapParentFeatAttribute.put(ConfigurationConstants.ATTRIBUTE_VARIANT_DISPLAY_TEXT, MarketTextPar);\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t\tif(MarketNamePar!=null && !MarketNamePar.equals(\"\")){\r\n\t \t\t\t\t\tmapParentFeatAttribute.put(ConfigurationConstants.ATTRIBUTE_DISPLAY_NAME, MarketNamePar);\r\n\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t\t\r\n\t\t\t\t\t\t //change the feature to new type\r\n\t\t\t\t\t\t BusinessObject boParFeatureObj = new DomainObject(strParentFeatureId);\r\n\r\n\t\t\t\t\t\t boParFeatureObj.change(context,\r\n\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t newParentFeatureChangeType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t (String) htParentObjData.get(DomainConstants.SELECT_NAME),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t (String) htParentObjData.get(DomainConstants.SELECT_REVISION),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t (String) htParentObjData.get(DomainConstants.SELECT_VAULT),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewParentFeatPolicy);\r\n\r\n\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Object id :: \"+strParentFeatureId +\"\\n\");\r\n\t\t\t\t \t\t mqlLogRequiredInformationWriter(\"Object changed from type :: \"\r\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t+ strType\r\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t+ \" to new type \"\r\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t+ newParentFeatureChangeType\r\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t + \" new policy \"\r\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t + strNewParentFeatPolicy\r\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t+ \"\\n\");\r\n\t\t\t\t \t\t \r\n\t\t\t\t \t\t \r\n\t\t\t\t \t\tDomainObject domainParentFeat = new DomainObject(strParentFeatureId);\r\n\t\t\t\t\t\tmqlLogRequiredInformationWriter(\"Attribute value Map set for this id ---->\" + \"\\n\" + mapParentFeatAttribute +\"\\n\\n\");\r\n\t\t\t\t\t\tdomainParentFeat.setAttributeValues(context,mapParentFeatAttribute);\r\n\t\t\t\t\t }\r\n\r\n\t\t\t\t\t String newChildFeatureChangeType =\"\";\r\n\t\t\t\t\t //Get the new Feature Relationship\r\n\t\t\t\t\t String newReltoConnect = \"\";\r\n\r\n\t\t\t\t\t if(strType!=null\r\n\t\t\t\t\t\t\t && !mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)\r\n\t\t\t\t\t\t\t\t && !mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n\t\t\t\t\t\t\t\t && !mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_STRUCTURES)\r\n\t\t\t\t\t\t\t\t ){\r\n\r\n\t\t\t\t\t\t//Check whether \"To Side\" i.e. Child Feature is CF/LF/MF.. Do the processing\r\n\t\t\t\t\t\t //newChildFeatureChangeType = PropertyUtil.getSchemaProperty(context,strContextUsage);\r\n\t\t\t\t\t\t newChildFeatureChangeType = getSchemaProperty(context,strContextUsage);\r\n\r\n\t\t\t\t\t\t if(newChildFeatureChangeType!=null && newChildFeatureChangeType.equalsIgnoreCase(ConfigurationConstants.TYPE_CONFIGURATION_OPTION)){\r\n\t\t\t\t\t\t\t newReltoConnect = ConfigurationConstants.RELATIONSHIP_CONFIGURATION_OPTIONS;\r\n\r\n\t\t\t\t\t\t }else if(newChildFeatureChangeType!=null && newChildFeatureChangeType.equalsIgnoreCase(TYPE_CONFIGURATION_FEATURE)){\r\n\r\n\t\t\t\t\t\t\t\t//Varies By,Valid Context,Invalid Context related code\r\n\t\t\t\t\t\t\t\t newReltoConnect = getNewRelForConfigFeatType(context,flMap,featObjMap,strParentFeatureId,strParentFeatureType);\r\n\r\n\t\t\t\t\t\t }else if(newChildFeatureChangeType!=null\r\n\t\t\t\t\t\t\t\t && (newChildFeatureChangeType.equalsIgnoreCase(ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n\t\t\t\t\t\t\t\t\t\t || newChildFeatureChangeType.equalsIgnoreCase(ConfigurationConstants.TYPE_SOFTWARE_FEATURE))){\r\n\r\n\t\t\t\t\t\t\t newReltoConnect = ConfigurationConstants.RELATIONSHIP_LOGICAL_FEATURES;\r\n\r\n\t\t\t\t\t\t }else if(newChildFeatureChangeType!=null && newChildFeatureChangeType.equalsIgnoreCase(ConfigurationConstants.TYPE_MANUFACTURING_FEATURE)){\r\n\t\t\t\t\t\t\t newReltoConnect = ConfigurationConstants.RELATIONSHIP_MANUFACTURING_FEATURES;\r\n\r\n\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t }else{\r\n\t\t\t\t\t\t if(strType!=null && (mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_CONFIGURATION_OPTION))){\r\n\t\t\t\t\t\t\t newReltoConnect = ConfigurationConstants.RELATIONSHIP_CONFIGURATION_OPTIONS;\r\n\r\n\t\t\t\t\t\t }else if(strType!=null && strType.equalsIgnoreCase(TYPE_CONFIGURATION_FEATURE)){\r\n\r\n\t\t\t\t\t\t\t newReltoConnect = getNewRelForConfigFeatType(context,flMap,featObjMap,strParentFeatureId,strParentFeatureType);\r\n\r\n\t\t\t\t\t\t }else if(strType!=null\r\n\t\t\t\t\t\t\t\t && (mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n\t\t\t\t\t\t\t\t\t\t || mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_SOFTWARE_FEATURE)))\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t newReltoConnect = ConfigurationConstants.RELATIONSHIP_LOGICAL_FEATURES;\r\n\r\n\t\t\t\t\t\t }else if(strType!=null && (mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_MANUFACTURING_FEATURE))){\r\n\r\n\t\t\t\t\t\t\t newReltoConnect = ConfigurationConstants.RELATIONSHIP_MANUFACTURING_FEATURES;\r\n\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t //Set attribute values for \"To Side\" of the \"Feature List To\" relationship i.e. Child Feat Obj\r\n\t\t\t\t\t\t String strSelCriterion = setAttributeValuesOfChildFeatureObj(context,flMap,featObjMap,bConflictSelType);\r\n\r\n \t\t\t\t\t //Do the connection between 2 Feature Objects\r\n\r\n \t\t\t\t\t //restricting the connection if FST = Key-In and Key-In Type = Input\r\n \t\t\t\t\t String strFSTAttrValue = (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FEATURE_SELECTION_TYPE+\"]\");\r\n \t\t\t\t\t String strKITAttrValue = (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_KEY_IN_TYPE+\"]\");\r\n \t\t\t\t\t if(strKITAttrValue.equals(RANGE_VALUE_INPUT)\r\n \t\t\t\t\t\t && strFSTAttrValue.equals(ConfigurationConstants.RANGE_VALUE_KEY_IN)\r\n \t\t\t\t\t\t && (newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_CONFIGURATION_FEATURES)||\r\n \t\t\t\t\t\t\t newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_CONFIGURATION_OPTIONS)))\r\n \t\t\t\t\t {\r\n \t\t\t\t\t\t StringList slPCIds = new StringList();\r\n \t\t\t\t\t\t StringList slSOAttrKIVs = new StringList();\r\n \t\t\t\t\t\t StringList slParentPCIds = new StringList();\r\n \t\t\t\t\t\t StringList slParentSORelIds = new StringList();\r\n\r\n \t\t\t\t\t\t Object objPCIds = flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].from.id\");\r\n \t\t\t\t\t\t if (objPCIds instanceof StringList) {\r\n \t\t\t\t\t\t\t slPCIds = (StringList) flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].from.id\");\r\n\r\n \t\t\t\t\t\t\t} else if (objPCIds instanceof String) {\r\n \t\t\t\t\t\t\t\tslPCIds.addElement((String) flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].from.id\"));\r\n \t\t\t\t\t\t\t}\r\n\r\n\r\n \t\t\t\t\t\t Object objSOAttrKIVs = flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_KEY_IN_VALUE+\"]\");\r\n \t\t\t\t\t\t if (objSOAttrKIVs instanceof StringList) {\r\n \t\t\t\t\t\t\t slSOAttrKIVs = (StringList) flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_KEY_IN_VALUE+\"]\");\r\n\r\n \t\t\t\t\t\t\t} else if (objSOAttrKIVs instanceof String) {\r\n \t\t\t\t\t\t\t\tslSOAttrKIVs.addElement((String) flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_KEY_IN_VALUE+\"]\"));\r\n \t\t\t\t\t\t\t}\r\n\r\n \t\t\t\t\t\t String strParentPCIdSel = \"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].from.id\";\r\n \t\t\t\t\t\t Object objParentPCIds = flMap.get(strParentPCIdSel);\r\n\r\n \t\t\t\t\t\t if(objParentPCIds==null || \"\".equals(objParentPCIds)){\r\n \t\t\t\t\t\t\tstrParentPCIdSel =\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_CONFIGURATION_FEATURES+\"].tomid[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].from.id\";\r\n \t\t\t\t\t\t\tobjParentPCIds = flMap.get(strParentPCIdSel);\r\n \t\t\t\t\t\t }\r\n\r\n \t\t\t\t\t\t if (objParentPCIds instanceof StringList) {\r\n \t\t\t\t\t\t\t slParentPCIds = (StringList) flMap.get(strParentPCIdSel);\r\n\r\n \t\t\t\t\t\t\t} else if (objParentPCIds instanceof String) {\r\n \t\t\t\t\t\t\t\tslParentPCIds.addElement((String) flMap.get(strParentPCIdSel));\r\n \t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//to[Feature List From].from.to[Feature List To].from.to[Selected Options].from.type\r\n\r\n \t\t\t\t\t\t String strParentSORelIdSel = \"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].id\";\r\n \t\t\t\t\t\t Object objParentSORelIds = flMap.get(strParentSORelIdSel);\r\n \t\t\t\t\t\t if(objParentSORelIds==null || \"\".equals(objParentSORelIds)){\r\n \t\t\t\t\t\t\tstrParentSORelIdSel = \"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_CONFIGURATION_FEATURES+\"].tomid[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].id\";\r\n \t\t\t\t\t\t\t objParentSORelIds = flMap.get(strParentSORelIdSel);\r\n\r\n \t\t\t\t\t\t }\r\n\r\n \t\t\t\t\t\t if (objParentSORelIds instanceof StringList) {\r\n \t\t\t\t\t\t\t slParentSORelIds = (StringList) flMap.get(strParentSORelIdSel);\r\n\r\n \t\t\t\t\t\t\t} else if (objParentSORelIds instanceof String) {\r\n \t\t\t\t\t\t\t\tslParentSORelIds.addElement((String) flMap.get(strParentSORelIdSel));\r\n \t\t\t\t\t\t\t}\r\n\r\n \t\t\t\t\t\t //VJB: TODO: seems a bug, int j is never used\r\n \t\t\t\t\t\t for(int j=0;slPCIds!=null && i<slPCIds.size();i++ )\r\n \t\t\t\t\t\t {\r\n \t\t\t\t\t\t\t String strPCId = (String)slPCIds.get(i);\r\n \t\t\t\t\t\t\t String strAttrKIV = (String)slSOAttrKIVs.get(i);\r\n \t\t\t\t\t\t\t if(slParentPCIds!=null && slParentPCIds.contains(strPCId))\r\n \t\t\t\t\t\t\t {\r\n \t\t\t\t\t\t\t\t for(int k=0;k<slParentPCIds.size();k++)\r\n \t\t\t\t\t\t\t\t {\r\n \t\t\t\t\t\t\t\t\t String strParentPCId = (String)slParentPCIds.get(k);\r\n \t\t\t\t\t\t\t\t\t if(strParentPCId.equals(strPCId))\r\n \t\t\t\t\t\t\t\t\t {\r\n \t\t\t\t\t\t\t\t\t\t String strParentSORelId = (String)slParentSORelIds.get(k);\r\n \t\t\t\t\t\t\t\t\t\t DomainRelationship domRel = new DomainRelationship(strParentSORelId);\r\n \t\t\t\t\t\t\t\t\t\t domRel.setAttributeValue(context, ConfigurationConstants.ATTRIBUTE_KEY_IN_VALUE, strAttrKIV);\r\n \t\t\t\t\t\t\t\t\t\t break;\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 }\r\n \t\t\t\t\t\t }\r\n\r\n \t\t\t\t\t }\r\n \t\t\t\t\telse\r\n \t\t\t\t\t {\r\n \t\t\t\t\t\t//strNewRelId = connectFeaturesWithNewRel(context,strParentFeatureId,featureObjId,strType,newReltoConnect);\r\n \t\t\t\t\t\tstrNewRelId = connectFeaturesWithNewRel(context,htParentObjData,featureObjId,strType,newReltoConnect);\r\n\r\n \t\t\t\t\t }\r\n\r\n\r\n\r\n \t\t\t\t\t //Migrate attributes from FL to Rel id\r\n \t\t\t\t\t HashMap mapRelAttributes = new HashMap();\r\n \t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_CHILD_MARKETING_NAME,\r\n \t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_CHILD_MARKETING_NAME+\"]\"));\r\n \t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_CHILD_OBJECT_NAME,\r\n \t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_CHILD_OBJECT_NAME+\"]\"));\r\n \t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_PARENT_MARKETING_NAME,\r\n \t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_PARENT_MARKETING_NAME+\"]\"));\r\n \t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_PARENT_OBJECT_NAME,\r\n \t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_PARENT_OBJECT_NAME+\"]\"));\r\n \t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_RULE_TYPE,\r\n \t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_RULE_TYPE+\"]\"));\r\n\r\n\r\n \t\t\t\t\t if(newReltoConnect!=null\r\n \t\t\t\t && (newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_LOGICAL_FEATURES)\r\n \t\t\t\t\t\t || newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_MANUFACTURING_FEATURES))){\r\n\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_COMPONENT_LOCATION,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_COMPONENT_LOCATION+\"]\"));\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_FIND_NUMBER,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FIND_NUMBER+\"]\"));\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_FORCE_PART_REUSE,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FORCE_PART_REUSE+\"]\"));\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_QUANTITY,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_QUANTITY+\"]\"));\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_REFERENCE_DESIGNATOR,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_REFERENCE_DESIGNATOR+\"]\"));\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_USAGE,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_USAGE+\"]\"));\r\n \t\t\t\t\t\t }\r\n\r\n \t\t\t\t\t if(newReltoConnect!=null\r\n \t\t\t&& newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_LOGICAL_FEATURES)){\r\n\r\n \t\t\t\t\t\t mapRelAttributes.put(ATTRIBUTE_LOGICAL_SELECTION_CRITERIA,strSelCriterion);\r\n \t\t\t\t }\r\n\r\n\r\n \t\t\t\t\t if(newReltoConnect!=null\r\n \t \t\t\t\t && newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_CONFIGURATION_OPTIONS)){\r\n\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_SEQUENCE_ORDER,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_SEQUENCE_ORDER+\"]\"));\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_DEFAULT_SELECTION,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_DEFAULT_SELECTION+\"]\"));\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_LIST_PRICE,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_LIST_PRICE+\"]\"));\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_MAXIMUM_QUANTITY,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MAXIMUM_QUANTITY+\"]\"));\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_MINIMUM_QUANTITY,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MINIMUM_QUANTITY+\"]\"));\r\n \t\t\t\t\t }\r\n\r\n \t\t\t\t\t //Configuration Feature relationship\r\n \t\t\t\t\t if(newReltoConnect!=null\r\n \t\t\t\t\t\t && newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_CONFIGURATION_FEATURES)){\r\n\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_SEQUENCE_ORDER,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_SEQUENCE_ORDER+\"]\"));\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_DEFAULT_SELECTION,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_DEFAULT_SELECTION+\"]\"));\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_LIST_PRICE,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_LIST_PRICE+\"]\"));\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_MAXIMUM_QUANTITY,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MAXIMUM_QUANTITY+\"]\"));\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_MINIMUM_QUANTITY,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MINIMUM_QUANTITY+\"]\"));\r\n\r\n\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_CONFIGURATION_SELECTION_CRITERIA,strSelCriterion);\r\n\r\n\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_CONFIGURATION_TYPE,\r\n \t\t\t\t\t\t\t\t \tConfigurationConstants.RANGE_VALUE_SYSTEM);\r\n\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_INHERITED,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_INHERITED+\"]\"));\r\n\r\n \t\t\t\t\t\t //mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_ROLLED_UP,ConfigurationConstants.RANGE_VALUE_FALSE);\r\n \t\t\t\t\t }\r\n\r\n \t\t\t\t\t //Mandatory Configuration Feature relationship\r\n \t\t\t\t\t if(newReltoConnect!=null\r\n \t\t\t\t\t\t\t && newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_MANDATORY_CONFIGURATION_FEATURES)){\r\n\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_SEQUENCE_ORDER,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_SEQUENCE_ORDER+\"]\"));\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_DEFAULT_SELECTION,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_DEFAULT_SELECTION+\"]\"));\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_LIST_PRICE,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_LIST_PRICE+\"]\"));\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_MAXIMUM_QUANTITY,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MAXIMUM_QUANTITY+\"]\"));\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_MINIMUM_QUANTITY,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MINIMUM_QUANTITY+\"]\"));\r\n\r\n\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_CONFIGURATION_TYPE,\r\n \t\t\t\t\t\t\t\t\t \tConfigurationConstants.RANGE_VALUE_SYSTEM);\r\n\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_INHERITED,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_INHERITED+\"]\"));\r\n\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_ROLLED_UP,ConfigurationConstants.RANGE_VALUE_FALSE);\r\n\r\n \t\t\t\t\t }\r\n\r\n\r\n \t\t\t\t\t //\"Varies By\" and \"Inactive Varies By\" relationship\r\n \t\t\t\t\t if(newReltoConnect!=null\r\n \t\t\t\t\t\t&&\r\n \t\t\t\t\t\t(newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_VARIES_BY)\r\n \t\t\t\t\t\t ||newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_INACTIVE_VARIES_BY)))\r\n \t\t\t\t\t {\r\n\t\t\t\t\t\t if((String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MANDATORY_FEATURE+\"]\")!=null\r\n\t\t\t\t\t\t\t\t\t&&\r\n\t\t\t\t\t\t\t ((String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MANDATORY_FEATURE+\"]\")).equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_YES)){\r\n\r\n\r\n\t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_CONFIGURATION_TYPE,\r\n\t\t\t\t\t\t\t\t\t\t\t \t\t\t\tConfigurationConstants.RANGE_VALUE_MANDATORY);\r\n\r\n\t\t\t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_INHERITED,\r\n\t\t\t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_INHERITED+\"]\"));\r\n\r\n\t\t\t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_ROLLED_UP,\r\n\t\t\t\t\t\t\t\t \t\t\t\tConfigurationConstants.RANGE_VALUE_TRUE);\r\n\r\n\t\t\t\t\t\t\t\t }else if((String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MANDATORY_FEATURE+\"]\")!=null\r\n\t\t\t\t\t\t\t\t\t\t\t&&\r\n\t\t\t\t\t\t\t\t\t\t\t((String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MANDATORY_FEATURE+\"]\")).equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_NO)){\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_CONFIGURATION_TYPE,ConfigurationConstants.RANGE_VALUE_SYSTEM);\r\n\t\t\t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_INHERITED,ConfigurationConstants.RANGE_VALUE_FALSE);\r\n\t\t\t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_ROLLED_UP,ConfigurationConstants.RANGE_VALUE_TRUE);\r\n\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t }\r\n \t\t\t\t\t \r\n \t\t\t\t\t if(strNewRelId!=null && strNewRelId.length()!=0){\r\n\r\n \t\t\t\t\t\t DomainRelationship domRel = new DomainRelationship(strNewRelId);\r\n \t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Rel id :: \"+ strNewRelId + \"\\n\");\r\n \t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Attribute value Map set for this Rel id :: \"+ mapRelAttributes +\"\\n\\n\");\r\n \t\t\t\t\t\t domRel.setAttributeValues(context, mapRelAttributes);\r\n \t\t\t\t\t\t //preparing MapList to pass to external migration\r\n \t\t\t\t\t\t Map FLInfoMap = new HashMap();\r\n \t\t\t\t\t\t FLInfoMap.put(\"objectId\",strFLId);\r\n \t\t\t\t\t\t FLInfoMap.put(\"newRelId\",strNewRelId);\r\n\r\n \t\t\t\t\t\t DomainRelationship domRel1 = new DomainRelationship(strNewRelId);\r\n \t\t\t\t\t\t domRel1.open(context);\r\n \t\t\t\t\t String connectionName = domRel1.getTypeName();\r\n \t\t\t\t\t FLInfoMap.put(\"newRelType\",connectionName);\r\n \t\t\t\t\t\t FLInfoMap.put(\"newRelName\",newReltoConnect);\r\n \t\t\t\t\t\t FLInfoMap.put(\"infoMapFLConnection\",flMap);\r\n\r\n \t\t\t\t\t\t FLInfoList.add(FLInfoMap);\r\n \t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t //Add FL object to delete list\r\n\t\t\t\t\t\t sLFLToDelete.add(strFLId);\r\n\r\n\t\t\t\t\t }\r\n \t\t\t\t }else{\r\n \t\t\t\t\t\t //This is hanging FL Object ID need to b removed\r\n \t\t\t\t\t\t sLFLToDelete.add(strFLId);\r\n \t\t\t\t\t\t Map FLInfoMap = new HashMap();\r\n \t\t\t\t\t\t FLInfoMap.put(\"objectId\",strFLId);\r\n \t\t\t\t\t\t FLInfoMap.put(\"infoMapFLConnection\",flMap);\r\n \t\t\t\t\t\t FLInfoList.add(FLInfoMap);\r\n \t\t\t\t\t }\r\n \t\t\t\t }\r\n\r\n \t\t\t }catch(Exception e)\r\n \t\t\t {\r\n \t\t\t\t e.printStackTrace();\r\n \t\t\t\t throw new FrameworkException(e.getMessage());\r\n \t\t\t }\r\n \t }\r\n\r\n \t\t\t//Float the connections on FL objects to new Relationships formed\r\n \t\t\t if(strNewRelId!=null && strNewRelId.length()!=0){\r\n\r\n \t\t\t\t floatFLConnections(context,FLInfoList);\r\n \t\t\t }\r\n\r\n\r\n \t\t\t//call external migration\r\n \t\t\tMapList customResults = callInterOpMigrations(context, FLInfoList);\r\n \t\t\tIterator itrCustomResults = customResults.iterator();\r\n \t\t\twhile (itrCustomResults.hasNext()) {\r\n Map customResultsMap = (Map)itrCustomResults.next();\r\n \t\t\t\t Integer status = (Integer)customResultsMap.get(\"status\");\r\n\t\t\t\t String failureMessage = (String)customResultsMap.get(\"failureMessage\");\r\n\r\n\t\t\t\t if(status==1)\r\n\t\t\t\t {\r\n\t\t\t\t\t throw new FrameworkException(failureMessage);\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }\r\n\r\n\r\n\t\t//Check the \"Varies By\" and \"Effectivity Status\" values\r\n\t\t StringList sLVariesByRelId =new StringList();\r\n\t\t StringList sLEffectivityStatusValue=new StringList();\r\n\t\t StringList sLActiveCntValue=new StringList();\r\n\t\t StringList sLInActiveCntValue=new StringList();\r\n\t\t StringList sLParType=new StringList();\r\n\r\n\r\n\t\tif((StringList)featObjMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].id\")!=null){\r\n\r\n\t\t\t//sLName = (StringList)featObjMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.name\");\r\n\t\t\t//sLVariesByRelId = (StringList)featObjMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].id\");\r\n\t\t\t//sLEffectivityStatusValue = (StringList)featObjMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_EFFECTIVITY_STATUS+\"]\");\r\n\t\t\t//sLActiveCntValue = (StringList)featObjMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_ACTIVE_COUNT+\"]\");\r\n\t\t\t//sLInActiveCntValue = (StringList)featObjMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_INACTIVE_COUNT+\"]\");\r\n\t\t\t//sLParentId = (StringList)featObjMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.id\");\r\n\r\n\t\t\t/*Not using the above statements as there is issue in sequence of ids in String list\r\n\t\t\t * coming from above getInfo\r\n\t\t\t * Doing the getInfo again on the given Feature Id\r\n\t\t\t */\r\n\r\n\t\t\tString stFeaId = (String) featObjMap.get(SELECT_ID);\r\n\t\t\tDomainObject domFd = new DomainObject(stFeaId);\r\n\t\t\tStringList objSel = new StringList();\r\n\t\t\tobjSel.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].id\");//Varies By rel id if present\r\n\t\t\tobjSel.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.id\");//Varies By rel id if present\r\n\t\t\tobjSel.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.name\");//Varies By rel id if present\r\n\t\t\tobjSel.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.type\");//Varies By rel id if present\r\n\r\n\t\t\tobjSel.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_EFFECTIVITY_STATUS+\"]\");//Varies By rel id if present\r\n\t\t\tobjSel.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ATTRIBUTE_INAVLID_CONTEXTS+\"]\");//Varies By rel id if present\r\n\t\t\tobjSel.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ATTRIBUTE_USER_DEFINED_EFFECTIVITY+\"]\");//Varies By rel id if present\r\n\r\n\t\t\tobjSel.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_ACTIVE_COUNT+\"]\");//Varies By rel id if present\r\n\t\t\tobjSel.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_INACTIVE_COUNT+\"]\");//Varies By rel id if present\r\n\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].id\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.id\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.name\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.type\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ATTRIBUTE_INAVLID_CONTEXTS+\"]\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_EFFECTIVITY_STATUS+\"]\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_ACTIVE_COUNT+\"]\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_INACTIVE_COUNT+\"]\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ATTRIBUTE_USER_DEFINED_EFFECTIVITY+\"]\");\r\n\r\n\r\n\t\t\t Map MFeatObj = domFd.getInfo(context, objSel);\r\n\r\n\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].id\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.id\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.name\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.type\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ATTRIBUTE_INAVLID_CONTEXTS+\"]\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_EFFECTIVITY_STATUS+\"]\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_ACTIVE_COUNT+\"]\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_INACTIVE_COUNT+\"]\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ATTRIBUTE_USER_DEFINED_EFFECTIVITY+\"]\");\r\n\r\n\r\n\t\t\tsLVariesByRelId = (StringList) MFeatObj.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].id\");\r\n\t\t\tsLParType= (StringList) MFeatObj.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.type\");\r\n\t\t\tsLEffectivityStatusValue= (StringList) MFeatObj.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_EFFECTIVITY_STATUS+\"]\");\r\n\t\t\tsLActiveCntValue= (StringList) MFeatObj.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_ACTIVE_COUNT+\"]\");\r\n\t\t\tsLInActiveCntValue=(StringList) MFeatObj.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_INACTIVE_COUNT+\"]\");\r\n\r\n\t\t}\r\n\r\n\t\tHashMap mapRelAtt = null;\r\n\r\n\t\tfor(int iEffStatusCnt=0;iEffStatusCnt<sLEffectivityStatusValue.size();iEffStatusCnt++){\r\n\t\t\tmapRelAtt = new HashMap();\r\n\t\t\tString strEffectStatus = (String)sLEffectivityStatusValue.get(iEffStatusCnt);\r\n\t\t\tif(strEffectStatus!=null && strEffectStatus.equalsIgnoreCase(ConfigurationConstants.EFFECTIVITY_STATUS_INACTIVE)){\r\n\t\t\t\tDomainRelationship.setType(context, (String)sLVariesByRelId.get(iEffStatusCnt), ConfigurationConstants.RELATIONSHIP_INACTIVE_VARIES_BY);\r\n\t\t\t\tmapRelAtt.put(ConfigurationConstants.ATTRIBUTE_CONFIGURATION_TYPE,ConfigurationConstants.RANGE_VALUE_SYSTEM);\r\n\t\t\t\tmapRelAtt.put(ConfigurationConstants.ATTRIBUTE_INHERITED,ConfigurationConstants.RANGE_VALUE_FALSE);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tString strInActiveCntValue = (String)sLInActiveCntValue.get(iEffStatusCnt);\r\n\t\t\tint inactiveCount = Integer.parseInt(strInActiveCntValue);\r\n\r\n\t\t\tString strActiveCntValue = (String)sLActiveCntValue.get(iEffStatusCnt);\r\n\t\t\tint activeCount = Integer.parseInt(strActiveCntValue);\r\n\r\n\t\t\tif( inactiveCount==0 && activeCount==0 ){\r\n\t\t\t\tString strParType = (String)sLParType.get(iEffStatusCnt);\r\n\t\t\t\tif(mxType.isOfParentType(context,strParType, ConfigurationConstants.TYPE_PRODUCTS)){\r\n\t\t\t\t\tmapRelAtt.put(ConfigurationConstants.ATTRIBUTE_ROLLED_UP,ConfigurationConstants.RANGE_VALUE_TRUE);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmapRelAtt.put(ConfigurationConstants.ATTRIBUTE_ROLLED_UP,ConfigurationConstants.RANGE_VALUE_FALSE);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t\tmapRelAtt.put(ConfigurationConstants.ATTRIBUTE_ROLLED_UP,ConfigurationConstants.RANGE_VALUE_TRUE);\r\n\t\t\t}\r\n\t\t\tDomainRelationship domRel = new DomainRelationship((String)sLVariesByRelId.get(iEffStatusCnt));\r\n\t\t\tmqlLogRequiredInformationWriter(\"Rel id :: \"+(String)sLVariesByRelId.get(iEffStatusCnt)+ \"\\n\");\r\n\t\t\tmqlLogRequiredInformationWriter(\"Attribute value Map set for this Rel id :: \"+ mapRelAtt +\"\\n\\n\");\r\n\t\t\tdomRel.setAttributeValues(context, mapRelAtt);\r\n\t\t}\r\n\r\n\r\n\t\t//Cleanup - delete related Feature List objects on successful migration of Feature\r\n\t\t deleteObjects(context,sLFLToDelete);\r\n\r\n\t\t loadMigratedOids(featureObjId);\r\n\r\n\t }else{ // for those Features which has \"Conflict\" stamp \"Yes\"\r\n\t\t String strCommand = strType + \",\" + strName + \",\" + strRevision + \",\" + strContextUsage+\"\\n\";\r\n\t\t\t writeUnconvertedOID(strCommand, featureObjId);\r\n\t }\r\n\r\n }", "public java.util.List<java.lang.String> getVariantSetIds() {\n return variantSetIds;\n }", "java.util.List<java.lang.String> getFeaturesList();", "public List<String> getSubsetDefinitionIds() {\n return Identifiable.getIds(getSubsetDefinitionList());\n }", "java.util.List<org.landxml.schema.landXML11.PlanFeatureDocument.PlanFeature> getPlanFeatureList();", "List<String> getFeatures();", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Feature)) {\n return false;\n }\n Feature other = (Feature) object;\n return !((this.id == null && other.id != null)\n || (this.id != null && !this.id.equals(other.id)));\n }", "java.util.List<java.lang.Integer> getReceivingMinorFragmentIdList();", "public java.util.List<String> getIds() {\n return ids;\n }", "public Set<String> getActiveGroupIds()\n {\n return myActiveGroups.stream().filter(g -> !g.activationProperty().isActivatingOrDeactivating()).map(g -> g.getId())\n .collect(Collectors.toSet());\n }", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return GPSSetupImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = GPSSetupImpl.this.getFeatureArray(i);\r\n GPSSetupImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { GPSSetupImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = GPSSetupImpl.this.getFeatureArray(i);\r\n GPSSetupImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return GPSSetupImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "@Transient\n @JsonProperty(\"symbols\")\n public List<Long> getSymbolsAsIds() {\n List<Long> ids = new LinkedList<>();\n symbols.stream().map(Symbol::getId).forEach(ids::add);\n return ids;\n }", "public List getAllIds();", "long getFeaturesUsed();" ]
[ "0.6486388", "0.6061627", "0.574936", "0.5700868", "0.5656663", "0.55392265", "0.5459917", "0.5455843", "0.544881", "0.5448404", "0.5444082", "0.5387763", "0.537273", "0.537273", "0.53506297", "0.5348402", "0.5345338", "0.53419834", "0.53419834", "0.53335375", "0.53326195", "0.5317966", "0.52918077", "0.5286439", "0.5283067", "0.5283067", "0.5268884", "0.5268884", "0.5268884", "0.526239", "0.5242536", "0.5238535", "0.52200997", "0.52200997", "0.5198245", "0.5185133", "0.5168862", "0.51513344", "0.51513344", "0.51513344", "0.51410216", "0.5131741", "0.512974", "0.512974", "0.5115638", "0.5109065", "0.5106137", "0.5106137", "0.5106137", "0.5106137", "0.5056704", "0.50451946", "0.50342035", "0.50322765", "0.50234276", "0.50215966", "0.50057465", "0.49972242", "0.49961874", "0.49872932", "0.4984906", "0.49830574", "0.4982463", "0.49812728", "0.49753982", "0.49751443", "0.4968408", "0.49557316", "0.49478197", "0.49452835", "0.49411047", "0.49403057", "0.4937963", "0.49358034", "0.49318722", "0.4925019", "0.49167842", "0.49081224", "0.4908044", "0.490725", "0.49021977", "0.48916298", "0.4882109", "0.48780674", "0.48743474", "0.4870855", "0.4870255", "0.48667216", "0.48649192", "0.4847693", "0.48468632", "0.48353383", "0.48300028", "0.48211694", "0.48192385", "0.4817682", "0.4805076", "0.48048708", "0.48039657", "0.4803411", "0.47944495" ]
0.0
-1
Contains all ids for features that were already there at startVersion, were modified before endVersion and were not deleted.
public Set getModified() { return Collections.unmodifiableSet(modified); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Set getFeatureIDs (FeatureType ft, Filter filter,\r\n DBAccess osa) throws Exception {\r\n \r\n StringBuffer query = new StringBuffer (\r\n \"SELECT \" + ft.getMasterTable().getIdField());\r\n AbstractSQLBuilder sqlBuilder = new GMLDBSQLBuilder (ft);\r\n \r\n if (filter != null) {\r\n query.append (sqlBuilder.filter2SQL (filter));\r\n } else {\r\n query.append (\" FROM \" + ft.getMasterTable().getTargetName());\r\n }\r\n \r\n java.sql.Connection con = osa.getConnection ();\r\n Statement stmt = con.createStatement ();\r\n ResultSet rs = stmt.executeQuery (query.toString ()); \r\n\r\n TreeSet fIDs = new TreeSet ();\r\n\r\n // extract all affected Feature-IDs (as Strings)\r\n while (rs.next()) {\r\n String fID = rs.getString (1);\r\n fIDs.add (fID);\r\n }\r\n\r\n rs.close ();\r\n stmt.close ();\r\n return fIDs;\r\n }", "@Override\n public boolean hasStableIds() {\n return true;\n }", "boolean hasStableIds();", "@Override\n public boolean hasStableIds() {\n return true;\n }", "@Override\n public boolean hasStableIds() {\n return true;\n }", "@Override\r\n public boolean hasStableIds() {\n return true;\r\n }", "@Override\n \t\tpublic boolean hasStableIds() {\n \t\t\treturn false;\n \t\t}", "@Override\n\t\tpublic boolean hasStableIds() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean hasStableIds() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean hasStableIds() {\n\t\t\treturn false;\n\t\t}", "@Override\n public boolean hasStableIds() {\n return false;\n }", "@Override\n public boolean hasStableIds() {\n return false;\n }", "@Override\n public boolean hasStableIds() {\n return false;\n }", "@Override\n public boolean hasStableIds()\n {\n return false;\n }", "@Override\n\tpublic boolean hasStableIds() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean hasStableIds() {\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean hasStableIds() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean hasStableIds() {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean hasStableIds() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean hasStableIds() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean hasStableIds() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean hasStableIds() {\n\t\treturn false;\n\t}", "@Override\n public synchronized Set<FeatureType> getFeatureInstances() {\n return featureInstances = nonNullSet(featureInstances, FeatureType.class);\n }", "public TreeMap<String,VersionID> \n getVersionIDs()\n {\n TreeMap<String,VersionID> versions = new TreeMap<String,VersionID>();\n for(String name : pVersionFields.keySet()) {\n JCollectionField field = pVersionFields.get(name);\n versions.put(name, pVersionIDs.get(name).get(field.getSelectedIndex()));\n }\n return versions;\n }", "Set<II> getIds();", "@Override\n public Set<ReferenceIdentifier> getIdentifiers() {\n return Collections.emptySet();\n }", "public static HashSet<org.cidarlab.raven.datastructures.Part> phoenixFeaturesToRavenParts(List<Feature> features) {\n \n HashSet<org.cidarlab.raven.datastructures.Part> ravenParts = new HashSet();\n \n //For each module, make a Raven blank basic part\n for (Feature f : features) { \n if (!f.getRole().equals(Feature.FeatureRole.VECTOR)) {\n \n String name = f.getName().replaceAll(\".ref\", \"\");\n String type = f.getRole().toString().toLowerCase();\n if (type.contains(\"cds\")) {\n if (type.contains(\"fluorescent\")) {\n type = \"reporter\";\n } else {\n type = \"gene\";\n }\n } else if (type.contains(\"promoter\")) {\n type = \"promoter\";\n }\n String sequence = f.getSequence().getSequence();\n \n ArrayList<String> dirF = new ArrayList();\n dirF.add(\"+\");\n ArrayList<String> dirR = new ArrayList();\n dirR.add(\"-\");\n ArrayList<String> typeL = new ArrayList();\n typeL.add(type);\n \n //Forward version\n org.cidarlab.raven.datastructures.Part newBasicPart = org.cidarlab.raven.datastructures.Part.generateBasic(name, sequence, null, typeL, dirF, \"\", \"\");\n newBasicPart.setTransientStatus(false);\n\n //Reverse version\n org.cidarlab.raven.datastructures.Part newReverseBasicPart = org.cidarlab.raven.datastructures.Part.generateBasic(name, PrimerDesign.reverseComplement(sequence), null, typeL, dirR, \"\", \"\");\n newReverseBasicPart.setTransientStatus(false);\n \n ravenParts.add(newBasicPart);\n ravenParts.add(newReverseBasicPart);\n }\n }\n \n return ravenParts;\n }", "public abstract List<QualifiedName> getAffectedFeatureTypes();", "public boolean hasStableIds()\n\t{\n\t\tLog.d( TAG, \"hasStableIds\" );\n\t\treturn true;\n\t}", "public Set<Long> allInfoProductIds() {\n return new HashSet<Long>( );\n }", "public static void identifyFeaturesSelectedForCID()\n {\n MSRun run = (MSRun) ApplicationContext.getProperty(SharedProperties.MS_RUN);\n FeatureSet runMs2Features = run.getTandemFeatureSet(2);\n runMs2Features.setSourceFile(new File(run.getFile().getPath() + \".ms2.tsv\"));\n// runMs2Features.setSourceFile(new File(\"generated_features_for_cid\"));\n ClusteringFeatureSetMatcher cFSM =\n new ClusteringFeatureSetMatcher(.1f, FeatureSetMatcher.DELTA_MASS_TYPE_ABSOLUTE, 5);\n cFSM.setElutionMode(ClusteringFeatureSetMatcher.ELUTION_MODE_SCAN);\n cFSM.setUseMassInsteadOfMz(false);\n cFSM.setElutionBucketIncrement(1);\n cFSM.setMassBucketIncrement(.025);\n\n List<FeatureSet> featureSets =\n (List<FeatureSet>) ApplicationContext.getProperty(SharedProperties.FEATURE_SETS);\n FeatureSet ms1Features = null;\n\n boolean noFeatureSetToMine = false;\n if (featureSets == null)\n noFeatureSetToMine = true;\n if (!noFeatureSetToMine)\n for (FeatureSet fs : featureSets)\n {\n if (fs.isDisplayed())\n ms1Features = fs;\n }\n if (ms1Features == null)\n noFeatureSetToMine = true;\n\n if (noFeatureSetToMine)\n {\n //make this translatable\n //not really necessary since we make this inaccessible if no features are displayed\n ApplicationContext.infoMessage(\"You must select and display a set of features in order to find the ones selected for CID\");\n return;\n }\n\n\n FeatureSetMatcher.FeatureMatchingResult featureMatchingResult =\n cFSM.matchFeatures(ms1Features, runMs2Features);\n\n Feature[] ms1FeaturesSelectedForCID = new Feature[featureMatchingResult.size()];\n\n\n //first set CID scan of all ms1 features to not-found\n for (Feature feature : ms1Features.getFeatures())\n {\n feature.setProperty(\"cidscan\",-1);\n }\n //set CID scan of all matched ms1 features to the MS2 feature's scan number\n int i=0;\n for (Feature ms1Feature : featureMatchingResult.getMasterSetFeatures())\n {\n ms1Feature.setProperty(\"cidscan\",featureMatchingResult.getBestMatch(ms1Feature));\n ms1FeaturesSelectedForCID[i++] = ms1Feature;\n }\n\n FeatureSet ms1FeatureSetForCID = new FeatureSet(ms1FeaturesSelectedForCID,\n FeatureSelectionFrame.FeatureSelectionDialog.nextColor());\n// ms1FeatureSetForCID.setSourceFile(new File(\"generated_features_for_cid\"));\n\n //copy the feature set list because otherwise the main panel doesn't update\n ArrayList<FeatureSet> featureSetListCopy = new ArrayList<FeatureSet>(featureSets.size());\n featureSetListCopy.addAll(featureSets);\n featureSetListCopy.add(ms1FeatureSetForCID);\n featureSetListCopy.add(runMs2Features);\n\n ApplicationContext.setProperty(SharedProperties.FEATURE_SETS, featureSetListCopy);\n ApplicationContext.setProperty(SharedProperties.FEATURE_RANGES, featureSetListCopy);\n\n ResultsDialog resultsDialog =\n new ResultsDialog(ms1Features, ms1FeatureSetForCID, runMs2Features, featureMatchingResult);\n resultsDialog.setVisible(true);\n }", "public Collection getUpdatedObjectIds() {\n if (_payload == PAYLOAD_EXTENTS)\n throw new UserException(s_loc.get(\"extent-only-event\"));\n return (_updates == null) ? Collections.EMPTY_LIST : _updates;\n }", "java.util.List<java.lang.Integer> getOtherIdsList();", "private static Set<String> getCurrentStableIdentifiers(MySQLAdaptor dba) throws Exception {\n\t\tCollection<GKInstance> stableIdentifierInstances = dba.fetchInstancesByClass(ReactomeJavaConstants.StableIdentifier);\n\t\tSet<String> currentStableIdentifiersSet = new HashSet<>();\n\t\tfor (GKInstance stableIdentifierInst : stableIdentifierInstances) {\n\t\t\tcurrentStableIdentifiersSet.add(stableIdentifierInst.getAttributeValue(ReactomeJavaConstants.identifier).toString());\n\t\t}\n\t\treturn currentStableIdentifiersSet;\n\t}", "public Set<Long> allVersions(String namespace, String id);", "@Override\n public synchronized Set<FeatureType> getFeatures() {\n return features = nonNullSet(features, FeatureType.class);\n }", "@Override\n\tpublic Object[] getIds() {\n\t\treturn null;\n\t}", "java.util.List<java.lang.Integer> getReceivingMinorFragmentIdList();", "private void migrateFeaturesStep_1(Context context, Map featObjMap)\r\n throws Exception{\r\n\r\n \t mqlLogRequiredInformationWriter(\"Inside method migrateFeaturesStep_1 \"+ \"\\n\");\r\n \t //These selectables are for Parent Feature\r\n \t StringList featureObjSelects = new StringList();\r\n\t\t featureObjSelects.addElement(SELECT_TYPE);\r\n\t\t featureObjSelects.addElement(SELECT_NAME);\r\n\t\t featureObjSelects.addElement(SELECT_REVISION);\r\n\t\t featureObjSelects.addElement(SELECT_VAULT);\r\n\t\t featureObjSelects.addElement(SELECT_ID);\r\n\r\n\t\t featureObjSelects.addElement(\"attribute[\"+ATTRIBUTE_NEW_FEATURE_TYPE+\"]\");\r\n\t\t featureObjSelects.addElement(\"attribute[\"+ATTRIBUTE_FTRMigrationConflict+\"]\");\r\n\r\n\t\t featureObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT+\"]\");//goes into LF or MF type\r\n\t\t featureObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_DUPLICATE_PART_XML+\"]\");//goes into LF,MF,CF type\r\n\t\t featureObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_NAME+\"]\");//goes into LF,MF,CF type\r\n\t\t featureObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_TEXT+\"]\");//goes into LF,MF,CF type\r\n\t\t featureObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_ORIGINATOR+\"]\");//goes into LF,MF,CF type\r\n\r\n\t\t String featureObjId = \"\";\r\n String strType = \"\";\r\n String strName = \"\";\r\n String strRevision = \"\";\r\n String strNewRelId = \"\";\r\n \t featureObjId = (String) featObjMap.get(SELECT_ID);\r\n\r\n\r\n \t String isConflictFeature = (String)featObjMap.get(\"attribute[\"+ATTRIBUTE_FTRMigrationConflict+\"]\");\r\n\t\t String strContextUsage = (String)featObjMap.get(\"attribute[\"+ATTRIBUTE_NEW_FEATURE_TYPE+\"]\");\r\n\r\n\t\t StringList sLFLToDelete = new StringList(); //FLs list to delete\r\n\r\n\t\t strType = (String) featObjMap.get(SELECT_TYPE);\r\n\t\t strName = (String) featObjMap.get(SELECT_NAME);\r\n\t\t strRevision = (String) featObjMap.get(SELECT_REVISION);\r\n\r\n\r\n\t\t if((strType!=null\r\n\t\t\t\t &&(mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)\r\n\t || mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n\t || mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_STRUCTURES))))\r\n {\r\n\t\t\t isConflictFeature = \"No\";\r\n\t\t }\r\n\r\n\t\t if(isConflictFeature.equalsIgnoreCase(\"No\")\r\n\t\t || mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)\r\n\t\t\t || mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n\t\t\t || mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_STRUCTURES))\r\n\t\t {\r\n\r\n\r\n\t\t DomainObject domFeatureObj = new DomainObject(featureObjId);\r\n\r\n\t\t HashMap mapAttribute = new HashMap();\r\n\r\n\t\t //check whether feature is standalone or Toplevel or is in the Structure\r\n\t\t //String relPattern = ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO;\r\n\r\n\t\t StringBuffer sbRelPattern1 = new StringBuffer(50);\r\n\t\t\tsbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO);\r\n\t\t\tsbRelPattern1.append(\",\");\r\n\t\t\tsbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_CANDIDATE_ITEM);\r\n\r\n\t\t\tStringBuffer sbTypePattern2 = new StringBuffer(50);\r\n\t\t\t\tsbTypePattern2.append(ConfigurationConstants.TYPE_FEATURE_LIST);\r\n\t\t\t\tsbTypePattern2.append(\",\");\r\n\t\t\t\tsbTypePattern2.append(ConfigurationConstants.TYPE_MODEL);\r\n\r\n\r\n\r\n\r\n\t\t StringList flObjSelects = new StringList();\r\n\t\t flObjSelects.addElement(ConfigurationConstants.SELECT_ID);\r\n\t\t flObjSelects.addElement(DomainObject.SELECT_FROM_ID);\r\n\t\t flObjSelects.addElement(DomainObject.SELECT_TO_ID);\r\n\r\n\t\t StringList flRelSelects = new StringList();\r\n\t\t flRelSelects.addElement(ConfigurationConstants.SELECT_RELATIONSHIP_ID);\r\n\t\t flRelSelects.addElement(\"from.from[\" + ConfigurationConstants.RELATIONSHIP_RESOURCE_USAGE + \"].id\");\r\n\r\n\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_CANDIDATE_ITEM+\"].from.id\");\r\n\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_CANDIDATE_ITEM+\"].id\");\r\n\r\n\t\t //Get the Feature Ids,Type and New Feature Type attribute values... when \"Feature List To\" rel traversed\r\n\t\t flObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.id\");\r\n\t\t flObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.type\");\r\n\t\t flObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.attribute[\"+ATTRIBUTE_NEW_FEATURE_TYPE+\"]\");\r\n\r\n\t\t //Get the Feature Ids,Type and New Feature Type attribute values... when \"Feature List From\" rel traversed\r\n\t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.id\");\r\n\t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.type\");\r\n\t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.attribute[\"+ATTRIBUTE_NEW_FEATURE_TYPE+\"]\");\r\n\r\n\t\t //In DV id Inactive in context of Product or Invalid in context of PV\r\n\t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+\"].id\");\r\n\t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+\"].from.id\");\r\n\t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+\"].from.type\");\r\n\t\t //flObjSelects.addElement(\"from[\" + ConfigurationConstants.RELATIONSHIP_RESOURCE_USAGE + \"].id\");\r\n\t\t //selectables of all attributes on FL which are to be migrated\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_CHILD_MARKETING_NAME+\"]\"); //goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_CHILD_OBJECT_NAME+\"]\"); //goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_PARENT_MARKETING_NAME+\"]\"); //goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_PARENT_OBJECT_NAME+\"]\"); //goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_USAGE+\"]\"); //goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_QUANTITY+\"]\"); //goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_COMPONENT_LOCATION+\"]\"); //goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_REFERENCE_DESIGNATOR+\"]\");//goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FORCE_PART_REUSE+\"]\");//goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FIND_NUMBER+\"]\");//goes on to LF and MF relationships\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_LIST_PRICE+\"]\");//goes on to CF and CO relationship\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MAXIMUM_QUANTITY+\"]\"); //goes on to CF and CO relationship\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MINIMUM_QUANTITY+\"]\");//goes on to CF and CO relationship\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_DEFAULT_SELECTION+\"]\");//goes on to CF and CO relationship\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_RULE_TYPE+\"]\");//goes on to CF,LF,MF relationship\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_KEY_IN_TYPE+\"]\"); //goes on to CF type\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_INHERITED+\"]\"); //will go as interface attribute onto relationship mentioned in PES\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MANDATORY_FEATURE+\"]\");//this will be used as described in PES\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FEATURE_SELECTION_TYPE+\"]\"); //will get split\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+\"]\"); //will get split\r\n\t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_ACTIVE_COUNT+\"]\");\r\n \t\t flObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_INACTIVE_COUNT+\"]\");\r\n\r\n \t\t //selectables of attribute on FLF relationship\r\n \t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_SEQUENCE_ORDER+\"]\");\r\n\r\n \t\t //selectables to determine if the Feature can have Key-In Type = Input\r\n \t\t flObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].to.attribute[\"+ConfigurationConstants.ATTRIBUTE_KEY_IN_TYPE+\"]\");\r\n \t\t flObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].to.attribute[\"+ConfigurationConstants.ATTRIBUTE_FEATURE_SELECTION_TYPE+\"]\");\r\n\r\n \t\t //selectable to get Key-In Value on Selected Option Relationship\r\n \t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].from.id\");\r\n \t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_KEY_IN_VALUE+\"]\");\r\n \t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].id\");\r\n \t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].from.id\");\r\n\r\n \t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_CONFIGURATION_FEATURES+\"].tomid[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].id\");\r\n \t\t flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_CONFIGURATION_FEATURES+\"].tomid[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].from.id\");\r\n\r\n \t\t //flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.id\");\r\n \t\t //flObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].from.id\");\r\n\r\n\r\n \t\t mqlLogRequiredInformationWriter(\"Database query on the given Feature Id started ----->\"+\" --- \"+now()+\"\\n\");\r\n\r\n \t\t MapList FL_List = domFeatureObj.getRelatedObjects(context,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //relPattern, //relationshipPattern\r\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t sbRelPattern1.toString(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //ConfigurationConstants.TYPE_FEATURE_LIST, //typePattern\r\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t sbTypePattern2.toString(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t flObjSelects, //objectSelects\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t flRelSelects, //relationshipSelects\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t true, //getTo\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t false, //getFrom\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t (short)1, //recurseToLevel\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t null, //objectWhere,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t null, //relationshipWhere\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t (int)0, //limit\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t null , //includeType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t null, //includeRelationship\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t null); //includeMap\r\n\r\n\r\n \t\t mqlLogRequiredInformationWriter(\"Database query on the given Feature Id end ----->\"+\" --- \"+now()+\"\\n\");\r\n\t\t //To check whether the \"Feature Selection Type\" has any conflict for this Feature\r\n\t\t boolean bConflictSelType = false;\r\n\t\t String strFST =\"\";\r\n\t\t StringList sLFST = new StringList();\r\n\t\t for(int iCntFL=0;iCntFL<FL_List.size();iCntFL++){\r\n\t\t\t Map flMap = (Map)FL_List.get(iCntFL);\r\n\t\t\t strFST = (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FEATURE_SELECTION_TYPE+\"]\");\r\n\t\t\t if(sLFST.size()>0){\r\n\t\t\t\t if(!sLFST.contains(strFST)){\r\n\t\t\t\t\t bConflictSelType = true;\r\n\t\t\t\t\t break;\r\n\t\t\t\t }else{\r\n\t\t\t\t\t sLFST.add(strFST);\r\n\t\t\t\t }\r\n\t\t\t }else{\r\n\t\t\t\t if(strFST!=null && !strFST.equals(\"\")){\r\n\t\t\t\t\t sLFST.add(strFST);\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }\r\n\r\n\t\t //If FL object is absent\r\n\t\t if(FL_List.size()==0)\r\n\t\t {\r\n\t\t\t mqlLogRequiredInformationWriter(\"For given Feature id there are no 'Feature List From' and 'Feature List To' connections.\"+\"\\n\");\r\n\t\t\t if(strType!=null\r\n\t\t\t\t &&(!mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)\r\n\t\t\t\t &&!mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n\t\t\t\t &&!mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_STRUCTURES))||\r\n\t\t\t\t isOfDerivationChangedType(context, strType)) {\r\n\t\t\t\t if(strType!=null && !isOfDerivationChangedType(context, strType)){\r\n\r\n\r\n\t\t\t\t //Get the new Feature Type\r\n\t\t\t\t String newFeatureType = (String)featObjMap.get(\"attribute[\"+ATTRIBUTE_NEW_FEATURE_TYPE+\"]\");\r\n\r\n\r\n\t\t\t\t //String newFeatureChangeType = PropertyUtil.getSchemaProperty(context,newFeatureType);\r\n\t\t\t\t String newFeatureChangeType = getSchemaProperty(context,newFeatureType);\r\n\r\n\t\t\t\t //Get the new Feature Policy\r\n\t\t\t\t Map mNewFeaturePolicy = mxType.getDefaultPolicy(context, newFeatureChangeType, true);\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"New Feature Change Type :: \"+ newFeatureChangeType +\"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"New Feature Policy \t :: \"+ mNewFeaturePolicy +\"\\n\");\r\n\r\n\t\t\t\t String newFeaturePolicy = (String) mNewFeaturePolicy.get(ConfigurationConstants.SELECT_NAME);\r\n\t\t\t\t //change the feature to new type\r\n\t\t\t\t //BusinessObject featureBO = changeType(context,featObjMap,featureObjId,newFeatureChangeType,newFeaturePolicy);\r\n\t\t\t\t BusinessObject boFeatureObj = new DomainObject(featureObjId);\r\n\t\t\t\t boFeatureObj.change(context,\r\n\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\tnewFeatureChangeType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(String) featObjMap.get(DomainConstants.SELECT_NAME),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(String) featObjMap.get(DomainConstants.SELECT_REVISION),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(String) featObjMap.get(DomainConstants.SELECT_VAULT),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnewFeaturePolicy);\r\n\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Object id \t\t\t\t:: \"+featureObjId +\"\\n\");\r\n\t\t \t\t mqlLogRequiredInformationWriter(\"Object changed from type :: \"\r\n\t\t \t\t\t\t\t\t\t\t\t\t\t+ strType\r\n\t\t \t\t\t\t\t\t\t\t\t\t\t+ \" to new type \"\r\n\t\t \t\t\t\t\t\t\t\t\t\t\t+ newFeatureChangeType\r\n\t\t \t\t\t\t\t\t\t\t\t\t + \" new policy \"\r\n\t\t \t\t\t\t\t\t\t\t\t\t + newFeaturePolicy\r\n\t\t \t\t\t\t\t\t\t\t\t\t\t+ \"\\n\");\r\n\r\n\r\n\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_VARIANT_DISPLAY_TEXT,\r\n\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_TEXT+\"]\"));\r\n\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_DISPLAY_NAME,\r\n\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_NAME+\"]\"));\r\n\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT,\r\n\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT+\"]\"));\r\n\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_ORIGINATOR,\r\n\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_ORIGINATOR+\"]\"));\r\n\t\t\t\t if(newFeatureChangeType!=null &&\r\n\t\t\t\t\t\t (newFeatureChangeType.equalsIgnoreCase(ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n\t\t\t\t\t\t\t\t ||newFeatureChangeType.equalsIgnoreCase(ConfigurationConstants.TYPE_MANUFACTURING_FEATURE)\r\n\t\t\t\t\t\t\t\t )){\r\n\t\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_DUPLICATE_PART_XML,\r\n\t\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_DUPLICATE_PART_XML+\"]\"));\r\n\t\t\t\t }\r\n\t\t\t\t //Set the new Feat Type attribute values when Feat is standalone\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Object id \t\t\t\t\t :: \"+ featureObjId + \"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Attribute value set for this id :: \"+ mapAttribute +\"\\n\");\r\n\t\t\t\t domFeatureObj.setAttributeValues(context,mapAttribute);\r\n\t\t\t\t }else{\r\n\t\t\t\t Map mNewFeaturePolicy = mxType.getDefaultPolicy(context, strType, true);\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"New Feature Change Type \t\t:: \"+ strType +\"\\n\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"New Feature Policy \t\t\t:: \"+ mNewFeaturePolicy +\"\\n\");\r\n\r\n\t\t\t\t\t String newFeaturePolicy = (String) mNewFeaturePolicy.get(ConfigurationConstants.SELECT_NAME);\r\n\t\t\t\t\t DomainObject boFeatureObj = new DomainObject(featureObjId);\r\n\t\t\t\t\t boFeatureObj.setPolicy(context, newFeaturePolicy);\r\n\t\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_VARIANT_DISPLAY_TEXT,\r\n\t\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_TEXT+\"]\"));\r\n\t\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_DISPLAY_NAME,\r\n\t\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_NAME+\"]\"));\r\n\t\t\t\t\t domFeatureObj.setAttributeValue(context, ConfigurationConstants.ATTRIBUTE_VARIANT_DISPLAY_TEXT,\r\n\t\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_TEXT+\"]\"));\r\n\t\t\t\t\t //Set the attribute values for \"software Feature\" when Feat is standalone\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Object id :: \"+ featureObjId + \"\\n\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Attribute value set for this id :: \"+ mapAttribute +\"\\n\");\r\n\t\t\t\t\t domFeatureObj.setAttributeValues(context,mapAttribute);\r\n\t\t\t\t }\r\n\t\t\t }\r\n\r\n\t\t }else //if feature is not standalone\r\n\t\t {\r\n\t\t\t MapList FLInfoList = new MapList(); // FLs info MapList to pass to external migrations\r\n\t\t\t \r\n\t\t\t mqlLogRequiredInformationWriter(\"\\n\\n\");\r\n\t\t\t mqlLogRequiredInformationWriter(\"For given Feature id there are 'Feature List From' and 'Feature List To' connections.\"+\"\\n\");\r\n\t\t\t mqlLogRequiredInformationWriter(\"Traverse through the given list of 'Feature List' object start .\"+\"\\n\\n\");\r\n\r\n\t\t\t for(int i=0;i<FL_List.size();i++)\r\n\t\t\t {\r\n\t\t\t\t Map flMap = (Map)FL_List.get(i);\r\n\t\t\t\t String strFLId = (String)flMap.get(DomainConstants.SELECT_ID);\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Feature List id in process :: \"+ strFLId +\"\\n\");\r\n\r\n\t\t\t\t try{\r\n\t\t\t\t\t String strRelType = (String)flMap.get(\"relationship\");\r\n\t\t\t\t\t if(strRelType!=null && strRelType.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_CANDIDATE_ITEM)){\r\n\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Feature List id related 'Candiadate Item' rel in process ---> relName \"+ strRelType +\"\\n\");\r\n\t\t\t\t\t\t String strNewRelType = \"\";\r\n\t\t\t\t\t\t //String strManAttr =(String) flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MANDATORY_FEATURE+\"]\");\r\n\t\t\t\t\t\t //Use case related to Candidate Item\r\n\t\t\t\t\t\t String strCandItemRel = (String)flMap.get(ConfigurationConstants.SELECT_RELATIONSHIP_ID);\r\n\t\t\t\t\t\t DomainRelationship domrel = new DomainRelationship(strCandItemRel);\r\n\t\t\t\t\t\t Map attributeMap = new HashMap();\r\n\t\t\t\t\t\t attributeMap = domrel.getAttributeMap(context,true);\r\n\t\t\t\t\t\t String strManAttr = (String) attributeMap.get(ConfigurationConstants.ATTRIBUTE_MANDATORY_FEATURE);\r\n\t\t\t\t\t\t String strInheritedAttr = (String) attributeMap.get(ConfigurationConstants.ATTRIBUTE_INHERITED);\r\n\t\t\t\t\t\t String newFeatureChangeType =\"\";\r\n\r\n \t\t\t\t\t\t if(strType!=null\r\n \t\t\t\t\t\t\t &&!mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)\r\n \t\t\t\t\t &&!mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n \t\t\t\t\t &&!mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_STRUCTURES))\r\n \t\t\t\t\t\t {\r\n \t\t\t\t\t\t\t //Get the new Feature Type\r\n \t\t\t\t\t\t\t String newFeatureType = (String)featObjMap.get(\"attribute[\"+ATTRIBUTE_NEW_FEATURE_TYPE+\"]\");\r\n \t\t\t\t\t\t\t //String newFeatureChangeType = PropertyUtil.getSchemaProperty(context,newFeatureType);\r\n \t\t\t\t\t\t\t newFeatureChangeType = getSchemaProperty(context,newFeatureType);\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t //Get the new Feature Policy\r\n \t\t\t\t\t\t \t\t\t\t\t\t Map mNewFeaturePolicy = mxType.getDefaultPolicy(context, newFeatureChangeType, true);\r\n \t\t\t\t\t\t \t\t\t\t\t\t mqlLogRequiredInformationWriter(\"New Feature Change Type :: \"+newFeatureChangeType +\"\\n\");\r\n \t\t\t\t\t\t \t\t\t\t\t\t mqlLogRequiredInformationWriter(\"New Feature Policy :: \"+mNewFeaturePolicy +\"\\n\");\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t String newFeaturePolicy = (String) mNewFeaturePolicy.get(ConfigurationConstants.SELECT_NAME);\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t //change the feature to new type\r\n \t\t\t\t\t\t \t\t\t\t\t\t BusinessObject boFeatureObj = new DomainObject(featureObjId);\r\n\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t boFeatureObj.change(context,\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\tnewFeatureChangeType,\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(String) featObjMap.get(DomainConstants.SELECT_NAME),\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(String) featObjMap.get(DomainConstants.SELECT_REVISION),\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(String) featObjMap.get(DomainConstants.SELECT_VAULT),\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnewFeaturePolicy);\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Object id :: \"+featureObjId +\"\\n\");\r\n\t\t\t \t\t\t\t\t\t \t\t\t mqlLogRequiredInformationWriter(\"Object changed from type :: \"\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t+ strType\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t+ \" to new type \"\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t+ newFeatureChangeType\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t + \" new policy \"\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t + newFeaturePolicy\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t+ \"\\n\");\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_VARIANT_DISPLAY_TEXT,\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_TEXT+\"]\"));\r\n \t\t\t\t\t\t \t\t\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_DISPLAY_NAME,\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_NAME+\"]\"));\r\n \t\t\t\t\t\t \t\t\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT,\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT+\"]\"));\r\n \t\t\t\t\t\t \t\t\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_ORIGINATOR,\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_ORIGINATOR+\"]\"));\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t if(newFeatureChangeType!=null\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t && (newFeatureChangeType.equalsIgnoreCase(TYPE_CONFIGURATION_FEATURE))\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t && (strManAttr!=null && strManAttr.equalsIgnoreCase(\"Yes\"))\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t && (strInheritedAttr!=null && strInheritedAttr.equalsIgnoreCase(\"False\")))\r\n \t\t\t\t\t\t \t\t\t\t\t {\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t strNewRelType = ConfigurationConstants.RELATIONSHIP_MANDATORY_CONFIGURATION_FEATURES;\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t }\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\tif(newFeatureChangeType!=null\r\n \t\t\t\t\t\t\t \t\t\t\t\t\t\t && (newFeatureChangeType.equalsIgnoreCase(TYPE_CONFIGURATION_FEATURE))\r\n \t\t\t\t\t\t\t \t\t\t\t\t\t\t && (strManAttr!=null && strManAttr.equalsIgnoreCase(\"No\")))\r\n \t\t\t\t\t\t\t \t\t\t\t\t {\r\n \t\t\t\t\t\t\t \t\t\t\t\t\t\t strNewRelType = ConfigurationConstants.RELATIONSHIP_CANDIDTAE_CONFIGURATION_FEATURES;\r\n \t\t\t\t\t\t\t \t\t\t\t\t }\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t if(newFeatureChangeType!=null\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t &&(newFeatureChangeType.equalsIgnoreCase(ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t\t\t ||newFeatureChangeType.equalsIgnoreCase(ConfigurationConstants.TYPE_MANUFACTURING_FEATURE)))\r\n \t\t\t\t\t\t \t\t\t\t\t\t {\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t strNewRelType = ConfigurationConstants.RELATIONSHIP_CANDIDTAE_LOGICAL_FEATURES;\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t mapAttribute.put(ConfigurationConstants.ATTRIBUTE_DUPLICATE_PART_XML,\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t (String)featObjMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_DUPLICATE_PART_XML+\"]\"));\r\n \t\t\t\t\t\t \t\t\t\t\t\t }\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t //Set the new Feat Type attribute values when Feat is standalone\r\n \t\t\t\t\t\t \t\t\t\t\t\t if(ProductLineCommon.isNotNull(strNewRelType)\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t && !strNewRelType.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_MANDATORY_CONFIGURATION_FEATURES)){\r\n\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Object id :: \"+ featureObjId + \"\\n\");\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Attribute value set for this id :: \"+ mapAttribute +\"\\n\");\r\n \t\t\t\t\t\t \t\t\t\t\t\t\t domFeatureObj.setAttributeValues(context,mapAttribute);\r\n \t\t\t\t\t\t\t \t\t\t\t\t\t DomainRelationship.setType(context, strCandItemRel,strNewRelType);\r\n \t\t\t\t\t\t \t\t\t\t\t\t }\r\n\r\n \t\t\t\t\t\t }else{\r\n\r\n \t\t\t\t\t\t\tnewFeatureChangeType = strType;\r\n\r\n \t\t\t\t\t\t }\r\n\r\n\r\n\t\t\t\t\t \t\t\t\t\t\t/* if(strNewRelType!=null && strNewRelType.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_MANDATORY_CONFIGURATION_FEATURES)){\r\n\t\t\t\t\t \t\t\t\t\t\t\t HashMap mapRelAttributes = new HashMap();\r\n\r\n\r\n\t\t\t\t\t \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_CONFIGURATION_TYPE,\r\n\t\t\t\t\t \t\t\t\t\t\t\t\t\t \tConfigurationConstants.RANGE_VALUE_SYSTEM);\r\n\r\n\t\t\t\t\t \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_INHERITED, strInheritedAttr);\r\n\r\n\t\t\t\t\t \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_ROLLED_UP,\r\n\t\t\t\t\t \t\t\t\t\t\t\t\t\t \tConfigurationConstants.RANGE_VALUE_FALSE);\r\n\r\n\t\t\t\t\t \t\t\t\t\t\t\t domrel.setAttributeValues(context, mapRelAttributes);\r\n\r\n\t\t\t\t\t \t\t\t\t\t\t }*/\r\n\r\n\t\t\t\t\t \t\t\t\t\t\t if(newFeatureChangeType!=null\r\n\t\t\t\t\t\t \t\t\t\t\t\t\t && (newFeatureChangeType.equalsIgnoreCase(TYPE_CONFIGURATION_FEATURE))\r\n\t\t\t\t\t\t \t\t\t\t\t\t\t && (strManAttr!=null && strManAttr.equalsIgnoreCase(\"Yes\"))\r\n\t\t\t\t\t\t \t\t\t\t\t\t\t && (strInheritedAttr!=null && strInheritedAttr.equalsIgnoreCase(\"True\")))\r\n\t\t\t\t\t\t \t\t\t\t\t {\r\n\t\t\t\t\t \t\t\t\t\t\t\t DomainRelationship.disconnect(context, strCandItemRel);\r\n\t\t\t\t\t\t \t\t\t\t\t\t }\r\n\r\n\r\n\t\t\t\t\t }else if(strRelType!=null && strRelType.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO)){\r\n\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Feature List id related 'Feature list To' rel in process ---> relName \"+ strRelType +\"\\n\\n\");\r\n\t\t\t\t\t\t //Get the \"From Side\" info of FL object\r\n\t\t\t\t\t String strParentFeatureId =\"\";\r\n\t\t\t\t\t String strParentFeatureType =\"\";\r\n\t\t\t\t\t \r\n\t\t\t\t\t if((String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.id\")!=null){\r\n\t\t\t\t\t\t strParentFeatureId = (String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.id\");\r\n\t\t\t\t\t\t strParentFeatureType = (String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.type\");\r\n\t\t\t\t\t }else if((String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+\"].from.id\")!=null){\r\n\t\t\t\t\t\t strParentFeatureId = (String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+\"].from.id\");\r\n\t\t\t\t\t\t strParentFeatureType = (String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+\"].from.type\");\r\n\t\t\t\t\t }else if((String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+\"].from.id\")!=null){\r\n\t\t\t\t\t\t strParentFeatureId = (String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+\"].from.id\");\r\n\t\t\t\t\t\t strParentFeatureType = (String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_PRODUCT_FEATURE_LIST+\"].from.type\");\r\n\t\t\t\t\t }else if((String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_COMMITED_ITEM+\"].from.id\")!=null){\r\n\t\t\t\t\t }\r\n\r\n\t\t\t\t\t//Use Case related to hanging FL Objects\r\n\t\t\t\t\t if(strParentFeatureId!=null && strParentFeatureId.length()!=0){\r\n\t\t\t\t\t String isConflictParentFeature =\"No\";\r\n\t\t\t\t\t DomainObject domParentFeat = new DomainObject(strParentFeatureId);\r\n\t\t\t\t\t Map htParentObjData = (Map) domParentFeat.getInfo(context, featureObjSelects);\r\n\r\n\t\t\t\t\t if(mxType.isOfParentType(context,strParentFeatureType, ConfigurationConstants.TYPE_FEATURES)){\r\n\r\n\t\t\t\t\t\t isConflictParentFeature = (String)htParentObjData.get(\"attribute[\"+ATTRIBUTE_FTRMigrationConflict+\"]\");\r\n\r\n\t\t\t\t\t }\r\n\r\n\r\n\t\t\t\t\t //Both the side Objects of FL should be convertible\r\n \t\t\t if(isConflictFeature.equalsIgnoreCase(\"No\")&& isConflictParentFeature.equalsIgnoreCase(\"No\")){\r\n\r\n\t\t\t\t\t /* First ...Check if Parent is already converted to New Type or not\r\n\t\t\t\t\t * If Not then convert it to the new Type then continue\r\n\t\t\t\t\t * Attributes will be set later ..whenever the Feature comes as child in the list.*/\r\n\t\t\t\t\t if(strParentFeatureType!=null\r\n\t\t\t\t\t\t && !mxType.isOfParentType(context,strParentFeatureType, ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)\r\n\t\t\t\t\t\t && !mxType.isOfParentType(context,strParentFeatureType, ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n\t\t\t\t\t\t && !mxType.isOfParentType(context,strParentFeatureType, ConfigurationConstants.TYPE_LOGICAL_STRUCTURES)\r\n\t\t\t\t\t\t && !mxType.isOfParentType(context,strParentFeatureType, ConfigurationConstants.TYPE_PRODUCTS)\r\n\t\t\t\t\t\t && !mxType.isOfParentType(context,strParentFeatureType, ConfigurationConstants.TYPE_PRODUCT_LINE)){\r\n\r\n\t\t\t\t\t\t //Get the new Feature Type\r\n\t\t\t\t\t\t String newParentFeatureType = (String)htParentObjData.get(\"attribute[\"+ATTRIBUTE_NEW_FEATURE_TYPE+\"]\");\r\n\r\n\r\n\t\t\t\t\t\t //String newParentFeatureChangeType = PropertyUtil.getSchemaProperty(context,newParentFeatureType);\r\n\t\t\t\t\t\t String newParentFeatureChangeType = getSchemaProperty(context,newParentFeatureType);\r\n\r\n\t\t\t\t\t\t //Get the new Feature Policy\r\n\t\t\t\t\t\t Map mNewParentFeatPolicy = mxType.getDefaultPolicy(context, newParentFeatureChangeType, true);\r\n\t\t\t\t\t\t String strNewParentFeatPolicy = (String) mNewParentFeatPolicy.get(ConfigurationConstants.SELECT_NAME);\r\n\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Feature New Type :: \"+ newParentFeatureChangeType +\"\\n\");\r\n\t \t\t\t\t\t mqlLogRequiredInformationWriter(\"Feature New Policy :: \"+ strNewParentFeatPolicy +\"\\n\");\r\n\r\n\t \t\t\t\t\tString MarketTextPar = (String)htParentObjData.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_TEXT+\"]\");\r\n\t \t\t\t\t String MarketNamePar = (String)htParentObjData.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_NAME+\"]\");\r\n\t \t\t\t\t \r\n\t \t\t\t\t \r\n\t \t\t\t\t\t \r\n\t \t\t\t\t\t//Set the necessary Text and name attribute values of new Type Parent Feature object which will be lost once type is changed below.\r\n\t \t\t\t\t\t HashMap mapParentFeatAttribute = new HashMap();\r\n\t \t\t\t\t\tif(MarketTextPar!=null && !MarketTextPar.equals(\"\")){\r\n\t \t\t\t\t\tmapParentFeatAttribute.put(ConfigurationConstants.ATTRIBUTE_VARIANT_DISPLAY_TEXT, MarketTextPar);\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t\tif(MarketNamePar!=null && !MarketNamePar.equals(\"\")){\r\n\t \t\t\t\t\tmapParentFeatAttribute.put(ConfigurationConstants.ATTRIBUTE_DISPLAY_NAME, MarketNamePar);\r\n\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t\t\r\n\t\t\t\t\t\t //change the feature to new type\r\n\t\t\t\t\t\t BusinessObject boParFeatureObj = new DomainObject(strParentFeatureId);\r\n\r\n\t\t\t\t\t\t boParFeatureObj.change(context,\r\n\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t newParentFeatureChangeType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t (String) htParentObjData.get(DomainConstants.SELECT_NAME),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t (String) htParentObjData.get(DomainConstants.SELECT_REVISION),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t (String) htParentObjData.get(DomainConstants.SELECT_VAULT),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewParentFeatPolicy);\r\n\r\n\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Object id :: \"+strParentFeatureId +\"\\n\");\r\n\t\t\t\t \t\t mqlLogRequiredInformationWriter(\"Object changed from type :: \"\r\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t+ strType\r\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t+ \" to new type \"\r\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t+ newParentFeatureChangeType\r\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t + \" new policy \"\r\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t + strNewParentFeatPolicy\r\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t+ \"\\n\");\r\n\t\t\t\t \t\t \r\n\t\t\t\t \t\t \r\n\t\t\t\t \t\tDomainObject domainParentFeat = new DomainObject(strParentFeatureId);\r\n\t\t\t\t\t\tmqlLogRequiredInformationWriter(\"Attribute value Map set for this id ---->\" + \"\\n\" + mapParentFeatAttribute +\"\\n\\n\");\r\n\t\t\t\t\t\tdomainParentFeat.setAttributeValues(context,mapParentFeatAttribute);\r\n\t\t\t\t\t }\r\n\r\n\t\t\t\t\t String newChildFeatureChangeType =\"\";\r\n\t\t\t\t\t //Get the new Feature Relationship\r\n\t\t\t\t\t String newReltoConnect = \"\";\r\n\r\n\t\t\t\t\t if(strType!=null\r\n\t\t\t\t\t\t\t && !mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)\r\n\t\t\t\t\t\t\t\t && !mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n\t\t\t\t\t\t\t\t && !mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_STRUCTURES)\r\n\t\t\t\t\t\t\t\t ){\r\n\r\n\t\t\t\t\t\t//Check whether \"To Side\" i.e. Child Feature is CF/LF/MF.. Do the processing\r\n\t\t\t\t\t\t //newChildFeatureChangeType = PropertyUtil.getSchemaProperty(context,strContextUsage);\r\n\t\t\t\t\t\t newChildFeatureChangeType = getSchemaProperty(context,strContextUsage);\r\n\r\n\t\t\t\t\t\t if(newChildFeatureChangeType!=null && newChildFeatureChangeType.equalsIgnoreCase(ConfigurationConstants.TYPE_CONFIGURATION_OPTION)){\r\n\t\t\t\t\t\t\t newReltoConnect = ConfigurationConstants.RELATIONSHIP_CONFIGURATION_OPTIONS;\r\n\r\n\t\t\t\t\t\t }else if(newChildFeatureChangeType!=null && newChildFeatureChangeType.equalsIgnoreCase(TYPE_CONFIGURATION_FEATURE)){\r\n\r\n\t\t\t\t\t\t\t\t//Varies By,Valid Context,Invalid Context related code\r\n\t\t\t\t\t\t\t\t newReltoConnect = getNewRelForConfigFeatType(context,flMap,featObjMap,strParentFeatureId,strParentFeatureType);\r\n\r\n\t\t\t\t\t\t }else if(newChildFeatureChangeType!=null\r\n\t\t\t\t\t\t\t\t && (newChildFeatureChangeType.equalsIgnoreCase(ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n\t\t\t\t\t\t\t\t\t\t || newChildFeatureChangeType.equalsIgnoreCase(ConfigurationConstants.TYPE_SOFTWARE_FEATURE))){\r\n\r\n\t\t\t\t\t\t\t newReltoConnect = ConfigurationConstants.RELATIONSHIP_LOGICAL_FEATURES;\r\n\r\n\t\t\t\t\t\t }else if(newChildFeatureChangeType!=null && newChildFeatureChangeType.equalsIgnoreCase(ConfigurationConstants.TYPE_MANUFACTURING_FEATURE)){\r\n\t\t\t\t\t\t\t newReltoConnect = ConfigurationConstants.RELATIONSHIP_MANUFACTURING_FEATURES;\r\n\r\n\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t }else{\r\n\t\t\t\t\t\t if(strType!=null && (mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_CONFIGURATION_OPTION))){\r\n\t\t\t\t\t\t\t newReltoConnect = ConfigurationConstants.RELATIONSHIP_CONFIGURATION_OPTIONS;\r\n\r\n\t\t\t\t\t\t }else if(strType!=null && strType.equalsIgnoreCase(TYPE_CONFIGURATION_FEATURE)){\r\n\r\n\t\t\t\t\t\t\t newReltoConnect = getNewRelForConfigFeatType(context,flMap,featObjMap,strParentFeatureId,strParentFeatureType);\r\n\r\n\t\t\t\t\t\t }else if(strType!=null\r\n\t\t\t\t\t\t\t\t && (mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n\t\t\t\t\t\t\t\t\t\t || mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_SOFTWARE_FEATURE)))\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t newReltoConnect = ConfigurationConstants.RELATIONSHIP_LOGICAL_FEATURES;\r\n\r\n\t\t\t\t\t\t }else if(strType!=null && (mxType.isOfParentType(context,strType, ConfigurationConstants.TYPE_MANUFACTURING_FEATURE))){\r\n\r\n\t\t\t\t\t\t\t newReltoConnect = ConfigurationConstants.RELATIONSHIP_MANUFACTURING_FEATURES;\r\n\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t //Set attribute values for \"To Side\" of the \"Feature List To\" relationship i.e. Child Feat Obj\r\n\t\t\t\t\t\t String strSelCriterion = setAttributeValuesOfChildFeatureObj(context,flMap,featObjMap,bConflictSelType);\r\n\r\n \t\t\t\t\t //Do the connection between 2 Feature Objects\r\n\r\n \t\t\t\t\t //restricting the connection if FST = Key-In and Key-In Type = Input\r\n \t\t\t\t\t String strFSTAttrValue = (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FEATURE_SELECTION_TYPE+\"]\");\r\n \t\t\t\t\t String strKITAttrValue = (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_KEY_IN_TYPE+\"]\");\r\n \t\t\t\t\t if(strKITAttrValue.equals(RANGE_VALUE_INPUT)\r\n \t\t\t\t\t\t && strFSTAttrValue.equals(ConfigurationConstants.RANGE_VALUE_KEY_IN)\r\n \t\t\t\t\t\t && (newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_CONFIGURATION_FEATURES)||\r\n \t\t\t\t\t\t\t newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_CONFIGURATION_OPTIONS)))\r\n \t\t\t\t\t {\r\n \t\t\t\t\t\t StringList slPCIds = new StringList();\r\n \t\t\t\t\t\t StringList slSOAttrKIVs = new StringList();\r\n \t\t\t\t\t\t StringList slParentPCIds = new StringList();\r\n \t\t\t\t\t\t StringList slParentSORelIds = new StringList();\r\n\r\n \t\t\t\t\t\t Object objPCIds = flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].from.id\");\r\n \t\t\t\t\t\t if (objPCIds instanceof StringList) {\r\n \t\t\t\t\t\t\t slPCIds = (StringList) flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].from.id\");\r\n\r\n \t\t\t\t\t\t\t} else if (objPCIds instanceof String) {\r\n \t\t\t\t\t\t\t\tslPCIds.addElement((String) flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].from.id\"));\r\n \t\t\t\t\t\t\t}\r\n\r\n\r\n \t\t\t\t\t\t Object objSOAttrKIVs = flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_KEY_IN_VALUE+\"]\");\r\n \t\t\t\t\t\t if (objSOAttrKIVs instanceof StringList) {\r\n \t\t\t\t\t\t\t slSOAttrKIVs = (StringList) flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_KEY_IN_VALUE+\"]\");\r\n\r\n \t\t\t\t\t\t\t} else if (objSOAttrKIVs instanceof String) {\r\n \t\t\t\t\t\t\t\tslSOAttrKIVs.addElement((String) flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_KEY_IN_VALUE+\"]\"));\r\n \t\t\t\t\t\t\t}\r\n\r\n \t\t\t\t\t\t String strParentPCIdSel = \"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].from.id\";\r\n \t\t\t\t\t\t Object objParentPCIds = flMap.get(strParentPCIdSel);\r\n\r\n \t\t\t\t\t\t if(objParentPCIds==null || \"\".equals(objParentPCIds)){\r\n \t\t\t\t\t\t\tstrParentPCIdSel =\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_CONFIGURATION_FEATURES+\"].tomid[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].from.id\";\r\n \t\t\t\t\t\t\tobjParentPCIds = flMap.get(strParentPCIdSel);\r\n \t\t\t\t\t\t }\r\n\r\n \t\t\t\t\t\t if (objParentPCIds instanceof StringList) {\r\n \t\t\t\t\t\t\t slParentPCIds = (StringList) flMap.get(strParentPCIdSel);\r\n\r\n \t\t\t\t\t\t\t} else if (objParentPCIds instanceof String) {\r\n \t\t\t\t\t\t\t\tslParentPCIds.addElement((String) flMap.get(strParentPCIdSel));\r\n \t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//to[Feature List From].from.to[Feature List To].from.to[Selected Options].from.type\r\n\r\n \t\t\t\t\t\t String strParentSORelIdSel = \"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].id\";\r\n \t\t\t\t\t\t Object objParentSORelIds = flMap.get(strParentSORelIdSel);\r\n \t\t\t\t\t\t if(objParentSORelIds==null || \"\".equals(objParentSORelIds)){\r\n \t\t\t\t\t\t\tstrParentSORelIdSel = \"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].from.to[\"+ConfigurationConstants.RELATIONSHIP_CONFIGURATION_FEATURES+\"].tomid[\"+ConfigurationConstants.RELATIONSHIP_SELECTED_OPTIONS+\"].id\";\r\n \t\t\t\t\t\t\t objParentSORelIds = flMap.get(strParentSORelIdSel);\r\n\r\n \t\t\t\t\t\t }\r\n\r\n \t\t\t\t\t\t if (objParentSORelIds instanceof StringList) {\r\n \t\t\t\t\t\t\t slParentSORelIds = (StringList) flMap.get(strParentSORelIdSel);\r\n\r\n \t\t\t\t\t\t\t} else if (objParentSORelIds instanceof String) {\r\n \t\t\t\t\t\t\t\tslParentSORelIds.addElement((String) flMap.get(strParentSORelIdSel));\r\n \t\t\t\t\t\t\t}\r\n\r\n \t\t\t\t\t\t //VJB: TODO: seems a bug, int j is never used\r\n \t\t\t\t\t\t for(int j=0;slPCIds!=null && i<slPCIds.size();i++ )\r\n \t\t\t\t\t\t {\r\n \t\t\t\t\t\t\t String strPCId = (String)slPCIds.get(i);\r\n \t\t\t\t\t\t\t String strAttrKIV = (String)slSOAttrKIVs.get(i);\r\n \t\t\t\t\t\t\t if(slParentPCIds!=null && slParentPCIds.contains(strPCId))\r\n \t\t\t\t\t\t\t {\r\n \t\t\t\t\t\t\t\t for(int k=0;k<slParentPCIds.size();k++)\r\n \t\t\t\t\t\t\t\t {\r\n \t\t\t\t\t\t\t\t\t String strParentPCId = (String)slParentPCIds.get(k);\r\n \t\t\t\t\t\t\t\t\t if(strParentPCId.equals(strPCId))\r\n \t\t\t\t\t\t\t\t\t {\r\n \t\t\t\t\t\t\t\t\t\t String strParentSORelId = (String)slParentSORelIds.get(k);\r\n \t\t\t\t\t\t\t\t\t\t DomainRelationship domRel = new DomainRelationship(strParentSORelId);\r\n \t\t\t\t\t\t\t\t\t\t domRel.setAttributeValue(context, ConfigurationConstants.ATTRIBUTE_KEY_IN_VALUE, strAttrKIV);\r\n \t\t\t\t\t\t\t\t\t\t break;\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 }\r\n \t\t\t\t\t\t }\r\n\r\n \t\t\t\t\t }\r\n \t\t\t\t\telse\r\n \t\t\t\t\t {\r\n \t\t\t\t\t\t//strNewRelId = connectFeaturesWithNewRel(context,strParentFeatureId,featureObjId,strType,newReltoConnect);\r\n \t\t\t\t\t\tstrNewRelId = connectFeaturesWithNewRel(context,htParentObjData,featureObjId,strType,newReltoConnect);\r\n\r\n \t\t\t\t\t }\r\n\r\n\r\n\r\n \t\t\t\t\t //Migrate attributes from FL to Rel id\r\n \t\t\t\t\t HashMap mapRelAttributes = new HashMap();\r\n \t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_CHILD_MARKETING_NAME,\r\n \t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_CHILD_MARKETING_NAME+\"]\"));\r\n \t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_CHILD_OBJECT_NAME,\r\n \t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_CHILD_OBJECT_NAME+\"]\"));\r\n \t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_PARENT_MARKETING_NAME,\r\n \t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_PARENT_MARKETING_NAME+\"]\"));\r\n \t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_PARENT_OBJECT_NAME,\r\n \t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_PARENT_OBJECT_NAME+\"]\"));\r\n \t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_RULE_TYPE,\r\n \t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_RULE_TYPE+\"]\"));\r\n\r\n\r\n \t\t\t\t\t if(newReltoConnect!=null\r\n \t\t\t\t && (newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_LOGICAL_FEATURES)\r\n \t\t\t\t\t\t || newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_MANUFACTURING_FEATURES))){\r\n\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_COMPONENT_LOCATION,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_COMPONENT_LOCATION+\"]\"));\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_FIND_NUMBER,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FIND_NUMBER+\"]\"));\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_FORCE_PART_REUSE,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FORCE_PART_REUSE+\"]\"));\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_QUANTITY,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_QUANTITY+\"]\"));\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_REFERENCE_DESIGNATOR,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_REFERENCE_DESIGNATOR+\"]\"));\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_USAGE,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_USAGE+\"]\"));\r\n \t\t\t\t\t\t }\r\n\r\n \t\t\t\t\t if(newReltoConnect!=null\r\n \t\t\t&& newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_LOGICAL_FEATURES)){\r\n\r\n \t\t\t\t\t\t mapRelAttributes.put(ATTRIBUTE_LOGICAL_SELECTION_CRITERIA,strSelCriterion);\r\n \t\t\t\t }\r\n\r\n\r\n \t\t\t\t\t if(newReltoConnect!=null\r\n \t \t\t\t\t && newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_CONFIGURATION_OPTIONS)){\r\n\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_SEQUENCE_ORDER,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_SEQUENCE_ORDER+\"]\"));\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_DEFAULT_SELECTION,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_DEFAULT_SELECTION+\"]\"));\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_LIST_PRICE,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_LIST_PRICE+\"]\"));\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_MAXIMUM_QUANTITY,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MAXIMUM_QUANTITY+\"]\"));\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_MINIMUM_QUANTITY,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MINIMUM_QUANTITY+\"]\"));\r\n \t\t\t\t\t }\r\n\r\n \t\t\t\t\t //Configuration Feature relationship\r\n \t\t\t\t\t if(newReltoConnect!=null\r\n \t\t\t\t\t\t && newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_CONFIGURATION_FEATURES)){\r\n\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_SEQUENCE_ORDER,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_SEQUENCE_ORDER+\"]\"));\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_DEFAULT_SELECTION,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_DEFAULT_SELECTION+\"]\"));\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_LIST_PRICE,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_LIST_PRICE+\"]\"));\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_MAXIMUM_QUANTITY,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MAXIMUM_QUANTITY+\"]\"));\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_MINIMUM_QUANTITY,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MINIMUM_QUANTITY+\"]\"));\r\n\r\n\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_CONFIGURATION_SELECTION_CRITERIA,strSelCriterion);\r\n\r\n\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_CONFIGURATION_TYPE,\r\n \t\t\t\t\t\t\t\t \tConfigurationConstants.RANGE_VALUE_SYSTEM);\r\n\r\n \t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_INHERITED,\r\n \t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_INHERITED+\"]\"));\r\n\r\n \t\t\t\t\t\t //mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_ROLLED_UP,ConfigurationConstants.RANGE_VALUE_FALSE);\r\n \t\t\t\t\t }\r\n\r\n \t\t\t\t\t //Mandatory Configuration Feature relationship\r\n \t\t\t\t\t if(newReltoConnect!=null\r\n \t\t\t\t\t\t\t && newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_MANDATORY_CONFIGURATION_FEATURES)){\r\n\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_SEQUENCE_ORDER,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_SEQUENCE_ORDER+\"]\"));\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_DEFAULT_SELECTION,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_DEFAULT_SELECTION+\"]\"));\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_LIST_PRICE,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_LIST_PRICE+\"]\"));\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_MAXIMUM_QUANTITY,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MAXIMUM_QUANTITY+\"]\"));\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_MINIMUM_QUANTITY,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MINIMUM_QUANTITY+\"]\"));\r\n\r\n\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_CONFIGURATION_TYPE,\r\n \t\t\t\t\t\t\t\t\t \tConfigurationConstants.RANGE_VALUE_SYSTEM);\r\n\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_INHERITED,\r\n \t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_INHERITED+\"]\"));\r\n\r\n \t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_ROLLED_UP,ConfigurationConstants.RANGE_VALUE_FALSE);\r\n\r\n \t\t\t\t\t }\r\n\r\n\r\n \t\t\t\t\t //\"Varies By\" and \"Inactive Varies By\" relationship\r\n \t\t\t\t\t if(newReltoConnect!=null\r\n \t\t\t\t\t\t&&\r\n \t\t\t\t\t\t(newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_VARIES_BY)\r\n \t\t\t\t\t\t ||newReltoConnect.equalsIgnoreCase(ConfigurationConstants.RELATIONSHIP_INACTIVE_VARIES_BY)))\r\n \t\t\t\t\t {\r\n\t\t\t\t\t\t if((String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MANDATORY_FEATURE+\"]\")!=null\r\n\t\t\t\t\t\t\t\t\t&&\r\n\t\t\t\t\t\t\t ((String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MANDATORY_FEATURE+\"]\")).equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_YES)){\r\n\r\n\r\n\t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_CONFIGURATION_TYPE,\r\n\t\t\t\t\t\t\t\t\t\t\t \t\t\t\tConfigurationConstants.RANGE_VALUE_MANDATORY);\r\n\r\n\t\t\t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_INHERITED,\r\n\t\t\t\t\t\t\t\t\t\t\t (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_INHERITED+\"]\"));\r\n\r\n\t\t\t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_ROLLED_UP,\r\n\t\t\t\t\t\t\t\t \t\t\t\tConfigurationConstants.RANGE_VALUE_TRUE);\r\n\r\n\t\t\t\t\t\t\t\t }else if((String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MANDATORY_FEATURE+\"]\")!=null\r\n\t\t\t\t\t\t\t\t\t\t\t&&\r\n\t\t\t\t\t\t\t\t\t\t\t((String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MANDATORY_FEATURE+\"]\")).equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_NO)){\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_CONFIGURATION_TYPE,ConfigurationConstants.RANGE_VALUE_SYSTEM);\r\n\t\t\t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_INHERITED,ConfigurationConstants.RANGE_VALUE_FALSE);\r\n\t\t\t\t\t\t\t\t\t mapRelAttributes.put(ConfigurationConstants.ATTRIBUTE_ROLLED_UP,ConfigurationConstants.RANGE_VALUE_TRUE);\r\n\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t }\r\n \t\t\t\t\t \r\n \t\t\t\t\t if(strNewRelId!=null && strNewRelId.length()!=0){\r\n\r\n \t\t\t\t\t\t DomainRelationship domRel = new DomainRelationship(strNewRelId);\r\n \t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Rel id :: \"+ strNewRelId + \"\\n\");\r\n \t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Attribute value Map set for this Rel id :: \"+ mapRelAttributes +\"\\n\\n\");\r\n \t\t\t\t\t\t domRel.setAttributeValues(context, mapRelAttributes);\r\n \t\t\t\t\t\t //preparing MapList to pass to external migration\r\n \t\t\t\t\t\t Map FLInfoMap = new HashMap();\r\n \t\t\t\t\t\t FLInfoMap.put(\"objectId\",strFLId);\r\n \t\t\t\t\t\t FLInfoMap.put(\"newRelId\",strNewRelId);\r\n\r\n \t\t\t\t\t\t DomainRelationship domRel1 = new DomainRelationship(strNewRelId);\r\n \t\t\t\t\t\t domRel1.open(context);\r\n \t\t\t\t\t String connectionName = domRel1.getTypeName();\r\n \t\t\t\t\t FLInfoMap.put(\"newRelType\",connectionName);\r\n \t\t\t\t\t\t FLInfoMap.put(\"newRelName\",newReltoConnect);\r\n \t\t\t\t\t\t FLInfoMap.put(\"infoMapFLConnection\",flMap);\r\n\r\n \t\t\t\t\t\t FLInfoList.add(FLInfoMap);\r\n \t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t //Add FL object to delete list\r\n\t\t\t\t\t\t sLFLToDelete.add(strFLId);\r\n\r\n\t\t\t\t\t }\r\n \t\t\t\t }else{\r\n \t\t\t\t\t\t //This is hanging FL Object ID need to b removed\r\n \t\t\t\t\t\t sLFLToDelete.add(strFLId);\r\n \t\t\t\t\t\t Map FLInfoMap = new HashMap();\r\n \t\t\t\t\t\t FLInfoMap.put(\"objectId\",strFLId);\r\n \t\t\t\t\t\t FLInfoMap.put(\"infoMapFLConnection\",flMap);\r\n \t\t\t\t\t\t FLInfoList.add(FLInfoMap);\r\n \t\t\t\t\t }\r\n \t\t\t\t }\r\n\r\n \t\t\t }catch(Exception e)\r\n \t\t\t {\r\n \t\t\t\t e.printStackTrace();\r\n \t\t\t\t throw new FrameworkException(e.getMessage());\r\n \t\t\t }\r\n \t }\r\n\r\n \t\t\t//Float the connections on FL objects to new Relationships formed\r\n \t\t\t if(strNewRelId!=null && strNewRelId.length()!=0){\r\n\r\n \t\t\t\t floatFLConnections(context,FLInfoList);\r\n \t\t\t }\r\n\r\n\r\n \t\t\t//call external migration\r\n \t\t\tMapList customResults = callInterOpMigrations(context, FLInfoList);\r\n \t\t\tIterator itrCustomResults = customResults.iterator();\r\n \t\t\twhile (itrCustomResults.hasNext()) {\r\n Map customResultsMap = (Map)itrCustomResults.next();\r\n \t\t\t\t Integer status = (Integer)customResultsMap.get(\"status\");\r\n\t\t\t\t String failureMessage = (String)customResultsMap.get(\"failureMessage\");\r\n\r\n\t\t\t\t if(status==1)\r\n\t\t\t\t {\r\n\t\t\t\t\t throw new FrameworkException(failureMessage);\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }\r\n\r\n\r\n\t\t//Check the \"Varies By\" and \"Effectivity Status\" values\r\n\t\t StringList sLVariesByRelId =new StringList();\r\n\t\t StringList sLEffectivityStatusValue=new StringList();\r\n\t\t StringList sLActiveCntValue=new StringList();\r\n\t\t StringList sLInActiveCntValue=new StringList();\r\n\t\t StringList sLParType=new StringList();\r\n\r\n\r\n\t\tif((StringList)featObjMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].id\")!=null){\r\n\r\n\t\t\t//sLName = (StringList)featObjMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.name\");\r\n\t\t\t//sLVariesByRelId = (StringList)featObjMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].id\");\r\n\t\t\t//sLEffectivityStatusValue = (StringList)featObjMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_EFFECTIVITY_STATUS+\"]\");\r\n\t\t\t//sLActiveCntValue = (StringList)featObjMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_ACTIVE_COUNT+\"]\");\r\n\t\t\t//sLInActiveCntValue = (StringList)featObjMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_INACTIVE_COUNT+\"]\");\r\n\t\t\t//sLParentId = (StringList)featObjMap.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.id\");\r\n\r\n\t\t\t/*Not using the above statements as there is issue in sequence of ids in String list\r\n\t\t\t * coming from above getInfo\r\n\t\t\t * Doing the getInfo again on the given Feature Id\r\n\t\t\t */\r\n\r\n\t\t\tString stFeaId = (String) featObjMap.get(SELECT_ID);\r\n\t\t\tDomainObject domFd = new DomainObject(stFeaId);\r\n\t\t\tStringList objSel = new StringList();\r\n\t\t\tobjSel.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].id\");//Varies By rel id if present\r\n\t\t\tobjSel.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.id\");//Varies By rel id if present\r\n\t\t\tobjSel.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.name\");//Varies By rel id if present\r\n\t\t\tobjSel.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.type\");//Varies By rel id if present\r\n\r\n\t\t\tobjSel.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_EFFECTIVITY_STATUS+\"]\");//Varies By rel id if present\r\n\t\t\tobjSel.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ATTRIBUTE_INAVLID_CONTEXTS+\"]\");//Varies By rel id if present\r\n\t\t\tobjSel.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ATTRIBUTE_USER_DEFINED_EFFECTIVITY+\"]\");//Varies By rel id if present\r\n\r\n\t\t\tobjSel.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_ACTIVE_COUNT+\"]\");//Varies By rel id if present\r\n\t\t\tobjSel.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_INACTIVE_COUNT+\"]\");//Varies By rel id if present\r\n\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].id\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.id\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.name\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.type\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ATTRIBUTE_INAVLID_CONTEXTS+\"]\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_EFFECTIVITY_STATUS+\"]\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_ACTIVE_COUNT+\"]\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_INACTIVE_COUNT+\"]\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ATTRIBUTE_USER_DEFINED_EFFECTIVITY+\"]\");\r\n\r\n\r\n\t\t\t Map MFeatObj = domFd.getInfo(context, objSel);\r\n\r\n\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].id\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.id\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.name\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.type\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ATTRIBUTE_INAVLID_CONTEXTS+\"]\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_EFFECTIVITY_STATUS+\"]\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_ACTIVE_COUNT+\"]\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_INACTIVE_COUNT+\"]\");\r\n\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ATTRIBUTE_USER_DEFINED_EFFECTIVITY+\"]\");\r\n\r\n\r\n\t\t\tsLVariesByRelId = (StringList) MFeatObj.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].id\");\r\n\t\t\tsLParType= (StringList) MFeatObj.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.type\");\r\n\t\t\tsLEffectivityStatusValue= (StringList) MFeatObj.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_EFFECTIVITY_STATUS+\"]\");\r\n\t\t\tsLActiveCntValue= (StringList) MFeatObj.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_ACTIVE_COUNT+\"]\");\r\n\t\t\tsLInActiveCntValue=(StringList) MFeatObj.get(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_INACTIVE_COUNT+\"]\");\r\n\r\n\t\t}\r\n\r\n\t\tHashMap mapRelAtt = null;\r\n\r\n\t\tfor(int iEffStatusCnt=0;iEffStatusCnt<sLEffectivityStatusValue.size();iEffStatusCnt++){\r\n\t\t\tmapRelAtt = new HashMap();\r\n\t\t\tString strEffectStatus = (String)sLEffectivityStatusValue.get(iEffStatusCnt);\r\n\t\t\tif(strEffectStatus!=null && strEffectStatus.equalsIgnoreCase(ConfigurationConstants.EFFECTIVITY_STATUS_INACTIVE)){\r\n\t\t\t\tDomainRelationship.setType(context, (String)sLVariesByRelId.get(iEffStatusCnt), ConfigurationConstants.RELATIONSHIP_INACTIVE_VARIES_BY);\r\n\t\t\t\tmapRelAtt.put(ConfigurationConstants.ATTRIBUTE_CONFIGURATION_TYPE,ConfigurationConstants.RANGE_VALUE_SYSTEM);\r\n\t\t\t\tmapRelAtt.put(ConfigurationConstants.ATTRIBUTE_INHERITED,ConfigurationConstants.RANGE_VALUE_FALSE);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tString strInActiveCntValue = (String)sLInActiveCntValue.get(iEffStatusCnt);\r\n\t\t\tint inactiveCount = Integer.parseInt(strInActiveCntValue);\r\n\r\n\t\t\tString strActiveCntValue = (String)sLActiveCntValue.get(iEffStatusCnt);\r\n\t\t\tint activeCount = Integer.parseInt(strActiveCntValue);\r\n\r\n\t\t\tif( inactiveCount==0 && activeCount==0 ){\r\n\t\t\t\tString strParType = (String)sLParType.get(iEffStatusCnt);\r\n\t\t\t\tif(mxType.isOfParentType(context,strParType, ConfigurationConstants.TYPE_PRODUCTS)){\r\n\t\t\t\t\tmapRelAtt.put(ConfigurationConstants.ATTRIBUTE_ROLLED_UP,ConfigurationConstants.RANGE_VALUE_TRUE);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmapRelAtt.put(ConfigurationConstants.ATTRIBUTE_ROLLED_UP,ConfigurationConstants.RANGE_VALUE_FALSE);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t\tmapRelAtt.put(ConfigurationConstants.ATTRIBUTE_ROLLED_UP,ConfigurationConstants.RANGE_VALUE_TRUE);\r\n\t\t\t}\r\n\t\t\tDomainRelationship domRel = new DomainRelationship((String)sLVariesByRelId.get(iEffStatusCnt));\r\n\t\t\tmqlLogRequiredInformationWriter(\"Rel id :: \"+(String)sLVariesByRelId.get(iEffStatusCnt)+ \"\\n\");\r\n\t\t\tmqlLogRequiredInformationWriter(\"Attribute value Map set for this Rel id :: \"+ mapRelAtt +\"\\n\\n\");\r\n\t\t\tdomRel.setAttributeValues(context, mapRelAtt);\r\n\t\t}\r\n\r\n\r\n\t\t//Cleanup - delete related Feature List objects on successful migration of Feature\r\n\t\t deleteObjects(context,sLFLToDelete);\r\n\r\n\t\t loadMigratedOids(featureObjId);\r\n\r\n\t }else{ // for those Features which has \"Conflict\" stamp \"Yes\"\r\n\t\t String strCommand = strType + \",\" + strName + \",\" + strRevision + \",\" + strContextUsage+\"\\n\";\r\n\t\t\t writeUnconvertedOID(strCommand, featureObjId);\r\n\t }\r\n\r\n }", "public FeatureCursor queryFeatures() {\n return featureDao.queryIn(queryIdsSQL());\n }", "protected Set<Integer> getToReplace() {\r\n \r\n Set<Integer> toReplace = new HashSet<>();\r\n double distance;\r\n Individual a, b;\r\n \r\n for(int i = 0; i < this.P.size()-1; i++) {\r\n \r\n a = this.P.get(i);\r\n \r\n for(int j = i+1; j < this.P.size(); j++) {\r\n \r\n b = this.P.get(j);\r\n \r\n distance = this.getSquaredEuclideanDistance(a.vector, b.vector);\r\n \r\n if(distance < this.minDifference) {\r\n \r\n if(a.fitness < b.fitness) {\r\n toReplace.add(j);\r\n } else {\r\n toReplace.add(i);\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n \r\n return toReplace;\r\n \r\n }", "public String[] getIDs() {\n return impl.getIDs();\n }", "public Vector getServiceIds() throws ServiceException {\n return namingService.getServiceIds();\n }", "java.util.List<java.lang.Long> getIdsList();", "public static List<Feature> getList(int id) throws SQLException {\r\n\t\tString VideoIdColumnName = \"VIDEO_ID\";\r\n\t\tResultSet rs = operation.getRow(\"VENDOR_MODEL\", VideoIdColumnName, id);\r\n\t\t\t\t\r\n\t\tList<Feature> list = new ArrayList<Feature>();\r\n\r\n\t\twhile (rs.next()) {\r\n\t\t\t\r\n\t\t\tFeature feature = new Feature()\r\n\t\t\t\t\t.setFeatureId(rs.getString(\"FEATURE_ID\"))\r\n\t\t\t\t\t.setVideoId(rs.getString(\"VIDEO_ID\"))\r\n\t\t\t\t\t.setFeatureName(rs.getString(\"FEATURE_NAME\"))\r\n\t\t\t\t\t.setFeatureVector(rs.getString(\"FEATURE_VECTOR\"))\r\n\t\t\t\t\t.setCreationDate(rs.getString(\"CREATION_DATE\"));\r\n\r\n\t\t\tlist.add(feature);\r\n\t\t}\r\n\r\n\t\tSystem.out.println(list.size());\r\n\t\treturn list;\r\n\t}", "public String [] _truncatable_ids()\r\n {\r\n return _ids_list;\r\n }", "public List<FeatureDataBean> getAllFeatures() throws GenericDatabaseException {\n List<String> ids = new ArrayList<>();\n ids.add(UMFeatureDao.PARENT);\n \n Map<String,Object> equals=new HashMap<>();\n equals.put(UMFeatureDao.IS_ACTIVE, Boolean.TRUE);\n \n Map<QueryOperators, Object> criteria = new HashMap<>();\n criteria.put(QueryOperators.IS_NULL, ids);\n criteria.put(QueryOperators.EQUAL, equals);\n \n return (convertFeatureDataBeanToFeatureModel(featureService.retrieveFeatures(null, criteria, null)));\n }", "public Set<ObjRef> getAddedRefs() {\n return Sets.newHashSet(addedObjRefToLineageRefs.keySet());\n }", "private List<String> getAllPageIdsForUpdate()\n {\n List<String> pageIds = new ArrayList<String>();\n pageIds.add(pageId);\n for (GWikiElement depPageId : getDepObjects()) {\n pageIds.add(depPageId.getElementInfo().getId());\n }\n return pageIds;\n }", "@Override public Collection<String> getServerIds() {\n return getTrackedBranches().getServerIds();\n }", "@Override\n\tpublic String[] getIds() {\n\t\treturn null;\n\t}", "public Vector checkAllIdReferences()\n {\n Vector resultVector = new Vector();\n String msgText = \"\";\n String idrefValue = \"\";\n boolean iItemdrefResult = false;\n\n if ( !mItemIdrefs.isEmpty() )\n {\n int mItemIdrefsSize = mItemIdrefs.size();\n for ( int i = 0; i < mItemIdrefsSize; i++ )\n {\n idrefValue = (String)mItemIdrefs.elementAt(i);\n\n if ( !idrefValue.equals(\"\") ) \n {\n msgText = Messages.getString(\"ManifestMap.40\", idrefValue ); \n LOGGER.info( \"INFO: \" + msgText ); \n DetailedLogMessageCollection.getInstance().addMessage( \n new LogMessage( MessageType.INFO, msgText ) );\n\n iItemdrefResult = checkIdReference( idrefValue );\n\n // track all idref values whose reference was not valid\n\n if ( !iItemdrefResult )\n {\n msgText = Messages.getString(\"ManifestMap.43\", idrefValue ); \n LOGGER.info( \"FAILED: \" + msgText ); \n DetailedLogMessageCollection.getInstance().addMessage( new LogMessage(\n MessageType.FAILED, msgText ) );\n\n resultVector.add( idrefValue );\n }\n }\n }\n }\n\n if ( !mDependencyIdrefs.isEmpty() )\n {\n int mDependencyIdrefsSize = mDependencyIdrefs.size();\n for ( int i = 0; i < mDependencyIdrefsSize; i++ )\n {\n idrefValue = (String)mDependencyIdrefs.elementAt(i);\n\n if ( !idrefValue.equals(\"\") ) \n {\n msgText = Messages.getString(\"ManifestMap.40\", idrefValue ); \n LOGGER.info( \"INFO: \" + msgText ); \n DetailedLogMessageCollection.getInstance().addMessage( new LogMessage( MessageType.INFO,\n msgText ) );\n \n boolean iDependencydrefResult = checkIdReference( idrefValue );\n\n // track all idref values whose reference was not valid\n\n if ( !iDependencydrefResult )\n {\n msgText = Messages.getString(\"ManifestMap.43\", idrefValue ); \n LOGGER.info( \"FAILED: \" + msgText ); \n DetailedLogMessageCollection.getInstance().addMessage( new LogMessage(\n MessageType.FAILED, msgText ) );\n\n resultVector.add( idrefValue );\n }\n }\n }\n }\n\n return resultVector;\n }", "public List getAllIds();", "Iterable<Long> vertices() {\n //YOUR CODE HERE, this currently returns only an empty list.\n return world.keySet();\n }", "public List<K> getSavedIds() {\n if (dbObjects.length > 0 && dbObjects[0] instanceof JacksonDBObject) {\n throw new UnsupportedOperationException(\n \"Generated _id retrieval not supported when using stream serialization\");\n }\n\n List<K> ids = new ArrayList<K>();\n for (DBObject dbObject : dbObjects) {\n ids.add(jacksonDBCollection.convertFromDbId(dbObject.get(\"_id\")));\n }\n\n return ids;\n }", "List<Feature> getFeatures();", "LinkedHashSet<String> getOrderedBeanIds();", "public Vector<String> getIdentifiers()\n\t{\n\t\tfinal Vector<String> rets = new Vector<String>();\n\t\trets.add(identifier);\n\t\treturn rets;\n\t}", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "java.util.List<iet.distributed.telemetry.Feature> \n getFeatureList();", "@Override\n public Class<? extends Feature> getFeatureClass() {\n\treturn VersionFeatures.class;\n }", "@Override\n public List<Number> getRevisionHistory(Long id) {\n return null;\n }", "public Collection getPersistedObjectIds() {\n if (_payload != PAYLOAD_OIDS_WITH_ADDS) {\n if (_payload == PAYLOAD_OIDS)\n throw new UserException(s_loc.get(\"no-added-oids\"));\n throw new UserException(s_loc.get(\"extent-only-event\"));\n }\n return (_addIds == null) ? Collections.EMPTY_LIST : _addIds;\n }", "private long[] getClonedEquivalent(long[] originalStaffIds, Map<Long, Staff> oldIdToNewStaff) {\n\tSet<Long> clonedStaffSet = new HashSet<Long>();\n\tfor (long originalId : originalStaffIds) {\n\t Staff stf = oldIdToNewStaff.get(originalId);\n\t if (stf != null) {\n\t\tclonedStaffSet.add(stf.getId());\n\t }\n\t}\n\treturn Longs.toArray(clonedStaffSet);\n }", "public java.util.List<java.lang.Integer>\n getOtherIdsList() {\n return java.util.Collections.unmodifiableList(otherIds_);\n }", "private void migrateFeatures(Context context, StringList objectIdList)throws Exception{\r\n\r\n \t if (objectIdList == null || objectIdList.size() <= 0){\r\n\t\tsetAdminMigrationStatus(context,\"FeatureComplete\");\r\n\t\tmqlLogRequiredInformationWriter(\"Feature migration done.\\n\");\r\n\t\treturn;\r\n\t\t }\r\n\r\n \t try{\r\n \t\t //STEP1 - turn triggers off\r\n \t\t String strMqlCommand = \"trigger off\";\r\n \t\t MqlUtil.mqlCommand(context,strMqlCommand,true);\r\n\r\n \t\t //STEP2 - set admin property\r\n \t\t setAdminMigrationStatus(context,\"FeatureInProcess\");\r\n \t\t mqlLogRequiredInformationWriter(\"Migration Status set to :: FeatureInProcess\\n\");\r\n\r\n \t\t //STEP3 - get \"Feature\" object list related data.. in one \"getinfo\" call\r\n \t String[] oidsArray = new String[objectIdList.size()];\r\n oidsArray = (String[])objectIdList.toArray(oidsArray);\r\n\r\n StringList featureObjSelects = new StringList();\r\n \t\t\t featureObjSelects.addElement(SELECT_TYPE);\r\n \t\t\t featureObjSelects.addElement(SELECT_NAME);\r\n \t\t\t featureObjSelects.addElement(SELECT_REVISION);\r\n \t\t\t featureObjSelects.addElement(SELECT_VAULT);\r\n \t\t\t featureObjSelects.addElement(SELECT_ID);\r\n \t\t\t featureObjSelects.addElement(DomainObject.SELECT_TO_ID);\r\n\r\n \t\t\t featureObjSelects.addElement(\"attribute[\"+ATTRIBUTE_NEW_FEATURE_TYPE+\"]\");\r\n \t\t\t featureObjSelects.addElement(\"attribute[\"+ATTRIBUTE_FTRMigrationConflict+\"]\");\r\n\r\n \t\t\t featureObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT+\"]\");//goes into LF or MF type\r\n \t\t\t featureObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_DUPLICATE_PART_XML+\"]\");//goes into LF,MF,CF type\r\n \t\t\t featureObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_NAME+\"]\");//goes into LF,MF,CF type\r\n \t\t\t featureObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_TEXT+\"]\");//goes into LF,MF,CF type\r\n \t\t\t featureObjSelects.addElement(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_ORIGINATOR+\"]\");//goes into LF,MF,CF type\r\n\r\n \t\t\t //For DV\r\n \t\t\t featureObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].id\");//Varies By rel id if present\r\n \t\t\t featureObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.id\");//Varies By rel id if present\r\n \t\t\t featureObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.name\");//Varies By rel id if present\r\n\r\n \t\t\t featureObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_EFFECTIVITY_STATUS+\"]\");//Varies By rel id if present\r\n \t\t\t featureObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ATTRIBUTE_INAVLID_CONTEXTS+\"]\");//Varies By rel id if present\r\n \t\t\t featureObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ATTRIBUTE_USER_DEFINED_EFFECTIVITY+\"]\");//Varies By rel id if present\r\n\r\n \t\t\t featureObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_ACTIVE_COUNT+\"]\");//Varies By rel id if present\r\n \t\t\t featureObjSelects.addElement(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_INACTIVE_COUNT+\"]\");//Varies By rel id if present\r\n\r\n \t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].id\");\r\n \t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.id\");\r\n \t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].from.name\");\r\n \t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ATTRIBUTE_INAVLID_CONTEXTS+\"]\");\r\n \t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_EFFECTIVITY_STATUS+\"]\");\r\n \t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_ACTIVE_COUNT+\"]\");\r\n \t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ConfigurationConstants.ATTRIBUTE_INACTIVE_COUNT+\"]\");\r\n \t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].attribute[\"+ATTRIBUTE_USER_DEFINED_EFFECTIVITY+\"]\");\r\n\r\n MapList mapList = DomainObject.getInfo(context, oidsArray, featureObjSelects);\r\n\r\n DomainConstants.MULTI_VALUE_LIST.remove(\"to[\"+ConfigurationConstants.RELATIONSHIP_VARIES_BY+\"].id\");\r\n\r\n\r\n Iterator itr = mapList.iterator();\r\n Map featObjMap = new HashMap();\r\n\r\n String featureObjId = \"\";\r\n //String strType = \"\";\r\n //String strName = \"\";\r\n //String strRevision = \"\";\r\n\r\n while (itr.hasNext())\r\n {\r\n \tfeatObjMap = (Map) itr.next();\r\n \t\t\t\tfeatureObjId = (String) featObjMap.get(SELECT_ID);\r\n\r\n \t\t\t\t//strType = (String) featObjMap.get(SELECT_TYPE);\r\n \t\t\t\t//strName = (String) featObjMap.get(SELECT_NAME);\r\n \t\t\t\t//strRevision = (String) featObjMap.get(SELECT_REVISION);\r\n\r\n \t\t\t\tmqlLogRequiredInformationWriter(\"\\n\\n\\n\");\r\n \t\t\t\tmqlLogRequiredInformationWriter(\"Processing for feature object ::\" + featureObjId + \" started\\n\\n\");\r\n\r\n \t\t\t\t//migrateFeatures Step1:\r\n \ttry{\r\n \t\tmigrateFeaturesStep_1(context,featObjMap);\r\n\r\n \t }catch(Exception e)\r\n \t\t\t\t {\r\n \t\te.printStackTrace();\r\n \t\t\t\tString strCommand = featureObjId + \":\" + e.getMessage() + \"\\n\";\r\n \t\t\t\twriteUnconvertedOID(strCommand, featureObjId);\r\n continue; // really?\r\n \t\t\t\t }\r\n\r\n \t mqlLogRequiredInformationWriter(\"Migration for Feature id :: \"+ featureObjId + \" is done.\\n\");\r\n }\r\n\r\n \t //check if any FLs present in database.If not set migration status as FeatureComplete\r\n \t\t if(!isTypeExists(context,ConfigurationConstants.TYPE_FEATURE_LIST))\r\n \t\t {\r\n \t\t\t setAdminMigrationStatus(context,\"FeatureComplete\");\r\n \t\t\t mqlLogRequiredInformationWriter(\"Feature Migration Completed.\\n\");\r\n \t\t }else{\r\n \t\t\t mqlLogRequiredInformationWriter(\"Feature Migration batch successful, proceeding with next batch.\\n\");\r\n \t\t }\r\n\r\n //turn triggers off\r\n \t\t strMqlCommand = \"trigger on\";\r\n \t\t MqlUtil.mqlCommand(context,strMqlCommand,true);\r\n \t}catch(Exception e)\r\n \t {\r\n \t\t e.printStackTrace();\r\n \t\t mqlLogRequiredInformationWriter(\"Feature Migration Failed.\\n\");\r\n \t\t throw e;\r\n \t }\r\n \t return;\r\n }", "@Override\n public boolean hasStableIds() {\n return mBaseAdapter.hasStableIds();\n }", "FeatureId getFeatureId();", "private static Map<String, List<String>> getDbIdToStableIds(ResultSet stableIdResults) throws SQLException {\n\t\tMap<String, List<String>> dbIdToStableIds = new HashMap<>();\n\n\t\t// Iterate through returned results of DB IDs and stable IDs\n\t\twhile (stableIdResults.next()) {\n\t\t\tString stableId = stableIdResults.getString(1);\n\t\t\tString dbId = stableIdResults.getString(2);\n\n\t\t\tdbIdToStableIds.computeIfAbsent(dbId, k -> new ArrayList<>()).add(stableId);\n\t\t}\n\t\treturn dbIdToStableIds;\n\t}", "protected Set<Integer> getInnovations() {\n\t\treturn genes.keySet();\n\t}", "private TreeSet<Long> getIds(Connection connection) throws Exception {\n\t\tTreeSet<Long> result = new TreeSet<Long>();\n\t\tPreparedStatement ps = null;\n\t\ttry {\n\t\t\tps = connection\n\t\t\t\t\t.prepareStatement(\"select review_feedback_id from \\\"informix\\\".review_feedback\");\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tresult.add(rs.getLong(1));\n\t\t\t}\n\t\t} finally {\n\t\t\tps.close();\n\t\t}\n\t\treturn result;\n\t}", "protected Set<String> getUserActivatedGroupIds()\n {\n Set<String> result = New.set();\n DataGroupInfoActiveSet initialActiveSet = myActiveSetConfig.getSetByName(USER_ACTIVATED_SET_NAME);\n if (initialActiveSet != null)\n {\n result.addAll(initialActiveSet.getGroupIds());\n }\n return result;\n }", "public Set<URI> getMemberIdentities() {\n\t\tSet<URI> result = new HashSet<>();\n\t\tfor (URI memberURI : members) {\n\t\t\tTopLevel member = this.getSBOLDocument().getTopLevel(memberURI);\n\t\t\tif(member != null) {\n\t\t\t\tresult.add(member.getIdentity());\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "protected Set<String> getUserDeactivatedGroupIds()\n {\n Set<String> historyIds = getActiveHistoryList().stream().map(rec -> rec.getId()).collect(Collectors.toSet());\n Set<String> userActivatedGroupIds = getUserActivatedGroupIds();\n return New.set(CollectionUtilities.difference(historyIds, userActivatedGroupIds));\n }", "public java.util.List<java.lang.Integer>\n getOtherIdsList() {\n return otherIds_;\n }", "public java.util.List<String> getIds() {\n return ids;\n }", "public String getIds() {\n return ids;\n }", "public String getIds() {\n return ids;\n }", "public FeatureSet getFeatures() {\n\treturn features;\n }", "String[] _truncatable_ids();", "List<Integer> getIdUsersWithExpiredLifeTimeList( Timestamp currentTimestamp );", "public Set<Pair<State, State>> getRefinementPairs() {\n\t\tSet<Pair<State, State>> result = new HashSet<Pair<State, State>>();\r\n\t\tIterator<SpoilerVertice> it = spoilerVertices.iterator();\r\n\t\tSpoilerVertice vertice;\r\n\t\tPair<State, State> pair;\r\n\t\twhile(it.hasNext())\r\n\t\t{\r\n\t\t\tvertice = it.next();\r\n\t\t\tpair = new Pair<State, State>(vertice.getSpecificationState(), vertice.getModelState());\r\n\t\t\tresult.add(pair);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "int getOtherIds(int index);", "public LiveData<List<BookTable>> getFavoriteBooksIdsFromLocal() {\n return bookTableDAO.getAllFavoriteBooks();\n }", "public <LabelType> void loadFeaturesID(Model<T, LabelType> model) {\n\t\tfeaturesID.clear();// remove all elements before\n\t\tfor (T feature : features) {\n\t\t\tfeaturesID.add(model.getDictionary().indexOf(feature));\n\t\t}\n\t\tfeaturesIdLoaded = true;\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Feature)) {\n return false;\n }\n Feature other = (Feature) object;\n return !((this.id == null && other.id != null)\n || (this.id != null && !this.id.equals(other.id)));\n }", "@Override\n public Set<String> getAllColumnIds() {\n return subFilter.getAllColumnIds();\n }", "public Map<String, Object> getIds() {\n return ids;\n }", "public int[] getDependLineIDArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(DEPENDLINEID$26, targetList);\n int[] result = new int[targetList.size()];\n for (int i = 0, len = targetList.size() ; i < len ; i++)\n result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getIntValue();\n return result;\n }\n }", "Collection<ComponentState> getVersions();", "private List getActiveEntities() {\n \t\tList<String> chainIds = new ArrayList<String>();\n \t\tbioUnitTransformationsStructAssembly = bioUnitsStructAssembly.getBioUnitTransformationList(initialBioId);\n \t\tif (bioUnitTransformationsStructAssembly != null) {\n \t\t\tfor (ModelTransformationMatrix trans: bioUnitTransformationsStructAssembly) {\n \t\t\t\tchainIds.add(trans.ndbChainId);\n \t\t\t}\n \t\t}\n \t return chainIds;\n \t}", "public Collection getDeletedObjectIds() {\n if (_payload == PAYLOAD_EXTENTS)\n throw new UserException(s_loc.get(\"extent-only-event\"));\n return (_deletes == null) ? Collections.EMPTY_LIST : _deletes;\n }", "public List<String> getSubsetDefinitionIds() {\n return Identifiable.getIds(getSubsetDefinitionList());\n }", "@Override\n public Collection<ContextKey> getContextKeys() {\n Collection<ContextKey> result = Sets.newHashSet();\n for (ContextualFilter filter : steps) {\n result.addAll(filter.getContextKeys());\n }\n return result;\n }", "public java.util.List<String> getReservedInstancesIds() {\n if (reservedInstancesIds == null) {\n reservedInstancesIds = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();\n reservedInstancesIds.setAutoConstruct(true);\n }\n return reservedInstancesIds;\n }", "public ArrayList<DataFeature> locateQuantFeatures(String segmentId, int start, int stop) {\n return quantSource.locateSegment(segmentId).locateFeatures(start, stop);\n \t}", "public DasFeature[] getAllFeatures() {\n Vector feats = new Vector();\n while (iXml.indexOf(\"<FEATURE\", lastFeatureEndPosition + 9) != -1) {\n String feature = iXml.substring(iXml.indexOf(\"<FEATURE\", lastFeatureEndPosition + 9), iXml.indexOf(\"</FEATURE>\", lastFeatureEndPosition + 9) + 10);\n lastFeatureEndPosition = iXml.indexOf(\"</FEATURE>\", lastFeatureEndPosition + 9);\n if (feature.indexOf(\"<NOTE>No features found for the segment</NOTE>\") < 0) {\n DasFeature f = new DasFeature(feature);\n feats.add(f);\n }\n }\n DasFeature[] features = new DasFeature[feats.size()];\n feats.toArray(features);\n return features;\n }", "public FeatureCollection getLastEditedFeatures(){\n return fcLastEdits;\n }", "public Set<String> getFeatures();", "public Map<Integer, ArrayList<LatLng>> shapeIdList () {\r\n Map<Integer, ArrayList<LatLng>> newList = new HashMap<>();\r\n Cursor getData = getReadableDatabase().rawQuery(\"select shape_id from shapes\", null);\r\n getData.moveToFirst();\r\n while (getData.moveToNext()) {\r\n newList.put(getData.getInt(0), null);\r\n }\r\n return newList;\r\n }" ]
[ "0.59659034", "0.5703934", "0.566103", "0.5547796", "0.5547796", "0.55292165", "0.55172884", "0.5500818", "0.5500818", "0.5500818", "0.5464729", "0.5464729", "0.5464729", "0.5435679", "0.5414077", "0.5414077", "0.537348", "0.537348", "0.5366061", "0.5366061", "0.5366061", "0.5366061", "0.5344101", "0.52904344", "0.5218731", "0.52107894", "0.51929224", "0.51415527", "0.51245254", "0.5103145", "0.50810933", "0.50711936", "0.5053026", "0.5044157", "0.5043699", "0.5032935", "0.5028858", "0.50168544", "0.5012219", "0.49822426", "0.49820405", "0.49789461", "0.49582008", "0.49466842", "0.49339932", "0.49330512", "0.49300286", "0.49259222", "0.4913052", "0.49084866", "0.49009106", "0.48675668", "0.4858702", "0.4847658", "0.48421687", "0.48376837", "0.48330307", "0.48259884", "0.4817464", "0.4817464", "0.481306", "0.48104516", "0.47986448", "0.4797744", "0.47741467", "0.47712505", "0.47700742", "0.4768115", "0.47486898", "0.4741055", "0.47232985", "0.47113857", "0.47108892", "0.47046992", "0.47039714", "0.46993282", "0.4695014", "0.4690519", "0.4690519", "0.4676138", "0.4671514", "0.46677557", "0.46601582", "0.46435907", "0.46428004", "0.46391883", "0.4637404", "0.46365032", "0.46346378", "0.46336254", "0.46302018", "0.46294093", "0.46293893", "0.46290526", "0.46277374", "0.4626029", "0.4620856", "0.46189392", "0.4615496", "0.46150553", "0.4597423" ]
0.0
-1
Channel is called onCreate()
public void createNotificationChannel() { //Instantiate the NotificationManager mNotifyManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); //Notification Channel constructed NotificationChannel notificationChannel = new NotificationChannel(PRIMARY_CHANNEL_ID, "Simple Notification", NotificationManager.IMPORTANCE_HIGH); notificationChannel.enableLights(true); notificationChannel.setLightColor(Color.RED); notificationChannel.enableVibration(true); notificationChannel.setDescription("Simple Notification"); //Create the channel with the NotificationManager mNotifyManager.createNotificationChannel(notificationChannel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void onCreate() {\r\n super.onCreate();\r\n Realm.init(getApplicationContext());\r\n\r\n// createNotificationChannel();\r\n\r\n }", "protected void onInit() {\n\t}", "@RequiresApi(api = Build.VERSION_CODES.O)\n @Override\n public void onCreate() {\n super.onCreate();\n createVirtualEnvironment();\n createNotificationChannel();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tBugSenseHandler.initAndStartSession(BaseActivity.this, CommConstant.BUGSENSE_KEY);\n\t\t\n//\t\t\tUtils.checkCurrentVersion(BaseActivity.this);\n\t\t\n\t\ttry {\n\t\t\tregisterReceiver(getServerSetting, new IntentFilter(\n\t\t\t\t\tCommConstant.SERVER_SETTING_SUCCESSFULLY));\n\t\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "@Override\n public void onInit()\n {\n\n }", "@Override\n public void onCreate() {\n super.onCreate();\n super.setNeedAutoReConnect(NEED_AUTO_RECONNECT);\n super.setNeedConnectStatusBroadcast(NEED_CONNECT_STATUS_BROADCAST);\n Log.e(TAG, \"oncreat\");\n mCommunciation = new CommunciationImp(this);\n mProtocol = new ProtocolConfig(this);\n }", "public abstract void onInit();", "protected void onCreate() {\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n JMessageClient.registerEventReceiver(this);\n setContentView(R.layout.activity_chat);\n mChatView = (ChatView) findViewById(R.id.chat_view);\n mChatView.initModule(mDensity, mDensityDpi);\n mChatController = new ChatController(mChatView, this);\n mChatView.setListeners(mChatController);\n mChatView.setOnTouchListener(mChatController);\n mChatView.setOnSizeChangedListener(mChatController);\n mChatView.setOnKbdStateListener(mChatController);\n initReceiver();\n\n }", "@Override\n public void onCreate() {\n L.d(\"onCreate is called\");\n super.onCreate();\n }", "@Override\r\n protected void onConnected() {\n \r\n }", "@Override\n protected void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n mTAG = this.getClass().getSimpleName();\n initConfigure();\n //PushAgent.getInstance(mContext).onAppStart();\n\n }", "@Override\r\n\tpublic void onOpened() {\n\r\n\t}", "@Override\n public void onCreate() {\n super.onCreate();\n initData();\n }", "protected void onConnect() {}", "public void onCreate() {\n Log.i(TAG, \"MinaClient create\");\r\n\r\n Thread thread = new Thread(this);\r\n thread.start();\r\n\r\n CommandHandle.getInstance().setContext(getApplicationContext());\r\n }", "@Override\r\n\tpublic void onChannelSuccess() {\n\t\t\r\n\t}", "@Override\n public void onStart() {\n \n }", "@Override\n public void onStart() {\n \n }", "public void onCreate() {\n super.onCreate();\n isConnected = false;\n }", "@Override\n public void onCreate() {\n\n Log.v(TAG, \"called onCreate\");\n IntentFilter intentf = new IntentFilter();\n setClientID();\n intentf.addAction(ConnectivityManager.CONNECTIVITY_ACTION);\n registerReceiver(new MQTTBroadcastReceiver(), new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));\n mConnMan = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);\n }", "private void openChannel() {\n database.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n String channelUrl = (String) dataSnapshot.child(\"channelUrl\").getValue();\n joinChannel(channelUrl);\n } else {\n createChannel();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "@Override\n public void onCreate() {\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n mContext=this;\n \n invokeWeChat();\n }", "@Override\n public void onCreate()\n {\n\n super.onCreate();\n }", "@Override\n public void onCreate() {\n initData();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tmApplication = null;\n\t\tContext appCtx = getApplicationContext();\n\t\tif (appCtx instanceof DSCApplication) {\n\t\t\tmApplication = (DSCApplication) appCtx;\n\t\t}\n\t\tif (mApplication != null) {\n\t\t\tmApplication.initFolderObserverList(false);\n\t\t}\n\t}", "@Override\n public void onConnected(Bundle bundle) {\n\n }", "@Override\n public void onConnected(Bundle bundle) {\n\n }", "@Override\n public void onConnected(Bundle bundle) {\n\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t}", "@Override\n\tprotected void initUIandEvent()\n\t{\n\t\tnew Handler(Looper.getMainLooper()).postDelayed(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tIntent i = new Intent(MainActivity.this, LiveRoomActivity.class);\n\t\t\t\t\ti.putExtra(ConstantApp.ACTION_KEY_CROLE, Constants.CLIENT_ROLE_AUDIENCE);\n\t\t\t\t\ti.putExtra(ConstantApp.ACTION_KEY_ROOM_NAME, \"channel_00_01\");\n\t\t\t\t\tstartActivity(i);\n\t\t\t\t\tMainActivity.this.finish();\n\t\t\t\t}\n\t\t}, 1000);\n\t\t//finish();\n\t}", "protected void onInit() {\n onEnable();\n }", "@Override\n\tpublic void onInitialize() {\n\t}", "public void onCreate() {\n }", "@Override\n public void onStart()\n {\n }", "@Override\n public void onCreate() {\n super.onCreate();\n handler = new Handler();\n BusProvider.register(this);\n }", "@Override\n public void onStart() {\n\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t// Call the onCreate in Activity\n\t\tApplicationStatus.setContext(this);\n\t\t// Let the AppStatus know we are in the colofon\n\t\tsetContentView(R.layout.activity_colofon);\n\t\t// Load the correct layout\n\t\tplayer = MediaPlayer.create(this, R.raw.click);\n\t\t// Initialize the media player\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n\tpublic void onCreate() {\n\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n public void onCreate() {\n\n }", "@Override\r\n public void onStart() {\n super.onStart();\r\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "public void onInitHandler() {\n }", "protected void onFirstTimeLaunched() {\n }", "@Override\n\tpublic void onConnected(Bundle arg0) {\n\n\t}", "@Override\n\tpublic void onConnected(Bundle arg0) {\n\n\t}", "void onOpen();", "@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"PlayerService.onCreate() called\");\n\t\tsuper.onCreate();\n\t}", "public void onStart() {\n }", "@Override\n\tpublic void onConnected(Bundle arg0) {\n\t\t\n\t}", "@Override\npublic void onInit(int status) {\n\t\n\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onStart() {\n\n\t\t\t\t\t}", "public void onStart() {\n }", "@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"onCreate\");\n\t\tsuper.onCreate();\n\t}", "void onStart() {\n\n }", "@Override\n protected void onStart() {\n super.onStart();\n mFetchChatRoomListUseCase.registerListener(this);\n }", "@Override\n public void onCreate() {\n if (DEBUG) {\n Log.d(TAG, \"start\");\n }\n super.onCreate();\n init();\n }", "@Override\n public void onOpen(String data) {\n\n log.e(\"Receiver default message channel open!!! \" + data);\n }", "@Override\r\n public void onStart(){\r\n super.onStart();\r\n\r\n }", "@Override\r\n\tpublic void onInit() throws Exception {\n\t\t\r\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.history_video_broadcast);\n\t\tinitView();\n\t\tinitData();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n init();\n }", "@Override\n\tpublic void onCreate() {\n\t\tnotifyServiceReceiver = new NotifyServiceReceiver();\n\t\tsuper.onCreate();\n\t}", "@Override\n protected void onStart() {\n Log.i(\"G53MDP\", \"Main onStart\");\n super.onStart();\n }", "@Override\n\tprotected void onCreate() {\n\t}", "@Override\n public void onStart() {\n super.onStart();\n }", "@Override\n\t\t\tpublic void callStarted(String channel) {\n\t\t\t}", "@Override\r\n\tpublic void onOpen() {\n\r\n\t}", "private void initializeNotificationChannels() {\n NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n createEmergencyChannel(notificationManager);\n createNormalChannel(notificationManager);\n createExtrasChannel(notificationManager);\n }", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.activity_main);\n mActivityMain = (LinearLayout) findViewById(R.id.activity_main);\n /**\n * initialize Sdk\n * @param context\n * @param appKey\n * @param channelId\n *\n * Another way to:\n * Initialization.init();\n */\n// Initialization.init(MainActivity.this, \"1\", \"test\");\n// Initialization.init(MainActivity.this, \"hGp5qw1F\", \"6T17w0JT\"); // 海绵宝宝\n Initialization.init(MainActivity.this, \"83g5nD4y\", \"6T17w0JT\"); // 汤姆猫编程\n\n Initialization.setDebuggable(MainActivity.this, true);\n\n// 数据中心初始化\n// com.Statistics.Initialization.init(this,\"测试\",\"测试\");\n }", "@Override\n\tprotected void onCreate() {\n\t\tSystem.out.println(\"onCreate\");\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_gmaps_view);\n\n // Get Channel Name\n Intent intent = getIntent();\n channelName = intent.getExtras().getString(\"channel\");\n Log.d(TAG, \"Passed Channel Name: \" + channelName);\n\n // Set up View: Map & Action Bar\n MapFragment mapFragment = (MapFragment) getFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n ActionBar actionBar = getSupportActionBar();\n actionBar.setDisplayShowHomeEnabled(false);\n actionBar.setDisplayShowTitleEnabled(false);\n }", "@Override\n public void onCreate() {\n Log.d(TAG, TAG + \" onCreate\");\n }", "@Override\n public void onCreate() {\n super.onCreate();\n mHandler = new Handler();\n }", "@Override\n\tpublic void onActivityCreated(Bundle arg0) {\n\t\tsuper.onActivityCreated(arg0);\n\t}", "@Override\n public void onPostInit()\n {\n\n }", "public void onStart(){ \r\n\t\t//ensure bluetooth is enabled \r\n\t\tensureBluetoothIsEnabled();\r\n\t\tsuper.onStart(); \t\r\n\t}", "public void onInitHandle() {\n }", "@Override\n protected void onStart() {\n super.onStart();\n }", "@Override\n public void onStart() {\n super.onStart();\n\t\t\n }", "@Override\r\n protected void onStart() {\r\n // TODO Auto-generated method stub\r\n super.onStart();\r\n\r\n\r\n }", "@Override\r\n\tpublic void onInit(int status) {\n\t\t\r\n\t}" ]
[ "0.708122", "0.6929039", "0.6920764", "0.6903971", "0.6867746", "0.6866012", "0.68592435", "0.68339723", "0.6820001", "0.67909116", "0.6757294", "0.67492604", "0.67465866", "0.6732402", "0.6686346", "0.66818607", "0.6680562", "0.6670863", "0.6670863", "0.66674453", "0.6666331", "0.6660908", "0.66592455", "0.66531533", "0.6646183", "0.6641114", "0.6633197", "0.6633197", "0.6616312", "0.6612647", "0.66122454", "0.66122454", "0.6605974", "0.6605974", "0.6605974", "0.6605974", "0.6605974", "0.6605974", "0.6605974", "0.6605974", "0.6605974", "0.6594688", "0.6589895", "0.65755624", "0.65617234", "0.65573996", "0.65397626", "0.6532729", "0.6525947", "0.6518019", "0.65100765", "0.65100765", "0.6497077", "0.6496173", "0.6496173", "0.64748365", "0.64710903", "0.64708257", "0.64694893", "0.64596105", "0.645224", "0.645224", "0.64515436", "0.6447393", "0.64390534", "0.64334065", "0.64312667", "0.6427633", "0.64260167", "0.64238936", "0.642344", "0.64134073", "0.64116716", "0.6403511", "0.63918734", "0.6386627", "0.6385882", "0.6379787", "0.637662", "0.6370815", "0.6368548", "0.6368134", "0.63618743", "0.6361761", "0.6358627", "0.6355695", "0.63551927", "0.63551927", "0.63515055", "0.63509476", "0.63464224", "0.6344288", "0.63427985", "0.6341852", "0.63304543", "0.6328865", "0.632692", "0.6323915", "0.63227373", "0.63206244", "0.6317593" ]
0.0
-1
Method to return a notify builder for later use when a notification needs to be created Actual notification information
private NotificationCompat.Builder getNotificationBuilder() { //Launches the application once the user clicks the notification //Pending intent that is sent when the user clicks on the notification in the notification bar Intent notificationIntent = new Intent(this, MainActivity.class); PendingIntent notificationPendingIntent = PendingIntent.getActivity(this, NOTIFICATION_ID, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT); NotificationCompat.Builder notifyBuilder = new NotificationCompat.Builder(this, PRIMARY_CHANNEL_ID) .setContentTitle("You've been notified!") .setContentText("This is your notification text.") .setContentIntent(notificationPendingIntent) .setSmallIcon(R.drawable.ic_stat_name); return notifyBuilder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@NonNull\n\tNotificationBuilder newNotification();", "@SuppressWarnings(\"deprecation\")\n\tprivate Notification makeNotification(){\n \tNotification notice = new Notification(R.drawable.ic_action_about, \n \t\t\tgetString(R.string.notice_ticker), System.currentTimeMillis());\n \tnotice.setLatestEventInfo(this, getString(R.string.notice_title), getString(R.string.notice_content), \n \t\t\tPendingIntent.getActivity(this, 0, new Intent(this, MainActivity.class).\n \t\t\t\t\tsetFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP), 0));\n\n \tnotice.flags |= Notification.FLAG_NO_CLEAR;\n \t\n \treturn notice;\n\n }", "private Notification getNotification() {\n NotificationCompat.Builder builder = new NotificationCompat.Builder(this)\n .setColor(getResources().getColor(R.color.tt_primary))\n .setSmallIcon(R.drawable.ic_action_my_location)\n .setContentTitle(getText(R.string.app_name));\n\n builder.setContentText(getText(R.string.notif_text_tracking));\n\n builder.addAction(\n R.drawable.ic_action_close,\n getString(R.string.action_stop_tracking),\n getServicePendingIntent(ACTION_CLOSE)\n );\n\n builder.setContentIntent(getActivityPendingIntent());\n\n return builder.build();\n }", "private MsgNotify(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public BaseNotificationBuilder() {\n this(new Notification());\n }", "private UpdateNotification(com.google.protobuf.GeneratedMessageLite.Builder builder) {\n super(builder);\n\n }", "public INotification createNotification()\n throws OculusException;", "private void createNotification() {\n\t\tIntent notifyIntent = new Intent(this, BirthdayActivity.class);\r\n\t\t// Sets the Activity to start in a new, empty task\r\n\t\tnotifyIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\t// Creates the PendingIntent\r\n\t\tPendingIntent pendingIntent = PendingIntent.getActivity(this,\r\n\t\t\t\t(int) System.currentTimeMillis(), notifyIntent,\r\n\t\t\t\tPendingIntent.FLAG_UPDATE_CURRENT);\r\n\r\n\t\tNotificationManagerUtil notificationManagerUtil = NotificationManagerUtil\r\n\t\t\t\t.getInstance();\r\n\t\tnotificationManagerUtil.createNotifications(this, 1, \"Message\",\r\n\t\t\t\tpendingIntent);\r\n\t}", "private void createNotification(FoodEvents event) {\n Context context = getBaseContext();\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context).setSmallIcon(R.drawable.ic_launcher).setContentTitle(event.getTitle())\n .setContentText(event.getDescription());\n Intent resultIntent = new Intent(this, EventDetails.class);\n resultIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n resultIntent.putExtra(EventDetails.EXTRA_EVENT, event);\n PendingIntent resultPendingIntent = PendingIntent.getActivity(getBaseContext(), 0, resultIntent, PendingIntent.FLAG_UPDATE_CURRENT, null);\n mBuilder.setContentIntent(resultPendingIntent);\n NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n mNotificationManager.notify(MESSAGE_NOTIFICATION_ID, mBuilder.build());\n notifyMyWatch(event);\n }", "public BaseNotificationBuilder(Notification notification) {\n this.notification = notification;\n }", "@Override\r\n\tpublic Notification createEmailNotification() {\n\t\treturn null;\r\n\t}", "public void buildNotificationSingle(){\n if(arraylisted.size() ==1){\n Product contact = arraylisted.get(0);\n\n String userDept = arraylisted.get(0).getDept();\n String userName = arraylisted.get(0).getName();\n String userLevel = arraylisted.get(0).getLevel();\n String userID = arraylisted.get(0).getuserID();\n String str = notifyliste.get(0).getEmail();\n if(str.length() >=200){\n int k = str.length() / 2;\n str = str.substring(0,k) + \" ...\";\n }\n String prep = userName + System.getProperty(\"line.separator\") + userLevel + \" Level - \" + userDept;\n byte[] userPics = arraylisted.get(0).getBLOB();\n\n //build the actviity intents\n Intent notificationIntent = new Intent(getApplicationContext(),viewNamsn.class);\n\n notificationIntent.putExtra(\"userName\", userName);\n notificationIntent.putExtra(\"userLevel\", userLevel);\n notificationIntent.putExtra(\"userDept\", userDept);\n notificationIntent.putExtra(\"userID\", userID);\n notificationIntent.putExtra(\"userPics\", userPics);\n\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY | Intent.FLAG_ACTIVITY_NEW_TASK);\n PendingIntent pend = PendingIntent.getActivity(getApplicationContext(),0,notificationIntent,PendingIntent.FLAG_UPDATE_CURRENT);\n\n //mBuilder = buildNotification(userPics,prep);\n //design the new custom view\n RemoteViews notificationView = new RemoteViews(\n getApplicationContext().getPackageName(),\n R.layout.activity_custom_notification\n );\n Bitmap bitmap = BitmapFactory.decodeByteArray(userPics,0,userPics.length);\n // notificationView.setImageViewResource(R.id.imagenotileft,R.mipmap.ic_launcher);\n notificationView.setImageViewBitmap(R.id.imagenotileft,bitmap);\n // Locate and set the Text into customnotificationtext.xml TextViews\n notificationView.setTextViewText(R.id.title, (getString(R.string.app_name)));\n notificationView.setTextViewText(R.id.text, prep);\n // notificationView.setTextViewText(R.id.qoute, str);\n\n //go and build the notification\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(getApplicationContext());\n mBuilder.setContentIntent(pend);\n mBuilder.setContentTitle(getString(R.string.app_name));\n mBuilder.setContentText(userName + \" Recently Joined ATBU 37 NAMSSN ELITE E-YEAR BOOK !!!\");\n mBuilder.setTicker(userName + \" Recently Joined ATBU 37 NAMSSN ELITE E-YEAR BOOK !!!\");\n mBuilder.setAutoCancel(true);\n mBuilder.setContent(notificationView);\n mBuilder.setSmallIcon(R.mipmap.ic_app);\n mBuilder.setPriority(2);\n Uri alarmsound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n mBuilder.setSound(alarmsound);\n mBuilder.setLights(Color.RED, 3000, 3000);\n mBuilder.setVibrate(new long[]{1000, 1000, 1000, 1000, 1000 });\n //display the notification\n\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n notificationManager.notify(0123,mBuilder.build());\n }\n // arraylisted.clear();\n }", "protected MessageInfo buildMessageInfo(NotificationContext ctx) {\n AbstractTemplateBuilder templateBuilder = getTemplateBuilder();\n if (templateBuilder == null) {\n templateBuilder = getTemplateBuilder(ctx);\n }\n MessageInfo massage = templateBuilder.buildMessage(ctx);\n assertNotNull(massage);\n return massage;\n }", "private VerifyNotifyC(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public NotificationCompat.Builder getChannelNotification() {\r\n return new NotificationCompat.Builder(getApplicationContext(), notificationChannelID)\r\n .setContentTitle(\"Liebes Tagebuch...\")\r\n .setContentText(\"Don't forget to write a diary entry today!\")\r\n .setSmallIcon(R.drawable.stift_png_24dpi);\r\n\r\n\r\n }", "public void buildNotification(View view)\n {\n Toast.makeText(this, \"Building the Notification\", Toast.LENGTH_SHORT).show();\n\n //Build the notification\n NotificationCompat.Builder notifyBuilder = getNotificationBuilder();\n\n //Push the notification with a unique notification ID\n mNotifyManager.notify(NOTIFICATION_ID, notifyBuilder.build());\n }", "private VerifyNotifyS(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public void createNotification(Context context, String msg, String msgText, String msgAlert, int notifID) {\n\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n Intent repeating_intent = new Intent(context, MainMenu.class);\n repeating_intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(context, notifID, repeating_intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context)\n .setContentIntent(pendingIntent)\n .setSmallIcon(R.drawable.ic_fridge_empty)\n .setContentTitle(msg)\n .setContentText(msgText)\n .setTicker(msgAlert)\n .setColor(0xFFC107) // colour of the circle backgroud\n .setVibrate(new long[]{1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000}) // Vibration\n .setLights(0xFFFF00, 100, 50) // LED\n .setAutoCancel(true);\n\n notificationManager.notify(notifID, builder.build());\n }", "protected static NotificationCompat.Builder build(final Context context,\n final String text, Intent notificationIntent) {\n final Resources res = context.getResources();\n String title = res.getString(R.string.app_name);\n\n PendingIntent intentOpen = PendingIntent.getActivity(\n context,\n 0,\n notificationIntent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n final NotificationCompat.Builder builder = new NotificationCompat.Builder(context)\n .setSmallIcon(R.drawable.ic_stopwatch)\n .setContentTitle(title)\n .setContentText(text)\n .setPriority(NotificationCompat.PRIORITY_MAX)\n .setOngoing(true)\n .setOnlyAlertOnce(true)\n .setWhen(0)\n .setShowWhen(false)\n .setUsesChronometer(true)\n .setContentIntent(intentOpen)\n .setAutoCancel(false);\n\n return builder;\n }", "public static void buildDemoNotification(Context context) {\n int eventId = 0;\n String eventTitle = \"Demo title\";\n String eventLocation = \"Mountain View\";\n\n int notificationId = 001;\n // Build intent for notification content\n Intent viewIntent = new Intent(context, ViewEventActivity.class);\n viewIntent.putExtra(EXTRA_EVENT_ID, eventId);\n PendingIntent viewPendingIntent =\n PendingIntent.getActivity(context, 0, viewIntent, 0);\n\n NotificationCompat.Builder notificationBuilder =\n new NotificationCompat.Builder(context)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(eventTitle)\n .setContentText(eventLocation)\n .setContentIntent(viewPendingIntent);\n\n // Get an instance of the NotificationManager service\n NotificationManagerCompat notificationManager =\n NotificationManagerCompat.from(context);\n\n // Build the notification and issues it with notification manager.\n notificationManager.notify(notificationId, notificationBuilder.build());\n }", "private UpdateUserInfoNotify(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public PCEPNotification createNotificationMessage(ComputingResponse resp,long timer ){\n\t\tlog.info(\"Timer \"+timer);\n\t\tPCEPNotification notificationMsg = new PCEPNotification();\n\t\tNotify notify=new Notify();\n\t\tNotification notif=new Notification();\n\t\tnotif.setNotificationType(ObjectParameters.PCEP_NOTIFICATION_TYPE_PRERESERVE);\n\t\tLinkedList<Notification> notificationList=new LinkedList<Notification>();\n\t\tPathReservationTLV pathReservationTLV=new PathReservationTLV();\t\t\t\n\t\tpathReservationTLV.setERO(resp.getResponseList().getFirst().getPathList().getFirst().geteRO());\t\t\t\t\t\n\t\tboolean bidirect = resp.getResponseList().getFirst().getRequestParameters().isBidirect();\t\t\n\t\tpathReservationTLV.setTime(timer);\n\t\tpathReservationTLV.setBidirectional(bidirect);\n\t\tnotif.setNotificationTLV(pathReservationTLV);\n\t\tnotificationList.add(notif);\n\t\tnotify.setNotificationList(notificationList);\n\t\tnotificationMsg.addNotify(notify);\n\t\treturn notificationMsg;\t\n\t}", "private Notification.Builder createNotificationWithOutChannel(String title, String message){\n PendingIntent pendingIntent = setIntent(title,message);\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT_WATCH) {\n Notification.Action action = new Notification.Action.Builder(\n android.R.drawable.ic_menu_send,\n \"See details\",\n pendingIntent\n ).build();\n }\n\n return new Notification.Builder(getApplicationContext())\n .setContentTitle(title)\n .setContentIntent(pendingIntent)\n .setContentText(message)\n .setSmallIcon(android.R.drawable.stat_notify_chat)\n .setAutoCancel(true);\n }", "public String generateNotificationMessage(NotificationBo notification);", "private ListNotification(com.google.protobuf.GeneratedMessageLite.Builder builder) {\n super(builder);\n\n }", "public static Notification createNotification(XmlAppConfigurationProvider appConfigurationProvider,\n Context context, String title, String content, Bundle intentExtras) {\n int smallNotificationIconResourceId = appConfigurationProvider.getSmallNotificationIconResourceId();\n if (smallNotificationIconResourceId == 0) {\n Log.d(TAG, \"Small notification icon resource was not found. Will use the app icon when \" +\n \"displaying notifications.\");\n smallNotificationIconResourceId = appConfigurationProvider.getApplicationIconResourceId();\n }\n\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context);\n notificationBuilder.setTicker(title);\n notificationBuilder.setAutoCancel(true);\n\n // Create broadcast intent that will fire when the notification has been opened. To action on these messages,\n // register a broadcast receiver that listens to intent <your_package_name>.intent.APPBOY_NOTIFICATION_OPENED\n // and <your_package_name>.intent.APPBOY_PUSH_RECEIVED.\n String pushOpenedAction = context.getPackageName() + \".intent.APPBOY_NOTIFICATION_OPENED\";\n Intent pushOpenedIntent = new Intent(pushOpenedAction);\n if (intentExtras != null) {\n pushOpenedIntent.putExtras(intentExtras);\n }\n PendingIntent pushOpenedPendingIntent = PendingIntent.getBroadcast(context, 0, pushOpenedIntent, PendingIntent.FLAG_ONE_SHOT);\n notificationBuilder.setContentIntent(pushOpenedPendingIntent);\n\n\n // Sets the icon used in the notification bar itself.\n notificationBuilder.setSmallIcon(smallNotificationIconResourceId);\n notificationBuilder.setContentTitle(title);\n notificationBuilder.setContentText(content);\n\n // Setting notification sounds are supported after Honeycomb.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB && intentExtras != null) {\n // Retrieve sound uri if included in intentExtras bundle.\n if (intentExtras.containsKey(Constants.APPBOY_PUSH_NOTIFICATION_SOUND_KEY)) {\n String soundURI = intentExtras.getString(Constants.APPBOY_PUSH_NOTIFICATION_SOUND_KEY);\n if(soundURI != null) {\n if (soundURI.equals(Constants.APPBOY_PUSH_NOTIFICATION_SOUND_DEFAULT_VALUE)) {\n notificationBuilder.setDefaults(Notification.DEFAULT_SOUND);\n } else {\n notificationBuilder.setSound(Uri.parse(soundURI));\n }\n\n }\n }\n }\n\n // From Honeycomb to ICS, we can use a custom view for our notifications which will allow them to be taller than\n // the standard one line of text.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB && Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {\n Resources resources = context.getResources();\n String packageName = context.getPackageName();\n\n int layoutResourceId = resources.getIdentifier(APPBOY_NOTIFICATION_ID, \"layout\", packageName);\n int titleResourceId = resources.getIdentifier(APPBOY_NOTIFICATION_TITLE_ID, \"id\", packageName);\n int contentResourceId = resources.getIdentifier(APPBOY_NOTIFICATION_CONTENT_ID, \"id\", packageName);\n int iconResourceId = resources.getIdentifier(APPBOY_NOTIFICATION_ICON_ID, \"id\", packageName);\n int timeViewResourceId = resources.getIdentifier(APPBOY_NOTIFICATION_TIME_ID, \"id\", packageName);\n int twentyFourHourFormatResourceId = resources.getIdentifier(APPBOY_NOTIFICATION_TWENTY_FOUR_HOUR_FORMAT_ID, \"string\", packageName);\n int twelveHourFormatResourceId = resources.getIdentifier(APPBOY_NOTIFICATION_TWELVE_HOUR_FORTMAT_ID, \"string\", packageName);\n\n String twentyFourHourTimeFormat = getOptionalStringResource(resources,\n twentyFourHourFormatResourceId, Constants.DEFAULT_TWENTY_FOUR_HOUR_TIME_FORMAT);\n String twelveHourTimeFormat = getOptionalStringResource(resources,\n twelveHourFormatResourceId, Constants.DEFAULT_TWELVE_HOUR_TIME_FORMAT);\n\n if (layoutResourceId == 0 || titleResourceId == 0 || contentResourceId == 0 || iconResourceId == 0\n || timeViewResourceId == 0) {\n Log.w(TAG, String.format(\"Couldn't find all resource IDs for custom notification view, extended view will \" +\n \"not be used for push notifications. Received %d for layout, %d for title, %d for content, %d for icon, \" +\n \"and %d for time.\",\n layoutResourceId, titleResourceId, contentResourceId, iconResourceId, timeViewResourceId));\n } else {\n Log.d(TAG, \"Using RemoteViews for rendering of push notification.\");\n RemoteViews remoteViews = new RemoteViews(packageName, layoutResourceId);\n remoteViews.setTextViewText(titleResourceId, title);\n remoteViews.setTextViewText(contentResourceId, content);\n remoteViews.setImageViewResource(iconResourceId, smallNotificationIconResourceId);\n\n // Custom views cannot be used as part of a RemoteViews so we're using a TextView widget instead. This\n // view will always display the time without date information (even after the day has changed).\n SimpleDateFormat timeFormat = new SimpleDateFormat(\n android.text.format.DateFormat.is24HourFormat(context) ? twentyFourHourTimeFormat : twelveHourTimeFormat);\n String notificationTime = timeFormat.format(new Date());\n remoteViews.setTextViewText(timeViewResourceId, notificationTime);\n notificationBuilder.setContent(remoteViews);\n return notificationBuilder.build();\n }\n }\n\n // If we're using Jelly Bean, we can use the Big View Style, which lets the notification layout size grow to\n // accommodate longer text and images.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n\n // Summary text which appears with content in expanded view.\n String summaryText = \"\";\n\n // If there is an image url found in the extras payload and the image can be downloaded, then\n // use the android BigPictureStyle as the notification. Else, use the BigTextStyle instead.\n if (intentExtras != null) {\n\n // Retrieve summary text if included in intentExtras bundle.\n if (intentExtras.containsKey(Constants.APPBOY_PUSH_SUMMARY_TEXT_KEY)) {\n summaryText = intentExtras.getString(Constants.APPBOY_PUSH_SUMMARY_TEXT_KEY);\n }\n\n // Set a custom notification priority if defined in the bundle.\n notificationBuilder.setPriority(getNotificationPriority(intentExtras));\n\n Bundle extrasBundle = getExtrasBundle(intentExtras);\n if (extrasBundle!=null && extrasBundle.containsKey(Constants.APPBOY_PUSH_BIG_IMAGE_URL_KEY)) {\n String imageUrl = extrasBundle.getString(Constants.APPBOY_PUSH_BIG_IMAGE_URL_KEY);\n Bitmap imageBitmap = downloadImageBitmap(imageUrl);\n if (imageBitmap != null) {\n Log.d(TAG, \"Rendering push notification with BigPictureStyle\");\n\n return getBigPictureNotification(notificationBuilder, imageBitmap, content, summaryText);\n } else {\n Log.d(TAG, \"Bitmap download failed for push notification\");\n }\n }\n }\n Log.d(TAG, \"Rendering push notification with BigTextStyle\");\n return getBigTextNotification(notificationBuilder, content, summaryText);\n }\n return notificationBuilder.build();\n }", "public void createNotification(View view) {\n Intent intent = new Intent(this, Status1.class);\r\n PendingIntent pIntent = PendingIntent.getActivity(this, 0, intent, 0);\r\n\r\n // Build notification\r\n // Actions are just fake\r\n Notification noti = new Notification.Builder(this)\r\n .setContentTitle(\"RKC App \")\r\n .setContentText(\"Click To Enter \").setSmallIcon(R.drawable.arc)\r\n .setContentIntent(pIntent)\r\n .addAction(R.drawable.ironman, \"Back\", pIntent)\r\n .addAction(R.drawable.gun, \"More\", pIntent)\r\n .build();\r\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\r\n // hide the notification after its selected\r\n noti.flags |= Notification.FLAG_AUTO_CANCEL;\r\n\r\n notificationManager.notify(0, noti);\r\n\r\n }", "private static void generateNotification(Context context, Bundle bundle) {\n\t\tint icon = R.drawable.icon;\n\t\tlong when = System.currentTimeMillis();\n\t\tString message = bundle.getString(\"message\");\n\t\tNotificationManager notificationManager = (NotificationManager) context\n\t\t\t\t.getSystemService(Context.NOTIFICATION_SERVICE);\n\t\tNotification notification = new Notification(icon, message, when);\n\t\tString title = context.getString(R.string.app_name);\n\t\tIntent notificationIntent = new Intent(context, NetasDemoActivity.class);\n\n\t\tnotificationIntent.putExtras(bundle);\n\n\t\t// set intent so it does not start a new activity\n\t\tnotificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP\n\t\t\t\t| Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\tPendingIntent intent = PendingIntent.getActivity(context, 0,\n\t\t\t\tnotificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\t\tnotification.defaults |= Notification.DEFAULT_SOUND\n\t\t\t\t| notification.DEFAULT_LIGHTS | notification.DEFAULT_VIBRATE;\n\t\t// long[] vibrate = {0,100,200,300};\n\t\t// notification.vibrate = vibrate;\n\t\tnotification.setLatestEventInfo(context, title, message, intent);\n\t\tnotification.flags |= Notification.FLAG_AUTO_CANCEL\n\t\t\t\t| Notification.FLAG_SHOW_LIGHTS;\n\t\tnotification.ledOnMS = 1000; // light on in milliseconds\n\t\tnotification.ledOffMS = 4000; // light off in milliseconds\n\t\tnotificationManager.notify(0, notification);\n\t}", "private MessageNotification(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Notification buildForegroundNotification() {\n //registerNotifChnnl(this.context);\n\n Intent stopIntent = new Intent(this.context, BackgroundIntentService.class);\n //stopIntent.setAction(context.getString(R.string.intent_action_turnoff));\n\n PendingIntent pendingIntent = PendingIntent.getService(this.context,0, stopIntent, 0);\n\n NotificationCompat.Builder b=new NotificationCompat.Builder(this.context,CHANNEL_ID);\n\n b.setOngoing(true)\n .setContentTitle(\"WifiHotSpot is On\")\n// .addAction(new NotificationCompat.Action(\n// R.drawable.turn_off,\n// \"TURN OFF HOTSPOT\",\n// pendingIntent\n// ))\n .setPriority(NotificationCompat.PRIORITY_LOW)\n .setCategory(Notification.CATEGORY_SERVICE);\n // .setSmallIcon(R.drawable.notif_hotspot_black_24dp);\n\n\n return(b.build());\n }", "public static void createNotification(Context context, Reminder reminder) {\n Intent viewIntent = new Intent(context, MainScreen.class);\n viewIntent.putExtra(\"NOTIFICATION_ID\", reminder.getId());\n viewIntent.putExtra(\"NOTIFICATION_DISMISS\", true);\n PendingIntent pending = PendingIntent.getActivity(context, reminder.getId(), viewIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n /* // Create intent for notification snooze click behaviour\n Intent snoozeIntent = new Intent(context, SnoozeActionReceiver.class);\n snoozeIntent.putExtra(\"NOTIFICATION_ID\", reminder.getId());\n PendingIntent pendingSnooze = PendingIntent.getBroadcast(context, reminder.getId(), snoozeIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n*/\n int imageResId = context.getResources().getIdentifier(reminder.getIcon(), \"drawable\", context.getPackageName());\n\n\n /*NotificationCompat.Builder builder = new NotificationCompat.Builder(context, CHANNEL_ID)\n .setSmallIcon(R.drawable.notification_icon)\n .setContentTitle(textTitle)\n .setContentText(textContent)\n .setPriority(NotificationCompat.PRIORITY_DEFAULT);\n\n */\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context)\n .setSmallIcon(imageResId)\n .setColor(Color.parseColor(reminder.getColour()))\n .setStyle(new NotificationCompat.BigTextStyle().bigText(reminder.getContent()))\n .setContentTitle(reminder.getTitle())\n .setContentText(reminder.getContent())\n .setTicker(reminder.getTitle())\n .setContentIntent(pending);\n\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n\n /*if (sharedPreferences.getBoolean(\"checkBoxNagging\", false)) {\n Intent swipeIntent = new Intent(context, DismissReceiver.class);\n swipeIntent.putExtra(\"NOTIFICATION_ID\", reminder.getId());\n PendingIntent pendingDismiss = PendingIntent.getBroadcast(context, reminder.getId(), swipeIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n builder.setDeleteIntent(pendingDismiss);\n\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.MINUTE, sharedPreferences.getInt(\"nagMinutes\", context.getResources().getInteger(R.integer.default_nag_minutes)));\n calendar.add(Calendar.SECOND, sharedPreferences.getInt(\"nagSeconds\", context.getResources().getInteger(R.integer.default_nag_seconds)));\n Intent alarmIntent = new Intent(context, NagReceiver.class);\n AlarmUtil.setAlarm(context, alarmIntent, reminder.getId(), calendar);\n }*/\n\n String soundUri = sharedPreferences.getString(\"NotificationSound\", \"content://settings/system/notification_sound\");\n if (soundUri.length() != 0) {\n builder.setSound(Uri.parse(soundUri));\n }\n if (sharedPreferences.getBoolean(\"checkBoxLED\", true)) {\n builder.setLights(Color.BLUE, 700, 1500);\n }\n if (sharedPreferences.getBoolean(\"checkBoxOngoing\", false)) {\n builder.setOngoing(true);\n }\n if (sharedPreferences.getBoolean(\"checkBoxVibrate\", true)) {\n long[] pattern = {0, 300, 0};\n builder.setVibrate(pattern);\n }\n /*if (sharedPreferences.getBoolean(\"checkBoxMarkAsDone\", false)) {\n Intent intent = new Intent(context, DismissReceiver.class);\n intent.putExtra(\"NOTIFICATION_ID\", reminder.getId());\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, reminder.getId(), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n builder.addAction(R.drawable.ic_done_white_24dp, context.getString(R.string.mark_as_done), pendingIntent);\n }\n if (sharedPreferences.getBoolean(\"checkBoxSnooze\", false)) {\n builder.addAction(R.drawable.ic_snooze_white_24dp, context.getString(R.string.snooze), pendingSnooze);\n }*/\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n builder.setPriority(Notification.PRIORITY_HIGH);\n }\n\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n notificationManager.notify(reminder.getId(), builder.build());\n }", "static private Notification getNotificationForEvent(GGEventModel event) {\n Context ctx = SplashActivity.getAppContext();\n\n // Create an explicit intent for an Activity in your app\n Intent intent = new Intent(ctx, EventsActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n PendingIntent pendingIntent = PendingIntent.getActivity(ctx, 0, intent, 0);\n\n // Builder builder = new Builder(ctx, channel_id)\n Builder builder;\n builder = new Builder(ctx, ctx.getResources().getString(R.string.channel_id) )\n .setSmallIcon(R.drawable.laguilde_logo)\n .setContentTitle(event.getTitle())\n .setContentText(event.getDescription())\n .setPriority(PRIORITY_DEFAULT)\n .setGroup(\"LaGuilde\")\n // Set the intent that will fire when the user taps the notification\n .setContentIntent(pendingIntent)\n .setAutoCancel(true)\n //.setTimeoutAfter(5000)\n // .setUsesChronometer(true)\n .setShowWhen(true)\n //.setWhen( System.currentTimeMillis() - 1000*60*60 )\n .setWhen( event.getDate().getTime() )\n .setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION))\n ;\n\n // todo: ajouter une image\n\n return builder.build();\n }", "@Override\n public NotificationCompat.Builder extend(NotificationCompat.Builder builder) {\n Bitmap roundBitmap = Util.getCircleBitmap(loadedImage);\n return builder.setContentTitle(contact.getName())\n //.setColor(new BigInteger(\"FF333333\", 16).intValue())\n .setLargeIcon(roundBitmap);\n /*.setSound(Uri.parse(\"content://media/internal/audio/media/32\"))\n .setColor(new BigInteger(\"FF00FF00\", 16).intValue())\n .setStyle(new NotificationCompat.BigTextStyle().bigText(\"[Modified Body(bigText)]\"))\n .setContentText(\"[Modified Body(ContentText)]\");*/\n }", "public interface INotificationFactory {\n\n /**\n * Implements a query to get user's device list, that is, mobile device unique ID value.\n *\n * @param idUser the ID of user\n * @param type the ID of notification type\n * @return the set of String,devices list\n */\n @Deprecated\n Set<NotificationMessageContainer> getUserDevice(long idUser, int type, EnumOperationSystem os);\n\n /**\n * Implements a query to get a user's follower mobile device ID to \"push notification\"\n *\n * @param idUser the ID of user\n * @param idChannel the ID of channel, if channel is private we get only the channel memberships device list\n * @param isPrivately define should device list generated for private push notification\n * @param type the type of notification activity\n * @return the set of String of devices\n */\n Set<NotificationMessageContainer> getUserMultiDevice(long idUser, long idChannel, boolean isPrivately, int type, EnumOperationSystem os);\n\n /**\n * Implements a query to get a user's follower mobile device ID to \"push LIVE notification\"\n *\n * @param idUserFrom the ID of user\n * @param idChannel the ID of channel, if channel is private we get only the channel memberships device list\n * @param key key for redis store\n * @param isPrivately define should device list generated for private push notification\n */\n Long setLiveNotificationUsers(long idUserFrom, long idChannel, long key, boolean isPrivately);\n}", "private ListNotificationRet(com.google.protobuf.GeneratedMessageLite.Builder builder) {\n super(builder);\n\n }", "private GroupInvitationInfo buildNotificationInfo(\n Context context, Intent invitation) {\n Logger.v(TAG, \"buildNotificationInfo entry\");\n if (invitation == null) {\n Logger.d(TAG,\n \"buildNotificationInfo current invitation is null\");\n return null;\n }\n GroupChat chatSession = getGroupChatSession(invitation);\n if (chatSession == null) {\n Logger.d(TAG,\n \"buildNotificationInfo current chat session is null\");\n return null;\n }\n ArrayList<ChatMessage> messages = new ArrayList<ChatMessage>();\n messages.add((ChatMessage) invitation\n .getParcelableExtra(FIRST_MESSAGE));\n invitation.putParcelableArrayListExtra(MESSAGES, messages);\n StringBuffer notifyTitle = new StringBuffer();\n StringBuffer notifyInfo = new StringBuffer();\n // Notification information\n String sender = formatCallerId(invitation);\n List<String> participants = null;\n try {\n participants = new ArrayList<String>(\n chatSession.getAllParticipants());\n if (participants != null) {\n Logger.e(TAG,\n \"buildNotificationInfo getAllParticipants\"\n + participants.size());\n }\n } catch (Exception e) {\n Logger.e(TAG,\n \"buildNotificationInfo getInivtedParticipants fail\");\n e.printStackTrace();\n }\n if (participants == null) {\n Logger.i(TAG,\n \"buildNotificationInfo paticipants list is null\");\n return null;\n } else {\n int count = participants.size();\n if (count >= GROUP_PARTICIPANT_SIZE_TWO) {\n String notify = null;\n String contact = participants.get(0);\n if (Utils.isANumber(contact)) {\n contact = ContactsListManager.getInstance()\n .getDisplayNameByPhoneNumber(contact);\n }\n if (count >= GROUP_PARTICIPANT_SIZE_THREE) {\n notify = context\n .getString(\n R.string.notify_invitation_multi_participants,\n sender, contact, count - 1);\n } else {\n notify = context\n .getString(\n R.string.notify_invitation_two_participants,\n sender, contact);\n }\n notifyInfo.append(notify);\n } else {\n Logger.i(TAG,\n \"buildNotificationInfo paticipants list is invalid\");\n return null;\n }\n }\n invitation.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n invitation\n .putExtra(NOTIFY_INFORMATION, notifyInfo.toString());\n invitation.putExtra(FORCE_SCROLLTO_CHAT, true);\n GroupInvitationInfo info = new GroupInvitationInfo();\n info.context = context;\n info.sender = sender;\n info.icon = R.drawable.rcs_notify_chat_message;\n info.notifyInfo = notifyInfo.toString();\n info.notifyTitle = notifyTitle.toString();\n info.intent = invitation;\n addGroupInvite(chatSession, info);\n Logger.v(TAG, \"buildNotificationInfo exit\");\n return info;\n }", "private CircleNewPublishNoticeMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private void buildAndSendNotification(Call originalCall, ContactCacheEntry contactInfo) {\n // This can get called to update an existing notification after contact information has come\n // back. However, it can happen much later. Before we continue, we need to make sure that\n // the call being passed in is still the one we want to show in the notification.\n final Call call = getCallToShow(CallList.getInstance());\n if (call == null || !call.getId().equals(originalCall.getId())) {\n return;\n }\n\n final int callState = call.getState();\n\n // Check if data has changed; if nothing is different, don't issue another notification.\n final int iconResId = getIconToDisplay(call);\n Bitmap largeIcon = getLargeIconToDisplay(contactInfo, call);\n final String content =\n getContentString(call, contactInfo.userType);\n final String contentTitle = getContentTitle(contactInfo, call);\n\n final int notificationType;\n if (callState == Call.State.INCOMING || callState == Call.State.CALL_WAITING) {\n notificationType = NOTIFICATION_INCOMING_CALL;\n } else {\n notificationType = NOTIFICATION_IN_CALL;\n }\n final int color = InCallPresenter.getInstance().getPrimaryColorFromCall(call);\n\n if (!checkForChangeAndSaveData(iconResId, content, largeIcon, contentTitle, callState,\n notificationType, contactInfo.contactRingtoneUri,\n /// M: need update notification for video state changed during SRVCC @{\n call.getVideoState(), color)) {\n /// @}\n return;\n }\n\n if (largeIcon != null) {\n largeIcon = getRoundedIcon(largeIcon);\n }\n\n /*\n * This builder is used for the notification shown when the device is locked and the user\n * has set their notification settings to 'hide sensitive content'\n * {@see Notification.Builder#setPublicVersion}.\n */\n Notification.Builder publicBuilder = new Notification.Builder(mContext);\n publicBuilder.setSmallIcon(iconResId)\n .setColor(mContext.getResources().getColor(R.color.dialer_theme_color))\n // Hide work call state for the lock screen notification\n .setContentTitle(getContentString(call, ContactsUtils.USER_TYPE_CURRENT));\n setNotificationWhen(call, callState, publicBuilder);\n\n /*\n * Builder for the notification shown when the device is unlocked or the user has set their\n * notification settings to 'show all notification content'.\n */\n final Notification.Builder builder = getNotificationBuilder();\n builder.setPublicVersion(publicBuilder.build());\n\n // Set up the main intent to send the user to the in-call screen\n final PendingIntent inCallPendingIntent = createLaunchPendingIntent();\n builder.setContentIntent(inCallPendingIntent);\n\n // Set the intent as a full screen intent as well if a call is incoming\n if (notificationType == NOTIFICATION_INCOMING_CALL\n && !InCallPresenter.getInstance().isShowingInCallUi()) {\n configureFullScreenIntent(builder, inCallPendingIntent, call);\n // Set the notification category for incoming calls\n builder.setCategory(Notification.CATEGORY_CALL);\n }\n\n builder.setSmallIcon(iconResId);\n builder.setLargeIcon(largeIcon);\n /// M: CTA request, set sim color from call. @{\n // Google code:\n // builder.setColor(mContext.getResources().getColor(R.color.dialer_theme_color));\n builder.setColor(InCallPresenter.getInstance().getPrimaryColorFromCall(call));\n /// @}\n /// M: Add for [1A1H2W] @{\n// builder.setContentTitle(mContext.getString(R.string.two_incoming_calls));\n// if(!InCallUtils.isTwoIncomingCalls()) {\n// /// @}\n//\n// // Set the content\n// builder.setContentText(content);\n// builder.setContentTitle(contentTitle);\n//\n// final boolean isVideoUpgradeRequest = call.getSessionModificationState()\n// == Call.SessionModificationState.RECEIVED_UPGRADE_TO_VIDEO_REQUEST;\n// if (isVideoUpgradeRequest) {\n// appendCountdown(builder, content);\n// builder.setUsesChronometer(false);\n// addDismissUpgradeRequestAction(builder);\n// addAcceptUpgradeRequestAction(builder);\n// } else {\n// createIncomingCallNotification(call, callState, builder);\n// }\n//\n// addPersonReference(builder, contactInfo, call);\n// ///M: OP18Plugin <Status bar modification of vowifi quality >@{\n// ExtensionManager.getStatusBarExt().customizeNotification(\n// CallList.getInstance(), builder, largeIcon);\n// /// @}\n// }\n\n /*\n * Fire off the notification\n */\n Notification notification = builder.build();\n\n if (mDialerRingtoneManager.shouldPlayRingtone(callState, contactInfo.contactRingtoneUri)) {\n notification.flags |= Notification.FLAG_INSISTENT;\n notification.sound = contactInfo.contactRingtoneUri;\n AudioAttributes.Builder audioAttributes = new AudioAttributes.Builder();\n audioAttributes.setContentType(AudioAttributes.CONTENT_TYPE_MUSIC);\n audioAttributes.setUsage(AudioAttributes.USAGE_NOTIFICATION_RINGTONE);\n notification.audioAttributes = audioAttributes.build();\n if (mDialerRingtoneManager.shouldVibrate(mContext.getContentResolver())) {\n notification.vibrate = VIBRATE_PATTERN;\n }\n }\n if (mDialerRingtoneManager.shouldPlayCallWaitingTone(callState)) {\n Log.v(this, \"Playing call waiting tone\");\n mDialerRingtoneManager.playCallWaitingTone();\n }\n if (mCurrentNotification != notificationType && mCurrentNotification != NOTIFICATION_NONE) {\n Log.i(this, \"Previous notification already showing - cancelling \"\n + mCurrentNotification);\n mNotificationManager.cancel(mCurrentNotification);\n }\n Log.i(this, \"Displaying notification for \" + notificationType);\n mNotificationManager.notify(notificationType, notification);\n mCurrentNotification = notificationType;\n }", "public void createNotificationChannel() {\n weatherNotificationManager =\n (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n // Notification channels are only available in OREO and higher.\n // So, add a check on SDK version.\n if (android.os.Build.VERSION.SDK_INT >=\n android.os.Build.VERSION_CODES.O) {\n\n // Create the NotificationChannel with all the parameters.\n NotificationChannel notificationChannel = new NotificationChannel\n (PRIMARY_CHANNEL_ID,\n \"Weather change.\",\n NotificationManager.IMPORTANCE_HIGH);\n\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription\n (\"Conditions have are below threshold\");\n weatherNotificationManager.createNotificationChannel(notificationChannel);\n\n }\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 }", "public Notification()\n\t{\n\t\t// Start of user code constructor for Notification)\n\t\tsuper();\n\t\t// End of user code\n\t}", "public static void createNotification1(Context context, Reminder reminder) {\n\n\n Intent intent = new Intent(context, SplashActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0 /* Request code */, intent,\n PendingIntent.FLAG_ONE_SHOT);\n\n String channelId = context.getString(R.string.default_notification_channel_id);\n Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n NotificationCompat.Builder notificationBuilder =\n new NotificationCompat.Builder(context, channelId)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(reminder.getTitle())\n .setContentText(reminder.getContent())\n .setAutoCancel(true)\n .setSound(defaultSoundUri)\n .setContentIntent(pendingIntent);\n\n NotificationManager notificationManager =\n (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n // Since android Oreo notification channel is needed.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel = new NotificationChannel(channelId,\n \"Channel human readable title\",\n NotificationManager.IMPORTANCE_DEFAULT);\n notificationManager.createNotificationChannel(channel);\n }\n\n notificationManager.notify(0 /* ID of notification */, notificationBuilder.build());\n\n DeleteNotification(reminder,context);\n }", "public void createNotificationChannel() {\n mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n // Notification channels are only available in OREO and higher.\n // So, add a check on SDK version.\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {\n // Create the NotificationChannel with all the parameters.\n NotificationChannel notificationChannel = new NotificationChannel(PRIMARY_CHANNEL_ID,\"Log the game!\", NotificationManager.IMPORTANCE_HIGH);\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Reminder to log your game on Friday's at 3:05 pm\");\n mNotificationManager.createNotificationChannel(notificationChannel);\n }\n }", "public void createNotificationChannel() {\n mNotificationManager =\n (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n // Notification channels are only available in OREO and higher.\n // So, add a check on SDK version.\n if (android.os.Build.VERSION.SDK_INT >=\n android.os.Build.VERSION_CODES.O) {\n\n // Create the NotificationChannel with all the parameters.\n NotificationChannel notificationChannel = new NotificationChannel\n (PRIMARY_CHANNEL_ID,\n \"Stand up notification\",\n NotificationManager.IMPORTANCE_HIGH);\n\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Notifies every 15 minutes to \" +\n \"stand up and walk\");\n mNotificationManager.createNotificationChannel(notificationChannel);\n }\n }", "public static Notification buildNotification(Event event, Map<String, String> placeHolderData)\n throws IdentityEventException, NotificationRuntimeException {\n String sendTo = placeHolderData.get(NotificationConstants.EmailNotification.ARBITRARY_SEND_TO);\n Map<String, String> userClaims = new HashMap<>();\n String notificationEvent = (String) event.getEventProperties().get(NotificationConstants.EmailNotification.EMAIL_TEMPLATE_TYPE);\n String username = (String) event.getEventProperties().get(IdentityEventConstants.EventProperty.USER_NAME);\n org.wso2.carbon.user.core.UserStoreManager userStoreManager = (org.wso2.carbon.user.core.UserStoreManager) event.getEventProperties().get(\n IdentityEventConstants.EventProperty.USER_STORE_MANAGER);\n String userStoreDomainName = (String) event.getEventProperties().get(IdentityEventConstants.EventProperty.USER_STORE_DOMAIN);\n String tenantDomain = (String) event.getEventProperties().get(IdentityEventConstants.EventProperty.TENANT_DOMAIN);\n String sendFrom = (String) event.getEventProperties().get(NotificationConstants.EmailNotification.ARBITRARY_SEND_FROM);\n\n if (StringUtils.isNotBlank(username) && userStoreManager != null) {\n userClaims = NotificationUtil.getUserClaimValues(username, userStoreManager);\n } else if (StringUtils.isNotBlank(username) && StringUtils.isNotBlank(userStoreDomainName) &&\n StringUtils.isNotBlank(tenantDomain)) {\n userClaims = NotificationUtil.getUserClaimValues(username, userStoreDomainName, tenantDomain);\n }\n\n String locale = NotificationConstants.EmailNotification.LOCALE_DEFAULT;\n if (userClaims.containsKey(NotificationConstants.EmailNotification.CLAIM_URI_LOCALE)) {\n locale = userClaims.get(NotificationConstants.EmailNotification.CLAIM_URI_LOCALE);\n }\n //Only sendTo value read from claims if it is not set the event sender.\n if (StringUtils.isEmpty(sendTo)) {\n if (userClaims.containsKey(NotificationConstants.EmailNotification.CLAIM_URI_EMAIL)) {\n sendTo = userClaims.get(NotificationConstants.EmailNotification.CLAIM_URI_EMAIL);\n }\n if (StringUtils.isEmpty(sendTo)) {\n throw new IdentityEventException(\"Email notification sending failed. \" +\n \"Sending email address is not configured for the user.\");\n }\n }\n\n EmailTemplate emailTemplate;\n try {\n emailTemplate = NotificationHandlerDataHolder.getInstance().getEmailTemplateManager().getEmailTemplate(notificationEvent, locale, tenantDomain);\n } catch (I18nEmailMgtException e) {\n String message = \"Error when retrieving template from tenant registry.\";\n throw NotificationRuntimeException.error(message, e);\n }\n\n // This is added to change the copyright year in the email templates dynamically.\n int currentYear = Calendar.getInstance().get(Calendar.YEAR);\n placeHolderData.put(\"current-year\", String.valueOf(currentYear));\n\n NotificationUtil.getPlaceholderValues(emailTemplate, placeHolderData, userClaims);\n\n Notification.EmailNotificationBuilder builder =\n new Notification.EmailNotificationBuilder(sendTo);\n builder.setSendFrom(sendFrom);\n builder.setTemplate(emailTemplate);\n builder.setPlaceHolderData(placeHolderData);\n Notification emailNotification = builder.build();\n return emailNotification;\n }", "private void createNotificationChannel() {\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"ReminderChannel\";\n String description = \"Hello channel\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"notifyAnkit\", name, importance);\n channel.setDescription(description);\n\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n notificationManager.createNotificationChannel(channel);\n }\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 }", "private NoticeObj(com.google.protobuf.GeneratedMessageLite.Builder builder) {\n super(builder);\n\n }", "public interface Notification {\n /**\n * Method to generate and draw notification message\n * @param task it's task for notification message\n */\n void notifyMessage(Task task);\n}", "private void createNotificationChannel() {\n mNotificationManager =\r\n (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\r\n\r\n // Notification channels are only available in OREO and higher.\r\n // So, add a check on SDK version.\r\n if (android.os.Build.VERSION.SDK_INT >=\r\n android.os.Build.VERSION_CODES.O) {\r\n\r\n // Create the NotificationChannel with all the parameters.\r\n NotificationChannel notificationChannel = new NotificationChannel\r\n (PRIMARY_CHANNEL_ID,\r\n \"Stand up notification\",\r\n NotificationManager.IMPORTANCE_HIGH);\r\n\r\n notificationChannel.enableLights(true);\r\n notificationChannel.setLightColor(Color.RED);\r\n notificationChannel.enableVibration(true);\r\n notificationChannel.setDescription(\"Daje znać użytkownikowi \" +\r\n \"by wprowadził swoje wydatki\");\r\n mNotificationManager.createNotificationChannel(notificationChannel);\r\n }\r\n }", "public Notification() {\r\n }", "public Notification() {\r\n }", "public void buildNotification(String radioName, String trackInformation, int artImage) {\n mNotificationManager.startNotification(radioName, trackInformation, artImage);\n }", "public abstract void sendNotification(String sendFrom, List<Object> sendTo, String sendToProperty, NoticeTemplate noticeTemplate, Object noticeData);", "private void showNotification() {\n }", "private void showNotification() {\n\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Notification [id=\" + id + \", dateOfAdded=\" + dateOfAdded + \", notificationType=\" + notificationType\n\t\t\t\t+ \", notificationText=\" + notificationText + \", isActive=\" + isActive + \"]\";\n\t}", "public abstract Object notify(NotifyDescriptor descriptor);", "public Notification()\n\t{\n\t\t\n\t}", "@Override\n\tpublic Nota buildObject() {\n\t\treturn new Nota(emitente, destinatario, chave, numero, serie, emissao, total, isIncomplete);\n\t}", "private void createNotification(int icon, String name, String auto_manual, String secondText, int color) {\n\n Intent notificationIntent = new Intent(this, SyncopyActivity.class);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(this,\n 0, notificationIntent, 0);\n Notification notification = new NotificationCompat.Builder(this, CHANNEL_ID)\n .setContentTitle(name)\n .setContentText(secondText)\n .setSubText(String.format(\"(%s)\", auto_manual))\n .setSmallIcon(icon)\n .setColor(getResources().getColor(color))\n .setContentIntent(pendingIntent)\n .setVibrate(null)\n .setSound(null)\n .setPriority(NotificationManager.IMPORTANCE_LOW)\n .build();\n\n synchronized (notification){\n notification.notify();\n }\n\n startForeground(1, notification);\n\n\n }", "public void showNotification(String title,String message)\n {\n\n Bitmap icon = BitmapFactory.decodeResource(this.getResources(),\n R.drawable.girl);\n// NotificationCompat.Builder builder = new NotificationCompat.Builder(this,\"Notify\")\n// .setContentTitle(title).setSmallIcon(R.drawable.common_google_signin_btn_icon_dark)\n\n// // .addAction(R.drawable.user,\"Pay\",payInent)\n// //.addAction(R.drawable.user,\"Pay Later\",payLaterInent)\n// .setDefaults(Notification.DEFAULT_ALL)\n// .setPriority(NotificationManager.IMPORTANCE_HIGH)\n// .setAutoCancel(true).setContentText(message).setLargeIcon(icon)\n// .setStyle(new NotificationCompat.BigPictureStyle()\n// .bigPicture(icon).bigLargeIcon(null));\n\n// NotificationCompat.Builder builder;\n// builder = new NotificationCompat.Builder(this, \"Notify\");\n// builder.setContentTitle(title) // required\n// .setSmallIcon(R.drawable.user) // required\n// .setContentText(message) // required\n// .setStyle(new NotificationCompat.BigPictureStyle()\n// .bigPicture(icon).setSummaryText(\"\"))\n// .setAutoCancel(true)\n// .setVibrate(new long[]{100, 200, 300, 400, 500, 400, 300, 200, 400})\n// .setSound(Settings.System.DEFAULT_NOTIFICATION_URI)\n// .setPriority(NotificationCompat.PRIORITY_HIGH)\n// ;\n\n Notification notification = null;\n if( message.charAt(0) == 'C' )\n {\n// Intent intent = new Intent(this, PayLater.class);\n Intent intent = new Intent(this, PayLaterTest.class);\n PendingIntent payInent = PendingIntent.getActivity(MyMessagingService.this, 0, intent, 0);\n notification = new NotificationCompat.Builder(this, \"Notify\")\n .setSmallIcon(android.R.drawable.ic_dialog_info)\n .setContentTitle(title)\n .setContentText(message)\n .setDefaults(Notification.DEFAULT_ALL)\n .setPriority(NotificationCompat.PRIORITY_DEFAULT)\n .setVibrate(new long[0])// heads-up\n .addAction(R.drawable.user,\"Pay\",payInent)\n .setAutoCancel(true)\n .build();\n }\n else if( message.charAt(0) == 'G' )\n {\n //start activity go in\n Intent intent = new Intent(this, PayActivity.class);\n PendingIntent payInent = PendingIntent.getActivity(MyMessagingService.this, 0, intent, 0);\n notification = new NotificationCompat.Builder(this, \"Notify\")\n .setSmallIcon(android.R.drawable.ic_dialog_info)\n .setContentTitle(title)\n .setContentText(message)\n .setDefaults(Notification.DEFAULT_ALL)\n .setPriority(NotificationCompat.PRIORITY_DEFAULT)\n .setVibrate(new long[0])// heads-up\n .addAction(R.drawable.user,\"Verify\",payInent)\n .setAutoCancel(true)\n .build();\n }\n else if( message.charAt(0) == 'I' )\n {\n //start activity invalid slot\n// Intent intent = new Intent(this, PayActivity.class);\n\n// PendingIntent payInent = PendingIntent.getActivity(MyMessagingService.this, 0, intent, 0);\n notification = new NotificationCompat.Builder(this, \"Notify\")\n .setSmallIcon(android.R.drawable.ic_dialog_info)\n .setContentTitle(title)\n .setContentText(message)\n .setDefaults(Notification.DEFAULT_ALL)\n .setPriority(NotificationCompat.PRIORITY_DEFAULT)\n .setAutoCancel(true)\n .setVibrate(new long[0])// heads-up\n // .addAction(R.drawable.user,\"Verify\",payInent)\n .build();\n }\n\n m = (NotificationManager) getSystemService(getApplicationContext().NOTIFICATION_SERVICE);;\n m.notify(999,notification);\n // m.cancel(999);\n }", "public Notification() {\n\n\t}", "Notification createAppointmentConfirmationNotification(Appointment appointment);", "private void createNotification(Bitmap bitmap, Integer wifiLocationsNearby, String closestWifiLocationAddressText) {\n if (notificationManager == null) {\n notificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n }\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n if (notificationManager != null) {\n NotificationChannel notificationChannel = notificationManager.getNotificationChannel(NOTIFICATION_CHANNEL_ID);\n if (notificationChannel == null) {\n notificationChannel = new NotificationChannel(NOTIFICATION_CHANNEL_ID,\n \"channel_name\", NotificationManager.IMPORTANCE_HIGH);\n notificationChannel.setDescription(\"channel_description\");\n notificationManager.createNotificationChannel(notificationChannel);\n }\n }\n }\n Intent intent = new Intent(this, MainActivity.class)\n .setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n builder = new NotificationCompat.Builder(this, NOTIFICATION_CHANNEL_ID)\n .setContentTitle(String.format(getString(R.string.static_image_api_notification_content_title),\n wifiLocationsNearby, tilequerySearchRadiusFeet))\n .setSmallIcon(R.drawable.mapbox_logo_icon)\n .setContentText(String.format(getString(R.string.static_image_api_notification_description),\n closestWifiLocationAddressText))\n .setContentIntent(getActivity(this, 0, intent, 0))\n .setLargeIcon(bitmap)\n .setStyle(new NotificationCompat.BigPictureStyle()\n .bigPicture(bitmap)\n .bigLargeIcon(null));\n Notification notification = builder.build();\n notificationManager.notify(NOTIFICATION_ID, notification);\n firstNotificationBuilt = true;\n }", "private Notification getActivityNotification(String title, String text){\n Intent main = getApplicationContext().getPackageManager().getLaunchIntentForPackage(getApplicationContext().getPackageName());\n main.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 1000, main, PendingIntent.FLAG_UPDATE_CURRENT);\n\n int icon = R.drawable.star_big_on;\n int normalIcon = getResources().getIdentifier(\"icon\", \"drawable\", getPackageName());\n int notificationIcon = getResources().getIdentifier(\"notificationicon\", \"drawable\", getPackageName());\n if(notificationIcon != 0) {\n Log.d(TAG, \"Found Custom Notification Icon!\");\n icon = notificationIcon;\n }\n else if(normalIcon != 0) {\n Log.d(TAG, \"Found normal Notification Icon!\");\n icon = normalIcon;\n }\n\n Notification.Builder builder = new Notification.Builder(this);\n builder.setContentTitle(title);\n builder.setContentText(text);\n builder.setSmallIcon(icon);\n builder.setContentIntent(pendingIntent);\n Notification notification;\n if (android.os.Build.VERSION.SDK_INT >= 16) {\n notification = buildForegroundNotification(builder);\n } else {\n notification = buildForegroundNotificationCompat(builder);\n }\n notification.flags |= Notification.FLAG_ONGOING_EVENT | Notification.FLAG_FOREGROUND_SERVICE | Notification.FLAG_NO_CLEAR;\n return notification;\n }", "public void MostrarNotificacion(Boolean estado, int cancelar){\n //hora del evento\n long hora = System.currentTimeMillis();\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(getApplicationContext(), CHANNEL_ID);\n builder.setSmallIcon(R.drawable.ic_launcher_background);\n builder.setContentTitle(\"Titulo\");\n builder.setContentText(\"Cuerpo\");\n builder.setWhen(hora);\n builder.setPriority(NotificationCompat.PRIORITY_DEFAULT);\n\n //para poner la notificacion permanente\n builder.setOngoing(estado);\n\n //construir la notificacion\n NotificationManagerCompat notificationManagerCompat = NotificationManagerCompat.from(getApplicationContext());\n notificationManagerCompat.notify(NOTIFICACION_ID, builder.build());\n\n //para quitar la notificacion\n notificationManagerCompat.cancel(cancelar);\n\n\n\n }", "@Override\r\n\tpublic Notification createSMSNotification() {\n\t\treturn null;\r\n\t}", "private void showNotification() {\n // In this sample, we'll use the same text for the ticker and the expanded notification\n CharSequence text = getText(R.string.local_service_started);\n\n // Set the icon, scrolling text and timestamp\n Notification notification = new Notification(R.drawable.icon, text,\n System.currentTimeMillis());\n\n // The PendingIntent to launch our activity if the user selects this notification\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, ServiceActivity.class), 0);\n\n // Set the info for the views that show in the notification panel.\n notification.setLatestEventInfo(this, getText(R.string.local_service_label),\n text, contentIntent);\n\n // Send the notification.\n mNM.notify(NOTIFICATION, notification);\n }", "private void createNotificationChannel() {\n // Create the NotificationChannel, but only on API 26+ because\n // the NotificationChannel class is new and not in the support library\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"Inwentaryzacja\";\n String description = \"Powiadomienia\";\n int importance = NotificationManager.IMPORTANCE_LOW; // low importance - no sound\n NotificationChannel channel = new NotificationChannel(C.CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "public void createNotificationChannel()\n {\n //Instantiate the NotificationManager\n mNotifyManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n //Notification Channel constructed\n NotificationChannel notificationChannel = new NotificationChannel(PRIMARY_CHANNEL_ID, \"Simple Notification\", NotificationManager.IMPORTANCE_HIGH);\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Simple Notification\");\n\n //Create the channel with the NotificationManager\n mNotifyManager.createNotificationChannel(notificationChannel);\n }", "private PendingIntent buildAlarmPendingIntent() {\n Intent intent = new Intent(this, NotificationReceiver.class);\n intent.setAction(NotificationReceiver.ACTION_SEND_NOTIFICATIONS);\n\n return PendingIntent.getBroadcast(this,\n 0,\n intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n }", "private void createNotification(String title, String body) {\n Context context = getBaseContext();\n Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Intent notificationIntent = new Intent(context, OffersActivity.class);\n PendingIntent contentIntent = PendingIntent.getActivity(context,\n 0, notificationIntent,\n PendingIntent.FLAG_CANCEL_CURRENT);\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(getString(R.string.app_name))\n .setContentText(body)\n .setTicker(body)\n .setSound(defaultSoundUri)\n .setContentIntent(contentIntent)\n .setAutoCancel(true);\n NotificationManager mNotificationManager = (NotificationManager) context\n .getSystemService(Context.NOTIFICATION_SERVICE);\n mNotificationManager.notify(MESSAGE_NOTIFICATION_ID, mBuilder.build());\n }", "public static void noti(Context context, String title, String content, int notifyid) {\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context);\n builder.setContentTitle(title)\n .setContentText(content)\n .setSmallIcon(R.mipmap.ic_launcher);\n builder.setDefaults(Notification.DEFAULT_SOUND);\n// Creates an Intent for the Activity\n Intent notifyIntent =\n new Intent(context, SmartCabinetDeviceListActivity.class);\n// Sets the Activity to start in a new, empty task\n notifyIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK\n | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n// Creates the PendingIntent\n PendingIntent notifyPendingIntent =\n PendingIntent.getActivity(\n context,\n 0,\n notifyIntent,\n PendingIntent.FLAG_UPDATE_CURRENT\n );\n// Puts the PendingIntent into the notification builder\n builder.setContentIntent(notifyPendingIntent);\n// Notifications are issued by sending them to the\n// NotificationManager system service.\n NotificationManager mNotificationManager =\n (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n// Builds an anonymous Notification object from the builder, and\n// passes it to the NotificationManager\n mNotificationManager.notify(notifyid, builder.build());\n }", "public void generarNotifiacion(Context context,String tittle,String text,int icon,int notificationId){\n Intent intent = new Intent(this.context, context.getClass());\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n PendingIntent pendingIntent = PendingIntent.getActivity(this.context, 0, intent, 0);\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(this.context, CHANNEL_ID)\n .setSmallIcon(icon)\n .setContentTitle(tittle)\n .setContentText(text)\n .setPriority(NotificationCompat.PRIORITY_DEFAULT)\n .setCategory(NotificationCompat.CATEGORY_MESSAGE)\n // Set the intent that will fire when the user taps the notification\n .setContentIntent(pendingIntent)\n .setAutoCancel(true);\n\n NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this.context);\n\n // notificationId is a unique int for each notification that you must define\n notificationManager.notify(notificationId, builder.build());\n }", "public Notification createFrom(application.Notification notification) {\n Notification noti = this.create(notification);\n Set<Message> messages = this.createMessages(noti);\n noti.messages(messages);\n return noti;\n }", "Notification createNewAppointmentNotification(Appointment appointment);", "private void showNotification() {\r\n\t\t// In this sample, we'll use the same text for the ticker and the\r\n\t\t// expanded notification\r\n\t\tCharSequence text = getText(R.string.local_service_started);\r\n\r\n\t\t// Set the icon, scrolling text and timestamp\r\n\t\tNotification notification = new Notification(R.drawable.compass25,\r\n\t\t\t\ttext, System.currentTimeMillis());\r\n\t\tnotification.sound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\r\n\t\t// The PendingIntent to launch our activity if the user selects this\r\n\t\t// notification\r\n\t\tIntent intent = new Intent(this, TaskOverViewActivity.class);\r\n\t\t//intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);\r\n\t\tPendingIntent contentIntent = PendingIntent.getActivity(this, 0,\r\n\t\t\t\tintent, PendingIntent.FLAG_UPDATE_CURRENT);\r\n\r\n\t\t// Set the info for the views that show in the notification panel.\r\n\t\tnotification.setLatestEventInfo(this, getText(R.string.service_name),\r\n\t\t\t\ttext, contentIntent);\r\n\r\n\t\t// Send the notification.\r\n\t\t// We use a layout id because it is a unique number. We use it later to\r\n\t\t// cancel.\r\n\t\tmNM.notify(R.string.local_service_started, notification);\r\n\t}", "@Nonnull\n public static UBL23WriterBuilder <ExceptionNotificationType> exceptionNotification ()\n {\n return UBL23WriterBuilder.create (ExceptionNotificationType.class);\n }", "@RequiresApi(api = Build.VERSION_CODES.O)\n private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.notification);\n String description =getString(R.string.notification);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"lemubitA\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private String buildMessage(MqttNotification notification, String value) {\n if (notification != null) {\n if (notification.getOption().getRule().equals(\"#\")) {\n return value.toUpperCase();\n } else {\n return value.toUpperCase() + \" ( \" + getComparisonString(notification.getOption().getRule()) + \" \"\n + notification.getOption().getThreshold() + \" )\";\n }\n }\n return \"\";\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = MyShardPrefernces.myNotificationChannelName;\n\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(MyShardPrefernces.myNoficataionChannelID, name, importance);\n channel.setDescription(\"Notifications for alert Messenging\");\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void showNotification() {\n\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.food_icon2)\n .setContentTitle(\"Let's eat\")\n .setContentText(\"Good morning, It's time to take your Breakfast :)\");\n\n int mNotificationId = 001;\n\n\n Intent contentIntent = new Intent(this, RecommendationActivity.class);\n contentIntent.putExtra(\"dePagi\", \"pagigan\");\n TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);\n stackBuilder.addParentStack(RecommendationActivity.class);\n stackBuilder.addNextIntent(contentIntent);\n\n PendingIntent resultPendingIntent =\n stackBuilder.getPendingIntent(\n 0,\n PendingIntent.FLAG_UPDATE_CURRENT\n );\n mBuilder.setContentIntent(resultPendingIntent);\n\n mBuilder.setVibrate(new long[] { 1000, 1000, 1000, 1000, 1000 });\n mBuilder.setLights(Color.YELLOW, 3000, 3000);\n\n mBuilder.setAutoCancel(true);\n\n mNM =(NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n mNM.notify(mNotificationId, mBuilder.build());\n\n stopSelf();\n\n }", "private void showNotification() {\r\n\t\t// In this sample, we'll use the same text for the ticker and the\r\n\t\t// expanded notification\r\n\t\tCharSequence text = getText(R.string.local_service_started);\r\n\r\n\t\t// Set the icon, scrolling text and timestamp\r\n\t\tNotification notification = new Notification(R.drawable.service_icon,\r\n\t\t\t\ttext, System.currentTimeMillis());\r\n\r\n\t\t// The PendingIntent to launch our activity if the user selects this\r\n\t\t// notification\r\n\t\tPendingIntent contentIntent = PendingIntent.getActivity(this, 0,\r\n\t\t\t\tnew Intent(this, stopServiceJ.class), 0);\r\n\r\n\t\t// Set the info for the views that show in the notification panel.\r\n\t\tnotification.setLatestEventInfo(this, getText(R.string.service_name),\r\n\t\t\t\ttext, contentIntent);\r\n\r\n\t\t// Send the notification.\r\n\t\t// We use a layout id because it is a unique number. We use it later to\r\n\t\t// cancel.\r\n\t\tmNM.notify(R.string.local_service_started, notification);\r\n\t}", "private static void createNotification(Activity a, CustomFBProfile prof) {\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(a)\n .setSmallIcon(R.drawable.acba)\n .setContentTitle(\"New Message\")\n .setTicker(\"New Message!!\");\n NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();\n mBuilder.setStyle(inboxStyle);\n mBuilder.setVibrate(new long[]{2000, 500, 500, 250});\n mBuilder.setLights(Color.YELLOW, 3000, 3000);\n mBuilder.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION));\n mBuilder.setAutoCancel(true);\n\n// Creates an explicit intent for an Activity in your app\n Intent resultIntent = new Intent(a, LoginActivity.class);\n\n// The stack builder object will contain an artificial back stack for the\n// started Activity.\n// This ensures that navigating backward from the Activity leads out of\n// your application to the Home screen.\n TaskStackBuilder stackBuilder = TaskStackBuilder.create(a);\n// Adds the back stack for the Intent (but not the Intent itself)\n stackBuilder.addParentStack(LoginActivity.class);\n// Adds the Intent that starts the Activity to the top of the stack\n stackBuilder.addNextIntent(resultIntent);\n PendingIntent resultPendingIntent =\n stackBuilder.getPendingIntent(\n 0,\n PendingIntent.FLAG_UPDATE_CURRENT\n );\n mBuilder.setContentIntent(resultPendingIntent);\n NotificationManager mNotificationManager =\n (NotificationManager) a.getSystemService(Context.NOTIFICATION_SERVICE);\n// mId allows you to update the notification later on.\n mNotificationManager.notify(1, mBuilder.build());\n }", "private void showNotification() {\n // In this sample, we'll use the same text for the ticker and the expanded notification\n CharSequence text = \"Siguiendo el trayecto\";\n\n // The PendingIntent to launch our activity if the user selects this notification\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, InformacionServicio.class), 0);\n\n // Set the info for the views that show in the notification panel.\n Notification notification = new Notification.Builder(this)\n .setSmallIcon(R.drawable.estrella_full) // the status icon\n .setTicker(text) // the status text\n .setWhen(System.currentTimeMillis()) // the time stamp\n .setContentTitle(\"Conductor Serv\") // the label of the entry\n .setContentText(text) // the contents of the entry\n .setContentIntent(contentIntent) // The intent to send when the entry is clicked\n .build();\n\n // Send the notification.\n //mNM.notify(55, notification);\n //startForeground(56,notification);\n\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)\n startMyOwnForeground();\n else\n startForeground(1, notification);\n\n }", "public static void showNewNotification(Context context, Intent intent, String title, String msg, Bitmap bitmap) {\n\n Uri notificationSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n Intent notificationIntent;\n\n if (intent != null) {\n notificationIntent = intent;\n }\n else {\n notificationIntent = new Intent(context.getApplicationContext(), WalletHomeActivity.class);\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\n }\n\n PendingIntent pendingIntent = PendingIntent.getActivity((context), 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT| PendingIntent.FLAG_ONE_SHOT);\n\n\n NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);\n\n\n Notification.Builder builder = new Notification.Builder(context);\n if (bitmap != null)\n builder.setStyle(new Notification.BigPictureStyle().bigPicture(bitmap));\n\n\n // Create Notification\n Notification notification = builder\n .setContentTitle(title)\n .setContentText(msg)\n .setTicker(context.getString(R.string.app_name))\n .setSmallIcon(R.drawable.logo_vector)\n .setSound(notificationSound)\n .setLights(Color.RED, 3000, 3000)\n .setVibrate(new long[] { 1000, 1000 })\n .setWhen(System.currentTimeMillis())\n .setDefaults(Notification.DEFAULT_SOUND)\n .setAutoCancel(true)\n .setContentIntent(pendingIntent)\n .build();\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)\n {\n String channelId = \"121\";\n NotificationChannel channel = new NotificationChannel(\n channelId,\n \"Channel eMaisha Pay\",\n NotificationManager.IMPORTANCE_HIGH);\n notificationManager.createNotificationChannel(channel);\n builder.setChannelId(channelId);\n }\n\n notificationManager.notify(NOTIFICATION_REQUEST_CODE, notification);\n\n }", "private void sendNotification() {\n }", "public static void createNotification(MainActivity a, CustomFBProfile profile, IMessagingMetaData meta, HashMap<String, String> loc) {\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(a)\n .setSmallIcon(R.drawable.acba)\n .setContentTitle(\"New Message\")\n .setContentText(meta.getName().toUpperCase()).setTicker(\"New Message!!\");\n NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();\n mBuilder.setStyle(inboxStyle);\n mBuilder.setVibrate(new long[]{2000, 2000, 1000});\n mBuilder.setLights(Color.RED, 3000, 3000);\n mBuilder.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION));\n mBuilder.setAutoCancel(true);\n\n// Creates an explicit intent for an Activity in your app\n Intent resultIntent = a.startMessagingActivityFromAnywhereInApp(profile, meta, loc);\n\n// The stack builder object will contain an artificial back stack for the\n// started Activity.\n// This ensures that navigating backward from the Activity leads out of\n// your application to the Home screen.\n TaskStackBuilder stackBuilder = TaskStackBuilder.create(a);\n// Adds the back stack for the Intent (but not the Intent itself)\n stackBuilder.addParentStack(MainActivity.class);\n// Adds the Intent that starts the Activity to the top of the stack\n stackBuilder.addNextIntent(resultIntent);\n PendingIntent resultPendingIntent =\n stackBuilder.getPendingIntent(\n 0,\n PendingIntent.FLAG_UPDATE_CURRENT\n );\n mBuilder.setContentIntent(resultPendingIntent);\n NotificationManager mNotificationManager =\n (NotificationManager) a.getSystemService(Context.NOTIFICATION_SERVICE);\n// mId allows you to update the notification later on.\n mNotificationManager.notify(1, mBuilder.build());\n }", "private void createNotificationChannels() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel1 = new NotificationChannel(CHANNEL_REMINDER_ID, \"Reminder Channel\",NotificationManager.IMPORTANCE_HIGH);\n channel1.setDescription(\"Reminder to drink water\");\n\n NotificationManager manager = getSystemService(NotificationManager.class);\n manager.createNotificationChannel(channel1);\n\n\n }\n }", "private void showEndOfTripNotification() {\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(\"End of trip\")\n .setContentText(\"Notification text has been sent to \" + myFriendObject.getName());\n int mNotificationId = 001;\n NotificationManager manager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n manager.notify(mNotificationId, mBuilder.build());\n }", "private void ShowNotification()\n {\n Notification n = new Notification.Builder(this)\n .setContentTitle(\"Message from Himanshu\")\n .setContentText(\"Thank you Sir. Enjoyed Your Class!\")\n .setSmallIcon(R.drawable.cloud)\n //.setContentIntent(pIntent)\n .setAutoCancel(true)\n //.addAction(R.drawable.icon, \"Call\", pIntent)\n //.addAction(R.drawable.icon, \"More\", pIntent)\n //.addAction(R.drawable.icon, \"And more\", pIntent)\n .getNotification();\n\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n try {\n notificationManager.notify(0, n);\n }catch (Exception ex) {\n Log.d(\"MyApp\", \"Exception Occured!\");\n }\n }", "private void createNotificationChannel(){\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n CharSequence name = \"DailyReminderChannel\";\n String desc = \"Channel for daily reminders\";\n NotificationChannel channel = new NotificationChannel(\"dailyReminders\", name, NotificationManager.IMPORTANCE_DEFAULT);\n channel.setDescription(desc);\n\n NotificationManager manager = getActivity().getSystemService(NotificationManager.class);\n manager.createNotificationChannel(channel);\n }\n }", "public void sendNotification(View view) {\n\n NotificationManager nm= (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.O){\n\n //We have to create a notification channel\n NotificationChannel nc = new NotificationChannel(\"srminterns\",\"SRM NOTIFICATIONS\",NotificationManager.IMPORTANCE_HIGH);\n nm.createNotificationChannel(nc);\n\n }\n\n // we have to normally write notification code.\n\n NotificationCompat.Builder builder=new NotificationCompat.Builder(this,\"srminterns\");\n builder.setSmallIcon(R.drawable.umbrella);\n builder.setContentTitle(\"Sample Notification\");\n builder.setContentText(\"This is the description of the notification\");\n builder.setAutoCancel(true);\n\n /* Pending Intent\n * - It is the description of the operation to be performed\n * - can be created using the following methods\n * -getActivity() - if you want to open an activity with pending Intent\n * -getService() - if you want to strat a service with Pending Intent\n * -getBroadcast() - if you want to send a broadcast with Pending Intent\n *\n * Requires 4 Arguments\n * -context\n * -Pending Intent ID (Can be any Integer)\n * -Intent(Action that you want to perform)\n * - FLAG (This flag will tell the existing pending Intent about what to do if there\n * is a new Pending Intent (Arrival) */\n\n PendingIntent pi = PendingIntent.getActivity(this,12,new Intent(this, MainActivity.class)\n ,PendingIntent.FLAG_UPDATE_CURRENT);\n\n builder.setContentIntent(pi);\n\n /*\n * Step1: is to convert any image format that you want to display into a Bitmap image format\n * Step2: is to create bigPicture style before you issue the notification.\n *\n *\n *\n *\n * */\n\n Bitmap bitmap= BitmapFactory.decodeResource(getResources(),R.drawable.kathmandu);\n builder.setStyle(new NotificationCompat.BigPictureStyle().bigPicture(bitmap));\n nm.notify(42,builder.build());\n }", "public Notification() {\n\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"NOTIFICATION\";\n String description = \"NOTIFICATION\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(NOTIFICATION_CHANNEL, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = (NotificationManager)getSystemService(NotificationManager.class);\n\n notificationManager.createNotificationChannel(channel);\n }\n }", "public void expandNotification(View view){\n //Get the ID entered in the string\n int id = Integer.valueOf(notifcationIdView.getSelectedItem().toString());\n\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.monkey_notify)\n .setContentTitle(\"Not expanded\")\n .setContentText(\"This expanded notification doe!\");\n\n // Creates an explicit intent for an Activity in your app\n Intent resultIntent = new Intent(this, NotificationActivity.class);\n\n // The stack builder object will contain an artificial back stack for the\n // started Activity.\n // This ensures that navigating backward from the Activity leads out of\n // your application to the Home screen.\n TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);\n\n // Adds the back stack for the Intent (but not the Intent itself)\n stackBuilder.addParentStack(NotificationActivity.class);\n\n // Adds the Intent that starts the Activity to the top of the stack\n stackBuilder.addNextIntent(resultIntent);\n PendingIntent resultPendingIntent =\n stackBuilder.getPendingIntent(\n 0,\n PendingIntent.FLAG_UPDATE_CURRENT\n );\n mBuilder.setContentIntent(resultPendingIntent);\n\n NotificationCompat.InboxStyle inboxStyle =\n new NotificationCompat.InboxStyle();\n\n String[] events = new String[]{\"one\",\"two\",\"three\"};\n\n // Sets a title for the Inbox in expanded layout\n inboxStyle.setBigContentTitle(\"Event tracker details:\");\n\n // Moves events into the expanded layout\n for (int i=0; i < events.length; i++) {\n inboxStyle.addLine(events[i]);\n }\n\n // Moves the expanded layout object into the notification object.\n mBuilder.setStyle(inboxStyle);\n\n NotificationManager mNotificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n //Update the ID entered if it exists, create a new one if it doesn't\n mNotificationManager.notify(id, mBuilder.build());\n }", "private void sendNotification(Map<String, String> serverData) {\n Intent intent = new Intent(serverData.get(\"click_action\"));\n String title = serverData.get(\"title\");\n String body = serverData.get(\"body\");\n intent.putExtra(\"title\",title);\n intent.putExtra(\"body\",body);\n intent.putExtra(\"order\" , serverData.get(\"order\"));\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n PendingIntent pendingIntent = PendingIntent.getActivity(this,0 /* request code */, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n long[] pattern = {500,500,500,500,500};\n\n Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n NotificationCompat.Builder notificationBuilder = (NotificationCompat.Builder) new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ok)\n .setContentTitle(serverData.get(\"title\"))\n .setContentText(serverData.get(\"body\"))\n .setAutoCancel(true)\n .setVibrate(pattern)\n .setLights(Color.BLUE,1,1)\n .setSound(defaultSoundUri)\n .setContentIntent(pendingIntent);\n\n NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n notificationManager.notify(0 , notificationBuilder.build());\n }", "private void showReminderNotification(Context context) {\n // inisialisasi channel id, channel name, judul notifikasi, pesan notifikasi, intent, dan id request\n String CHANNEL_ID = \"Channel_1\";\n String CHANNEL_NAME = \"Reminder Channel App\";\n String title = context.getString(R.string.reminder_app_title);\n String message = context.getString(R.string.reminder_app_message);\n Intent intent = new Intent(context, MainActivity.class);\n int REQUST_CODE_APP = 110;\n\n PendingIntent pendingIntent = TaskStackBuilder.create(context)\n .addNextIntent(intent)\n .getPendingIntent(REQUST_CODE_APP, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // statement ini berfungsi untuk membuat notifikasi kita dapat berkerja dengan sistem android\n NotificationManager notificationManager\n = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n // mengset bunyi notifikasi, disini menggunakan bunyi default notifikasi pada sistem android\n Uri alarmSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n // method ini berfungsi untuk mengatur isi notifikasi\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context, CHANNEL_ID)\n .setSmallIcon(R.drawable.ic_notifications_black_24dp) // set icon kecil notifikasi\n .setLargeIcon(BitmapFactory.decodeResource(context.getResources(), // set icon besar notifikasi\n R.drawable.baseline_notification_important_white_48dp))\n .setContentTitle(title) // set judul notifikasi\n .setContentText(message) // set pesan notifikasi\n .setContentIntent(pendingIntent) // set aksi notifikasi\n .setVibrate(new long[]{1000, 1000, 1000, 1000, 1000}) // set pola getar saat notifikasi\n .setSound(alarmSound); // set bunyi notifikasi yang akan digunakan\n\n // statement ini berfungsi supaya notifikasi yang telah dibuat dapat berjalan di android\n // dengan OS Oreo ke atas\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_NAME,\n NotificationManager.IMPORTANCE_DEFAULT);\n\n channel.enableVibration(true);\n channel.setVibrationPattern(new long[]{1000, 1000, 1000, 1000, 1000});\n\n builder.setChannelId(CHANNEL_ID);\n if (notificationManager != null) {\n notificationManager.createNotificationChannel(channel);\n }\n }\n\n // statement ini berfungsi supaya notifikasi yang telah dibuat dapat berjalan di bawah\n // android dengan OS Oreo ke bawah\n Notification notification = builder.build();\n if (notificationManager != null) {\n notificationManager.notify(ID_APP, notification);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_HIGH;\n\n // crate a channel with high priority\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID_1, name, importance);\n\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n\n// // Create an Intent for the activity you want to start\n// Intent resultIntent = new Intent(this, MainActivity.class);\n// // Create the TaskStackBuilder and add the intent, which inflates the back stack\n// TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);\n// stackBuilder.addNextIntentWithParentStack(resultIntent);\n// // Get the PendingIntent containing the entire back stack\n// PendingIntent resultPendingIntent =\n// stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);\n }\n\n }" ]
[ "0.7411369", "0.6902221", "0.68910563", "0.6810907", "0.6747912", "0.6531755", "0.6486251", "0.64618593", "0.6407784", "0.63175666", "0.62937874", "0.6277912", "0.6242772", "0.62240016", "0.61996686", "0.61979973", "0.61797416", "0.6150336", "0.61290026", "0.6123875", "0.61098534", "0.6108298", "0.61006856", "0.60854906", "0.60750884", "0.60592896", "0.6058108", "0.604927", "0.6041022", "0.60336006", "0.60005337", "0.5985455", "0.5982502", "0.59784466", "0.5930115", "0.5928642", "0.5927521", "0.5907839", "0.5903879", "0.5875664", "0.5847182", "0.58467513", "0.58402467", "0.58297056", "0.58198404", "0.57968503", "0.5794007", "0.5787367", "0.5786698", "0.57798934", "0.577277", "0.577277", "0.57627624", "0.5754177", "0.5748591", "0.57460505", "0.5745896", "0.5743615", "0.57419634", "0.57417357", "0.5729084", "0.57245153", "0.57173544", "0.57163244", "0.5711877", "0.5705522", "0.56995934", "0.56980306", "0.5696359", "0.56958044", "0.5688304", "0.56679094", "0.5663085", "0.56596833", "0.5645976", "0.5645468", "0.56357723", "0.5635755", "0.5617256", "0.56160897", "0.56150335", "0.5613877", "0.5604969", "0.56040514", "0.56039315", "0.5599128", "0.5594864", "0.55873823", "0.558195", "0.55800235", "0.5578159", "0.5573796", "0.5573248", "0.5568449", "0.5563252", "0.5552639", "0.5548597", "0.5547896", "0.5544579", "0.5531242" ]
0.7667415
0
Called when the user clicks the "Create Notification Button"
public void buildNotification(View view) { Toast.makeText(this, "Building the Notification", Toast.LENGTH_SHORT).show(); //Build the notification NotificationCompat.Builder notifyBuilder = getNotificationBuilder(); //Push the notification with a unique notification ID mNotifyManager.notify(NOTIFICATION_ID, notifyBuilder.build()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createNotification(View view) {\n Intent intent = new Intent(this, Status1.class);\r\n PendingIntent pIntent = PendingIntent.getActivity(this, 0, intent, 0);\r\n\r\n // Build notification\r\n // Actions are just fake\r\n Notification noti = new Notification.Builder(this)\r\n .setContentTitle(\"RKC App \")\r\n .setContentText(\"Click To Enter \").setSmallIcon(R.drawable.arc)\r\n .setContentIntent(pIntent)\r\n .addAction(R.drawable.ironman, \"Back\", pIntent)\r\n .addAction(R.drawable.gun, \"More\", pIntent)\r\n .build();\r\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\r\n // hide the notification after its selected\r\n noti.flags |= Notification.FLAG_AUTO_CANCEL;\r\n\r\n notificationManager.notify(0, noti);\r\n\r\n }", "private void createNotification() {\n\t\tIntent notifyIntent = new Intent(this, BirthdayActivity.class);\r\n\t\t// Sets the Activity to start in a new, empty task\r\n\t\tnotifyIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\t// Creates the PendingIntent\r\n\t\tPendingIntent pendingIntent = PendingIntent.getActivity(this,\r\n\t\t\t\t(int) System.currentTimeMillis(), notifyIntent,\r\n\t\t\t\tPendingIntent.FLAG_UPDATE_CURRENT);\r\n\r\n\t\tNotificationManagerUtil notificationManagerUtil = NotificationManagerUtil\r\n\t\t\t\t.getInstance();\r\n\t\tnotificationManagerUtil.createNotifications(this, 1, \"Message\",\r\n\t\t\t\tpendingIntent);\r\n\t}", "@RequestMapping(value = \"/broadband-user/system/notification/create\")\n\tpublic String toNotificationCreate(Model model) {\n\n\t\tmodel.addAttribute(\"notification\", new Notification());\n\t\tmodel.addAttribute(\"panelheading\", \"Notification Create\");\n\t\tmodel.addAttribute(\"action\", \"/broadband-user/system/notification/create\");\n\n\t\treturn \"broadband-user/system/notification\";\n\t}", "private void checkNewNotification() {\n toolbar.setTitle(R.string.notification);\n NotificationFragment notificationFragment = new NotificationFragment();\n displaySelectedFragment(notificationFragment);\n }", "public void btnpress(View view) {\n NewMessageNotification newMessageNotification = new NewMessageNotification();\n newMessageNotification.notify(MainActivity.this,\"Danger\",1);\n }", "public void clickOnCreateButton() {\n\t\twaitForElement(createButton);\n\t\tclickOn(createButton);\n\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tAddNotificationWizard wizard = new AddNotificationWizard(humanInteractions,notificationPage,domain,notficationViewer);\n\t\t\t\tWizardDialog wizardDialog = new WizardDialog(Display .getCurrent().getActiveShell(),wizard);\n\t\t\t\twizardDialog.create(); \n\t\t\t\twizardDialog.open();\n\t\t\t}", "public void sendNotification(View view) {\n\t\t Intent intent = new Intent(this, MainActivity.class);\r\n\t\t PendingIntent pIntent = PendingIntent.getActivity(this, 0, intent, 0);\r\n\r\n\t\t // Build notification\r\n\t\t // Actions are just fake\r\n\t\t Notification noti = new Notification.Builder(this)\r\n\t\t .setContentTitle(\"TodoList Item\")\r\n\t\t .setContentText(\"A New Item was Added\").setSmallIcon(R.drawable.ic_launcher)\r\n\t\t .setContentIntent(pIntent).build();\r\n\t\t //.addAction(R.drawable.ic_launcher, \"Call\", pIntent);\r\n\t\t //.addAction(R.drawable.ic_launcher, \"More\", pIntent)\r\n\t\t //.addAction(R.drawable.ic_launcher, \"And more\", pIntent).build();\r\n\t\t NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\r\n\t\t // hide the notification after its selected\r\n\t\t noti.flags |= Notification.FLAG_AUTO_CANCEL;\r\n\r\n\t\t notificationManager.notify(0, noti);\r\n\r\n\t\t }", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "public void clickCreateButton() {\n this.action.click(this.createButton);\n }", "private void showNotification() {\n\n }", "private void sendNotification() {\n }", "@Listen(\"onClick=#createEntryButton\")\n public void createEntryButtonOnClick(){\n Window window = (Window) Executions.createComponents(\"entry.zul\", phonePageWindow, new HashMap());\n window.doModal();\n }", "private void showNotification() {\n }", "public void clickOnWithNotificationTemplate() {\r\n\r\n\t\treportStep(\"About to click on With Notification Template\", \"INFO\");\r\n\r\n\t\tif(clickAfterWait(withTemplateNotification)) {\r\n\r\n\t\t\treportStep(\"Successfully clicked on the With Notification template \", \"PASS\");\r\n\r\n\t\t}else {\r\n\t\t\treportStep(\"Failed to click on the With Notification template \", \"FAIL\");\r\n\t\t}\r\n\t}", "@Override\n public void createNotification(Notification notification) {\n Player p = Bukkit.getPlayer(notification.getPlayer()); //TODO uuid\n if (p != null && p.isOnline()) {\n showNotification(notification, false);\n }\n try {\n notificationIntegerDao.createIfNotExists(notification);\n } catch (SQLException e) {\n logSQLError(e);\n }\n }", "private void newTask()\n {\n \t//TODO add alarm\n \tTask task = new Task(taskName.getText().toString(), taskDetails.getText().toString());\n \tdb.createTask(task);\n \t//TODO Tie notification to an alarm\n \t//Create notification\n \tIntent notifyIntent = new Intent(this, TaskNotification.class);\n \tnotifyIntent.putExtra(\"title\", task.name); //add title name\n \tnotifyIntent.putExtra(\"id\", (int) task.id); //add id\n \tstartActivity(notifyIntent); //create the intent\n \t\n \trefreshData();\n }", "@FXML\r\n private void handleButtonCreateTicket() {\r\n MobileApplication.getInstance().addViewFactory(NEWTICKET_VIEW, () -> new NewTicketView(NEWTICKET_VIEW).getView());\r\n MobileApplication.getInstance().switchView(NEWTICKET_VIEW);\r\n\r\n }", "@Override\n public void notificationReceived(OSNotification notification) {\n Log.e(\"oneSignal\",\"new Notification\");\n\n }", "@Override\r\n public void onClick(View v) {\n try {\r\n postDatatoServer(\"accept_request\", notification.toJSON());\r\n fetchDatafromServer(\"notifications\");\r\n } \r\n catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void addNotification() {\n PendingIntent pi = PendingIntent.getActivity(this, 0, new Intent(this, MapActivity.class), 0);\n Resources r = getResources();\n Notification notification = new NotificationCompat.Builder(this)\n .setTicker(r.getString(R.string.notification_titles))\n .setSmallIcon(android.R.drawable.ic_menu_report_image)\n .setContentTitle(r.getString(R.string.notification_titles))\n .setContentText(r.getString(R.string.notification_tex))\n .setContentIntent(pi)\n .setAutoCancel(true)\n .build();\n\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n notificationManager.notify(0, notification);\n }", "public void notificationspageButtonPressed(javafx.event.ActionEvent event) throws IOException {\r\n Parent notificationsParent = FXMLLoader.load(getClass().getResource(\"Notification.fxml\"));\r\n Scene notificationsScene = new Scene(notificationsParent);\r\n Stage window = (Stage)((Node)event.getSource()).getScene().getWindow();\r\n window.setScene(notificationsScene);\r\n window.show();\r\n }", "private void createNotification(FoodEvents event) {\n Context context = getBaseContext();\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context).setSmallIcon(R.drawable.ic_launcher).setContentTitle(event.getTitle())\n .setContentText(event.getDescription());\n Intent resultIntent = new Intent(this, EventDetails.class);\n resultIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n resultIntent.putExtra(EventDetails.EXTRA_EVENT, event);\n PendingIntent resultPendingIntent = PendingIntent.getActivity(getBaseContext(), 0, resultIntent, PendingIntent.FLAG_UPDATE_CURRENT, null);\n mBuilder.setContentIntent(resultPendingIntent);\n NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n mNotificationManager.notify(MESSAGE_NOTIFICATION_ID, mBuilder.build());\n notifyMyWatch(event);\n }", "private void createNotification(int icon, String name, String auto_manual, String secondText, int color) {\n\n Intent notificationIntent = new Intent(this, SyncopyActivity.class);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(this,\n 0, notificationIntent, 0);\n Notification notification = new NotificationCompat.Builder(this, CHANNEL_ID)\n .setContentTitle(name)\n .setContentText(secondText)\n .setSubText(String.format(\"(%s)\", auto_manual))\n .setSmallIcon(icon)\n .setColor(getResources().getColor(color))\n .setContentIntent(pendingIntent)\n .setVibrate(null)\n .setSound(null)\n .setPriority(NotificationManager.IMPORTANCE_LOW)\n .build();\n\n synchronized (notification){\n notification.notify();\n }\n\n startForeground(1, notification);\n\n\n }", "@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tConfirmDialog.show(UI.getCurrent(), MESSAGE_1,\"\",\"Aceptar\",\"Crear mas Usuarios\",\n\t\t\t\t new ConfirmDialog.Listener() {\n\n\t\t\t\t public void onClose(ConfirmDialog dialog) {\t\n\t\t\t\t \tent= false;\n\t\t\t\t if (dialog.isConfirmed()) {\n\t\t\t\t // Confirmed to continue\t\n\t\t\t\t \tc.navegar((StartView.VIEW_NAME));\n\t\t\t\t } else {\n\t\t\t\t // User did not confirm\t\t\t \n\t\t\t\t \t//c.crearWindow(RegistrarUser.VIEW_NAME);\n\t\t\t\t \tc.navegar((StartView.VIEW_NAME));\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t });\n\t\t\t\t\n\t\t\t\t//Notification nota= new Notification(\"Registro Exitoso!\",Notification.Type.HUMANIZED_MESSAGE);\n\t\t\t\t//nota.setDelayMsec(-1);\n\t\t\t\t//nota.show(Page.getCurrent());\t\n\t\t\t\t\n\t\t\t\tclose();\t\t\t\n\t\t\t}", "Notification createNewAppointmentNotification(Appointment appointment);", "private void setupNotificationLayout() {\n //Setup notification area to begin date-set process on click.\n notificationLayout.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n showTimerPickerDialog();\n return false;\n }\n });\n\n //Remove date from task and updated view\n notificationRemoveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n cal = null;\n EventBus.getDefault().post(new TaskEditedEvent());\n }\n });\n }", "public void clickOnSendNotification() {\r\n\r\n\t\treportStep(\"About to click on Send Notification button \", \"INFO\");\r\n\r\n\t\tif(clickAfterWait(sendNotificationButton)) {\r\n\r\n\t\t\treportStep(\"Successfully clicked on the Send notification Button \", \"PASS\");\r\n\r\n\t\t}else {\r\n\r\n\t\t\treportStep(\"Failed to click onn the Send Notificationn Buttonn \", \"FAIL\");\r\n\t\t}\r\n\t}", "@FXML\r\n\t\tpublic void addButton(ActionEvent event) {\r\n\t\t\t// get name, notes, and due date from fields\r\n\t\t\tString taskName = name.getText();\r\n\t\t\tString taskNotes = notes.getText();\r\n\t\t\tLocalDate taskDate = date.getValue();\r\n\t\t\t\r\n\t\t\tif (taskName.isEmpty()) {\r\n\t\t\t\t// validate that taskName is not empty\r\n\t\t\t\tnameLabel.setText(\"Must have a name!\");\r\n\t\t\t\tname.setStyle(warningStyle);\r\n\t\t\t} else {\r\n\t\t\t\tnameLabel.setText(\"\");\r\n\t\t\t\tname.setStyle(defaultStyle);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (taskDate == null) {\r\n\t\t\t\t// validate that taskDate is not empty \r\n\t\t\t\tdateLabel.setText(\"Must provide a due date!\");\r\n\t\t\t\tdate.setStyle(warningStyle);\r\n\t\t\t} else {\r\n\t\t\t\tdateLabel.setText(\"\");\r\n\t\t\t\tdate.setStyle(defaultStyle);\r\n\t\t\t}\r\n\t\t\t\n\t\t\tif (taskDate != null && !taskName.isEmpty()) {\r\n\t\t\t\t// if everything is good, make a task\r\n\t\t\t\tGuiBasedApp.addTask(taskName, taskNotes, taskDate);\r\n\t\t\t\t\r\n\t\t\t\t// launch the Home Screen Scene\r\n\t\t\t\tGuiBasedApp.launchHomeScreenScene();\r\n\t\t\t}\r\n\t\t}", "public void onPressAddToCalendar() {\r\n new ActionConfirmationFragment(this, this)\r\n .setTitle(getString(R.string.event_confirmation_add_event_calendar_entry))\r\n .setMessage(getString(R.string.action_confirmation_can_be_undone))\r\n .setRequestID(REQUEST_CONFIRMATION_ADD_EVENT_CALENDAR_ENTRY)\r\n .show(getSupportFragmentManager(), null);\r\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\r\n CharSequence name = \"Picture upload\";\r\n String description =\"PRIKACENA SLIKA\";\r\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\r\n NotificationChannel channel = new NotificationChannel(\"slika1\", name, importance);\r\n channel.setDescription(description);\r\n // Register the channel with the system; you can't change the importance\r\n // or other notification behaviors after this\r\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\r\n notificationManager.createNotificationChannel(channel);\r\n }\r\n }", "public void newTask() {\r\n\r\n todoTaskGui(\"Create\", null);\r\n }", "Notification createAppointmentConfirmationNotification(Appointment appointment);", "@Override\n public void onClick(View v) {\n boolean newReminder = false;\n if (reminder == null){\n reminder = new Reminder();\n newReminder = true;\n }\n //\n reminder.setName(mName.getText().toString());\n reminder.setNotes(mNotes.getText().toString());\n //\n if (newReminder) {\n // Creacion de nuevo reminder\n EventBus.getDefault().post(new Events.ReminderCreateEvent(reminder));\n } else{\n // Actualizacion de reminder\n EventBus.getDefault().post(new Events.ReminderUpdateEvent(reminder));\n }\n\n getActivity().finish(); // TODO: don't just finish()!\n }", "public static void createNotification(Context context, Reminder reminder) {\n Intent viewIntent = new Intent(context, MainScreen.class);\n viewIntent.putExtra(\"NOTIFICATION_ID\", reminder.getId());\n viewIntent.putExtra(\"NOTIFICATION_DISMISS\", true);\n PendingIntent pending = PendingIntent.getActivity(context, reminder.getId(), viewIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n /* // Create intent for notification snooze click behaviour\n Intent snoozeIntent = new Intent(context, SnoozeActionReceiver.class);\n snoozeIntent.putExtra(\"NOTIFICATION_ID\", reminder.getId());\n PendingIntent pendingSnooze = PendingIntent.getBroadcast(context, reminder.getId(), snoozeIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n*/\n int imageResId = context.getResources().getIdentifier(reminder.getIcon(), \"drawable\", context.getPackageName());\n\n\n /*NotificationCompat.Builder builder = new NotificationCompat.Builder(context, CHANNEL_ID)\n .setSmallIcon(R.drawable.notification_icon)\n .setContentTitle(textTitle)\n .setContentText(textContent)\n .setPriority(NotificationCompat.PRIORITY_DEFAULT);\n\n */\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context)\n .setSmallIcon(imageResId)\n .setColor(Color.parseColor(reminder.getColour()))\n .setStyle(new NotificationCompat.BigTextStyle().bigText(reminder.getContent()))\n .setContentTitle(reminder.getTitle())\n .setContentText(reminder.getContent())\n .setTicker(reminder.getTitle())\n .setContentIntent(pending);\n\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n\n /*if (sharedPreferences.getBoolean(\"checkBoxNagging\", false)) {\n Intent swipeIntent = new Intent(context, DismissReceiver.class);\n swipeIntent.putExtra(\"NOTIFICATION_ID\", reminder.getId());\n PendingIntent pendingDismiss = PendingIntent.getBroadcast(context, reminder.getId(), swipeIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n builder.setDeleteIntent(pendingDismiss);\n\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.MINUTE, sharedPreferences.getInt(\"nagMinutes\", context.getResources().getInteger(R.integer.default_nag_minutes)));\n calendar.add(Calendar.SECOND, sharedPreferences.getInt(\"nagSeconds\", context.getResources().getInteger(R.integer.default_nag_seconds)));\n Intent alarmIntent = new Intent(context, NagReceiver.class);\n AlarmUtil.setAlarm(context, alarmIntent, reminder.getId(), calendar);\n }*/\n\n String soundUri = sharedPreferences.getString(\"NotificationSound\", \"content://settings/system/notification_sound\");\n if (soundUri.length() != 0) {\n builder.setSound(Uri.parse(soundUri));\n }\n if (sharedPreferences.getBoolean(\"checkBoxLED\", true)) {\n builder.setLights(Color.BLUE, 700, 1500);\n }\n if (sharedPreferences.getBoolean(\"checkBoxOngoing\", false)) {\n builder.setOngoing(true);\n }\n if (sharedPreferences.getBoolean(\"checkBoxVibrate\", true)) {\n long[] pattern = {0, 300, 0};\n builder.setVibrate(pattern);\n }\n /*if (sharedPreferences.getBoolean(\"checkBoxMarkAsDone\", false)) {\n Intent intent = new Intent(context, DismissReceiver.class);\n intent.putExtra(\"NOTIFICATION_ID\", reminder.getId());\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, reminder.getId(), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n builder.addAction(R.drawable.ic_done_white_24dp, context.getString(R.string.mark_as_done), pendingIntent);\n }\n if (sharedPreferences.getBoolean(\"checkBoxSnooze\", false)) {\n builder.addAction(R.drawable.ic_snooze_white_24dp, context.getString(R.string.snooze), pendingSnooze);\n }*/\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n builder.setPriority(Notification.PRIORITY_HIGH);\n }\n\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n notificationManager.notify(reminder.getId(), builder.build());\n }", "private void sendNotification() {\n int mNotificationId = 001;\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_action_camera)\n .setContentTitle(\"Daily Selfie\")\n .setContentText(\"Time for another selfie\");\n Intent resultIntent = new Intent(this, MainActivity.class);\n PendingIntent resultPendingIntent =\n PendingIntent.getActivity(\n this,\n 0,\n resultIntent,\n PendingIntent.FLAG_UPDATE_CURRENT\n );\n mBuilder.setContentIntent(resultPendingIntent);\n // Gets an instance of the NotificationManager service\n NotificationManager mNotifyMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n // Builds the notification and issues it.\n mNotifyMgr.notify(mNotificationId, mBuilder.build());\n }", "private void sendNotification(Map<String, String> serverData) {\n Intent intent = new Intent(serverData.get(\"click_action\"));\n String title = serverData.get(\"title\");\n String body = serverData.get(\"body\");\n intent.putExtra(\"title\",title);\n intent.putExtra(\"body\",body);\n intent.putExtra(\"order\" , serverData.get(\"order\"));\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n PendingIntent pendingIntent = PendingIntent.getActivity(this,0 /* request code */, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n long[] pattern = {500,500,500,500,500};\n\n Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n NotificationCompat.Builder notificationBuilder = (NotificationCompat.Builder) new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ok)\n .setContentTitle(serverData.get(\"title\"))\n .setContentText(serverData.get(\"body\"))\n .setAutoCancel(true)\n .setVibrate(pattern)\n .setLights(Color.BLUE,1,1)\n .setSound(defaultSoundUri)\n .setContentIntent(pendingIntent);\n\n NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n notificationManager.notify(0 , notificationBuilder.build());\n }", "private void handleActionNotification() {\n String result = getQuote(stringsArray);\n// Notification myNotification = new Notification.Builder(this)\n// .setAutoCancel(true)\n// .setDefaults(Notification.DEFAULT_ALL)\n// .setWhen(System.currentTimeMillis())\n// .setSmallIcon(R.mipmap.ic_launcher)\n// .setContentText(result)\n// .build();\n//\n// NotificationManagerCompat manager = NotificationManagerCompat.from(this);\n// manager.notify(0, myNotification);\n\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(\"My notification\")\n .setContentText(result);\n\n NotificationManager notificationManager = (NotificationManager)this\n .getSystemService(Context.NOTIFICATION_SERVICE);\n int id = 1;\n notificationManager.notify(id, builder.build());\n }", "public void createNotification(Context context, String msg, String msgText, String msgAlert, int notifID) {\n\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n Intent repeating_intent = new Intent(context, MainMenu.class);\n repeating_intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(context, notifID, repeating_intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context)\n .setContentIntent(pendingIntent)\n .setSmallIcon(R.drawable.ic_fridge_empty)\n .setContentTitle(msg)\n .setContentText(msgText)\n .setTicker(msgAlert)\n .setColor(0xFFC107) // colour of the circle backgroud\n .setVibrate(new long[]{1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000}) // Vibration\n .setLights(0xFFFF00, 100, 50) // LED\n .setAutoCancel(true);\n\n notificationManager.notify(notifID, builder.build());\n }", "public void createNotificationChannel()\n {\n //Instantiate the NotificationManager\n mNotifyManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n //Notification Channel constructed\n NotificationChannel notificationChannel = new NotificationChannel(PRIMARY_CHANNEL_ID, \"Simple Notification\", NotificationManager.IMPORTANCE_HIGH);\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Simple Notification\");\n\n //Create the channel with the NotificationManager\n mNotifyManager.createNotificationChannel(notificationChannel);\n }", "@SuppressWarnings({ \"serial\" })\n\tprivate void newTaskButtonHandler(Button NewTaskButton)\n\t{\n\t\tif (editable)\n\t\t{\n\t\t\tNewTaskButton.addListener(new Button.ClickListener()\n\t\t\t {\n\t\t\t\t@Override\n\t\t\t\tpublic void buttonClick(com.vaadin.ui.Button.ClickEvent event) \n\t\t\t\t{\n\t\t\t\t\terrorMessages.setVisible(false);\n\t\t\t\t\tTask emptytask=new Task(--counter, project.getProjectID(), null,null, null,null,null,false, null,null, 1, null,null, \"\",\"\") ;\n\t\t\t\t\tViewEditTaskWindow wind=new ViewEditTaskWindow(\"New Task\",emptytask,true,container,table,taskManager,db,project,thisobject) ;\n\t\t\t\t\tsetProject();\n\t\t\t\t\twind.center();\n\t\t\t\t\tUI.getCurrent().addWindow(wind);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tNewTaskButton.setEnabled(false);\n\t\t}\n\t}", "public void onCreateClick(){\r\n\t\tmyView.advanceToCreate();\r\n\t}", "private void createNotification(String title, String body) {\n Context context = getBaseContext();\n Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Intent notificationIntent = new Intent(context, OffersActivity.class);\n PendingIntent contentIntent = PendingIntent.getActivity(context,\n 0, notificationIntent,\n PendingIntent.FLAG_CANCEL_CURRENT);\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(getString(R.string.app_name))\n .setContentText(body)\n .setTicker(body)\n .setSound(defaultSoundUri)\n .setContentIntent(contentIntent)\n .setAutoCancel(true);\n NotificationManager mNotificationManager = (NotificationManager) context\n .getSystemService(Context.NOTIFICATION_SERVICE);\n mNotificationManager.notify(MESSAGE_NOTIFICATION_ID, mBuilder.build());\n }", "public void mmCreateClick(ActionEvent event) throws Exception{\r\n displayCreateProfile();\r\n }", "@Override\r\n\tpublic void onChannelPersonalCreateNotify(AirChannel ch)\r\n\t{\n\t\tif (ch != null)\r\n\t\t{\r\n\t\t\tAirtalkeeChannel.getInstance().ChannelMemberGet(ch.getId());\r\n\t\t\tAirSession session = AirtalkeeSessionManager.getInstance().SessionMatch(ch.getId());\r\n\t\t\tif (session != null)\r\n\t\t\t{\r\n\t\t\t\tString tip = String.format(AirServices.getInstance().getString(R.string.talk_channel_tip_create), ch.getCreatorName());\r\n\t\t\t\tAirtalkeeMessage.getInstance().MessageSystemGenerate(session, tip, true);\r\n\t\t\t}\r\n\r\n\t\t\tif (channelListener != null)\r\n\t\t\t{\r\n\t\t\t\tchannelListener.onChannelPersonalCreateNotify(ch);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void onClick(ClickEvent event) {\n\t\t\t\tString msgtxt = view.getCreateMessageText().getText().trim();\n\n\t\t\t\t// 2. Lock input, show sending indicator: goto 3\n\t\t\t\tview.lockCreateMessageInput();\n\n\t\t\t\t// 3. Validate input: valid ? goto 4 : goto e1\n\t\t\t\tif(msgtxt.isEmpty()) {\n\t\t\t\t\t// TODO: Show warning message: goto 6\n\n\t\t\t\t\t// 6. Unlock input, remove sending indicator, set focus to inputText: goto 1\n\t\t\t\t\tview.unlockCreatemessageInput();\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tMessage msg = new MessageImpl();\n\t\t\t\tmsg.setText(msgtxt);\n\t\t\t\tservice.createMessage(msg, new AsyncCallback<Void>() {\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(Void result) {\n\t\t\t\t\t\tGWT.log(\"INFO: Message saved succesfully.\");\n\n\t\t\t\t\t\t// 5. Clear input: goto 6\n\t\t\t\t\t\tview.getCreateMessageText().setText(\"\");\n\n\t\t\t\t\t\t// 6. Unlock input, remove sending indicator, set focus to inputText: goto 1\n\t\t\t\t\t\tview.unlockCreatemessageInput();\t\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\tGWT.log(caught.getMessage());\n\n\t\t\t\t\t\t// TODO: Show error message: goto 6\n\n\t\t\t\t\t\t// 6. Unlock input, remove sending indicator, set focus to inputText: goto 1\n\t\t\t\t\t\tview.unlockCreatemessageInput();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}", "public static void sendCreateEvent(TransactionalEditingDomain domain, EObject eObject) {\n\n\t\tNotification createNotification = new ENotificationImpl(\n\t\t\t(InternalEObject) eObject, EventTypes.CREATE,\n\t\t\t(EStructuralFeature) null, (Object) null, (Object) null, -1);\n\t\t\n\t\teObject.eNotify(createNotification);\n\t}", "public void crearNotificacion(){\n Intent dismissIntent = new Intent(this, MainActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n dismissIntent.setAction(\"Sincronizar\");\n PendingIntent piDismiss = PendingIntent.getActivity(this, 0, dismissIntent, 0);\n\n//set intents and pending intents to call service on click of \"snooze\" action button of notification\n /*Intent snoozeIntent = new Intent(this, MyService.class);\n snoozeIntent.setAction(ACTION_SNOOZE);\n PendingIntent piSnooze = PendingIntent.getService(this, 0, snoozeIntent, 0);*/\n\n //build notification\n android.support.v4.app.NotificationCompat.Builder builder =\n new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_app)\n .setContentTitle(\"Sincronización pendiente\")\n .setContentText(\"Sincronice la aplicación para recuperar nuevos eventos\")\n .setDefaults(Notification.DEFAULT_ALL) // must requires VIBRATE permission\n .setPriority(NotificationCompat.PRIORITY_HIGH) //must give priority to High, Max which will considered as heads-up notification\n /*.addAction(R.drawable.snooze,\n getString(R.string.snooze), piSnooze)*/;\n builder.setContentIntent(piDismiss);\n builder.setAutoCancel(true);\n\n// Gets an instance of the NotificationManager service\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n//to post your notification to the notification bar with a id. If a notification with same id already exists, it will get replaced with updated information.\n notificationManager.notify(10000, builder.build());\n }", "private void addNewLevelNotification() {\n\t\tDisplay.getDefault().syncExec(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tNewLevelNotification notification = new NewLevelNotification(Display.getDefault());\n\t\t\t\tNotificationManager.add(notification);\n\t\t\t}\n\t\t});\n\t}", "public static void createNotification1(Context context, Reminder reminder) {\n\n\n Intent intent = new Intent(context, SplashActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0 /* Request code */, intent,\n PendingIntent.FLAG_ONE_SHOT);\n\n String channelId = context.getString(R.string.default_notification_channel_id);\n Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n NotificationCompat.Builder notificationBuilder =\n new NotificationCompat.Builder(context, channelId)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(reminder.getTitle())\n .setContentText(reminder.getContent())\n .setAutoCancel(true)\n .setSound(defaultSoundUri)\n .setContentIntent(pendingIntent);\n\n NotificationManager notificationManager =\n (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n // Since android Oreo notification channel is needed.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel = new NotificationChannel(channelId,\n \"Channel human readable title\",\n NotificationManager.IMPORTANCE_DEFAULT);\n notificationManager.createNotificationChannel(channel);\n }\n\n notificationManager.notify(0 /* ID of notification */, notificationBuilder.build());\n\n DeleteNotification(reminder,context);\n }", "public void createNotificationChannel() {\n mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n // Notification channels are only available in OREO and higher.\n // So, add a check on SDK version.\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {\n // Create the NotificationChannel with all the parameters.\n NotificationChannel notificationChannel = new NotificationChannel(PRIMARY_CHANNEL_ID,\"Log the game!\", NotificationManager.IMPORTANCE_HIGH);\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Reminder to log your game on Friday's at 3:05 pm\");\n mNotificationManager.createNotificationChannel(notificationChannel);\n }\n }", "private void createNotificationChannel(){\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n CharSequence name = \"DailyReminderChannel\";\n String desc = \"Channel for daily reminders\";\n NotificationChannel channel = new NotificationChannel(\"dailyReminders\", name, NotificationManager.IMPORTANCE_DEFAULT);\n channel.setDescription(desc);\n\n NotificationManager manager = getActivity().getSystemService(NotificationManager.class);\n manager.createNotificationChannel(channel);\n }\n }", "private void createSingleReminderNotification(List<Reminder> reminders) {\n\t\tReminder reminder = reminders.get(0);\n\t\tLog.d(TAG, \"single reminder: \" + reminder.toString());\n\t\t\n\t\t// pass the reminder as an intent extra\n\t\tIntent intent = new Intent(this, ReminderActivity.class);\n\t\tintent.putExtra(ReminderActivity.EXTRA_REMINDER, reminder);\n\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n\t\tPendingIntent pintent = PendingIntent.getActivity(this, 0, intent, 0);\n\t\t\n\t\tString title = getString(Event.getStringIdForType(reminder.getEventType()));\n\t\tString text = reminder.getDescription();\n\t\t\n\t\t// Build the notification\n\t\tNotification not = new NotificationCompat.Builder(this)\n\t\t\t.setContentTitle(title)\n\t\t\t.setContentText(text)\n\t\t\t.setSmallIcon(R.drawable.ic_stat_notificationlogo)\n\t\t\t.setContentIntent(pintent).build();\n\t\tnot.flags |= Notification.FLAG_AUTO_CANCEL;\n\t\t\n\t\t// get notification on screen\n\t\tNotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\t\tnotificationManager.notify(0, not);\n\t}", "HasClickHandlers getCreateNewButton();", "@Override\n public void onClick(View view) {\n Message message = new Message(null, getDate(), address, mMessageEditText.getText().toString());\n // To create a new message node in the database\n mMessagesDatabaseReference.push().setValue(message);\n // Clear input box\n mMessageEditText.setText(\"\");\n }", "private void mostrarNotificacion(String title, String body)\r\n {\r\n Intent intent = new Intent(this, MainActivity.class);\r\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_ONE_SHOT);\r\n\r\n Uri soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\r\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)\r\n .setSmallIcon(R.mipmap.ic_launcher)\r\n .setContentTitle(title)\r\n .setContentText(body)\r\n .setAutoCancel(true)\r\n .setSound(soundUri)\r\n .setContentIntent(pendingIntent);\r\n\r\n NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\r\n notificationManager.notify(0/*ID de l notificación*/, notificationBuilder.build());\r\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tC2DMessaging.register(getBaseContext(), \"[email protected]\");\t\t\t\n\t\t}", "public void sendNotification(String notifTitle, String notifText) {\n\n }", "private void createNotificationChannel() {\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"ReminderChannel\";\n String description = \"Hello channel\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"notifyAnkit\", name, importance);\n channel.setDescription(description);\n\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n notificationManager.createNotificationChannel(channel);\n }\n }", "public INotification createNotification()\n throws OculusException;", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tnewNote();//新建一条记录\n\t\t\t}", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = MyShardPrefernces.myNotificationChannelName;\n\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(MyShardPrefernces.myNoficataionChannelID, name, importance);\n channel.setDescription(\"Notifications for alert Messenging\");\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void requestToMakeCalendarEntryNotificationBuilder(final String number,\n final String message) {\n\n Intent notifyIntent = new Intent(this, AcceptDetailsForCalendarActivity.class);\n notifyIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n PendingIntent notifyPendingIntent =\n PendingIntent.getActivity(\n this,\n 0,\n notifyIntent,\n PendingIntent.FLAG_UPDATE_CURRENT\n );\n\n // Action for dismiss button\n Intent dismissIntent = new Intent(this, MakeCalendarEntryService.class);\n dismissIntent.setAction(AppConstants.ACTION_DISMISS);\n PendingIntent piDismiss = PendingIntent.getService(this, 0, dismissIntent, 0);\n\n Intent acceptIntent = new Intent(this, MakeCalendarEntryService.class);\n Bundle entryDetailsBundle = new Bundle();\n entryDetailsBundle.putString(AppConstants.SMS_SERVICE_SMS_TEXT, message);\n entryDetailsBundle.putString(AppConstants.SMS_SERVICE_SENDER_PHONE_NUMBER, number);\n acceptIntent.putExtras(entryDetailsBundle);\n\n PendingIntent piAccept = PendingIntent.getService(this, 0, acceptIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder mNotificationBuilder = new NotificationCompat.Builder(this);\n mNotificationBuilder\n .setContentTitle(AppConstants.NOTIFICATION_TILE)\n .setContentText(message)\n .setSmallIcon(R.drawable.ic_launcher)\n .setLights(0xff00ff00, 500, 500)\n .setAutoCancel(true)\n .setStyle(new NotificationCompat.BigTextStyle()\n .bigText(message))\n .addAction(R.drawable.ic_action_accept, getString(R.string.notification_yes),\n piAccept)\n .addAction(R.drawable.ic_action_cancel, getString(R.string.notification_no),\n piDismiss);\n\n // Puts the PendingIntent into the notification builder\n mNotificationBuilder.setContentIntent(notifyPendingIntent);\n issueNotification(mNotificationBuilder);\n }", "private void showNotification() {\n CharSequence text = \"Running\";\n\n // The PendingIntent to launch our activity if the user selects this notification\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, MainActivity.class), 0);\n\n // Set the info for the views that show in the notification panel.\n Notification notification = new Notification.Builder(this)\n //.setSmallIcon(R.drawable.stat_sample) // the status icon\n .setTicker(text) // the status text\n //.setWhen(System.currentTimeMillis()) // the time stamp\n .setContentTitle(\"PodcastFTPService\") // the label of the entry\n .setContentText(text) // the contents of the entry\n .setContentIntent(contentIntent) // The intent to send when the entry is clicked\n .build();\n\n // Send the notification.\n mNM.notify(0, notification);\n }", "@Override\n public void onClick(View view) {\n DialogAddEvent();\n }", "private void createNotificationChannel() {\n mNotificationManager =\r\n (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\r\n\r\n // Notification channels are only available in OREO and higher.\r\n // So, add a check on SDK version.\r\n if (android.os.Build.VERSION.SDK_INT >=\r\n android.os.Build.VERSION_CODES.O) {\r\n\r\n // Create the NotificationChannel with all the parameters.\r\n NotificationChannel notificationChannel = new NotificationChannel\r\n (PRIMARY_CHANNEL_ID,\r\n \"Stand up notification\",\r\n NotificationManager.IMPORTANCE_HIGH);\r\n\r\n notificationChannel.enableLights(true);\r\n notificationChannel.setLightColor(Color.RED);\r\n notificationChannel.enableVibration(true);\r\n notificationChannel.setDescription(\"Daje znać użytkownikowi \" +\r\n \"by wprowadził swoje wydatki\");\r\n mNotificationManager.createNotificationChannel(notificationChannel);\r\n }\r\n }", "private Button constructCreationLinkButton(UUID creationID){\n\n CreationControllable cc = (CreationControllable) builder.getControllers()[1];\n if (!cc.containsCreation(creationID)){\n return null;\n }\n\n String[] creationInfo = cc.viewCreationSummary(creationID, viewer);\n Button b = new Button(creationInfo[0] + \" ( \" + creationInfo[1] + \" ) By: \"+ creationInfo[2]);\n\n b.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n stage.close();\n CreationViewController controller = getCreationBrowserController();\n if (controller == null){\n return;\n }\n controller.linkCreationCallback(creationID);\n stage.show();\n }\n });\n\n return b;\n }", "@RequiresApi(api = Build.VERSION_CODES.O)\n private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.notification);\n String description =getString(R.string.notification);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"lemubitA\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_HIGH;\n\n // crate a channel with high priority\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID_1, name, importance);\n\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n\n// // Create an Intent for the activity you want to start\n// Intent resultIntent = new Intent(this, MainActivity.class);\n// // Create the TaskStackBuilder and add the intent, which inflates the back stack\n// TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);\n// stackBuilder.addNextIntentWithParentStack(resultIntent);\n// // Get the PendingIntent containing the entire back stack\n// PendingIntent resultPendingIntent =\n// stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);\n }\n\n }", "@Override\r\n public void onClick(View v) {\n try {\r\n postDatatoServer(\"reject_request\", notification.toJSON());\r\n fetchDatafromServer(\"notifications\");\r\n } \r\n catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }", "void notificationReceived(Notification notification);", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"Tracker\";\n String description = getString(R.string.app_name);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "public void clickedPresentationNew() {\n\t\t\n\t}", "@Override\r\n\tpublic Notification createEmailNotification() {\n\t\treturn null;\r\n\t}", "public void createActionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\n\t}", "private void showEndOfTripNotification() {\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(\"End of trip\")\n .setContentText(\"Notification text has been sent to \" + myFriendObject.getName());\n int mNotificationId = 001;\n NotificationManager manager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n manager.notify(mNotificationId, mBuilder.build());\n }", "public void createNewButtonClicked(){\n loadNewScene(apptStackPane, \"Create_New_Appointment.fxml\");\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"channel_name\";\n String description =\"channel_description\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"1\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "Order sendNotificationNewOrder(Order order);", "protected void notifyUser()\n {\n }", "public abstract void onCreate(MessageCreateEvent e, List<String> args);", "public void doPositiveClick() {\n\t\t//Shows message that contact added to database. \n\t\tToast.makeText(this, \"Контакт сохранен\", Toast.LENGTH_SHORT).show();\n\t\taddRecord();\n\t}", "private void sendNotificationNewDevice(String messageBody) {\n Log.i(TAG, \"new 알림 메시지\"+ messageBody);\n\n\n Intent intentR = new Intent(this, RegisterActivity.class);\n intentR.putExtra(\"newDevice\",messageBody);\n intentR.addFlags(intentR.FLAG_ACTIVITY_CLEAR_TOP);\n PendingIntent pendingIntentR = PendingIntent.getActivity(this, 0 /* Request code */, intentR,\n PendingIntent.FLAG_ONE_SHOT);\n\n\n String channelId = getString(R.string.default_notification_channel_id);\n Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n\n NotificationCompat.Builder notificationBuilder =\n new NotificationCompat.Builder(this, channelId)\n .setSmallIcon(R.drawable.ic_stat_ic_notification)\n .setContentTitle(getString(R.string.fcm_message))\n .setContentText(messageBody)\n .setAutoCancel(true)\n .setSound(defaultSoundUri)\n .setContentIntent(pendingIntentR);\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n // Since android Oreo notification channel is needed.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel = new NotificationChannel(channelId,\n \"Channel human readable title\",\n NotificationManager.IMPORTANCE_HIGH);\n notificationManager.createNotificationChannel(channel);\n }\n\n notificationManager.notify(0 /* ID of notification */, notificationBuilder.build());\n }", "private void note(Notification n){\r\n\t\tusers.get(n.userID).addNotification(n);\r\n\t\tif (loggedInUsers.contains(n.userID))\r\n\t\t\tcomms.sendMessage(n);\r\n\t}", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"push\";//getString(R.string.channel_name);\n String description = \"pushnotif\";//getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"CHANNEL_ID\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "public void CrearNotificacionChannel(){\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n CharSequence name = \"Notificacion name\";\n NotificationChannel notificationChannel = new NotificationChannel(CHANNEL_ID, name, NotificationManager.IMPORTANCE_DEFAULT);\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n notificationManager.createNotificationChannel(notificationChannel);\n }\n }", "public void buildNotificationSingle(){\n if(arraylisted.size() ==1){\n Product contact = arraylisted.get(0);\n\n String userDept = arraylisted.get(0).getDept();\n String userName = arraylisted.get(0).getName();\n String userLevel = arraylisted.get(0).getLevel();\n String userID = arraylisted.get(0).getuserID();\n String str = notifyliste.get(0).getEmail();\n if(str.length() >=200){\n int k = str.length() / 2;\n str = str.substring(0,k) + \" ...\";\n }\n String prep = userName + System.getProperty(\"line.separator\") + userLevel + \" Level - \" + userDept;\n byte[] userPics = arraylisted.get(0).getBLOB();\n\n //build the actviity intents\n Intent notificationIntent = new Intent(getApplicationContext(),viewNamsn.class);\n\n notificationIntent.putExtra(\"userName\", userName);\n notificationIntent.putExtra(\"userLevel\", userLevel);\n notificationIntent.putExtra(\"userDept\", userDept);\n notificationIntent.putExtra(\"userID\", userID);\n notificationIntent.putExtra(\"userPics\", userPics);\n\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY | Intent.FLAG_ACTIVITY_NEW_TASK);\n PendingIntent pend = PendingIntent.getActivity(getApplicationContext(),0,notificationIntent,PendingIntent.FLAG_UPDATE_CURRENT);\n\n //mBuilder = buildNotification(userPics,prep);\n //design the new custom view\n RemoteViews notificationView = new RemoteViews(\n getApplicationContext().getPackageName(),\n R.layout.activity_custom_notification\n );\n Bitmap bitmap = BitmapFactory.decodeByteArray(userPics,0,userPics.length);\n // notificationView.setImageViewResource(R.id.imagenotileft,R.mipmap.ic_launcher);\n notificationView.setImageViewBitmap(R.id.imagenotileft,bitmap);\n // Locate and set the Text into customnotificationtext.xml TextViews\n notificationView.setTextViewText(R.id.title, (getString(R.string.app_name)));\n notificationView.setTextViewText(R.id.text, prep);\n // notificationView.setTextViewText(R.id.qoute, str);\n\n //go and build the notification\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(getApplicationContext());\n mBuilder.setContentIntent(pend);\n mBuilder.setContentTitle(getString(R.string.app_name));\n mBuilder.setContentText(userName + \" Recently Joined ATBU 37 NAMSSN ELITE E-YEAR BOOK !!!\");\n mBuilder.setTicker(userName + \" Recently Joined ATBU 37 NAMSSN ELITE E-YEAR BOOK !!!\");\n mBuilder.setAutoCancel(true);\n mBuilder.setContent(notificationView);\n mBuilder.setSmallIcon(R.mipmap.ic_app);\n mBuilder.setPriority(2);\n Uri alarmsound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n mBuilder.setSound(alarmsound);\n mBuilder.setLights(Color.RED, 3000, 3000);\n mBuilder.setVibrate(new long[]{1000, 1000, 1000, 1000, 1000 });\n //display the notification\n\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n notificationManager.notify(0123,mBuilder.build());\n }\n // arraylisted.clear();\n }", "void onIssueCreatedEvent(T event);", "@Override\n public void onCreate() {\n super.onCreate();\n\n // initialize helper class\n notificationHelper = new NotificationHelper(this);\n formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "public static void createNotification(MainActivity a, CustomFBProfile profile, IMessagingMetaData meta, HashMap<String, String> loc) {\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(a)\n .setSmallIcon(R.drawable.acba)\n .setContentTitle(\"New Message\")\n .setContentText(meta.getName().toUpperCase()).setTicker(\"New Message!!\");\n NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();\n mBuilder.setStyle(inboxStyle);\n mBuilder.setVibrate(new long[]{2000, 2000, 1000});\n mBuilder.setLights(Color.RED, 3000, 3000);\n mBuilder.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION));\n mBuilder.setAutoCancel(true);\n\n// Creates an explicit intent for an Activity in your app\n Intent resultIntent = a.startMessagingActivityFromAnywhereInApp(profile, meta, loc);\n\n// The stack builder object will contain an artificial back stack for the\n// started Activity.\n// This ensures that navigating backward from the Activity leads out of\n// your application to the Home screen.\n TaskStackBuilder stackBuilder = TaskStackBuilder.create(a);\n// Adds the back stack for the Intent (but not the Intent itself)\n stackBuilder.addParentStack(MainActivity.class);\n// Adds the Intent that starts the Activity to the top of the stack\n stackBuilder.addNextIntent(resultIntent);\n PendingIntent resultPendingIntent =\n stackBuilder.getPendingIntent(\n 0,\n PendingIntent.FLAG_UPDATE_CURRENT\n );\n mBuilder.setContentIntent(resultPendingIntent);\n NotificationManager mNotificationManager =\n (NotificationManager) a.getSystemService(Context.NOTIFICATION_SERVICE);\n// mId allows you to update the notification later on.\n mNotificationManager.notify(1, mBuilder.build());\n }", "private void sendNotification(String title,String date)\n {\n\n NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n Intent intent = new Intent(getApplicationContext(), MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n intent.putExtra(\"msg\", title);\n\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this).setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(title)\n .setStyle(new NotificationCompat.BigTextStyle().bigText(title))\n .setContentText(date)\n .setAutoCancel(true)\n .setVibrate(new long[]{0, 500});\n\n mBuilder.setContentIntent(contentIntent);\n mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());\n\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 }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"channel1\";\n String description = \"First Notification Channel\";\n NotificationChannel channel = new NotificationChannel( \"ch1\", name, NotificationManager.IMPORTANCE_DEFAULT);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void showNotification() {\n // In this sample, we'll use the same text for the ticker and the expanded notification\n CharSequence text = \"Siguiendo el trayecto\";\n\n // The PendingIntent to launch our activity if the user selects this notification\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, InformacionServicio.class), 0);\n\n // Set the info for the views that show in the notification panel.\n Notification notification = new Notification.Builder(this)\n .setSmallIcon(R.drawable.estrella_full) // the status icon\n .setTicker(text) // the status text\n .setWhen(System.currentTimeMillis()) // the time stamp\n .setContentTitle(\"Conductor Serv\") // the label of the entry\n .setContentText(text) // the contents of the entry\n .setContentIntent(contentIntent) // The intent to send when the entry is clicked\n .build();\n\n // Send the notification.\n //mNM.notify(55, notification);\n //startForeground(56,notification);\n\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)\n startMyOwnForeground();\n else\n startForeground(1, notification);\n\n }", "@Override\n public void onClick(View view) {\n createServer();\n Snackbar.make(view, \"Adding server done\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n\n }", "private void showSimpleNotification() {\n Notification notification = new NotificationCompat.Builder(getActivity())\n //Title of the notification\n .setContentTitle(getString(R.string.nf_simple_title))\n //Content of the notification once opened\n .setContentText(getString(R.string.nf_simple_message))\n //This bit will show up in the notification area in devices that support that\n .setTicker(getString(R.string.nf_simple_ticker))\n //Icon that shows up in the notification area\n .setSmallIcon(R.drawable.ic_notify)\n //Icon that shows up in the drawer\n .setLargeIcon(BitmapFactory.decodeResource(getActivity().getResources(), R.drawable.ic_launcher))\n //Set the intent\n .setContentIntent(pendingIntentForNotification())\n //Build the notification with all the stuff you've just set.\n .build();\n\n //Add the auto-cancel flag to make it dismiss when clicked on\n //This is a bitmask value so you have to pipe-equals it.\n notification.flags |= Notification.FLAG_AUTO_CANCEL;\n\n //Grab the NotificationManager and post the notification\n NotificationManager notificationManager = (NotificationManager)\n getActivity().getSystemService(Context.NOTIFICATION_SERVICE);\n\n //Set a tag so that the same notification doesn't get reposted over and over again and\n //you can grab it again later if you need to.\n notificationManager.notify(TAG_SIMPLE_NOTIFICATION, notification);\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n String name = NOTIFICATION_CHANNEL_NAME;\n String descriptionText = NOTIFICATION_CHANNEL_DESCRIPTION;\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(descriptionText);\n\n // Register the channel with the system\n NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void noti1(){\n\t\t/*Contenido de notificacion*/\n\t\tNotification notificacion = new Notification( \n R.drawable.metrans_logo,\n \"Metrans inicializando... Bienvenido\",\n System.currentTimeMillis() );\n\t\t/*Fin de contenido de la notificacion*/\n\t\tPendingIntent intencionPendiente = PendingIntent.getActivity(\n\t\t this, 0, new Intent(this, MainActivity.class), 0);\n\t\tnotificacion.setLatestEventInfo(this, \"Somos tan chingones\",\n\t\t \"que tenemos notificaciones aqui\", intencionPendiente);\n\t\n\t\t nm1.notify(ID_NOTIFICACION_CREAR, notificacion); //Enviamos la notificacion al status bar\n\t\tnotificacion.defaults |= Notification.DEFAULT_VIBRATE; //Agregando algo de vibracion... Espero y funcione\n\t\t\n\t}", "public void notifyCreation() {\n Player targetPlayer = this.getTarget().getPlayerReference(Player.class),\n senderPlayer = this.getToTeleport().getPlayerReference(Player.class);\n\n if (targetPlayer == null || senderPlayer == null) {\n return;\n }\n\n MainData.getIns().getMessageManager().getMessage(\"TPA_SENT\").sendTo(senderPlayer);\n\n if (this.type == TeleportType.TPA) {\n MainData.getIns().getMessageManager().getMessage(\"TPA_REQUESTED\")\n .format(\"%player%\", getToTeleport().getNameWithPrefix()).sendTo(targetPlayer);\n } else if (this.type == TeleportType.TPHERE) {\n MainData.getIns().getMessageManager().getMessage(\"TPHERE_REQUESTED\")\n .format(\"%player%\", getToTeleport().getNameWithPrefix()).sendTo(targetPlayer);\n }\n\n }", "private void showNotificationCourse(Bundle data) {\n\n/* try {\n int unreadNotificationCount = Integer.valueOf(data.getString(\"total_unread_notification\"));\n NotificationCountEventBus.Event event = new NotificationCountEventBus.Event(unreadNotificationCount);\n NotificationCountEventBus.getInstance().post(event);\n } catch (Exception ignored) {\n\n }*/\n\n // check the type_push from data and navigate to activity\n Intent intent = navigateNotification(data);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(this, notificationId, intent,\n PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_ONE_SHOT);\n\n\n Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(getNotificationIcon())\n .setContentTitle(data.getString(\"title\"))\n .setContentText(data.getString(\"body\"))\n .setAutoCancel(true)\n .setSound(defaultSoundUri)\n .setContentIntent(pendingIntent);\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n notificationManager.notify(notificationId++, notificationBuilder.build());\n }" ]
[ "0.721405", "0.6964809", "0.6796448", "0.6751628", "0.66904974", "0.6604897", "0.65217805", "0.64909816", "0.64634806", "0.6453081", "0.6445975", "0.64245844", "0.6399092", "0.6380011", "0.63339424", "0.63329434", "0.6297195", "0.62849313", "0.6227557", "0.6219439", "0.6206784", "0.6176917", "0.6169454", "0.61670107", "0.6151206", "0.6142341", "0.6126252", "0.6110372", "0.605377", "0.5968287", "0.5958608", "0.5956505", "0.5944611", "0.59346145", "0.59301543", "0.59128416", "0.59118354", "0.5902894", "0.59027237", "0.58934957", "0.58834016", "0.5872598", "0.5871656", "0.58623964", "0.58497673", "0.5845045", "0.5842059", "0.58398044", "0.58391154", "0.5825251", "0.58080155", "0.5807122", "0.5798511", "0.5798091", "0.5784743", "0.57727444", "0.5771172", "0.57693756", "0.5763776", "0.5761344", "0.57601917", "0.5758556", "0.57528186", "0.57509863", "0.57500535", "0.57473856", "0.57460105", "0.57441235", "0.5743092", "0.5742789", "0.57406473", "0.5739702", "0.57362205", "0.5731998", "0.57310075", "0.5727852", "0.5712434", "0.571072", "0.5708439", "0.5705859", "0.57041323", "0.570259", "0.57010555", "0.5699594", "0.5690141", "0.5687411", "0.5678149", "0.56776583", "0.5676317", "0.5674647", "0.5673114", "0.56707513", "0.56683", "0.56654495", "0.5665351", "0.5663927", "0.5658268", "0.5656962", "0.5653903", "0.5652345", "0.5641508" ]
0.0
-1
/ Calculate max length of subarray.
public int minOperations(int[] nums, int x) { Map<Integer, Integer> prefixSumMap = new HashMap<>(); prefixSumMap.put(nums[0], 0); for(int i=1;i<nums.length; i++) { nums[i]=nums[i-1] + nums[i]; prefixSumMap.put(nums[i], i); } int targetSubArray = nums[nums.length-1] - x; if(targetSubArray == 0) { return nums.length; } int res = 0; for(int i =0; i<nums.length; i++) { if(prefixSumMap.containsKey(targetSubArray)) { res = Math.max(res, prefixSumMap.get(targetSubArray)+1); } Integer target = prefixSumMap.get(nums[i] + targetSubArray); if(target != null) { res = Math.max(res, target -i); } } if(res == 0) { return -1; } return nums.length-res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int maxSubArrayLen(int[] nums, int k) {\n if(nums == null || nums.length == 0) {\n return 0;\n }\n int maxLength = 0;\n int[] sums = new int[nums.length];\n sums[0] = nums[0];\n HashMap<Integer, Integer> map = new HashMap<>();\n map.put(sums[0], 0);\n for(int i = 1; i < nums.length; i++) {\n sums[i] = sums[i - 1] + nums[i];\n map.put(sums[i], i);\n if(sums[i] == k && i + 1 > maxLength) {\n maxLength = i + 1;\n }\n Integer index = map.get(sums[i] - k);\n if(index == null) {\n continue;\n }\n int length = i - index; // length = i - (index + 1) + 1 = i - index\n if(length > maxLength) {\n maxLength = length; \n }\n }\n return maxLength;\n }", "public static int maxSubArray(final List<Integer> a) {\n\t\tint size = a.size();\n\t\tint max_so_far = Integer.MIN_VALUE, max_ending_here = 0;\n\t\tint position = 0;\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tmax_ending_here = max_ending_here + a.get(i);\n\t\t\tif (max_so_far < max_ending_here)\n\t\t\t\tmax_so_far = max_ending_here;\n\t\t\tif (max_ending_here < 0)\n\t\t\t\tmax_ending_here = 0;\n\t\t}\n\t\treturn max_so_far;\n\t}", "private static int maximumSubarray(int[] array) {\n\t\tint max = array[0];\n for (int i = 0; i < array.length; i++)\n {\n int sum = 0;\n for (int j = i; j < array.length; j++)\n {\n sum += array[j];\n if (sum > max)\n max = sum;\n }\n }\n return max; \n\t}", "private static int MaxSubarraySum(int[] a) {\n\t\t\n\t\tint max_so_for =Integer.MIN_VALUE;\n\t\tint max_ending_here = 0;;\n\t\t\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tmax_ending_here = max_ending_here + a[i];\n\t\t\t\n\t\t\tif(max_so_for < max_ending_here )\n\t\t\t\tmax_so_for = max_ending_here;\n\t\t\tif(max_ending_here < 0)\n\t\t\t\tmax_ending_here = 0;\n\t\t}\n\t\t\n\t\treturn max_so_for;\n\t}", "public int sizeOfSubArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SUB$2);\n }\n }", "public static int maxSubArrayLen(int[] nums, int k) {\n Map<Integer, Integer> map = new HashMap<>();\n int sum = 0, maxLen = 0;\n for (int i = 0; i < nums.length; i++) {\n sum += nums[i];\n\n if (!map.containsKey(sum)) {\n map.put(sum, i);\n }\n\n if (sum == k) {\n maxLen = i + 1;\n } else {\n int diff = sum - k;\n if (map.containsKey(diff)) {\n maxLen = Math.max(maxLen, i - map.get(diff));\n }\n }\n }\n return maxLen;\n }", "public int maxSubArray(int[] nums) {\n int maxNow = Integer.MIN_VALUE, maxEnd = 0;\n for (int i = 0; i < nums.length; i++) {\n maxEnd = maxEnd + nums[i];\n if (maxNow < maxEnd) {\n maxNow = maxEnd;\n }\n if (maxEnd < 0) {\n maxEnd = 0;\n }\n }\n return maxNow;\n\n }", "public int getMaxSize()\r\n\t{\r\n\t\tSystem.out.print(\"The Max size of the Array is \");\r\n\t\treturn MAXSIZE;\r\n\t}", "public int getMaxSize(){\n\t\treturn ds.length;\n\t}", "abstract int calculateMaximumSize(int axis);", "public static int maxSubArray(int[] nums) {\n int[] max_subarray= new int[nums.length];\n int max_sum=0;\n max_subarray[0]=nums[0];\n for (int i=1;i<nums.length;i++){\n max_subarray[i]=Math.max(max_subarray[i-1]+nums[i],nums[i]);\n max_sum=Math.max(max_subarray[i],max_sum);\n }\n System.out.println(Arrays.toString(max_subarray));\n return max_sum;\n }", "public int longestSubarray(int[] A, int limit) {\n TreeMap<Integer, Integer> m = new TreeMap<>();\n int res = 0;\n\n for (int left = 0, right = 0; right < A.length; right++) {\n m.put(A[right], 1 + m.getOrDefault(A[right], 0));\n\n while (m.lastEntry().getKey() - m.firstEntry().getKey() > limit) {\n m.put(A[left], m.get(A[left]) - 1);\n if (m.get(A[left]) == 0) {\n m.remove(A[left]);\n }\n left++;\n }\n res = Math.max(res, right - left + 1);\n }\n\n return res;\n }", "public int getMaxListLength();", "int getArrayLength();", "int getArrayLength();", "long arrayLength();", "public int maxSubArray(int[] nums) {\n return helper(nums, 0, nums.length - 1);\n }", "public static int maxLength(String arr[])\r\n\t{\r\n\t\tint maxLength = 0;\r\n\t\tfor (String aux : arr) {\r\n\t\t\tif (aux.length() > maxLength)\r\n\t\t\t\tmaxLength = aux.length();\r\n\t\t}\r\n\t\treturn maxLength;\r\n\t}", "public abstract long getMaxSize();", "public static int maxSubArray(int[] arr) {\n\n int arr_size = arr.length;\n int max_curr = Integer.MIN_VALUE, max_global = 0;\n\n for (int i = 0; i < arr_size; ++i)\n {\n max_global += arr[i];\n if (max_curr < max_global)\n max_curr = max_global;\n if (max_global < 0)\n max_global = 0;\n }\n return max_curr;\n }", "public int maxLen() {\n if (compositions == null) {\n return Math.max(maxLen(getAllele(0)), maxLen(getAllele(1)));\n } else {\n if (compositions.isEmpty())\n return 0;\n int maxLen = compositions.get(0).maxLen();\n for (Variant c : compositions) {\n maxLen = Math.max(maxLen, c.maxLen());\n }\n return maxLen;\n }\n }", "public Integer getMaxLength() { \n\t\treturn getMaxLengthElement().getValue();\n\t}", "public static int maximumSubArray(int arr[])\n\t{\n\t\tint sum=arr[0];\n\t\tint maxSum = arr[0];\n\t\tint n = arr.length;\n\t\tfor(int i=1;i<n;i++)\n\t\t{\n\t\t\tsum = Math.max(sum+arr[i], arr[i]);\n\t\t\t\n\t\t\tmaxSum = Math.max(maxSum, sum);\n\t\t}\n\t\t\n\t\treturn maxSum;\n\t}", "private static int maxSubSumN(int[] a) {\n int maxSum = 0;\n int thisSum = 0;\n\n for (int i = 0; i < a.length; i++) {\n thisSum += a[i];\n\n if (thisSum > maxSum) {\n maxSum = thisSum;\n } else if (thisSum < 0) {\n thisSum = 0;\n }\n }\n\n return maxSum;\n }", "public static int findMaxSubarray(int[] array) {\r\n\t\tint max = Integer.MIN_VALUE;\r\n//\t\tint index = 0;\r\n\t\tint currMax = 0;\r\n\t\tfor(int v : array) {\r\n\t\t\tcurrMax += v;\r\n\t\t\tif(currMax > max) {\r\n\t\t\t\tmax = currMax;\r\n\t\t\t} \r\n\t\t\tif(currMax < 0) {\r\n\t\t\t\tcurrMax = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn max;\r\n\t}", "public abstract int getMaxIntermediateSize();", "public static int maxSubArraySum(int a[]) {\n\t\tint max_so_far = a[0];\n\t\tint curr_max = a[0];\n\n\t\tfor (int i = 1; i < a.length; i++) {\n\t\t\tcurr_max = Math.max(a[i], curr_max + a[i]);\n\t\t\tmax_so_far = Math.max(max_so_far, curr_max);\n\t\t}\n\t\treturn max_so_far;\n\t}", "public int maxSubArray(int[] A) {\n\t\tint n = A.length;\n\t\tint left = A[0];\n\t\tint max = A[0];\n\t\tfor (int i = 1; i < n; ++i) {\n\t\t\tif (left < 0)\n\t\t\t\tleft = A[i];\n\t\t\telse\n\t\t\t\tleft = left + A[i];\n\t\t\tmax = Math.max(max, left);\n\t\t}\n\t\treturn max;\n\t}", "public int maxSubArraySum(int[] nums) {\n int maxSoFar = 0;\n int maxEndingHere = 0;\n\n for (int i = 0; i < nums.length; i++) {\n maxEndingHere = maxEndingHere + nums[i];\n if (maxEndingHere > maxSoFar)\n maxSoFar = maxEndingHere;\n if (maxEndingHere < 0)\n maxEndingHere = 0;\n }\n return maxSoFar;\n }", "public int maxSubArray(int[] nums) {\n int[] dp = new int[nums.length];\n dp[0] = nums[0];\n int res = nums[0];\n for (int i = 1; i < nums.length; i++) {\n dp[i] = nums[i] + (dp[i - 1] < 0 ? 0 : dp[i - 1]);\n res = Math.max(res, dp[i]);\n }\n return res;\n }", "int getMaxSize();", "public static int maxLength(String arr[])\n {\n int maxL = 0;\n for (String s:arr) {\n if(s.length()>maxL){\n maxL=s.length();\n }\n }\n return maxL;\n }", "public int maxSubArray(int[] A) {\n if(A==null||A.length==0)\n return 0;\n int maxSub = A[0];\n int sum=A[0];\n for(int i=1;i<A.length;i++){\n if(sum<0)\n sum=0;\n sum+=A[i];\n maxSub=Math.max(maxSub,sum); \n }\n return maxSub;\n }", "private static int maxSubSumN2(int[] a) {\n int maxSum = 0;\n\n for (int first = 0; first < a.length; first++) {\n int thisSum = 0;\n for (int i = first; i < a.length; i++) {\n thisSum += a[i];\n\n if (thisSum > maxSum) {\n maxSum = thisSum;\n }\n }\n }\n\n return maxSum;\n }", "static int maxSubArraySum(int a[], int size)\n {\n int Cur_Max = a[0];\n int Prev_Max = a[0];\n \n for (int i = 1; i < size; i++)\n {\n //we want to know if the summition is increassing or not\n Prev_Max = Math.max(a[i], Prev_Max+a[i]);\n //Take Decision to change the value of the largest sum or not\n Cur_Max = Math.max(Cur_Max, Prev_Max);\n }\n return Cur_Max;\n }", "public static void main(String[] args) {\n\t\tint[] nums = {-2,1,-3,4,-1,2,1,-5,4} ;\n\t\t\n\t\tSolution_Maximum_Subarray_53 s = new Solution_Maximum_Subarray_53() ;\n\t\tint ans = s.maxSubArray(nums) ;\n\t\t\n\t\tSystem.out.println(\"ans: \" + ans) ;\n\t}", "public static int maxSubArray(int[] nums) {\n //write your code here\n \tint leg = nums.length;\n \n \t\n \tint big = 0; //checking if numbers are big?\n \tint fin = 0; //final print number\n \t//int num = 0;\n \tfor (int i =0; i < leg; i ++) {\n \t\t//big = big + nums[i];\n \t\t//if (big < 0 ) {\n \t\t//\tbig = 0;\n \t\t//} else if (big > 0) {\n \t\t//\tbig += nums[i];\n \t\t//\tbig = fin;\n \t\t//}\n \t\t//num = num + nums[i];\n \t\tbig += nums[i]; // and num[i] to the big\n \t\t//if (big > fin) {\n \t\t//\tfin = big; \n \t\t//}\n \t\tif (fin < big) { //check if final is bigger than the big\n \t\t\tfin = big; //fin should be = to big\n \t\t} //else {\n \t\t\t//fin = big;\n \t\telse if (big < 0) { //if big is less than 0, like negative number\n \t\t\tbig = 0; //make big = to 0 \n \t\t} \n \t\n \t}\n\t\treturn fin;\n \t\n }", "static int max(int ropeLen) {\n\t\tint[] dp = new int[ropeLen + 1];\n\t\tdp[0] = 1;\n\t\tfor (int i = 1; i <= ropeLen; i++) {\n\t\t\tint max = Integer.MIN_VALUE;\n\t\t\tfor (int j = 0; j < i; j++) {\n\t\t\t\tmax = Math.max(max, dp[j] * (i - j));\n\t\t\t}\n\t\t\tdp[i] = max;\n\t\t}\n\t\treturn dp[ropeLen];\n\t}", "static int[] maxSubarray(int[] arr) {\n\n if(arr == null || arr.length == 0)\n return new int[0];\n\n int sum = arr[0];\n int subArrayMax = Integer.MIN_VALUE;\n for(int i=1; i<arr.length; i++) {\n\n if(sum <= 0) {\n sum = 0;\n }\n\n sum+= arr[i];\n\n if(sum > subArrayMax) {\n subArrayMax = sum;\n }\n }\n\n subArrayMax = Math.max(subArrayMax, sum);\n\n Arrays.sort(arr);\n\n int subSeqMax = 0;\n if(arr[arr.length-1] < 0) {\n subSeqMax = arr[arr.length-1];\n } else {\n for(int a : arr){\n subSeqMax+= a < 0 ? 0 : a;\n }\n }\n\n return new int[]{subArrayMax, subSeqMax};\n }", "public int maxSubArray(int[] nums) {\n if (nums.length == 0) return 0;\n int maxSum = nums[0];\n int sum = maxSum;\n for (int i = 1; i < nums.length; i++) {\n sum += nums[i];\n if (nums[i] > sum) {\n sum = nums[i];\n }\n if (sum > maxSum) {\n maxSum = sum;\n }\n }\n return maxSum;\n\n }", "public int maxSubArray(int[] nums) {\n int maxValue = Integer.MIN_VALUE;\n int currentSum = 0;\n for(int i = 0; i < nums.length;i++){\n currentSum = Math.max(currentSum + nums[i],nums[i]);\n maxValue = Math.max(maxValue,currentSum);\n }\n return maxValue;\n }", "private static int LargestSubArraySum(int[] array) {\n\t\tint maximumSum=0;\n\t\tfor(int i=0; i< array.length; i++) {\n\t\t\tfor(int j=i; j < array.length; j++) {\n\t\t\t\t\n\t\t\t\tint sum=0;\n\t\t\t\tfor(int k=i; k<= j; k++) \n\t\t\t\t\tsum += array[k];\n\t\t\t\t\n\t\t\t\tmaximumSum=Math.max(maximumSum, sum);\n\t\t\t} \n\t\t}\n\t\treturn maximumSum;\n\t}", "private int FindMaxSum(int[] arr, int length) {\r\n\t\t\r\n\t\tint incl = arr[0];\r\n\t\tint excl = 0;\r\n\t\tint excl_new = 0;\r\n\t\t\r\n\t\tfor(int i = 1;i<arr.length;i++)\r\n\t\t{\r\n\t\t\texcl_new = (incl > excl) ? incl : excl;\r\n\t\t\t \r\n /* current max including i */\r\n incl = excl + arr[i];\r\n excl = excl_new;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn excl>incl?excl:incl;\r\n\t}", "public int maxSubArray1(int[] A) {\n\t\tif(A == null || A.length == 0)\n\t\t\treturn 0;\n\t\treturn divide_conquer(A, 0, A.length-1);\n\t}", "public static int[] maxSumInSubArray(int array[]) {\n int maxSoFar = array[0];\n int maxEndingHere = array[0];\n int startIndex = 0;\n int endIndex = 0;\n int j = 1;\n for (; j < array.length; j++) {\n int val = array[j];\n if (val >= val + maxEndingHere) {\n maxEndingHere = val;\n startIndex = j;\n } else {\n maxEndingHere += val;\n }\n if (maxSoFar < maxEndingHere) {\n maxSoFar = maxEndingHere;\n endIndex = j;\n }\n }\n return Arrays.copyOfRange(array, startIndex, endIndex + 1);// Make copyofRange to copy new max subsequence array\n }", "public int maxSubArray(int[] nums) {\n if (nums == null || nums.length == 0) return 0;\n int max = Integer.MIN_VALUE, min = 0;\n int sum = 0;\n for (int i = 0; i < nums.length; i++){\n sum += nums[i];\n max = Math.max(max, sum - min);\n min = Math.min(min, sum);\n }\n return max;\n }", "public int maxSubArray3(int[] nums) {\n int length = nums.length;\n //dp[i]表示数组开始索引为i的子数组的和\n int[] dp = new int[length];\n int max = nums[0] - 1;\n for (int i = 0; i < length; i++) {\n for (int j = i; j < length; j++) {\n int sum = dp[i] + nums[j];\n dp[i] = sum;\n if (max < sum) {\n max = sum;\n }\n }\n }\n return max;\n }", "public int maxSubArray(int[] nums) {\n\t\tint max;\n\n\t\tif (nums.length == 0)\n\t\t\tmax = 0;\n\t\telse {\n\t\t\tmax = nums[0];\n\n\t\t\tint curMax = nums[0];\n\t\t\tfor (int idxEnd = 1; idxEnd < nums.length; idxEnd++) {\n\t\t\t\tint curr = nums[idxEnd];\n\t\t\t\tcurMax = curMax + curr;\n\t\t\t\tif (curr > curMax) {\n\t\t\t\t\tcurMax = curr;\n\t\t\t\t}\n\n\t\t\t\tif (curMax > max) {\n\t\t\t\t\tmax = curMax;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(max);\n\t\treturn max;\n\t}", "public static int maxSub0(int[] A) {\n int maxNow = 0;\n int maxAll = 0;\n int size = A.length;\n for (int i = 0; i < size; i++) {\n maxNow = Math.max(0, maxNow + A[i]);\n maxAll = Math.max(maxAll, maxNow);\n }\n return maxAll;\n }", "public int maxSubArray(final List<Integer> A) {\n int n = A.size();\n int ans = A.get(0),curr = A.get(0);\n \n for(int i=1;i<n;i++){\n curr = Math.max(A.get(i),A.get(i)+curr);\n ans = Math.max(curr,ans);\n }\n return ans;\n }", "public static void main(String[] args) {\n MaximumSubarray subarray = new MaximumSubarray();\n int[] data = {-2,1,-3,4,-1,2,1,-5,4};\n System.out.println(subarray.maxSubArray(data));\n }", "public int getMaximalSize() {\n return maximalSize;\n }", "public Integer getMaxLength() {\n\t\treturn maxLength;\n\t}", "public static int maxSubArray1(int[] nums) {\n if (nums == null || nums.length == 0) return 0;\n int sum = 0;\n int max = nums[0];\n for (int i = 0; i < nums.length; i++) {\n sum = 0;\n for (int j = i; j < nums.length; j++) {\n sum += nums[j];\n if (max < sum) {\n max = sum;\n }\n }\n }\n System.out.println(max);\n return max;\n }", "public int getMaxLength() {\r\n return _maxLength;\r\n }", "public int maxLen(final int ind) {\n return (ind <= 0 || ind > alts.length) ? 0 : Math.max(referenceAlleleLength, alts[ind - 1].length());\n }", "public int getMaxLength(){\n return this.maxLength;\n }", "public int findMaxLength(int[] nums) {\n int[] arr = new int[2*nums.length+1];\n Arrays.fill(arr, -2);\n arr[nums.length] = -1;\n int max = 0;\n int count=0;\n for(int i=0;i<nums.length;i++){\n count += (nums[i]==0?-1:1);\n if(arr[count+nums.length]>=-1){\n max = Math.max(max,i-arr[count+nums.length]);\n }else{\n arr[count+nums.length]= i;\n }\n }\n return max;\n }", "public abstract int getMaxLength();", "public int getMaxLength();", "public int getLength(){\r\n\t \treturn arraySize;\r\n\t }", "int maxSubarraySum(int arr[], int n)\r\n {\r\n int maxSoFar = Integer.MIN_VALUE;\r\n int currMax = 0;\r\n for(int i = 0; i < n; i++) {\r\n currMax = Math.max(arr[i], currMax+arr[i]);\r\n maxSoFar = Math.max(currMax, maxSoFar);\r\n }\r\n return maxSoFar;\r\n }", "public int findLongestWordLength() {\n int longestWordLength = wordsArray[0].length();\n\n for (int i = 1; i < wordsArray.length; i++) {\n if (wordsArray[i].length() > wordsArray[i - 1].length()) {\n longestWordLength = wordsArray[i].length();\n }\n }\n if (summationWord.length() > longestWordLength) {\n longestWordLength = summationWord.length();\n }\n return longestWordLength;\n }", "private int getMaxSize() {\r\n return PropUtils.getValue(sizeLimitProp, DEFAULT_MAX_SIZE);\r\n }", "public static int maxSub(int[] A) {\n int maxNow = A[0];\n int maxAll = A[0];\n int size = A.length;\n for (int i = 1; i < size; i++) {\n maxNow = Math.max(A[i], maxNow + A[i]);\n// System.out.println(\"i = \" + i + \": max now:\" + maxNow);\n maxAll = Math.max(maxAll, maxNow);\n// System.out.println(\"i = \" + i + \": max all:\" + maxAll);\n }\n return maxAll;\n }", "static int maxSubsetSum(int[] arr) {\n int n = arr.length;\n int[] dp = new int[n];\n dp[0] = arr[0];\n dp[1] = Math.max(arr[0], arr[1]);\n\n for (int i = 2; i < n; ++i) {\n dp[i] = Math.max(dp[i - 2], Math.max(dp[i - 2] + arr[i], Math.max(dp[i - 1], arr[i])));\n }\n\n return dp[n - 1];\n }", "static List<Integer> getMax(int[] arr, int len){\n\t\tList<Integer> res = new ArrayList<>();\n\t\tif(arr == null || arr.length == 0 || len == 0){\n\t\t\treturn res;\n\t\t}\n\t\tif(arr.length <= len){\n\t\t\tres.add(getMax(arr, 0, arr.length-1));\n\t\t\treturn res;\n\t\t}\n\t\tint i =0, j = len-1, max = 0;\n\t\twhile(j < arr.length){\n\t\t\tif(max == 0){\n\t\t\t\tmax = getMax(arr, i, j);\n\t\t\t\tres.add(max);\n\t\t\t}\n\t\t\telse if(arr[j] > max){\n\t\t\t\tmax = arr[j];\n\t\t\t\tres.add(max);\n\t\t\t}\n\t\t\telse if(arr[i] == max){\n\t\t\t\tres.add(max);\n\t\t\t\tmax = 0;\n\t\t\t}else{\n\t\t\t\tres.add(max);\n\t\t\t}\n\t\t\ti++;\n\t\t\tj++;\n\t\t}\n\t\treturn res;\n\t}", "protected abstract int getMaxDesiredSize();", "public static int maxSubArrayO1(int[] nums) {\n int maxSum=nums[0];\n int sum=nums[0];\n for(int i=1;i<nums.length;i++){\n sum=sum+nums[i];\n sum=Math.max(sum,nums[i]);\n maxSum= Math.max(sum,maxSum);\n }\n return maxSum;\n }", "public int getMaximumSize() {\n return maximumSize;\n }", "public int getMaxLength() {\n return maxLength;\n }", "public int length() { return 1+maxidx; }", "private static int maxSubSumN3(int[] a) {\n int maxSum = 0;\n\n for (int first = 0; first < a.length; first++) {\n for (int last = first; last < a.length; last++) {\n int thisSum = 0;\n\n for (int i = first; i <= last; i++)\n thisSum += a[i];\n\n if (thisSum > maxSum) {\n maxSum = thisSum;\n }\n }\n }\n\n return maxSum;\n }", "final int getMaximumSize(int axis) {\n if (max == UNSET) {\n max = constrain(calculateMaximumSize(axis));\n }\n return max;\n }", "public static int maxSubArray1(int[] nums) {\n if (nums.length == 1) {\n return nums[0];\n }\n\n int max = nums[0], maxSubArrayPre = nums[0];\n\n for (int i = 1; i < nums.length; i++) {\n int temp = maxSubArrayPre + nums[i];\n // Kadane algorithms\n maxSubArrayPre = Math.max(temp, nums[i]);\n if (maxSubArrayPre > max) {\n max = maxSubArrayPre;\n }\n }\n\n return max;\n }", "public static void main(String[] args) {\n int[] input = {-1};\n ArrayMaxSub arrayMaxSub = new ArrayMaxSub();\n int ret = arrayMaxSub.maxSubArray(input);\n System.out.println(\"ret : \" + ret);\n }", "int maxSubarraySum(int arr[], int n){\n \n // Your code here\n int max = Integer.MIN_VALUE, curr = 0; \n \n for (int i = 0; i < n; i++) { \n curr = curr + arr[i]; \n if (max < curr) \n max = curr; \n if (curr < 0) \n curr = 0; \n } \n return max;\n }", "public int maxSubArray2(int[] nums) {\n int res = nums[0];\n int sum = nums[0];\n for (int i = 1; i < nums.length; i++) {\n sum = Math.max(nums[i], sum + nums[i]);\n res = Math.max(res, sum);\n }\n return res;\n }", "public static int size_max() {\n return (8 / 8);\n }", "public int getMaxSize()\n {\n return m_MaxSize;\n }", "public static int maxSubsum(int[] arr) {\n int minInArray = 0;\n int maxInArray = 0;\n int minSoFar = minInArray;\n int maxSoFar = maxInArray;\n int sum = 0;\n\n for (int i = 0; i < arr.length; i++) {\n sum += arr[i];\n minSoFar += arr[i];\n maxSoFar += arr[i];\n\n if (minSoFar > 0) {\n minSoFar = 0;\n }\n\n if (maxSoFar < 0) {\n maxSoFar = 0;\n }\n\n if (minInArray > minSoFar) {\n minInArray = minSoFar;\n }\n\n if (maxInArray < maxSoFar) {\n maxInArray = maxSoFar;\n }\n }\n\n return Math.max(sum - minInArray, maxInArray);\n }", "public int getMaxElements() {\n return maxElements;\n }", "static void maxSubArraySum1(int a[], int size)\n {\n int max_so_far = Integer.MIN_VALUE,\n max_ending_here = 0,start = 0,\n end = 0, s = 0;\n\n for (int i = 0; i < size; i++)\n {\n max_ending_here += a[i];\n\n if (max_so_far < max_ending_here)\n {\n max_so_far = max_ending_here;\n start = s;\n end = i;\n }\n\n if (max_ending_here < 0)\n {\n max_ending_here = 0;\n s = i + 1;\n }\n }\n System.out.println(\"Maximum contiguous sum is \" + max_so_far);\n System.out.println(\"Starting index \" + start);\n System.out.println(\"Ending index \" + end);\n }", "public static int maxSumContiniousSubArray(int[] data) {\n\t\tint[] sums = new int[data.length];\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tsum += data[i];\n\t\t\tsum = Math.max(0, sum);\n\t\t\tsums[i] = sum;\n\t\t}\n\t\treturn Arrays.stream(sums).max().getAsInt();\n\t}", "private static int getLargestBoundedArea(char[][] rowsArray) {\n\t HashMap<Integer, ArrayList<String>> boundedRegionPointsMap = getBoundedRegionsPlotting(rowsArray);\n\n\t boundedRegionPointsMap = checkAndMergeIntersectedPoints(boundedRegionPointsMap);\n\n\t int largestSize = -1;\n\t \n\t // Finally, iterate over the bounded regions to get the region with maximum number of points.\n\t for (Integer key : boundedRegionPointsMap.keySet()) {\n\t ArrayList<String> boundedPointsList = boundedRegionPointsMap.get(key);\n\t logInfo(\"getLargestBoundedArea() | Region key = \" + key + \" Region points = \" + boundedPointsList.size());\n\t if (largestSize < boundedPointsList.size()) {\n\t largestSize = boundedPointsList.size();\n\t }\n\t }\n\t \n\t logDebug(\"getLargestBoundedArea() | Largest region size = \"+largestSize);\n\t return largestSize;\n\t}", "public void setMaxArray(int max_array_elements)\n {\n this.max_array_elements = max_array_elements;\n }", "public static void maxSubArray(Integer[] arr){\n\n int maxSum = arr[0]; // start with smallest number\n int i =0;\n int j =1;\n\n while (j< arr.length){\n if((maxSum + arr[j] > maxSum) ){\n maxSum = arr[j];\n i++;\n j++;\n }\n\n }\n\n }", "int maxLen(int arr[], int n) \n {\n \tHashMap< Integer,Integer> map =new HashMap<Integer, Integer>();\n \t\n \t//set zero's as -1\n \tfor(int i= 0; i<n;i++)\n \t{\n \t\tif(arr[i]== 0){arr[i] = -1;}\n \t}\n \t\n \tint sum =0, maxLen =0;\n \t\n \tfor(int i= 0; i<n;i++)\n \t{\n \t\tsum += arr[i];\n \t\tif(sum == 0)\n \t\t{\n \t\t\tmaxLen = i+1;\n \t\t} \n \t\t\n \t\tif(map.containsKey(sum))\n \t\t{ maxLen = Math.max(maxLen, (i -map.get(sum))); \n \t\t}\n \t\telse{ map.put(sum, i);}\n \t}\n \t\n \treturn maxLen;\n }", "public static void main(String[] args) {\n\t\tint[] arr = {1,2,3,4,5};\n\t\tSystem.out.println(minSubArrayLen(11, arr));\n\t}", "public static int lengthOfLongestSubstring(String s) {\n int[] characters = new int[127];\n int longestSubstringLength = 0, subarrayStart = 0;\n \n for (int i = 0; i < s.length(); i++) {\n int characterValue = (int) s.charAt(i);\n if (characters[characterValue] != 0 && characters[characterValue] > subarrayStart) {\n subarrayStart = characters[characterValue];\n }\n\n characters[characterValue] = i + 1;\n\n int currentSubarrayLength = (i - subarrayStart) + 1;\n if (currentSubarrayLength > longestSubstringLength) {\n longestSubstringLength = currentSubarrayLength;\n }\n }\n \n return longestSubstringLength;\n }", "public static int circularArrayMaxSubarraySum(int[] arr) {\n\t\tint ceNotWrapping = kadane(arr);\n\n\t\t// Case 2 : CE are wrapping\n\t\tint totalSum = 0;\n\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\ttotalSum += arr[i];\n\t\t\tarr[i] = -arr[i];\n\t\t}\n\n\t\tint nonContributingElementSum = kadane(arr);\n\n\t\tint ceWrapping = totalSum + nonContributingElementSum;\n\n\t\treturn Math.max(ceNotWrapping, ceWrapping);\n\n\t}", "public int arraySize();", "public int getLongest(int[] sequence) {\n\t\treturn sequence.length;\n\t}", "public static int getMaxSize(){\n\t\treturn 2* 4;\n\t}", "public int maxEntrySize() {\n\t\tint max = Integer.MIN_VALUE;\n\t\tfor (int i = 0; (i < table.length); i++) {\n\t\t\tif (table [i] != null) {\n\t\t\t\tif (table[i].size() > max)\n\t\t\t\t\tmax = table[i].size();\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}", "public int maxArea(int[] height);", "public int getMaxLength() {\r\n\t\treturn fieldMaxLength;\r\n\t}", "private static int findMax(int[] A, int len, int[] dp) {\r\n\t\t\r\n\t\tif(len < 0)\r\n\t\t\treturn 0;\r\n\t\t\t\r\n\t\tif(len == 0)\r\n\t\t\treturn A[0];\r\n\t\t\r\n\t\tif(len == 1)\r\n\t\t\treturn Math.max(A[0], A[1]);\r\n\t\t\r\n\t\tif(dp[len] != 0)\r\n\t\t\treturn dp[len];\r\n\t\t\r\n\t\tdp[len] = Math.max((A[len] + findMax(A, len-2, dp)), findMax(A, len-1, dp));\r\n\t\treturn dp[len];\r\n\t\t\r\n\t}", "public int maxSubArray_improve(int[] nums) {\n if (nums==null || nums.length==0)\n return 0;\n int len = nums.length, res = nums[0];\n int cur = nums[0];\n for (int i = 1; i<len; i++) {\n if (cur<0)\n cur = nums[i];\n else\n cur += nums[i];\n res = Math.max(cur, res);\n }\n return res;\n }", "public long max() {\n\t\tif (!this.isEmpty()) {\n\t\t\tlong result = theElements[0];\n\t\t\tfor (int i=1; i<numElements; i++) {\n\t\t\t\tif (theElements[i] > result) {\n\t\t\t\t\tresult = theElements[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\telse {\n\t\t\tthrow new RuntimeException(\"Attempted to find max of empty array\");\n\t\t}\n\t}", "public static void main(String[] args) {\n \tint nums[] = {-2,1,-3,4,-1,2,1,-5,4};\n \tSystem.out.println(\"Final maximum contiguous number is \" + maxSubArray(nums));\n }" ]
[ "0.7235517", "0.7115544", "0.7077751", "0.7018425", "0.7001822", "0.68779653", "0.6823406", "0.6756076", "0.6741257", "0.67322975", "0.6690055", "0.66837245", "0.6677216", "0.6665956", "0.6665956", "0.6661674", "0.6656768", "0.6638707", "0.6636546", "0.66210055", "0.66148245", "0.66124266", "0.65895796", "0.65598154", "0.6550875", "0.65319353", "0.6520706", "0.65025353", "0.6498097", "0.64661247", "0.64656985", "0.6464645", "0.64594656", "0.64587134", "0.64452916", "0.64292455", "0.6428995", "0.64173275", "0.6408977", "0.6405933", "0.6396623", "0.63641393", "0.6360696", "0.63535374", "0.63503313", "0.63478434", "0.6337978", "0.630672", "0.6306472", "0.63003784", "0.63001055", "0.62715524", "0.62678987", "0.62594247", "0.62543", "0.6220693", "0.6216298", "0.62096465", "0.62040395", "0.620099", "0.61953926", "0.61852247", "0.6183417", "0.61802226", "0.6171276", "0.61611944", "0.6158377", "0.6157563", "0.615626", "0.6155068", "0.615389", "0.61443925", "0.6112034", "0.61105764", "0.6109856", "0.6105758", "0.610143", "0.6100742", "0.6099973", "0.6083101", "0.6080654", "0.6065319", "0.6065214", "0.6044639", "0.60388", "0.6021929", "0.6008222", "0.5974706", "0.5961776", "0.5955162", "0.59469026", "0.5935254", "0.59334207", "0.5932529", "0.5927729", "0.59276915", "0.59269166", "0.5926161", "0.59138894", "0.58986956", "0.5893661" ]
0.0
-1
there is no Queue class in Java API, only a interface use offer() instead of add(), Queue has six unique methods, add() element() offer() peek() remove()
@Test public void queue() { Queue<String> q = new LinkedList<>(); q.offer("1"); q.offer("2"); q.offer("3"); System.out.println(q.offer("4")); System.out.println(q.add("2")); System.out.println(q.toString()); System.out.println("peek " + q.peek()); // 1, peek() means get the first element in the queue System.out.println("size " + q.size()); // 4 System.out.println("poll " + q.poll()); // 1 System.out.println("size " + q.size()); // 3 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IQueue {\n public void clear();\n public boolean isEmpty();\n public int length();\n public Object peek();\n public void offer(Object x) throws Exception;\n public Object poll();\n}", "public interface Queue {\n\tpublic Set getGatheredElements();\n\tpublic Set getProcessedElements();\n\tpublic int getQueueSize(int level);\n\tpublic int getProcessedSize();\n\tpublic int getGatheredSize();\n\tpublic void setMaxElements(int elements);\n\tpublic Object pop(int level);\n\tpublic boolean push(Object task, int level);\n\tpublic void clear();\n}", "public interface Queue<E> {\n\n /**\n * \n * @return the number of elements in the queue.\n */\n int size();\n\n /**\n * \n * @return true if the queue is empty, false if not.\n */\n boolean isEmpty();\n\n /**\n * \n * Inserts an element at the rear of the queue.\n * \n * @param e\n */\n void enqueue(E e);\n\n /**\n * \n * @return the first element of the queue, but does not remove it (null if empty).\n */\n E first();\n\n /**\n * \n * @return first element of the queue and removes it (null if empty).\n */\n E dequeue();\n}", "public interface Queue<E> {\n\n\t/** \n\t * Returns the number of elements in the queue.\n\t * @return number of elements in the queue.\n\t */\n\t public int size(); \n\t /** \n\t * Returns whether the queue is empty.\n\t * @return true if the queue is empty, false otherwise.\n\t */\n\t public boolean isEmpty(); \n\t /**\n\t * Inspects the element at the front of the queue.\n\t * @return element at the front of the queue.\n\t */\n\t public E front(); \n\t /** \n\t * Inserts an element at the rear of the queue.\n\t * @param element new element to be inserted.\n\t */\n\t public void enqueue (E element); \n\t /** \n\t * Removes the element at the front of the queue.\n\t * @return element removed.\n\t */\n\t public E dequeue(); \n}", "public interface Queue<T> {\n\n /**\n * Current queue size\n * @return size as int\n */\n int size();\n\n /**\n * Checks if the the queue is empty\n * @return true if the list is empty\n */\n boolean isEmpty();\n\n /**\n * Adding an element to the queue\n * @param t element to add\n */\n void enqueue(T t);\n\n /**\n * Return and removes the first element in the queue\n * @return the removed element\n * @throws IndexOutOfBoundsException if queue is empty\n */\n T dequeue();\n\n /**\n * Return (without removing) first element in queue\n * @return the first element in queue\n * @throws IndexOutOfBoundsException if the queue is empty\n *\n */\n T first();\n\n /**\n * Return (without removing) last element in queue\n * @return last element in queue\n * @throws IndexOutOfBoundsException if the queue is empty\n */\n T last();\n\n /**\n * Return a string representation of the queue content.\n * @return String of queue\n */\n String toString();\n\n /**\n * Element iterator.\n * @return Iterates over elements in queue\n */\n Iterator iterator();\n\n}", "public interface Queue<T>\r\n{\r\n /**\r\n * Insert item at the back of the queue.\r\n * @param item insert item at the back of the queue\r\n */\r\n public void push(T item);\r\n\r\n /**\r\n * Remove the element at the front of the queue and return its value.\r\n * @return value of the element removed from the front of the queue.\r\n * @throws <tt>NoSuchElementException</tt> if the queue is empty.\r\n */\r\n public T pop();\r\n\r\n /**\r\n * Return the value of the element at the front of the queue.\r\n * @return value of element at the front of the queue.\r\n * @throws <tt>NoSuchElementException</tt> if the queue is empty.\r\n */\r\n public T peek();\r\n\r\n /**\r\n * Return a boolean value that indicates whether the queue is empty. Return\r\n * true if empty and false if not empty.\r\n * @return true if the queue is empty and false otherwise.\r\n */\r\n public boolean isEmpty();\r\n\r\n /**\r\n * Return the number of elements currently in the queue.\r\n * @return number of elements in the queue.\r\n */\r\n public int size();\r\n}", "public interface Queue<E> {\r\n\r\n /**\r\n * Adds the given item to the end of the queue.\r\n * \r\n * @pre The queue is not full and the item to be added is not null\r\n * @post The item is added at the end of the queue\r\n * @param item\r\n * The item to be added to the queue\r\n */\r\n void enqueue(E item);\r\n\r\n /**\r\n * Removes and returns the item from the beginning of the queue.\r\n * \r\n * @pre The queue is not full\r\n * @post The item is removed queue\r\n * @return the item removed from the queue or null if the queue is empty\r\n */\r\n E dequeue();\r\n\r\n}", "public interface MyQueue {\n\n // add to tail\n void enqueue(Object obj);\n\n // remove from head\n Object dequeue();\n\n}", "public interface Queue<T extends Object> {\n\n\t/**\n\t * Method to return the queue iterator\n\t * \n\t * @return Queue Iterator\n\t */\n\tpublic Iterator<T> getIterator();\n\n\t/**\n\t * Method to peek the queue face\n\t * \n\t * @return front data\n\t */\n\tpublic T peek();\n\n\t/**\n\t * Method to pop from front of the queue\n\t * \n\t * @return front data\n\t */\n\tpublic T pop();\n\n\t/**\n\t * Push method for inserting Integer data at end of the queue\n\t * \n\t * @param data\n\t */\n\tpublic void push(T data);\n\n\t/**\n\t * Push method for inserting Long data at end of the queue\n\t * \n\t * @param data\n\t */\n\t// public void push(Long data);\n\n\t/**\n\t * Push method for inserting Double data at end of the queue\n\t * \n\t * @param data\n\t */\n\t// public void push(Double data);\n\n\t/**\n\t * Push method for inserting String data at end of the queue\n\t * \n\t * @param data\n\t */\n\t// public void push(String data);\n}", "public interface Queue {\n /***** Setting class functions *******/\n\n /* Add element to end of queue function\n * PRE: elem != null && queue != null\n * POST: queue[size] = elem && size` = size + 1 && other imutabled\n */\n void enqueue(Object elem);\n\n /* Delete and return first element in queue function\n * PRE: size > 0\n * POST: R = queue[0] && queue[i] = queue[i + 1] && size` = size - 1 && other imutabled\n */\n Object dequeue();\n\n /* Add element to begin of queue\n * PRE: elem != null\n * POST: queue[i] = queue[i - 1](size >= i > 0) && queue[0] = elem && size` = size + 1 && other imutabled\n */\n void push(Object elem);\n\n /* Delete and return last element in queue function\n * PRE: size > 0\n * POST: R = queue[size - 1] && size` = size - 1 && other imutabled\n */\n Object remove();\n\n /***** Getting class functions *******/\n\n /* Get first element of queue function\n * PRE: size > 0\n * POST: R = queue[0] && all elements imutabled\n */\n Object element();\n\n /* Get last element of queue function\n * PRE: size > 0\n * POST: R = queue[size - 1] && all elements imutabled\n */\n Object peek();\n\n /* Get size function\n * PRE: True\n * POST: R = size && all imutabled\n */\n int size();\n\n /* Check for empty queue function\n * PRE: True\n * POST: R = (size == 0) && all imutabled\n */\n boolean isEmpty();\n\n /* Delete all elements from queue function\n * PRE: True\n * POST: size = 0\n */\n void clear();\n\n /******* Modification *******/\n /* Create queue with elements like predicate\n * PRE: correct predicate && queue != null\n * POST: all imutabled && R = {R[0]...R[new_size] : new_size <= size && predicate(R[i]) = 1 && R - the same type of queue}\n * : && exist sequence i[0] ... i[k] (i[0] < ... < i[k]) : R[it] = queue[i[it]](0 <= it < k) && k - max\n */\n Queue filter(Predicate predicate);\n\n /* Create queue with elements like predicate\n * PRE: correct function && queue != null\n * POST: all imutabled && R = {y[i] | y[i] = function(queue[i])} size(R) = size(queue) && R is the same type of queue\n */\n Queue map(Function function);\n}", "public interface QueueInterface {\r\n Object dequeue() throws QueueUnderflowException;\r\n // Throws QueueUnderflowException if this queue is empty,\r\n // otherwise removes top element from this queue.\r\n \r\n \r\n boolean isEmpty();\r\n // Returns true if this queuea is empty, otherwise returns false.\r\n\r\n}", "public interface Queue {\r\n\r\n\t/**\r\n\t * This method will return the first activity from the queue.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic Activity poll();\r\n\r\n\t/**\r\n\t * This method will push the activity to the queue.\r\n\t * \r\n\t * @param activity\r\n\t */\r\n\tpublic void push(Object activity);\r\n\r\n\t/**\r\n\t * This method will tell that the queue is closed or not.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic boolean isQueueClosed();\r\n\r\n\t/**\r\n\t * This method will on the queue to available.\r\n\t */\r\n\tpublic void onQueue();\r\n\r\n\t/**\r\n\t * this method will off the queue so not available.\r\n\t */\r\n\tpublic void closeQueue();\r\n\r\n\t/**\r\n\t * Returns true if the queue is empty.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic boolean isEmpty();\r\n\r\n}", "public interface UnboundedQueue<T> {\n \n\t/**\n\t * This method inserts a generic type element to the back of the Queue, increasing the\n\t * size by one. \n\t * \n\t * @param o Generic type to be added to the back of the Queue.\n\t */\n public void insert(T o);\n \n /**\n * This method removes a generic type element from the front of the Queue thereby decreasing the\n * size by one. Throws an EmptyQueueException if the Queue is empty and there is no\n * element to remove.\n * \n * @return Object removed from the front of the Queue\n * @throws EmptyQueueException if Queue is empty and there is no object to remove\n */\n public T remove() throws EmptyQueueException;\n \n /**\n * This method makes a copy of the element at the front of the Queue. Size stays the same.\n * \n * @return copy of the element at the front of the Queue.\n * @throws EmptyQueueException thrown if the Queue is empty and there is no elment at the front\n */\n public T front() throws EmptyQueueException;\n \n /**\n * This method returns true if the Queue has a front element and therefore is \n * not empty.\n * \n * @return true if the Queue has a front element\n */\n public boolean hasFront();\n \n /**\n * This method returns the number of elements currently stored in the structure (Queue).\n * \n * \n * @return int number of elements stored in the Queue\n */\n public int size();\n\n /**\n * This method creates a String representation of the Queue.\n * \n * @return String which represents the Queue\n */\n public String toString();\n \n}", "public interface Queue {\n\n void enqueue(int value);\n\n int dequeue();\n}", "public interface SimpleQueue<E> {\n\n\t/**\n\t * Adds the Object in the Queue\n\t * @param item Generic item to add to the queue\n\t */\n\tpublic void add(E item);\n\t\n\t/**\n\t * Removes the first Object from the Queue\n\t * @return the Object that was removed\n\t * @throws NoSuchElementException if object is not in the queue\n\t */\n\tpublic E remove();\n\t\n\t/**\n\t * Retrieves, but does not remove the\n\t * first object in the Queue\n\t * @return Object that was retrieved\n\t * @throws NoSuchElementException if the queue is empty\n\t */\n\tpublic E peek();\n\t\n\t/**\n\t * Checks to see if the Queue is Empty or not\n\t * @return true if the Queue is Empty, false if its not.\n\t */\n\tpublic boolean isEmpty();\n}", "public static void main(String[] args) {\n Queue<QueueData> q1 = new LinkedList<>();\n List<String> testArList = new ArrayList<>();\n testArList.add(0, \"1\");\n for (int i = 0; i < 10; i++){\n // ArrayList의 add와 같은 기능을 가졌다.\n // 하지만, 자료구조의 특성상, 특정 인덱스에 add하는 메소드는 없다.\n q1.add(new QueueData(i, (int) (Math.random() * 1000)));\n }\n System.out.println(q1);\n // peek() : 0번째 인덱스 즉 head에 해당하는 데이터를 살펴본다. 해당 데이터가 없을 경우\n // null이 출력된다. 검색된 데이터는 삭제되지 않고 그대로 남는다.\n System.out.println(q1.peek());\n System.out.println(\"peek\");\n System.out.println(q1);\n\n // element() : peek과 동일한 기능을 가졌지만, 차이점은 해당 데이터가 없을때,\n // 예외처리를 해준다.\n System.out.println(q1.element());\n System.out.println(\"element\");\n System.out.println(q1);\n\n // Enqueue : 추가\n q1.offer(new QueueData(q1.size(), (int) (Math.random() * 1000))); // 실패시 예외발생\n System.out.println(\"offer\");\n System.out.println(q1);\n q1.add(new QueueData(q1.size(), (int) (Math.random() * 1000))); // 실패시 false 리턴\n System.out.println(\"add\");\n System.out.println(q1);\n\n // Dequeue : 삭제\n q1.remove(); // 삭제 실패시, 예외 발생\n System.out.println(\"remove\");\n System.out.println(q1);\n System.out.println(\"poll\");\n q1.poll(); // 실패시 false 리턴\n System.out.println(q1);\n \n // 조건부 삭제\n System.out.println(\"remove if idx % 10 == 0\");\n q1.removeIf(queueData -> queueData.idx % 10 == 0);\n System.out.println(q1);\n\n // priority Queue(우선순위 큐)\n // 가장 가중치가 낮은 순서로 poll, peek()을 할 수 있는 자료구조다.\n // Min Heap로 데이터를 sort 시켜놓고 출력하는 자료구조.\n // 데이터의 크기를 뒤죽박죽 아무렇게 넣어도 의도에 따라 오름차순 혹은 내림차순으로\n // poll(), peek() 할 수 있다.\n Queue<QueueData> pQueue = new PriorityQueue<>();\n pQueue.add(new QueueData(0, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(9, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(2, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(5, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(4, (int) (Math.random() * 1000)));\n\n System.out.println(pQueue.poll());\n System.out.println(pQueue.poll());\n System.out.println(pQueue.poll());\n System.out.println(pQueue.poll());\n System.out.println(pQueue.remove()); // 더이상 삭제할 수 없을 때, 예외처리(프로그램 종료)\n System.out.println(pQueue.poll()); // 더이상 삭제할 수 없을 때, null 출력\n System.out.println(pQueue.size());\n }", "public interface PQueue<T> {\n\n void add(T item, int priority) throws InterruptedException;\n\n T removeMin();\n\n}", "public interface QueueServiceProvider {\n /**\n * Returns the name of the Queue implementation.\n * @return Name of the queue implementation.\n */\n String name();\n\n /**\n * Places an object on the end of the queue.\n * @param object Object to place on the queue.\n */\n void enqueue(String object);\n\n /**\n * Retrieves an object from the front of the queue.\n * @return Object from the queue.\n */\n String dequeue();\n}", "public interface QueueService {\n\n /**\n * 添加元素\n *\n * @param messageQueue\n */\n void add(MessageQueue messageQueue);\n\n\n /**\n * 弹出元素\n */\n MessageQueue poll();\n\n Iterator<MessageQueue> iterator();\n\n\n}", "public void queueUsage() {\n\t\t//use LinkedList as a queue\n\t\tQueue<String> q = new LinkedList<String>();\n\t\tq.add(\"1\");\n\t\tq.add(\"2\");\n\t\tq.add(\"3\");\n\t\tq.add(\"10\");\n\t\tq.add(\"11\");\n\t\tint[] a;\n\n\t\tLinkedBlockingQueue<String> bq = new LinkedBlockingQueue<String>();\n\t\t\n\t\t//ArrayBlockingQueue needs to set the size when created.\n\t\tArrayBlockingQueue<String> aq = new ArrayBlockingQueue<String>(100);\n\t\t\n\t\tPriorityBlockingQueue<String> pq = new PriorityBlockingQueue<String>();\n\t\t\n//\t\tDelayQueue<String> dq = new DelayQueue<String>(); \n\t\t\n\t}", "public interface MinimalStringQueue {\n\t \n\t/** Adds a new String to the end of the queue */ \n\tpublic void add(String str); \n\t \n\t/** Removes and returns the first String (or null if queue is empty) */ \n\tpublic String poll(); \n\t \n\t/** Returns the number of entries in the queue. */ \n\tpublic int size(); \n\t \n\n}", "public interface FifoQueue {\n\n /**\n * Push the item to the tail of the queue.\n * @param queueName Target queue.\n * @param item Item to be added\n */\n public void push(final String queueName, final String item);\n\n /**\n * Remove the item from the queue.\n * @param queueName Queue name.\n * @param item Target item.\n * @return <code>true</code> item removed, otherwise <code>false</code>\n */\n public boolean remove(final String queueName, final String item);\n\n /**\n * Get top items.\n * @param queueName Delay queue name.\n * @param end End index.\n * @return Delayed items.\n */\n public Collection<String> pop(final String queueName, final int end);\n}", "public interface ContainerList<E> {\n /**\n * Adds newElement to the queue if still has capacity.\n *\n * @param e element to be added to the queu.\n * @throws Exception If Queue is full\n */\n public void push(E e) throws Exception;\n\n /**\n * Returns the First element in the queue and removes it from the list.\n *\n * @return The First element added to the queu.\n */\n public E pop();\n\n /**\n * Checks what's the next element to be returned from the list.\n * @return\n */\n public E peek();\n public int size();\n}", "@NotNull\n public static <T> Queue<T> queue() {\n try {\n return new ArrayDeque<T>();\n } catch (NoClassDefFoundError nce) {\n return new LinkedList<T>();\n }\n }", "@Override\n\tpublic void addToQueue() {\n\t}", "public E dequeue();", "T get() throws QueueEmpytException;", "private Queue(){\r\n\t\tgenerateQueue();\r\n\t}", "Object dequeue();", "Object dequeue();", "public void enqueue (E element);", "E dequeue();", "E dequeue();", "E dequeue();", "public static void main(String arg[]) {\n// q.add('a');\n// q.add('b');\n// q.add('c');\n// q.add('d');\n// System.out.println(q);\n// System.out.println(q.size());\n// System.out.println(q.peek());\n// System.out.println(q.remove());\n// System.out.println(q);\n// System.out.println(q.isEmpty());\n\n// Queue<Character> q=new LinkedList<>();\n// System.out.println(q.isEmpty());\n// q.add('a');\n// q.add('b');\n// q.add('c');\n// q.add('d');\n// System.out.println(q);\n// System.out.println(q.size());\n// System.out.println(q.peek());\n// System.out.println(q.remove());\n// System.out.println(q);\n// System.out.println(q.isEmpty());\n\n Queue numbers = new LinkedList();\n List(numbers);\n\n // Write your code here\n // You should only add some numbers, dequeue, or peek to change the elements in the queue\n // so that the queue becomes [1,4,9,14,15]\n System.out.println(numbers);\n\n numbers.remove();\n numbers.add(1);\n\n System.out.println(numbers);\n }", "public interface IGenQ<T> {\n\n // Put an item into the queue\n void put(T ch) throws QueueFullException;\n\n // Get an item from the queue\n T get() throws QueueEmpytException;\n\n\n\n}", "myQueue(){\n }", "void enqueue(E el);", "public interface PriorityQueue<E, P> {\n\t\n\t/** return the comparator used for ordering priorities */\n\tpublic Comparator<? super P> comparator();\n\t\n\t/** Return the number of elements in this. Runs in O(1) time. */\n\tpublic int size();\n\t\n\t/**\n\t * Remove and return the largest element of this, according to comparator()\n\t * Runs in O(log n) time.\n\t * \n\t * @throws NoSuchElementException if this is empty \n\t */\n\tpublic E poll() throws NoSuchElementException;\n\t\n\t/**\n\t * Return the largest element of this, according to comparator().\n\t * Runs in O(1) time.\n\t * \n\t * @throws NoSuchElementException if this is empty.\n\t */\n\tpublic E peek() throws NoSuchElementException;\n\t\n\t/**\n\t * Add the element e with priority p to this. Runs in O(log n + a) time,\n\t * where a is the time it takes to append an element to an ArrayList of size\n\t * n.\n\t * \n\t * @throws IllegalArgumentException if this already contains an element that\n\t * is equal to e (according to .equals())\n\t */\n\tpublic void add(E e, P p) throws IllegalArgumentException;\n\n\t/**\n\t * Change the priority associated with e to p.\n\t *\n\t * @throws NoSuchElementException if this does not contain e.\n\t */\n\tpublic void changePriority(E e, P p) throws NoSuchElementException;\n}", "public interface IPriorityQueue {\n\n /**\n * Check whether the priority queue is empty\n * @return true if it is empty, otherwise false\n */\n Boolean isEmpty();\n\n /**\n * Add a priority and value into a list\n * @param priority priority to add to the priority queue\n * @param value value to add to the priority queue\n * @return a new priority queue with new priority and value\n */\n IPriorityQueue add(Integer priority, String value);\n\n /**\n * Gets the number of items in the priority queue.\n * @return The number of items in the priority queue.\n */\n Integer size();\n\n /**\n * returns the String at the front of the priority queue if the Queue is not empty.\n * @return The String at the front of the priority queue, if the Queue is not empty.\n * @throws EmptyPriorityQueueException EmptyPriorityQueueException if the priority queue is empty.\n */\n String peek() throws EmptyPriorityQueueException;\n\n /**\n * Removes and returns the String at the front of the priority queue if the priority queue is not empty.\n * @return A copy of the priority queue without the removed item..\n * @throws EmptyPriorityQueueException EmptyPriorityQueueException if the priority queue is empty.\n */\n IPriorityQueue pop() throws EmptyPriorityQueueException;\n\n}", "public QueueExplorator() {\n\t\tqueue = new LinkedQueue<Square>();\t\n\t}", "public T dequeue();", "void enqueue(E e);", "myQueue(int size){\n }", "public Queue() {}", "void enqueue(E item);", "void enqueue(Object elem);", "<V extends Object> Queue<V> getQueue(String queueName);", "Queue<IMotion> addToQueue(Queue<IMotion> motionQueue);", "@Override\n public E poll() {\n E tmp = (E)queue[0];\n System.arraycopy(queue, 1, queue, 0, size - 1);\n size--;\n return tmp;\n }", "T dequeue();", "T dequeue();", "public interface IMessageQueue {\n void remove(Message item);\n Message peek();\n Message dequeue();\n Message enqueue(String messageBody);\n}", "public interface DoubleQueue {\n\n public void accoda(Object elemento);\n public Object leggicoda();\n public void fuoricoda();\n public void inpila(Object elemento);\n public Object leggitesta();\n public void fuoritesta();\n public boolean codavuota();\n\n}", "public void offer(E e) {\n if (e == null) throw new NullPointerException();\n queue[currentPos++] = e;\n size++;\n\n if (currentPos == queue.length) resize();\n }", "public interface DequeInterface<T>\n{\n public void addFirst(T newEntry);\n\n public void addLast(T newEntry);\n\n public T removeFirst();\n\n public T removeLast();\n\n public T getFirst();\n\n public T getLast();\n\n public boolean isEmpty();\n\n public void clear();\n}", "public void enqueue(T element);", "public interface VertexQueue {\n\n\t/**\n\t * Adds the given vertex to this queue.\n\t * \n\t * @param vertex\n\t * vertex\n\t */\n\tvoid add(int vertex);\n\n\t/**\n\t * Removes and returns the next vertex from this queue.\n\t * \n\t * @return the next vertex to be processed\n\t */\n\tint poll();\n\n\t/**\n\t * Returns the vertex that will be processed next.\n\t * \n\t * @return the next vertexto be processed\n\t */\n\tOptionalInt peek();\n\n\t/**\n\t * Tells if the queue is empty.\n\t * \n\t * @return {@code true} if the queue is empty\n\t */\n\tboolean isEmpty();\n\n\t/**\n\t * Tells if the given vertex is part of the queue.\n\t * \n\t * @param vertex\n\t * vertex\n\t * @return <code>true</code> if the vertex is contained in the queue\n\t */\n\tboolean contains(int vertex);\n\n\t/**\n\t * Removes all vertices from the queue.\n\t */\n\tvoid clear();\n}", "@Override\n public boolean offer(E e) {\n if(e== null || (limited && size >= length)) {\n return false;\n }\n queue[size++] = e;\n Arrays.sort(queue, comparator);\n if(size >= queue.length) {\n queueResize();\n }\n return true;\n }", "private void addFromQueue()\n\t{\n\t\twhile( humanQueue.size()>0 )\n\t\t\thumans.add(humanQueue.remove(0));\n\t\twhile( zombieQueue.size()>0 )\n\t\t\tzombies.add(zombieQueue.remove(0));\n\t}", "public abstract Type Dequeue();", "private void re_queue() {\n\n Queue<String> queue = new LinkedList<>();\n queue.offer(\"我\");\n queue.offer(\"爱\");\n queue.offer(\"刷\");\n queue.offer(\"题\");\n queue.offer(\"呵呵\");\n\n System.out.println(\"*********queue*********\");\n System.out.println(queue);\n System.out.println(\"*********queue*********\");\n System.out.println(\"查看队首元素,不改变队列结构:\" + queue.peek());\n System.out.println(queue.size());\n System.out.println(\"*********queue*********\");\n System.out.println(\"取出队首元素,改变队列结构:\" + queue.poll());\n System.out.println(queue.size());\n System.out.println(\"*********queue*********\");\n while (queue.size() > 0) {\n System.out.println(queue.poll());\n System.out.println(queue);\n }\n }", "public static void queueVsStack() {\n\n Queue<String> collection1 = new PriorityQueue<>();\n collection1.add(\"banana\");\n collection1.add(\"orange\");\n collection1.add(\"apple\");\n\n //what will be printed\n System.out.println(collection1.iterator().next());\n\n Deque<String> collection2 = new ArrayDeque<>();\n collection2.addFirst(\"banana\");\n collection2.addFirst(\"apple\");\n collection2.addFirst(\"orange\");\n\n //what will be printed\n System.out.println(collection2.iterator().next());\n\n }", "public void offer(E e)\n {\n if(!mOverflow.get())\n {\n mQueue.offer(e);\n\n int size = mCounter.incrementAndGet();\n\n if(size > mMaximumSize)\n {\n setOverflow(true);\n }\n }\n }", "public Queue<T> deQueue();", "public interface IDeque<T> {\n boolean isEmpty();\n int size();\n void pushLeft(T t);\n void pushRight(T t);\n T popLeft();\n T popRight();\n}", "public void add(E element){\n\t\tArrayQueue<E> temp = new ArrayQueue<E>();\n\t\ttemp.enqueue(element);\n\t\tQ.enqueue(temp);\n\t}", "public Queue getQueue() {\n return new Queue();\n }", "public static void main(String[] args) {\n\t\tQueue<Integer> queue = new LinkedList<>();\r\n\r\n for (int i=0;i<5;i++) {\r\n \tqueue.add(i);\r\n }\r\n \r\n System.out.println(\"Elements in queue: \" + queue);\r\n\r\n int objectRemoved = queue.remove();\r\n System.out.println(\"Removed Object from the Queue: \" + objectRemoved);\r\n\r\n \r\n int headQueue = queue.peek();\r\n System.out.println(\"Head of queue: \" + headQueue);\r\n\r\n int queueSize = queue.size();\r\n System.out.println(\"Size of queue: \" + queueSize);\t\r\n\r\n\t\t \r\n\t}", "public void onQueue();", "private void workOnQueue() {\n }", "public BlaqDeque(){super();}", "public T remove() throws EmptyQueueException;", "public static void main(String[] args) {\n Queue<Integer> q = new LinkedList<Integer>();\n q.add(10);\n q.add(5);\n q.add(15);\n System.out.println(q.peek());\n System.out.println(q.poll());\n System.out.println(q.peek());\n System.out.println(q.size());\n }", "public ImmutableQueue<T> enQueue(T element) {\r\n\t\tif (element == null)\r\n\t\t\tthrow new IllegalArgumentException();\r\n\t\treturn new ImmutableQueue<T>(this.enqueueStack.push(element), this.dequeueStack);\r\n\t}", "void processQueue();", "void runQueue();", "T dequeue() throws RuntimeException;", "T dequeue() throws RuntimeException;", "void enqueue(T x);", "public MyArrayList<E> getQueue() {\n return this.queue;\n }", "public interface PriorityQueue<T> {\n\t/**\n\t * Returns true if priority queue has no elements\n\t *\n\t * @return true if the priority queue has no elements\n\t */\n\tpublic boolean isEmpty();\n\n\n\t/**\n\t * Returns the number of elements in this priority queue.\n\t *\n\t * @return the number of elements in this priority queue.\n\t */\n\tpublic int size();\n\n\n\t/**\n\t * Returns the minimum element in the priority queue\n\t *\n\t * @return the minimum element or throw EmptyHeapException if empty\n\t */\n\tpublic T findMin();\n\n\n\t/**\n\t * Inserts a new element into the priority queue.\n\t * Duplicate values ARE allowed.\n\t *\n\t * @param x element to be inserted into the priority queue.\n\t */\n\tpublic void insert(T x);\n\n\n\t/**\n\t * Removes and returns the minimum element from the priority queue.\n\t *\n\t * @return the minimum element or throw EmptyHeapException if empty\n\t */\n\tpublic T deleteMin();\n\n\n\t/**\n\t * Erases all elements from the priority queue.\n\t */\n\tpublic void makeEmpty();\n\n}", "public E dequeue() {\n if (size == 0){\n return null;\n }\n\n\n E result = (E) queue[0];\n queue[0] = null;\n --size;\n\n if (size != 0){\n shift();\n }\n return result;\n }", "public void testOffer() {\n SynchronousQueue q = new SynchronousQueue();\n assertFalse(q.offer(one));\n }", "public StackWithOneQueue() {\n this.queue = new LinkedList<>();\n }", "void enqueue(T t);", "public MyQueue() {\n push=new Stack<>();\n pull=new Stack<>();\n }", "public static void main(String[] args){\n PriorityQueue <Integer> queue1 = new PriorityQueue();\n // add elements\n queue1.add(1000);\n queue1.add(1234);\n queue1.add(3453);\n \n // will throw error\n // queue1.add(null);\n\n // get top element\n System.out.println(\"PriorityQuey peek() \"+queue1.peek());\n System.out.println(\"PriorityQuey element() \"+queue1.element());\n\n // return top element and remove it from the queue\n System.out.println(\"PriorityQuey poll() \"+queue1.poll());\n System.out.println(\"PriorityQuey peek() \"+queue1.peek());\n\n // addAll\n PriorityQueue <Integer> queue2 = new PriorityQueue();\n queue2.addAll(queue1);\n\n // iterate the queue elements\n Iterator<Integer> itr2=queue1.iterator(); \n while(itr2.hasNext()){ \n System.out.println(\"PriorityQueue elements after addAll() \"+itr2.next()); \n }\n\n // iterate the queue elements\n Iterator<Integer> itr1=queue1.iterator(); \n while(itr1.hasNext()){ \n System.out.println(\"PriorityQueue elements \"+itr1.next()); \n } \n \n // contains()\n System.out.println(\"Contains() \"+queue1.contains(1234));\n \n // remove elements\n queue1.remove(3453);\n // clear()\n queue1.clear();\n // removeAll\n queue1.removeAll(queue1);\n }", "public Queue(){ }", "@Override\n public E peek() {\n return (E)queue[0];\n }", "public Queue() {\n\t\tthis.front = null;\n\t\tthis.end = null;\n\t\tthis.current = null;\n\t}", "public Deque() {}", "private static void tester(APQueue<String> q) {\n q.push(\"c++\");\n q.push(\"python\");\n q.push(\"java\");\n System.out.println(\"Should be 3: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be c++: \" + q.peek());\n System.out.println(\"Should be 3: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be c++: \" + q.pop());\n System.out.println(\"Should be 2: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be python: \" + q.peek());\n System.out.println(\"Should be 2: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be python: \" + q.pop());\n System.out.println(\"Should be 1: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be java: \" + q.peek());\n System.out.println(\"Should be 1: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be java: \" + q.pop());\n System.out.println(\"Should be 0: \" + q.size());\n \n System.out.println();\n }", "public interface Source<E> {\n /**\n * Retrieves and removes the head of this queue, or <tt>null</tt> if this queue is empty.\n *\n * @return The head of this queue, or <tt>null</tt> if this queue is empty.\n */\n E poll();\n\n /**\n * Retrieves, but does not remove, the head of this queue, returning <tt>null</tt> if this queue is empty.\n *\n * @return The head of this queue, or <tt>null</tt> if this queue is empty.\n */\n E peek();\n}", "public MyQueue() {\n front = null;\n rear = null;\n size = 0;\n }", "public interface QueueManager {\n List<Message> messages = null;\n\n int insertQueue(String queueId, Message message);\n\n List<Message> getQueue(String queueId, int num);\n}", "public interface TrackingQueue {\n /**\n * Adds element to the queue.\n *\n * @param element to add\n * @return future of the consuming result. It will be set when consuming is successfully reported to be completed\n */\n ListenableFuture<String> add(Element element);\n\n /**\n * Take next available element from the queue act on it.\n * <p>\n * After element is taken it is no longer available for others to take unless it is not placed back to queue.\n * Element can be placed back in the following cases:\n * <ul>\n * <li>\n * By invoking {@link #add(Element)} method. In this case element will\n * be considered a new element never seen before.\n * Element will not be removed from list of \"in-progress\" elements list automatically.\n * </li>\n * <li>\n * By reporting {@link ConsumingStatus#FAILED} status via\n * {@link #recordProgress(String, String, ConsumingStatus, String)}.\n * Element will be rescheduled automatically and removed from the \"in-progress\" list.\n * </li>\n * <li>\n * Element can be rescheduled automatically based on the implementation logic of subclasses.\n * </li>\n * </ul>\n * </p>\n *\n * @param consumerId element consumer\n * @return next available element, or null if no element is available\n */\n Element take(String consumerId);\n\n /**\n * Records progress of consuming the element. If element no longer belongs to this consumer this will be noted in\n * returned possession state as {@link PossessionState#NOT_POSSESSES}. This may happen e.g. if {@link TrackingQueue}\n * implementation decided that this consumer is dead and put it back to queue.\n * <p>\n * If {@link ConsumingStatus#FAILED} status is reported,\n * element will be placed back to queue automatically\n * </p>\n * <p>\n * If {@link ConsumingStatus#FINISHED_SUCCESSFULLY} status is reported\n * the queue no longer tracks the element consuming status.\n * </p>\n *\n * @param consumerId consumer that is processing the element and reporting the progress\n * @param elementId element to report progress on\n * @param status status of the consuming.\n * @param result current value of the result of consuming.\n * @return true if this consumer still possesses the element and can continue processing it.\n */\n PossessionState recordProgress(String consumerId, String elementId, ConsumingStatus status, String result);\n\n /**\n * Removes element from the queue by element id. If element was being consumed,\n * @param elementId id of the element to remove\n * @return true if removed successfully or element was not present in the queue, false otherwise\n */\n boolean remove(String elementId);\n\n /**\n * Removes all elements from the queue. See {@link #remove(String)} for more details.\n * @return true if all removed successfully, false otherwise\n */\n boolean removeAll();\n\n /**\n * Promotes element to the top of the queue.\n * @param elementId id of the element to promote\n * @return true if promoted successfully\n */\n boolean toHighestPriority(String elementId);\n\n /**\n * Get all {@link QueuedElement} in the queue that are not being consumed.\n *\n * @return an iterator over the queued (but not being consumed) elements in this queue. The iterator returns elements\n * ordered in the way they are offered to be consumed starting with the top of the queue.\n */\n Iterator<QueuedElement> getQueued();\n\n /**\n * Get all {@link QueuedElement} that are being consumed.\n *\n * @return an iterator over the queue elements that are being consumed.\n */\n Iterator<QueuedElement> getBeingConsumed();\n\n /**\n * Get the size of the queue (both queued and being consumed).\n *\n * @return size of queue (both queued and being consumed).\n */\n int size();\n\n /**\n * Defines Tracking Queue Consuming Status.\n */\n static enum ConsumingStatus {\n IN_PROGRESS,\n FINISHED_SUCCESSFULLY,\n FAILED\n }\n\n /**\n * Defines PossessionState.\n */\n static enum PossessionState {\n POSSESSES,\n NOT_POSSESSES\n }\n}", "private void putOneQueue(BlockingQueue q, List buffer) throws InterruptedException {\n q.put(buffer);\n// System.err.println(Thread.currentThread().getName() + \"[MC] puts \" + buffer.size() + \" on \" + q.hashCode() + \" done\");\n// System.err.println(Thread.currentThread().getName() + \"[MC] puts \" + buffer.size() + \" on \" + q.hashCode() + \" first record \" + buffer.get(0));\n }", "boolean offer(T x){\n if(tail == queueArray.length){\n return false;\n }\n queueArray[tail] = x;\n tail++;\n return true;\n }", "void add(int list) {\n\t\t\n\t\t// check if element can be added to the queue\n\t\tif (!canPush)\n\t\t\tthrow new IllegalStateException(\"Queue capacity is excided!\");\n\t\t\n\t\t// add element into the cell push-pointer points to and shift pointer\n\t\tqueue[qPush++] = list;\n\t\t\n\t\t// set poll-flag, cuz there's now at least one element in the queue\n\t\tcanPoll = true;\n\t\t\n\t\t/*\n\t\t * If poll pointer went beyond array bounds - return it to the first position\n\t\t */\n\t\t\n\t\tif (qPush == queue.length)\n\t\t\tqPush = 0;\n\t\t\n\t\t/*\n\t\t * If push pointer now points to the poll pointer - then queue is full\n\t\t * Set flag\n\t\t */\n\t\t\n\t\tif (qPush == qPoll)\n\t\t\tcanPush = false;\n\t}" ]
[ "0.81771576", "0.8141228", "0.8129049", "0.80454034", "0.80250627", "0.8013581", "0.7900059", "0.7670654", "0.759322", "0.75835764", "0.752686", "0.7483883", "0.7477763", "0.73722035", "0.73634124", "0.7344914", "0.72760165", "0.72301465", "0.7174833", "0.7144217", "0.7123186", "0.7085504", "0.7060723", "0.7006182", "0.6951193", "0.6941832", "0.69189185", "0.69016397", "0.68852615", "0.68852615", "0.6878669", "0.6860715", "0.6860715", "0.6860715", "0.6856282", "0.6850891", "0.68424356", "0.67897177", "0.6770838", "0.67678887", "0.67426443", "0.67290694", "0.6703684", "0.6684476", "0.6671475", "0.66668075", "0.6643721", "0.6640048", "0.6612352", "0.6610659", "0.6602698", "0.6602698", "0.6594199", "0.6578515", "0.6570959", "0.65652555", "0.65344536", "0.6531786", "0.6525924", "0.6518357", "0.651309", "0.65014726", "0.6499584", "0.64978707", "0.6489166", "0.64878404", "0.64860165", "0.6481156", "0.6477893", "0.6467663", "0.6467599", "0.6442931", "0.6427823", "0.64169747", "0.6407273", "0.64041317", "0.6401595", "0.63912195", "0.63912195", "0.63901925", "0.63875705", "0.6380561", "0.63775957", "0.6374205", "0.6373876", "0.63579094", "0.6356967", "0.63534355", "0.6352786", "0.6348091", "0.6342584", "0.6341626", "0.6338473", "0.6333974", "0.63266975", "0.6324373", "0.6315741", "0.6314672", "0.6313448", "0.63049096" ]
0.80671215
3
Created by BogdanovKP on 30.03.2017.
public interface MediaFactory { TCPMediaContent createTCPObject(); UDPMediaContent createUDPObject(); }
{ "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}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public void mo38117a() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n void init() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void jugar() {\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}", "private void kk12() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "private void init() {\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "protected boolean func_70814_o() { return true; }", "private Rekenhulp()\n\t{\n\t}", "private void m50366E() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void gored() {\n\t\t\n\t}", "@Override\n public void init() {}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "Petunia() {\r\n\t\t}", "@Override\n protected void init() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n public void initialize() {\n \n }", "public void mo6081a() {\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@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\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override public int describeContents() { return 0; }" ]
[ "0.5802726", "0.5717285", "0.5564899", "0.54853034", "0.54820645", "0.54820645", "0.547377", "0.5421394", "0.5417838", "0.5417199", "0.5404914", "0.5387924", "0.53278375", "0.5293323", "0.5287194", "0.5283038", "0.5283038", "0.5283038", "0.5283038", "0.5283038", "0.5283038", "0.5278995", "0.52781457", "0.52687526", "0.52658284", "0.525981", "0.52533686", "0.52479935", "0.5243222", "0.52419615", "0.52288365", "0.52080184", "0.5206984", "0.5206984", "0.5204975", "0.5199782", "0.5197959", "0.5195057", "0.5195057", "0.5195057", "0.5195057", "0.5195057", "0.51931506", "0.5188175", "0.518128", "0.5179306", "0.5178676", "0.517595", "0.5172347", "0.51688594", "0.5164134", "0.51624644", "0.51538324", "0.51466024", "0.51293385", "0.51293385", "0.51293385", "0.51293385", "0.51293385", "0.51293385", "0.51293385", "0.5127166", "0.5121238", "0.5118168", "0.5118168", "0.5118168", "0.5113605", "0.51004374", "0.5099158", "0.5095696", "0.5089637", "0.5076799", "0.5076799", "0.50728494", "0.50725585", "0.50663847", "0.5064816", "0.5064816", "0.5058861", "0.5058861", "0.5058861", "0.50570786", "0.50497276", "0.5049257", "0.50484556", "0.50394434", "0.5037752", "0.5029302", "0.502535", "0.50245917", "0.50245917", "0.50245917", "0.50242645", "0.50242645", "0.50242645", "0.50209385", "0.50209385", "0.5020418", "0.5005624", "0.5000967", "0.49988687" ]
0.0
-1
TODO Autogenerated method stub
@Override public void init(ServletConfig config) throws ServletException { super.init(config); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String uri = req.getRequestURI(); String action = uri.substring(uri.lastIndexOf('/') + 1); session = req.getSession(); path = req.getContextPath(); pw = resp.getWriter(); System.out.println(uri); switch (action) { case "check": try { this.checkAction(req,resp); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } break; case "index": this.checkSessionAction(req,resp); break; case "logout": this.logoutAction(req,resp); break; default: break; } return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private void logoutAction(HttpServletRequest req, HttpServletResponse resp) throws IOException { this.session.removeAttribute("MANAGEINSESSION"); resp.sendRedirect(path+"/jsps/index.jsp"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
private void checkSessionAction(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { req.getRequestDispatcher("/jsps/manage/index.jsp").forward(req, resp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private void checkAction(HttpServletRequest req, HttpServletResponse resp) throws SQLException, IOException { String account = req.getParameter("account"); String password = req.getParameter("password"); Manage manage = this.service.checkLogin(account, password); // 如果User不是空,证明账号密码正确 if (manage != null) { session.setAttribute("MANAGEINSESSION", manage); // resp.sendRedirect(path + "/jsps/manage/index.jsp"); pw.print(true); } else { pw.print(false); // resp.sendRedirect(path + "/jsps/manage/login.jsp"); } return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Created by artemsamsonov on 27.11.15.
public interface GenericDAO<T> { public T get(int id) throws PersistException; public void create(T e) throws PersistException; public void update(T e) throws PersistException; public void delete(T e) throws PersistException; public List<T> getAll() throws PersistException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\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}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void init() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private void init() {\n\n\t}", "public void mo38117a() {\n }", "@Override\n 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}", "@Override\n protected void init() {\n }", "@Override\n public void init() {}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private Rekenhulp()\n\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}", "public void mo4359a() {\n }", "@Override\n public int describeContents() { return 0; }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "private void m50366E() {\n }", "private void strin() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "Petunia() {\r\n\t\t}", "private void init() {\n\n\n\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 one() {\n\t\t\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}" ]
[ "0.59191126", "0.58096564", "0.5759425", "0.5639962", "0.5603626", "0.5603626", "0.558838", "0.55583006", "0.55504864", "0.55460584", "0.55377245", "0.5520028", "0.551602", "0.55144966", "0.5513578", "0.5495662", "0.5492932", "0.5492932", "0.5492932", "0.5492932", "0.5492932", "0.5478508", "0.54760224", "0.5475104", "0.54705673", "0.5460075", "0.545451", "0.54449075", "0.54250264", "0.54211676", "0.54211676", "0.5419411", "0.54065526", "0.5405027", "0.5403828", "0.53894246", "0.53894246", "0.53894246", "0.53894246", "0.53894246", "0.53894246", "0.53830844", "0.5380187", "0.5378576", "0.5367044", "0.5352242", "0.5352242", "0.5352242", "0.5349364", "0.53472775", "0.5343619", "0.53423905", "0.53338474", "0.53338474", "0.5332457", "0.5331835", "0.532633", "0.5324428", "0.5321868", "0.5321868", "0.5319001", "0.5317423", "0.5317423", "0.5317423", "0.53132594", "0.5311633", "0.5311633", "0.5311633", "0.5303107", "0.5296076", "0.52939564", "0.5289309", "0.528746", "0.5284019", "0.52814996", "0.52629846", "0.5256152", "0.5251196", "0.5234309", "0.5234309", "0.5234309", "0.5234309", "0.5234309", "0.5234309", "0.5234309", "0.5231496", "0.5228563", "0.52203846", "0.5219586", "0.5213415", "0.5213415", "0.5210776", "0.520758", "0.52063715", "0.51685625", "0.51675636", "0.5162887", "0.51590914", "0.51590914", "0.5154674", "0.5146834" ]
0.0
-1
For a HTTPURLConnection java uses configured proxy settings.
public void updateSystemSettings() { System.setProperty( "http.agent", Environment.getPhexVendor() ); if ( isHttpProxyUsed ) { System.setProperty( "http.proxyHost", httpProxyHost ); System.setProperty( "http.proxyPort", String.valueOf( httpProxyPort ) ); } else { System.setProperty( "http.proxyHost", "" ); System.setProperty( "http.proxyPort", "" ); } // cache DNS name lookups for only 30 minutes System.setProperty( "networkaddress.cache.ttl", "1800" ); Security.setProperty( "networkaddress.cache.ttl", "1800" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initProxy() {\n\n System.setProperty(\"http.proxyHost\", \"199.101.97.159\"); // set proxy server\n System.setProperty(\"http.proxyPort\", \"60099\"); // set proxy port\n //System.setProperty(\"http.proxyUser\", authUser);\n //System.setProperty(\"http.proxyPassword\", authPassword);\n Authenticator.setDefault(\n new Authenticator() {\n @Override\n public PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(\n authUser, authPassword.toCharArray());\n }\n }\n );\n }", "public void applyWebProxySettings() {\n boolean settingsChanged = false;\n boolean enablingProxy = false;\n Properties sysprops = System.getProperties();\n if (proxyHost != null) {\n settingsChanged = true;\n if (proxyHost.length() != 0) {\n traceSettingInfo();\n enablingProxy = true;\n sysprops.put(\"http.proxyHost\", proxyHost);\n String portString = Integer.toString(proxyPort);\n sysprops.put(\"http.proxyPort\", portString);\n sysprops.put(\"https.proxyHost\", proxyHost);\n sysprops.put(\"https.proxyPort\", portString);\n sysprops.put(\"ftp.proxyHost\", proxyHost);\n sysprops.put(\"ftp.proxyPort\", portString);\n if (nonProxyHosts != null) {\n sysprops.put(\"http.nonProxyHosts\", nonProxyHosts);\n sysprops.put(\"https.nonProxyHosts\", nonProxyHosts);\n sysprops.put(\"ftp.nonProxyHosts\", nonProxyHosts);\n }\n if(proxyUser!=null) {\n sysprops.put(\"http.proxyUser\", proxyUser);\n sysprops.put(\"http.proxyPassword\", proxyPassword);\n }\n } else {\n log(\"resetting http proxy\", Project.MSG_VERBOSE);\n sysprops.remove(\"http.proxyHost\");\n sysprops.remove(\"http.proxyPort\");\n sysprops.remove(\"http.proxyUser\");\n sysprops.remove(\"http.proxyPassword\");\n sysprops.remove(\"https.proxyHost\");\n sysprops.remove(\"https.proxyPort\");\n sysprops.remove(\"ftp.proxyHost\");\n sysprops.remove(\"ftp.proxyPort\");\n }\n }\n\n //socks\n if (socksProxyHost != null) {\n settingsChanged = true;\n if (socksProxyHost.length() != 0) {\n enablingProxy = true;\n sysprops.put(\"socksProxyHost\", socksProxyHost);\n sysprops.put(\"socksProxyPort\", Integer.toString(socksProxyPort));\n if (proxyUser != null) {\n //this may be a java1.4 thingy only\n sysprops.put(\"java.net.socks.username\", proxyUser);\n sysprops.put(\"java.net.socks.password\", proxyPassword);\n }\n\n } else {\n log(\"resetting socks proxy\", Project.MSG_VERBOSE);\n sysprops.remove(\"socksProxyHost\");\n sysprops.remove(\"socksProxyPort\");\n sysprops.remove(\"java.net.socks.username\");\n sysprops.remove(\"java.net.socks.password\");\n }\n }\n\n\n //for Java1.1 we need to tell the system that the settings are new\n if (settingsChanged &&\n JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) {\n legacyResetProxySettingsCall(enablingProxy);\n }\n }", "private void httpProxyConnect(String host, int port) throws IOException {\n // connect to the proxy\n // _proxyPort validated in superconstrutor, no need to set default here\n if (_fetchHeaderTimeout > 0) {\n _proxy = new Socket();\n _proxy.setSoTimeout(_fetchHeaderTimeout);\n _proxy.connect(new InetSocketAddress(_proxyHost, _proxyPort), _fetchHeaderTimeout);\n } else {\n _proxy = new Socket(_proxyHost, _proxyPort);\n }\n httpProxyConnect(_proxy, host, port);\n }", "public void setHttpProxyPort(int port);", "public interface IProxySettings\n{\n /**\n * @return The proxy type to be used. May not be <code>null</code>.\n */\n @Nonnull\n Proxy.Type getProxyType ();\n\n /**\n * @return The proxy host name of IP address. May be <code>null</code> if\n * proxy type is DIRECT.\n */\n @Nullable\n String getProxyHost ();\n\n /**\n * @return The proxy port for this HTTP proxy type. Should be &gt; 0. May be\n * &le; 0 if the proxy type is DIRECT.\n */\n int getProxyPort ();\n\n /**\n * @return The proxy user name. May be <code>null</code>.\n */\n @Nullable\n String getProxyUserName ();\n\n default boolean hasProxyUserName ()\n {\n return StringHelper.hasText (getProxyUserName ());\n }\n\n /**\n * @return The proxy password for the provided user. May be <code>null</code>.\n * Note: an empty password may be valid. Only <code>null</code>\n * indicates \"no password\".\n */\n @Nullable\n String getProxyPassword ();\n\n default boolean hasProxyPassword ()\n {\n return getProxyPassword () != null;\n }\n\n /**\n * Check if hostname and port match the ones from the provided\n * {@link InetSocketAddress}.\n *\n * @param aAddr\n * The address to compare with. May be <code>null</code>.\n * @return <code>true</code> if the unresolved hostname and the port match.\n */\n default boolean hasInetSocketAddress (@Nullable final InetSocketAddress aAddr)\n {\n return aAddr != null && EqualsHelper.equals (aAddr.getHostString (), getProxyHost ()) && getProxyPort () == aAddr.getPort ();\n }\n\n /**\n * Check if these settings have the provided socket address.\n *\n * @param aAddr\n * The socket address to compare to. May be <code>null</code>.\n * @return <code>true</code> if the proxy type is DIRECT and the address is\n * <code>null</code>, or if the object is of type\n * {@link InetSocketAddress} and the values match.\n * @see #hasInetSocketAddress(InetSocketAddress)\n */\n boolean hasSocketAddress (@Nullable SocketAddress aAddr);\n\n /**\n * @return A non-<code>null</code> {@link Proxy} instance. Only uses proxy\n * host and port.\n * @see #getProxyHost()\n * @see #getProxyPort()\n */\n @Nonnull\n default Proxy getAsProxy ()\n {\n return getAsProxy (true);\n }\n\n /**\n * @param bResolveHostname\n * <code>true</code> to resolve host names (needed in production) or\n * <code>false</code> to not resolve them (mainly for testing\n * purposes). This flag has no impact if the proxy type is DIRECT.\n * @return A non-<code>null</code> {@link Proxy} instance. Only uses proxy\n * host and port.\n * @see #getProxyHost()\n * @see #getProxyPort()\n */\n @Nonnull\n Proxy getAsProxy (boolean bResolveHostname);\n\n /**\n * @return The {@link PasswordAuthentication} instances matching the\n * credentials contained in this object or <code>null</code> if no\n * username is present.\n */\n @Nullable\n default PasswordAuthentication getAsPasswordAuthentication ()\n {\n // If no user name is set, no Authenticator needs to be created\n if (!hasProxyUserName ())\n return null;\n\n final String sProxyPassword = getProxyPassword ();\n // Constructor does not take null password!\n return new PasswordAuthentication (getProxyUserName (),\n sProxyPassword == null ? ArrayHelper.EMPTY_CHAR_ARRAY : sProxyPassword.toCharArray ());\n }\n}", "public void setProxyBaseUrl(String baseURL) {\n this.proxyBaseUrl = baseURL;\n }", "private HttpURLConnection createConnection() {\n try {\n HttpURLConnection httpURLConnection = this.httpProxyHost != null ? CONNECTION_FACTORY.create(this.url, this.createProxy()) : CONNECTION_FACTORY.create(this.url);\n httpURLConnection.setRequestMethod(this.requestMethod);\n return httpURLConnection;\n }\n catch (IOException iOException) {\n throw new HttpRequestException(iOException);\n }\n }", "Proxy getProxy();", "public void setHttpProxyHost(String host);", "protected static void setProxyLocation(URI proxyLocation) {\n Program.proxyLocation = proxyLocation;\n Program.proxyLocationSet = true;\n }", "@Override\n protected URLConnection openConnection(URL url, Proxy proxy) throws IOException {\n\n final HttpsURLConnectionImpl httpsURLConnection = (HttpsURLConnectionImpl) super.openConnection(url, proxy);\n if (\"artisan.okta.com\".equals(url.getHost()) && \"/home/amazon_aws/0oad7khqw5gSO701p0x7/272\".equals(url.getPath())) {\n\n return new URLConnection(url) {\n @Override\n public void connect() throws IOException {\n httpsURLConnection.connect();\n }\n\n public InputStream getInputStream() throws IOException {\n byte[] content = IOUtils.toByteArray(httpsURLConnection.getInputStream());\n String contentAsString = new String(content, \"UTF-8\");\n\n //System.out.println(\"########################## got stream content ##############################\");\n //System.out.println(contentAsString);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n //contentAsString = contentAsString.replaceAll(\",\\\"ENG_ENABLE_SCRIPT_INTEGRITY\\\"\", \"\"); // nested SRIs?\n baos.write(contentAsString.replaceAll(\"integrity ?=\", \"integrity.disabled=\").getBytes(\"UTF-8\"));\n return new ByteArrayInputStream(baos.toByteArray());\n }\n\n public OutputStream getOutputStream() throws IOException {\n return httpsURLConnection.getOutputStream();\n }\n\n };\n\n } else {\n return httpsURLConnection;\n }\n }", "public Proxy(){\n\t\tthis.useProxy = false;\n\t\tthis.host = null;\n\t\tthis.port = -1;\n\t}", "public ProxyConfig createProxyConfig();", "private void setInternalProxy(SimpleClientHttpRequestFactory requestFactory) {\n\t\tif (PAYASIA_MIND_PROXY_ENABLED_FOR_DEV) {\n\t\t\tProxy proxy = new Proxy(Type.HTTP, new InetSocketAddress(\n\t\t\t\t\tPAYASIA_MIND_PROXY_HOSTNAME, PAYASIA_MIND_PROXY_PORT));\n\t\t\trequestFactory.setProxy(proxy);\n\t\t}\n\t}", "private void internalHttpProxyConnect(String host, int port) throws IOException {\n // connect to the proxy\n _proxy = InternalSocket.getSocket(_proxyHost, _proxyPort);\n httpProxyConnect(_proxy, host, port);\n }", "public String getHttpProxyHost();", "public LoginInfoClientProxy(URL proxyURL) {\n this.proxyURL = proxyURL;\n }", "public void setProxyHost(String hostname) {\n proxyHost = hostname;\n }", "void setProxyConnectionState(ProxyConnectionState proxyConnectionState) {\n this.proxyConnectionState = proxyConnectionState;\n }", "@Override\n public URLConnection openConnection(URL url, Proxy proxy) throws IOException {\n if (url == null) {\n throw new IllegalArgumentException(\"url == null\");\n }\n String host = url.getHost();\n if (host == null || host.isEmpty() || host.equalsIgnoreCase(\"localhost\")) {\n return new FtpURLConnection(url);\n }\n // If a hostname is specified try to get the resource using FTP\n URL ftpURL = new URL(\"ftp\", host, url.getFile());\n return (proxy == null) ? ftpURL.openConnection() : ftpURL.openConnection(proxy);\n }", "public void setProxyPort(int proxyPort) {\n this.proxyPort = proxyPort;\n }", "public void setProxyPort(int proxyPort) {\n this.proxyPort = proxyPort;\n }", "public ProxySettings(Proxy proxy)\n {\n this(proxy, null, null);\n }", "private void httpProxyConnect(Socket proxy, String host, int port) throws IOException {\n _proxyIn = _proxy.getInputStream();\n _proxyOut = _proxy.getOutputStream();\n StringBuilder buf = new StringBuilder(64);\n buf.append(\"CONNECT \").append(host).append(':').append(port).append(\" HTTP/1.1\\r\\n\");\n // TODO if we need extra headers to the proxy, add a new method and list.\n // Standard extra headers go the server, not the proxy\n //if (_extraPHeaders != null) {\n // for (String hdr : _extraPHeaders) {\n // buf.append(hdr).append(\"\\r\\n\");\n //}\n if (_authState != null && _authState.authMode != AUTH_MODE.NONE) {\n // TODO untested, is this right?\n buf.append(\"Proxy-Authorization: \");\n buf.append(_authState.getAuthHeader(\"CONNECT\", host));\n buf.append(\"\\r\\n\");\n }\n buf.append(\"\\r\\n\");\n _proxyOut.write(DataHelper.getUTF8(buf.toString()));\n _proxyOut.flush();\n\n // read the proxy response\n _aborted = false;\n readHeaders();\n if (_aborted)\n throw new IOException(\"Timed out reading the proxy headers\");\n if (_responseCode == 407) {\n // TODO\n throw new IOException(\"Authorization unsupported on HTTP Proxy\");\n } else if (_responseCode != 200) {\n // readHeaders() will throw on most errors, but here we ensure it is 200\n throw new IOException(\"Invalid proxy response: \" + _responseCode + ' ' + _responseText);\n }\n if (_redirectLocation != null)\n throw new IOException(\"Proxy redirect not allowed\");\n }", "public int getHttpProxyPort();", "String getHttpProxyHost();", "public void setProxyPort(String proxyPort) {\n this.proxyPort = proxyPort;\n }", "protected void setProxiedClient(URL paramURL, String paramString, int paramInt, boolean paramBoolean) throws IOException {\n/* 143 */ this.delegate.setProxiedClient(paramURL, paramString, paramInt, paramBoolean);\n/* */ }", "int getHttpProxyPort();", "public void setProxy(Proxy proxy) {\n\t\tthis.proxy = proxy;\n\t}", "protected HTTPConnection getConnectionToURL(URL url) throws ProtocolNotSuppException\r\n {\r\n\r\n HTTPConnection con = new HTTPConnection(url);\r\n con.setDefaultHeaders(new NVPair[] { new NVPair(\"User-Agent\", \"Mozilla/4.5\")});\r\n con.setDefaultAllowUserInteraction(false);\r\n\r\n if (proxyRequired)\r\n {\r\n con.addBasicAuthorization(proxyRealm, proxyName, proxyPswd);\r\n }\r\n\r\n return (con);\r\n }", "public void setDefaultProxyConfig(ProxyConfig config);", "public Proxy getProxy() {\n return proxy;\n }", "protected boolean legacyResetProxySettingsCall(boolean setProxy) {\n System.getProperties().put(\"http.proxySet\", new Boolean(setProxy).toString());\n try {\n Class c = Class.forName(\"sun.net.www.http.HttpClient\");\n Method reset = c.getMethod(\"resetProperties\", null);\n reset.invoke(null, null);\n return true;\n }\n catch (ClassNotFoundException cnfe) {\n return false;\n }\n catch (NoSuchMethodException e) {\n return false;\n }\n catch (IllegalAccessException e) {\n return false;\n }\n catch (InvocationTargetException e) {\n return false;\n }\n }", "public String getProxyPort()\r\n {\r\n return proxyPort;\r\n }", "public int getProxyPort() {\n return proxyPort;\n }", "public int getProxyPort() {\n return proxyPort;\n }", "public void setProxyHost(String proxyHost) {\n this.proxyHost = proxyHost;\n }", "private HttpProxyCacheServer getProxy() {\n\n return proxy == null ? (proxy = newProxy()) : proxy;\n }", "public MyProxyLogon() {\n super();\n host = System.getenv(\"MYPROXY_SERVER\");\n if (host == null) {\n host = \"myproxy.teragrid.org\";\n }\n String portString = System.getenv(\"MYPROXY_SERVER_PORT\");\n if (portString != null) {\n port = Integer.parseInt(portString);\n }\n username = System.getProperty(\"user.name\");\n }", "public void configure(URLConnection c) {\n }", "public HttpProxyConfigResponse httpProxyConfig() {\n return this.httpProxyConfig;\n }", "public void setProxyHost(java.lang.String newProxyHost)\r\n {\r\n System.out.println(\"Host: \" + newProxyHost);\r\n proxyHost = newProxyHost;\r\n }", "public final GetHTTP setProxyHost(final String proxyHost) {\n properties.put(PROXY_HOST_PROPERTY, proxyHost);\n return this;\n }", "public final GetHTTP setProxyPort(final String proxyPort) {\n properties.put(PROXY_PORT_PROPERTY, proxyPort);\n return this;\n }", "public void setProxyPort(int port) {\n proxyPort = port;\n }", "public boolean isProxyEnabled() {\n return isProxyEnabled;\n }", "protected void addProxyConnectionHeader(HttpState state,\n HttpConnection conn)\n throws IOException, HttpException {\n LOG.trace(\"enter HttpMethodBase.addProxyConnectionHeader(\"\n + \"HttpState, HttpConnection)\");\n if (!conn.isTransparent()) {\n setRequestHeader(\"Proxy-Connection\", \"Keep-Alive\");\n }\n }", "public java.lang.String getProxyHost()\r\n {\r\n return proxyHost;\r\n }", "public void setProxyAddress(String proxyAddress) {\n this.proxyAddress = proxyAddress;\n }", "public String getProxyHost() {\n return proxyHost;\n }", "public String getProxyPort() {\n return proxyPort;\n }", "public void setProxyUser(String proxyUser) {\n this.proxyUser = proxyUser;\n }", "public void setProxyPort(String newProxyPort)\r\n {\r\n proxyPort = newProxyPort;\r\n }", "public void setProxyUsername(String proxyUsername) {\n this.proxyUsername = proxyUsername;\n }", "private void setHttpclientProxy(DefaultHttpClient httpClient) {\r\n Proxy proxy = ProxyProvider.getProxy();\r\n String proxyUser = ProxyProvider.getProxyUserName();\r\n String proxyPwd = ProxyProvider.getProxyUserPassword();\r\n // set by other components like tSetProxy\r\n if (proxy != null) {\r\n\r\n final HttpHost httpHost = new HttpHost(((InetSocketAddress) proxy.address()).getHostName(),\r\n ((InetSocketAddress) proxy.address()).getPort());\r\n // Sets usage of HTTP proxy\r\n httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, httpHost);\r\n\r\n // Sets proxy authentication, if credentials were provided\r\n // TODO Because the proxy of get accesToken can't support authentication. remove this ?\r\n if (proxyUser != null && proxyPwd != null) {\r\n httpClient.getCredentialsProvider().setCredentials(new AuthScope(httpHost),\r\n new UsernamePasswordCredentials(proxyUser, proxyPwd));\r\n }\r\n\r\n }\r\n\r\n }", "public ProxyConfiguration(@NotNull String proxyName, int port) {\n this.host = new HttpHost(proxyName, port);\n }", "public interface ProxyConnector {\n\n /**\n * Comprueba que se cumplan los requisitos para la conexi&oacute;n con el servicio proxy.\n * @throws IOException Cuando ocurre alg&uacute;n error en la comprobaci&oacute;n.\n */\n void init() throws IOException;\n\n /**\n * Comprueba si el servicio configurado pertenece a un proxy compatible.\n * @return {@code true} si el proxy configurado es compatible, {@code false} en caso contrario.\n * @throws IOException Cuando se produce un error al conectarse al proxy.\n */\n boolean isCompatibleService() throws IOException;\n\n /**\n * Indica si el servicio de Portafirmas correspondiente a este conector requiere un proceso\n * de login previo.\n * @return {@code true} si el servicio requiere login, {@code false} en caso contrario.\n */\n boolean needLogin();\n\n /**\n * Solicita el acceso para el usuario.\n * @return Respuesta a la petici&oacute;n con el token de acceso.\n * @throws Exception Cuando ocurre un error en la comunicaci&oacute;n.\n */\n RequestResult loginRequest() throws Exception;\n\n /**\n * Envia el token de acceso firmado al servidor para validar el acceso del usuario.\n * @param pkcs1 Firma PKCS#1 del token de acceso.\n * @param cert Certificado usado para firmar.\n * @return @code true} si el acceso se completo correctamente, {@code false} en caso contrario.\n * @throws Exception Cuando ocurre un error en la comunicaci&oacute;n.\n */\n boolean tokenValidation(byte[] pkcs1, String cert) throws Exception;\n\n /**\n * Env&aacute;a una solicitud de cierre de sesi&oacute;n.\n * @throws Exception Cuando se produce un error en la comunicaci&oacute;n.\n */\n void logoutRequest() throws Exception;\n\n /**\n * Obtiene la peticiones de firma. Las peticiones devueltas deben cumplir\n * las siguientes condiciones:\n * <ul>\n * <li>Estar en el estado se&ntilde;alado (unresolved, signed o rejected).</li>\n * <li>Que todos los documentos que contiene se tengan que firmar con los\n * formatos de firma indicados (s&oacute;lo si se indica alguno)</li>\n * <li>Que las solicitudes cumplan con los filtros establecidos. Estos\n * filtros tendran la forma: key=value</li>\n * </ul>\n * @param signRequestState Estado de las peticiones que se desean obtener.\n * @param filters\n * Listado de filtros que deben cumplir las peticiones\n * recuperadas. Los filtros soportados son:\n * <ul>\n * <li><b>orderAscDesc:</b> con valor \"asc\" para que sea orden\n * ascendente en la consulta, en cualquier otro caso ser&aacute;\n * descendente</li>\n * <li><b>initDateFilter:</b> fecha de inicio de las peticiones</li>\n * <li><b>endDateFilter:</b> fecha de fin de las peticiones</li>\n * <li><b>orderAttribute:</b> par&aacute;metro para ordenar por\n * una columna de la petici&oacute;n</li>\n * <li><b>searchFilter:</b> busca la cadena introducida en\n * cualquier texto de la petici&oacute;n (asunto, referencia,\n * etc)</li>\n * <li><b>labelFilter:</b> texto con el nombre de una etiqueta.\n * Filtra las peticiones en base a esa etiqueta, ej: \"IMPORTANTE\"\n * </li>\n * <li><b>applicationFilter:</b> texto con el identificador de\n * una aplicaci&oacute;n. Filtra las peticiones en base a la\n * aplicaci&oacute;n, ej: \"SANCIONES\"</li>\n * </ul>\n * @param numPage N&uacute;mero de p&aacute;gina del listado.\n * @param pageSize N&uacute;mero de peticiones por p&aacute;gina.\n * @return Lista de peticiones de firma\n * @throws SAXException\n * Si el XML obtenido del servidor no puede analizarse\n * @throws IOException\n * Si ocurre un error de entrada / salida\n */\n PartialSignRequestsList getSignRequests(\n String signRequestState, String[] filters, int numPage, int pageSize)\n throws SAXException, IOException;\n\n /** Inicia la pre-firma remota de las peticiones.\n * @param request Petici&oacute;n de firma.\n * @return Prefirmas de las peticiones enviadas.\n * @throws IOException Si ocurre algun error durante el tratamiento de datos.\n * @throws CertificateEncodingException Si no se puede obtener la codificaci&oacute;n del certificado.\n * @throws SAXException Si ocurren errores analizando el XML de respuesta. */\n TriphaseRequest[] preSignRequests(SignRequest request) throws IOException,\n CertificateException,\n SAXException;\n\n /**\n * Inicia la post-firma remota de las peticiones.\n *\n * @param requests\n * Peticiones a post-firmar\n * @return Listado con el resultado de la operaci&oacute;n de firma de cada\n * petici&oacute;n.\n * @throws IOException\n * Si ocurre algun error durante el proceso\n * @throws CertificateEncodingException\n * Cuando el certificado est&aacute; mal codificado.\n * @throws SAXException\n * Si ocurren errores analizando el XML de respuesta\n */\n RequestResult postSignRequests(TriphaseRequest[] requests) throws IOException,\n CertificateEncodingException, SAXException;\n\n /**\n * Obtiene los datos de un documento.\n *\n * @param requestId\n * Identificador de la petici&oacute;n.\n * @return Datos del documento.\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n RequestDetail getRequestDetail(String requestId) throws SAXException, IOException;\n\n /**\n * Obtiene el listado de aplicaciones para las que hay peticiones de firma.\n * @return Configuracion de aplicaci&oacute;n.\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n AppConfiguration getApplicationList()\n throws SAXException, IOException;\n\n /**\n * Rechaza las peticiones de firma indicadas.\n *\n * @param requestIds\n * Identificadores de las peticiones de firma que se quieren\n * rechazar.\n * @return Resultado de la operacion para cada una de las peticiones de\n * firma.\n * @throws SAXException\n * Si el XML obtenido del servidor no puede analizarse\n * @throws IOException\n * Si ocurre un error de entrada / salida\n */\n RequestResult[] rejectRequests(String[] requestIds,\n String reason) throws SAXException, IOException;\n\n /** Obtiene la previsualizaci&oacute;n de un documento.\n * @param documentId Identificador del documento.\n * @param filename Nombre del fichero.\n * @param mimetype MIME-Type del documento.\n * @return Datos del documento.\n * @throws IOException Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor. */\n DocumentData getPreviewDocument(String documentId,\n String filename,\n String mimetype) throws IOException;\n\n /** Obtiene la previsualizaci&oacute;n de una firma.\n * @param documentId Identificador del documento.\n * @param filename Nombre del fichero.\n * @return Datos del documento.\n * @throws IOException Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor. */\n DocumentData getPreviewSign(String documentId,\n String filename) throws IOException;\n\n /** Obtiene la previsualizaci&oacute;n de un informe de firma.\n * @param documentId Identificador del documento.\n * @param filename Nombre del fichero.\n * @param mimetype MIME-Type del documento.\n * @return Datos del documento.\n * @throws IOException Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor. */\n DocumentData getPreviewReport(String documentId,\n String filename, String mimetype) throws IOException;\n\n /**\n * Aprueba peticiones de firma (les da el visto bueno).\n *\n * @param requestIds\n * Identificador de las peticiones.\n * @return Resultado de la operaci&oacute;n.\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n RequestResult[] approveRequests(String[] requestIds) throws SAXException, IOException;\n\n /**\n * Indica si el conector soporta las funciones de notificaci&oacute;n.\n * @return {@code true} si se soportan las notificaciones, {@code false} en caso contrario.\n */\n boolean isNotificationsSupported();\n\n /**\n * Da de alta en el sistema de notificaciones.\n * @param token\n * \t\t\tToken de registro en GCM.\n * @param device\n * \t\t\tIdentificador de dispositivo.\n * @param certB64\n * \t\t\tCertificado en base 64 del usuario.\n * @return Resultado del proceso de alta en el sistema de notificaciones.\n * \t\t\tIndica\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n NotificationState signOnNotificationService(\n String token, String device, String certB64)\n throws SAXException, IOException;\n\n\n}", "protected void setProxiedClient(URL paramURL, String paramString, int paramInt) throws IOException {\n/* 127 */ this.delegate.setProxiedClient(paramURL, paramString, paramInt);\n/* */ }", "static void saveProxyConfig(final String proxyUrl) {\r\n\t\tAppPreferences.setUrlProxy(proxyUrl);\r\n\t}", "public void setProxyPassword(String proxyPassword) {\n this.proxyPassword = proxyPassword;\n }", "public void setProxyPassword(String proxyPassword) {\n this.proxyPassword = proxyPassword;\n }", "public void addProxyConfig(ProxyConfig config);", "public Proxy getProxy(){\n mode = COMMAND_MODE;\n pack();\n show();\n return proxy;\n }", "public void testURL()\r\n {\r\n\r\n BufferedReader in = null;\r\n PrintStream holdErr = System.err;\r\n String errMsg = \"\";\r\n try\r\n {\r\n\r\n this.setSuccess(false);\r\n\r\n PrintStream fileout = new PrintStream(new FileOutputStream(\"testURLFile.html\"));\r\n System.setErr(fileout);\r\n System.err.println(\"testURL() - entry\");\r\n\r\n System.getProperties().put(\"https.proxyHost\", \"\" + this.getProxyHost());\r\n System.getProperties().put(\"https.proxyPort\", \"\" + this.getProxyPort());\r\n System.getProperties().put(\"http.proxyHost\", \"\" + this.getProxyHost());\r\n System.getProperties().put(\"http.proxyPort\", \"\" + this.getProxyPort());\r\n // System.getProperties().put(\"java.protocol.handler.pkgs\", \"com.sun.net.ssl.internal.www.protocol\");\r\n\r\n URL url = new URL(\"http://www.msn.com\");\r\n\r\n CookieModule.setCookiePolicyHandler(null); // Accept all cookies\r\n // Set the Authorization Handler\r\n // This will let us know waht we are missing\r\n DefaultAuthHandler.setAuthorizationPrompter(this);\r\n HTTPConnection con = new HTTPConnection(url);\r\n con.setDefaultHeaders(new NVPair[] { new NVPair(\"User-Agent\", \"Mozilla/4.5\")});\r\n con.setDefaultAllowUserInteraction(false);\r\n HTTPResponse headRsp = con.Head(url.getFile());\r\n HTTPResponse rsp = con.Get(url.getFile());\r\n\r\n int sts = headRsp.getStatusCode();\r\n if (sts < 300)\r\n {\r\n System.err.println(\"No authorization required to access \" + url);\r\n this.setSuccess(true);\r\n }\r\n else if (sts >= 400 && sts != 401 && sts != 407)\r\n {\r\n System.err.println(\"Error trying to access \" + url + \":\\n\" + headRsp);\r\n }\r\n else if (sts == 407)\r\n {\r\n System.err.println(\r\n \"Error trying to access \"\r\n + url\r\n + \":\\n\"\r\n + headRsp\r\n + \"\\n\"\r\n + \"<HTML><HEAD><TITLE>Proxy authorization required</TITLE></HEAD>\");\r\n this.setMessage(\"Error trying to access \" + url + \":\\n\" + headRsp + \"\\n\" + \"Proxy authorization required\");\r\n }\r\n // Start reading input\r\n in = new BufferedReader(new InputStreamReader(rsp.getInputStream()));\r\n String inputLine;\r\n\r\n while ((inputLine = in.readLine()) != null)\r\n {\r\n System.err.println(inputLine);\r\n }\r\n // All Done - We were success\r\n\r\n in.close();\r\n\r\n }\r\n catch (ModuleException exc)\r\n {\r\n errMsg = \"ModuleException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n catch (ProtocolNotSuppException exc)\r\n {\r\n errMsg = \"ProtocolNotSuppException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n catch (MalformedURLException exc)\r\n {\r\n errMsg = \"MalformedURLException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n catch (FileNotFoundException exc)\r\n {\r\n errMsg = \"FileNotFoundException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n catch (IOException exc)\r\n {\r\n errMsg = \"IOException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n finally\r\n {\r\n System.err.println(\"testURL() - exit\");\r\n System.setErr(holdErr);\r\n if (in != null)\r\n {\r\n try\r\n {\r\n in.close(); // ENSURE we are CLOSED\r\n }\r\n catch (Exception exc)\r\n {\r\n // Do Nothing, It will be throwing an exception \r\n // if it cannot close the buffer\r\n }\r\n }\r\n this.setMessage(errMsg);\r\n System.gc();\r\n }\r\n\r\n }", "public static void updateProxySettings(String host,String port,String username,String password){\n\t\tHttpPosterCommons.host\t\t\t= (!host.equals(\"\"))?host:HttpPosterCommons.host;\n\t\tHttpPosterCommons.port \t\t\t= (!port.equals(\"\"))?port:HttpPosterCommons.port;\n\t\tHttpPosterCommons.username\t\t= (!username.equals(\"\"))?username:HttpPosterCommons.username;\n\t\tHttpPosterCommons.password \t\t= (!password.equals(\"\"))?password:HttpPosterCommons.password;\t\t\n\t}", "HttpProxy(final Integer port,\n final Integer securePort,\n final Integer socksPort,\n final Integer directLocalPort,\n final Integer directLocalSecurePort,\n final String directRemoteHost,\n final Integer directRemotePort) {\n\n this.port = port;\n this.securePort = securePort;\n this.socksPort = socksPort;\n this.directLocalPort = directLocalPort;\n this.directLocalSecurePort = directLocalSecurePort;\n this.directRemoteHost = directRemoteHost;\n this.directRemotePort = directRemotePort;\n\n hasStarted = SettableFuture.create();\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n ChannelFuture httpChannel = createHTTPChannel(port, securePort);\n ChannelFuture httpsChannel = createHTTPSChannel(securePort);\n ChannelFuture socksChannel = createSOCKSChannel(socksPort, port);\n ChannelFuture directChannel = createDirectChannel(directLocalPort, directRemoteHost, directRemotePort);\n ChannelFuture directSecureChannel = createDirectSecureChannel(directLocalSecurePort, directRemoteHost, directRemotePort);\n\n if (httpChannel != null) {\n // create system wide proxy settings for HTTP CONNECT\n proxyStarted(port, false);\n }\n if (socksChannel != null) {\n // create system wide proxy settings for SOCKS\n proxyStarted(socksPort, true);\n }\n hasStarted.set(\"STARTED\");\n\n waitForClose(httpChannel);\n waitForClose(httpsChannel);\n waitForClose(socksChannel);\n waitForClose(directChannel);\n waitForClose(directSecureChannel);\n } catch (Exception ie) {\n logger.error(\"Exception while running proxy channels\", ie);\n } finally {\n bossGroup.shutdownGracefully();\n workerGroup.shutdownGracefully();\n }\n }\n }).start();\n\n try {\n // wait for proxy to start all channels\n hasStarted.get();\n } catch (Exception e) {\n logger.debug(\"Exception while waiting for proxy to complete starting up\", e);\n }\n }", "public java.lang.String getProxyScheme()\r\n {\r\n return proxyScheme;\r\n }", "ProxyConnectionState getProxyConnectionState() {\n return proxyConnectionState;\n }", "@Nonnull\n public String getProxyHost() {\n return proxyHost;\n }", "public void setProxyPort(int newProxyPort)\r\n {\r\n System.out.println(\"Port: \" + newProxyPort);\r\n proxyPort = \"\" + newProxyPort;\r\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Set the HTTP proxy server.\")\n @JsonProperty(JSON_PROPERTY_HTTP_PROXY)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getHttpProxy() {\n return httpProxy;\n }", "public ClientBuilder proxy(@Nullable Proxy proxy) {\n this.proxy = proxy;\n return this;\n }", "public ProxySettings(Proxy proxy, final String username, final char[] password)\n {\n if (proxy == null)\n {\n throw new IllegalArgumentException(\"Proxy cannot be null\");\n }\n\n if (proxy.type() == Type.DIRECT)\n {\n throw new IllegalArgumentException(\"Proxy settings cannot be configured to be DIRECT\");\n }\n\n this.proxy = proxy;\n\n if (username != null && username.isEmpty())\n {\n throw new IllegalArgumentException(\"Username cannot be an empty string\");\n }\n\n if (password != null && password.length == 0)\n {\n throw new IllegalArgumentException(\"Password cannot be an empty string\");\n }\n\n this.username = username;\n this.password = password;\n }", "private void traceSettingInfo() {\n log(\"Setting proxy to \"\n + (proxyHost != null ? proxyHost : \"''\")\n + \":\" + proxyPort,\n Project.MSG_VERBOSE);\n }", "public String getProxyUsername() {\n return proxyUsername;\n }", "public String getProxyPassword() {\n return proxyPassword;\n }", "private void setupAndConnect() {\n URL url = getUrl(this.endpointUrl);\n connection = null;\n try {\n connection = (HttpURLConnection) url.openConnection();\n HttpURLConnection.setFollowRedirects(true);\n } catch (IOException e) {\n LOG.severe(\"Error connecting to Url : \" + url);\n LOG.severe(e.toString());\n }\n }", "private List<String> openUrlViaProxy(Proxy proxy, String apiurl)\n throws Exception {\n\n List<String> response = new ArrayList<>();\n URL url = new URL(apiurl);\n HttpURLConnection uc = (HttpURLConnection) url.openConnection(proxy);\n uc.connect();\n\n BufferedReader in = new BufferedReader(new InputStreamReader(\n uc.getInputStream()));\n\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n response.add(inputLine);\n }\n in.close();\n return response;\n }", "public HttpProxy(int port)\n {\n thisPort = port;\n }", "public ConfigProxy(String hostName, int port){\n \n try {\n benchSocket = new Socket(hostName, port);\n } catch (IOException ex) {\n }\n \n try {\n in = new ObjectInputStream (benchSocket.getInputStream());\n } catch (IOException ex) {\n }\n try {\n out = new ObjectOutputStream (benchSocket.getOutputStream());\n } catch (IOException ex) {\n }\n }", "protected static void setProxyUsername(String username) {\n Program.proxyUsername = username;\n proxyUsernameSet = true;\n }", "protected void addProxyAuthorizationRequestHeader(HttpState state,\n HttpConnection conn)\n throws IOException, HttpException {\n LOG.trace(\"enter HttpMethodBase.addProxyAuthorizationRequestHeader(\"\n + \"HttpState, HttpConnection)\");\n\n // add proxy authorization header, if needed\n if (getRequestHeader(HttpAuthenticator.PROXY_AUTH_RESP) == null) {\n Header[] challenges = getResponseHeaderGroup().getHeaders(\n HttpAuthenticator.PROXY_AUTH);\n if (challenges.length > 0) {\n try {\n AuthScheme authscheme = HttpAuthenticator.selectAuthScheme(challenges);\n HttpAuthenticator.authenticateProxy(authscheme, this, conn, state);\n } catch (HttpException e) {\n // log and move on\n if (LOG.isErrorEnabled()) {\n LOG.error(e.getMessage(), e);\n }\n }\n }\n }\n }", "public static ProxyInfo getProxyInfo( Settings settings )\n {\n ProxyInfo proxyInfo = null;\n if ( settings != null && settings.getActiveProxy() != null )\n {\n Proxy settingsProxy = settings.getActiveProxy();\n\n proxyInfo = new ProxyInfo();\n proxyInfo.setHost( settingsProxy.getHost() );\n proxyInfo.setType( settingsProxy.getProtocol() );\n proxyInfo.setPort( settingsProxy.getPort() );\n proxyInfo.setNonProxyHosts( settingsProxy.getNonProxyHosts() );\n proxyInfo.setUserName( settingsProxy.getUsername() );\n proxyInfo.setPassword( settingsProxy.getPassword() );\n }\n\n return proxyInfo;\n }", "private OkHttpClient Create() {\n final OkHttpClient.Builder baseClient = new OkHttpClient().newBuilder()\n .connectTimeout(CONNECTION_TIMEOUT, TimeUnit.SECONDS)\n .writeTimeout(WRITE_TIMEOUT, TimeUnit.SECONDS)\n .readTimeout(READ_TIMEOUT, TimeUnit.SECONDS);\n\n // If there's no proxy just create a normal client\n if (appProps.getProxyHost().isEmpty()) {\n return baseClient.build();\n }\n\n final OkHttpClient.Builder proxyClient = baseClient\n .proxy(new java.net.Proxy(java.net.Proxy.Type.HTTP, new InetSocketAddress(appProps.getProxyHost(), Integer.parseInt(appProps.getProxyPort()))));\n\n if (!appProps.getProxyUsername().isEmpty() && !appProps.getProxyPassword().isEmpty()) {\n\n Authenticator proxyAuthenticator;\n String credentials;\n\n credentials = Credentials.basic(appProps.getProxyUsername(), appProps.getProxyPassword());\n\n // authenticate the proxy\n proxyAuthenticator = (route, response) -> response.request().newBuilder()\n .header(\"Proxy-Authorization\", credentials)\n .build();\n proxyClient.proxyAuthenticator(proxyAuthenticator);\n }\n return proxyClient.build();\n\n }", "@Override\n\tpublic boolean usingProxy() {\n\t\treturn false;\n\t}", "public HttpClientWrapper(String url, String user, String pwd, String proxyDns, int proxyPort) {\n this.url = url;\n if ( user == null && pwd == null ) {\n this.creds = null;\n } else if ( user != null && pwd != null ) {\n this.creds = new UsernamePasswordCredentials(user, pwd);\n } else {\n throw new DBCException(\"user / pwd either both null or both not null: \" + user + \" - \" + pwd);\n }\n if ( (proxyDns == null && proxyPort == 0) || (proxyDns != null && proxyPort > 0) ) {\n // ok\n } else {\n throw new DBCException(\"proxyDns / proxyPort either both null/0 or both not null/>0: \" + proxyDns + \" - \" + proxyPort);\n }\n\n this.requestConfig = RequestConfig.custom().setConnectionRequestTimeout(5000).build();\n\n SSLContext sslContext = buildSSLContext();\n SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext, new HostnameVerifier() {\n @Override\n public boolean verify(String hostname, SSLSession session) {\n LOG.info(\"accepting SSLConnection for host: {}, port: {}\", session.getPeerHost(), session.getPeerPort());\n return true;\n }\n });\n\n ConnectionConfig connectionConfig = ConnectionConfig.custom().setCharset(Charset.forName(UTF_8)).build();\n PlainConnectionSocketFactory plainSF = PlainConnectionSocketFactory.getSocketFactory();\n\n RegistryBuilder<ConnectionSocketFactory> regBuilder = RegistryBuilder.<ConnectionSocketFactory> create();\n Registry<ConnectionSocketFactory> registry = regBuilder.register(\"http\", plainSF).register(\"https\", sslsf).build();\n\n PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(registry);\n connectionManager.setMaxTotal(200);\n connectionManager.setDefaultMaxPerRoute(100);\n connectionManager.setValidateAfterInactivity(10000); // good value for the check interval?\n connectionManager.setDefaultConnectionConfig(connectionConfig);\n\n HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();\n httpClientBuilder.setConnectionManager(connectionManager);\n\n if ( proxyDns != null ) {\n // add one step proxy support\n HttpHost proxy = new HttpHost(proxyDns, proxyPort);\n DefaultProxyRoutePlanner routePlanner = new DefaultProxyRoutePlanner(proxy);\n httpClientBuilder.setRoutePlanner(routePlanner);\n }\n\n this.client = httpClientBuilder.build();\n this.idleConnectionMonitorThread = new IdleConnectionMonitorThread(connectionManager);\n new Thread(null, this.idleConnectionMonitorThread, \"IdleConn\").start();\n }", "private void setupHttpConnectionStuff() {\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO) {\n System.setProperty(\"http.keepAlive\", \"false\");\n }\n if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n try {\n final File httpCacheDir = new File(getCacheDir(), \"http\");\n HttpResponseCache.install(httpCacheDir, TEN_MEGABYTES);\n } catch (IOException ioe) {\n Log.e(Constants.LOG_TAG, \"Could not install http cache on this device.\");\n }\n }\n }", "@Nullable\n public ProxyInfo getProxyInfo() {\n return mProxyInfo;\n }", "public int getProxyPort() {\n return cfg.getProxyPort();\n }", "@Override\n\tpublic Credential authenticateProxy(Proxy proxy, URL url,\n\t\t\tList<Challenge> challenges) throws IOException {\n\t\treturn null;\n\t}", "public Proxy(String host, int port){\n\t\tthis.useProxy = true;\n\t\tthis.host = host;\n\t\tthis.port = port;\n\t}", "public ProxyInfo getInitialProxyInfo() {\n if (mIpConfiguration != null) {\n return mIpConfiguration.getHttpProxy();\n } else {\n return null;\n }\n }", "@Override\r\n\tpublic void exec() {\n\t\tHttpRequestHead hrh = null;\r\n\t\tint headSize = 0;\r\n\t\tboolean isSentHead = false;\r\n\t\ttry {\r\n\t\t\tArrays.fill(buffer, (byte) 0);\r\n\t\t\tint getLen = 0;\r\n\t\t\tboolean getHead = false;\r\n\t\t\tint mode = 0;\r\n\t\t\tlong contentLength = 0;\r\n\t\t\twhile (!proxy.isClosed.get()) {\r\n\t\t\t\tint nextread = inputStream.read(buffer, getLen, buffer.length - getLen);\r\n\t\t\t\tif (nextread == -1) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tgetLen += nextread;\r\n\t\t\t\tif (!getHead) {\r\n\t\t\t\t\tif ((headSize = Proxy.protocol.validate(buffer, getLen)) > 0) {\r\n\t\t\t\t\t\thrh = (HttpRequestHead) Proxy.protocol.decode(buffer);\r\n\t\t\t\t\t\tlog.debug(proxy.uuid + debug + \"传入如下请求头:\" + new String(Proxy.protocol.encode(hrh)));\r\n\t\t\t\t\t\t\r\n//\t\t\t\t\t\tif(\"keep-alive\".equals(hrh.getHead(\"Connection\")))\r\n//\t\t\t\t\t\t\tkeepAlive = true;\r\n\t\t\t\t\t\tif (\"chunked\".equals(hrh.getHead(\"Transfer-Encoding\")))\r\n\t\t\t\t\t\t\tmode = 2;\r\n\t\t\t\t\t\tif (!StringUtils.isBlank(hrh.getHead(\"Content-Length\"))) {\r\n\t\t\t\t\t\t\tmode = 1;\r\n\t\t\t\t\t\t\tcontentLength = Long.valueOf(hrh.getHead(\"Content-Length\"));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tString forward = hrh.getHead(\"X-Forwarded-For\");\r\n\t\t\t\t\t\tif (!StringUtils.isBlank(forward))\r\n\t\t\t\t\t\t\tforward += \",\";\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tforward = \"\";\r\n\t\t\t\t\t\tforward += proxy.source.getInetAddress().getHostAddress();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\thrh.addHead(\"X-Forwarded-For\", forward);\r\n\t\t\t\t\t\thrh.addHead(\"X-Forwarded-Proto\", \"http\");\r\n\t\t\t\t\t\thrh.addHead(\"X-Forwarded-Host\", CoreDef.config.getString(\"serverIp\"));\r\n\r\n\t\t\t\t\t\tgetHead = true;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// http访问代理服务器模式\r\n//\t\t\t\t\t\tInetAddress addr = InetAddress.getByName(hrh.getHead(\"host\"));\r\n//\t\t\t\t\t\tproxy.destination = new Socket(addr, 80);\r\n//\t\t\t\t\t\toutputStream = proxy.destination.getOutputStream();\r\n//\t\t\t\t\t\tproxy.sender = new ServerChannel(proxy);\r\n//\t\t\t\t\t\tproxy.sender.begin(\"peer - \" + this.getTaskId());\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theadSize = 0;\r\n\t\t\t\t\t\tif (getLen > buffer.length - 128)\r\n\t\t\t\t\t\t\tbuffer = Arrays.copyOf(buffer, buffer.length * 10);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(!isSentHead) {\r\n\t\t\t\t\tisSentHead = true;\r\n\t\t\t\t\tlog.debug(proxy.uuid + \"为\" + debug + \"转发了如下请求头:\" + new String(Proxy.protocol.encode(hrh)));\r\n\t\t\t\t\toutputStream.write(Proxy.protocol.encode(hrh));\r\n//\t\t\t\t\tswitch (mode) {\r\n//\t\t\t\t\tcase 1:\r\n//\t\t\t\t\t\toutputStream.write(buffer, headSize, getLen - headSize);\r\n//\t\t\t\t\t\tcontentLength -= getLen - headSize;\r\n//\t\t\t\t\t\tbreak;\r\n//\t\t\t\t\tcase 2:\r\n//\t\t\t\t\t\tcontentLength += getChunkedContentSize(buffer, headSize, getLen - headSize);\r\n//\t\t\t\t\t\toutputStream.write(buffer, headSize, getLen - headSize);\r\n//\t\t\t\t\t\tcontentLength -= getLen - headSize;\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\tswitch (mode) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\toutputStream.write(buffer, headSize, getLen-headSize);\r\n\t\t\t\t\tcontentLength -= getLen - headSize;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tcontentLength += getChunkedContentSize(buffer, headSize, getLen-headSize);\r\n\t\t\t\t\toutputStream.write(buffer, 0, getLen);\r\n\t\t\t\t\tcontentLength -= getLen - headSize;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\theadSize = 0;\r\n\t\t\t\tif(contentLength == 0) {\r\n\t\t\t\t\tgetHead = false;\r\n\t\t\t\t\tisSentHead = false;\r\n\t\t\t\t}\r\n\t\t\t\tgetLen = 0;\r\n\t\t\t\tArrays.fill(buffer, (byte) 0);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.info(proxy.uuid + \"与客户端通信发生异常\" + Utils.getStringFromException(e));\r\n\t\t\tlog.info(proxy.uuid + \"最后的数据如下\" + new String(buffer).trim());\r\n\t\t\t\r\n\t\t} finally {\r\n\t\t\tlog.info(proxy.uuid + \"与客户端通信,试图关闭端口\");\r\n\t\t\tproxy.close();\r\n\t\t}\r\n\t}", "private void checkForProxy() {\r\n System.setProperty(\"java.net.useSystemProxies\", \"true\"); //$NON-NLS-1$ //$NON-NLS-2$\r\n TransportLogger.getSysAuditLogger().debug(\"Detecting system proxies\"); //$NON-NLS-1$\r\n List<Proxy> l = null;\r\n try {\r\n l = ProxySelector.getDefault().select(\r\n new URI(\"https://mws.amazonservices.com\")); //$NON-NLS-1$\r\n }\r\n catch (URISyntaxException e) {\r\n e.printStackTrace();\r\n }\r\n if (l != null) {\r\n for (Proxy proxy : l) {\r\n InetSocketAddress addr = (InetSocketAddress) proxy.address();\r\n\r\n if (addr == null) {\r\n TransportLogger.getSysAuditLogger().debug(\r\n \"No system proxies found\"); //$NON-NLS-1$\r\n }\r\n else {\r\n TransportLogger.getSysAuditLogger().info(\r\n \"Proxy hostname: \" + addr.getHostName()); //$NON-NLS-1$\r\n if(System.getProperty(\"https.proxyHost\") == null) \r\n System.setProperty(\"https.proxyHost\", addr.getHostName()); //$NON-NLS-1$\r\n TransportLogger.getSysAuditLogger().info(\r\n \"Proxy Port: \" + addr.getPort()); //$NON-NLS-1$\r\n if(System.getProperty(\"https.proxyPort\") == null)\r\n System.setProperty(\"https.proxyPort\", //$NON-NLS-1$\r\n Integer.toString(addr.getPort()));\r\n break;\r\n }\r\n }\r\n }\r\n }", "private static final HttpURLConnection createDefaultConn(final URL _url) throws IOException {\n\n\t\tfinal HttpURLConnection conn = (HttpURLConnection) _url.openConnection();\n\t\tconn.setConnectTimeout(Constants.CONN_TIMEOUT);\n\n\t\treturn conn;\n\t}", "String getHttpProxyUsername();", "public String getProxyHost() {\n return cfg.getProxyHost();\n }", "public Proxy getProxy(Proxy p){\n if(p != null){\n doInit(p);\n }\n mode = COMMAND_MODE;\n pack();\n show();\n return proxy;\n }", "private boolean saveBoshProxySettings()\n {\n Object sType = spinnerType.getSelectedItem();\n String type = (sType == null) ? NONE : sType.toString();\n\n String boshUrl = ViewUtil.toString(boshURL);\n String host = ViewUtil.toString(proxyHost);\n String port = ViewUtil.toString(proxyPort);\n String userName = ViewUtil.toString(proxyUserName);\n String password = ViewUtil.toString(proxyPassword);\n\n String accPrefix = mAccountUuid + \".\";\n ConfigurationService configSrvc = ProtocolProviderActivator.getConfigurationService();\n configSrvc.setProperty(accPrefix + ProtocolProviderFactory.PROXY_TYPE, type);\n jbrReg.setProxyType(type);\n\n switch (type) {\n case BOSH:\n if (boshUrl == null) {\n aTalkApp.showToastMessage(R.string.plugin_proxy_BOSHURL_NULL);\n return false;\n }\n configSrvc.setProperty(accPrefix + ProtocolProviderFactory.BOSH_URL, boshUrl);\n jbrReg.setBoshUrl(boshUrl);\n\n boolean isHttpProxy = cbHttpProxy.isChecked();\n configSrvc.setProperty(accPrefix + ProtocolProviderFactory.BOSH_PROXY_HTTP_ENABLED, isHttpProxy);\n jbrReg.setBoshHttpProxyEnabled(isHttpProxy);\n\n // Continue with proxy settings checking if BOSH HTTP Proxy is enabled\n if (!isHttpProxy)\n break;\n case HTTP:\n case SOCKS4:\n case SOCKS5:\n if ((host == null) || (port == null)) {\n aTalkApp.showToastMessage(R.string.plugin_proxy_HOST_PORT_NULL);\n return false;\n }\n break;\n case NONE:\n default:\n break;\n }\n\n // value if null will remove the parameter from DB\n configSrvc.setProperty(accPrefix + ProtocolProviderFactory.PROXY_ADDRESS, host);\n jbrReg.setProxyAddress(host);\n\n configSrvc.setProperty(accPrefix + ProtocolProviderFactory.PROXY_PORT, port);\n jbrReg.setProxyPort(port);\n\n configSrvc.setProperty(accPrefix + ProtocolProviderFactory.PROXY_USERNAME, userName);\n jbrReg.setProxyUserName(userName);\n\n configSrvc.setProperty(accPrefix + ProtocolProviderFactory.PROXY_PASSWORD, password);\n jbrReg.setProxyPassword(password);\n\n // remove obsolete setting from DB - to be remove on later version (>2.0.4)\n configSrvc.setProperty(accPrefix + ProtocolProviderFactory.IS_USE_PROXY, null);\n\n AccountPreferenceFragment.setUncommittedChanges();\n return true;\n }" ]
[ "0.70915115", "0.68040085", "0.66469604", "0.6623361", "0.65665233", "0.655549", "0.6534013", "0.64456904", "0.6429952", "0.64169854", "0.6414812", "0.64136", "0.63339055", "0.6266003", "0.62030244", "0.6188472", "0.6185341", "0.61523694", "0.6129338", "0.6116554", "0.61060184", "0.61060184", "0.61024034", "0.6097836", "0.60879624", "0.60631895", "0.59974986", "0.59891695", "0.5987261", "0.5986175", "0.5978889", "0.5967383", "0.59613025", "0.595849", "0.5956181", "0.59464836", "0.59464836", "0.5907946", "0.5907944", "0.59024805", "0.58803815", "0.58794737", "0.58757305", "0.587444", "0.5866573", "0.5863688", "0.58311296", "0.5814044", "0.5809334", "0.5804873", "0.5802476", "0.57709175", "0.57558805", "0.5748687", "0.574196", "0.57414335", "0.5738377", "0.57379836", "0.57246214", "0.56867105", "0.568236", "0.568236", "0.5653189", "0.56295156", "0.56108683", "0.5602454", "0.55749696", "0.5574267", "0.55457944", "0.55410224", "0.5529721", "0.55130583", "0.549225", "0.54894835", "0.5486237", "0.5484811", "0.54742795", "0.54700553", "0.54676545", "0.54651344", "0.5462691", "0.54589987", "0.5409431", "0.54036623", "0.5382117", "0.5370855", "0.53495985", "0.53302604", "0.53257996", "0.5314325", "0.53009886", "0.52937275", "0.52922136", "0.5282522", "0.52724606", "0.527109", "0.5255419", "0.52468085", "0.5234913", "0.5221795" ]
0.52706814
96
first find out if this is the first time Phex is running...
private void handlePhexVersionAdjustments() { if ( ( runningPhexVersion == null || runningPhexVersion.length() == 0 ) && ( runningBuildNumber == null || runningBuildNumber.length() == 0 ) ) { // this seems to be the first time phex is running... // in this case we are not updating... we use default values... // unfortunatly there is a bug causing no set version number to be available // between 56 and 78 // since b78 updates can be performed on any version without problems we execute // them always if no version is set. updatesForBuild78(); } else { // dropped update support of Phex 0.7 (2005-03-02) // dropped update support of Phex 0.8 (2005-11-19) // dropped update support of build 36 (2005-11-19) // dropped update support of build 42 (2005-11-19) // dropped update support of build 56 (2005-11-19) // update from Phex build <= 35 if ( runningBuildNumber == null || runningBuildNumber.length() == 0 ) { runningBuildNumber = "35"; } if ( VersionUtils.compare( "78", runningBuildNumber ) > 0 ) { updatesForBuild78(); } if ( VersionUtils.compare( "81", runningBuildNumber ) > 0 ) { updatesForBuild81(); } if ( VersionUtils.compare( "87", runningBuildNumber ) > 0 ) { updatesForBuild87(); } if ( VersionUtils.compare( "88", runningBuildNumber ) > 0 ) { updatesForBuild88(); } if ( VersionUtils.compare( "92", runningBuildNumber ) > 0 ) { updatesForBuild92(); } } runningBuildNumber = Environment.getInstance().getProperty( "build.number" ); runningPhexVersion = Res.getStr( "Program.Version" ); save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean isFirstLaunch() {\n if (new File(\"couchbase-sync.state\").exists()) {\n return false;\n }\n return true;\n }", "public boolean isFirstRun() {\n int currentVersionCode = 0;\n boolean firstRun = false;\n\n try {\n currentVersionCode = context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionCode;\n } catch (android.content.pm.PackageManager.NameNotFoundException e) {\n // handle exception\n //e.printStackTrace();\n }\n\n // Get saved version code\n SharedPreferences prefs = context.getSharedPreferences(VERSION_PREFS_NAME, Context.MODE_PRIVATE);\n int savedVersionCode = prefs.getInt(PREF_VERSION_CODE_KEY, DOESNT_EXIST);\n\n // Check for first run or upgrade\n if (currentVersionCode == savedVersionCode) {\n\n // This is just a normal run\n\n } else if (savedVersionCode == DOESNT_EXIST) {\n\n // TODO This is a new install (or the user cleared the shared preferences)\n firstRun = true;\n\n } else if (currentVersionCode > savedVersionCode) {\n\n // TODO This is an upgrade\n\n }\n\n // Update the shared preferences with the current version code\n prefs.edit().putInt(PREF_VERSION_CODE_KEY, currentVersionCode).commit();\n\n return firstRun;\n\n }", "protected boolean _isFirstTime() {\n return _firstTime;\n }", "private void checkFirstRun() {\r\n\r\n\t final String PREFS_NAME = \"MyPrefsFile\";\r\n\t final String PREF_VERSION_CODE_KEY = \"version_code\";\r\n\t final int DOESNT_EXIST = -1;\r\n\r\n\r\n\t // Get current version code\r\n\t int currentVersionCode = 0;\r\n\t try {\r\n\t currentVersionCode = getPackageManager().getPackageInfo(getPackageName(), 0).versionCode;\r\n\t } catch (android.content.pm.PackageManager.NameNotFoundException e) {\r\n\t // handle exception\r\n\t Log.e(\"PackageMissing\", \"Package Not Found\");\r\n\t return;\r\n\t }\r\n\r\n\t // Get saved version code\r\n\t SharedPreferences prefs = getSharedPreferences(PREFS_NAME, MODE_PRIVATE);\r\n\t int savedVersionCode = prefs.getInt(PREF_VERSION_CODE_KEY, DOESNT_EXIST);\r\n\r\n\t // Check for first run or upgrade\r\n\t if (currentVersionCode == savedVersionCode) {\r\n\t \t// This is just a normal run\r\n\t return;\r\n\t } else {\r\n\t \tstartActivity(new Intent(DisplayBin.this, DisplayBinHelp.class));\r\n\t }\r\n\t // Update the shared preferences with the current version code\r\n\t prefs.edit().putInt(PREF_VERSION_CODE_KEY, currentVersionCode).commit();\r\n\t}", "public boolean isFirstLaunchCalled() {\n return this.f51;\n }", "public boolean isFirstStart() {\n return !sp.contains(UUID_SP_KEY);\n }", "public static boolean isFirstRun(Context context) {\n SharedPreferences sp = context.getSharedPreferences(SHARED_PREFERENCES_KEY, context.MODE_PRIVATE);\n return sp.getBoolean(IS_FIRST_TOKEN,true);\n }", "boolean isOneTime();", "public static boolean getFirstLaunch(Context context) {\n return context.getSharedPreferences(FILE_NAME, 0)\n .getBoolean(FIRST_LAUNCH_KEY, true);\n }", "static public boolean isLaunched()\n\t{\n\t\tif (g_currentLaunch == null)\n\t\t return false;\n\t\telse\n\t\t return true;\n\t}", "private boolean checkFirstRun(Context context) {\n\n final String PREFS_NAME = \"com.zgsoft.prefs\";\n final String PREF_VERSION_CODE_KEY = \"version_code\";\n final int DOESNT_EXIST = -1;\n // String packageName=null;\n\n\n // Get current version code\n int currentVersionCode = 0;\n try {\n PackageInfo packageInfo =context.getPackageManager().getPackageInfo(context.getPackageName(), 0);\n currentVersionCode =packageInfo.versionCode;\n //packageName = packageInfo.packageName;\n\n } catch (android.content.pm.PackageManager.NameNotFoundException e) {\n // handle exception\n e.printStackTrace();\n return false;\n }\n\n\n // Get saved version code\n SharedPreferences prefs = context.getSharedPreferences(PREFS_NAME, android.content.Context.MODE_PRIVATE);\n int savedVersionCode = prefs.getInt(PREF_VERSION_CODE_KEY, DOESNT_EXIST);\n\n // Check for first run or upgrade\n if (currentVersionCode == savedVersionCode) {\n\n // This is just a normal run\n return false;\n\n } else {\n // Update the shared preferences with the current version code\n prefs.edit().putInt(PREF_VERSION_CODE_KEY, currentVersionCode).commit();\n return true;\n }\n\n }", "@SuppressWarnings(\"unused\")\n public boolean isFirstTime() {\n return firstTime;\n }", "public void willStartOne() {\n startOne();\n }", "boolean hasStartingInfo();", "public void firstGameCheck()\n {\n if(count > 0)\n {\n this.gameStart();\n System.out.println(\"Result:\");\n this.printGameResult();\n System.out.print(\"\\n\");\n }else\n {\n System.out.println(\"\\nGame Running Failed! \\n >>>>>>>>>>>>>> Please setting game first\\n\");\n }\n }", "public boolean isStartSetupwizard() {\n\t\treturn sp.getBoolean(\"firstTimePowerOn\", true);\n\t}", "boolean isStartup();", "private boolean alreadyStarted() {\n\t\treturn this.buffer.length() > 0;\n\t}", "public boolean isStartingUp() {\r\n\t\treturn isStartingUp;\r\n\t}", "public Boolean getPrefFirstLaunch(String strFirstLaunch) {\n\t\treturn sharedPreferences.getBoolean(\"strFirstLaunch\", false);\n\t\t\n\t}", "boolean pullingOnce();", "boolean hasStartingConfig() {\n return startCfg_ != null;\n }", "private boolean isFirstTime() {\n SharedPreferences preferences = getActivity().getPreferences(MODE_PRIVATE);\n boolean ranBefore = preferences.getBoolean(\"RanBefore\", false);\n if (!ranBefore) {\n\n SharedPreferences.Editor editor = preferences.edit();\n editor.putBoolean(\"RanBefore\", true);\n editor.apply();\n mBind.topLayout.setVisibility(View.VISIBLE);\n mBind.topLayout.setOnTouchListener(new View.OnTouchListener() {\n\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n mBind.topLayout.setVisibility(View.INVISIBLE);\n return false;\n }\n\n });\n }\n return ranBefore;\n\n }", "public boolean isTired()\r\n \t{\r\n \t\treturn lastSleep >= TIME_SLEEP;\r\n \t}", "private void checkFirstRun() {\r\n\r\n\t\t final String PREFS_NAME = \"MyPrefsFileSelectActivity\";\r\n\t\t final String PREF_VERSION_CODE_KEY = \"version_code\";\r\n\t\t final int DOESNT_EXIST = -1;\r\n\r\n\r\n\t\t // Get current version code\r\n\t\t int currentVersionCode = 0;\r\n\t\t try {\r\n\t\t currentVersionCode = getPackageManager().getPackageInfo(getPackageName(), 0).versionCode;\r\n\t\t } catch (android.content.pm.PackageManager.NameNotFoundException e) {\r\n\t\t // handle exception\r\n\t\t Log.e(\"PackageMissing\", \"Package Not Found\");\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // Get saved version code\r\n\t\t SharedPreferences prefs = getSharedPreferences(PREFS_NAME, MODE_PRIVATE);\r\n\t\t int savedVersionCode = prefs.getInt(PREF_VERSION_CODE_KEY, DOESNT_EXIST);\r\n\r\n\t\t // Check for first run or upgrade\r\n\t\t if (currentVersionCode == savedVersionCode) {\r\n\t\t \t// This is just a normal run\r\n\t\t return;\r\n\t\t } \r\n\t\t else if (savedVersionCode < 6 || savedVersionCode == DOESNT_EXIST) {\r\n\t\t \tString sql_delete = \"delete from wordTable\";\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdb.execSQL(sql_delete);\r\n\t\t\t\t\tdb.execSQL(\"drop table if exists 'wordTable'\");\r\n\t\t\t\t\tToast.makeText(SelectActivity.this, \"Your bin has been cleared.\\nPlease download it again.\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t} catch(Exception e) {\r\n\t\t\t\t\tLog.e(\"FirstRunClearBin\", \"Failed to clear bin.\");\r\n\t\t\t\t}\r\n\t\t }\r\n\t\t // Update the shared preferences with the current version code\r\n\t\t prefs.edit().putInt(PREF_VERSION_CODE_KEY, currentVersionCode).commit();\r\n\t\t}", "public void onCheckAppFirstStart() {\n HwAPPStateInfo curAppInfo = getCurStreamAppInfo();\n if (curAppInfo != null && 100501 == curAppInfo.mScenceId && true == curAppInfo.mIsAppFirstStart && !curAppInfo.mIsVideoStart) {\n boolean isPoorNetwork = false;\n int curRxPackets = this.mHwHiStreamQoeMonitor.getCurTcpRxPackets(curAppInfo.mAppUID);\n if (!(-1 == this.mStartTcpRxPackets || -1 == curRxPackets || curRxPackets - this.mStartTcpRxPackets >= 300)) {\n isPoorNetwork = true;\n }\n HwHiStreamUtils.logD(\"onCheckAppFirstStart: isPoorNetwork = \" + isPoorNetwork);\n if (isPoorNetwork) {\n IHwAPPQoECallback brainCallback = getArbitrationCallback();\n if (brainCallback != null) {\n brainCallback.onAPPQualityCallBack(curAppInfo, 107);\n }\n this.mHwHiStreamCHRManager.onStallDetect(curAppInfo.mScenceId, 107, this.mQoeCallback);\n }\n }\n }", "public void setFirstLaunchCalled() {\n this.f51 = true;\n }", "public boolean isNotFirstInstallation(){\n return mSharedPreferences.contains(SharedPrefContract.PREF_INSTALLED) && mSharedPreferences.getBoolean(SharedPrefContract.PREF_INSTALLED, false);\n }", "private boolean isStartable()\n {\n if (! isAlive() && nextStartTime <= System.currentTimeMillis())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "boolean hasStart();", "boolean hasStartingHadithNo();", "public boolean isScheduled(){\n //System.out.println(\"nextrun: \" + nextrun.getTime() + \" nu: \" + System.currentTimeMillis());\n if (nextrun != null){\n long next = nextrun.getTime();\n \n return next < System.currentTimeMillis();\n }else{\n //null => instance has never run before & should run asap\n return true;\n }\n }", "boolean initializeStart() {\n if (state != PlatformState.STOPPED) {\n return false;\n }\n state = PlatformState.STARTING;\n return true;\n }", "private StateChange checkBeforeStart() {\n PayaraServerStatus status = PayaraState.getStatus(instance);\n String msgKey = null;\n switch (status.getStatus()) {\n case ONLINE:\n TaskState result;\n TaskEvent event;\n if (PayaraModule.PROFILE_MODE.equals(instance.getProperty(PayaraModule.JVM_MODE))) {\n result = TaskState.FAILED;\n event = TaskEvent.CMD_FAILED;\n } else {\n result = TaskState.COMPLETED;\n event = TaskEvent.CMD_COMPLETED;\n }\n return new StateChange(this, result, event,\n \"StartTask.startDAS.alreadyRunning\");\n case OFFLINE:\n if (ServerUtils.isAdminPortListening(\n instance, NetUtils.PORT_CHECK_TIMEOUT)) {\n msgKey = \"StartTask.startDAS.adminPortOccupied\";\n } else {\n final int httpPort = instance.getPort();\n if (httpPort >= 0 && httpPort <= 65535\n && NetUtils.isPortListeningLocal(\n instance.getHost(), httpPort)) {\n msgKey = \"StartTask.startDAS.httpPortOccupied\";\n }\n }\n break;\n case SHUTDOWN:\n msgKey = \"StartTask.startDAS.shutdown\";\n break;\n case STARTUP:\n msgKey = \"StartTask.startDAS.startup\";\n }\n return msgKey != null\n ? new StateChange(this, TaskState.FAILED,\n TaskEvent.CMD_FAILED, msgKey, this.instance.getDisplayName())\n : null;\n }", "public boolean isLaunched();", "private void checkFirstLaunch(){\n SharedPreferencesEditor editor = new SharedPreferencesEditor(this);\n boolean test = editor.GetBoolean(\"firstLaunch\");\n if(test){\n loadData();\n return;\n }\n startActivity(new Intent(MainActivity.this, FirstLaunch.class));\n editor.WriteBoolean(\"firstLaunch\", true);\n }", "public boolean isFirstOfTheDay() {\r\n return !strDate.equals(game.settings.getLastSeen());\r\n }", "boolean isStarted();", "boolean isStarted();", "public boolean isFirstCycle() {\n return cycle == 0;\n }", "public boolean isStarted()\r\n\t{\r\n\t\treturn currentstate == TIMER_START;\r\n\t}", "public boolean isInitialSetuped(){\r\n\t\treturn initialSetuped;\r\n\t}", "public static boolean checkBegun(String gamecode){\n \ttry {\n\t\t\treturn DBHandler.isStarted(gamecode, c);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \treturn false;\n }", "public boolean isFirstClick(){\n\t\treturn firsttime;\n\t}", "public static void setFirstRun(final boolean isFirst, final Context context){\n\n Log.d(TAG, \"Set first run to\" + Boolean.toString(isFirst));\n //SharedPreferences sp = context.getSharedPreferences(PREF_ACCOUNT, Context.MODE_PRIVATE);\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n sp.edit().putBoolean(PREF_FIRST_RUN, isFirst).apply();\n }", "public boolean isStarting() {\n\t\treturn starting;\n\t}", "public boolean setupStartSession() { \n\t\tthis.showNamedMessage(\"Initiating session with server...\");\n\t\ttry {\n\t\t\twhile (!this.requestSession()) {\n\t\t\t\ttextUI.getBoolean(\"Try again?\");\n\t\t\t}\n\t\t} catch (IOException | PacketException | UtilDatagramException e) {\n\t\t\ttextUI.showError(\"Something went wrong while starting the session: \" \n\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t}\n\t\t\n\t\treturn this.sessionActive;\n\t}", "public boolean isFirstBootOrUpgrade() {\n IPackageManager pm = AppGlobals.getPackageManager();\n try {\n return pm.isFirstBoot() || pm.isUpgrade();\n } catch (RemoteException e) {\n throw e.rethrowFromSystemServer();\n }\n }", "private static void firstComeFirstServe() {\n char ch = '0';\n\n // Check first if a process exists; if none exist:\n if (Utils.checkProcessesTableExisting() == false) {\n System.out.println(\"\\t ________________________________________________\");\n System.out.println(\"\\t|| ||\");\n System.out.println(\"\\t|| > THERE ARE CURRENTLY NO PROCESSES EXISTING ||\");\n System.out.println(\"\\t||________________________________________________||\");\n System.out.println();\n\n // Sub-menu for actions to be taken.\n // It is the same as if there are existing processes,\n // except that it doesn't have the \"Compute\" option\n do {\n System.out.println(\"( 1 ) Create a process\");\n System.out.println(\"( 2 ) Generate a random process\");\n System.out.println(\"( 0 ) Exit\");\n System.out.print(\"CHOICE: \");\n\n ch = scanner.next().charAt(0);\n\n if (ch == '1') {\n Utils.processCreator();\n break;\n } else if (ch == '2') {\n Utils.randomProcessCreator();\n break;\n } else if (ch == '0') {\n menu('0');\n } else {\n System.out.println(\"\\t ________________________________________________\");\n System.out.println(\"\\t|| ||\");\n System.out.println(\"\\t|| > INVALID INPUT ||\");\n System.out.println(\"\\t||________________________________________________||\");\n }\n } while (ch != '0');\n\n firstComeFirstServe();\n }\n\n // Check first if a process exists; if a process exists:\n else {\n // display the processes table\n System.out.println();\n Utils.displayProcessesTable();\n\n // Sub-menu for actions to be taken.\n // It is the same as if there are no existing processes,\n // except that it has the \"Compute\" option\n do {\n System.out.println(\"( 1 ) Compute\");\n System.out.println(\"( 2 ) Create a process\");\n System.out.println(\"( 3 ) Generate a random process\");\n System.out.println(\"( 0 ) Exit\");\n System.out.print(\"CHOICE: \");\n\n ch = scanner.next().charAt(0);\n\n if (ch == '1') {\n // TODO: the actual algorithm goes here; can be a method call for legibility\n System.out.println(\"COMPUTATION :P\");\n break;\n } else if (ch == '2') {\n Utils.processCreator();\n break;\n } else if (ch == '3') {\n Utils.randomProcessCreator();\n break;\n } else if (ch == '0') {\n menu('0');\n } else {\n System.out.println(\"\\t ________________________________________________\");\n System.out.println(\"\\t|| ||\");\n System.out.println(\"\\t|| > INVALID INPUT ||\");\n System.out.println(\"\\t||________________________________________________||\");\n }\n } while (ch != '0');\n\n firstComeFirstServe();\n\n }\n }", "public boolean isAutoStartup() {\n\t\treturn (this.container != null) ? this.container.isAutoStartup() : false;\n\t}", "public static boolean inactivateStartGuide(){\n long inactivationTime = 1494536399000L;\r\n long currentTime = System.currentTimeMillis();\r\n boolean inactive = currentTime > inactivationTime;\r\n Log.i(StartPrefsHelper.class.getName(), \"Start Guide inactive: \" + inactive + \", inactivationTime: \" + new Date(inactivationTime) + \", currentTime: \" + new Date(currentTime));\r\n return inactive;\r\n }", "@Override\n\tpublic boolean isInit() {\n\t\tFile path = new File(initService.defaultAddr);\n\t\tif(!path.exists()) \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tFile set = new File(initService.defaultAddr+initFile);\n\t\tif(!set.exists()) \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isAutoStart()\n {\n return false;\n }", "public boolean isFirstToConnect() throws IOException;", "public boolean start() {\n\t\treturn true;\n\t}", "private void foundRunning() {\n\t\tif (state == BridgeState.RUNNING || state == BridgeState.CREATED) {\n\t\t\tstate = BridgeState.RUNNING;\n\t\t}\n\t}", "public boolean isRelaunched() {\n return relaunched;\n }", "boolean isRunning();", "boolean isRunning();", "boolean isRunning();", "boolean isRunning();", "boolean isRunning();", "public boolean IsAlive() {\n\treturn process != null;\n }", "public boolean recordSetup()\n\t{\n\t\t_lSetupNanos = System.nanoTime();\n\n\t\t_dtSetup = new java.util.Date();\n\n\t\treturn true;\n\t}", "boolean isSetupDone();", "private void checkSingleInstance() {\r\n\t\t//Erzeugt ein RandomAccessFile \"flag\"\r\n\t\tfinal File file = new File(\"flag\");\r\n\t\tRandomAccessFile randomAccessFile;\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\t//Ist es der Applikation nicht möglich, das erstellte File zu sperren, zeigt es an, dass bereits eines vorhanden ist.\r\n\t\t\t//Dementsprechend wird die Applikation beendet, da bereits eine Instanz geöffnet wurde.\r\n\t\t\trandomAccessFile = new RandomAccessFile(file, \"rw\");\r\n\t\t\tfinal FileLock fileLock = randomAccessFile.getChannel().tryLock();\r\n\r\n\t\t\tif (fileLock == null) {\r\n\t\t\t\tPlatform.exit();\r\n\t\t\t}\r\n\t\t} catch (Exception e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t}", "Boolean isSuspendOnStart();", "@Override\r\n public boolean isRunning()\r\n {\n return initialized;\r\n }", "public static void setFirstTimeLaunch(Context context, boolean isFirstTime) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(GMSConstants.IS_FIRST_TIME_LAUNCH, isFirstTime);\n editor.apply();\n }", "public static boolean startProcessor() {\n return App.processor.executeCode(commandCounter);\n }", "public boolean launch() {\n\t\treturn (Math.random() > this.explodProb);\r\n\t}", "public boolean mo5973j() {\n return !isDestroyed() && !isFinishing();\n }", "public void start(){\n\t\tstarted = true;\n\t\tlastTime = System.nanoTime();\n\t}", "public boolean isFirstPlayer()\r\n\t{\r\n\t\tgetStartGameDataFromServer();\r\n\t\treturn isFirstPlayer;\r\n\t}", "public boolean launch() {\n\t\treturn ( Math.random() > this.explodProb);\r\n\t\t \r\n\t}", "private boolean needWait(Context context) {\n String flag = get2thDexSHA1(context);\n SharedPreferences sp = context.getSharedPreferences(\n getPackageInfo().versionName, MODE_MULTI_PROCESS);\n String saveValue = sp.getString(KEY_DEX2_SHA1, \"\");\n return !StringUtils.equals(flag, saveValue);\n }", "public boolean isStarted() {\n \t\treturn isStarted;\n \t}", "public boolean hasStarted() {\n return hasStarted(10, 500, TimeUnit.MILLISECONDS);\n }", "boolean hasFirstFrame();", "public static boolean autostart() {\n\t\tif ((xml == null) || (autostart == null)) return false;\n\t\treturn autostart.equals(\"yes\");\n\t}", "public static boolean autostart() {\n\t\tif ((xml == null) || (autostart == null)) return false;\n\t\treturn autostart.equals(\"yes\");\n\t}", "public Boolean getStartOnStartup() {\n\t\treturn this.startOnStartup;\n\t}", "public boolean startupOK()\n {\n if (!checksDone)\n {\n success = true;\n if (clusterNodeProperties.propertyFileExists())\n {\n log.debug(\"Performing Clustering start up checks\");\n success = doStartupChecks();\n checksDone = true;\n }\n }\n return success;\n }", "boolean isIsInitial();", "protected void onFirstTimeLaunched() {\n }", "boolean launch();", "public boolean isStart() {\n\t\treturn start;\n\t}", "public synchronized boolean isStarted() {\n\t\treturn State.STARTED.equals(state);\n\t}", "public boolean isStarted(){\n \treturn started;\n }", "private static boolean isAlive(Process p) { \n\t\ttry{ \n\t\t\tp.exitValue(); \n\t\t\treturn false; \n\t\t}catch (IllegalThreadStateException e) { \n\t\t\treturn true; \n\t\t} \n\t}", "public boolean hasFirstFrame() {\n return firstFrame_ != null;\n }", "private void CheckIfServiceIsRunning() {\n\t\tLog.i(\"Convert\", \"At isRunning?.\");\n\t\tif (eidService.isRunning()) {\n//\t\t\tLog.i(\"Convert\", \"is.\");\n\t\t\tdoBindService();\n\t\t} else {\n\t\t\tLog.i(\"Convert\", \"is not, start it\");\n\t\t\tstartService(new Intent(IDManagement.this, eidService.class));\n\t\t\tdoBindService();\n\t\t}\n\t\tLog.i(\"Convert\", \"Done isRunning.\");\n\t}", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();", "public void setFirstLaunchCalled(boolean z) {\n this.f51 = z;\n }", "boolean hasToForeman();", "public boolean isPromptBeforeRestartEnabled(){\n return promptBeforeRestartEnabled;\n }" ]
[ "0.7043031", "0.6766601", "0.6722198", "0.666972", "0.66354424", "0.6602927", "0.64574605", "0.634705", "0.63063955", "0.62626123", "0.62596387", "0.62464964", "0.6239418", "0.6193054", "0.6146887", "0.6138523", "0.60940796", "0.60609", "0.605569", "0.60197145", "0.5989658", "0.5979657", "0.5943111", "0.5933365", "0.5928122", "0.59268236", "0.5921986", "0.59049076", "0.58707285", "0.5861139", "0.5854552", "0.58530116", "0.5852183", "0.5850685", "0.58498186", "0.58295214", "0.58265704", "0.5813943", "0.5813943", "0.5791967", "0.5776456", "0.5766614", "0.5761407", "0.5751801", "0.57474303", "0.57144785", "0.57105136", "0.5697309", "0.56972116", "0.56955045", "0.5694203", "0.5671876", "0.5666196", "0.5660393", "0.56533945", "0.5647799", "0.5646815", "0.563072", "0.563072", "0.563072", "0.563072", "0.563072", "0.56096804", "0.5598585", "0.5598232", "0.5586721", "0.55662835", "0.55444", "0.5529098", "0.5519303", "0.5511838", "0.5507077", "0.549567", "0.54936105", "0.54858214", "0.5476894", "0.54764485", "0.54738754", "0.54663855", "0.5446169", "0.5446169", "0.5442499", "0.54410756", "0.54326296", "0.54226476", "0.54115117", "0.54096246", "0.5403827", "0.540326", "0.5400307", "0.5384758", "0.5361873", "0.53618026", "0.53618026", "0.53618026", "0.53618026", "0.53618026", "0.53618026", "0.53617525", "0.5361272", "0.5361167" ]
0.0
-1
Read in old ArrayLists with tokeniser
private void updatesForBuild78() { runningBuildNumber = "78"; u78("mNetNetworkHistory", " "); u78("filteredCatcherPorts", " "); u78("connectToHistory", " "); u78("searchTermHistory", ","); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<T> readList();", "List<T> read();", "public static ArrayList readData(){\n ArrayList alr = new ArrayList();\n try{\n ArrayList stringArray = (ArrayList)read(filename);\n for (int i = 0; i < stringArray.size(); i++){\n String st = (String)stringArray.get(i);\n StringTokenizer star = new StringTokenizer(st, SEPARATOR);\n int movieID = Integer.parseInt(star.nextToken().trim());\n String email = star.nextToken().trim();\n String comment = star.nextToken().trim();\n Review review = new Review(movieID, email, comment);\n alr.add(review);\n }\n }\n catch (IOException e){\n System.out.println(\"Exception > \" + e.getMessage());\n }\n return alr;\n }", "public static < E > ArrayList<E> readArrayList () throws IOException, ClassNotFoundException{\n ArrayList<E> outputArrayList = new ArrayList<E>();\n // åbn inputstreams på al.ser\n FileInputStream fi = new FileInputStream(\"al.ser\");\n ObjectInputStream oi = new ObjectInputStream(fi);\n // cast til arraylist af generisk type\n outputArrayList = (ArrayList<E>) oi.readObject();\n // luk inputstreams og returner\n oi.close();\n fi.close();\n return outputArrayList;\n }", "public void Mini_Parser(){\n Lista_ER Nuevo=null;\n String Nombre=\"\";\n String Contenido=\"\";\n ArrayList<String> tem = new ArrayList<String>();\n //este boleano sirve para concatenar la expresion regular\n int Estado=0;\n for (int x = 0; x < L_Tokens.size(); x++) {\n switch(Estado){\n //ESTADO 0\n case 0:\n //Conjuntos\n if(L_Tokens.get(x).getLexema().equals(\"CONJ\")){\n if(L_Tokens.get(x+1).getLexema().equals(\":\")){\n if(L_Tokens.get(x+2).getDescripcion().equals(\"Identificador\")){\n //Son conjuntos \n Nombre=L_Tokens.get(x+2).getLexema();\n Estado=1;\n x=x+4;\n }\n }\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Identificador\")){\n //pasaa estado de expresion regular\n Nombre=L_Tokens.get(x).getLexema();\n Estado=2;\n }\n break;\n \n case 1:\n //ESTADO 1\n //Concatena los conjuntos\n if(L_Tokens.get(x).getDescripcion().equals(\"Identificador\")){\n if(L_Tokens.get(x+1).getDescripcion().equals(\"Tilde\")){\n Contenido=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n x=x+2;\n Estado=0;\n }\n \n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Digito\")){\n if(L_Tokens.get(x+1).getDescripcion().equals(\"Tilde\")){\n Contenido=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n x=x+2;\n Estado=0;\n }\n \n }\n for(int i=6;i<=37;i++){\n if(L_Tokens.get(x).getID()==i){\n if(L_Tokens.get(x+1).getDescripcion().equals(\"Tilde\")){\n Contenido=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n x=x+2;\n Estado=0;\n }\n \n }\n }\n //conjunto sin llaves\n if(L_Tokens.get(x).getLexema().equals(\";\")){\n if(L_Tokens.get(x-1).getLexema().equals(\",\")){\n }else{\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n Estado=0;\n Contenido=\"\";\n\n }\n }else{\n Contenido+=L_Tokens.get(x).getLexema();\n }\n \n\n break;\n case 2:\n //ESTADO 2\n if(L_Tokens.get(x).getLexema().equals(\"-\")){\n if(L_Tokens.get(x+1).getLexema().equals(\">\")){\n //se mira que es expresion regular\n \n Lista_ER nuevo=new Lista_ER(L_Tokens.get(x-1).getLexema());\n Nuevo=nuevo;\n L_Tokens_ER.add(nuevo);\n x++;\n Estado=3;\n }\n }\n if(L_Tokens.get(x).getLexema().equals(\":\")){\n //se mira que es lexema\n Estado=4;\n }\n break;\n case 3: \n //ESTADO 3\n //Concatenacion de Expresion Regular\n \n //System.out.println(\"---------------------------------\"+ L_Tokens.get(x).getLexema());\n if(L_Tokens.get(x).getDescripcion().equals(\"Punto\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Barra Vetical\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Interrogacion\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Asterisco\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Signo Mas\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Lexema de Entrada\")){ \n String tem1='\"'+L_Tokens.get(x).getLexema()+'\"';\n Nuevo.setER(tem1);\n \n }\n if(L_Tokens.get(x).getLexema().equals(\"{\")){ \n String tem1=\"\";\n if(L_Tokens.get(x+2).getLexema().equals(\"}\")){\n tem1=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n Nuevo.setER(tem1);\n }\n }\n if(L_Tokens.get(x).getLexema().equals(\";\")){\n Estado=0;\n }\n break;\n case 4:\n// System.out.println(L_Tokens.get(x).getLexema());\n Contenido=L_Tokens.get(x+1).getLexema();\n L_Tokens_Lex.add(new Lista_LexemasE(L_Tokens.get(x-2).getLexema(), Contenido));\n Estado=0;\n \n break;\n }//fin switch\n }//Fin for\n }", "private static ArrayList<ArrayList<Integer>> populateListOfInputs() {\n\t\t\n\t\tArrayList<ArrayList<Integer>> listOflist = new ArrayList<ArrayList<Integer>>();\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(filePath);\n\t\t\tBufferedReader br = new BufferedReader(fr);\t\t\n\t\t\t\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\t// Remove all spaces, '[' and ']'\n\t\t\t\tString numbers = line.replace(\" \", \"\");\n\t\t\t\tnumbers = numbers.replace(\"[\", \"\");\n\t\t\t\tnumbers = numbers.replace(\"]\", \"\");\n\t\t\t\t\n\t\t\t\tif(line.equals(\"\")) {\n\t\t\t\t\t//if empty line leave it and continue the loop\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\t\t\n\t\t\t\tString[] individualnums = numbers.split(\",\");\n\t\t\t\tfor (int i = 0; i < individualnums.length; i++) {\t\t\t\t\t\n\t\t\t\t\tlist.add(Integer.parseInt(individualnums[i]));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tlistOflist.add(list);\t\t\t\t\n\t\t\t}\t\t\n\t\t\t\n\t\t\tbr.close();\n\t\t\tfr.close();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn listOflist;\n\t}", "@Override\n\tprotected ListEntity parseList(InputStream is) throws Exception {\n\t\tVipStudentList studentList = VipStudentList.parse(is);\n\t\treturn studentList;\n\t}", "private void loadAndProcessInput(){\n transactions_set = new ArrayList<>();\n strItemToInt = new HashMap<>();\n intToStrItem = new HashMap<>();\n \n try{\n BufferedReader br = new BufferedReader(\n new InputStreamReader(\n new FileInputStream(this.inputFilePath)\n ));\n \n String line;\n while((line = br.readLine()) != null){\n String[] tokens = line.split(\" \");\n ArrayList<Integer> itemsId = new ArrayList();\n \n for(String item : tokens){\n if( ! strItemToInt.containsKey(item)){\n strItemToInt.put(item, strItemToInt.size()+1);\n intToStrItem.put(strItemToInt.size(), item);\n }\n itemsId.add(strItemToInt.get(item));\n }\n transactions_set.add(itemsId);\n }\n }\n catch(IOException fnfEx){\n System.err.println(\"Input Error\");\n fnfEx.printStackTrace();\n }\n \n }", "public ArrayList<String> readItem();", "ArrayList<WordListItem> addDataFromFile(){\n BufferedReader br;\n InputStream inputStream = context.getResources().openRawResource(R.raw.animal_list);\n br = new BufferedReader(\n new InputStreamReader(inputStream, Charset.forName(\"UTF-8\"))\n );\n String currentLine;\n ArrayList<WordListItem> wordListItems = new ArrayList<WordListItem>();\n try {\n while ((currentLine = br.readLine()) != null) {\n String[] tokens = currentLine.split(\";\");\n\n String word = tokens[0];\n String pronunciation = tokens[1];\n String description = tokens[2];\n\n WordListItem wordItem = new WordListItem(word, pronunciation, description);\n wordItem.setImgResNbr(setImgResFromWord(wordItem.getWord().toLowerCase()));\n wordListItems.add(wordItem);\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (br != null) br.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n\n return wordListItems;\n }", "public void transform() {\n String delimiter = \" \";\n\n System.out.println(\"Using pathname \" + this.inputPath_ + \"\\n\");\n\n //create string to hold the entire input file\n String input = \"\";\n try { //use a scanner to get the contents of the file into a string\n Scanner inputScanner = new Scanner(new File(this.inputPath_));\n //use a delimiter that only matches the end of the file; this will give us the whole file\n input = inputScanner.useDelimiter(\"\\\\Z\").next();\n inputScanner.close();\n } catch (Exception e) {\n System.err.println(\"Couldn't read \" + this.inputPath_);\n System.exit(-100);\n }\n //if we are here, then there wasn't an exception\n\n //make sure not empty file\n if(input.isEmpty()) {\n System.err.print(\"Error: Empty file.\");\n System.exit(-200);\n }\n\n //create an array for the line strings\n ArrayList<String> inputLines = new ArrayList<>();\n\n //next, separate the input string into multiple strings, one for each line\n //delimiter string regex - only match line terminators\n String lineDelim = \"(\\n|\\r|\\r\\n|\\u0085|\\u2028|\\u2029)\";\n StringTokenizer inputLineTokenizer = new StringTokenizer(input, lineDelim); //create a string tokenizer\n\n //count number of lines\n int numberOfLines = inputLineTokenizer.countTokens();\n\n //add the lines to the array\n for(int i = 0; i < numberOfLines; i++) inputLines.add(inputLineTokenizer.nextToken(lineDelim));\n\n\n //split line into words\n\n //create arraylist of strings\n ArrayList<ArrayList<String>> lines = new ArrayList<>();\n\n for(int i = 0; i < inputLines.size(); i++) {\n //printout(\"Read line: \" + inputLines.get(i) + \"\\n\");\n\n //create a tokenizer and count number of tokens\n StringTokenizer tokenizer = new StringTokenizer(inputLines.get(i), delimiter);\n int numWords = tokenizer.countTokens();\n\n //create array of strings\n ArrayList<String> currentLine = new ArrayList<>();\n\n for(int j = 0; j < numWords; j++) { //add a word if it is valid\n String currentWord = cleanUpText(tokenizer.nextToken(delimiter));\n if(!currentWord.isEmpty()) currentLine.add(currentWord);\n }\n\n //add the current line to the list of typed lines if it had any valid words\n if(currentLine.size() > 0) lines.add(currentLine);\n }\n\n if(lines.size() <= 0) {\n System.err.println(\"ERROR! File did not contain a line with any valid words. Please try again with a different inpput file.\");\n System.exit(-444);\n } else {\n //send lines from array to pipe\n for(int i = 0; i < lines.size(); i++) {\n this.output_.put(lines.get(i));\n }\n\n\n\n //send a null terminator?\n //this causes the other filter to give an exception\n //the exception is caught by the other filter, which breaks the loop it uses to get new lines\n this.output_.put(null);\n //printout(\"Done with file input.\\n\");\n //stop the filter\n this.stop();\n }\n\n\n }", "@Override\n public void pushback() {\n if (tokenizer != null) {\n // add 1 to count: when looping through the new tokenizer, we want there to be 1 more token remaining than there is currently.\n int tokensRemaining = tokenizer.countTokens() + 1;\n tokenizer = new StringTokenizer(stringToTokenize, delimiter, includeDelimiterTokens);\n int totalNumberOfTokens = tokenizer.countTokens();\n for (int i = totalNumberOfTokens; i > tokensRemaining; i--) {\n tokenizer.nextToken();\n }\n }\n }", "private ArrayList<String> normaliseTokens(ArrayList<String> tokens) {\n ArrayList<String> normalisedTokens = new ArrayList<>();\n\n // Normalise to lower case and add\n for (String token : tokens) {\n token = token.toLowerCase();\n normalisedTokens.add(token);\n }\n\n return normalisedTokens;\n }", "@SuppressWarnings(\"unchecked\")\n public ArrayList readVector() throws IOException {\n int length = readVectorHeader();\n ArrayList result = new ArrayList(length);\n for (int i = 0; i < length; i++) {\n result.add(read());\n }\n return result;\n }", "private void readListFromFile() {\n // clear existing list\n if (listArr == null || listArr.size() > 0) {\n listArr = new ArrayList<>();\n }\n\n try {\n Scanner scan = new Scanner(openFileInput(LIST_FILENAME));\n\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n listArr.add(line);\n }\n\n if (listAdapter != null) {\n listAdapter.notifyDataSetChanged();\n }\n\n } catch (IOException ioe) {\n Log.e(\"ReadListFromFile\", ioe.toString());\n }\n\n }", "@SuppressWarnings(\"unchecked\")\n public List readList() throws IOException {\n List list = new ArrayList();\n Object obj = read();\n while (obj != null) {\n list.add(obj);\n obj = read();\n }\n return list;\n }", "private ArrayList parseList(String localData){\n int localPointer = 0;\n ArrayList temp = new ArrayList();\n char c = localData.charAt(localPointer++);\n while (c != ']'){\n String item = \"\";\n Object itemObj = null;\n item_loop :\n while (c != ']'){\n switch (c){\n case ',' :\n c = localData.charAt(localPointer++);\n break item_loop;\n case '{' :\n String tempItem = this.getFull(localData.substring(localPointer),0);\n localPointer += tempItem.length();\n item += tempItem;\n break ;\n case '[' :\n String tempItem2 = this.getFull(localData.substring(localPointer),1);\n localPointer += tempItem2.length();\n item += tempItem2;\n break ;\n default :\n item += c;\n break ;\n }\n c = localData.charAt(localPointer++);\n }\n item = item.trim();\n switch (this.getDataType(item.trim())){\n case String:\n itemObj = item.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n itemObj = Long.parseLong(item.trim());\n break ;\n case Float:\n itemObj = Float.parseFloat(item.trim());\n break ;\n case Boolean:\n itemObj = Boolean.parseBoolean(item.trim());\n break ;\n case Map:\n itemObj = this.parseMap(item.trim());\n break ;\n case List:\n itemObj = this.parseList(item.trim());\n }\n temp.add(itemObj);\n }\n return temp;\n }", "public static List<TaggedWord> getFlatTaggedWordListReader(Reader reader){\n\t\tif(tagger == null)\n\t\t\tInitTagger();\n\t\tList<List<HasWord>> sentences = MaxentTagger.tokenizeText(reader);\n\t\tList<TaggedWord> list = new ArrayList<TaggedWord>();\n\t\tfor (List<HasWord> sentence : sentences) {\n\t\t\tList<TaggedWord> tSentence = tagger.tagSentence(sentence);\n\t\t\tlist.addAll(tSentence);\n\t\t}\n\t\treturn list;\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 }", "public ArrayList<String> loadToRead() {\n\n\t\tSAVE_FILE = TO_READ_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public void newst()\r\n\t{\r\n\t\ttry {\r\n\t\t\tst = new StringTokenizer(file.readLine());\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "protected static ArrayList<String> load() throws Exception {\r\n\t\tArrayList<String> list;\r\n\t\tFileReader fileRead = new FileReader(csv);\r\n\t\tBufferedReader buff = Files.newBufferedReader(Paths.get(\"story.csv\"));\r\n\t\tlist = buff.lines().map(line -> line.split(\",\")).flatMap(Arrays::stream)\r\n\t\t\t\t.collect(Collectors.toCollection(ArrayList::new));\r\n\t\tbuff.close();\r\n\t\tfileRead.close();\r\n\r\n\t\treturn list;\r\n\t}", "public void readWordList() {\n try {\n wordList = XmlStringArrayParser.parse(getAssets().open(Constant.WORDLISTFILE),\n settings.getInt(\"wordMaxLength\", 7));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private List<String> getInputList(BufferedReader br) throws IOException {\n\t\tArrayList<String> inputWordsList = new ArrayList<String>();\n\t\tString tempInputWord = null;\n\t\twhile ((tempInputWord = br.readLine()) != null) {\n\t\t\tinputWordsList.add(tempInputWord);\n\t\t}\n\t\treturn inputWordsList;\n\t}", "private static List<String> simpleTokenize (String text) {\r\n\r\n // Do the no-brainers first\r\n String splitPunctText = splitEdgePunct(text);\r\n\r\n int textLength = splitPunctText.length();\r\n \r\n // BTO: the logic here got quite convoluted via the Scala porting detour\r\n // It would be good to switch back to a nice simple procedural style like in the Python version\r\n // ... Scala is such a pain. Never again.\r\n\r\n // Find the matches for subsequences that should be protected,\r\n // e.g. URLs, 1.0, U.N.K.L.E., 12:53\r\n Matcher matches = Protected.matcher(splitPunctText);\r\n //Storing as List[List[String]] to make zip easier later on \r\n List<List<String>> bads = new ArrayList<List<String>>();\t//linked list?\r\n List<Pair<Integer,Integer>> badSpans = new ArrayList<Pair<Integer,Integer>>();\r\n while(matches.find()){\r\n // The spans of the \"bads\" should not be split.\r\n if (matches.start() != matches.end()){ //unnecessary?\r\n List<String> bad = new ArrayList<String>(1);\r\n bad.add(splitPunctText.substring(matches.start(),matches.end()));\r\n bads.add(bad);\r\n badSpans.add(new Pair<Integer, Integer>(matches.start(),matches.end()));\r\n }\r\n }\r\n\r\n // Create a list of indices to create the \"goods\", which can be\r\n // split. We are taking \"bad\" spans like \r\n // List((2,5), (8,10)) \r\n // to create \r\n /// List(0, 2, 5, 8, 10, 12)\r\n // where, e.g., \"12\" here would be the textLength\r\n // has an even length and no indices are the same\r\n List<Integer> indices = new ArrayList<Integer>(2+2*badSpans.size());\r\n indices.add(0);\r\n for(Pair<Integer,Integer> p:badSpans){\r\n indices.add(p.first);\r\n indices.add(p.second);\r\n }\r\n indices.add(textLength);\r\n\r\n // Group the indices and map them to their respective portion of the string\r\n List<List<String>> splitGoods = new ArrayList<List<String>>(indices.size()/2);\r\n for (int i=0; i<indices.size(); i+=2) {\r\n String goodstr = splitPunctText.substring(indices.get(i),indices.get(i+1));\r\n List<String> splitstr = Arrays.asList(goodstr.trim().split(\" \"));\r\n splitGoods.add(splitstr);\r\n }\r\n\r\n // Reinterpolate the 'good' and 'bad' Lists, ensuring that\r\n // additonal tokens from last good item get included\r\n List<String> zippedStr= new ArrayList<String>();\r\n int i;\r\n for(i=0; i < bads.size(); i++) {\r\n zippedStr = addAllnonempty(zippedStr,splitGoods.get(i), true);\r\n zippedStr = addAllnonempty(zippedStr,bads.get(i), false);\r\n }\r\n zippedStr = addAllnonempty(zippedStr,splitGoods.get(i), true);\r\n \r\n // BTO: our POS tagger wants \"ur\" and \"you're\" to both be one token.\r\n // Uncomment to get \"you 're\"\r\n /*ArrayList<String> splitStr = new ArrayList<String>(zippedStr.size());\r\n for(String tok:zippedStr)\r\n \tsplitStr.addAll(splitToken(tok));\r\n zippedStr=splitStr;*/\r\n \r\n return zippedStr;\r\n }", "public void setReaderToArray(){\n try{\n String client, number = null;\n\n File reader = new File(\"clientFile/clientInfo.txt\");\n\n Scanner scn = new Scanner(reader);\n scn.useDelimiter(\",\");\n\n while(scn.hasNext()){\n number = scn.next();\n client = scn.next();\n\n clientList.add(client + \" - \" + number);\n }\n scn.close();\n }catch (FileNotFoundException exception){\n System.out.println(\"An error occurred.\");\n }\n }", "public static List<List<TaggedWord>> getTaggedWordListReader(Reader reader){\n\t\tif(tagger == null)\n\t\t\tInitTagger();\n\t\tList<List<HasWord>> sentences = MaxentTagger.tokenizeText(reader);\n\t\tList<List<TaggedWord>> list = new ArrayList<List<TaggedWord>>();\n\t\tfor (List<HasWord> sentence : sentences) {\n\t\t\tList<TaggedWord> tSentence = tagger.tagSentence(sentence);\n\t\t\tlist.add(tSentence);\n\t\t}\n\t\treturn list;\n\t}", "public static void processArrayList(){\n ArrayList<String> newArray = new ArrayList<String>();\n newArray.addAll(groceryList.getGroceryList()); //Method 1: adds all items from the groceryList into the newArray\n\n ArrayList<String> newArray2 = new ArrayList<String>(groceryList.getGroceryList()); //Method 2: same as method 1 but the copying happens at the time of initialising the newArray2\n\n //if for some reason you want to save all the contents of an arrayList into an array\n String[] myArray = new String[groceryList.getGroceryList().size()]; //create the array to be equal to the size of the arraylist\n myArray = groceryList.getGroceryList().toArray(myArray); //convert an arraylist of strings (the outcome of getGroceryList()), and save it into our array\n }", "public static void readFromFile(ArrayList<String> sArrayList, Context context){\n\n int i=0;\n try{\n InputStream inputStream = context.openFileInput(TxtName);\n\n if(inputStream!=null) {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n String receivedString = \"\";\n\n while((receivedString = bufferedReader.readLine())!=null){\n sArrayList.set(i,receivedString);\n Log.d(\"fileContent\", \"readFromFile: \"+sArrayList.get(i)+\"\\n\");\n i++;\n }\n inputStream.close();\n }\n\n } catch (FileNotFoundException e) {\n Log.e(\"login activity\", \"File not found: \" + e.toString());\n } catch (IOException e) {\n Log.e(\"login activity\", \"Can not read file: \" + e.toString());\n }\n\n }", "private ArrayList<String> initList(String[] vastitems){\n return new ArrayList<>(Arrays.asList(vastitems));\n }", "private static List<StudentRecord> convert(List<String> lines) {\n\t\tObjects.requireNonNull(lines);\n\t\t\n\t\tArrayList<StudentRecord> result = new ArrayList<>(lines.size());\n\t\t\n\t\tfor(String data : lines) {\n\t\t\tif(data.length() == 0) continue; //preskoci prazne linije\n\t\t\tScanner sc = new Scanner(data);\n\t\t\tsc.useDelimiter(\"\\t\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\tresult.add(new StudentRecord(sc.next(), sc.next(), sc.next(), sc.next(), sc.next(), sc.next(), sc.next()));\n\t\t\t}catch(NoSuchElementException e) {\n\t\t\t\tsc.close();\n\t\t\t\tthrow new NoSuchElementException(\"Data not formatted correctly.\");\n\t\t\t}\n\t\t\tsc.close();\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public ArrayList<Instance> read() throws IOException{\n ArrayList<Instance> instances;\n instances = new ArrayList<>();\n String s;\n String[] c;\n Instance i;\n while(reader.ready()){\n s = getInstanceFromFile();\n i = new Instance();\n c = s.split(\",\");\n for(int j = 0; j < c.length - 1; j++)\n i.addFeature(Double.parseDouble(c[j]));\n // The last part of a line is the class label\n // See dataset that is used\n i.setClassification(c[c.length - 1]);\n instances.add(i);\n }\n return instances;\n }", "public static ArrayList<String> topiclist(){\n ArrayList<String> temp = new ArrayList<String>();\n Scanner topicer;\n try {\n topicer = new Scanner(new File(\"Topics.txt\"));\n topicer.useDelimiter(\",~ *\\n*\");\n while (topicer.hasNext()){\n String[] key = topicer.next().split(\",\");\n //String value = \"\";\n if(topicer.hasNext())\n topicer.next();\n for (int i = 0; i < key.length; i++)\n \ttemp.add(key[i]);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return temp;\n }", "List<String[]> readAll();", "List<E> read();", "private ArrayList<String> getArrayList() throws IOException {\n long jumpTo = 0;\n ArrayList<String> arrayList = new ArrayList<String>();\n arrayList.add(readStringUntil0x());\n boolean notFound = true;\n while (notFound == true) {\n ins.skip(jumpTo);\n String actIndex = readStringUntil0x();\n long lowerIndex = readJumpOffset();\n long upperIndex = readJumpOffset();\n if ((searchIndex.compareTo(actIndex) < 0) && (lowerIndex > 0)) {\n jumpTo = lowerIndex - 1;\n } else if ((searchIndex.compareTo(actIndex) > 0) && upperIndex > 0) {\n jumpTo = upperIndex - 1;\n } else if (searchIndex.compareTo(actIndex) == 0) {\n notFound = false;\n // reading all the found lines\n actIndex = readStringUntil0x();\n while (!actIndex.equalsIgnoreCase(\"\")) {\n arrayList.add(actIndex);\n actIndex = readStringUntil0x();\n }\n } else {\n notFound = false;\n arrayList = null;\n }\n }\n return arrayList;\n }", "public void getOldFile() throws FileNotFoundException, IOException, ClassNotFoundException{\r\n\t\tObjectInputStream ois = new ObjectInputStream(new FileInputStream(\"agenda.txt\"));\r\n\t\tArrayList<Artist> inputArtists = (ArrayList<Artist>) ois.readObject();\r\n\t\tArrayList<Stage> inputStages = (ArrayList<Stage>) ois.readObject();\r\n\t\tArrayList<Performance> inputPerformances = (ArrayList<Performance>) ois.readObject();\r\n\t\tartists.addAll(inputArtists);\r\n\t\tstages.addAll(inputStages);\r\n\t\tperformances.addAll(inputPerformances);\r\n\t}", "private void readFromInternalStorage() {\n ArrayList<GeofenceObjects> returnlist = new ArrayList<>();\n if (!isExternalStorageReadable()) {\n System.out.println(\"not readable\");\n } else {\n returnlist = new ArrayList<>();\n try {\n FileInputStream fis = openFileInput(\"GeoFences\");\n ObjectInputStream ois = new ObjectInputStream(fis);\n returnlist = (ArrayList<GeofenceObjects>) ois.readObject();\n ois.close();\n System.out.println(returnlist);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n currentList = returnlist;\n }", "public List<String> load();", "private ArrayList<Read> makeReadList() {\r\n\t\tArrayList<Read> rlist=makeReadList2();\r\n\t\tif(mateStream!=null){\r\n\t\t\tListNum<Read> matesln=mateStream.nextList();\r\n\t\t\tArrayList<Read> mates=matesln.list;\r\n\t\t\tif(rlist!=null && mates!=null){\r\n\t\t\t\tint max=Tools.min(rlist.size(), mates.size());\r\n\t\t\t\tfor(int i=0; i<max; i++){\r\n\t\t\t\t\tRead a=rlist.get(i);\r\n\t\t\t\t\tRead b=mates.get(i);\r\n\t\t\t\t\ta.mate=b;\r\n\t\t\t\t\tb.mate=a;\r\n\t\t\t\t\tb.setPairnum(1);\r\n\t\t\t\t}\r\n\t\t\t\tmates.clear();\r\n\t\t\t\tmateStream.returnList(matesln, false);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn rlist;\r\n\t}", "public static ArrayList<Task> deser() {\n ArrayList<Task> taskList; // declaring the tasks ArrayList variable\n taskList = new ArrayList<Task>(); // giving this object a temporary pointer\n try {\n FileInputStream fileIn = new FileInputStream(\"taskList.ser\"); // searching for the file to deserialize\n ObjectInputStream in = new ObjectInputStream(fileIn); // object used for deserializing \n taskList = (ArrayList) in.readObject(); // reading the serialized ArrayList object and assigning it to tasks\n in.close(); // closing the object for deserializing\n fileIn.close(); // closing the file thats being read\n } catch (FileNotFoundException fnfe) { // if the file cannot be found\n // System.out.println(\"You have not created any tasks yet.\"); // tells the user they have not created any tasks\n } catch (IOException ioe) { // if an IO exception gets thrown\n // System.err.println(\"Java IO Exception: \" + ioe); // prints an error message\n } catch (ClassNotFoundException cnfe) { // if the class is not recognized\n // System.err.println(\"Class of object not found. Cannot deserialize.\"); // prints an error \n }\n return taskList;\n }", "public static void readInto(ArrayList<String> list) throws Exception {\n URL wordsURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(wordsURL.openStream()));\n String word;\n while ((word = in.readLine()) != null){\n list.add(word);\n }\n in.close();\n }", "ArrayList<String> createList(String finalInput);", "List <JAVATYPE> convertList(List<JAVATYPE> oldList, final METATYPE meta);", "@Override\n\tpublic void apply(TokenStream stream) throws TokenizerException {\n\t\tcreateList();\n\t\tstream.reset();\n\t\twhile(stream.hasNext()){\n\t\t\tString ans=stream.next();\n\t\t\tans=ans.trim();\n\t\t\tif(ans.matches(\"\")){\n\t\t\t\tstream.previous();\n\t\t\t\tstream.remove();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tObject[] key=tokens.keySet().toArray();\n\t\t\tfor(int i=0 ;i<tokens.size(); i++){\n\t\t\t\tif(ans.contains(key[i].toString())){\n\t\t\t\t\tans=ans.replaceAll(key[i].toString(), tokens.get(key[i].toString()));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstream.previous();\n\t\t\tstream.set(ans);\n\t\t\tstream.next();\n\n\t\t}\n\t\t//stream.reset();\n\t}", "public ArrayList<String> recursiveTokenize(ArrayList<String> tempList, ArrayList<String> newList, int done) { //cant figure out what's wrong\n\t\tif (done == 1) {\n\t\t\treturn tempList;\n\t\t}\n\t\t//newList = tempList;\n\t\tint pass = 1;\n\t\t\n\t\tfor (int i = 0; i < tempList.size(); i++) {\n\t\t\tString token = tempList.get(i);\n\t\t\t\n\t\t\t//CASE: token has `Class.methods`\n\t\t\tif (token.matches(\".+\\\\..+\") && !token.contains(\".txt\")) {\n\t\t\t\tpass = 0;\n\t\t\t\t\n\t\t\t\t//add the split tokens to the end of the new list\n\t\t\t\tString[] tempSplit = token.split(\"(?<=\\\\.)|(?=\\\\.)\");\n\t\t\t\tfor (String temp : tempSplit) { \n\t\t\t\t\tnewList.add(temp);\n\t\t\t\t} \n\t\t\t} else if (token.matches(\".+;.*\")) { //CASE: \";\"\n\t\t\t\tpass = 0;\n\t\t\t\tString[] tempSplit = token.split(\"(?<=;)|(?=;)\");\n\t\t\t\tfor (String temp : tempSplit) { \n\t\t\t\t\tnewList.add(temp);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if (token.matches(\".*\\\\(.+\") || token.matches(\".+\\\\(.*\")) { //CASE: ( or ), and { or } later\n\t\t\t\tpass = 0;\n\t\t\t\tString[] tempSplit = token.split(\"(?<=\\\\()|(?=\\\\()\");\n\t\t\t\tfor (String temp : tempSplit) { \n\t\t\t\t\tnewList.add(temp);\n\t\t\t\t}\n\t\t\t} else if (token.matches(\".*\\\\).+\") || token.matches(\".+\\\\).*\")) { //CASE: ( or ), and { or } later\n\t\t\t\tpass = 0;\n\t\t\t\tString[] tempSplit = token.split(\"(?<=\\\\))|(?=\\\\))\");\n\t\t\t\tfor (String temp : tempSplit) { \n\t\t\t\t\tnewList.add(temp);\n\t\t\t\t}\n\t\t\t} else { //CASE: token doesn't need to be split up further.\n\t\t\t\ttoken.trim();\n\t\t\t\ttoken.replaceAll(\"\\\\s\", \"\");\n\t\t\t\tif (!token.isEmpty()) {\n\t\t\t\t\tnewList.add(token);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//if pass is still 1, then it will end recursion and return the final tokenized version.\n\t\tArrayList<String> emptyList = new ArrayList<String>();\n\t\treturn recursiveTokenize(newList, emptyList, pass);\n\t}", "@Override\n default List<FieldElement> deserializeList(byte[] bytes) {\n List<CompT> wrongType = getSerializer().deserializeList(bytes);\n return wrongType.stream().map(x -> (FieldElement) x).collect(Collectors.toList());\n }", "public List<Tailor> read();", "private ArrayList parseStringToList(String data){\n ArrayList<String> result = new ArrayList<String>();\n String[] splitResult = data.split(\",\");\n for(String substring : splitResult){\n result.add(substring);\n }\n return result;\n }", "protected abstract List<O> parseFileForObservations(Scanner scn);", "static ArrayList<String[]> parseDataToArray(Scanner data){\n\t\tArrayList<String[]> toParse = new ArrayList<String[]>();\n\n\t\twhile(data.hasNext()){ //read everything from data into a String ArrayList, fixing it as we go.\n\t\t\ttoParse.add(fixInputLine(data.nextLine()).split(\"%\"));\n\t\t}\n\n\t\treturn toParse;\n\n\t}", "private static ArrayList read() throws IOException, ClassNotFoundException {\n FileInputStream file = new FileInputStream(\"scores.ser\"); \n ObjectInputStream in = new ObjectInputStream(file); \n \n // Method for deserialization of object \n ArrayList scores = (ArrayList)in.readObject(); \n \n in.close(); \n file.close(); \n \n\t\treturn scores;\n\t}", "public ArrayList<Employee> parseData(ArrayList<String> data) {\n ArrayList<Employee> employees = new ArrayList<>();\n String[] buf;\n\n for (String line : data) {\n buf = line.split(delimiter);\n employees.add(new Employee(buf[1], buf[0], Integer.parseInt(buf[2])));\n }\n\n return employees;\n }", "@NotNull\n @Deprecated\n protected abstract List<? extends ListItem> readItems();", "public void readInSearchTokens() {\n String propFile = properties.getProperty(\"classpath.search.tokens\");\n //Try with resources\n try (InputStream inputStream = this.getClass().getResourceAsStream(propFile);\n \n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n BufferedReader searchTokensReader = new BufferedReader(inputStreamReader)) {\n //Tells the stream that it is ready to be read\n while (searchTokensReader.ready()) {\n String line = searchTokensReader.readLine();\n //eliminating leading and trailing spaces with trim and split\n //creating a string array of tokens\n String[] tokens = line.trim().split(\"\\\\s*,\\\\s\");\n List<Integer> lArray = new ArrayList<Integer>();\n // Notes: String is the type - element is the identifier. Tokens is the name\n for (String element : tokens) {\n if (element.isEmpty() == false) {\n //using containsKey to ensure the FoundLocations is in the tokens array\n if (getFoundLocations().containsKey(element) == false) {\n getFoundLocations().put(element, lArray);\n }\n }\n }\n }\n } catch (IOException inputOutputException) {\n inputOutputException.printStackTrace();\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n }", "public void processList(List<String> inList);", "private void populateListFromLine(String line, List<String> wordList) {\n\t\tif (line != null && line.length() > 0) {\n\t\t\tString[] words = line.split(\"\\\\s|\\\\?|\\\\.|\\\\!|\\\\:|\\\\;|\\\\-\");\n\t\t\tfor (String word : words) {\n\t\t\t\twordList.add(word);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public ArrayList<Object> getFieldsAsList() {\n if (!getParsed()) {\n parse();\n }\n if (cachedList == null) {\n cachedList = new ArrayList<Object>();\n } else {\n cachedList.clear();\n }\n for (int i = 0; i < getFields().length; i++) {\n cachedList.add(uncheckedGetField(i));\n }\n return cachedList;\n }", "public void updateData(ArrayList<T> objects) {\n mTokensMap = new HashMap<String, HashSet<T>>();\n\n // Build the tokens map\n for (T object : objects) {\n for (String token : object.getTokens()) {\n token = token.toLowerCase();\n HashSet<T> references = mTokensMap.get(token);\n if (references == null) {\n references = new HashSet<T>();\n references.add(object);\n mTokensMap.put(token, references);\n } else {\n references.add(object);\n }\n }\n }\n }", "private ArrayList<String> loadIds() {\n\n\t\tArrayList<String> idArray = new ArrayList<String>();\n\t\ttry {\n\t\t\tFileInputStream fileInputStream = context.openFileInput(SAVE_FILE);\n\t\t\tInputStreamReader inputStreamReader = new InputStreamReader(\n\t\t\t\t\tfileInputStream);\n\t\t\tType listType = new TypeToken<ArrayList<String>>() {\n\t\t\t}.getType();\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\t\t\tGson gson = builder.create();\n\t\t\tArrayList<String> list = gson.fromJson(inputStreamReader, listType);\n\t\t\tidArray = list;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn idArray;\n\t}", "private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n InputStreamReader isr = new InputStreamReader(fis);\n BufferedReader reader = new BufferedReader(isr);\n Gson gson = new Gson();\n Type listFeelingType = new TypeToken<ArrayList<Feeling>>(){}.getType();\n recordedFeelings.clear();\n ArrayList<Feeling> tmp = gson.fromJson(reader, listFeelingType);\n recordedFeelings.addAll(tmp);\n fis.close();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n recordedFeelings = new ArrayList<Feeling>();\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "private ArrayList<Alimento> initLista() {\n try {\n File file = new File(\"C:\\\\Users\\\\Gabri\\\\OneDrive\\\\Ambiente de Trabalho\\\\Calorie\\\\src\\\\Assets\\\\alimentos.txt\");\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n\n ArrayList<Alimento> lista = new ArrayList<>();\n\n int noLines = Integer.parseInt(br.readLine());\n for(int l=0; l<noLines; l++) {\n String[] alimTks = (br.readLine()).split(\",\");\n\n Alimento alimento = new Alimento(idAlimCounter++,alimTks[0],100,Integer.parseInt(alimTks[1]),Float.parseFloat(alimTks[2]),Float.parseFloat(alimTks[3]),Float.parseFloat(alimTks[4]));\n lista.add(alimento);\n }\n\n return lista;\n }catch (Exception e) {\n System.out.println(\"Sistema - getLista() : \"+e.toString());\n }\n return null;\n }", "public ArrayList<ArrayList<Character> > reader(java.io.InputStream in) throws IOException{\n String s = \"\";\n int data = in.read();\n while(data!=-1){\n s += String.valueOf((char)data);\n data = in.read();\n }\t\t\t\t\t\t\t\t// s now has the input file stored as a string\n ArrayList<ArrayList<Character> > arr = new ArrayList<>();\n for(int i = 0;i<s.length();){\n ArrayList<Character> a = new ArrayList<>();\n while(s.charAt(i)!='\\n'){\n if((s.charAt(i)-'a'>=0&&s.charAt(i)-'a'<=25)||(s.charAt(i)-'0'>=0&&s.charAt(i)-'0'<=9)){ //taking only alphanumerics\n a.add(s.charAt(i));\n }\n i++;\n }\n arr.add(a);\n i++;\n }\n return arr;\n }", "public void fileToArrayList(String filename, ArrayList<Task> tasks)\n {\n \tTaskReader reader = new TaskReader();\n tasks.addAll(reader.getArrayFromFile(filename));\n }", "public ArrayList<String> tokeniseDocument(Path path) {\n ArrayList<String> tokens;\n StringBuilder sb = new StringBuilder();\n\n // Read the file\n try {\n Files.readAllLines(path).forEach(line -> {\n // Check if line ends with hyphen\n if (line.endsWith(\"-\")) {\n // Remove the hyphen\n line = line.substring(0, line.length() - 1);\n\n // The next line will not have a space.\n sb.append(line);\n } else {\n // Add a space between line breaks\n sb.append(line + \" \");\n }\n });\n } catch (IOException e) {\n System.out.println(\"Error reading document.\");\n }\n\n // Tokenise the string\n String documentString = sb.toString();\n tokens = this.tokeniseString(documentString);\n\n // Normalise the tokens\n tokens = this.normaliseTokens(tokens);\n\n // Remove commas\n tokens = this.removeCommas(tokens);\n\n // Remove the stopwords\n this.removeStopwords(tokens);\n\n // Remove empty tokens that resulted from normalisation\n this.removeEmptyTokens(tokens);\n\n // Stem the tokens\n tokens = this.stemTokens(tokens);\n\n return tokens;\n }", "List<Tag> load();", "private List<String> ListTransform(Object value) {\n\n if (value.toString().contains(lineDelimiter))\n return Arrays.asList(value.toString().split(lineDelimiter));\n\n List<String> lines = new ArrayList<>();\n if (!value.toString().equals(\"\"))\n lines.add(value.toString());\n\n return lines;\n }", "void read() {\n try {\n pre_list = new ArrayList<>();\n suf_list = new ArrayList<>();\n p_name = new ArrayList<>();\n stem_word = new ArrayList<>();\n\n //reading place and town name\n for (File places : place_name.listFiles()) {\n fin = new FileInputStream(places);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n place.add(temp);\n }\n\n }\n\n //reading month name\n for (File mont : month_name.listFiles()) {\n fin = new FileInputStream(mont);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n month.add(temp);\n }\n }\n\n //reading compound words first\n for (File comp_word : com_word_first.listFiles()) {\n fin = new FileInputStream(comp_word);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n comp_first.add(temp);\n }\n }\n //reading next word of the compound\n for (File comp_word_next : com_word_next.listFiles()) {\n fin = new FileInputStream(comp_word_next);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n comp_next.add(temp);\n }\n }\n //reading chi square feature\n for (File entry : chifile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n chiunion.add(temp);\n }\n newunions.clear();\n newunions.addAll(chiunion);\n chiunion.clear();\n chiunion.addAll(newunions);\n chiunion.removeAll(stop_word_list);\n chiunion.removeAll(p_name);\n chiunion.removeAll(month);\n chiunion.removeAll(place);\n }\n //reading short form from abbrivation \n for (File short_list : abbrivation_short.listFiles()) {\n fin = new FileInputStream(short_list);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n shortform.add(temp);\n }\n }\n //reading long form from the abrivation \n for (File long_list : abbrivation_long.listFiles()) {\n fin = new FileInputStream(long_list);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n longform.add(temp);\n }\n }\n //reading file from stop word\n for (File stoplist : stop_word.listFiles()) {\n fin = new FileInputStream(stoplist);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n stop_word_list.add(temp);\n }\n }\n\n //reading person name list\n for (File per_name : person_name.listFiles()) {\n fin = new FileInputStream(per_name);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n p_name.add(temp);\n }\n }\n\n //reading intersection union\n for (File entry : interfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n interunion.add(temp);\n }\n }\n newunions.clear();\n newunions.addAll(interunion);\n interunion.clear();\n interunion.addAll(newunions);\n interunion.removeAll(stop_word_list);\n interunion.removeAll(p_name);\n interunion.removeAll(month);\n interunion.removeAll(place);\n }\n // reading ig union\n for (File entry : igfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n igunion.add(temp);\n }\n }\n for (String str : igunion) {\n int index = igunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n igunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(igunion);\n igunion.clear();\n igunion.addAll(newunions);\n igunion.removeAll(stop_word_list);\n igunion.removeAll(p_name);\n igunion.removeAll(month);\n igunion.removeAll(place);\n }\n //read df uinfion\n for (File entry : dffile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n dfunion.add(temp);\n }\n }\n for (String str : dfunion) {\n int index = dfunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n dfunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(dfunion);\n dfunion.clear();\n dfunion.addAll(newunions);\n dfunion.removeAll(stop_word_list);\n dfunion.removeAll(p_name);\n dfunion.removeAll(month);\n dfunion.removeAll(place);\n }\n //reading unified model\n for (File entry : unionall_3.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n union_3.add(temp);\n }\n }\n for (String str : union_3) {\n int index = union_3.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n union_3.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(union_3);\n union_3.clear();\n union_3.addAll(newunions);\n union_3.removeAll(stop_word_list);\n union_3.removeAll(p_name);\n union_3.removeAll(month);\n union_3.removeAll(place);\n }\n //unified feature for the new model\n for (File entry : unified.listFiles()) {\n\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n newunion.add(temp);\n\n }\n for (String str : newunion) {\n int index = newunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n newunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(newunion);\n newunion.clear();\n newunion.addAll(newunions);\n newunion.removeAll(stop_word_list);\n newunion.removeAll(p_name);\n newunion.removeAll(month);\n newunion.removeAll(place);\n\n // newunion.addAll(newunions);\n }\n // reading test file and predict the class\n for (File entry : test_doc.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n file_test.add(temp);\n\n }\n newunions.clear();\n newunions.addAll(file_test);\n file_test.clear();\n file_test.addAll(newunions);\n file_test.removeAll(stop_word_list);\n file_test.removeAll(p_name);\n file_test.removeAll(month);\n file_test.removeAll(place);\n }\n //reading the whole document under economy class\n for (File entry : economy.listFiles()) {\n fill = new File(economy + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n economydocument[count1] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n economydocument[count1].add(temp);\n if (temp.length() < 2) {\n economydocument[count1].remove(temp);\n }\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n economydocument[count1].remove(temp);\n }\n }\n for (String str : economydocument[count1]) {\n int index = economydocument[count1].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n economydocument[count1].set(index, stem_word.get(i));\n }\n }\n }\n }\n economydocument[count1].removeAll(stop_word_list);\n economydocument[count1].removeAll(p_name);\n economydocument[count1].removeAll(month);\n economydocument[count1].removeAll(place);\n allecofeature.addAll(economydocument[count1]);\n ecofeature.addAll(economydocument[count1]);\n allfeature.addAll(ecofeature);\n all.addAll(allecofeature);\n count1++;\n\n }\n //reading the whole documents under education category \n for (File entry : education.listFiles()) {\n fill = new File(education + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n educationdocument[count2] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n educationdocument[count2].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n educationdocument[count2].remove(temp);\n }\n }\n }\n\n for (String str : educationdocument[count2]) {\n int index = educationdocument[count2].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n educationdocument[count2].set(index, stem_word.get(i));\n }\n }\n }\n educationdocument[count2].removeAll(stop_word_list);\n educationdocument[count2].removeAll(p_name);\n educationdocument[count2].removeAll(month);\n educationdocument[count2].removeAll(place);\n alledufeature.addAll(educationdocument[count2]);\n edufeature.addAll(educationdocument[count2]);\n allfeature.addAll(edufeature);\n all.addAll(alledufeature);\n count2++;\n }\n// //reading all the documents under sport category\n for (File entry : sport.listFiles()) {\n fill = new File(sport + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n sportdocument[count3] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n sportdocument[count3].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n sportdocument[count3].remove(temp);\n }\n }\n }\n\n for (String str : sportdocument[count3]) {\n int index = sportdocument[count3].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n sportdocument[count3].set(index, stem_word.get(i));\n }\n }\n }\n sportdocument[count3].removeAll(stop_word_list);\n sportdocument[count3].removeAll(p_name);\n sportdocument[count3].removeAll(month);\n sportdocument[count3].removeAll(place);\n allspofeature.addAll(sportdocument[count3]);\n spofeature.addAll(sportdocument[count3]);\n allfeature.addAll(spofeature);\n all.addAll(allspofeature);\n count3++;\n }\n\n// //reading all the documents under culture category\n for (File entry : culture.listFiles()) {\n fill = new File(culture + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n culturedocument[count4] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n\n culturedocument[count4].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n culturedocument[count4].remove(temp);\n }\n }\n\n }\n for (String str : culturedocument[count4]) {\n int index = culturedocument[count4].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n culturedocument[count4].set(index, stem_word.get(i));\n }\n }\n }\n culturedocument[count4].removeAll(stop_word_list);\n culturedocument[count4].removeAll(p_name);\n culturedocument[count4].removeAll(month);\n culturedocument[count4].removeAll(place);\n allculfeature.addAll(culturedocument[count4]);\n culfeature.addAll(culturedocument[count4]);\n allfeature.addAll(culfeature);\n all.addAll(allculfeature);\n count4++;\n\n }\n\n// //reading all the documents under accident category\n for (File entry : accident.listFiles()) {\n fill = new File(accident + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n accedentdocument[count5] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n accedentdocument[count5].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n accedentdocument[count5].remove(temp);\n }\n }\n\n }\n\n for (String str : accedentdocument[count5]) {\n int index = accedentdocument[count5].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n accedentdocument[count5].set(index, stem_word.get(i));\n }\n }\n }\n accedentdocument[count5].removeAll(stop_word_list);\n accedentdocument[count5].removeAll(p_name);\n accedentdocument[count5].removeAll(month);\n accedentdocument[count5].removeAll(place);\n allaccfeature.addAll(accedentdocument[count5]);\n accfeature.addAll(accedentdocument[count5]);\n allfeature.addAll(accfeature);\n all.addAll(allaccfeature);\n count5++;\n }\n\n// //reading all the documents under environmental category\n for (File entry : environmntal.listFiles()) {\n fill = new File(environmntal + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n environmntaldocument[count6] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n environmntaldocument[count6].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n environmntaldocument[count6].remove(temp);\n }\n }\n }\n\n for (String str : environmntaldocument[count6]) {\n int index = environmntaldocument[count6].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n environmntaldocument[count6].set(index, stem_word.get(i));\n }\n }\n }\n environmntaldocument[count6].removeAll(stop_word_list);\n environmntaldocument[count6].removeAll(p_name);\n environmntaldocument[count6].removeAll(month);\n environmntaldocument[count6].removeAll(place);\n allenvfeature.addAll(environmntaldocument[count6]);\n envfeature.addAll(environmntaldocument[count6]);\n allfeature.addAll(envfeature);\n all.addAll(allenvfeature);\n count6++;\n }\n\n// //reading all the documents under foreign affairs category\n for (File entry : foreign_affair.listFiles()) {\n fill = new File(foreign_affair + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n foreign_affairdocument[count7] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n foreign_affairdocument[count7].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n foreign_affairdocument[count7].remove(temp);\n }\n }\n\n }\n for (String str : foreign_affairdocument[count7]) {\n int index = foreign_affairdocument[count7].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n foreign_affairdocument[count7].set(index, stem_word.get(i));\n }\n }\n }\n foreign_affairdocument[count7].removeAll(stop_word_list);\n foreign_affairdocument[count7].removeAll(p_name);\n foreign_affairdocument[count7].removeAll(month);\n foreign_affairdocument[count7].removeAll(place);\n alldepfeature.addAll(foreign_affairdocument[count7]);\n depfeature.addAll(foreign_affairdocument[count7]);\n allfeature.addAll(depfeature);\n all.addAll(alldepfeature);\n count7++;\n }\n\n// //reading all the documents under law and justices category\n for (File entry : law_justice.listFiles()) {\n fill = new File(law_justice + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n law_justicedocument[count8] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n law_justicedocument[count8].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n law_justicedocument[count8].remove(temp);\n }\n }\n\n }\n for (String str : law_justicedocument[count8]) {\n int index = law_justicedocument[count8].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n law_justicedocument[count8].set(index, stem_word.get(i));\n }\n }\n }\n law_justicedocument[count8].removeAll(stop_word_list);\n law_justicedocument[count8].removeAll(p_name);\n law_justicedocument[count8].removeAll(month);\n law_justicedocument[count8].removeAll(month);\n alllawfeature.addAll(law_justicedocument[count8]);\n lawfeature.addAll(law_justicedocument[count8]);\n allfeature.addAll(lawfeature);\n all.addAll(alllawfeature);\n count8++;\n }\n\n// //reading all the documents under other category\n for (File entry : agri.listFiles()) {\n fill = new File(agri + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n agriculture[count9] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n agriculture[count9].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n agriculture[count9].remove(temp);\n }\n }\n\n }\n for (String str : agriculture[count9]) {\n int index = agriculture[count9].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n agriculture[count9].set(index, stem_word.get(i));\n }\n }\n }\n agriculture[count9].removeAll(stop_word_list);\n agriculture[count9].removeAll(p_name);\n agriculture[count9].removeAll(month);\n agriculture[count9].removeAll(place);\n allagrifeature.addAll(agriculture[count9]);\n agrifeature.addAll(agriculture[count9]);\n allfeature.addAll(agrifeature);\n all.addAll(allagrifeature);\n count9++;\n }\n //reading all the documents under politics category\n for (File entry : politics.listFiles()) {\n fill = new File(politics + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n politicsdocument[count10] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n politicsdocument[count10].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n politicsdocument[count10].remove(temp);\n }\n }\n }\n for (String str : politicsdocument[count10]) {\n int index = politicsdocument[count10].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n politicsdocument[count10].set(index, stem_word.get(i));\n }\n }\n }\n politicsdocument[count10].removeAll(stop_word_list);\n politicsdocument[count10].removeAll(p_name);\n politicsdocument[count10].removeAll(month);\n politicsdocument[count10].removeAll(place);\n allpolfeature.addAll(politicsdocument[count10]);\n polfeature.addAll(politicsdocument[count10]);\n allfeature.addAll(polfeature);\n all.addAll(allpolfeature);\n count10++;\n }\n //reading all the documents under science and technology category\n for (File entry : science_technology.listFiles()) {\n fill = new File(science_technology + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n science_technologydocument[count12] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n science_technologydocument[count12].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n science_technologydocument[count12].remove(temp);\n }\n }\n\n }\n for (String str : science_technologydocument[count12]) {\n int index = science_technologydocument[count12].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n science_technologydocument[count12].set(index, stem_word.get(i));\n }\n }\n }\n science_technologydocument[count12].removeAll(stop_word_list);\n science_technologydocument[count12].removeAll(p_name);\n science_technologydocument[count12].removeAll(month);\n science_technologydocument[count12].removeAll(place);\n allscifeature.addAll(science_technologydocument[count12]);\n scifeature.addAll(science_technologydocument[count12]);\n allfeature.addAll(scifeature);\n all.addAll(allscifeature);\n count12++;\n\n }\n\n //reading all the documents under health category\n for (File entry : health.listFiles()) {\n fill = new File(health + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n healthdocument[count13] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n healthdocument[count13].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n healthdocument[count13].remove(temp);\n }\n }\n }\n for (String str : healthdocument[count13]) {\n int index = healthdocument[count13].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n healthdocument[count13].set(index, stem_word.get(i));\n }\n }\n }\n healthdocument[count13].removeAll(stop_word_list);\n healthdocument[count13].removeAll(p_name);\n healthdocument[count13].removeAll(month);\n healthdocument[count13].removeAll(place);\n allhelfeature.addAll(healthdocument[count13]);\n helfeature.addAll(healthdocument[count13]);\n allfeature.addAll(helfeature);\n all.addAll(allhelfeature);\n count13++;\n }\n\n //reading all the file of relgion categories \n for (File entry : army_file.listFiles()) {\n fill = new File(army_file + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n army[count14] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n army[count14].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n army[count14].remove(temp);\n }\n }\n\n }\n for (String str : army[count14]) {\n int index = army[count14].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n army[count14].set(index, stem_word.get(i));\n }\n }\n }\n army[count14].removeAll(stop_word_list);\n army[count14].removeAll(p_name);\n army[count14].removeAll(month);\n army[count14].removeAll(place);\n allarmfeature.addAll(army[count14]);\n armfeature.addAll(army[count14]);\n allfeature.addAll(armfeature);\n all.addAll(allarmfeature);\n count14++;\n }\n } catch (Exception ex) {\n System.out.println(\"here\");\n }\n }", "public ArrayList<String> loadRead() {\n\n\t\tSAVE_FILE = READ_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic CopyOnWriteArrayList<User> importUserList() throws IOException, ClassNotFoundException, FileNotFoundException {\r\n\t\tObjectInputStream in;\r\n\t\tCopyOnWriteArrayList<User> tmpUserList = new CopyOnWriteArrayList<User>();\r\n\t\tin= new ObjectInputStream(\r\n\t\t\t\tnew BufferedInputStream(\r\n\t\t\t\t\t\tnew FileInputStream(\"userList.dat\")));\r\n\t\ttmpUserList= (CopyOnWriteArrayList<User>)in.readObject();\r\n\t\tin.close();\r\n\t\treturn tmpUserList;\r\n\t}", "private ArrayList<String> stringToArrayList(String group, String splitter) {\n\t\t\n\t\t// Temp variables for splitting the string\n\t\tString[] splitString = TextUtils.split(group, splitter);\n\t\tArrayList<String> al = new ArrayList<String>();\n\t\t\n\t\t\n\t\tfor(int i=0; i<splitString.length; i++){\n\t\t\tLog.v(TAG, \"Read group \" + splitString[i]);\n\t\t\tal.add(splitString[i]);\n\t\t}\n\t\t\n\t\treturn al;\n\t}", "@Override\n\tprotected ListEntity readList(Serializable seri) {\n\t\treturn (VipStudentList)seri;\n\t}", "private void buildUnsortedList(String list)\n\t{\n\t\ttokenBuffer = new StringTokenizer(line);\n\t\tlistSize = Integer.parseInt(tokenBuffer.nextToken());\n\t\tunsortedList = new int[listSize];\n\t\tsortedList = new int[listSize];\n\n\t\t// Grab each integer from the line and throw it in our lists\n\t\tfor(int i = 0; i < listSize; i++) \n\t\t{\n\t\t\tunsortedList[i] = Integer.parseInt(tokenBuffer.nextToken());\n\t\t\tsortedList[i] = unsortedList[i];\n\t\t}\n\t}", "public ArrayBackedList(IList list) {\n while (list.size() > stringArray.length) {\n reallocArray();\n }\n for (int i = 0; i < list.size(); i++) {\n stringArray[i] = list.get(i);\n }\n }", "@Override\n protected void initializeReader() {\n this.fileList = new ArrayList<>();\n this.fileListPosition = new AtomicInteger(0);\n this.currentTextAnnotation = new AtomicReference<>();\n }", "public static ArrayList<ArrayList<Feiertag>> produceFromString(File[] f) {\n\t\tArrayList<ArrayList<Feiertag>> ret = new ArrayList<ArrayList<Feiertag>>();\n\t\tfor (int i = 0; i < f.length; i++) {\n\t\t\tArrayList<Feiertag> temp = new ArrayList<Feiertag>();\n\t\t\ttry {\n\t\t\t\tScanner myReader = new Scanner(f[i]);\n\t\t\t\twhile (myReader.hasNextLine()) {\n\t\t\t\t\tString data = myReader.nextLine();\n\t\t\t\t\ttemp.add(new Feiertag(FeiertageFactory.toDate(data), FeiertageFactory.toName(data)));\n\t\t\t\t}\n\t\t\t\tmyReader.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tret.add(temp);\n\t\t}\n\t\treturn ret;\n\t}", "public Layer[] reconstruct(){\r\n ArrayList<String[]> rawData = pullFromText(location);\r\n return rawData != null ? reformat(rawData) : null;\r\n }", "public int selectOriginalTokens (Scanner scan, String [] list){\n \n int count = 0;\n while(scan.hasNext()){\n String line = scan.nextLine();\n String[] t = line.split(\"[ \\n\\t\\r.,:?)({}\\\\[\\\\]]\");\n for (int i = 0; i < t.length; i++){\n String item = t[i].trim();\n if(item.length() > 0){\n list[count] = item;\n count++;\n }//End if statement\n }//End for loop\n }//End while loop\n \n return count;\n }", "@Test\n public void testCreateRouterArrayList() throws Exception {\n System.out.println(\"createRouterArrayList\");\n //Scanner input = new Scanner(System.in);\n java.io.File file = new java.io.File(\"sample.csv\");\n Scanner input = new Scanner(file);\n ArrayList<String> expResult = new ArrayList<>(Arrays.asList(\n \"A.example.COM,1.1.1.1,NO,11,Faulty fans\",\n \"b.example.com,1.1.1.2,no,13,Behind the other routers so no one sees it\",\n \"C.EXAMPLE.COM,1.1.1.3,no,12.1,\",\n \"d.example.com,1.1.1.4,yes,14,\",\n \"c.example.com,1.1.1.5,no,12,Case a bit loose\",\n \"e.example.com,1.1.1.6,no,12.3,\",\n \"f.example.com,1.1.1.7,No,12.200,\",\n \"g.example.com,1.1.1.6,no,15.0,Guarded by sharks with lasers on their heads\"\n ));\n ArrayList<String> result = BTRouterPatch.createRouterArrayList(input);\n assertEquals(expResult, result);\n }", "List<String> tokenize2(String doc) {\n String stemmed = StanfordLemmatizer.stemText(doc);\n List<String> res = new ArrayList<String>();\n\n for (String s : stemmed.split(\"[\\\\p{Punct}\\\\s]+\"))\n res.add(s);\n return res;\n }", "private static void populateWordList(Scanner dictScan) {\n\t\tfor(int i=2; i<wordList.length; i++) {\n\t\t\tif(dictScan.hasNext()) {\n\t\t\t\twordList[i] = dictScan.nextLine();\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<String> readTokens(String fileName) {\n Scanner sc1, sc2;\n ArrayList<String> wordList = new ArrayList<String>();\n\n try {\n sc1 = new Scanner(new File(fileName));\n\n while (sc1.hasNextLine()) {\n sc2 = new Scanner(sc1.nextLine());\n\n while (sc2.hasNext()) {\n String strWord = sc2.next().replaceAll(\"\\\\W\", \"\").toLowerCase();\n wordList.add(strWord);\n }\n\n sc2.close();\n }\n\n sc1.close();\n } catch (Exception e) {\n System.err.println(e.getMessage());\n e.printStackTrace();\n }\n\n return wordList;\n }", "static void readRecipes() {\n\t\tBufferedReader br = null;\n\t\tString line = \"\";\n\t\tString cvsSplitBy = \",\";\n\t\ttry {\n\n\t\t\tbr = new BufferedReader(new FileReader(inputFileLocation));\n\t\t\twhile ((line = br.readLine()) != null) {\n\n\t\t\t\tString[] currentLine = line.split(cvsSplitBy);\n\t\t\t\tRecipe currentRecipe = new Recipe(currentLine[0]);\n\t\t\t\t/*\n\t\t\t\t * String[] recipe=new String[currentLine.length-1];\n\t\t\t\t * System.arraycopy(currentLine,1,recipe,0,recipe.length-2);\n\t\t\t\t */\n\t\t\t\tString[] recipe = java.util.Arrays.copyOfRange(currentLine, 1,\n\t\t\t\t\t\tcurrentLine.length);\n\t\t\t\tArrayList<String> ingredients = new ArrayList<String>();\n\t\t\t\tfor (String a : recipe) {\n\t\t\t\t\tingredients.add(a);\n\t\t\t\t}\n\t\t\t\tcurrentRecipe.setIngredients(ingredients);\n\t\t\t\tRecipes.add(currentRecipe);\n\t\t\t}\n\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} finally {\n\t\t\tif (br != null) {\n\t\t\t\ttry {\n\t\t\t\t\tbr.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public List<String> readFileIntoList(String filepath) throws IOException;", "private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Sub>>(){}.getType();\n subList = gson.fromJson(in, listType);\n\n } catch (FileNotFoundException e) {\n subList = new ArrayList<Sub>();\n }\n }", "TDrawingConstructor (ArrayList interpretation){\r\n fInterpretation=interpretation;\r\n}", "@Override\n public void refreshList(ArrayList<String> newList){\n }", "private ArrayList<Document> convertToDocumentsList(ArrayList<WordDocument> list){\n ArrayList<Document> convertedList = new ArrayList<Document>();\n\n for(WordDocument x : list)\n convertedList.add(x.getDocument());\n\n return convertedList;\n }", "public static ArrayList<String> adverbs() {\n ArrayList<String> temp = new ArrayList<String>();\n Scanner adverber;\n try {\n adverber = new Scanner(new File(\"Adverbs.txt\"));\n adverber.useDelimiter(\", *\");\n while (adverber.hasNext()){\n temp.add(\" \"+adverber.next()+\" \");\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return temp;\n }", "private void loadOldTags() throws IOException {\n File fileAnnotation = new File(filePathAnnDestination);\n if (!fileAnnotation.exists()) {\n fileAnnotation.createNewFile();\n }\n FileReader fr = new FileReader(fileAnnotation);\n\n\n\n\n BufferedReader br = new BufferedReader(fr);\n String line;\n\n while ((line = br.readLine()) != null) {\n String[] annotations = line.split(\"[ \\t]\");\n String word = line.substring(line.lastIndexOf('\\t') + 1);\n String[] words = word.split(\" \");\n\n int start = Integer.parseInt(annotations[2]);\n if (words.length != 0) {\n for (int i = 0; i < words.length; i++) {\n int end = start + words[i].length();\n taggedItems.put(start + \"-\" + end, annotations[1]);\n System.out.println(\"Loading old tags: \" + start + \"-\" + end + \"\\t\" + annotations[1]);\n start = end + 1;\n }\n }\n taggedItems.put(annotations[2] + \"-\" + annotations[3], annotations[1]);\n\n noOfTagsAlready = Integer.parseInt(annotations[0].substring(1));\n if (noOfTagsAlreadyMax < noOfTagsAlready)\n noOfTagsAlreadyMax = noOfTagsAlready;\n }\n br.close();\n fr.close();\n System.out.println(\"Loaded tags\");\n }", "public List<String> readFile(File inputFile) {\n\n List<String> AL = new ArrayList<>();\n List<String> retAL;\n wordReplace wr = new wordReplace();\n String text;\n try{\n Scanner file_scan = new Scanner(inputFile);\n while(file_scan.hasNextLine()){\n text= file_scan.nextLine();\n AL.add(text);\n }\n file_scan.close();\n }\n catch(IOException e){\n System.out.println(\"File Not Found for some reason.\");\n }\n retAL = wr.replaceWord((ArrayList<String>) AL);\n return retAL;\n }", "protected List<String> readStringList(XmlPullParser parser)\n throws IOException, XmlPullParserException {\n\n int length = Integer.parseInt(parser.getAttributeValue(null, ATTRIBUTE_LENGTH));\n List<String> arrayEntries = new ArrayList<String>(length);\n String value = null;\n\n if (length == 0) {\n return arrayEntries;\n }\n\n int outerDepth = parser.getDepth();\n while (XmlUtils.nextElementWithin(parser, outerDepth)) {\n if (parser.getName().equals(TAG_VALUE)) {\n parser.next();\n value = parser.getText();\n arrayEntries.add(value);\n }\n }\n\n return arrayEntries;\n }", "public List<Event> fillArrayList()\r\n {\r\n List<Event> list1=new ArrayList<>();\r\n FileReader fr=null;\r\n \r\n try{\r\n \r\n fr=new FileReader(\"./event.txt\");\r\n BufferedReader bf=new BufferedReader(fr);\r\n String s;\r\n \r\n while((s=bf.readLine())!=null)\r\n {\r\n Event event=new Event();\r\n String s1[]=new String[7];\r\n for(int i=0;i<s1.length;i++)\r\n {\r\n s1=s.split(\",\");\r\n \r\n event.setId(Integer.parseInt(s1[0]));\r\n \r\n event.setName(s1[1]);\r\n \r\n event.setOrganizer(s1[2]);\r\n \r\n Date date=Date.valueOf(s1[3]);\r\n \r\n event.setDate(date);\r\n \r\n event.setFees(Double.parseDouble(s1[4]));\r\n \r\n } \r\n list1.add(event);\r\n }\r\n \r\n bf.close();\r\n \r\n }catch(Exception e){e.printStackTrace();}\r\n return list1;\r\n\r\n }", "private void pencilValuesToArrayList() {\n userPlacedPencilValuesIndex = new ArrayList<>();\n StringTokenizer tokenizer = new StringTokenizer(pencilValuesString, BoardSaver.PENCIL_VALUES_CELL_DELIMITER);\n\n while (tokenizer.hasMoreTokens()) {\n String cellPossibilitiesList = tokenizer.nextToken();\n\n StringTokenizer tokenizer2 = new StringTokenizer(cellPossibilitiesList, \",\");\n ArrayList<Integer> values = new ArrayList<>();\n\n while (tokenizer2.hasMoreTokens()) {\n String possibilityValue = tokenizer2.nextToken();\n if (!possibilityValue.equals(\" \")) {\n values.add(Integer.valueOf(possibilityValue));\n }\n }\n\n userPlacedPencilValuesIndex.add(values);\n }\n }", "public void createArrayList() throws IOException,ParseException\r\n\t {\n\t \t\r\n\t try(ICsvBeanReader beanReader = new CsvBeanReader(new FileReader(CSV_FILENAME), \r\n\t \t\tCsvPreference.STANDARD_PREFERENCE))\r\n\t {\r\n\t // the header elements are used to map the values to the bean\r\n\t final String[] headers = beanReader.getHeader(true);\r\n\t final CellProcessor[] processors = getProcessors();\r\n\t Complete customer;\r\n\t String gender,fullname;\r\n\t while ((customer = beanReader.read(Complete.class, headers, processors)) != null)\r\n\t {\r\n\t fullname = customer.getFirstname() + \" \" + customer.getLastname();\r\n\t if(customer.getGender().equals(\"f\"))\r\n\t \t gender = \"female\";\r\n\t \telse\r\n\t gender = \"male\";\r\n\t Date dob=new SimpleDateFormat(\"MM/dd/yyyy\").parse(customer.getDob()); \r\n\t String pattern = \"dd/MM/yyyy\";\r\n\t SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\r\n \tString date = simpleDateFormat.format(dob);\r\n\t String age = calcAge(date);\r\n\t if(customer.getCategory().equals(\"student\"))\r\n\t {\r\n\t \tString grade = calcGrade(customer.getSec_percent());\r\n\t \tstudentList.add(new Student(customer.getId(),fullname,gender,date,age,customer.getAadhar_number(),customer.getCity(),\r\n\t \tcustomer.getContact_number(),Integer.parseInt(customer.getRoll_no()),customer.getClass_no(),Integer.parseInt(customer.getTotal_marks())\r\n\t \t,grade,Integer.parseInt(customer.getSec_percent()),customer.getHs_stream()));\r\n\t \t\t\r\n\t } \r\n\t else //for teacher\r\n\t {\r\n\t \tDate doj=new SimpleDateFormat(\"MM/dd/yyyy\").parse(customer.getDoj()); \r\n\t \tString pattern1 = \"dd/MM/yyyy\";\r\n\t SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat(pattern);\r\n \tString join_date = simpleDateFormat.format(doj);\r\n\t \tString str_sub_teachers = customer.getSubject_teaches();\r\n\t \tString service_period = calService(join_date);\r\n\t \tList<String> sub_teachers = new ArrayList<String>(Arrays.asList(str_sub_teachers.split(\"-\")));\r\n\t \t\t\t\r\n\t \t\tteacherList.add(new Teacher(customer.getId(),fullname,gender,date,age,customer.getAadhar_number(),customer.getCity(),\r\n \t\t\t\tcustomer.getContact_number(),customer.getEmp_no(),customer.getClass_teacher_of(),join_date,service_period\r\n \t\t\t\t,customer.getPrevious_school(),customer.getPost(),Integer.parseInt(customer.getSalary()),sub_teachers));\r\n }\r\n\t \r\n\t } //while\r\n\t }\r\n\t System.out.println(\"ArrayList Sucessfully Created\");\t\r\n\t \t\r\n\t }", "public interface Tokenizer {\n\n List<Token> parse(String text);\n}", "public ArrayList<ArrayList<String>> fromSecondToFirst(ArrayList<String> words);", "static List<Student> loadStudentList(InputStream in) {\n return new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8))\n .lines()\n .skip(1)\n .map(Student::fromCsv)\n .collect(Collectors.toList());\n }", "private ArrayList<Tuple> loadTuple() {\n\t\tArrayList<Tuple> idArray = new ArrayList<Tuple>();\n\t\t\n\t\ttry {\n\t\t\tFileInputStream fileInputStream = context.openFileInput(SAVE_FILE);\n\t\t\tInputStreamReader inputStreamReader = new InputStreamReader(\n\t\t\t\t\tfileInputStream);\n\t\t\tType listType = new TypeToken<ArrayList<Tuple>>() {\n\t\t\t}.getType();\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\t\t\tGson gson = builder.create();\n\t\t\tArrayList<Tuple> list = gson.fromJson(inputStreamReader, listType);\n\t\t\tidArray = list;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn idArray;\n\t}", "public ArrayList<String> tokeniseQuery(String query) {\n ArrayList<String> tokens;\n\n tokens = this.tokeniseString(query);\n\n // Normalise the tokens\n tokens = this.normaliseTokens(tokens);\n\n // Remove commas\n tokens = this.removeCommas(tokens);\n\n // Remove the stopwords\n this.removeStopwords(tokens);\n\n // Remove empty tokens that resulted from normalisation\n this.removeEmptyTokens(tokens);\n\n // Stem the tokens\n tokens = this.stemTokens(tokens);\n\n return tokens;\n }", "@SuppressWarnings(\"unchecked\")\n public void testListToArray() throws Exception\n {\n List<PSKeyword> sourceList = new ArrayList<PSKeyword>();\n sourceList.add(createKeyword(\"1\"));\n sourceList.add(createKeyword(\"2\"));\n \n List<PSKeyword> targetList = roundTripListConversion(\n com.percussion.webservices.content.PSKeyword[].class, \n sourceList);\n\n assertTrue(sourceList.equals(targetList));\n }" ]
[ "0.589287", "0.5834072", "0.57767844", "0.567749", "0.5590222", "0.55866873", "0.55382586", "0.5504454", "0.5485047", "0.54469115", "0.5446811", "0.54286593", "0.54189885", "0.5418416", "0.5395732", "0.53805906", "0.53620553", "0.5361593", "0.5360282", "0.53447783", "0.53397804", "0.5335292", "0.53169936", "0.5316598", "0.5306728", "0.52973235", "0.52814573", "0.5275472", "0.52481735", "0.52420264", "0.52412844", "0.5226836", "0.5222662", "0.52172923", "0.5211806", "0.52090746", "0.52075154", "0.5206923", "0.5196499", "0.5196031", "0.5195436", "0.5193801", "0.51921326", "0.51839805", "0.51623094", "0.5157165", "0.5153581", "0.51514", "0.5132896", "0.5132696", "0.51266265", "0.5126319", "0.5119531", "0.51176775", "0.5115146", "0.5112259", "0.5111899", "0.510783", "0.5103995", "0.5102155", "0.5101847", "0.51010597", "0.5099191", "0.50967234", "0.50956863", "0.50944334", "0.5092133", "0.50896144", "0.5085576", "0.50799483", "0.50624347", "0.5051945", "0.5049433", "0.5045806", "0.50435513", "0.50416267", "0.5028822", "0.5020954", "0.5017981", "0.5010207", "0.50068545", "0.49894753", "0.4986145", "0.49848905", "0.49809724", "0.4977598", "0.4974401", "0.4973104", "0.4972574", "0.49633378", "0.49586257", "0.49472958", "0.4946192", "0.49387228", "0.49299985", "0.49272305", "0.49210346", "0.49170938", "0.49148408", "0.49099103", "0.49078405" ]
0.0
-1
Create a LambdaInvokerFactory, to be used to instantiate the Lambda proxy
private void setLambdaInvokeFactory(Context context) { factory = new LambdaInvokerFactory( context, Regions.US_EAST_1, this.credentialsProvider); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static LambdaFactory get(LambdaFactoryConfiguration configuration) {\n JavaCompiler compiler = Optional.ofNullable(configuration.getJavaCompiler()).orElseThrow(JavaCompilerNotFoundException::new);\n return new LambdaFactory(\n configuration.getDefaultHelperClassSourceProvider(),\n configuration.getClassFactory(),\n compiler,\n configuration.getImports(),\n configuration.getStaticImports(),\n configuration.getCompilationClassPath(),\n configuration.getParentClassLoader(),\n configuration.getCompilerArguments(),\n configuration.getJavaVersion());\n }", "public static LambdaFactory get() {\n return get(LambdaFactoryConfiguration.get());\n }", "private Function createLambdaFunction()\n {\n return lambdaFunctionBuilder().build();\n }", "public interface RunnableFactory {\n\n\t/**\n\t * Yields a new instance of the runnable.\n\t */\n\n Runnable mk();\n}", "public interface LambdaInterface {\n\n @LambdaFunction\n byte[] HelloFunction(LambdaRequest request);\n\n @LambdaFunction\n LambdaRespMenues GetFullAndFilteredMenuForRestaurant(LambdaRequest2 input);\n}", "@SuppressWarnings(\"unchecked\")\n public static <T> T create(Class<?> klass, MethodInterceptor handler)\n throws InstantiationException {\n // Don't ask me how this work...\n final Enhancer enhancer = new Enhancer();\n enhancer.setSuperclass(klass);\n enhancer.setInterceptDuringConstruction(true);\n enhancer.setCallbackType(handler.getClass());\n final Class<?> proxyClass = enhancer.createClass();\n final Factory proxy =\n (Factory) ClassInstantiatorFactory.getInstantiator().newInstance(proxyClass);\n proxy.setCallbacks(new Callback[] { handler });\n return (T) proxy;\n }", "public interface Factory {\n /* renamed from: a */\n Call mo35727a(Request request);\n }", "protected HttpJsonEventarcStub(\n EventarcStubSettings settings,\n ClientContext clientContext,\n HttpJsonStubCallableFactory callableFactory)\n throws IOException {\n this.callableFactory = callableFactory;\n this.httpJsonOperationsStub =\n HttpJsonOperationsStub.create(\n clientContext,\n callableFactory,\n typeRegistry,\n ImmutableMap.<String, HttpRule>builder()\n .put(\n \"google.longrunning.Operations.CancelOperation\",\n HttpRule.newBuilder()\n .setPost(\"/v1/{name=projects/*/locations/*/operations/*}:cancel\")\n .build())\n .put(\n \"google.longrunning.Operations.DeleteOperation\",\n HttpRule.newBuilder()\n .setDelete(\"/v1/{name=projects/*/locations/*/operations/*}\")\n .build())\n .put(\n \"google.longrunning.Operations.GetOperation\",\n HttpRule.newBuilder()\n .setGet(\"/v1/{name=projects/*/locations/*/operations/*}\")\n .build())\n .put(\n \"google.longrunning.Operations.ListOperations\",\n HttpRule.newBuilder()\n .setGet(\"/v1/{name=projects/*/locations/*}/operations\")\n .build())\n .build());\n\n HttpJsonCallSettings<GetTriggerRequest, Trigger> getTriggerTransportSettings =\n HttpJsonCallSettings.<GetTriggerRequest, Trigger>newBuilder()\n .setMethodDescriptor(getTriggerMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListTriggersRequest, ListTriggersResponse> listTriggersTransportSettings =\n HttpJsonCallSettings.<ListTriggersRequest, ListTriggersResponse>newBuilder()\n .setMethodDescriptor(listTriggersMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<CreateTriggerRequest, Operation> createTriggerTransportSettings =\n HttpJsonCallSettings.<CreateTriggerRequest, Operation>newBuilder()\n .setMethodDescriptor(createTriggerMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<UpdateTriggerRequest, Operation> updateTriggerTransportSettings =\n HttpJsonCallSettings.<UpdateTriggerRequest, Operation>newBuilder()\n .setMethodDescriptor(updateTriggerMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"trigger.name\", String.valueOf(request.getTrigger().getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<DeleteTriggerRequest, Operation> deleteTriggerTransportSettings =\n HttpJsonCallSettings.<DeleteTriggerRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteTriggerMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetChannelRequest, Channel> getChannelTransportSettings =\n HttpJsonCallSettings.<GetChannelRequest, Channel>newBuilder()\n .setMethodDescriptor(getChannelMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListChannelsRequest, ListChannelsResponse> listChannelsTransportSettings =\n HttpJsonCallSettings.<ListChannelsRequest, ListChannelsResponse>newBuilder()\n .setMethodDescriptor(listChannelsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<CreateChannelRequest, Operation> createChannelTransportSettings =\n HttpJsonCallSettings.<CreateChannelRequest, Operation>newBuilder()\n .setMethodDescriptor(createChannelMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<UpdateChannelRequest, Operation> updateChannelTransportSettings =\n HttpJsonCallSettings.<UpdateChannelRequest, Operation>newBuilder()\n .setMethodDescriptor(updateChannelMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"channel.name\", String.valueOf(request.getChannel().getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<DeleteChannelRequest, Operation> deleteChannelTransportSettings =\n HttpJsonCallSettings.<DeleteChannelRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteChannelMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetProviderRequest, Provider> getProviderTransportSettings =\n HttpJsonCallSettings.<GetProviderRequest, Provider>newBuilder()\n .setMethodDescriptor(getProviderMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListProvidersRequest, ListProvidersResponse>\n listProvidersTransportSettings =\n HttpJsonCallSettings.<ListProvidersRequest, ListProvidersResponse>newBuilder()\n .setMethodDescriptor(listProvidersMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetChannelConnectionRequest, ChannelConnection>\n getChannelConnectionTransportSettings =\n HttpJsonCallSettings.<GetChannelConnectionRequest, ChannelConnection>newBuilder()\n .setMethodDescriptor(getChannelConnectionMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListChannelConnectionsRequest, ListChannelConnectionsResponse>\n listChannelConnectionsTransportSettings =\n HttpJsonCallSettings\n .<ListChannelConnectionsRequest, ListChannelConnectionsResponse>newBuilder()\n .setMethodDescriptor(listChannelConnectionsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<CreateChannelConnectionRequest, Operation>\n createChannelConnectionTransportSettings =\n HttpJsonCallSettings.<CreateChannelConnectionRequest, Operation>newBuilder()\n .setMethodDescriptor(createChannelConnectionMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<DeleteChannelConnectionRequest, Operation>\n deleteChannelConnectionTransportSettings =\n HttpJsonCallSettings.<DeleteChannelConnectionRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteChannelConnectionMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetGoogleChannelConfigRequest, GoogleChannelConfig>\n getGoogleChannelConfigTransportSettings =\n HttpJsonCallSettings.<GetGoogleChannelConfigRequest, GoogleChannelConfig>newBuilder()\n .setMethodDescriptor(getGoogleChannelConfigMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<UpdateGoogleChannelConfigRequest, GoogleChannelConfig>\n updateGoogleChannelConfigTransportSettings =\n HttpJsonCallSettings.<UpdateGoogleChannelConfigRequest, GoogleChannelConfig>newBuilder()\n .setMethodDescriptor(updateGoogleChannelConfigMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\n \"google_channel_config.name\",\n String.valueOf(request.getGoogleChannelConfig().getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListLocationsRequest, ListLocationsResponse>\n listLocationsTransportSettings =\n HttpJsonCallSettings.<ListLocationsRequest, ListLocationsResponse>newBuilder()\n .setMethodDescriptor(listLocationsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetLocationRequest, Location> getLocationTransportSettings =\n HttpJsonCallSettings.<GetLocationRequest, Location>newBuilder()\n .setMethodDescriptor(getLocationMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<SetIamPolicyRequest, Policy> setIamPolicyTransportSettings =\n HttpJsonCallSettings.<SetIamPolicyRequest, Policy>newBuilder()\n .setMethodDescriptor(setIamPolicyMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"resource\", String.valueOf(request.getResource()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetIamPolicyRequest, Policy> getIamPolicyTransportSettings =\n HttpJsonCallSettings.<GetIamPolicyRequest, Policy>newBuilder()\n .setMethodDescriptor(getIamPolicyMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"resource\", String.valueOf(request.getResource()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse>\n testIamPermissionsTransportSettings =\n HttpJsonCallSettings.<TestIamPermissionsRequest, TestIamPermissionsResponse>newBuilder()\n .setMethodDescriptor(testIamPermissionsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"resource\", String.valueOf(request.getResource()));\n return builder.build();\n })\n .build();\n\n this.getTriggerCallable =\n callableFactory.createUnaryCallable(\n getTriggerTransportSettings, settings.getTriggerSettings(), clientContext);\n this.listTriggersCallable =\n callableFactory.createUnaryCallable(\n listTriggersTransportSettings, settings.listTriggersSettings(), clientContext);\n this.listTriggersPagedCallable =\n callableFactory.createPagedCallable(\n listTriggersTransportSettings, settings.listTriggersSettings(), clientContext);\n this.createTriggerCallable =\n callableFactory.createUnaryCallable(\n createTriggerTransportSettings, settings.createTriggerSettings(), clientContext);\n this.createTriggerOperationCallable =\n callableFactory.createOperationCallable(\n createTriggerTransportSettings,\n settings.createTriggerOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.updateTriggerCallable =\n callableFactory.createUnaryCallable(\n updateTriggerTransportSettings, settings.updateTriggerSettings(), clientContext);\n this.updateTriggerOperationCallable =\n callableFactory.createOperationCallable(\n updateTriggerTransportSettings,\n settings.updateTriggerOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.deleteTriggerCallable =\n callableFactory.createUnaryCallable(\n deleteTriggerTransportSettings, settings.deleteTriggerSettings(), clientContext);\n this.deleteTriggerOperationCallable =\n callableFactory.createOperationCallable(\n deleteTriggerTransportSettings,\n settings.deleteTriggerOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.getChannelCallable =\n callableFactory.createUnaryCallable(\n getChannelTransportSettings, settings.getChannelSettings(), clientContext);\n this.listChannelsCallable =\n callableFactory.createUnaryCallable(\n listChannelsTransportSettings, settings.listChannelsSettings(), clientContext);\n this.listChannelsPagedCallable =\n callableFactory.createPagedCallable(\n listChannelsTransportSettings, settings.listChannelsSettings(), clientContext);\n this.createChannelCallable =\n callableFactory.createUnaryCallable(\n createChannelTransportSettings, settings.createChannelSettings(), clientContext);\n this.createChannelOperationCallable =\n callableFactory.createOperationCallable(\n createChannelTransportSettings,\n settings.createChannelOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.updateChannelCallable =\n callableFactory.createUnaryCallable(\n updateChannelTransportSettings, settings.updateChannelSettings(), clientContext);\n this.updateChannelOperationCallable =\n callableFactory.createOperationCallable(\n updateChannelTransportSettings,\n settings.updateChannelOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.deleteChannelCallable =\n callableFactory.createUnaryCallable(\n deleteChannelTransportSettings, settings.deleteChannelSettings(), clientContext);\n this.deleteChannelOperationCallable =\n callableFactory.createOperationCallable(\n deleteChannelTransportSettings,\n settings.deleteChannelOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.getProviderCallable =\n callableFactory.createUnaryCallable(\n getProviderTransportSettings, settings.getProviderSettings(), clientContext);\n this.listProvidersCallable =\n callableFactory.createUnaryCallable(\n listProvidersTransportSettings, settings.listProvidersSettings(), clientContext);\n this.listProvidersPagedCallable =\n callableFactory.createPagedCallable(\n listProvidersTransportSettings, settings.listProvidersSettings(), clientContext);\n this.getChannelConnectionCallable =\n callableFactory.createUnaryCallable(\n getChannelConnectionTransportSettings,\n settings.getChannelConnectionSettings(),\n clientContext);\n this.listChannelConnectionsCallable =\n callableFactory.createUnaryCallable(\n listChannelConnectionsTransportSettings,\n settings.listChannelConnectionsSettings(),\n clientContext);\n this.listChannelConnectionsPagedCallable =\n callableFactory.createPagedCallable(\n listChannelConnectionsTransportSettings,\n settings.listChannelConnectionsSettings(),\n clientContext);\n this.createChannelConnectionCallable =\n callableFactory.createUnaryCallable(\n createChannelConnectionTransportSettings,\n settings.createChannelConnectionSettings(),\n clientContext);\n this.createChannelConnectionOperationCallable =\n callableFactory.createOperationCallable(\n createChannelConnectionTransportSettings,\n settings.createChannelConnectionOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.deleteChannelConnectionCallable =\n callableFactory.createUnaryCallable(\n deleteChannelConnectionTransportSettings,\n settings.deleteChannelConnectionSettings(),\n clientContext);\n this.deleteChannelConnectionOperationCallable =\n callableFactory.createOperationCallable(\n deleteChannelConnectionTransportSettings,\n settings.deleteChannelConnectionOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.getGoogleChannelConfigCallable =\n callableFactory.createUnaryCallable(\n getGoogleChannelConfigTransportSettings,\n settings.getGoogleChannelConfigSettings(),\n clientContext);\n this.updateGoogleChannelConfigCallable =\n callableFactory.createUnaryCallable(\n updateGoogleChannelConfigTransportSettings,\n settings.updateGoogleChannelConfigSettings(),\n clientContext);\n this.listLocationsCallable =\n callableFactory.createUnaryCallable(\n listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);\n this.listLocationsPagedCallable =\n callableFactory.createPagedCallable(\n listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);\n this.getLocationCallable =\n callableFactory.createUnaryCallable(\n getLocationTransportSettings, settings.getLocationSettings(), clientContext);\n this.setIamPolicyCallable =\n callableFactory.createUnaryCallable(\n setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext);\n this.getIamPolicyCallable =\n callableFactory.createUnaryCallable(\n getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext);\n this.testIamPermissionsCallable =\n callableFactory.createUnaryCallable(\n testIamPermissionsTransportSettings,\n settings.testIamPermissionsSettings(),\n clientContext);\n\n this.backgroundResources =\n new BackgroundResourceAggregation(clientContext.getBackgroundResources());\n }", "public T create()\n {\n IProxyFactory<T> proxyFactory = getProxyFactory(type);\n T result = proxyFactory.createProxy();\n return result;\n }", "Result invoke(Invoker<?> invoker, Invocation invocation);", "@FunctionalInterface\npublic interface ClientFactory {\n\n /**\n * Builds new client.\n * @param configuration Configuration.\n * @return Client.\n */\n DatabaseClient constructClient(Configuration configuration);\n}", "public LambdaMART() {}", "protected Function.Builder lambdaFunctionBuilder()\n {\n return Function.Builder.create(this, \"LambdaConnector\")\n .functionName(functionName)\n .role(createIamRole())\n .code(Code.fromCfnParameters(CfnParametersCodeProps.builder()\n .bucketNameParam(CfnParameter.Builder.create(this, \"BucketName\")\n .defaultValue(s3Bucket)\n .build())\n .objectKeyParam(CfnParameter.Builder.create(this, \"BucketKey\")\n .defaultValue(s3Key)\n .build())\n .build()))\n .handler(functionHandler)\n .runtime(new Runtime(\"java11\"))\n .memorySize(Integer.valueOf(3008))\n .timeout(Duration.seconds(Integer.valueOf(900)))\n .environment(environmentVariables);\n }", "public interface CallMultiplexerFactory {\n <T> T createCallMultiplexer(Class<T> clazz, DispatchExceptionHandler h, T[] delegates) throws Exception;\n}", "protected HttpJsonFunctionServiceStub(\n FunctionServiceStubSettings settings,\n ClientContext clientContext,\n HttpJsonStubCallableFactory callableFactory)\n throws IOException {\n this.callableFactory = callableFactory;\n this.httpJsonOperationsStub =\n HttpJsonOperationsStub.create(\n clientContext,\n callableFactory,\n typeRegistry,\n ImmutableMap.<String, HttpRule>builder()\n .put(\n \"google.longrunning.Operations.GetOperation\",\n HttpRule.newBuilder()\n .setGet(\"/v2/{name=projects/*/locations/*/operations/*}\")\n .build())\n .put(\n \"google.longrunning.Operations.ListOperations\",\n HttpRule.newBuilder()\n .setGet(\"/v2/{name=projects/*/locations/*}/operations\")\n .build())\n .build());\n\n HttpJsonCallSettings<GetFunctionRequest, Function> getFunctionTransportSettings =\n HttpJsonCallSettings.<GetFunctionRequest, Function>newBuilder()\n .setMethodDescriptor(getFunctionMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListFunctionsRequest, ListFunctionsResponse>\n listFunctionsTransportSettings =\n HttpJsonCallSettings.<ListFunctionsRequest, ListFunctionsResponse>newBuilder()\n .setMethodDescriptor(listFunctionsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<CreateFunctionRequest, Operation> createFunctionTransportSettings =\n HttpJsonCallSettings.<CreateFunctionRequest, Operation>newBuilder()\n .setMethodDescriptor(createFunctionMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<UpdateFunctionRequest, Operation> updateFunctionTransportSettings =\n HttpJsonCallSettings.<UpdateFunctionRequest, Operation>newBuilder()\n .setMethodDescriptor(updateFunctionMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"function.name\", String.valueOf(request.getFunction().getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<DeleteFunctionRequest, Operation> deleteFunctionTransportSettings =\n HttpJsonCallSettings.<DeleteFunctionRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteFunctionMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GenerateUploadUrlRequest, GenerateUploadUrlResponse>\n generateUploadUrlTransportSettings =\n HttpJsonCallSettings.<GenerateUploadUrlRequest, GenerateUploadUrlResponse>newBuilder()\n .setMethodDescriptor(generateUploadUrlMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GenerateDownloadUrlRequest, GenerateDownloadUrlResponse>\n generateDownloadUrlTransportSettings =\n HttpJsonCallSettings\n .<GenerateDownloadUrlRequest, GenerateDownloadUrlResponse>newBuilder()\n .setMethodDescriptor(generateDownloadUrlMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListRuntimesRequest, ListRuntimesResponse> listRuntimesTransportSettings =\n HttpJsonCallSettings.<ListRuntimesRequest, ListRuntimesResponse>newBuilder()\n .setMethodDescriptor(listRuntimesMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListLocationsRequest, ListLocationsResponse>\n listLocationsTransportSettings =\n HttpJsonCallSettings.<ListLocationsRequest, ListLocationsResponse>newBuilder()\n .setMethodDescriptor(listLocationsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<SetIamPolicyRequest, Policy> setIamPolicyTransportSettings =\n HttpJsonCallSettings.<SetIamPolicyRequest, Policy>newBuilder()\n .setMethodDescriptor(setIamPolicyMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"resource\", String.valueOf(request.getResource()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetIamPolicyRequest, Policy> getIamPolicyTransportSettings =\n HttpJsonCallSettings.<GetIamPolicyRequest, Policy>newBuilder()\n .setMethodDescriptor(getIamPolicyMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"resource\", String.valueOf(request.getResource()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse>\n testIamPermissionsTransportSettings =\n HttpJsonCallSettings.<TestIamPermissionsRequest, TestIamPermissionsResponse>newBuilder()\n .setMethodDescriptor(testIamPermissionsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"resource\", String.valueOf(request.getResource()));\n return builder.build();\n })\n .build();\n\n this.getFunctionCallable =\n callableFactory.createUnaryCallable(\n getFunctionTransportSettings, settings.getFunctionSettings(), clientContext);\n this.listFunctionsCallable =\n callableFactory.createUnaryCallable(\n listFunctionsTransportSettings, settings.listFunctionsSettings(), clientContext);\n this.listFunctionsPagedCallable =\n callableFactory.createPagedCallable(\n listFunctionsTransportSettings, settings.listFunctionsSettings(), clientContext);\n this.createFunctionCallable =\n callableFactory.createUnaryCallable(\n createFunctionTransportSettings, settings.createFunctionSettings(), clientContext);\n this.createFunctionOperationCallable =\n callableFactory.createOperationCallable(\n createFunctionTransportSettings,\n settings.createFunctionOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.updateFunctionCallable =\n callableFactory.createUnaryCallable(\n updateFunctionTransportSettings, settings.updateFunctionSettings(), clientContext);\n this.updateFunctionOperationCallable =\n callableFactory.createOperationCallable(\n updateFunctionTransportSettings,\n settings.updateFunctionOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.deleteFunctionCallable =\n callableFactory.createUnaryCallable(\n deleteFunctionTransportSettings, settings.deleteFunctionSettings(), clientContext);\n this.deleteFunctionOperationCallable =\n callableFactory.createOperationCallable(\n deleteFunctionTransportSettings,\n settings.deleteFunctionOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.generateUploadUrlCallable =\n callableFactory.createUnaryCallable(\n generateUploadUrlTransportSettings,\n settings.generateUploadUrlSettings(),\n clientContext);\n this.generateDownloadUrlCallable =\n callableFactory.createUnaryCallable(\n generateDownloadUrlTransportSettings,\n settings.generateDownloadUrlSettings(),\n clientContext);\n this.listRuntimesCallable =\n callableFactory.createUnaryCallable(\n listRuntimesTransportSettings, settings.listRuntimesSettings(), clientContext);\n this.listLocationsCallable =\n callableFactory.createUnaryCallable(\n listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);\n this.listLocationsPagedCallable =\n callableFactory.createPagedCallable(\n listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);\n this.setIamPolicyCallable =\n callableFactory.createUnaryCallable(\n setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext);\n this.getIamPolicyCallable =\n callableFactory.createUnaryCallable(\n getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext);\n this.testIamPermissionsCallable =\n callableFactory.createUnaryCallable(\n testIamPermissionsTransportSettings,\n settings.testIamPermissionsSettings(),\n clientContext);\n\n this.backgroundResources =\n new BackgroundResourceAggregation(clientContext.getBackgroundResources());\n }", "public ParameterizedInstantiateFactory() {\r\n super();\r\n }", "private FuzzJobRunner createFuzzJobRunnerWithMockServices() {\n return new FuzzJobRunner() {\n @Override\n Plugin getHtmlPublisher() {\n return htmlPublisher;\n }\n\n @Override\n ResultPublisher getResultPublisher() {\n return resultPublisher;\n }\n\n @Override\n PluginManager getJenkinsPluginManager() {\n return pluginManager;\n }\n\n @Override\n PollingIntervals getPollingIntervals(\n hudson.model.Run<?, ?> jenkinsRun, Launcher launcher, Logger logger\n ) {\n return pollingIntervals;\n }\n\n @Override\n ApiService getApiService(\n InstanceConfiguration instanceConfiguration, String authenticationToken\n ) {\n return apiService;\n }\n };\n }", "public interface PublisherFactory extends Function<Environment, Publisher> { }", "public interface HookRequestFactory {\n\n\t/**\n\t *\n\t * @param url The target URL used by the HookRequest.\n\t * @return A HookRequest object\n\t */\n\tHookRequest createHookRequest(String url);\n\n}", "public EventBusConsumerFactory(Vertx vertx) {\n\t\tsuper();\n\t\tfinal MessageConsumer<String> consumer = vertx.eventBus().consumer(address);\n\t\tconsumer.handler(message -> {\n\t\t\tSystem.out.println(\"incoming message: \" + message.body());\n\t\t\tJsonObject reply = new JsonObject().put(\"message\", \"Replied Message\");\n\t\t\tmessage.reply(reply);\n\t\t});\n\t}", "public interface IKoalaDownloaderFactory {\n IKoalaDownloader create();\n}", "Builder injectionFactory(InjectionObjectFactory factory);", "public ScriptExpressionEvaluatorFactory(ScriptExpressionFactory scriptExpressionFactory,\n\t\t\tSecurityContextManager securityContextManager, PrismContext prismContext) {\n\t\tthis.scriptExpressionFactory = scriptExpressionFactory;\n this.securityContextManager = securityContextManager;\n this.prismContext = prismContext;\n\t}", "public static <TDelegate> FunctionExpression<TDelegate> lambda(Expression body, ParameterExpression[] parameters) { throw Extensions.todo(); }", "public ObjectifyFactory factory() {\n return ofy().factory();\n }", "public void setCreateAccLambda(Consumer<Scene> createAccLambda) {\n myCreateAccLambda = createAccLambda;\n }", "private CuratorFramework createCurator() {\n // Create list of Servers\n final String serverStr = sharedZookeeperTestResource.getZookeeperConnectString();\n final List<String> serverList = Arrays.asList(Tools.splitAndTrim(serverStr));\n\n // Create config map\n final Map<String, Object> config = new HashMap<>();\n config.put(\"servers\", serverList);\n\n return CuratorFactory.createNewCuratorInstance(config, getClass().getSimpleName());\n }", "public AWSLambdaClient() {\n this(new DefaultAWSCredentialsProviderChain(), new ClientConfiguration());\n }", "public static <TDelegate> FunctionExpression<TDelegate> lambda(Expression body, String name, boolean tailCall, Iterable<ParameterExpression> parameters) { throw Extensions.todo(); }", "public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }", "public static <TDelegate> FunctionExpression<TDelegate> lambda(Expression body, String name, Iterable<ParameterExpression> parameters) { throw Extensions.todo(); }", "@Override\r\n\tnative long createListenerProxy(EventSink eventSink);", "public static ExecutionFactory init() {\n\t\ttry {\n\t\t\tExecutionFactory theExecutionFactory = (ExecutionFactory)EPackage.Registry.INSTANCE.getEFactory(ExecutionPackage.eNS_URI);\n\t\t\tif (theExecutionFactory != null) {\n\t\t\t\treturn theExecutionFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new ExecutionFactoryImpl();\n\t}", "protected Injector createInjector() {\n FactoryFinder finder = new FactoryFinder();\n try {\n return (Injector)finder.newInstance(\"Injector\");\n } catch (NoFactoryAvailableException e) {\n return new ReflectionInjector();\n } catch (IllegalAccessException e) {\n throw new RuntimeCamelException(e);\n } catch (InstantiationException e) {\n throw new RuntimeCamelException(e);\n } catch (IOException e) {\n throw new RuntimeCamelException(e);\n } catch (ClassNotFoundException e) {\n throw new RuntimeCamelException(e);\n }\n }", "private MultibinderFactory() { }", "public HttpHandler createProxyHandler() {\n return ProxyHandler.builder()\n .setProxyClient(container.getProxyClient())\n .setMaxRequestTime(maxRequestTime)\n .setMaxConnectionRetries(maxRetries)\n .setReuseXForwarded(reuseXForwarded)\n .build();\n }", "Future<CreateListenerResponse> createListener(\n CreateListenerRequest request,\n AsyncHandler<CreateListenerRequest, CreateListenerResponse> handler);", "private VegetableFactory() {\n }", "public Factory() {\n this(getInternalClient());\n }", "public interface VerticleFactory extends Supplier<Verticle> {\n}", "public NaviProxyFactoryBean() {\r\n\r\n }", "<T> T newProxy(T target, Class<T> interfaceType);", "public ProxyHandlerRegistry build() {\n checkNotNull(finder, \"No channel finder defined\");\n\n ProxyServerCallHandler<InputStream, InputStream> proxyHandler =\n new ProxyServerCallHandler<>(finder, CallOptions.DEFAULT);\n\n Map<String, ServerMethodDefinition<?, ?>> methods = new HashMap<>();\n for (ServerServiceDefinition service : services.values()) {\n for (ServerMethodDefinition<?, ?> method : service.getMethods()) {\n String methodName = method.getMethodDescriptor().getFullMethodName();\n methods.put(\n methodName,\n createProxyServerMethodDefinition(\n method.getMethodDescriptor(),\n proxyHandler)\n );\n }\n }\n return new ProxyHandlerRegistry(\n Collections.unmodifiableMap(methods));\n }", "public static <TDelegate> FunctionExpression<TDelegate> lambda(Expression body, boolean tailCall, Iterable<ParameterExpression> parameters) { throw Extensions.todo(); }", "public void createLambda(Lambda lambda) {\n SQLiteDatabase db = LambdaDbHelper.getInstance(context).getWritableDatabase();\n\n // content values to inset\n ContentValues values = new ContentValues();\n values.put(LambdaDbContract.Lambda.COLUMN_NAME_ID, lambda.getId());\n values.put(LambdaDbContract.Lambda.COLUMN_NAME_TIMESTAMP, lambda.getTimestamp());\n values.put(LambdaDbContract.Lambda.COLUMN_NAME_TEXT, lambda.getText());\n values.put(LambdaDbContract.Lambda.COLUMN_NAME_DELETED, 0);\n\n // Insert the new row, if fails throw an error\n db.insertOrThrow(LambdaDbContract.Lambda.TABLE_NAME, LambdaDbContract.Lambda.COLUMN_NAME_ID, values);\n db.close();\n }", "MakeflowFactory getMakeflowFactory();", "JobAwaiterStepFactory getJobAwaiterStepFactory(String namespace);", "private FactoryProvider(TypeLiteral<F> factoryType, Map<Method, AssistedConstructor<?>> factoryMethodToConstructor) {\n\t\tthis.factoryType = factoryType;\n\t\tthis.factoryMethodToConstructor = factoryMethodToConstructor;\n\t\tcheckDeclaredExceptionsMatch();\n\t}", "private TestAcceptFactory() {\n this._pool = new DirectExecutor();\n }", "CreateEventViewModelFactory() {\n super(Storage.class, Authenticator.class);\n }", "public ManagedHttpClientConnectionFactory(HttpMessageWriterFactory<HttpRequest> requestWriterFactory, HttpMessageParserFactory<HttpResponse> responseParserFactory) {\n/* 96 */ this(requestWriterFactory, responseParserFactory, null, null);\n/* */ }", "protected EventExecutorFactory getExecutorFactory() {\n\t\treturn executorFactory;\n\t}", "public static StaticFactoryInsteadOfConstructors newInstance() {\n return new StaticFactoryInsteadOfConstructors();\n }", "public static <TDelegate> FunctionExpression<TDelegate> lambdaT(Expression body, boolean tailCall, ParameterExpression[] parameters) { throw Extensions.todo(); }", "private PSAAClientActionFactory()\n {\n }", "protected EventExecutor newChild(ThreadFactory threadFactory, Object... args) throws Exception {\n/* 57 */ return (EventExecutor)new LocalEventLoop(this, threadFactory);\n/* */ }", "public ExecutionFactoryImpl() {\n\t\tsuper();\n\t}", "public RemoteFacadeServiceLocator() {\r\n }", "TransformFactory getFactory();", "public static void main(String[] args) {\n\t\tAnimalTest test = new AnimalTest() {\r\n\t\t\t@Override\r\n\t\t\tpublic boolean test(Animal a) {\r\n\t\t\t\treturn a.canHop();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// boolean test(Animal a);\r\n\t\tAnimalTest lambdaTest = (Animal a) -> {\r\n\t\t\treturn a.canHop();\r\n\t\t};\r\n\t\tAnimalTest lambdaTest2 = a -> a.canHop();\r\n\r\n\t\tAnimal animalPasatCaParametru = new Animal();\r\n\t\tSystem.out.println(\"In main: \" + lambdaTest.test(animalPasatCaParametru));\r\n\r\n\t\tSupplier<Animal> supplier = () -> new Animal();\r\n\t\tsupplier.get();\r\n\t}", "public interface HttpRequestFactory\n{\n\n\tpublic abstract HttpRequest buildHttpRequest(HttpMethod httpmethod, String s);\n\n\tpublic abstract HttpRequest buildHttpRequest(HttpMethod httpmethod, String s, Map map);\n\n\tpublic abstract PinningInfoProvider getPinningInfoProvider();\n\n\tpublic abstract void setPinningInfoProvider(PinningInfoProvider pinninginfoprovider);\n}", "@Nonnull \r\n\tpublic static <T> T create(\r\n\t\t\t@Nonnull Class<T> listener, \r\n\t\t\t@Nonnull final Observer<? super Dynamic> bindTo) {\r\n\t\tfinal InvocationHandler handler = new InvocationHandler() {\r\n\t\t\t@Override\r\n\t\t\tpublic Object invoke(Object proxy, Method method, Object[] args)\r\n\t\t\t\t\tthrows Throwable {\r\n\t\t\t\tbindTo.next(new Dynamic(method.getName(), args));\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\treturn listener.cast(Proxy.newProxyInstance(listener.getClassLoader(), new Class<?>[] { listener }, handler));\r\n\t}", "public static Authenticator newInstance(Configuration config,\n String proxyCallbackUrl, ProxyCallbackHandler proxyCallbackHandler) {\n \n HttpsURLConnectionFactory connectionFactory = \n new HttpsURLConnectionFactory(config.getSslContext(), \n config.getHostnameVerifier());\n \n TicketValidator validator = createTicketValidator(config, \n connectionFactory);\n\n if (validator instanceof Cas20ServiceTicketValidator) {\n configureServiceValidator(config, proxyCallbackUrl, proxyCallbackHandler,\n connectionFactory, (Cas20ServiceTicketValidator) validator);\n }\n if (validator instanceof Cas20ProxyTicketValidator) {\n configureProxyValidator(config, (Cas20ProxyTicketValidator)\n validator);\n }\n if (validator instanceof Saml11TicketValidator) {\n configureSamlValidator(config, (Saml11TicketValidator) validator);\n }\n return new JasigAuthenticator(config, validator);\n }", "public static Factory factory() {\n return ext_h::new;\n }", "public interface Factory {\r\n}", "private FuncBody parseLambda(Tokenizer in) {\n\t\tFuncBody lambda = new FuncBody();\n\t\tlambda.type = new TypeDef();\n\t\tlambda.type.returnType = parseType(in);\n\t\tlambda.type.paramTypes = new ArrayList<>();\n\t\tToken next = in.next();\n\t\tif (next.type != Token.TokenType.OPEN_PARENTHESIS)\n\t\t\tthrow new SyntaxError(\"Expected ( got: '\"+next+\"'\"+next.generateLineChar());\n\t\tlambda.params = parseParamList(in);\n\t\tlambda.type.paramTypes.addAll(lambda.params.stream().map(d -> d.type).collect(Collectors.toList()));\n\t\tnext = in.next();\n\t\tif (next.type != Token.TokenType.OPEN_BRACE)\n\t\t\tthrow new SyntaxError(\"Expected { got: '\"+next+\"'\"+next.generateLineChar());\n\t\tlambda.body = parseBlock(in);\n\t\treturn lambda;\n\t}", "D createDelegate() {\n return null;\n }", "public Interceptor create(Proxy proxy) throws NullPointerException {\n MethodInterceptor methodInterceptor = (MethodInterceptor) pico.getComponentInstance(interceptorComponentKey);\n if (methodInterceptor == null) {\n throw new NullPointerException(\"Interceptor with component key \" + interceptorComponentKey\n + \" + not found in PicoContainer\");\n }\n return new MethodInterceptorAdapter(methodInterceptor);\n }", "public interface IFactory {\n Operation CreateOperation();\n\n}", "public Target setActionFactory(Method actionFactory) {\n this.actionFactory = actionFactory;\n return this;\n }", "@Deprecated(since = \"5.0.0.RELEASE\")\n@FunctionalInterface\npublic interface CglibPF<T> extends ProxyFactory<T> {\n @Override\n public default T getProxy(T target) {\n return this.getProxy(target , (Object proxy , Method method , Object[] args) -> CglibPF.this.invoke(target , method , args));\n }\n\n /**\n * get proxy\n * @param target target object\n * @param invocationHandler proxy handler\n * @return new object\n */\n @SuppressWarnings(\"unchecked\")\n public default T getProxy(T target , InvocationHandler invocationHandler) {\n Enhancer enhancer = new Enhancer();\n enhancer.setSuperclass(target.getClass());\n enhancer.setInterfaces(this.proxyInterfaces(target));\n enhancer.setCallback(invocationHandler);\n return (T) enhancer.create();\n }\n\n /**\n * when the method which will be invoke should be proxy.\n * this method will be run.\n * \n * @param target the target which will be proxy\n * @param method the method which will be invoke\n * @param args the args of method\n * @return the answer of method\n * @throws Throwable andy exception when run this method\n */\n public abstract Object invoke(T target , Method method , Object[] args) throws Throwable;\n}", "private ServiceFactory() {}", "protected abstract AbstractIncomingEmailCallable<T> createCallable(Message message);", "private native long nativeCreateDelegate();", "public static <TDelegate> FunctionExpression<TDelegate> lambdaE(Expression body, Iterable<ParameterExpression> parameters) { throw Extensions.todo(); }", "protected ServerRunnable createServerRunnable(final int timeout) {\n\t\treturn new ServerRunnable(timeout);\n\t}", "public TestOrchestrator(final NativeTest testTask, TestOrchestratorFactory factory) {\n if (testTask == null) {\n throw new IllegalArgumentException(\"testTask == null!\");\n }\n if (factory == null) {\n throw new IllegalArgumentException(\"factory == null!\");\n }\n\n this.testTask = testTask;\n this.factory = factory;\n }", "public static ConverterRunner createInstance() { return new ConverterRunner(); }", "public static Factory factory() {\n return text::new;\n }", "private LocatorFactory() {\n }", "private static void createThreadUsingLambdaExpressions() {\n\t\tRunnable r = () -> {System.out.println(\"Lambda Expression thread is executed.\");};\n\t\tThread t = new Thread(r);\n\t\tt.start();\n\t}", "public MethodInterceptorFactory(final InterceptorInstanceFactory instanceFactory, final Method interceptorMethod) {\n this(instanceFactory, interceptorMethod, false);\n }", "public static EWorkflowFactory init() {\n\t\ttry {\n\t\t\tEWorkflowFactory theEWorkflowFactory = (EWorkflowFactory)EPackage.Registry.INSTANCE.getEFactory(EWorkflowPackage.eNS_URI);\n\t\t\tif (theEWorkflowFactory != null) {\n\t\t\t\treturn theEWorkflowFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new EWorkflowFactoryImpl();\n\t}", "public TestInvoker()\n {\n super(new TestClient(), new ThreadPoolExecutorImpl(3));\n }", "protected static Object createFactory(Map<String, String> configuration,\n String initParameterName) {\n String factoryName = resolveFactoryName(configuration, initParameterName);\n return ClassUtil.instantiate(factoryName);\n }", "private DeploymentFactory initFactory() {\n return new SunDeploymentFactory();\n }", "private static void ThreadCreationLambdaWay() {\r\n\t\tThread t2 = new Thread(() -> {\r\n\t\t\tSystem.out.println(\"This is a runnable method done in Lambda Expressions > 1.8\");\r\n\t\t});\r\n\t\tt2.start();\r\n\t\t\r\n\t\t// Other way\r\n\t\t\r\n\t\tThread t3 = new Thread(() -> System.out.println(\"This is runnable method done in single line Lambda expressions > 1.8\"));\r\n\t\tt3.start();\r\n\t}", "public static DMSoapClientFactory newInstance(Properties properties) throws DMException {\r\n DMSoapClientFactory factory = new DMSoapClientFactory();\r\n factory.setProperties(properties);\r\n return factory;\r\n \r\n }", "protected Proxy(InvocationHandler h) { }", "public Object\n call() throws Exception { \n final ConstArray<?> argv;\n try {\n argv = deserialize(m,\n ConstArray.array(lambda.getGenericParameterTypes()));\n } catch (final BadSyntax e) {\n /*\n * strip out the parsing information to avoid leaking\n * information to the application layer\n */ \n throw (Exception)e.getCause();\n }\n \n // AUDIT: call to untrusted application code\n final Object r = Reflection.invoke(bubble(lambda), target,\n argv.toArray(new Object[argv.length()]));\n return Fulfilled.isInstance(r) ? ((Promise<?>)r).call() : r;\n }", "public interface Retryer {\r\n /**\r\n * Retry the execution wrapped in {@link Callable} when the specified condition matched.\r\n *\r\n * @param <T>\r\n * @param retryableTask\r\n * @return\r\n * @throws Exception\r\n */\r\n <T> T callWithRetry(Callable<T> retryableTask) throws Exception;\r\n\r\n /**\r\n * Returns an instance of interfaceType that delegates all method calls to\r\n * the target object, enforcing the retry policy on each call.\r\n *\r\n * @param <T>\r\n * @param target\r\n * @param interfaceType\r\n * @return\r\n */\r\n <T> T newProxy(T target, Class<T> interfaceType);\r\n}", "public CallAppAbilityConnnectionHandler createHandler() {\n EventRunner create = EventRunner.create();\n if (create != null) {\n return new CallAppAbilityConnnectionHandler(create);\n }\n HiLog.error(LOG_LABEL, \"createHandler: no runner.\", new Object[0]);\n return null;\n }", "public StandardScriptFactory(String scriptEngineName, String scriptSourceLocator)\n/* */ {\n/* 87 */ this(scriptEngineName, scriptSourceLocator, (Class[])null);\n/* */ }", "public abstract DeserializerFactory withConfig(DeserializerFactoryConfig deserializerFactoryConfig);", "@SuppressWarnings(\"rawtypes\")\n private void register(String route, TypedLambdaFunction lambda, boolean isPrivate, int instances)\n throws IOException {\n if (lambda == null) {\n throw new IllegalArgumentException(\"Missing LambdaFunction instance\");\n }\n String path = getValidatedRoute(route);\n if (registry.containsKey(path)) {\n log.warn(\"{} LambdaFunction {}\", RELOADING, path);\n release(path);\n }\n ServiceDef service = new ServiceDef(path, lambda).setConcurrency(instances).setPrivate(isPrivate);\n ServiceQueue manager = new ServiceQueue(service);\n service.setManager(manager);\n // save into local registry\n registry.put(path, service);\n if (!isPrivate) {\n advertiseRoute(route);\n }\n }", "public static void main(String[] args) {\n\t\tnew Action() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void execute(String content) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tSystem.out.println(content);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}.execute(\"jdk1.8之前匿名内部类实现方式\");\r\n\t\t\r\n\t\t\r\n\t\t//lambda\r\n\t\tAction login=(String content)->{\r\n\t\t\tSystem.out.println(\"jdk1.8的lambda语法实现\");\r\n\t\t};\r\n\t\tlogin.execute(\"jdk1.8的lambda语法实现\");\r\n\t\t\r\n\t}", "PodAwaiterStepFactory getPodAwaiterStepFactory(String namespace);", "public static LambdaExpression Lambda(Expression body, ParameterExpression[] parameters) { throw Extensions.todo(); }", "private ObjectFactory() { }", "public DataSourceFactory() {}" ]
[ "0.6257268", "0.6245539", "0.6060707", "0.52612674", "0.51334286", "0.5065841", "0.49808067", "0.4961789", "0.49084467", "0.4893803", "0.48662502", "0.48426446", "0.47972992", "0.47836283", "0.47339734", "0.47325832", "0.47209585", "0.47121912", "0.47054073", "0.4704503", "0.46995613", "0.46941364", "0.46782187", "0.46775717", "0.4643176", "0.463299", "0.45824346", "0.4579363", "0.45741743", "0.45655468", "0.4562235", "0.45500907", "0.4548801", "0.45401162", "0.4537696", "0.4535891", "0.4522655", "0.4520894", "0.4516257", "0.45110697", "0.4494403", "0.44924486", "0.44886744", "0.44840676", "0.44828504", "0.44783685", "0.44544393", "0.44542018", "0.44479612", "0.4444236", "0.44411564", "0.44398153", "0.44395235", "0.44270635", "0.44254357", "0.44231296", "0.44122216", "0.44079897", "0.44049796", "0.43987477", "0.43961072", "0.43956494", "0.43935654", "0.4392038", "0.43904933", "0.43777955", "0.43711326", "0.43638018", "0.43575585", "0.43554655", "0.43513468", "0.4349905", "0.4346897", "0.43449047", "0.43390873", "0.4337918", "0.4332594", "0.4329882", "0.43224373", "0.43207538", "0.43188477", "0.4318838", "0.43128365", "0.43108442", "0.43090683", "0.43053156", "0.43030903", "0.42948127", "0.42887482", "0.42851564", "0.42804235", "0.42782763", "0.42703736", "0.42673275", "0.42583543", "0.42550698", "0.4253228", "0.425224", "0.42513898", "0.4250225" ]
0.70642126
0
/ Some times we can't fire the loaded in the onActivityCreated method for example in this project SearchResultFragment can't have the query parameter when creating the activity it will be provided in onHandleSearch ( after ) the fragment created protected boolean fireLoaderInOnActivityCreated = true;
public EndlessMultiStateAbsListFragment() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n if (mHasLoad) {\n return;\n }\n initFragment();\n }", "protected void onStartLoading() { forceLoad();}", "@Override\n protected void onStartLoading() {\n forceLoad();\n\n }", "@Override\n protected void onStartLoading() {\n\n forceLoad();\n }", "@Override\n public void onLoadingStarted(String paramString, View paramView) {\n\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n // Prepare the loader. Either re-connect with an existing one,\n // or start a new one.\n\t\tgetLoaderManager().initLoader(FORECAST_LOADER_ID, null, this);\n\t\tsuper.onActivityCreated(savedInstanceState); // From instructor correction\n\t}", "@Override\n\t\t\t\t\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\t\t\t\t\t\t}", "void onLoaderLoading();", "@Override\r\n\t\t\t\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\t\t\t\t\t}", "@Override\n public void onLoadingStarted(String arg0, View arg1) {\n }", "@Override\n protected void onStartLoading() {\n super.onStartLoading();\n\n mLoadingIndicator.setVisibility(View.VISIBLE);\n\n forceLoad();\n }", "@Override\n\t\t\t\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\n\t\t\t\t\t}", "@Override\r\n\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\t\t\t\r\n\t\t}", "@Override\n\tprotected void onStartLoading() {\n\t\tif (mData != null) {\n\t\t\tdeliverResult(mData);\n\t\t}\n\t\t// Now we're in start state so we need to monitor for data changes.\n\t\t// To do that we start to observer the data\n\t\t// Register for changes which is Loader dependent\n\t\tregisterObserver();\n\t\t// Now if we're in the started state and content is changes we have\n\t\t// a flag that we can check with the method takeContentChanged()\n\t\t// and force the load\t\t\t\t\t\n\t\tif (takeContentChanged() || mData == null) {\n\t\t\tforceLoad();\n\t\t}\n\t}", "private void onFullyLoaded() {\n info(\"onFullyLoaded()\");\n cancelProgress();\n\n //Fully loaded, start detection.\n ZiapApplication.getInstance().startDetection();\n\n Intent intent = new Intent(LoadingActivity.this, MainActivity.class);\n if (getIntent().getStringExtra(\"testname\") != null)\n intent.putExtra(\"testname\", getIntent().getStringExtra(\"testname\"));\n startActivity(intent);\n finish();\n }", "@Override\n protected void onStartLoading() {\n if(mOrderData != null){\n deliverResult(mOrderData);//if there was already data loaded(in the event that the activity was navigated away from while loading), load it\n } else {\n forceLoad();//starts a load command\n }\n }", "public void onStartLoading() {\n Cursor cursor = this.mCursor;\n if (cursor != null) {\n deliverResult(cursor);\n }\n if (takeContentChanged() || this.mCursor == null) {\n forceLoad();\n }\n }", "@Override\n protected void onStartLoading() {\n if (lecturers != null) {\n // If we currently have a result available, deliver it\n // immediately.\n deliverResult(lecturers);\n }\n\n if (takeContentChanged() || lecturers == null) {\n // If the data has changed since the last time it was loaded\n // or is not currently available, start a load.\n forceLoad();\n }\n }", "public void onStartLoading() {\n if (this.mCursor != null) {\n deliverResult(this.mCursor);\n }\n if (takeContentChanged() || this.mCursor == null) {\n forceLoad();\n }\n }", "public void onStartLoading() {\n if (this.mCursor != null) {\n deliverResult(this.mCursor);\n }\n if (takeContentChanged() || this.mCursor == null) {\n forceLoad();\n }\n }", "@Override\n protected void onStartLoading() {\n progressBar.setVisibility(View.VISIBLE);\n forceLoad();\n }", "@Override\n protected void onStartLoading() {\n if (mMovieData != null) {\n deliverResult(mMovieData);\n } else {\n mLoadingIndicator.setVisibility(View.VISIBLE);\n forceLoad();\n }\n\n }", "@Override\n protected void onStartLoading() {\n Utils.postToMainLoop(new Runnable() {\n @Override\n public void run() {\n if (mResult != null) // If we currently have a result available, deliver it immediately.\n deliverResult(mResult);\n\n if (isReload() || mResult == null)\n forceLoad();\n }\n });\n }", "@Override\n protected void onStartLoading() {\n if (mTaskData != null) {\n // Delivers any previously loaded data immediately\n deliverResult(mTaskData);\n } else {\n // Force a new load\n forceLoad();\n }\n }", "@Override\n protected void onStartLoading() {\n if (mTaskData != null) {\n // Delivers any previously loaded data immediately\n deliverResult(mTaskData);\n } else {\n // Force a new load\n forceLoad();\n }\n }", "@Override\n protected void onStartLoading() {\n if (mData != null) {\n // If we currently have a result available, deliver it\n // immediately.\n deliverResult(mData);\n }\n registerObserver();\n if (takeContentChanged() || mData == null || isConfigChanged()) {\n // If the data has changed since the last time it was loaded\n // or is not currently available, start a load.\n forceLoad();\n }\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\n\t\tmContext = (LFActivity) getActivity();\n\t\tinit();\n\t}", "@Override\n protected void onStartLoading() {\n if (mCursor != null) {\n // Deliver any previously loaded data immediately.\n deliverResult(mCursor);\n }\n if (takeContentChanged() || mCursor == null) {\n // When the observer detects a change, it should call onContentChanged()\n // on the Loader, which will cause the next call to takeContentChanged()\n // to return true. If this is ever the case (or if the current data is\n // null), we force a new load.\n forceLoad();\n }\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tcustomProgressDialog = new CustomProgressDialog(getActivity(),\n\t\t\t\t\"正在加载......\");\n\t\tinitView();\n\t\tchangeviewbylogin();\n\t}", "@Override\n protected void onStartLoading() {\n if (idlingResource != null) {\n idlingResource.setIdleState(false);\n }\n\n if (recepts != null) {\n deliverResult(recepts);\n } else {\n mLoadingIndicator.setVisibility(View.VISIBLE);\n forceLoad();\n }\n }", "@Override\n public Loader<Cursor> onCreateLoader(int arg0, Bundle arg1) {\n\n setSupportProgressBarIndeterminateVisibility(true);\n CursorLoader cl = new CursorLoader(this, VisitPersongrow.CONTENT_URI,\n PROJECTION, \"pid=\" + getPid(), null,\n VisitPersongrow.DEFAULT_SORTING);\n return cl;\n }", "@Override\r\n\tpublic void onFragmentStart() {\n\t}", "@Override\n public void onActivityPreCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {/**/}", "private void startLoader(){\n LoaderManager loaderManager = getSupportLoaderManager();\n Loader<Cursor> movieLoader = loaderManager.getLoader(MOVIE_LOADER);\n if(movieLoader == null)\n loaderManager.initLoader(MOVIE_LOADER, null, this);\n else\n loaderManager.restartLoader(MOVIE_LOADER, null, this);\n }", "@Override \n\t protected void onStartLoading() {\n\t if (mChildList != null) {\n\t // If we currently have a result available, deliver it\n\t // immediately.\n\t deliverResult(mChildList);\n\t }\n\n\t if (takeContentChanged() || mChildList == null) {\n\t // If the data has changed since the last time it was loaded\n\t // or is not currently available, start a load.\n\t forceLoad();\n\t }\n\t }", "@Override \n\t protected void onStartLoading() {\n\t if (mChildList != null) {\n\t // If we currently have a result available, deliver it\n\t // immediately.\n\t deliverResult(mChildList);\n\t }\n\n\t if (takeContentChanged() || mChildList == null) {\n\t // If the data has changed since the last time it was loaded\n\t // or is not currently available, start a load.\n\t forceLoad();\n\t }\n\t }", "@Override\r\n public void loadBefore(@NonNull LoadParams params, @NonNull LoadCallback callback) {\n }", "protected void showLoader() {\n if (progressBar != null) {\n progressBar.setVisibility(View.VISIBLE);\n }\n if(getActivity()!=null) {\n getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,\n WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n }\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n // 注册广播,接收修改备注信息\n brocast = new ResumeInfoFragmentBrocast();\n IntentFilter filter = new IntentFilter(NOTE_ACTION);\n activity.registerReceiver(brocast, filter);\n\n lazyLoad();\n }", "@Override\n public Loader<Cursor> onCreateLoader(int id, Bundle args) {\n return new AsyncTaskLoader<Cursor>(getActivity()) {\n Cursor favoritesIdsData = null;\n\n @Override\n protected void onStartLoading() {\n if (favoritesIdsData != null) {\n deliverResult(favoritesIdsData);\n } else {\n forceLoad();\n }\n }\n\n @Override\n public Cursor loadInBackground() {\n try {\n favoritesIdsData = getActivity().getContentResolver().\n query(FavoriteMoviesContract.MovieEntry.CONTENT_URI, null, null, null, null);\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n return favoritesIdsData;\n }\n\n public void deliverResult(Cursor data) {\n //get the ids of the favorite movies\n favoriteIds = loadCursorDataArray(data);\n //check if the given movie is among them\n isFavorite = checkIfFavorite();\n movie.setFavorite(isFavorite);\n imageName = movie.getPosterPath();\n\n if (movie.isFavorite()) {\n star.setImageResource(R.drawable.ic_grade_yellow_36px);\n favoritesIdsData = data;\n super.deliverResult(data);\n\n } else {\n star.setImageResource(R.drawable.ic_grade_gray_36px);\n\n }\n }\n };\n }", "@Override\r\n\tpublic void onFragmentCreate(Bundle savedInstanceState) {\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n isPrepared = true;\n activity = getActivity();\n app = (App) activity.getApplication();\n handler = new ResumeInfoHandler(activity, this);\n resumeInfoFragment = ResumeInfoFragment.this;\n }", "public boolean isLoaded(){return true;}", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n Log.i(sFragmentName, \"onActivityCreated()\");\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tSystem.out.println(\"MyCollectShopFragment--ActivityCreated\");\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\r\n\t\tmcay = (MyCollectActivity) getActivity();\r\n\r\n\t\tfscFm_shopListLv = (ListView) mcay.findViewById(R.id.fscFm_shopListLv);\r\n\t\tloadmoreView = mcay.getLayoutInflater().inflate(\r\n\t\t\t\tR.layout.dynamicload_list_loadmore, null);\r\n\t\tloadingMoreTv = (TextView) loadmoreView\r\n\t\t\t\t.findViewById(R.id.loadingMoreTv);\r\n\t\tprogressBar1 = (ProgressBar) loadmoreView\r\n\t\t\t\t.findViewById(R.id.progressBar1);\r\n\t\tfscFm_shopListLv.addFooterView(loadmoreView);// 设置列表底部视图\r\n\t\tfscFm_noNotifyTv = (TextView) mcay.findViewById(R.id.fscFm_noNotifyTv);\r\n\t\tfscFm_shopListLv.setOnScrollListener(new LvOnScrollListener());\r\n\t\tif (iatclAdapter == null) {\r\n\t\t\tloadData();\r\n\t\t} else {\r\n\t\t\tfscFm_shopListLv.setAdapter(iatclAdapter);\r\n\t\t\tiatclAdapter.notifyDataSetChanged();\r\n\t\t\tif (dataList.size() < totalCount) {\r\n\t\t\t\tLog.i(\"doSome:\", \"setHasMore\");\r\n\t\t\t\tsetHasMore();\r\n\t\t\t} else {\r\n\t\t\t\tLog.i(\"doSome:\", \"setNoMore\");\r\n\t\t\t\tsetNoMore();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfscFm_submitBt = (Button) mcay.findViewById(R.id.fscFm_submitBt);// 提交按钮\r\n\t\tfscFm_cancelBt = (Button) mcay.findViewById(R.id.fscFm_cancelBt);// 取消按钮\r\n\t\tfscFm_submitBt.setOnClickListener(new BTOnClickListener());\r\n\t\tfscFm_cancelBt.setOnClickListener(new BTOnClickListener());\r\n\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tinitView();\r\n\t\tgetListDataFromLocal();\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n public Loader<Cursor> onCreateLoader(int arg0, Bundle arg1) {\n\n setSupportProgressBarIndeterminateVisibility(true);\n CursorLoader cl = new CursorLoader(this, VisitDrug.CONTENT_URI,\n PROJECTION, \"visitno =? AND pcucode=? AND dentalcode is not null\", new String[]{mVISITNO, mPCUCODE},\n VisitDrug.DEFAULT_SORTING);\n return cl;\n }", "public void onActivityViewReady() {\n if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {\n Log.d(Logging.LOG_TAG, this + \" onActivityViewReady\");\n }\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n page = getArguments().getInt(\"someInt\", 0);\n title = getArguments().getString(\"someTitle\");\n context=getActivity();\n isCitySelected=false;\n }", "@Override\n public void showLoading() {\n Log.i(Tag, \"showLoading\");\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tSystem.out.println(\"CAT:::2\");\n\t\tlv = (ListView) getActivity().findViewById(R.id.fav_listView1);\n\n\t\tdatabase = new Database(getActivity());\n\t\tlv.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1,\n\t\t\t\t\tfinal int arg2, long arg3) {\n\t\t\t\tValues.cur_item = items.get(arg2);\n\n\t\t\t\tFragment fragment = new ItemViewFragment();\n\t\t\t\tFragmentManager fragmentManager = getFragmentManager();\n\t\t\t\tfragmentManager.beginTransaction()\n\t\t\t\t\t\t.replace(R.id.content_frame, fragment)\n\t\t\t\t\t\t.addToBackStack(null).commit();\n\n\t\t\t}\n\t\t});\n\t\tregisterForContextMenu(lv);\n\t\tloadData();\n\n\t\t/*\n\t\t * if (CheckInternet.isNetworkPresent(getActivity())&&!Values.loaded) {\n\t\t * loadData(); } else {\n\t\t * \n\t\t * \n\t\t * Toast.makeText(getActivity(), \" No Data ! \", Toast.LENGTH_SHORT)\n\t\t * .show();\n\t\t * \n\t\t * \n\t\t * }\n\t\t */\n\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitViewPager();\r\n\t\t\r\n\t\tinitView();\r\n\r\n\t\tinitCursor();\r\n\t\t\r\n\t\tinithuanxin(savedInstanceState);\r\n\t\r\n \r\n\t}", "private void initiateLoader() {\n ConnectivityManager connMgr = (ConnectivityManager)\n getSystemService(Context.CONNECTIVITY_SERVICE);\n\n // Get details on the currently active default data network\n NetworkInfo networkInfo = null;\n if (connMgr != null) {\n networkInfo = connMgr.getActiveNetworkInfo();\n }\n\n // If there is a network connection, fetch data\n if (networkInfo != null && networkInfo.isConnected()) {\n // Get a reference to the LoaderManager, in order to interact with loaders.\n avi.show();\n loadingIndicator.setVisibility(View.VISIBLE);\n errorContainer.setVisibility(View.GONE);\n LoaderManager loaderManager = getSupportLoaderManager();\n String url = BASE_URL + \"&from=\" + fromDate;\n url += \"&to=\" + toDate;\n url += \"&page=\" + currentPageNo;\n url += \"&sortBy=\" + sortPreference;\n if (queryText != null) {\n url += \"&q=\" + queryText;\n }\n\n Bundle args = new Bundle();\n args.putString(URL_KEY, url);\n if (forceLoad) {\n loaderManager.restartLoader(LAST_LOADER_ID, args, this);\n forceLoad = false;\n } else {\n LAST_LOADER_ID = NEWS_LOADER_ID;\n }\n if (!loaderInitiated) {\n loaderManager.initLoader(NEWS_LOADER_ID, args, this);\n loaderInitiated = true;\n } else {\n loaderManager.restartLoader(NEWS_LOADER_ID, args, this);\n }\n } else {\n avi.hide();\n loadingIndicator.setVisibility(View.GONE);\n ((TextView) errorContainer.findViewById(R.id.tvErrorDesc)).setText(R.string.no_conn_error_message);\n errorContainer.setVisibility(View.VISIBLE);\n }\n }", "@Override\n\tpublic void onActivityCreated(Activity activity, Bundle savedInstanceState)\n\t{\n\t}", "@MainThread\n @Override\n protected void onForceLoad() {\n super.onForceLoad();\n cancelLoadHelper();\n\n makeRequest();\n }", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n public void created(Bundle savedInstance) {\n activity = getActivity();\n //final File methodTracingFile = new File(activity.getExternalFilesDir(\"Caches\"), \"AppStart.trace\");\n //Log.d(TAG, \"methodTracingPath=\" + methodTracingFile.getPath());\n //Debug.startMethodTracing(methodTracingFile.getPath());\n PlayerApp.getRefWatcher(activity).watch(this);\n attachView = this.view;\n\n mMovieFragModel = new MovieFragModel();\n initListener();\n pagerHeader = (ViewPager) getActivity().findViewById(R.id.frag_pagerHeader);\n\n homepage_recommendview_title = (TextView) getActivity().findViewById(R.id.homepage_recommendview_title);\n ci = (CircleIndicator) getActivity().findViewById(R.id.frag_ci);\n initMovieView();\n\n\n\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\t\n\t\tactivity = (MainActivity)getActivity(); \n\t\t\n\t\tactivity.setContListener(this);\n\t\t\n\t\tif(MODE == Const.MODE_DEFAULT){\n\t\t\tinitializeInfoForm();\n\t\t}else{\n\t\t\tinitializeAddEditForm();\t\t\t\n\t\t}\n\t\t\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitView();\r\n\t}", "@Override\n public void onResume() {\n super.onResume();\n\n setLoadingDisplay();\n\n getActivity().supportInvalidateOptionsMenu();\n\n boolean refreshed;\n\n if (filterResult) {\n filterResult = false;\n\n refreshForDifferentPostParams();\n refreshed = true;\n\n } else if (getNavigationActivity().isWholePageResult()) {\n\n //if activity was navigated away from, reset filter and refresh if different\n resetFilterAndRefresh();\n refreshed = true;\n } else {\n refreshed = false;\n }\n\n if (!refreshed) {\n boolean longTimeLapse = System.currentTimeMillis() - lastRefreshTime > 1800000;\n\n if (longTimeLapse) refresh();\n }\n\n callbackManager.resume(this);\n }", "private void startCusorLoader() {\n\n if (getLoaderManager().getLoader(CURSOR_LOADER_ID) == null) {\n getLoaderManager().initLoader(CURSOR_LOADER_ID, null, new CheckIfFavourite()).forceLoad();\n } else {\n getLoaderManager().restartLoader(CURSOR_LOADER_ID, null, new CheckIfFavourite()).forceLoad();\n }\n\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\n public void onLoadFinished(@NonNull Loader<Boolean> loader, Boolean data) {\n if(data){\n\n act.getAppLoaderManager().restartLoader(MainActivity.CHECK_API_RESPONSE_CODE, null, new LoaderManager.LoaderCallbacks<Boolean>() {\n @NonNull\n @Override\n public Loader<Boolean> onCreateLoader(int id, @Nullable Bundle args) {\n return new ApiAnswers(getContext());\n }\n\n @Override\n public void onLoadFinished(@NonNull Loader<Boolean> loader, Boolean data2) {\n\n if(data2){\n\n GetListAdapterTask adapterTask = new GetListAdapterTask();\n adapterTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, params);\n }\n else{\n\n Intent noResponseIntent = new Intent(getContext(), NoResponseActivity.class);\n startActivity(noResponseIntent);\n getActivity().finish();\n }\n }\n\n @Override\n public void onLoaderReset(@NonNull Loader<Boolean> loader) {\n\n }\n });\n\n\n }\n\n }", "@Override\r\n public void onActivityCreated(Bundle savedInstanceState) {\n\tsuper.onActivityCreated(savedInstanceState);\r\n\tmFragmentManager = getActivity().getSupportFragmentManager();\r\n\tEventBus.getDefault().register(this);\r\n\r\n\tFilterService server = new FilterService();\r\n\tserver.doThemeFilterWork();\r\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "protected void setLoadedForThisRequest() {\r\n\t\tContextUtils.setRequestAttribute(getRequestLoadedMarker(), Boolean.TRUE);\r\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n // loading dispositius via AsyncTask\n new LoadDispositiusTask().execute();\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {\n }", "boolean isForceLoaded();", "@Override\n\tpublic void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {\n\t\tBundle result = new Bundle();\n\t\tswitch (loader.getId()) {\n\t\t\tcase LOADER_MODULES_FRAGMENT:\n\t\t\t\tresult.putInt(\"cursorCount\", cursor.getCount());\n\t\t\t\t((ModulesCursorAdapter) mAdapter).swapCursor(cursor);\n\t\t\t\t((ModulesCursorAdapter) mAdapter).notifyDataSetChanged();\n\t\t\t\tbreak;\n\n\t\t\tcase LOADER_MODULE_INFO_FRAGMENT:\n\t\t\t\tcursor.moveToFirst();\n\t\t\t\tresult.putString(\"courseName\", cursor.getString(cursor.getColumnIndex(ModulesContract.COURSE_NAME)));\n\t\t\t\tresult.putString(\"courseCode\", cursor.getString(cursor.getColumnIndex(ModulesContract.COURSE_CODE)));\n\t\t\t\tresult.putString(\"courseAcadYear\", cursor.getString(cursor.getColumnIndex(ModulesContract.COURSE_ACAD_YEAR)));\n\t\t\t\tresult.putString(\"courseSemester\", cursor.getString(cursor.getColumnIndex(ModulesContract.COURSE_SEMESTER)));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase LOADER_MODULE_INFO_FRAGMENT_DESCRIPTIONS:\n\t\t\t\tresult.putInt(\"cursorCount\", cursor.getCount());\n\t\t\t\t((CursorAdapter) mAdapter).swapCursor(cursor);\n\t\t\t\t((CursorAdapter) mAdapter).notifyDataSetChanged();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase LOADER_MODULE_ANNOUNCEMENTS_FRAGMENT:\n\t\t\tcase LOADER_NEW_ANNOUNCEMENTS_FRAGMENT:\n\t\t\t\tresult.putInt(\"cursorCount\", cursor.getCount());\n\t\t\t\t((CursorAdapter) mAdapter).swapCursor(cursor);\n\t\t\t\t((CursorAdapter) mAdapter).notifyDataSetChanged();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase LOADER_MODULE_WEBCASTS_FRAGMENT:\n\t\t\tcase LOADER_MODULE_WORKBINS_FRAGMENT:\n\t\t\t\tresult.putInt(\"cursorCount\", cursor.getCount());\n\t\t\t\t((SimpleCursorAdapter) mAdapter).swapCursor(cursor);\n\t\t\t\t((SimpleCursorAdapter) mAdapter).notifyDataSetChanged();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase LOADER_VIEW_ANNOUNCEMENT_FRAGMENT:\n\t\t\t\tcursor.moveToFirst();\n\t\t\t\tresult.putString(\"ivleId\", cursor.getString(cursor.getColumnIndex(AnnouncementsContract.IVLE_ID)));\n\t\t\t\tresult.putString(\"title\", cursor.getString(cursor.getColumnIndex(AnnouncementsContract.TITLE)));\n\t\t\t\tresult.putString(\"userName\", cursor.getString(cursor.getColumnIndex(UsersContract.NAME)));\n\t\t\t\tresult.putString(\"description\", cursor.getString(cursor.getColumnIndex(AnnouncementsContract.DESCRIPTION)));\n\t\t\t\tresult.putString(\"createdDate\", cursor.getString(cursor.getColumnIndex(AnnouncementsContract.CREATED_DATE)));\n\t\t\t\tresult.putString(\"expiryDate\", cursor.getString(cursor.getColumnIndex(AnnouncementsContract.EXPIRY_DATE)));\n\t\t\t\tresult.putString(\"url\", cursor.getString(cursor.getColumnIndex(AnnouncementsContract.URL)));\n\t\t\t\tresult.putBoolean(\"isRead\", cursor.getInt(cursor.getColumnIndex(AnnouncementsContract.IS_READ)) == 0 ? false : true);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase LOADER_VIEW_WEBCAST_ACTIVITY:\n\t\t\t\tcursor.moveToFirst();\n\t\t\t\tresult.putString(\"title\", cursor.getString(cursor.getColumnIndex(WebcastsContract.TITLE)));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase LOADER_VIEW_WORKBIN_FRAGMENT:\n\t\t\tcase LOADER_VIEW_WEBCAST_FRAGMENT:\n\t\t\tcase LOADER_VIEW_WEBCAST_ITEM_GROUP_FRAGMENT:\n\t\t\t\t((SimpleCursorAdapter) mAdapter).swapCursor(cursor);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase LOADER_VIEW_WEBCAST_FILE_ACTIVITY:\n\t\t\t\tcursor.moveToFirst();\n\t\t\t\tresult.putString(\"createDate\", cursor.getString(cursor.getColumnIndex(WebcastFilesContract.CREATE_DATE)));\n\t\t\t\tresult.putString(\"fileTitle\", cursor.getString(cursor.getColumnIndex(WebcastFilesContract.FILE_TITLE)));\n\t\t\t\tresult.putString(\"fileName\", cursor.getString(cursor.getColumnIndex(WebcastFilesContract.FILE_NAME)));\n\t\t\t\tresult.putString(\"fileDescription\", cursor.getString(cursor.getColumnIndex(WebcastFilesContract.FILE_DESCRIPTION)));\n\t\t\t\tresult.putString(\"mediaFormat\", cursor.getString(cursor.getColumnIndex(WebcastFilesContract.MEDIA_FORMAT)));\n\t\t\t\tresult.putString(\"MP3\", cursor.getString(cursor.getColumnIndex(WebcastFilesContract.MP3)));\n\t\t\t\tresult.putString(\"MP4\", cursor.getString(cursor.getColumnIndex(WebcastFilesContract.MP4)));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase LOADER_VIEW_WORKBIN_ACTIVITY:\n\t\t\t\tcursor.moveToFirst();\n\t\t\t\tresult.putString(\"title\", cursor.getString(cursor.getColumnIndex(WorkbinsContract.TITLE)));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase LOADER_VIEW_WORKBIN_FILES_FRAGMENT:\n\t\t\t\tresult.putInt(\"cursorCount\", cursor.getCount());\n\t\t\t\t((SimpleCursorAdapter) mAdapter).swapCursor(cursor);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase LOADER_VIEW_WORKBIN_FOLDERS_FRAGMENT:\n\t\t\t\tresult.putInt(\"cursorCount\", cursor.getCount());\n\t\t\t\t((SimpleCursorAdapter) mAdapter).swapCursor(cursor);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tthrow new IllegalArgumentException(\"No such loader\");\n\t\t}\n\t\t\n\t\tif (mListener != null) {\n\t\t\t((DataLoaderListener) mListener).onLoaderFinished(loader.getId(), result);\n\t\t}\n\t}", "void onActivityReady();", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setRetainInstance(true);\n\n imageRequestQueue = MyVolley.getRequestQueue();\n\n setHasOptionsMenu(true);\n postLoaderMethodList = getPostLoaderMethodList();\n postLoaderParams = new GobalPostLoader.Params(\n postLoaderMethodList.get(0),\n postLoaderMethodList.getContentType()\n );\n\n callbackManager = new CallbackManager<>(getActivity());\n postsAdapter = new GlobalPostsAdapter(callbackManager);\n\n if (postLoaderMethodList.interpretAsGlobalPosts()) {\n postLoaderParams.interpretAsGlobal = true;\n postLoaderParams.showGlobalPosts = postLoaderMethodList.showGlobalPosts();\n } else {\n AppSession.getInstance().getUser().setHidePublicContents(false);\n refreshWithHidePublicUpdate();\n }\n\n registerReceivers();\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t// getHasForFacebook();\n\n\t}", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n if (activity instanceof LoadingListener) {\n loadingListener = (LoadingListener) activity;\n } else {\n throw new ClassCastException(activity.toString() + \" must implement LoadingListener\");\n }\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t//has the mainactivity show the loading screen\n\t}", "@Override\n public void onFragmentVisible() {\n db = LegendsDatabase.getInstance(getContext());\n\n refreshCursor();\n\n if (emptyView.isShown()) {\n Crossfader.crossfadeView(emptyView, loadingView);\n }\n else {\n Crossfader.crossfadeView(listView, loadingView);\n }\n }", "@Override\n public Loader<Cursor> onCreateLoader(int i, Bundle bundle) {\n String[] projection = {\n GoalandTaskMatcherContract.GoalEntry.MY_GOAL_ID,\n GoalandTaskMatcherContract.GoalEntry.COLUMN_GOAL_DESCRIPTION };\n\n // This loader will execute the ContentProvider's query method on a background thread\n return new CursorLoader(this, // Parent activity context\n mCurrentGoalUri, // Query the content URI for the current product\n projection, // Columns to include in the resulting Cursor\n null, // No selection clause\n null, // No selection arguments\n null); // Default sort order\n }", "private void applyListener(){\n mBottomNavigationView.setOnNavigationItemSelectedListener((MenuItem item) -> {\n int id = item.getItemId();\n\n for (Pair<FragmentNav, String> pair : mFragmentNavsHolder) {\n if (pair.first.getNavigationItem() == id) {\n super.loadFragment(pair, FRAME_ID);\n break;\n }\n }\n return true;\n });\n }", "public boolean isDeferredLoading() {\n/* 86 */ return this.deferred;\n/* */ }", "@Override\n\tpublic void onActivityCreated(@Nullable Bundle savedInstanceState) {\n\t\tinitView();\n\t\tinitListener();\n\t\tinitData();\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public android.support.v4.content.Loader<Cursor> onCreateLoader(int i, final Bundle bundle) {\n return new android.support.v4.content.AsyncTaskLoader<Cursor>(this) {\n Cursor mOrderData = null;\n\n /**\n * Callback function for whenever a load operation begins\n */\n @Override\n protected void onStartLoading() {\n if(mOrderData != null){\n deliverResult(mOrderData);//if there was already data loaded(in the event that the activity was navigated away from while loading), load it\n } else {\n forceLoad();//starts a load command\n }\n }\n\n /**\n * Actions the AsyncTask performs in the background\n * @return - the Cursor for the query performed in the background\n */\n @Override\n public Cursor loadInBackground() {\n try {\n return getContentResolver().query(OrderContract.OrderEntry.CONTENT_URI,\n null,\n null,\n null,\n null);\n\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }\n\n /**\n * sets the local Cursor variable to the Cursor that was just loaded\n * @param data the Cursor that was loaded in\n */\n @Override\n public void deliverResult(Cursor data) {\n mOrderData = data;\n super.deliverResult(data);\n }\n };\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tloadingView.setVisibility(View.VISIBLE);\n\t\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tinitData(savedInstanceState);\r\n\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n gD.callload(context, nScreenHeight);\n\n\n\n }", "private void LoadComponents() {\n MenuBaseAdapter adapter = new MenuBaseAdapter(this.getActivity(), DataApp.LISTDATA);\n // list.setAdapter(adapter);\n this.event.OnLodCompleteDataResult();\n }", "protected void onViewReady(Bundle savedInstanceState, Intent intent) {\n }", "@Override\n\tpublic void onLoad() {\n\t\trequestTime++;\n\t\trefreshFromServer(ListViewCompat.LOAD);\n\t}", "@Override\n protected void onCreate(final Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n if (savedInstanceState == null) {\n //get conexus data\n try {\n mConexus = (Conexus) getIntent().getSerializableExtra(\"conexus\");\n conexusID = mConexus.getId();\n } catch (NullPointerException e) {\n onLoadingError();\n return;\n }\n\n //begin loading\n mDataGrabber = DataGrabber.getInstance(conexusID);\n getSupportFragmentManager().beginTransaction()\n .add(mDataGrabber, mLoadConexusFragmentTag)\n .commit();\n } else {\n //get data loading fragment that already exists\n mDataGrabber =\n (DataGrabber) getSupportFragmentManager().findFragmentByTag(mLoadConexusFragmentTag);\n\n if (!mDataGrabber.loading) {\n mConexus = (Conexus) savedInstanceState.getSerializable(\"conexus\");\n }\n\n hideProgressBar();\n }\n\n setActionBarAndTitle(\"Conexus\");\n }", "@Override\n public Loader<Cursor> onCreateLoader(int i, Bundle bundle) {\n String[] selectionArgs = {\"Y\"};\n\n return new CursorLoader(getActivity(),\n MovieContract.MovieEntry.CONTENT_URI,\n MovieUtility.MOVIE_COLUMNS,\n MovieContract.MovieEntry.COLUMN_FAVORITE + \" = ?\",\n selectionArgs,\n null\n );\n\n }" ]
[ "0.7312646", "0.7183634", "0.71154475", "0.7020869", "0.6716832", "0.67057824", "0.6648585", "0.66325814", "0.661305", "0.66119856", "0.6576668", "0.6575246", "0.6536687", "0.65197694", "0.6471665", "0.6462176", "0.6427989", "0.64084613", "0.6363976", "0.6363976", "0.63135767", "0.6300577", "0.6299163", "0.6296604", "0.6296604", "0.62313646", "0.6226876", "0.61893684", "0.61824024", "0.6150311", "0.61097383", "0.610186", "0.60943115", "0.60827327", "0.6081157", "0.6081157", "0.6048894", "0.60251456", "0.6009134", "0.5981028", "0.59798384", "0.59753585", "0.59664065", "0.59556156", "0.595488", "0.59545237", "0.59346086", "0.59265226", "0.5920162", "0.59062177", "0.5901428", "0.5900368", "0.5899224", "0.58970416", "0.5864455", "0.5859871", "0.5855784", "0.5847421", "0.5843792", "0.58391476", "0.5838986", "0.58269036", "0.5824522", "0.5817767", "0.5817767", "0.5816617", "0.5816549", "0.58096063", "0.58096063", "0.58029616", "0.5798672", "0.5798359", "0.5798359", "0.5798359", "0.5798359", "0.5798359", "0.5798359", "0.5795922", "0.5789095", "0.5787299", "0.5782743", "0.5777574", "0.57739735", "0.57739735", "0.5772441", "0.5770864", "0.57680535", "0.576574", "0.575188", "0.57507735", "0.57498574", "0.5749007", "0.57421094", "0.5741847", "0.5739959", "0.57352966", "0.5722741", "0.57226187", "0.57036036", "0.5695159", "0.5690612" ]
0.0
-1
get the id for the network loader
protected abstract int getEndlessNetworkLoaderId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "public final String getIdentifier() {\n return ServerUtils.getIdentifier(name, ip, port);\n }", "private String getMyNodeId() {\n TelephonyManager tel = (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE);\n String nodeId = tel.getLine1Number().substring(tel.getLine1Number().length() - 4);\n return nodeId;\n }", "@JsonIgnore\n public String getId() {\n return UriHelper.getLastUriPart(getUri());\n }", "public String getId() {\n switch (this.getType()) {\n case BGP:\n /*return this.bgpConfig.getNeighbors().get(\n this.bgpConfig.getNeighbors().firstKey()).getLocalAs().toString();*/\n case OSPF:\n return this.vrf.getName();\n case STATIC:\n return this.staticConfig.getNetwork().getStartIp().toString();\n }\n return this.vrf.getName();\n }", "public String getId()\r\n\t{\n\t\treturn id.substring(2, 5);\r\n\t}", "public java.lang.String getId() {\n return localId;\n }", "public java.lang.String getId() {\n return localId;\n }", "Object getId();", "String getIdNumber();", "public final String getNetId( )\r\n {\r\n return netId;\r\n }", "byte[] getId();", "UUID getId();", "public URI getId();", "public URI getId();", "Identifier getId();", "@Override\n protected int getLoaderId() {\n return 1;\n }", "java.lang.String getID();", "@NonNull\n public String getIdentifier() {\n return mProto.id;\n }", "public String getId() {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append(\"n=\");\n\t\tif ( nodeId != null ) {\n\t\t\tbuilder.append(nodeId);\n\t\t}\n\t\tbuilder.append(\";c=\");\n\t\tif ( created != null ) {\n\t\t\tbuilder.append(created);\n\t\t}\n\t\tbuilder.append(\";s=\");\n\t\tif ( sourceId != null ) {\n\t\t\tbuilder.append(sourceId);\n\t\t}\n\t\treturn DigestUtils.sha1Hex(builder.toString());\n\t}", "public int getId() {\n\t\treturn config >> 8;\n\t}", "public int getId() {\n if (!this.registered)\n return -1;\n return id;\n }", "int getPacketId();", "ModuleIdentifier getId();", "public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "java.lang.String getPoolId();", "String getUniqueId();", "public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public final String getId() {\r\n\t\treturn id;\r\n\t}", "public static String id()\n {\n return _id;\n }", "public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n }\n }", "public java.lang.String getId() {\n java.lang.Object ref = id_;\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 id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getId() {\n java.lang.Object ref = id_;\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 id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getId() {\n java.lang.Object ref = id_;\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 id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getId() {\n java.lang.Object ref = id_;\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 id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }" ]
[ "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6678073", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.6495673", "0.64695895", "0.64660406", "0.6452564", "0.64317703", "0.6397048", "0.6348743", "0.6348743", "0.63455564", "0.6324429", "0.63236", "0.63031393", "0.62846893", "0.6278784", "0.6278784", "0.62521654", "0.625149", "0.6248803", "0.6215239", "0.61980027", "0.6190384", "0.6189242", "0.6162199", "0.616109", "0.6157992", "0.6157992", "0.61533594", "0.6149431", "0.6135837", "0.612664", "0.6114271", "0.611166", "0.611166", "0.61090094", "0.61090094", "0.61075443", "0.61075443", "0.61075443", "0.61075443" ]
0.7824927
0
get the main adapter that contains your custom views
protected abstract MainNetworkAdapter<T> getMainAdapter(Context context);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public customAdapter() {\n super(SeekerRatingsListActivity.this, R.layout.rating_content, seekerRatingsList);\n }", "@Override\n\tprotected com.dachen.medicine.adapter.BaseCustomAdapter.BaseViewHolder getViewHolder() {\n\t\treturn new ViewHolder();\n\t}", "@Override\r\n\tpublic View getView() {\n\t\treturn super.getView();\r\n\t}", "@Override\n public View getView()\n {\n return view;\n }", "public abstract ItemListAdapter getAdapter(RecyclerView recyclerView);", "@Override\n\tpublic View getView() {\n\t\treturn super.getView();\n\t}", "@Override\n\tpublic int getView() {\n\t\treturn R.layout.activity_topnews;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View layout = inflater.inflate(R.layout.custom_row, container, false);\n recyclerView = (RecyclerView) layout.findViewById(R.id.rv);\n adapter = new WebCrawlerRecyclerViewAdapter(getActivity(), getData());\n recyclerView.setAdapter(adapter);\n LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());\n layoutManager.setOrientation(LinearLayoutManager.VERTICAL);\n recyclerView.setLayoutManager(layoutManager);\n return layout;\n\n }", "public View getView() { return view; }", "@Override\r\n public View getView() {\r\n return mBaseView;\r\n }", "private ArrayList<StoryItemUnit> getAdapter() {\n return ((TwitterTimeLineFlipAdapter) mAdapter).getAdapter();\r\n }", "@Override\r\n\tpublic View getView() {\n\t\treturn this.view;\r\n\t}", "public void setAdapter() {\n // Create Custom Adapter\n Resources res = getResources();\n adapter = null;\n adapter = new WebsearchListAdapter(this, CustomListViewValuesArr, res);\n list.setAdapter(adapter);\n }", "@Override\n protected int[] getChildViewIds() {\n return new int[] {\n R.id.feed_item_root,\n R.id.feed_item_avatar_layout,\n R.id.feed_item_avatar,\n R.id.feed_item_nickname,\n R.id.feed_item_createtime,\n R.id.feed_expand_text_view,\n R.id.feed_item_desc_image_layout,\n R.id.feed_item_desc_image,\n R.id.feed_support_count,\n R.id.feed_post_layout,\n R.id.feed_post_container_layout,\n R.id.feed_support_layout,\n R.id.feed_item_image_grid,\n R.id.feed_item_share,\n R.id.feed_item_support,\n R.id.feed_item_post,\n R.id.feed_item_support_text,\n R.id.feed_item_default_delete_button,\n R.id.feed_item_delete_layout,\n R.id.feed_prize_layout,\n R.id.feed_prize_text,\n R.id.feed_badge_layout,\n R.id.feed_prize_and_support_and_post_layout,\n\n R.id.item_divider,\n\n //empty\n R.id.list_empty_layout,\n R.id.list_empty_text\n };\n }", "private void setupCustomAdapter() {\n AnimalAdapter adapter = new AnimalAdapter(this, animals);\n aListView.setAdapter(adapter);\n }", "@Override\n public MainListAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n // create a new view\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.adapter_view, parent, false);\n // set the view's size, margins, paddings and layout parameters\n MainListAdapter.ViewHolder vh = new MainListAdapter.ViewHolder(v);\n return vh;\n }", "@Override\n public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View item = LayoutInflater.from(parent.getContext()).inflate(R.layout.item, parent, false);\n// Pasar la vista (item.xml) al ViewHolder\n ViewHolder viewHolder = new ViewHolder(item);\n return viewHolder;\n }", "@Override\n public View getView() {\n return mView;\n }", "public Object getAdapter(Class adapter)\n {\n if (ProjectionAnnotationModel.class.equals(adapter))\n {\n if (this.projectionSupport != null)\n {\n Object result = this.projectionSupport.getAdapter(\n sourceViewer, adapter);\n if (result != null)\n {\n return result;\n }\n }\n }\n \n if (adapter.equals(IContentOutlinePage.class))\n {\n IEditorInput input = getEditorInput();\n \n if (input instanceof IFileEditorInput)\n {\n if (outlinePage == null)\n {\n outlinePage = new PerlOutlinePage(source);\n outlinePage.addSelectionChangedListener(new OutlineSelectionListener());\n }\n return outlinePage;\n }\n }\n \n return super.getAdapter(adapter);\n }", "private void setAdapter(){\n ArrayList<Veranstaltung>ver = new ArrayList<>(studium.getLVS());\n recyclerView = findViewById(R.id.rc);\n LinearLayoutManager manager = new LinearLayoutManager(this);\n recyclerView.setLayoutManager(manager);\n recyclerView.setHasFixedSize(true);\n adapter = new StudiumDetailsRecylerAdapter(ver);\n recyclerView.setAdapter(adapter);\n }", "@Override\n public view_holder onCreateViewHolder(ViewGroup parent, int viewType) {\n view_holder view = new view_holder(LayoutInflater.from(a).inflate(R.layout.cell,parent,false));\n\n return view;\n }", "public String getAdapter() {\n return adapter;\n }", "@Override\n public void initViews() {\n adapter = new PaymentAdapter(context, MainActivity.os.getPayments());\n ((ListView)views.get(\"LIST_VIEW\")).setAdapter(adapter);\n (views.get(\"ADD_BUTTON\")).setOnClickListener(this);\n }", "public View getView() {\n return view;\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n View view = LayoutInflater.from(parent.getContext())\n .inflate(R.layout.main_list_item, parent, false);\n ViewHolder viewHolder = new ViewHolder(view);\n view.setTag(viewHolder);\n return view;\n }", "private void initAdaptersAndViews() {\n final Context context = getContext();\n mListViewAdapter = new FlickrHomeAdapter();\n mListLayoutManager = new LinearLayoutManager(context);\n mListLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);\n\n mViews.listView.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL_LIST));\n mViews.listView.setHasFixedSize(true);\n mViews.listView.setLayoutManager(mListLayoutManager);\n mViews.listView.setAdapter(mListViewAdapter);\n }", "@Override\n public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.listi, parent, false);\n MyViewHolder vh = new MyViewHolder(v); // pass the view to View Holder\n\n return vh;\n }", "@NonNull\n @Override\n public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View view = LayoutInflater.from(parent.getContext())\n .inflate(R.layout.institucion_list_content, parent, false);\n return new ViewHolder(view);\n }", "public View getView(int position, View convertView, ViewGroup parent) {\n return itemViews[position];\r\n// return convertView;\r\n }", "public void cargarAdaptador(){\n gridLayoutManager = new GridLayoutManager(getContext(), 2);\n recyclerView.setLayoutManager(gridLayoutManager);\n adapterRecetas = new AdapterRecetas(getContext());\n recyclerView.setAdapter(adapterRecetas);\n }", "@Override\n public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n MyViewHolder holder = new MyViewHolder(LayoutInflater.from(\n PickingListActivity.this).inflate(R.layout.picking_list_item, parent,\n false));\n return holder;\n }", "@Override\n public CustomAdapter.CustomViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View v = layoutInflater.inflate(R.layout.item_data, parent, false);\n return new CustomViewHolder(v);\n }", "private void setAdapter() {\n resultsRv.setLayoutManager(new LinearLayoutManager(getActivity()));\n resultsRv.setHasFixedSize(true);\n resultsRv.setItemAnimator(new DefaultItemAnimator());\n resultsRv.setAdapter(resultsListAdapter);\n }", "@Override\n public int getCount() {\n return 1;\n }", "@Override\n public int getCount() {\n return 1;\n }", "@Override\n public int getCount() {\n return 1;\n }", "@Override\n\t\t\tpublic ViewHolder onCreateViewHolder(View itemView) {\n\t\t\t\treturn new MylisViewHoder(itemView);\n\t\t\t}", "private void setUpAdapter(){\n customMovieAdapter= new CustomMovieAdapter(getActivity(),R.layout.list_movie_forecast,movieRowItemsList);\n gridView.setAdapter(customMovieAdapter);\n }", "@Override\n public MyAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n\n if (viewType == TYPE_ITEM) {\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_row,parent,false); //Inflating the layout\n\n ViewHolder vhItem = new ViewHolder(v,viewType); //Creating ViewHolder and passing the object of type view\n\n return vhItem; // Returning the created object\n\n //inflate your layout and pass it to view holder\n\n } else if (viewType == TYPE_HEADER) {\n\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.header,parent,false); //Inflating the layout\n\n ViewHolder vhHeader = new ViewHolder(v,viewType); //Creating ViewHolder and passing the object of type view\n\n return vhHeader; //returning the object created\n\n\n }\n return null;\n\n }", "default View getView() {\n return null;\n }", "@Override\n public MyHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View v = LayoutInflater.from(parent.getContext())\n .inflate(R.layout.rv_item,parent,false);\n return new MyHolder(v);\n }", "private void setupAdapter() {\n FullWidthDetailsOverviewRowPresenter detailsPresenter;\n if (isIncomingRequest || isOutgoingRequest) {\n detailsPresenter = new FullWidthDetailsOverviewRowPresenter(\n new TVContactRequestDetailPresenter(),\n new DetailsOverviewLogoPresenter());\n } else {\n detailsPresenter = new FullWidthDetailsOverviewRowPresenter(\n new TVContactDetailPresenter(),\n new DetailsOverviewLogoPresenter());\n }\n\n detailsPresenter.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.grey_900));\n detailsPresenter.setInitialState(FullWidthDetailsOverviewRowPresenter.STATE_HALF);\n\n // Hook up transition element.\n Activity activity = getActivity();\n if (activity != null) {\n FullWidthDetailsOverviewSharedElementHelper mHelper = new FullWidthDetailsOverviewSharedElementHelper();\n mHelper.setSharedElementEnterTransition(activity, TVContactActivity.SHARED_ELEMENT_NAME);\n detailsPresenter.setListener(mHelper);\n detailsPresenter.setParticipatingEntranceTransition(false);\n prepareEntranceTransition();\n }\n\n detailsPresenter.setOnActionClickedListener(action -> {\n if (action.getId() == ACTION_CALL) {\n presenter.contactClicked();\n } else if (action.getId() == ACTION_DELETE) {\n presenter.removeContact();\n } else if (action.getId() == ACTION_CLEAR_HISTORY) {\n presenter.clearHistory();\n } else if (action.getId() == ACTION_ADD_CONTACT) {\n presenter.onAddContact();\n } else if (action.getId() == ACTION_ACCEPT) {\n presenter.acceptTrustRequest();\n } else if (action.getId() == ACTION_REFUSE) {\n presenter.refuseTrustRequest();\n } else if (action.getId() == ACTION_BLOCK) {\n presenter.blockTrustRequest();\n }\n });\n\n ClassPresenterSelector mPresenterSelector = new ClassPresenterSelector();\n mPresenterSelector.addClassPresenter(DetailsOverviewRow.class, detailsPresenter);\n mPresenterSelector.addClassPresenter(ListRow.class, new ListRowPresenter());\n mAdapter = new ArrayObjectAdapter(mPresenterSelector);\n setAdapter(mAdapter);\n }", "public void setupAdapter() {\n recyclerAdapter = new PhotosAdapter(this);\n recyclerViewPhotos.setAdapter(recyclerAdapter);\n }", "private void showMyAdapt() {\n\t\tmyAdapt = new MyAdapt(this, persons);\n\t\tlistView.setAdapter(myAdapt);\n\t}", "@Override\n public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.row_list, parent, false);\n MyViewHolder vh = new MyViewHolder(v); // pass the view to View Holder\n return vh;\n }", "@Override\n public listAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n\n\n\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.listitemamentitylayout, parent, false);\n\n listAdapter.ViewHolder vh = new listAdapter.ViewHolder(v);\n\n\n\n return vh;\n\n\n\n }", "@Override\n public int getCount() {\n return 1;\n }", "@Override\n public int getCount() {\n return 1;\n }", "@Override\n public View getView(LayoutInflater inflater, View convertView) {\n return getViewItem(inflater, convertView);\n }", "@Override\n\tprotected RecycleBaseAdapter getListAdapter() {\n\t\treturn new VipStudentAdapter();\n\t}", "@Override\n public PagerAdapter getAdapter() {\n return wrappedPagerAdapter;\n }", "@Override\n public MyHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.grid_tab, parent, false);\n MyHolder vh = new MyHolder(view);\n return vh;\n }", "@Override\n public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View view = mInflater.inflate(R.layout.item_data, parent, false);\n return new ViewHolder(view);\n }", "@Override\n public NewsFeedViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n LayoutInflater inflater = LayoutInflater.from(activity) ;\n// LayoutInflater inflater = activity.getLayoutInflater() ;\n // inflate your layout into view by layout inflater\n View itemView = inflater.inflate(R.layout.news_feed_item , parent , false) ;\n // finally u can make your object from your view holder\n NewsFeedViewHolder newsFeedViewHolder = new NewsFeedViewHolder(itemView) ;\n // dont forget to change nuull with view holder object\n return newsFeedViewHolder;\n }", "@Override\n public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View view = LayoutInflater.from(parent.getContext())\n .inflate(R.layout.article_element_layout, parent, false);\n return new MyViewHolder(view);\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n return convertView;\n }", "@Override\n public ListsAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int position) {\n View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.singleview, parent, false);\n ViewHolder vh = new ViewHolder(view);\n context = view.getContext();\n return vh;\n }", "@Override\n public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n // create a new view\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.content_adapter, parent, false);\n ViewHolder vh = new ViewHolder(v);\n return vh;\n }", "@Override\n public int getCount() {\n return 9;\n }", "@Override\n public void onGlobalLayout() {\n\n if (!isFirstLayout) {\n isFirstLayout = true;\n ListAdapter adapter=new MeAdapter(getActivity(),gv.getHeight()/2,resIds,names);\n gv.setAdapter(adapter);\n\n }\n }", "private void initViews() {\n\n myOnClickListener = new MyOnClickListener(getContext());\n recyclerView = (RecyclerView)view.findViewById(R.id.recyclerView_ID);\n recyclerView.setHasFixedSize(true);\n layoutManager = new GridLayoutManager(getActivity(), 2);\n recyclerView.setLayoutManager(layoutManager);\n// adapter = new HomeAdapter(al,al2);\n// recyclerView.setAdapter(adapter);\n\n Log.e(\"adapter value : \",\"\"+this.al +this.al2);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n View view = inflater.inflate(R.layout.fragment_selector, container,false);\n\n //get lists of structure from singleton\n structureList = StructureData.get();\n\n //set the adaptor\n structureAdapter = new SelectorAdapter();\n\n //find recycler view and set layout manager constraints, set new adaoter to adaptor made above\n rvS = (RecyclerView) view.findViewById(R.id.selectorRecyclerView);\n rvS.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.HORIZONTAL,\n false));\n rvS.setAdapter(structureAdapter);\n\n return view;\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n return getCustomView(position, convertView, parent);\n }", "@Override\n protected void initViews(Bundle savedInstanceState) {\n this.recyclerView = this.findView(R.id.recycler_view);\n this.recyclerView.addItemDecoration(\n new EasyDividerItemDecoration(this, EasyDividerItemDecoration.VERTICAL_LIST));\n\n }", "@Override\n public ListadoHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n //INFLATE A VIEW FROM XML\n View v= LayoutInflater.from(parent.getContext()).inflate(R.layout.listado_card_item,null);\n\n //HOLDER\n ListadoHolder holder=new ListadoHolder(v);\n\n return holder;\n }", "@Override\n public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { //이 함수는 RecyclerView의 항목화면 연결\n View view;\n Context context = parent.getContext();\n LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n // if(viewType == Code.ViewType.STATION_FAV){\n view = inflater.inflate(R.layout.row_favorite, parent, false);\n // mContext = view.getContext();\n return new FavStationViewHolder(view);\n /*}else{\n view = inflater.inflate(R.layout.row_favorite_bus, parent, false);\n return new FavBusViewHolder(view);\n }*/\n }", "@Override\n public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n LayoutInflater inflater = LayoutInflater.from(parent.getContext());\n View v = inflater.inflate(R.layout.mainactivity_list_row, parent, false);\n\n return new ViewHolder(v);\n }", "@Override\n public View getView(final int position, View convertView, ViewGroup parent) {\n final Holder holder=new Holder();\n\n\n\n AuctionBean users = list.get(position);\n convertView = inflater.inflate(R.layout.customelayout, null);\n\n holder.imgThumbnail = (ImageView) convertView.findViewById(R.id.imageview);\n holder.top_sr_no = (TextView) convertView.findViewById(R.id.textsrno);\n holder.bottom_sr_no = (TextView) convertView.findViewById(R.id.textbottom_srno);\n\n return convertView;\n }", "@Override\n\tpublic int getCount() {\n\t\treturn 1;\n\t}", "@Override\n\tpublic int getCount() {\n\t\treturn 1;\n\t}", "@Override\n public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n\n MyViewHolder viewHolder = null;\n LayoutInflater inflater = LayoutInflater.from(parent.getContext());\n\n Log.e(\"TAg\", \"the view type : \" + viewType);\n\n switch (viewType) {\n case ITEM:\n // viewHolder = getViewHolder(parent, inflater);\n\n View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.blood_appeals_custom_row, parent, false);\n viewHolder = new MyViewHolder(itemView);\n\n break;\n case LOADING:\n View v2 = inflater.inflate(R.layout.progress_item_at_end, parent, false);\n viewHolder = new MyViewHolder(v2);\n break;\n\n }\n\n\n\n\n return viewHolder;\n\n }", "public void setMainRowsAdapter() {\n\n //Selector que permite agregar multiples Presentadores\n rowPresenterSelector = new ClassPresenterSelector();\n\n //Inicialización y configuración del Presentador del MediaPlayer\n playbackControlsRowPresenter = mGlue.createControlsRowAndPresenter();\n playbackControlsRowPresenter.setBackgroundColor(getActivity().getResources().getColor(R.color.background));\n playbackControlsRowPresenter.setBackgroundColor(getActivity().getResources().getColor(R.color.colorPrimary));\n playbackControlsRowPresenter.setSecondaryActionsHidden(false);\n playbackControlsRowPresenter.setOnActionClickedListener(new OnActionClickedListener() {\n @Override\n public void onActionClicked(Action action) {\n if (action.getId() == 0) { //Like Action\n\n }\n if (action.getId() == 2) { //Repeat Action\n final LiveCanalCard card = selectedChannel;\n MediaMetaData currentMetaData = new MediaMetaData();\n currentMetaData.setMediaTitle(card.getmTitle());\n currentMetaData.setMediaSourcePath(card.getmRecord());\n mGlue.prepareIfNeededAndPlay(currentMetaData);\n }\n\n }\n });\n\n }", "public void initView() {\n ArrayAdapter<String> arrayAdapter=new ArrayAdapter<String>(getView().getContext(),android.R.layout.simple_list_item_1,tracks);\n list.setAdapter(arrayAdapter);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n final View view = inflater.inflate(R.layout.wishlist_layout, container, false);\n layoutManager = new GridLayoutManager(getContext(), 2);\n Log.d(\"wishlist\",MainActivity.wishListItems.toString());\n JSONObject x=MainActivity.wishListItems;\n Iterator keys = x.keys();\n while (keys.hasNext()) {\n Object key = keys.next();\n JSONObject value = null;\n try {\n value = x.getJSONObject((String) key);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n Allresults.put(value);\n }\n\n\n if(Allresults!=null){\n View nodata = view.findViewById(R.id.nodata);\n nodata.setVisibility(View.GONE);\n View data = view.findViewById(R.id.data);\n data.setVisibility(View.VISIBLE);\n recyclerView = view.findViewById(R.id.recyclerView);\n recyclerView.setHasFixedSize(true);\n recyclerView.setLayoutManager(layoutManager);\n adapter = new SearchResultAdapter(Allresults);\n //adapter1 = new SearchResultAdapter(Allresults);\n recyclerView.setAdapter(adapter);\n }\n else{\n View nodata = view.findViewById(R.id.nodata);\n nodata.setVisibility(View.VISIBLE);\n View data = view.findViewById(R.id.data);\n data.setVisibility(View.GONE);\n }\n\n return view;\n }", "String getViewClass();", "@NonNull\n @Override\n public RecyclerAdapter onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {\n return new RecyclerAdapter(LayoutInflater.from(parent.getContext())\n .inflate(R.layout.recycler_layout, parent, false));\n }", "@Override\n public View getView(int position, View ConvertView, ViewGroup parent){ ///position starts from zero,one and goes on, parent would be the layout we want to display all elements\n View row=ConvertView; //to optimize we inflate the item only first else we recycle the view using converterView\n if(row==null) {\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n //**View of which we want to convert to java view object\n row = inflater.inflate(R.layout.single_row, parent, false);\n }\n //*****From row view we can access the view items and populate it data\n ImageView imageView = (ImageView)row.findViewById(R.id.imageView);\n TextView myDiscription=(TextView)row.findViewById(R.id.myDescription);\n TextView myTitle=(TextView)row.findViewById(R.id.mytitle);\n\n imageView.setImageResource(images[position]); //postion will incremented automaticlly as views will populate\n myDiscription.setText(description[position]);\n myTitle.setText(titles[position]);\n\n return row;\n }", "@Override\n public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n Context context = parent.getContext();\n LayoutInflater inflater = LayoutInflater.from(context);\n // Inflate the custom layout -> use the xml file layouted for an Order row\n View searchResultsView = inflater.inflate(R.layout.result_row, parent, false);\n // Return a new holder instance\n return new ViewHolder(searchResultsView);\n }", "@Override\n public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.rowlayout, parent, false);\n MyViewHolder vh = new MyViewHolder(v); // pass the view to View Holder\n return vh;\n }", "public void configs() {\n adaptadorRecyclerView = new AdaptadorRecyclerView(new ArrayList<>(), this);//configuramos el adaptador; necesitamos implementar interfaz OnItemClickListener y sobreescribir sus metodos\n recyclerView.setLayoutManager(new LinearLayoutManager(this));//configuramos la recyclerView\n recyclerView.setAdapter(adaptadorRecyclerView);\n }", "@Override\n public UIAdapter.ViewHolder onCreateViewHolder(ViewGroup parent,\n int viewType) {\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_layout, parent, false);\n return new ViewHolder(v);\n }", "@Override\n public int getCount() {\n return 67;\n }", "public void setAdapter() {\n binding.RvwalletAmount.setLayoutManager(new GridLayoutManager(getActivity(), 2));\n binding.RvwalletAmount.setHasFixedSize(true);\n WalletAdapter kyCuploadAdapter = new WalletAdapter(getActivity(), getListWallet(), this);\n binding.RvwalletAmount.setAdapter(kyCuploadAdapter);\n }", "protected void init_adapter()\n {\n manager = new GridLayoutManager(this, 2);\n recycler_view.setLayoutManager(manager);\n //recycler_view.setit\n\n adapter = new NasaApodAdapter();\n\n adapter.setOnItemClickListener(new NasaApodAdapter.OnItemClickListener()\n {\n @Override\n public void onItemClick(Photo photo)\n {\n Log.d(\"APOD\", photo.getImgSrc());\n\n intent = new Intent(getApplicationContext(), DetailActivity.class);\n intent.putExtra(\"photo\", photo);\n\n startActivity(intent);\n }\n });\n }", "@Override\n public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.deals_new_page, parent, false);\n // set the view's size, margins, paddings and layout parameters\n MyViewHolder vh = new MyViewHolder(v); // pass the view to View Holder\n return vh;\n }", "protected LayoutInflater getInflater(){\n return getActivity().getLayoutInflater();\n }", "@Override\n\t\tpublic MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n\t\t\tMyViewHolder holder = new MyViewHolder(mInflater.inflate(\n\t\t\t\t\tR.layout.hscroll_item, parent, false));\n\t\t\t\n\t\t\treturn holder;\n\t\t}", "@Override\n public int getCount() {\n return 0;\n }", "@Override\n public int getCount() {\n return 0;\n }", "@Override\n // Call ViewHolder class and create the view\n public RecyclerViewAdapter.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {\n View view = LayoutInflater.from(viewGroup.getContext())\n .inflate(R.layout.list_row, viewGroup, false);\n\n // Pass the view created\n return new ViewHolder(view, context);\n }", "@Override\r\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\r\n\t}", "@Override\n\tprotected BaseViewHolder<JSONObject> getHolderView(View layout) {\n\t\treturn new HolidayMealsViewHolder(layout);\n\t}", "@Override\n public int getCount()\n {\n return 1;\n }", "@Override\n\tprotected CloudBaseAdapter getAdapter() {\n\t\treturn new CommentsAdapter(ca(), mListData, mLoadingImages);\n\t}", "private void adaptView() {\n adapter = new ViewUserOrder_Adapter(ViewUserOrder.this, R.layout.order_element, listOrder);\n //adapter = new ViewUserOrder_Adapter(this, R.layout.order_element, userOrderList);\n gridView.setAdapter(adapter);\n //Toast.makeText(ViewUserOrder.this, \"Adapted data\", Toast.LENGTH_LONG).show();\n }", "@Override\r\n public int getCount() {\n return 2;\r\n }", "@Override\r\n public int getCount() {\n return 2;\r\n }", "@Override\r\n public int getCount() {\n return 2;\r\n }", "public interface WrapperAdapter {\n\n RecyclerView.Adapter getWrappedAdapter();\n}" ]
[ "0.6632201", "0.6581514", "0.645696", "0.6445076", "0.6392434", "0.6386979", "0.6283682", "0.62610155", "0.62607074", "0.62505823", "0.62440866", "0.62403107", "0.62158537", "0.6202929", "0.61794776", "0.61745393", "0.61531633", "0.6144561", "0.6140492", "0.6122045", "0.6118943", "0.60993165", "0.6097452", "0.60958004", "0.608741", "0.60824555", "0.6070607", "0.60635287", "0.60513514", "0.6043447", "0.60428727", "0.6041258", "0.6040668", "0.603833", "0.603833", "0.603833", "0.603663", "0.6033574", "0.60145515", "0.5996534", "0.59935737", "0.5980773", "0.5977423", "0.59741896", "0.5972422", "0.59637284", "0.59613407", "0.59613407", "0.59603536", "0.59597313", "0.5949344", "0.594168", "0.59369373", "0.5933579", "0.5928639", "0.5925471", "0.59233576", "0.5917101", "0.5911628", "0.5911506", "0.5907269", "0.590123", "0.59007776", "0.58972305", "0.5895241", "0.5892007", "0.58908933", "0.58884674", "0.5882455", "0.5882455", "0.58758193", "0.58690804", "0.5864289", "0.58597255", "0.58527845", "0.58516586", "0.58508915", "0.58467644", "0.5846681", "0.5844813", "0.5843959", "0.58296233", "0.58281034", "0.5826801", "0.582428", "0.5822122", "0.58212394", "0.58206356", "0.58206356", "0.5814381", "0.58107823", "0.58107823", "0.580537", "0.5804243", "0.5799658", "0.57976776", "0.57945013", "0.57945013", "0.57945013", "0.57927316" ]
0.61893606
14
TODO possibly work on making this test run the EncryptionUtil program and pass args to it
public static void main(String[] args) throws IOException { String command, file, destination; Scanner in = new Scanner(System.in); System.out.print("Enter: command file destination\n"); command = in.next(); file = in.next(); destination = in.next(); Process process = new ProcessBuilder("EncryptionUtil", command, file, destination).start(); InputStream is = process.getInputStream(); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); String line; System.out.printf("Output of running %s is:", Arrays.toString(args)); while ((line = br.readLine()) != null) { System.out.println(line); } // EncryptionUtil sec = null; // sec = new EncryptionUtil(); // // // try { // // System.out.println("Testing file encrypting: "); // File input = new File("To Encrypt.txt"); // File output = new File("Encrypted Output.txt"); // // sec.encrypt(input, output); // // File deOut = new File("Decrypted Output.txt"); // // sec.decrypt(output, deOut); // // // } catch (Exception e) { // e.printStackTrace(); // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws Exception {\n String dataToEncrypt, key1, key2;\n byte[] keyBytes;\n int cryptoMode, algorithm;\n try {\n cryptoMode = ENCRYPT_MODE;//Integer.valueOf(args[0]);\n algorithm = T3DES_ALGORITHM;// Integer.valueOf(args[1]);\n dataToEncrypt = \"0433646FD6976AAF\";//args[2];\n key1 = \"ADB876C4FF8A187D372B42A4A7B693F8\";//args[3];\n try {\n key2 = args[4];\n keyBytes = ConvertUtils.XORToBytes(key1, key2);\n System.out.println(\"Two keys supplied, using two keys...\");\n } catch (ArrayIndexOutOfBoundsException ex) {\n keyBytes = ConvertUtils.hexToBytes(key1);\n System.out.println(\"One key supplied, using one key...\");\n }\n\n } catch (ArrayIndexOutOfBoundsException ex) {//D64F31B0C96128CC\n System.out.println(\"Usage: \\n1. java KeyGen cryptionMode algorithm dataToEncrypt key1InHEX\\t or \\n. java KeyGen dataToEncrypt key1InHEX keyInHEX\");\n return;\n }\n \n Cryptor encryptor, decryptor;\n \n encryptor = new Cryptor(T3DES_ALGORITHM, ENCRYPT_MODE);\n System.out.println(\"Key passed in\\t\"+ConvertUtils.bytesToHex(keyBytes));\n encryptor.processData(keyBytes, ConvertUtils.hexToBytes(dataToEncrypt));\n\n decryptor = new Cryptor(T3DES_ALGORITHM, DECRYPT_MODE);\n decryptor.processData(keyBytes, ConvertUtils.hexToBytes(encryptor.getResult()));\n decryptor.getResult();\n }", "public static void main(String[] args) {\n\n /* \n algorithms to choose:\n\n 0 - ASCON\n 1 - AESOTRS\n 2 - AESOTRP\n\n ------ not yet supported ------\n 3 - Acorn\n 4 - Keyak\n 5 - OCB\n 6 - Norx\n 7 - Deoxys\n 8 - Ketje\n 9 - AEZ\n 10 - MORUS\n */\n\n\n // enter input file path\n String path_in = args[0];\n\n // enter encrypted output file path\n String path_out = args[1];\n\n // enter decrypted output file path\n String path_out2 = args[2];\n\n // Algorithm number\n int alg = Integer.parseInt(args[3]);\n\n // enter key (in this case 16B)\n byte[] key = hexStringToByteArray(\"00112233445566778899aabbccddeeff\");\n\n // enter nonce (int his case 16B)\n byte[] nonce = hexStringToByteArray(\"00112233445566778899aabbccddeeff\");\n\n // call encryption function which will do the rest and output the file\n new JNI().dll_encrypt(path_in, path_out, nonce, key, alg); // invoke the native method\n\n new JNI().dll_decrypt(path_out, path_out2, nonce, key, alg);\n\n }", "public static void main(String[] args) throws Exception {\n\n String inFile = args[0];\n String outFile = args[1];\n\n CryptoEngine cryptoEngine = new CryptoEngine(inFile, outFile);\n cryptoEngine.encrypt();\n cryptoEngine.decrypt();\n }", "public static void main(String[] args){\n\n String mode = \"enc\";\n String data = \"\";\n String out = \"\";\n String path;\n String alg = \"unicode\";\n int key = 0;\n\n try {\n for (int i = 0; i < args.length; i++) {\n if (args[i].equals(\"-data\") || args[i].equals(\"-in\")) {\n data = args[i + 1];\n }\n if (args[i].equals(\"-mode\")) {\n mode = args[i + 1];\n }\n if (args[i].equals(\"-key\")) {\n key = Integer.parseInt(args[i + 1]);\n }\n if (args[i].equals(\"-out\")) {\n out = args[i + 1];\n }\n if (args[i].equals(\"-alg\")) {\n alg = args[i + 1];\n }\n }\n } catch (ArrayIndexOutOfBoundsException e) {\n System.out.println(\"Missing option\");\n }\n\n File file = new File(data);\n\n if (file.exists() && !file.isDirectory()) {\n path = data;\n\n switch (mode){\n case \"enc\":\n EncryptionContext encryptionContext = new EncryptionContext();\n if(alg.equals(\"shift\")) {\n encryptionContext.setMethod(new ShiftEncryptionMethod());\n } else {\n encryptionContext.setMethod(new UnicodeTableEncryptionMethod());\n }\n data = encryptionContext.encryptFromFile(path, key);\n break;\n\n case \"dec\":\n DecryptionContext decryptionContext = new DecryptionContext();\n if(alg.equals(\"shift\")) {\n decryptionContext.setMethod(new ShiftDecryptionMethod());\n } else {\n decryptionContext.setMethod(new UnicodeTableDecryptionMethod());\n }\n data = decryptionContext.decryptFromFile(path,key);\n break;\n }\n\n } else {\n switch (mode){\n case \"enc\":\n EncryptionContext encryptionContext = new EncryptionContext();\n if(alg.equals(\"shift\")) {\n encryptionContext.setMethod(new ShiftEncryptionMethod());\n } else {\n encryptionContext.setMethod(new UnicodeTableEncryptionMethod());\n }\n data = encryptionContext.encrypt(key, data);\n break;\n\n case \"dec\":\n DecryptionContext decryptionContext = new DecryptionContext();\n if(alg.equals(\"shift\")) {\n decryptionContext.setMethod(new ShiftDecryptionMethod());\n } else {\n decryptionContext.setMethod(new UnicodeTableDecryptionMethod());\n }\n data = decryptionContext.decrypt(key, data);\n break;\n }\n }\n\n if (out.isEmpty()) {\n System.out.println(data);\n } else {\n writeIntoFile(out, data);\n }\n\n }", "public static void main(String[] args) throws Exception {\n\t\tString myPass = \"FortyTwo101010\";\n\t\tString encPass = Encryption.encrypt(myPass);\n\t\tSystem.out.println(encPass.length());\n\t\tSystem.out.println(encPass);\n\t\tString dencPass = Encryption.decrypt(encPass);\n\t\t\n\t\tSystem.out.println(\"Password: \"+ myPass);\n\t\tSystem.out.println(\"Encrypted Password: \" + encPass);\n\t\tSystem.out.println(\"Decrypted Password: \" + dencPass);\n\t}", "public static void main(String[] arg) throws UnsupportedEncodingException{\n\t\tString encPwd = encrypt(\"cmportal11\", getSalt(\"cmreports\"));\n\t\tSystem.out.println(\"Generated: \"+encPwd);\n\t\tSystem.out.println(\"Salt : \"+ getSalt(\"cmreports\"));\n\t}", "private static String getEncryptedStoredPassword(String args[]) {\n return args[1].trim() ;\n }", "public static void main(String[] args) {\n AbstractEncryptFacade facade;\n // getBean()的返回类型为Object,需要进行强制类型转换\n facade = (AbstractEncryptFacade)XMLUtil.getBean();\n facade.encrypt(\"src.txt\", \"des.txt\");\n }", "public static void main(String[] args) {\n Encryption password = new UnEncryption();\n password.setContent(\"abcde\");\n password.encrypt();\n System.out.println(password.getContent());\n \n Encryption shiftEncryption = new ShiftEncryption();\n shiftEncryption.setEncryption(password);\n shiftEncryption.encrypt();\n System.out.println(shiftEncryption.getContent());\n \n Encryption reverseEncryption = new ReverseEncryption();\n reverseEncryption.setEncryption(shiftEncryption);\n reverseEncryption.encrypt();\n System.out.println(reverseEncryption.getContent());\n \n ShiftEncryption tstr = new ShiftEncryption();\n tstr.dencrypt(\"011223\");\n System.out.println(tstr.getContent());\n }", "public static void main(String[] args) throws Exception {\n String keyString = \"1bobui76m677W1eCxjFM79mJ189G2zxo\";\n String input = \"john doe i a dead man sdhfhdshfihdoifo\";\n\n // setup AES cipher in CBC mode with PKCS #5 padding\n Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\n // setup an IV (initialization vector) that should be\n // randomly generated for each input that's encrypted\n byte[] iv = new byte[cipher.getBlockSize()];\n new SecureRandom().nextBytes(iv);\n IvParameterSpec ivSpec = new IvParameterSpec(iv);\n\n // hash keyString with SHA-256 and crop the output to 128-bit for key\n MessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\n digest.update(keyString.getBytes());\n byte[] key = new byte[16];\n System.arraycopy(digest.digest(), 0, key, 0, key.length);\n SecretKeySpec keySpec = new SecretKeySpec(key, \"AES\");\n\n // encrypt\n cipher.init(Cipher.ENCRYPT_MODE, keySpec, ivSpec);\n byte[] encrypted = cipher.doFinal(input.getBytes(\"UTF-8\"));\n System.out.println(\"encrypted: \" + new String(encrypted));\n\n // include the IV with the encrypted bytes for transport, you'll\n // need the same IV when decrypting (it's safe to send unencrypted)\n\n // decrypt\n cipher.init(Cipher.DECRYPT_MODE, keySpec, ivSpec);\n byte[] decrypted = cipher.doFinal(encrypted);\n System.out.println(\"decrypted: \" + new String(decrypted, \"UTF-8\"));\n }", "public static void main(String[] args) {\n\t\tFileEncryptor fe = new FileEncryptor();\n\t\tfe.encryptMessage();\n\t}", "public static void main(String[] args) {\n if (args.length < 2) {\n System.out.println(\"The first argument must be -e or -d\");\n System.out.println(\n \"while the second argument must be -ECB, -CBC. or -CTR\");\n System.exit(1);\n }\n if (args[1].equals(\"-ECB\")) {\n if (args.length == 4) {\n String filename = args[2];\n String key = args[3];\n if (args[0].equals(\"-e\")) {\n encryptECB(filename,key);\n }\n else if (args[0].equals(\"-d\")) {\n decryptECB(filename,key);\n } else {\n System.out.println(\"The first argument must be -e or -d\");\n System.exit(1);\n }\n } else {\n System.out.println(\"Usage: java ImageCipher [-e or -d] -ECB \" +\n \"<image file name without .pgm> <key>\");\n System.exit(1);\n }\n } else if (args[1].equals(\"-CBC\")) {\n if (args.length == 5) {\n String filename = args[2];\n String key = args[3];\n String IV = args[4];\n if (args[0].equals(\"-e\")) {\n encryptCBC(filename,key,IV);\n }\n else if (args[0].equals(\"-d\")) {\n decryptCBC(filename,key,IV);\n } else {\n System.out.println(\"The first argument must be -e or -d\");\n System.exit(1);\n }\n } else {\n System.out.println(\"Usage: java ImageCipher [-e or -d] -CBC \" +\n \"<image file name without .pgm> <key> <IV>\");\n System.exit(1);\n }\n } else if (args[1].equals(\"-CTR\")) {\n if (args.length == 5) {\n String filename = args[2];\n String key = args[3];\n String counter = args[4];\n if (args[0].equals(\"-e\")) {\n encryptCTR(filename,key,counter);\n }\n else if (args[0].equals(\"-d\")) {\n decryptCTR(filename,key,counter);\n } else {\n System.out.println(\"The first argument must be -e or -d\");\n System.exit(1);\n }\n } else {\n System.out.println(\"Usage: java ImageCipher [-e or -d] -CTR \" +\n \"<image file name without .pgm> <key> <IV>\");\n System.exit(1);\n }\n } else {\n System.out.println(\"The second argument must be -ECB, -CBC, or \" +\n \"-CTR\");\n System.exit(1);\n }\n\n }", "public static void main(String[] args) {\n \n byte[] cadena = null;\n byte[] cadenaEncriptada = null;\n byte[] cadenaDencriptada = null;\n String cadena2=\"Hola, bona tarda!, com estas? qqoepoepoepoepooepoepoepoepoepoe\";\n \n SecretKey key=null;\n \n cadena=cadena2.getBytes();\n key=keygenKeyGeneration(128);\n cadenaEncriptada=encryptData(key,cadena);\n System.out.println(cadena2);\n cadena2=cadenaEncriptada.toString();\n System.out.println(cadena2);\n cadenaDencriptada=dencryptData(key,cadenaEncriptada);\n String misstageDencriptat = new String(cadenaDencriptada);\n System.out.println(misstageDencriptat);\n \n }", "public static void main(String[] args) {\n\n\t\t\n\n\t\ttry {\n\t\t\t\n\t\t\tSystem.out.println(StringUtils.isDigit(\"0q1\"));\n\n//\t\t\tSystem.out.println(JNCryptorUtils.getInstance().decryptData(\"LcmJxmzKMlmp0GfahT3+jQ==\", \"837eCi8010n54Pqc\"));\n\n//\t\t\tSystem.out.println(SecurityUtils.decrypt(\"TQyLtHx1F5RJutb0qLIRRP0CiBz4Hg/2C5CXlivUQqfBFhCR43XLs9/u4FjxCvncCmyQSadR8dIxOY2iQWzL7bxy1pqZ7gX+Qcb78n2NVXQZmhNAkyDKsLrHZ6IZ3tIw5GKJ6oBcOnDCf3CcGAL0lPAMNbODZipFyIXv4oeK8FE=\"));\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}", "@Test\r\n public void testEncrypt()\r\n {\r\n System.out.println(\"encrypt\");\r\n String input = \"Hello how are you?\";\r\n KeyMaker km = new KeyMaker();\r\n SecretKeySpec sks = new SecretKeySpec(km.makeKeyDriver(\"myPassword\"), \"AES\");\r\n EncyptDecrypt instance = new EncyptDecrypt();\r\n String expResult = \"0fqylTncsgycZJQ+J5pS7v6/fj8M/fz4bavB/SnIBOQ=\";\r\n String result = instance.encrypt(input, sks);\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void testAesEncryptForInputKey() throws Exception {\n byte[] key = Cryptos.generateAesKey();\n String input = \"foo message\";\n\n byte[] encryptResult = Cryptos.aesEncrypt(input.getBytes(\"UTF-8\"), key);\n String descryptResult = Cryptos.aesDecrypt(encryptResult, key);\n\n System.out.println(key);\n System.out.println(descryptResult);\n }", "public static void main(String[] args) throws GeneralSecurityException {\n\t\tGCMParameterSpec myParams = new GCMParameterSpec(0, null);\r\n\t\tCipher c = Cipher.getInstance(\"DES/EBS/NoPadding\"); // original AES/GCM/NoPadding\r\n\t\tc.init(Cipher.ENCRYPT_MODE, myKey, myParams);\r\n\t\tKeyGenerator keyGenerator = KeyGenerator.getInstance(\"AES\");\r\n\r\n\t\tSecureRandom secureRandom = new SecureRandom();\r\n\t\tint keyBitSize = 64; //original 256\r\n\t\tkeyGenerator.init(keyBitSize, secureRandom);\r\n\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tSecretKey secretKey = keyGenerator.generateKey();\r\n\t\t\r\n\t}", "public static void main(String args []) throws Exception\n {\n decryptor myEncryptor= new decryptor();\n \n String stringToEncrypt=\"Sanjaal.com\";\n String encrypted=myEncryptor.encrypt(stringToEncrypt);\n String enctptor=\"qsYVyDFK624cSomY9Ob9lw==\";\n String decrypted=myEncryptor.decrypt(enctptor);\n \n System.out.println(\"String To Encrypt: \"+stringToEncrypt);\n System.out.println(\"Encrypted Value :\" + encrypted);\n System.out.println(\"Decrypted Value :\"+decrypted);\n \n }", "public static void main(String[] args) throws FileNotFoundException, NullPointerException{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.print(\"Date Encryption:\\n\\tMessage: \");\n\t\tString message = RunLengthEncoding.encodeRLE8(scanner.nextLine(), RunLengthEncoding.Encode.Binary);\n\t\tSystem.out.print( \"\\tKey: \");\n\t\tString key = scanner.nextLine();\n\t\tscanner.close();\n\t\t\n\t\tSystem.out.print(\"\\nBitMessage:\\t\\t\" + message);\n\t\tSystem.out.print(\"\\nKeyMessage:\\t\\t\" + TextToBinary(key));\n\t\t\n\t\tmessage = encrypt(message, key);\n\t\tSystem.out.println(\"\\nEncryptedMessage:\\t\" + message);\n\n\t\tFileHandler.createFile(\"data/encrypted\");\n\t\tFileHandler.writeFile(\"data/encrypted\", message);\n\n\t\tSystem.out.println(\"\\n\" + RunLengthEncoding.decodeRLE8(encrypt(FileHandler.getStrings(\"data/encrypted\"), key), RunLengthEncoding.Encode.Binary));\n\t}", "public static void main(String[] args){\n\t\tRSA rsa = new RSA();\n\t\tString msg = \"hi there\";\n\t\tbyte [] code = rsa.encrypt(msg, rsa.publicKey);\n\t\tSystem.out.println(code.toString());\n\t\tSystem.out.println(rsa.decrypt(code, rsa.privateKey));\n\t}", "public static void main(String[] args) {\n\n\t\tif (args.length != 2 && args.length != 3) {\n\t\t\tSystem.out.println(\"Wrong number of command line arguments!\");\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (args[0]) {\n\t\t// Do message digest\n\t\tcase \"checksha\":\n\t\t\tcheckCmdArgs(2, args);\n\t\t\tchecksha(args[1]);\n\t\t\tbreak;\n\n\t\t// Do encrypting or decrypting\n\t\tcase \"encrypt\":\n\t\tcase \"decrypt\":\n\t\t\tcheckCmdArgs(3, args);\n\t\t\tencrypt = args[0].equals(\"encrypt\");\n\n\t\t\tcrypto(args[1], args[2]);\n\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tSystem.out.println(\"No such command is supported!\");\n\t\t\treturn;\n\t\t}\n\n\t}", "public static void main(String[] args)\n {\n\n CaesarCipherTwo cipher = new CaesarCipherTwo( 14, 24);\n //String encrypt = cipher.encrypt(message);\n //System.out.println(\"Encrypted message: \" + encrypt);\n System.out.println();\n String decrypt = cipher.decrypt(\"Hfs cpwewloj loks cd Hoto kyg Cyy.\");\n System.out.println(\"Decrypted message: \" + decrypt);\n\n }", "public static void main(String[] args) {\n\t\tScanner inScanner=new Scanner(System.in);\n\t\tSystem.out.println(\"请输入密钥(小写):\");\n\t\tString keyString=inScanner.next();\n\t\tSystem.out.println(\"请输入明文(小写):\");\n\t\tString plaintextString=inScanner.next();\n\t\tPermutation permutation=new Permutation(keyString.toCharArray());\n\t\tString ciphertext=permutation.encipher(plaintextString.toCharArray());\n\t\tSystem.out.println(\"----------列变换后的密文--------\");\n\t\tSystem.out.println(ciphertext);\n\t\t \n\t\t \n\t}", "public static void main(String[] args) {\n cipherExample();\n //ticketExample();\n }", "public static void main(String... args) throws Exception {\n String password = CipherFactory.KEYSTORE_PASSWORD;\n KeyStore store = CipherFactory.getKeyStore(password);\n printKeystore(store, password);\n }", "@Test\n public void testAesForInputKeyMode() throws Exception {\n//TODO: Test goes here... \n/* \ntry { \n Method method = Cryptos.getClass().getMethod(\"aes\", byte[].class, byte[].class, int.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/\n }", "public static void main(String[] args) {\n\n\t\tString message = \"\";\n\t\tbyte[] messageBytes;\n\t\tbyte[] tempPub = null;\n\t\tString sPub = null;\n\t\tbyte[] ciphertextBytes = null;\n\t\tbyte[] textBytes = null;\n\n\t\ttry {\n\n\t\t\t// The source of randomness\n\t\t\tSecureRandom secureRandom = new SecureRandom();\n\n\t\t\t// Obtain a RSA Cipher Object\n\t\t\tCipher cipher = Cipher.getInstance(\"RSA/ECB/PKCS1Padding\");\n\n\t\t\t// Loading certificate file \n\t\t\tString certFile = ResourceReader.readFileToString(\"classpath:softsolution.txt\").trim();\n\t\t\tInputStream inStream = new ByteArrayInputStream(certFile.getBytes());\n\t\t\tCertificateFactory cf = CertificateFactory.getInstance(\"X.509\");\n\t\t\tX509Certificate cert = (X509Certificate) cf.generateCertificate(inStream);\n\t\t\tinStream.close();\n\n\t\t\t// Read the public key from certificate file\n\t\t\tRSAPublicKey pubkey = (RSAPublicKey) cert.getPublicKey();\n\t\t\ttempPub = pubkey.getEncoded();\n\t\t\tsPub = new String(tempPub);\n\t\t\tlog.info(\"Public key from certificate file:\\n\" + hex(sPub) + \"\\n\");\n\t\t\tlog.info(\"Public Key Algorithm = \" + cert.getPublicKey().getAlgorithm() + \"\\n\");\n\n\t\t\t// Set plain message\n\t\t\tmessage = \"{\\r\\n\" +\n\t\t\t\t\t\"\\\"merchantId\\\":\\\"109618\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"subMerchantId\\\":\\\"12234\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"terminalId\\\":\\\"5411\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"merchantName\\\":\\\"test stores\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"subMerchantName\\\":\\\"sub_ test stores\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"payerVa\\\":\\\"testother2@icici\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"amount\\\":\\\"5.00\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"note\\\":\\\"collect-pay-request\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"collectByDate\\\":\\\"10/04/2018 11:01 AM\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"merchantTranId\\\":\\\"6124114576893\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"billNumber\\\":\\\"SDF234278\\\"\\r\\n\" +\n\t\t\t\t\t\"}\\r\\n\" +\n\t\t\t\t\t\"\";\n\t\t\tmessageBytes = message.getBytes();\n\t\t\tlog.info(\"Plain message:\\n\" + message + \"\\n\");\n\n\t\t\t// Initialize the cipher for encryption\n\t\t\tcipher.init(Cipher.ENCRYPT_MODE, pubkey, secureRandom);\n\n\t\t\t// Encrypt the message\n\t\t\tciphertextBytes = cipher.doFinal(messageBytes);\n\t\t\tlog.info(\"Message encrypted with certificate file public key:\\n\" + new String(org.bouncycastle.util.encoders.Base64.encode(ciphertextBytes)) + \"\\n\");\n\t\t\tString msg=new String(org.bouncycastle.util.encoders.Base64.encode(ciphertextBytes));\n\t\t\tlog.info(\"Decoded Message encrypted with certificate file public key:\\n\" +msg + \"\\n\");\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// Loading private key file \n\t\t\tString keyFile = ResourceReader.readFileToString(\"classpath:softsolution.pem\").trim();\n\t\t\tinStream = new ByteArrayInputStream(keyFile.getBytes());\n\t\t\tbyte[] encKey = new byte[inStream.available()];\n\t\t\tinStream.read(encKey);\n\t\t\tinStream.close();\n\t\t\tString pvtKey = new String(encKey);\n\n\n\t\t\tpvtKey = pvtKey.replaceAll(\"\\\\n\", \"\").replace(\"-----BEGIN PRIVATE KEY-----\", \"\").replace(\"-----END PRIVATE KEY-----\", \"\");\n\n\n\t\t\tlog.info(pvtKey);\n\t\t\t// Read the private key from file\n\t\t\tlog.info(\"RSA PrivateKeyInfo: \" + encKey.length + \" bytes\\n\");\n\t\t\t// PKCS8EncodedKeySpec privKeySpec=new PKCS8EncodedKeySpec(Base64.getDecoder().decode(encKey));//new PKCS8EncodedKeySpec(encKey);\n\t\t\tPKCS8EncodedKeySpec privKeySpec = new PKCS8EncodedKeySpec(Base64.getDecoder().decode(pvtKey));\n\t\t\tKeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n\t\t\tlog.info(\"KeyFactory Object Info:\");\n\t\t\tlog.info(\"Algorithm = \" + keyFactory.getAlgorithm());\n\t\t\tlog.info(\"Provider = \" + keyFactory.getProvider());\n\t\t\tPrivateKey priv = (RSAPrivateKey) keyFactory.generatePrivate(privKeySpec);\n\t\t\tlog.info(\"Loaded \" + priv.getAlgorithm() + \" \" + priv.getFormat() + \" private key.\");\n\n\n\t\t\t// Initialize the cipher for decryption\n\t\t\tcipher.init(Cipher.DECRYPT_MODE, priv, secureRandom);\n\n\n\n\t\t\t// Decrypt the message\n\t\t\t//\ttextBytes = cipher.doFinal(ciphertextBytes);\n\t\t\tbyte[] cipherByte = org.bouncycastle.util.encoders.Base64.decode(msg.getBytes(\"UTF-8\"));\n\t\t\tlog.info(cipherByte);\n\n\t\t\tString op = new String(cipher.doFinal(cipherByte));\n\t\t\t// String s = new String(textBytes);\n\t\t\tlog.info(\"Message decrypted with file private key:\\n\");\n\t\t\tlog.info(op);\n\n\t\t} catch (IOException e) {\n\t\t\tlog.info(\"IOException:\" + e);\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\tlog.info(\"Exception:\" + e);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test\n\tpublic void doEncrypt() {\n\t\tString src = \"18903193260\";\n\t\tString des = \"9oytDznWiJfLkOQspiKRtQ==\";\n\t\tAssert.assertEquals(Encryptor.getEncryptedString(KEY, src), des);\n\n\t\t/* Encrypt some plain texts */\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"18963144219\");\n\t\tlist.add(\"13331673185\");\n\t\tlist.add(\"18914027730\");\n\t\tlist.add(\"13353260117\");\n\t\tlist.add(\"13370052053\");\n\t\tlist.add(\"18192080531\");\n\t\tlist.add(\"18066874640\");\n\t\tlist.add(\"15357963496\");\n\t\tlist.add(\"13337179174\");\n\t\tfor (String str : list) {\n\t\t\tSystem.out.println(Encryptor.getEncryptedString(KEY, str));\n\t\t}\n\t}", "public static void main(String[] args) throws IOException, InvalidKeyException, NoSuchAlgorithmException\n\t{\n\t\tStringBuffer response = new StringBuffer();\n\t\tSystem.out.println(\"key: \" + args[0]);\n\t\tSystem.out.println(\"secret: \" + args[1]);\n\t\tsetup_request(cubits_url, \"/api/v1/test\", args[0], args[1]);\n\t\tString inputLine;\n\t\tBufferedReader in;\n\t\ttry{\n\t\t\tin = new BufferedReader(\n\t\t\t new InputStreamReader(con.getInputStream()));\n\t\t} catch(Exception e) {\n\t\t\tin = new BufferedReader(\n\t\t\t new InputStreamReader(con.getErrorStream()));\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t}\n\n\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\tresponse.append(inputLine);\n\t\t}\n\t\tin.close();\n\n\t\tint responseCode = con.getResponseCode();\n\t\tSystem.out.println(\"Response Code : \" + responseCode);\n\n\t\t//print result\n\t\tSystem.out.println(response.toString());\n\t}", "public static void main(String[] args) {\n\t\tBCryptPasswordEncoder encoder = new BCryptPasswordEncoder();\n\t\tString encodedPassword =encoder.encode(\"pass1234\");\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the key:\");\n\t\tString input = sc.nextLine();\n\t\t// condition to check whether the input length is 32 or not\n\t\tif (input.length() == 32) {\n\t\t\taescipher.aesRoundKeys(input);\n\t\t\t// closes the scanner\n\t\t\tsc.close();\n\t\t} else {\n\t\t\tSystem.out.println(\"Input length is not 32\");\n\t\t}\n\t}", "public static void main(String[] args) {\n System.out.println(decryptFunction());\n //decryptFunction();\n\n }", "public static void main(String[] args) {\n\t\n\tFileEncryptor enc = new FileEncryptor();\n\tString use = enc.Encyrpt();String ans = \"\";\n\tfor(int i = 0; i<use.length();i++) {\n\t\tchar c = use.charAt(i);\n\t\tc--;\n\t\t\n\t\t ans +=c;\n\t\n\t}\tSystem.out.println(ans);\n}", "@Test\n public void testEncrypt() throws Exception {\n System.out.println(\"encrypt\");\n String seed = \"\";\n String cleartext = \"\";\n String expResult = \"\";\n String result = Crypto.encrypt(seed, cleartext);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(encrypt(\"What is the title of your book?\"));\n\t\tSystem.out.println(octalEquivalent(19));\n\n\t}", "public static void main(String[] args) throws Exception {\n \t\t\n \t\tSystem.out.println(new String(RSAdecryptByPublicKey(\"9ff782468e12e04a0229f0b2846c09eggo\".getBytes(), \n \t\t\t\t\"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDP8ig8yOrDyWDIisI2ra8PTe7fS086nVG3t2vMTlueb7xwqUmeSvirQxvSYeRSpWBHfaUTBWgsrCgA0cSKFyJJvPOABIEORycYhSVqrPqYtbbqdyxKqC56km6viXTQqmSjco133MDuzWeQjGXneR24wzxTZc2dgy/TlZr06miJAwIDAQAB\")));\n\t}", "public static void main(String[] args) throws Exception{\n Key chave;\r\n //Ler a chave do arquivo Chave.key\r\n ObjectInputStream in = \r\n new ObjectInputStream(new FileInputStream(\"Chave.key\"));\r\n chave = (Key)in.readObject();\r\n in.close(); \r\n //Definir qual cifra será usada (DES)\r\n Cipher cipher = Cipher.getInstance(\"DES/ECB/PKCS5Padding\");\r\n cipher.init(Cipher.ENCRYPT_MODE, chave);\r\n \r\n System.out.println(\"Digite uma mensagem a ser cifrada: \");\r\n String mensagem = new java.util.Scanner(System.in).nextLine();\r\n \r\n byte[] bytesMensagem = mensagem.getBytes(\"UTF8\");\r\n \r\n byte[] dadosCifrados = cipher.doFinal(bytesMensagem);\r\n \r\n System.out.println(new String(dadosCifrados));\r\n }", "public void jiemi(String pathin, String pathout) {\n\t\ttry {\n\t\t\tRuntime.getRuntime().exec(new String[]{\"openssl\",\"enc\", \"-d\",\"-aes-128-cbc\", \"-in\",pathin,\"-out\",pathout,\"-k\",\"123abc\"});\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tSystem.out.println(\"-------------------jiemi end------------------------\");\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public static void main(String[] args) \r\n {\n String message1 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n System.out.println(encrypt (message1, 3));\r\n System.out.println(decrypt (encrypt(message1,3) ,3));\r\n System.out.println(encrypt(message1.toLowerCase(),5));\r\n \r\n System.out.println(decrypt(encrypt(message1.toLowerCase() ,5 ) ,5));\r\n }", "@Test\r\n\tpublic void testSimple() throws IOException, URISyntaxException, IllegalKeyException{\r\n\t\tbyte data [] = {97,98,99,100};\r\n\t\tbyte [] keys = {50};\r\n\t\tEncryptionDecryptionManager man = new AlgoritemManaging();\r\n\t\tCaesarEncryption ce = new CaesarEncryption(man);\r\n\t\tbyte[] encData = ce.Encrypt(keys,data);\r\n\t\t\r\n\t\tCaesarDecryption c = new CaesarDecryption(man);\r\n\t\tbyte[] decData = c.Decrypt(keys,encData);\r\n\t\tassert decData [0] == (byte)(97);\r\n\t\tassert decData [1] == (byte)(98);\r\n\t\tassert decData [2] == (byte)(99);\r\n\t\tassert decData [3] == (byte)(100);\r\n\t}", "public static void main(final String[] args) throws Exception {\n Security.addProvider(new BouncyCastleProvider());\n\n // --- setup key pair (generated in advance)\n final String passphrase = \"owlstead\";\n final KeyPair kp = generateRSAKeyPair(1024);\n final RSAPublicKey rsaPublicKey = (RSAPublicKey) kp.getPublic();\n final RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) kp.getPrivate();\n\n // --- encode and wrap\n byte[] x509EncodedRSAPublicKey = encodeRSAPublicKey(rsaPublicKey);\n final byte[] saltedAndEncryptedPrivate = wrapRSAPrivateKey(\n passphrase, rsaPrivateKey);\n\n // --- decode and unwrap\n final RSAPublicKey retrievedRSAPublicKey = decodeRSAPublicKey(x509EncodedRSAPublicKey);\n final RSAPrivateKey retrievedRSAPrivateKey = unwrapRSAPrivateKey(passphrase,\n saltedAndEncryptedPrivate);\n\n // --- check result\n System.out.println(retrievedRSAPublicKey);\n System.out.println(retrievedRSAPrivateKey);\n }", "@Test\n public void testAesDecryptForInputKey() throws Exception {\n//TODO: Test goes here... \n }", "public static void main(String[] args) throws Exception{\n\t\tString pass = \"Difficult@5658\";\n\t\tSystem.out.println(new BCryptPasswordEncoder(12).encode(pass));\n\t}", "public static void main(String[] args) {\n String url = \"jdbc:jtds:sqlserver://localhost:1433/DatabaseName=lib4;charset=Chinese_PRC_CS_AI;\";\n\n String eUrl = DESUtil.getEncryptString(url);\n\n System.out.println(eUrl);\n\n String user = \"sa\";\n\n String eUser = DESUtil.getEncryptString(user);\n\n System.out.println(eUser);\n\n String password = \"GHadmin1234\";\n\n String ePass = DESUtil.getEncryptString(password);\n\n System.out.println(ePass);\n\n\n\n\n\n }", "public static void main(String[] args) {\n int chave = 24;\n String cript = SDES.encrypt(\"Estou seguro!\", chave);\n String decript = SDES.decrypt(cript, chave);\n System.out.println(\"Mensagem Criptografada:\");\n System.out.println(cript);\n System.out.println(\"Mensagem Descriptografada:\");\n System.out.println(decript);\n }", "public static void main1(String[] args) {\n\t\tTest t=new Test();\r\n\t\tSystem.out.println(t.genTok());\r\n\t\tSystem.out.println(t.genPwd());\r\n\t\tSystem.out.println(t.genericEncode(\"sreedhar\"));\r\n\t}", "Encryption encryption();", "@Test public void useAppContext() throws Exception {\n Endecrypt test = new Endecrypt();\r\n String oldString = \"lingyang1218yj@\";\r\n System.out.println(\"1、SPKEY为: \" + SPKEY);\r\n System.out.println(\"2、明文密码为: \" + oldString);\r\n String reValue = test.get3DESEncrypt(oldString, SPKEY);\r\n reValue = reValue.trim().intern();\r\n System.out.println(\"3、进行3-DES加密后的内容: \" + reValue);\r\n String reValue2 = test.get3DESDecrypt(reValue, SPKEY);\r\n System.out.println(\"4、进行3-DES解密后的内容: \" + reValue2);\r\n }", "@Test\n public void testDesEncrypt() {\n\n }", "public static void main(String[] args) {\n\t\tDesFunctionClass obj=new DesFunctionClass();\n\n\t\tScanner chscanner =new Scanner(System.in);\t\t\n\n\t\twhile(flag){\n\t\t\tSystem.out.println(\"\\n===============================================================\\n 1.ENCRYPT a file \\t 2.DECRYPT a file \\t 3.Exit Program\\n===============================================================\");\n\t\t \tSystem.out.println(\"Enter Your Choice:\\t\");\n\t\t \t\tif(chscanner.hasNextInt())\n\t\t\t \tch=chscanner.nextInt();\n\t\t \tswitch(ch)\n\t\t \t{\n\t\t \tcase 1:\n\t\t \t\t//Checks infinitely for valid file type.\n\t\t \t\tdo {\n\t\t \t\tSystem.out.println(\"Enter Name of the File to be Encrypted(include path if outside):\");\n\t\t\t\t\tfilename=chscanner.next();\n\t\t\t\t\tfilename=filename.replaceAll(\"\\\\\\\\\", \"/\");\t\t//for windows dir scheme\n\t\t\t\t\tchk= HelperFunctions.check(filename);\n\t\t\t\t\t}while(chk!=1);\n\n\t\t \t\t//Checks for valid Directory type to store encrypted file.\n\t\t\t\t\tdo {\n\t\t\t\t\tSystem.out.println(\"Enter Name of Directory to store Encrypted file:\");\n\t\t\t\t\tdirname=chscanner.next();\n\t\t\t\t\tdirname=dirname.replaceAll(\"\\\\\\\\\", \"/\");\n\t\t\t\t\tchk= HelperFunctions.check(dirname);\n\t\t\t\t\t}while(chk!=2);\n\n\t\t\t\t\t//Takes Valid private input key of size>10\n\t\t\t\t\tdo{\n\t\t\t\t\tSystem.out.println(\"Enter Your Private Key (length>10):)\");\n\t\t\t\t\tDESKEY=chscanner.nextLine();\n\t\t\t\t\tif(DESKEY.length()<10)\n\t\t\t\t\t\tSystem.out.println(\"\\t\\t--Private Key Size should be > 10!--\");\n\t\t\t\t\t}while(DESKEY.length()<10);\n\t\t\t\t\n\t\t\t\t\tDESKEY= HelperFunctions.KeyGen(DESKEY);//generating random key from input key.\n\n\t\t\t\t\tBigInteger k=new BigInteger(DESKEY);\t//convert key from string type to BigInteger type\n\t\t\t\t\tBigInteger RSAKEY=RsaFunctionClass.EncDec(k, RsaFunctionClass.e,RsaFunctionClass.n);\t//RSA-Encryption of the DES-key\n\t\t\t\t\tString keyloc=RsaFunctionClass.WriteEncKey(RSAKEY, dirname, filename);\t//write encrypted key to file for further use\n\t\t\t\t\n\t\t\t\t\t//Encrypting the File using DESKEY and DES algorithm.\n\t\t\t\t\tobj.encrypt(filename,dirname,DESKEY);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"\\nFile ENCRYPTED Successfully, Stored at\"+\"'\"+dirname+\"'\");\n\t\t\t\t\tSystem.out.println(\"ATTENTION! NOW Your Encrypted Private Key is:\"+RSAKEY+\"\\n\\tIt is Saved for You at '\"+keyloc+\"'\");\n\t\t \t\tbreak;\n\t\t \t\n\t\t \tcase 2:\n\t\t\t\t\t//Checks infinitely for valid file type.\n\t\t \t\tdo{\n\t\t\t\t\t\tSystem.out.println(\"Enter Name of the Encrypted File that is to be Decrypted(include path if outside):\");\n\t\t\t\t\t\tfilename=chscanner.next();\n\t\t\t\t\t\tfilename=filename.replaceAll(\"\\\\\\\\\", \"/\");\n\t\t\t\t\t\tchk= HelperFunctions.check(filename);\n\t\t\t\t\t\t}while(chk!=1);\n\n\t\t\t\t\t//Get Original Extension for Decryption\n\t\t\t\t\tSystem.out.println(\"Enter EXTENSION to which file is to be Decrypted(e.g txt,pdf,jpg,mp3,mp4,etc):\");\n\t\t\t\t\tString extname = chscanner.next();\n\t\t\t\t\textname=extname.substring(extname.lastIndexOf(\".\") + 1);\t//if user provided a '.' with extension\n\n\t\t\t\t\t//Checks for valid Directory type to store decrypted file.\n\t\t\t\t\tdo{\n\t\t\t\t\t\tSystem.out.println(\"Enter Name of Directory where Decrypted file will be Stored:\");\n\t\t\t\t\t\tdirname=chscanner.next();\n\t\t\t\t\t\tdirname=dirname.replaceAll(\"\\\\\\\\\", \"/\");\n\t\t\t\t\t\tchk= HelperFunctions.check(dirname);\n\t\t\t\t\t}while(chk!=2);\n\t\t\t\t\n\t\t\t\t\tString regex = \"[0-9]+\";//Regular Expression for string to make sure key contains only numbers\n\n\t\t\t\t\tdo{\n\t\t\t\t\t\tSystem.out.println(\"Enter Your Encrypted Private Key of the file:\");\n\t\t\t\t\t\tDESKEY=chscanner.next();\n\t\t\t\t\t\tif(DESKEY.length()<500||!(DESKEY.matches(regex)))\n\t\t\t\t\t\t\tSystem.out.println(\"\\t\\t--Encrypted-Key Size must be > 500 and Must only contain Numeric Values!\");\n\t\t\t\t\t}while((DESKEY.length()<500)||!(DESKEY.matches(regex)));\n\t\t\t\t\n\t\t\t\t\tBigInteger c=new BigInteger(DESKEY);//convert to BI\n\t\t\t\t\tBigInteger Deckey=RsaFunctionClass.EncDec(c, RsaFunctionClass.d,RsaFunctionClass.n);\t//UNHANDLED>> make regex seq for key in EncDec fxn\n\t\t\t\t\tDESKEY=Deckey.toString();\n\t\t\t\t\n\t\t\t\t\tobj.decrypt(filename,extname,dirname,DESKEY);\n\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"\\nFile DECRYPTED Successfully,' Stored at \"+\"'\"+dirname+\"'\");\n\t \t\t\tbreak;\n\t\t \t\t\n\t \t\t\tcase 3:\n\t\t \t\t\tflag=false;\n\t\t \t\t\tSystem.out.println(\"Good Bye!\");\n\t\t \t\t\tchscanner.close();\n\t\t \t\t\tbreak;\n\t\t \t\t\t\n\t\t\t\tdefault:\n\t \t\t\t\tSystem.out.println(\"No Such Option... Try Again!\");\n\t\t \t}\t\n\t\t}\t\n\t}", "public static void main(String args[]) {\n\t\tif(args.length == 0){\r\n\t\t\tpromptUser();//method that takes in the arguments by prompting the user\r\n\t\t}\r\n\t\telse{\r\n\t\t\topensslRunner(args);//if user is completely familiar with this program and includes proper arguments, it will just run automatically\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tPassword p = new Password();\n\t\tString epassword = \"ff6b6db0b2f4506c074343f20805a39ca856bf3a\";\n\t\tString passText = \"123456\";\n\t\tString id = \"371328198106084016\";\n\t\tString salt = p.getSalt(id);\n\t\tString sp = p.getPassphrase(salt, passText);\n\t\tSystem.out.println(\"salt : +\" + salt +\" passphrase: \"+sp);\n\t\tSystem.out.println(p.matchPassphrase(sp, salt, passText) + \"--------------- for real :\");\n\t\tsalt =\"SjZ1MmwxIDIzMiw2IDEyOTA5MTE1MSAxNDE6ODE2NjEgM1A4TQ==\";\n\t\tsp = \"11895b3270e3fd9038252d4fd45400b6fa30de4f\";\n\t\tSystem.out.println(p.matchPassphrase(sp, salt, \"123456\"));\n\t}", "@Test\n public void testEncryptDecrypt3() throws InvalidCipherTextException {\n\n // password generation using KDF\n String password = \"Aa1234567890#\";\n byte[] kdf = Password.generateKeyDerivation(password.getBytes(), 32);\n\n byte[] plain = \"0123456789\".getBytes();\n byte[] plainBytes = new byte[100000000];\n for (int i = 0; i < plainBytes.length / plain.length; i++) {\n System.arraycopy(plain, 0, plainBytes, i * plain.length, plain.length);\n }\n\n byte[] encData = AESEncrypt.encrypt(plainBytes, kdf);\n byte[] plainData = AESEncrypt.decrypt(encData, kdf);\n\n assertArrayEquals(plainBytes, plainData);\n\n }", "public static void main(String[] args) {\n\n\t\tSystem.out.println(decreaptChar('z'));\n\t\tSystem.out.println(decreaptChar('m'));\n\t\tString normal = \"kgb\";\n\t\tString encripted = decriptWord(normal);\n\t\tSystem.out.println(\"normal: \" + normal);\n\t\tSystem.out.println(\"encreapted; \" + encripted);\n\t\tSystem.out.println(decryptSentence(\"r olev qzez\"));\n\t\tSystem.out.println(decryptSentence(\"qzez rh ufm\"));\n\t\tSystem.out.println(decryptSentence(\"dv ziv hgfwvmgh lu xbyvigvp hxsllo\"));\n\t\tSystem.out.println(decryptSentence(\"szev z tllw wzb\"));\n\t\tSystem.out.println(decryptSentence(\"ovgh tl slnv\"));\n\t\tSystem.out.println(decriptWord(\"nrihslw\"));\n\t\tSystem.out.println(decryptSentence(\"dllwvm hkllm\"));\n\t\t\n\t}", "public static void main(String[] args) {\n File meKeystoreFile = null;\n\n if (args.length == 0) {\n System.out.println(\"\\n Error: No command given\");\n displayUsage();\n System.exit(-1);\n }\n\n if (args[0].equals(\"-help\")) {\n // user just needs help with the arguments\n displayUsage();\n System.exit(0);\n }\n\n\n // start with the default keystore file\n String defaultMeKeystore = \n System.getProperty(DEFAULT_MEKEYSTORE_PROPERTY);\n if (defaultMeKeystore != null) {\n meKeystoreFile = new File(defaultMeKeystore);\n } else {\n meKeystoreFile = new File(defaultAppDir, defaultKeystoreFilename);\n }\n\n try {\n if (args[0].equals(\"-import\")) {\n importCommand(meKeystoreFile, args);\n System.exit(0);\n }\n \n if (args[0].equals(\"-delete\")) {\n deleteCommand(meKeystoreFile, args);\n System.exit(0);\n }\n\n if (args[0].equals(\"-list\")) {\n listCommand(meKeystoreFile, args);\n System.exit(0);\n }\n\n throw new UsageException(\" Invalid command: \" + args[0]);\n } catch (Exception e) {\n System.out.println(\"\\n Error: \" + e.getMessage());\n\n if (e instanceof UsageException) {\n displayUsage();\n }\n\n System.exit(-1);\n }\n }", "public static void main (String args[]) {\n System.out.println(\"PDF document encryptor\");\n if (args.length <= STRENGTH || args[PERMISSIONS].length() != 8) {\n usage();\n return;\n }\n try {\n int permissions = 0;\n String p = args[PERMISSIONS];\n for (int k = 0; k < p.length(); ++k) {\n permissions |= (p.charAt(k) == '0' ? 0 : permit[k]);\n }\n System.out.println(\"Reading \" + args[INPUT_FILE]);\n PdfReader reader = new PdfReader(args[INPUT_FILE]);\n System.out.println(\"Writing \" + args[OUTPUT_FILE]);\n HashMap moreInfo = new HashMap();\n for (int k = MOREINFO; k < args.length - 1; k += 2)\n moreInfo.put(args[k], args[k + 1]);\n PdfEncryptor.encrypt(reader, new FileOutputStream(args[OUTPUT_FILE]),\n args[USER_PASSWORD].getBytes(), args[OWNER_PASSWORD].getBytes(), permissions, args[STRENGTH].equals(\"128\"), moreInfo);\n System.out.println(\"Done.\");\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void main (String args[]) throws IOException, ParseException {\n Task_5_1.printCiphertext();\n }", "@Test\n public void testAesForInputKeyIvMode() throws Exception {\n//TODO: Test goes here... \n/* \ntry { \n Method method = Cryptos.getClass().getMethod(\"aes\", byte[].class, byte[].class, byte[].class, int.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/\n }", "@Test\n public void testAesEncryptForInputKeyIv() throws Exception {\n//TODO: Test goes here... \n }", "public static void main(String[] args) {\n\t\t\r\n\t\tnew KeyAdapterExample();\r\n\r\n\t}", "@Test\r\n public void testEncryptDecryptPlaintext() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"Hola caracola\".getBytes();\r\n byte[] add = \"Random authenticated additional data\".getBytes();\r\n\r\n CryptoService instance = new CryptoService();\r\n Keys keys = instance.createKeys(null);\r\n CryptoDetached result = instance.encryptPlaintext(data, add, keys);\r\n String message = instance.decryptPlaintext(result, add, keys);\r\n assertEquals(message, \"Hola caracola\");\r\n }", "public static void main(String[] args) throws GeneralSecurityException, IOException {\n\n byte[] key = new byte[16];\n\n byte[] iv = new byte[32];\n\n\n Properties properties = new Properties();\n\n properties.put(CryptoRandomFactory.CLASSES_KEY,\n\n CryptoRandomFactory.RandomProvider.OPENSSL.getClassName());\n\n\n // Gets the 'CryptoRandom' instance.\n\n try (CryptoRandom random = CryptoRandomFactory.getCryptoRandom(properties)) {\n\n\n // Show the actual class (may be different from the one requested)\n\n System.out.println(random.getClass().getCanonicalName());\n\n\n // Generate random bytes and places them into the byte arrays.\n\n random.nextBytes(key);\n\n random.nextBytes(iv);\n\n\n }\n\n\n // Show the generated output\n\n System.out.println(Arrays.toString(key));\n\n System.out.println(Arrays.toString(iv));\n\n }", "public static void main(String[] args) {\n\t\tString privateSalt = \"iam-serverdev\";\r\n\t\tByteSource publicSalt = Util.bytes(\"admin\");\r\n\t\tByteSource salt = Util.bytes(crossCombined(Util.bytes(privateSalt).getBytes(), publicSalt.getBytes()));\r\n\r\n\t\tString[] hashAlgorithms = new String[] { \"MD5\", \"SHA-256\", \"SHA-384\", \"SHA-512\" };\r\n\t\tint size = hashAlgorithms.length;\r\n\t\tlong index = crc32(salt.getBytes()) % size & (size - 1);\r\n\t\tString algorithm = hashAlgorithms[(int) index];\r\n\t\tint hashIterations = (int) (Integer.MAX_VALUE % (index + 1)) + 1;\r\n\t\tSystem.out.println(\">>>>>>>>>>\");\r\n\t\tSystem.out.print(new SimpleHash(algorithm, Util.bytes(\"123456\"), salt, hashIterations).toHex());\r\n\t\tSystem.out.print(\"\\n<<<<<<<<<<\");\r\n\t}", "private void run(String [] args) throws Exception {\n if (args.length == 0) {\n usageError(\"No command given\");\n }\n\n command = args[0];\n\n try {\n if (command.equals(\"-addjarsig\")) {\n performAddJarSigCommand(args);\n return;\n }\n\n if (command.equals(\"-addcert\")) {\n performAddCertCommand(args);\n return;\n }\n\n if (command.equals(\"-showcert\")) {\n performShowCertCommand(args);\n return;\n }\n\n if (command.equals(\"-help\")) {\n for (int i = 1; i < args.length; i++) {\n usageError(\"Illegal option for \" + command + \": \" +\n args[i]);\n }\n\n // help exits\n help();\n }\n\n usageError(\"Illegal command: \" + command);\n } finally {\n // zero-out passwords\n if (storepass != null) {\n Arrays.fill(storepass, ' ');\n storepass = null;\n }\n\n if (keypass != null) {\n Arrays.fill(keypass, ' ');\n keypass = null;\n }\n\n try {\n if (outstream != null) {\n outstream.close();\n }\n } catch (IOException ioe) {\n // do nothing. \n }\n }\n }", "@Test\n public void producerEncryptionKeyNameTest() {\n // TODO: test producerEncryptionKeyName\n }", "public static void main(String[] args) \r\n {\r\n /*\r\n String data = \"This is a very important statement.\";\r\n String key = \"How old is my computer?\";\r\n KeyGenerator kGen = new KeyGenerator(key);\r\n String nK = kGen.getNumericKey();\r\n \r\n ArmstrongManager aMgr = new ArmstrongManager(nK);\r\n ColorManager cMgr = new ColorManager(nK);\r\n \r\n String encData =\"\";\r\n int temp;\r\n int i;\r\n for(i =0 ; i < data.length(); i++)\r\n {\r\n temp = aMgr.encrypt(data.charAt(i));\r\n temp = cMgr.encrypt(temp);\r\n encData = encData + (char)temp;\r\n }\r\n \r\n String decData= \"\";\r\n for(i =0 ; i < encData.length(); i++)\r\n {\r\n temp = cMgr.decrypt(encData.charAt(i));\r\n temp = aMgr.decrypt(temp);\r\n \r\n decData = decData + (char)temp;\r\n }\r\n \r\n \r\n System.out.println(\"data: \"+ data + \" \" + data.length());\r\n System.out.println(\"enc data: \"+ encData + \" \" + encData.length());\r\n System.out.println(\"dec data: \"+ decData + \" \" + decData.length());\r\n */\r\n \r\n try\r\n {\r\n //String src = \"d:/a.txt\";//images/kids.jpg\";\r\n //String enc = \"d:/e_a.txt\";//images/e_kids.jpg\";\r\n //String dec = \"d:/d_a.txt\";//images/d_kids.jpg\";\r\n String src = \"d:/images/kids.jpg\";\r\n String enc = \"d:/images/e_kids.jpg\";\r\n String dec = \"d:/images/d_kids.jpg\";\r\n\r\n String key = \"How old is my computer?\";\r\n\r\n Encryptor objEnc = new Encryptor(key);\r\n Decryptor objDec = new Decryptor(key);\r\n\r\n objEnc.encrypt(src, enc);\r\n System.out.println(\"Encryption Done\");\r\n \r\n objDec.decrypt(enc, dec);\r\n System.out.println(\"Decryption Done\");\r\n \r\n\r\n }\r\n catch(Exception ex)\r\n {\r\n System.out.println(\"Err: \" +ex.getMessage());\r\n }\r\n }", "public static void main(String[] args) throws Throwable {\n\t\tCypherFactory cf = CypherFactory.getInstance();\n\t\tCypher c = cf.newCypher(CypherType.Symmetric);\n\n\t\tString message = \"Hello\";\n\n\t\tbyte[] enc = c.encrypt(message.getBytes());\n\t\tSystem.out.println(new String(enc));\n\t\tSystem.out.println(new String(c.decrypt(enc)));\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString recievedMessage = \"Krw\\\"a\\\"lknwgw\\\"kz\\\"Erwjw\\\"zk\\\"Opabwj.\\\"vw\\\"zw\\\"oa\\\"lnkrane\\\"gkiqjegwyefwpw\\\"zwhe\\\"bqjgyekjenw\\\"\\\"\\\"\\\"\\\"\\\"\\\"\";\n\t\tBlockChiper bc = new BlockChiper(recievedMessage,0);\n\t\tSystem.out.println(bc.decrypt(224709026));\n\t\t\n\t\tString replyMessage = \"ej zdravo ivana, se e okej funkcionira gi dobivam porakite, sto znaci deka uspeshno sme go vospostavile dhke protokolot. pozdrav se gledame\";\n\t\tBlockChiper bc1 = new BlockChiper(replyMessage,0);\n\t\tSystem.out.println(bc1.encrypt(224709026));\n\t\t\n\t\t\n\t\t\n\t}", "@Test\r\n public void testDecrypt()\r\n {\r\n System.out.println(\"decrypt\");\r\n String input = \"0fqylTncsgycZJQ+J5pS7v6/fj8M/fz4bavB/SnIBOQ=\";\r\n KeyMaker km = new KeyMaker();\r\n SecretKeySpec sks = new SecretKeySpec(km.makeKeyDriver(\"myPassword\"), \"AES\");\r\n EncyptDecrypt instance = new EncyptDecrypt();\r\n String expResult = \"Hello how are you?\";\r\n String result = instance.decrypt(input, sks);\r\n assertEquals(expResult, result);\r\n }", "public static void main(String[] args)\n throws NoSuchAlgorithmException, InvalidKeyException, SignatureException, UnsupportedEncodingException {\n final String text = \"We would like to provide data integrity.\";\n\n /**\n * STEP 1.\n * We create a public-private key pair.\n * Standard Algorithm Names\n * http://docs.oracle.com/javase/6/docs/technotes/guides/security/StandardNames.html\n */\n final KeyPair key = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n /**\n * Alice creates Signature object defining Signature algorithm.\n */\n final Signature signatureAlg = Signature.getInstance(\"SHA1withRSA\");\n\n /**\n * We initialize the signature object with\n * - Operation modes (SIGN) and\n * - provides appropriate ***Private*** Key\n */\n signatureAlg.initSign(key.getPrivate());\n\n // Finally, we load the message into the signature object and sign it\n signatureAlg.update(text.getBytes(\"UTF-8\"));\n final byte[] signedText = signatureAlg.sign();\n System.out.println(\"Signature: \" + DatatypeConverter.printHexBinary(signedText));\n\n /**\n * To verify the signature, we create another signature object\n * and specify its algorithm\n */\n final Signature signatureAlg2 = Signature.getInstance(\"SHA1withRSA\");\n\n /**\n * We have to initialize it with the mode. But to verify the algorithm,\n * we only need the public key of the original signee\n */\n signatureAlg2.initVerify(key.getPublic());\n\n //Finally, we can check whether the signature is valid\n signatureAlg2.update(text.getBytes(\"UTF-8\"));\n\n if (signatureAlg2.verify(signedText))\n System.out.println(\"Valid signature.\");\n else\n System.err.println(\"Invalid signature.\");\n }", "public static void main(String[] args) throws Exception {\n final ConfigBean configBean = loadConfigFile();\n CsrConfig csrConfig = configBean.getCsr();\n String caName = configBean.getCaname();\n final String username = \"admin\";\n final String password = \"1234\";\n\n final String algo = csrConfig.getKey().getAlgo();\n final String names = csrConfig.getNames();\n final CsrResult result = CsrUtils.genCSR(algo, names);\n final String csr = result.getCsr();\n System.out.println(\"Csr=\" + csr);\n CsrUtils.storeMyPrivateKey(result, username);\n\n final EnrollmentRequest.Builder builder = new EnrollmentRequest.Builder(csr, username, password,\n null, csrConfig, caName);\n final EnrollmentRequest enrollmentRequest = builder.build();\n final Gson gson = new GsonBuilder().disableHtmlEscaping().create();\n final String jsonFile = \"TestData/enroll.json\";\n FileUtils.writeStringToFile(new File(jsonFile), gson.toJson(enrollmentRequest));\n\n final EnrollCommand enrollCommand = new EnrollCommand();\n String[] args1 = new String[]{\"enroll\", \"-h\", \"localhost\", \"-p\", \"8089\", \"-a\", jsonFile};\n enrollCommand.prepare(args1);\n final JsonObject response = enrollCommand.execute();\n System.out.println(response);\n }", "public static void main(String[] args) throws IOException, CryptoException{\n\t\t\n\t\tSocket proxySocket = null;\n\t\tPrintStream out = null;\n\t\tBufferedInputStream in = null;\n\t\t\n\t\ttry{\n\t\t\tproxySocket = new Socket(\"localhost\",2222);\n\t\t\tout = new PrintStream(proxySocket.getOutputStream(),true);\n\t\t\tin = new BufferedInputStream (proxySocket.getInputStream());\n\t\t}catch (UnknownHostException e){\n\t\t\tSystem.err.println(\"Don't know about the host\");\n\t\t\tSystem.exit(1);\n\t\t}catch (IOException e){\n\t\t\tSystem.err.println(\"Couldn't get I/O for the connection\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"connection setup @ main\");\n\t\n\t\tlong starttime = System.currentTimeMillis();\n\t\tkeyRequest(in,out);\n\t\tlong t1 = System.currentTimeMillis();\n\t\tSystem.out.println(\"Keys@Main: \"+N+\" \"+G+\" \"+H);\n\t\tscm = new Scheme(N,G,H);\t// new encryption scheme generated!\n\t\tSystem.out.println(\"Encryption scheme setup!\");\n\n\t\t\n\t\t//mock computation of similarity without l and w paras\n\t\t/*data that should be stored elsewhere in some database*/\n\t\tBigInteger[] dataA = new BigInteger[500];\n\t\tBigInteger[] dataB = new BigInteger[500];\n\t\tfor(int i=0; i<dataA.length;i++)\n\t\t\tdataA[i]=new BigInteger(2,new Random());\n\t\tfor(int i=0; i<dataB.length;i++)\n\t\t\tdataB[i]=new BigInteger(2,new Random());\n\t\tBigInteger[] sqr_dataA = new BigInteger[500];\n\t\tBigInteger[] sqr_dataB = new BigInteger[500];\n\t\tfor(int i=0; i<dataA.length; i++)\n\t\t\tsqr_dataA[i] = dataA[i].modPow(BigInteger.valueOf(2), N);\n\t\tfor(int i=0; i<dataB.length; i++)\n\t\t\tsqr_dataB[i] = dataB[i].modPow(BigInteger.valueOf(2), N);\n\t\tBigInteger[] Numerator,Denominator,d1,d2;\n\t\tint len = 0;\n\t\t//calculate numerator\n\t\tBigInteger[] temp;\n\t\tlen = dataA.length; //to be modified later\n\t\tBigInteger[] p1,p2;\n\t\tp1 = scm.encrypt(dataA[0]);\n\t\tp2 = scm.encrypt(dataB[0]);\n\t\tNumerator = secureMul(p1,p2,in,out);\n\t\tfor(int i = 1;i<len; i++)\n\t\t{\n\t\t\tp1 = scm.encrypt(dataA[0]);\n\t\t\tp2 = scm.encrypt(dataB[0]);\n\t\t\ttemp = secureMul(p1,p2,in,out);\n\t\t\tNumerator = scm.homo_add(temp,Numerator);\n\t\t}\n\t\tSystem.out.println(\"Numerator got!@Main\");\n\t\t//calculate denominator\n\t\td1 = scm.encrypt(sqr_dataA[0]);\n\t\td2 = scm.encrypt(sqr_dataA[1]);\n\t\tfor (int i =1; i<len; i++)\n\t\t{\n\t\t\td1 = scm.homo_add(d1, scm.encrypt(sqr_dataA[i]));\n\t\t\td1 = scm.homo_add(d1, scm.encrypt(sqr_dataB[i]));\n\t\t}\n\t\tDenominator = secureMul(d1,d2,in,out);\n\t\tSystem.out.println(\"Denominator got!@Main\");\n\t\t//calculate similarity\n\t\tBigInteger[] sim =pro_div(Numerator,Denominator,in,out);\n\t\tSystem.out.println(\"Similarity got!@Main \"+sim);\n\t\tlong stoptime = System.currentTimeMillis();\n\t\tlong totaltime = stoptime-starttime;\n\t\tSystem.out.println(\"Total time: \"+ totaltime + \"Key: \"+ (t1-starttime));\n\t\t\t\t\n\t\tSystem.out.println(\"Close connection @Main\");\n\t\tSystem.out.println(\"Send: \"+sent_overhead+\" Receive: \"+receive_overhead);\n\t\tout.close();\n\t\tin.close();\n\t\tproxySocket.close();\n\t}", "public static void main(String[] args) {\n\n String a = TokenProccessor.MD5Pwd(\"admin\", \"123456\");\n System.out.println(a);\n }", "public static void main(String[] args) {\n\n\t\tSinCardPassWordBL tCardPassWordBL = new SinCardPassWordBL();\n\t\tGlobalInput mG = new GlobalInput();\n\t\tmG.ComCode=\"86\";\n\t\tmG.Operator=\"001\";\n\t\tString mStartno=\"86728004110400000004\";\n\t\tString cardnum=\"2\";\n\t\tTransferData mTransferData = new TransferData();\n\t\tmTransferData.setNameAndValue(\"StartNo\", mStartno);\n\t\tmTransferData.setNameAndValue(\"cardNum\", cardnum);\n\t\tVData mData = new VData();\n\t\tmData.add(mG);\n\t\tmData.add(mTransferData);\n\t\tif(!tCardPassWordBL.submitData(mData, \"\"))\n\t\t{\n\t\t\tlogger.debug(\"fail--------\");\n\t\t}\n\t\tlogger.debug(\"end---------\");\n\t\t\n\t}", "public static void main(String[] args) {\n\t\trunSample(KeyType.TKTDES);\n\n\t}", "public static void main(String[] args) throws IcbcApiException {\n\t\tUiIcbcClient client = new UiIcbcClient(APP_ID,IcbcConstants.SIGN_TYPE_RSA,\n\t\t\t\t\"MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAJCoQe/O+uqpOtyE/2CUjD7wosZw8jI1AlLNJCllOmlX+obA6h97b0JsEL0SjMCAR3xJyw7MKLqkcy5qQ/bBgw2XSrodmjzOVqfT1OXRii0xw0HiVkHR4cEWnEAAdfo0lDc4iuzCIQrnT5gM0+U+qeSV6JFfwVRjgYzBdHQRPCf1AgMBAAECgYAdQUoEe7GXH5591o/nMmOinvvscg8pRDsyD7bOgGBtyZMrCXzP3SDFKCHCeyvoColqg2oDlhpulK+OpYMVNlGQcO4eubOJp9MUc3m4A9RxkVr3dsVrmygM5czPfWHAPVQ4dECDruBJn9zoo1ci0myRTh4KSCq6SxpCE0Pbf3j7iQJBAOdMPFRfOkSQ1hsN9Mg4jd9on8r7+mF8gFPhkNI6qvEKw/prmU3obUWvZL42vRlLOQyyB92mBF24PStR/B6CjR8CQQCgGz0VoqCplurSCapGdgX3D7bNSDtMUmaLJYJxih8v+zghP0YtVgDeV3NjogVjOlz8/9Rebo0PoFcqyJnNA1RrAkEAul3dBoasZm7ldWsrXuDiv66HgoDB4Cb3J59Kl3oaHpp0CqUEI5gx48JNRE7K00SfNTGF0Pxh7Dn1X6Bxqwu6NQJADrdyPfLc4bnFi9jnleJzWepP2z6wdKt+UXv5KYaQp1BoMGYohTJKkiVnrdjOtfg/Y+IAG03+GVmbqYsW2AleUQJBANYQklohKtsmq8ptX3as6hjcuXcTpc2DSpVeOnCueNv107+dDJ+K14tbiVYzF3tkHBNMRkGtr6EuGKJ+A63sJ00=\",\n\t\t\t\tIcbcConstants.CHARSET_UTF8,IcbcConstants.ENCRYPT_TYPE_AES, \"xMh0xFsG7G80ziePFdnT8g==\");\n\t\tEaccountManageRequestV1 request = new EaccountManageRequestV1();\t\t\n\t\trequest.setServiceUrl(\"http://122.64.61.111:8081/ui/eaccount/manage/V1\");///\n\t\tEaccountManageRequestBizV1 bizContent = new EaccountManageRequestBizV1();\n\t\tbizContent.setMobileNo(\"13703878410\");//选输,手机号\n\t\tbizContent.setIdcode(\"128440810108044\");//选输,身份证号\n\t\tbizContent.setName(URLEncoder.encode(\"芡悠\"));//选输,用户姓名\n\t\tbizContent.setUserId(\"128440810108044\");//必输,需控制不能为空,用户唯一标识,送身份证号\n\t\tbizContent.setBacAddr(URLEncoder.encode(\"http://www.test.com\"));//选输,回调地址\n\t\tbizContent.setEpayflag(\"0\");//选输,工银e支付标志,0-短信、1-静态密码,集成客户端SDK的方式能送0-短信或1-静态密码,非APP方式只能送0-短信,不送默认为0-短信\n\t\t\n\t\tbizContent.setCorpAppid(APP_ID);//外公司合作方送APP_ID的值,行内应用如e支付等送外公司合作方的APPID\n\t\tlong systime = System.currentTimeMillis(); // 现时间戳\t\t\n\t\tString orderTimeStamp=new Long(systime).toString();\n\t\t\n\t\tSystem.out.println(\"orderTimeStamp:\"+orderTimeStamp);\n\t\tbizContent.setOrderTimeStamp(orderTimeStamp);//生成请求的时间,必输\n\t\t\n\t\tbizContent.setZoneno(\"00200\");//地区号号,选输,5位数字,上送值联系对接分行提供\n\t\tbizContent.setBrno(\"00260\");//网点号,选输,5位数字,上送值联系对接分行提供\n\t\t\n\t\trequest.setBizContent(bizContent);\n\t\tSystem.out.println(client.buildPostForm(request));// 实际调用时的相关返回结果及异常处理,请自行添加\n\t}", "public void encrypt() throws Exception {\n\t\tLogWriter = new BufferedWriter(new FileWriter(localWorkingDirectoryPath + \"\\\\Log_Encryption.txt\"));\n\t\tFileOutputStream configurationFileOutputStream = null;\n\n\t\t// Loading the store with the giving arguments\n\t\twriteToLog(\"Step 1: Loading the store with the giving arguments\");\n\t\tloadStore();\n\n\t\t// Getting the receiver's public-key\n\t\twriteToLog(\"Step 2: Getting the receiver's public-key\");\n\t\tCertificate receiverCert = keyStore.getCertificate(receiverSelfSignedCertAlias);\n\t\tif (receiverCert == null) {\n\t\t\twriteToLog(\"The entered certificate alias: \\\"\" + receiverSelfSignedCertAlias\n\t\t\t\t\t+ \"\\\" dose not exist in the keys store.\");\n\t\t\tLogWriter.close();\n\t\t\tthrow new Exception(\"The entered certificate alias: \\\"\" + receiverSelfSignedCertAlias\n\t\t\t\t\t+ \"\\\" dose not exist in the keys store.\");\n\t\t}\n\t\tPublicKey receiverPublicKey = receiverCert.getPublicKey();\n\n\t\t// Getting my private key in order to generate a signature\n\t\twriteToLog(\"Step 3: Getting the encryptor's private-key\");\n\t\tPrivateKey myPrivateKey = getMyPrivateKey();\n\t\t\n\t\t// Generating a symmetric key\n\t\twriteToLog(\"Step 4: Generating a symmetric key\");\n\t\tKeyGenerator kg = KeyGenerator.getInstance(\"AES\");\n\t\tSecretKey semetricKey = kg.generateKey();\n\n\t\t// Generating a random IV\n\t\twriteToLog(\"Step 5: Generating a random IV\");\n\t\tbyte[] iv = generateRandomIV();\n\n\t\t// Initializing the cipher\n\t\twriteToLog(\"Step 6: Initilatzing the cipher Object\");\n\t\ttry {\n\t\t\tmyCipher = createCipher();\n\t\t\tmyCipher.init(Cipher.ENCRYPT_MODE, semetricKey, new IvParameterSpec(iv));\n\t\t}catch(Exception e) {\n\t\t\twriteToLog(\"Error While tring to Initializing the cipher with the giving arguments: \" + e.getMessage());\n\t\t\tLogWriter.close();\n\t\t\tthrow new Exception(\"Error: While tring to Initializing the cipher with the giving arguments\",e);\n\t\t}\n\t\t\n\n\t\t// Initializing the signature with my private-key\n\t\twriteToLog(\"Step 7: Initilatzing the signature Object with the encryptor's private-key\");\n\t\tSignature dataSigner = Signature.getInstance(\"SHA256withRSA\");\n\t\tdataSigner.initSign(myPrivateKey);\n\n\t\t// Encrypting\n\t\twriteToLog(\"Step 8: Encrypting... \");\n\t\tFile fileToEncrrypt = new File(fileToEncryptPath);\n\t\tencryptingData(fileToEncrrypt, dataSigner);\n\n\t\t// Signing on the encrypted data\n\t\twriteToLog(\"Step 9: Signing on the encrypted data \");\n\t\tbyte[] mySignature = dataSigner.sign();\n\n\t\t// Encrypt the symmetric key with the public of the receiver\n\t\twriteToLog(\"Step 10: Encrypt the symmetric key with the public of the receiver \");\n\t\tbyte[] encryptedSymmetricKey = encryptSymmetricKey(receiverPublicKey, semetricKey);\n\n\t\t// Saving the IV, Encrypted Symmetric-Key and Signature to the configurations file\n\t\twriteToLog(\"Step 11: Saving the IV, Encrypted Semetric-Key and Signature to the configurations file \");\n\t\tsavingToConfigurationsFile(configurationFileOutputStream, iv, encryptedSymmetricKey, mySignature);\n\n\t\tLogWriter.write(\"Encryption completed, No Errors Were Found\");\n\t\tLogWriter.close();\n\t}", "public static void main(String[] args) throws UnsupportedEncodingException {\n\t\tpwd = \"SAm\";\n\t\t\n\t\t// Encode using Base64\n\t\tString encodepwd = Base64.getEncoder().encodeToString(pwd.getBytes(\"UTF-16\"));\n\t\t\n\t\tSystem.out.println(\"Encoded pwd\"+\" \"+ encodepwd);\n\t\t\n\t\t// Decode in byte format\n\t\tbyte[] decodearr = Base64.getDecoder().decode(encodepwd);\n \n\t\t// Converting into string format\n\t\tString decodepwd = new String(decodearr, \"UTF-16\");\n\t \n\t\tSystem.out.println(\"Decoded pwd\"+\" \"+ decodepwd);\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Enter the Software Key\");\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tString softwareKey = input.nextLine();\r\n\t\tSystem.out.println(\"Enter the length of key\");\r\n\t\tint lengthOfKey = input.nextInt();\r\n\t\tString refinedSoftwareKey = refiningSoftwareKey(softwareKey,lengthOfKey);\r\n\t\tSystem.out.println(\"Software Key=: \" + refinedSoftwareKey);\r\n\t\tinput.close();\r\n\t}", "public static void main(final String[] args){\r\n try {\r\n new PKextr().go(args);\r\n } catch (Exception e) {\r\n AppBase.exit(e, INIT_ERROR);\r\n }\r\n }", "public static void main(String[] args) {\n generateKeys(\"DSA\", 1024);\n\n // Generate a 576-bit DH key pair\n generateKeys(\"DH\", 576);\n\n // Generate a 1024-bit RSA key pair\n generateKeys(\"RSA\", 1024);\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\tString password=encode(\"asdfghjkl\");\r\n\t\tSystem.out.println(password);\r\n\t\tString p=\"asdfghjkl\";\r\n\t\tboolean result=encode(p).equals(password);\r\n\t\tSystem.out.println(result);\r\n\t\t\r\n\t\t\r\n\t}", "@Test\r\n public void testEncryptDecryptPlaintextBadKey() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"\".getBytes();\r\n byte[] add = \"Random authenticated additional data\".getBytes();\r\n\r\n CryptoService instance = new CryptoService();\r\n Keys keys = instance.createKeys(null);\r\n CryptoDetached result = instance.encryptPlaintext(data, add, keys);\r\n Keys keys1 = instance.createKeys(null);\r\n String message = instance.decryptPlaintext(result, add, keys);\r\n Assertions.assertThrows(SodiumException.class, new Executable() {\r\n @Override\r\n public void execute() throws Throwable {\r\n instance.decryptPlaintext(result, add, keys1);\r\n }\r\n });\r\n }", "public static void execEnkripsi(File fileTemp, String pathTempFileEncryptName, String pathEncryptedSecretKeyFile, String pemContent, SimpleDateFormat sdf, String outputFileNameZip) throws Exception{\n String secretKey=RandomStringUtils.randomAlphanumeric(16);\r\n System.out.println(\"Generated Secret Key :\"+secretKey);\r\n File exportedFile;\r\n CompressingUtils compressingUtils = new CompressingUtils();\r\n String tmpPlainZipped = lokasiHasil+\"/tmp\"+outputFileNameZip;\r\n List<File> lsFile = new ArrayList<>();\r\n lsFile.add(fileTemp);\r\n if(compressingUtils.createZipWithoutPassword(lsFile, tmpPlainZipped)){\r\n exportedFile = new File(tmpPlainZipped);\r\n //delete file awal yang telah dikompresi\r\n for(File dfile : lsFile){\r\n dfile.delete();\r\n }\r\n }else{\r\n throw new Exception(\"gagal melakukan kompresi file\");\r\n }\r\n System.out.println(\"file kompresi berhasil dibuat \"+ outputFileNameZip);\r\n\r\n /*Step 3 : enkripsi file dengan kunci acak */\r\n System.out.println(\"Step 3 : enkripsi file dengan kunci acak\");\r\n\r\n\r\n String fileOutputEcnryptedname = lokasiHasil+\"/\"+outputFileNameZip;\r\n\r\n File tempFileEncryptName = new File(pathTempFileEncryptName);\r\n try {\r\n CryptoUtils.encrypt(secretKey, exportedFile, tempFileEncryptName);\r\n } catch (CryptoException e) {\r\n throw new Exception(\"Enkripsi file gagal : \" + e.getMessage());\r\n }\r\n\r\n EncryptionUtils utils = new EncryptionUtils();\r\n PublicKey publicKey = utils.getPublicKeyFromX509(pemContent);\r\n\r\n /*Step 4 : Enkripsi kunci acak dengan public key dari DJP*/\r\n System.out.println(\"Step 4 : enkripsi kunci acak dengan public key dari DJP\");\r\n\r\n String encryptedSecretKey;\r\n try{\r\n encryptedSecretKey = CryptoUtils.encrypt(secretKey, publicKey);\r\n }catch (CryptoException e) {\r\n throw new Exception(\"Enkripsi kunci gagal : \" + e.getMessage());\r\n }\r\n File encryptedSecretKeyFile = new File(pathEncryptedSecretKeyFile);\r\n try {\r\n FileOutputStream outputStream = new FileOutputStream(encryptedSecretKeyFile);\r\n outputStream.write(encryptedSecretKey.getBytes());\r\n outputStream.close();\r\n }catch (FileNotFoundException e){\r\n throw new Exception(\"kunci yang dienkripsi tidak ditemukan : \" + pathEncryptedSecretKeyFile);\r\n } catch (IOException e) {\r\n throw new Exception(\"gagal membentuk kunci enkripsi\");\r\n }\r\n\r\n /*Step 5: Compress data dan key kedalam file zip dan menjadi hasil akhir*/\r\n System.out.println(\"Step 5: Compress enkripsi file dan kunci kedalam file zip\");\r\n\r\n List<File> listFiles = new ArrayList<File>();\r\n listFiles.add(tempFileEncryptName);\r\n listFiles.add(encryptedSecretKeyFile);\r\n\r\n if(listFiles.size() != 2){\r\n for (File file : listFiles) {\r\n file.delete();\r\n }\r\n throw new Exception(\"file enkripsi dan/atau key enkripsi salah satunya tidak ada\");\r\n }\r\n\r\n compressingUtils = new CompressingUtils();\r\n if (compressingUtils.createZip(listFiles, fileOutputEcnryptedname)) {\r\n /*Step 6 : hapus file data dan key, hasil dari step 3 dan 4 */\r\n System.out.println(\"Step 6 : hapus file data dan key, hasil dari step 3 dan 4\");\r\n\r\n for (File file : listFiles) {\r\n file.delete();\r\n }\r\n /*Step 7: hapus file zip, hasil dari step 2 */\r\n System.out.println(\"Step 7: hapus file zip, hasil dari step 2\");\r\n\r\n exportedFile.delete();\r\n }\r\n\r\n System.out.println(\"Proses enkripsi selesai, nama file : \" + fileOutputEcnryptedname);\r\n }", "public static void main(String[] args){\n\t\tbyte[] k = Util.hexStringToBytes(\"2b7e151628aed2a6abf7158809cf4f3c\"); \n\t\tbyte[] m = Util.hexStringToBytes(\"6bc1bee22e409f96e93d7e117393172a\"); \n\t\tbyte[] c = ModoECB.cifrar(k, m); \n\t\tSystem.out.println(\"c = \" + Util.bytesToHexString(c));\n\t}", "@org.junit.Test\n public void testCipher() {\n Assert.assertEquals(\"DITISGEHEIM\", Vigenere.cipher(\"DITISGEHEIM\", \"A\", true));\n Assert.assertEquals(\"DITISGEHEIM\", Vigenere.cipher(\"DITISGEHEIM\", \"A\", false));\n\n Assert.assertEquals(\"B\", Vigenere.cipher(\"A\", \"B\", true));\n Assert.assertEquals(\"A\", Vigenere.cipher(\"B\", \"B\", false));\n\n String plain = \"DUCOFIJMA\";\n String key = \"ABC\";\n String shouldEncryptTo = \"DVEOGKJNC\";\n String actualEncrypted = Vigenere.cipher(plain, key, true);\n Assert.assertEquals(shouldEncryptTo, actualEncrypted);\n String decrypted = Vigenere.cipher(shouldEncryptTo, key, false);\n Assert.assertEquals(plain, decrypted);\n }", "public static void main(String[] args) throws Exception {\n /**\n * \n * http://csrc.nist.gov/groups/STM/cavp/block-cipher-modes.html#test-\n * vectors explained in :\n * http://csrc.nist.gov/groups/STM/cavp/documents/mac/CCMVS.pdf (ccmvs =\n * ccm validation system)\n * \n * summary of test vector types: DVPT : Decryption-Verification Process\n * Test VADT : variable associated data test VNT : variable nonce test\n * VPT : variable playload test VTT : variable tag test\n */\n AesCcmTest someNistAesCcmTestVectors[] = new AesCcmTest[] {\n // from VPT256.rsp NIST file:\n /* 0 */ new AesCcmTest(TestType.ENCRYPT, 16,\n \"7da6ef35ad594a09cb74daf27e50a6b30d6b4160cf0de41ee32bbf2a208b911d\",\n \"98a32d7fe606583e2906420297\",\n \"217d130408a738e6a833931e69f8696960c817407301560bbe5fbd92361488b4\",\n \"b0053d1f490809794250d856062d0aaa92\",\n \"a6341ee3d60eb34a8a8bc2806d50dd57a3f628ee49a8c2005c7d07d354bf80994d\"),\n /* 1 */ new AesCcmTest(TestType.ENCRYPT, 16,\n \"c6c14c655e52c8a4c7e8d54e974d698e1f21ee3ba717a0adfa6136d02668c476\",\n \"291e91b19de518cd7806de44f6\",\n \"b4f8326944a45d95f91887c2a6ac36b60eea5edef84c1c358146a666b6878335\", \"\",\n \"ca482c674b599046cc7d7ee0d00eec1e\"),\n /* 2 */ new AesCcmTest(TestType.ENCRYPT, 16,\n \"cc49d4a397887cb57bc92c8a8c26a7aac205c653ef4011c1f48390ad35f5df14\",\n \"6df8c5c28d1728975a0b766cd7\",\n \"080f82469505118842e5fa70df5323de175a37609904ee5e76288f94ca84b3c5\", \"1a\",\n \"a5f24e87a11a95374d4c190945bf08ef2f\"),\n /* 3 */ new AesCcmTest(TestType.ENCRYPT, 16,\n \"62b82637e567ad27c3066d533ed76e314522ac5c53851a8c958ce6c64b82ffd0\",\n \"5bc2896d8b81999546f88232ab\",\n \"fffb40b0d18cb23018aac109bf62d849adca42629d8a9ad1299b83fe274f9a63\", \"87294078\",\n \"2bc22735ab21dfdcfe95bd83592fb6b4168d9a23\"),\n\n // from VNT256.rsp:\n /* 4 */ new AesCcmTest(TestType.ENCRYPT, 16, \"553521a765ab0c3fd203654e9916330e189bdf951feee9b44b10da208fee7acf\",\n \"aaa23f101647d8\", \"a355d4c611812e5f9258d7188b3df8851477094ffc2af2cf0c8670db903fbbe0\",\n \"644eb34b9a126e437b5e015eea141ca1a88020f2d5d6cc2c\",\n \"27ed90668174ebf8241a3c74b35e1246b6617e4123578f153bdb67062a13ef4e986f5bb3d0bb4307\"),\n /* 5 */ new AesCcmTest(TestType.ENCRYPT, 16,\n \"4a75ff2f66dae2935403cce27e829ad8be98185c73f8bc61d3ce950a83007e11\",\n \"ef284d1ddf35d1d23de6a2f84b\",\n \"0b90b3a087b9a4d3267bc57c470695ef7cf658353f2f680ee00ccc32c2ba0bdc\",\n \"bf35ddbad5e059169468ae8537f00ec790cc038b9ed0a5d7\",\n \"b702ad593b4169fd7011f0288e4e62620543095186b32c122389523b5ccc33c6b41b139108a99442\"),\n\n // from VADT128.rsp:\n /* 6 */ new AesCcmTest(TestType.ENCRYPT, 16, \"d24a3d3dde8c84830280cb87abad0bb3\", \"f1100035bb24a8d26004e0e24b\",\n \"\", \"7c86135ed9c2a515aaae0e9a208133897269220f30870006\",\n \"1faeb0ee2ca2cd52f0aa3966578344f24e69b742c4ab37ab1123301219c70599b7c373ad4b3ad67b\"),\n /* 7 */ new AesCcmTest(TestType.ENCRYPT, 16, \"5a33980e71e7d67fd6cf171454dc96e5\",\n \"33ae68ebb8010c6b3da6b9cb29\",\n \"eca622a37570df619e10ebb18bebadb2f2b49c4d2b2ff715873bb672e30fc0ff\",\n \"a34dfa24847c365291ce1b54bcf8d9a75d861e5133cc3a74\",\n \"7a60fa7ee8859e283cce378fb6b95522ab8b70efcdb0265f7c4b4fa597666b86dd1353e400f28864\"),\n\n // from VTT192.rsp:\n /* 8 */ new AesCcmTest(TestType.ENCRYPT, 4, \"11fd45743d946e6d37341fec49947e8c70482494a8f07fcc\",\n \"c6aeebcb146cfafaae66f78aab\",\n \"7dc8c52144a7cb65b3e5a846e8fd7eae37bf6996c299b56e49144ebf43a1770f\",\n \"ee7e6075ba52846de5d6254959a18affc4faf59c8ef63489\",\n \"137d9da59baf5cbfd46620c5f298fc766de10ac68e774edf1f2c5bad\"),\n /* 9 */ new AesCcmTest(TestType.ENCRYPT, 14, \"d2d4482ea8e98c1cf309671895a16610152ce283434bca38\",\n \"6ee177d48f59bd37045ec03731\",\n \"d4cd69b26ea43596278b8caec441fedcf0d729d4e0c27ed1332f48871c96e958\",\n \"e4abe343f98a2df09413c3defb85b56a6d34dba305dcce46\",\n \"7e8f27726c042d73aa6ebf43217395202e0af071eacf53790065601bb59972c35b580852e684\"),\n\n // from DVPT256.rsp:\n /* 10 */ new AesCcmTest(TestType.DECRYPT, 4, \"af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569\",\n \"a544218dadd3c1\", \"\", \"d3d5424e20fbec43ae495353ed830271515ab104f8860c98\",\n \"64a1341679972dc5869fcf69b19d5c5ea50aa0b5e985f5b722aa8d59\"),\n /* 11 */ new AesCcmTest(TestType.DECRYPT, 4,\n \"a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088\",\n \"a544218dadd3c10583db49cf39\",\n \"3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907\", \"\", \"866d4227\"),\n /* 12 */ new AesCcmTest(TestType.DECRYPT, 16,\n \"314a202f836f9f257e22d8c11757832ae5131d357a72df88f3eff0ffcee0da4e\",\n \"a544218dadd3c10583db49cf39\",\n \"3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907\",\n \"e8de970f6ee8e80ede933581b5bcf4d837e2b72baa8b00c3\",\n \"8d34cdca37ce77be68f65baf3382e31efa693e63f914a781367f30f2eaad8c063ca50795acd90203\"),\n };\n\n System.out.println(\"Running \" + someNistAesCcmTestVectors.length + \" NIST test vectors.\");\n int testCounter = 0;\n for (AesCcmTest t : someNistAesCcmTestVectors) {\n System.out.print(testCounter + \":\" + t + \": \");\n boolean hasPassed = t.checkTestVector();\n if (!hasPassed) {\n System.out.println(\"ERROR.\");\n } else {\n System.out.println(\"OK.\");\n }\n testCounter++;\n }\n System.out.println(\"DONE running NIST test vectors.\");\n\n\n }", "public static void main(String[] args) {\n\t\tString username = new String();\n\t\tString password = new String();\n\t\t\n\t\tusername = \"Edwards695\";\n\t\tpassword = \"Confidential\";\n\t\t\n\t\t\t//ENCODE\n\t\t\n\t\tBase64.Encoder encoder = Base64.getEncoder();\n\t\tString encodedUsername = encoder.encodeToString(username.getBytes(StandardCharsets.UTF_8));\n\n\t\tSystem.out.println(encodedUsername);\n\t\t\n\t\tString encodedPassword = encoder.encodeToString(password.getBytes(StandardCharsets.UTF_8));\n\t\t\n\t\tSystem.out.println(encodedPassword);\n\t\t\n\t\t\t//DECODE\n\t\t\n\t\t\n\t\tBase64.Decoder decoder = Base64.getDecoder();\n\t\tbyte[] decodedUsername = decoder.decode(encodedUsername);\n\t\t\n\t\tSystem.out.println(new String(decodedUsername));\n\t\t\n\t\tbyte[] decodedPassword = decoder.decode(encodedPassword);\n\t\t\n\t\tSystem.out.println(new String(decodedPassword));\n\t}", "public static void main(String[] args) {\n\t\tAffinCipher ac = new AffinCipher();\r\n\t\tString p,e,Encrypt,Decrypt;\r\n\t\tint n;\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Choose one option\\n 1.Encryption\\n 2.Decryption\\n 3.brute force\");\r\n\t\tn = sc.nextInt();\r\n\t\tswitch(n)\r\n\t\t{\r\n\t\tcase 1 : System.out.println(\"Enter plaintext\");\r\n\t\t p = sc.next();\r\n\t\t Encrypt = ac.encrypt(p);\r\n\t\t System.out.println(\"Encrypted text : \"+Encrypt);\r\n\t\t ac.bruteforce(Encrypt);\r\n\t\t break;\r\n\t\tcase 2 : System.out.println(\"Enter encrypted text\");\r\n\t\t e = sc.next();\r\n\t\t Decrypt = ac.decrypt(e);\r\n\t\t System.out.println(\"Decrypted text : \"+Decrypt);\r\n\t\t //break;\r\n\t\t//case 3 : System.out.println(\"Enter encrypted text\");\r\n // e = sc.next();\r\n ac.bruteforce(e);\r\n break;\r\n\t\t}\r\n\t\t\r\n\t\tsc.close();\r\n \r\n\t}", "public static void main(String[] args) {\n CmdArgs argsBean = new CmdArgs();\n\n //Parser provided by args4j\n CmdLineParser parser = new CmdLineParser(argsBean);\n try {\n //Parse the arguments\n parser.parseArgument(args);\n //Do the initialization--pay attention to order;\n //Specify the keystore details (this can be specified as VM arguments as well)\n //the keystore file contains an application's own certificate and private key\n //keytool -genkey -keystore <keystorename> -keyalg RSA\n System.setProperty(\"javax.net.ssl.keyStore\",\"chjq-keystore\");\n //Password to access the private key from the keystore file\n System.setProperty(\"javax.net.ssl.keyStorePassword\", \"123456\");\n\n // Enable debugging to view the handshake and communication which happens between the SSLClient and the SSLServer\n //System.setProperty(\"javax.net.debug\",\"all\");\n AuthServer authServer = AuthServer.init(argsBean.getServerid(), argsBean.getServers_conf());\n authServer.run();\n\n\n\n }\n catch (CmdLineException e) {\n\n System.err.println(e.getMessage());\n\n //Print the usage to help the user understand the arguments expected\n //by the program\n parser.printUsage(System.err);\n }\n }", "public static void main(String [] args) {\n\t cryptanalysis();\n\t \n\t for (char cipherChar : cipherText.toCharArray())\n\t\t if (Character.isLetter(cipherChar)) { // only letters are encrypted, punctuation marks and whitespace are not\n\t\t\t // following line converts letters to numbers between 0 and 25\n\t\t\t int cipher = (int) cipherChar - alphaIndex;\n\t\t\t int plain = decrypt(cipher);\n\t\t\t // following line coverts numbers between 0 and 25 to letters\n\t\t\t char plainChar = (char) (plain + alphaIndex);\n\t\t\t System.out.print(plainChar);\n\t\t }\n\t\t else\n\t\t\t System.out.print(cipherChar);\n }", "public static void main(String[] args) throws IOException, NoSuchAlgorithmException, InvalidKeyException, InvalidKeySpecException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException {\n String message=\"This is a confidential message.\";\n byte[] myMessage =message.getBytes(); //string to byte array as DES works on bytes\n\n //If you want to use your own key\n // SecretKeyFactory MyKeyFactory = SecretKeyFactory.getInstance(\"DES\");\n // String Password = \"My Password\";\n // byte[] mybyte =Password.getBytes();\n // DESKeySpec myMaterial = new DESKeySpec(mybyte);\n // SecretKey myDESKey = MyKeyFactory.generateSecret(myMaterial);\n\n //Generating Key\n KeyGenerator Mygenerator = KeyGenerator.getInstance(\"DES\");\n SecretKey myDesKey = Mygenerator.generateKey();\n\n //initializing crypto algorithm\n Cipher myCipher = Cipher.getInstance(\"DES\");\n\n //setting encryption mode\n myCipher.init(Cipher.ENCRYPT_MODE, myDesKey);\n byte[] myEncryptedBytes=myCipher.doFinal(myMessage);\n \n\n //setting decryption mode\n myCipher.init(Cipher.DECRYPT_MODE, myDesKey);\n byte[] myDecryptedBytes=myCipher.doFinal(myEncryptedBytes);\n\n //print message in byte format\n //System.out.println(Arrays.toString(myEncryptedBytes));\n //System.out.println(Arrays.toString(myDecryptedBytes));\n\n String encrypteddata=new String(myEncryptedBytes);\n String decrypteddata=new String(myDecryptedBytes);\n\n System.out.println(\"Message : \"+ Arrays.toString(myMessage));\n System.out.println(\"Encrypted - \"+ encrypteddata);\n System.out.println(\"Decrypted Message - \"+ decrypteddata);\n }", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n String encrypted = in.next();\n\n int count = countDecryptNum(encrypted);\n System.out.println(count);\n }", "private EncryptionUtility(){\r\n\t\treturn;\t\t\r\n\t}", "@Override\r\n\tpublic void run(String... args) throws Exception {\n\t\tSpringSecurityPwdEncrypted securityPwdEncrypted=ctx.getBean(SpringSecurityPwdEncrypted.class,\"springSecurityPwdEncrypted\");\r\n\t\tint i1=securityPwdEncrypted.insertDetails(\"admin\", \"admin\", 0);\r\n\t\tint i2=securityPwdEncrypted.insertDetails(\"ceo\", \"ceo\", 1);\r\n\t\tint i3=securityPwdEncrypted.insertDetails(\"manager\", \"manager\", 1);\r\n\t\t\r\n\t\tSystem.out.println(i1+\"-1st row...\"+i2+\"-2nd row...\"+i3+\"-3rd row...\");\r\n\t}", "@Test\n public void testDesDecrypt() {\n\n }", "public void testCaesar(){\n String msg = \"At noon be in the conference room with your hat on for a surprise party. YELL LOUD!\";\n \n /*String encrypted = encrypt(msg, key);\n System.out.println(\"encrypted \" +encrypted);\n \n String decrypted = encrypt(encrypted, 26-key);\n System.out.println(\"decrypted \" + decrypted);*/\n \n \n String encrypted = encrypt(msg, 15);\n System.out.println(\"encrypted \" +encrypted);\n \n }", "public static void main(String[] args) throws IOException \r\n\t{\n\t\tFile matrixData = new File(\"matrixData.txt\");\r\n\t\tScanner matrixIn = new Scanner(matrixData);\r\n\t\tString key = matrixIn.nextLine();\r\n\t\tmatrixIn.close();\r\n\t\r\n\r\n\t\t// read the text to encipher\r\n\t\tFile inFile = new File(\"textToEncipher.txt\");\r\n\t\tFileInputStream fis = new FileInputStream(inFile);\r\n\t\tBufferedInputStream bis = new BufferedInputStream(fis);\r\n\t\tStringBuilder plain = new StringBuilder(\"\");\r\n\t\twhile (bis.available() > 0)\r\n\t\t{\r\n\t\t\tplain.append((char)bis.read());\r\n\t\t}\r\n\t\t\r\n\t\t// initialize the output file PrintWriter\r\n\t\tFile outFile = new File(\"hillEncipherOutput.txt\");\r\n\t\tPrintWriter dataOut = new PrintWriter(outFile);\r\n\t\t\r\n\t\tHillEncipherer hill = new HillEncipherer(key, plain.toString());\r\n\t\tdataOut.print(hill.encipher());\r\n\t\t\r\n\t\tfis.close();\r\n\t\tbis.close();\r\n\t\tdataOut.close();\r\n\t}", "@Test\n\tpublic void testRunArgsStdin() throws SortException {\n\t\tString[] argsArr = new String[] { \"-n\" };\n\t\tString contentStr = \"112\" + NEW_LINE + \"68\" + NEW_LINE + \"681\";\n\t\tString expected = \"68\" + NEW_LINE + \"112\" + NEW_LINE + \"681\" + NEW_LINE;\n\t\tInputStream inputStream = new java.io.ByteArrayInputStream(contentStr.getBytes());\n\t\tByteArrayOutputStream stdout = new ByteArrayOutputStream();\n\t\tsortApplication.run(argsArr, inputStream, stdout);\n\t\tassertEquals(expected, stdout.toString());\n\t}", "@Test\n public void testMain() {\n String simulatedUserInput = \"100AUD\" + System.getProperty(\"line.separator\")\n + \"1\" + System.getProperty(\"line.separator\");\n\n InputStream savedStandardInputStream = System.in;\n System.setIn(new ByteArrayInputStream(simulatedUserInput.getBytes()));\n\n mainFunction mainfunc = new mainFunction();\n\n try {\n mainfunc.start();\n } catch(Exception e) {\n System.out.println(\"Exception!\");\n }\n\n assertEquals(1,1);\n }" ]
[ "0.7323237", "0.6979081", "0.6953875", "0.6922766", "0.6875346", "0.6864341", "0.6766888", "0.67178327", "0.67072225", "0.6679837", "0.66544586", "0.65479386", "0.654255", "0.6517998", "0.6501308", "0.6486483", "0.6439341", "0.6402553", "0.6363424", "0.634869", "0.63332695", "0.6290138", "0.6287567", "0.6286883", "0.627018", "0.62461185", "0.62032914", "0.6201495", "0.6195083", "0.6186675", "0.615981", "0.61571515", "0.6153346", "0.61512524", "0.6130898", "0.610523", "0.6084268", "0.60779035", "0.6076136", "0.60745263", "0.60504025", "0.60502625", "0.6023897", "0.6009512", "0.6000136", "0.5997532", "0.5997445", "0.5996758", "0.5995805", "0.59941787", "0.597708", "0.59728086", "0.5968387", "0.5963343", "0.59553695", "0.595148", "0.5929018", "0.5916115", "0.59155554", "0.59042585", "0.5880894", "0.5880171", "0.58793145", "0.5872405", "0.5872044", "0.5845807", "0.5843743", "0.5839305", "0.5816216", "0.5810894", "0.5809727", "0.580768", "0.578353", "0.5783282", "0.57824063", "0.5781782", "0.5778951", "0.577459", "0.5773719", "0.5769748", "0.57426906", "0.57418215", "0.57229275", "0.5717378", "0.5711561", "0.5710034", "0.56950825", "0.5691391", "0.56875086", "0.56748146", "0.5674525", "0.5665349", "0.56632555", "0.56513447", "0.56450504", "0.56426114", "0.5641669", "0.56382686", "0.5627702", "0.5621924" ]
0.70242655
1
added by xingjun 17/06/2010 catch what the user search for private String searchResultOption;
public GeneQueryResultBean() { if (debug) System.out.println("GeneQueryResultBean.constructor"); input = Visit.getRequestParam("input"); query = Visit.getRequestParam("query"); if (query.equalsIgnoreCase("")) { focusedOrgan = null; } else { focusedOrgan = Visit.getRequestParam("focusedOrgan"); } // searchResultOption = Visit.getRequestParam("searchResultOption"); if (TableUtil.isTableViewInSession()) { return; } TableUtil.saveTableView(populateGeneQueryResultTableView("geneQueryResult")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void searchOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Search by - Title |\");\n System.out.println(\"\\t\\t| [2] Search by - Directors |\");\n System.out.println(\"\\t\\t| [3] Back To Menu |\");\n System.out.println(\"\\t\\t=================================\");\n System.out.print(\"\\t\\t Input the option number : \"); \n }", "public String getSearchHint();", "public void searchSystem( Integer option, String buff ) {\n\t\tswitch ( option ) {\n\t\t case 1:\n\t\t \tarchive.searchTitle( buff );\n\t\t \tbreak;\n\t\t case 2:\n\t\t \tarchive.searchAuthor( buff );\n\t\t \tbreak;\n\t\t case 3:\n\t\t \tarchive.searchPublisher( buff );\n\t\t \tbreak;\n\t\t default:\n\t\t \tbreak;\n\t\t}\n\t}", "private String getChoice() {\n return searchChoiceBox.getValue();\n }", "java.lang.String getSearchValue();", "private void searchforResults() {\n\n List<String> queryList = new SavePreferences(this).getStringSetPref();\n if(queryList != null && queryList.size() > 0){\n Log.i(TAG, \"Searching for results \" + queryList.get(0));\n Intent searchIntent = new Intent(Intent.ACTION_WEB_SEARCH);\n searchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n searchIntent.putExtra(SearchManager.QUERY, queryList.get(0));\n this.startActivity(searchIntent);\n }\n }", "private void searchFunction() {\n\t\t\r\n\t}", "Search getSearch();", "boolean getUseSearchResult();", "public void search() {\r\n \t\r\n }", "@Override\r\n\tpublic String popupSearch(String criteria) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String popupSearch(String criteria) {\n\t\treturn null;\r\n\t}", "private void processSearchButton() {\n try {\n //Stop a user from searching before a World exists to search\n if(this.world == null) {\n JOptionPane.showMessageDialog(null, \"You must read a data file first!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n\n //Declarations\n StringBuilder searchResults;\n String searchCriteria;\n String unfoundItem;\n int dropDownSelection;\n\n //initialize\n searchResults = new StringBuilder();\n searchCriteria = this.searchCriteriaField.getText().trim().toLowerCase();\n unfoundItem = this.searchCriteriaField.getText().trim().toLowerCase();\n dropDownSelection = this.searchCriteriaBox.getSelectedIndex();\n\n //Stop users from searching before selecting and entering any search criteria\n if(searchCriteria.equals(\"\") || searchCriteriaBox.equals(0)) {\n JOptionPane.showMessageDialog(null, \"You must SELECT and ENTER the search criteria before searching!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n\n //handle each dropdown selection\n switch(dropDownSelection) {\n case 0: //empty string to allow a blank default\n break;\n case 1: //by name\n for(Thing myThing : this.world.getAllThings()) {\n if (myThing.getName().toLowerCase().equals(searchCriteria)) {\n searchResults = new StringBuilder(myThing.getName() + \" \" + myThing.getIndex() + \" (\" + myThing.getClass().getSimpleName() + \")\");\n }\n } //end of forLoop for case 1\n if(searchResults.toString().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Search criteria '\" + unfoundItem + \"' does not exist in this World.\", \"Unknown Item\", JOptionPane.WARNING_MESSAGE);\n } else {\n JOptionPane.showMessageDialog(null, searchResults.toString());\n }\n break;\n case 2: //by index\n for(Thing myThing : this.world.getAllThings()) {\n if (myThing.getIndex() == Integer.parseInt(searchCriteria)) {\n searchResults = new StringBuilder(myThing.getName() + \" \" + myThing.getIndex() + \" (\" + myThing.getClass().getSimpleName() + \")\");\n }\n } //end of forLoop for case 2\n if(searchResults.toString().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Search criteria '\" + unfoundItem + \"' does not exist in this World.\", \"Unknown Item\", JOptionPane.WARNING_MESSAGE);\n } else {\n JOptionPane.showMessageDialog(null, searchResults.toString());\n }\n break;\n case 3: //by skill\n for(SeaPort mySeaPort : this.world.getPorts()) {\n for(Person myPerson : mySeaPort.getPersons()) {\n if(myPerson.getSkill().toLowerCase().equals(searchCriteria)) {\n searchResults.append(myPerson.getName()).append(\" \").append(myPerson.getIndex()).append(\" (\").append(myPerson.getClass().getSimpleName()).append(\")\\n Skill: \").append(myPerson.getSkill()).append(\"\\n\\n\");\n }\n }\n } //end of forLoop for case 3\n if(searchResults.toString().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Search criteria '\" + unfoundItem + \"' does not exist in this World.\", \"Unknown Item\", JOptionPane.WARNING_MESSAGE);\n } else {\n JOptionPane.showMessageDialog(null, searchResults.toString());\n }\n break;\n default: break;\n } //end of switch()\n } catch(Exception e5) {\n JOptionPane.showMessageDialog(null, \"Something went wrong in the search!\\n\\n\" + e5.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n } //end of catch()\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 }", "@Override\r\npublic String popupSearch(String criteria) {\n\treturn null;\r\n}", "private void searchMenu(){\n\t\t\n\t}", "void searchProbed (Search search);", "public boolean action(Event e,Object o)\r\n {\r\n String text; // Search text entered by the user.\r\n\tString searchText; // Lower case version of above.\r\n\tURL newURL=null;\r\n\r\n\t// Chech to see if the option menu has been selected.\r\n\r\n\tif(e.target instanceof Choice)\r\n\t{\r\n\t Choice c=(Choice)e.target;\r\n\t try\r\n\t {\r\n\t maxSearch=Integer.parseInt(c.getSelectedItem(),10);\r\n\t }\r\n\t catch(NumberFormatException ne)\r\n\t {\r\n\t maxSearch=MAX_NUMBER_PAGES;\r\n\t }\r\n\t}\r\n\r\n\t// Check to see if a check box has been pressed.\r\n\tif(e.target instanceof Checkbox)\r\n\t{\r\n\t if(caseSensitive.getState() == true)\r\n\t matchCase=true;\r\n else matchCase=false;\r\n\t if(matchWholeWord.getState() ==true)\r\n\t matchWord=true;\r\n else matchWord=false;\r\n\t}\r\n\r\n // A Button has been pressed - which determine.\r\n\tif(e.target instanceof Button)\r\n\t{\r\n\t if(e.target == search)\r\n\t {\r\n\t // Search button pressed - read in search text entered \r\n\t\ttext=inputArea.getText();\r\n\t\t// Make sure there's something to search for\r\n\t\tif(text.length()==0)\r\n\t\t return(false);\r\n\t\t// New Search so clear the GUI out\r\n\t\tif(resultsArea.countItems()>0)\r\n\t\t resultsArea.clear();\r\n disableButtons();\r\n\t\tabort.enable();\r\n\t\tstatusArea.setText(\"\");\r\n\t\t// Clear out previous search data\r\n\t\tpageNames.removeAllElements();\r\n\t\tpageMatch.removeAllElements();\r\n\t\t// We're off start the search thread\r\n\t\tcp=new SearchPages(this,hostName,text,maxSearch);\r\n\t\tcp.start();\r\n\t }\r\n\t else if(e.target == abort)\r\n\t {\r\n\t // Abort button Pressed - stop the thread.\r\n\t\tif(cp != null)\r\n\t\t cp.stop();\r\n\t\tcp=null;\r\n\t\t// Enable Button for another search.\r\n\t\tenableButtons();\r\n\t\tabort.disable();\r\n\t }\r\n\t else\r\n\t {\r\n\t // Clear Button Pressed - clear all the fields and return.\r\n\t\tinputArea.setText(\"\");\r\n\t\tstatusArea.setText(\"\");\r\n\r\n\t\t// Clear radio Buttons.\r\n\t\tcaseSensitive.setState(false);\r\n\t\tcaseInsensitive.setState(true);\r\n\t\tmatchWholeWord.setState(false);\r\n\r\n\t\t// Clear option menu.\r\n\t\tnumPagesChoice.select(0);\r\n\t\ttry\r\n\t\t{\r\n\t\t maxSearch=Integer.parseInt(numPagesChoice.getSelectedItem(),10);\r\n\t\t}\r\n\t\tcatch(NumberFormatException ex)\r\n\t\t{\r\n\t\t maxSearch=MAX_NUMBER_PAGES;\r\n\t\t}\r\n\t\t\r\n\t\tif(resultsArea.countItems()>0)\r\n\t\t resultsArea.clear();\r\n cp=null;\r\n\t }\r\n\t}\r\n\r\n\t// Selection made from the list of matches.\r\n\tif(e.target instanceof java.awt.List)\r\n\t{\r\n\t java.awt.List list=(java.awt.List)e.target;\r\n\t int index=list.getSelectedIndex();\r\n\r\n\t // Extract the page name from the list.\r\n\t if(index<pageMatch.size())\r\n\t {\r\n\t String URLSelected=(String)pageMatch.elementAt(index);\r\n\t\ttry\r\n\t\t{\r\n\t\t // If URL store then use it.\r\n\t\t if(URLSelected.startsWith(\"http:\") || URLSelected.startsWith(\"file:\"))\r\n\t\t newURL=new URL(URLSelected);\r\n else if(server==null)\r\n\t\t newURL=new URL(\"http://www.\"+hostName+\"/\"+URLSelected);\r\n else newURL=new URL(server+URLSelected);\r\n\t\t}\r\n\t\tcatch(MalformedURLException except){}\r\n\t\tgetAppletContext().showDocument(newURL,\"_self\");\r\n\t }\r\n\t}\r\n\treturn true; // We are done.\r\n }", "private void searchWord()\n {\n String inputWord = searchField.getText();\n \n if(inputWord.isEmpty())\n queryResult = null;\n \n else\n {\n char firstLetter = inputWord.toUpperCase().charAt(0);\n \n for(int i = 0 ; i < lexiNodeTrees.size() ; i++)\n {\n if(lexiNodeTrees.get(i).getCurrentCharacter() == firstLetter)\n {\n queryResult = lexiNodeTrees.get(i).searchWord(inputWord, false);\n i = lexiNodeTrees.size(); // escape the loop\n }\n }\n }\n \n // update the list on the GUI\n if(queryResult != null)\n {\n ArrayList<String> words = new ArrayList<>();\n for(WordDefinition word : queryResult)\n {\n words.add(word.getWord());\n }\n \n // sort the list of words alphabetically \n Collections.sort(words);\n \n // display the list of wordsin the UI\n DefaultListModel model = new DefaultListModel();\n for(String word : words)\n {\n model.addElement(word);\n }\n\n this.getSearchSuggestionList().setModel(model);\n }\n \n else\n this.getSearchSuggestionList().setModel( new DefaultListModel() );\n }", "public void search() {\n String q = this.query.getText();\n String cat = this.category.getValue();\n if(cat.equals(\"Book\")) {\n searchBook(q);\n } else {\n searchCharacter(q);\n }\n }", "public static void search() {\n int userSelected = selectFromList(crudParamOptions);\n switch (userSelected){\n case 1:\n searchFirstName();\n break;\n case 2:\n searchLastName();\n break;\n case 3:\n searchPhone();\n break;\n case 4:\n searchEmail();\n break;\n default:\n break;\n }\n }", "public String search() {\r\n\t\tgetNavigationPanel(3);\r\n\t\treturn SUCCESS;\r\n\t}", "@Override\n\tint Search_List(String Search_Name)\n\t{\n\t\tint k=0;\n\t\tfor(OptionSet Op:opset)\t{\n\t\t\tif(Op.getName().equalsIgnoreCase(Search_Name.toUpperCase(Locale.getDefault())))\n\t\t\t\treturn k;\n\t\t\tk++;\n\t\t}\n\t\treturn -1;\n\t}", "boolean isSearchOk() {\n return false;\n }", "private void performSearch() {\n String text = txtSearch.getText();\n String haystack = field.getText();\n \n // Is this case sensitive?\n if (!chkMatchCase.isSelected()) {\n text = text.toLowerCase();\n haystack = haystack.toLowerCase();\n }\n \n // Check if it is a new string that the user is searching for.\n if (!text.equals(needle)) {\n needle = text;\n curr_index = 0;\n }\n \n // Grab the list of places where we found it.\n populateFoundList(haystack);\n \n // Nothing was found.\n if (found.isEmpty()) {\n Debug.println(\"FINDING\", \"No occurrences of \" + needle + \" found.\");\n JOptionPane.showMessageDialog(null, \"No occurrences of \" + needle + \" found.\",\n \"Nothing found\", JOptionPane.INFORMATION_MESSAGE);\n \n return;\n }\n \n // Loop back the indexes if we have reached the end.\n if (curr_index == found.size()) {\n curr_index = 0;\n }\n \n // Go through the findings one at a time.\n int indexes[] = found.get(curr_index);\n field.select(indexes[0], indexes[1]);\n curr_index++;\n }", "public String getSearchString() {\r\n return super.getSearchString();\r\n \r\n// String searchStr = \"\";\r\n// //put exact phrase at the very beginning\r\n// if(exactphrase != null && exactphrase.length() > 0)\r\n// {\r\n// searchStr += \"\\\"\" + exactphrase + \"\\\"\";\r\n// }\r\n//\r\n// String allwordsSearchStr = \"\";\r\n// if(allwords != null && allwords.length() > 0)\r\n// {\r\n// String [] words = allwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// allwordsSearchStr += \"+\" + words[i];\r\n// }\r\n// }\r\n// }\r\n//\r\n// String withoutwordsSearchStr = \"\";\r\n// if(withoutwords != null && withoutwords.length() > 0)\r\n// {\r\n// String [] words = withoutwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// withoutwordsSearchStr += \"+-\" + words[i];\r\n// }\r\n// }\r\n// }\r\n//\r\n// searchStr += allwordsSearchStr + withoutwordsSearchStr; //need to add other string\r\n// \r\n// String oneofwordsSearchStr = \"\";\r\n// if(oneofwords != null && oneofwords.length() > 0)\r\n// {\r\n// String [] words = oneofwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// oneofwordsSearchStr = \"(\";\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// oneofwordsSearchStr += words[i] + \" \";\r\n// }\r\n// oneofwordsSearchStr = oneofwordsSearchStr.trim();\r\n// oneofwordsSearchStr += \")\";\r\n// }\r\n// }\r\n// if(oneofwordsSearchStr.length() > 0)\r\n// {\r\n// searchStr += \"+\" + oneofwordsSearchStr;\r\n// }\r\n//\r\n// return searchStr;\r\n }", "public void performSearch() {\n History.newItem(MyWebApp.SEARCH_RESULTS);\n getMessagePanel().clear();\n if (keywordsTextBox.getValue().isEmpty()) {\n getMessagePanel().displayMessage(\"Search term is required.\");\n return;\n }\n mywebapp.getResultsPanel().resetSearchParameters();\n //keyword search does not restrict to spots\n mywebapp.addCurrentLocation();\n if (markFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(markFilterCheckbox.getValue());\n }\n if (contestFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setContests(contestFilterCheckbox.getValue());\n }\n if (geoFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setGeospatialOff(!geoFilterCheckbox.getValue());\n }\n if (plateFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(plateFilterCheckbox.getValue());\n }\n if (spotFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setSpots(spotFilterCheckbox.getValue());\n }\n String color = getValue(colorsListBox);\n mywebapp.getResultsPanel().getSearchParameters().setColor(color);\n String manufacturer = getValue(manufacturersListBox);\n if (manufacturer != null) {\n Long id = new Long(manufacturer);\n mywebapp.getResultsPanel().getSearchParameters().setManufacturerId(id);\n }\n String vehicleType = getValue(vehicleTypeListBox);\n mywebapp.getResultsPanel().getSearchParameters().setVehicleType(vehicleType);\n// for (TagHolder tagHolder : tagHolders) {\n// mywebapp.getResultsPanel().getSearchParameters().getTags().add(tagHolder);\n// }\n mywebapp.getResultsPanel().getSearchParameters().setKeywords(keywordsTextBox.getValue());\n mywebapp.getMessagePanel().clear();\n mywebapp.getResultsPanel().performSearch();\n mywebapp.getTopMenuPanel().setTitleBar(\"Search\");\n //mywebapp.getResultsPanel().setImageResources(resources.search(), resources.searchMobile());\n }", "@In String search();", "private void enterSearchMode(String resultContent) {\n\n\t\tthis.removeAll();\n\n\t\tJLabel welcomeLabel = new JLabel(\"Search the word you want to modify.\");\n\t\twelcomeLabel.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 17));\n\t\tGridBagConstraints welcomeC = new GridBagConstraints();\n\t\twelcomeC.anchor = GridBagConstraints.CENTER;\n\t\twelcomeC.gridwidth = 2;\n\t\twelcomeC.weighty = 5;\n\t\twelcomeC.gridy = 0;\n\t\tthis.add(welcomeLabel, welcomeC);\n\n\t\tAction submit = new AbstractAction() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsubmitSearch(searchBox.getText());\n\t\t\t}\n\t\t};\n\n\t\tsearchBox = new JTextField();\n\t\tsearchBox.addActionListener(submit);\n\t\tGridBagConstraints sboxC = new GridBagConstraints();\n\t\tsboxC.fill = GridBagConstraints.HORIZONTAL;\n\t\tsboxC.weightx = 4;\n\t\tsboxC.weighty = 1;\n\t\tsboxC.gridx = 0;\n\t\tsboxC.gridy = 1;\n\t\tsboxC.insets = new Insets(0, 20, 0, 10);\n\t\tthis.add(searchBox, sboxC);\n\n\t\tJButton submitButton = new JButton(\"Search\");\n\t\tsubmitButton.addActionListener(submit);\n\t\tGridBagConstraints submitC = new GridBagConstraints();\n\t\tsubmitC.weightx = 0;\n\t\tsubmitC.gridx = 1;\n\t\tsubmitC.gridy = 1;\n\t\tsubmitC.anchor = GridBagConstraints.EAST;\n\t\tsubmitC.insets = new Insets(0, 0, 0, 30);\n\t\tthis.add(submitButton, submitC);\n\n\t\tresult = new JLabel(resultContent);\n\t\tresult.setFont(new Font(\"\", Font.ITALIC, 14));\n\t\tGridBagConstraints resultC = new GridBagConstraints();\n\t\tresultC.fill = GridBagConstraints.BOTH;\n\t\tresultC.weighty = 5;\n\t\tresultC.gridy = 8;\n\t\tresultC.gridwidth = 3;\n\t\tresultC.anchor = GridBagConstraints.WEST;\n\t\tresultC.insets = new Insets(0, 40, 0, 0);\n\t\tthis.add(result, resultC);\n\n\t\tthis.repaint();\n\n\t}", "@Override\n public String doSearchResult() {\n return null;\n }", "private void searchRoutine() {\n String s = (String) JOptionPane.showInputDialog(\n this,\n \"Enter the name of the routine:\",\n \"Search\",\n JOptionPane.PLAIN_MESSAGE,\n null, null, null);\n\n if (s != null) {\n try {\n Routine r = collection.search(s);\n list.setSelectedValue(r, true);\n } catch (DoesNotExistException ee) {\n JOptionPane.showMessageDialog(this, \"Routine with given name does not exist.\");\n }\n }\n }", "void search();", "void search();", "private void searchSuggestionListMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchSuggestionListMouseClicked\n String selectedWord = this.getSearchSuggestionList().getSelectedValue();\n \n // find the definiiton of the word\n for(int i = 0 ; i < queryResult.size() ; i++)\n {\n if(queryResult.get(i).getWord().equals(selectedWord))\n {\n String definition = queryResult.get(i).getDefinition();\n definitionTextArea.setText(definition);\n i = queryResult.size();\n }\n }\n \n // select the same word in the all word list \n ListModel<String> modelList = getAllWordsList().getModel();\n \n for(int i = 0 ; i < modelList.getSize() ; i++)\n {\n if(modelList.getElementAt(i).equals(selectedWord))\n {\n getAllWordsList().setSelectedIndex(i);\n i = modelList.getSize();\n }\n }\n }", "@Override\r\n\tpublic void search() {\n\r\n\t}", "public void search() {\n }", "@Override\n\tpublic void search() {\n\t}", "public void setLSearch (boolean value) {\r\n l_search = value; }", "void searchUI();", "public void searchSwitch() {\r\n\t\tif (searchEmails) {\r\n\t\t\tsearchEmails = false;\r\n\t\t\tlblNewLabel_1.setText(srchPatrons);\r\n\t\t} else {\r\n\t\t\tsearchEmails = true;\r\n\t\t\tlblNewLabel_1.setText(srchEmails);\r\n\t\t}\r\n\t}", "public abstract S getSearch();", "private void search(Object value)\r\n\t\t{\n\r\n\t\t}", "private void search(String[] searchItem)\n {\n }", "private void findContactOptions() {\n System.out.println(\"Select the option: \\n1.find by contact name\\n2.find by city/state\\n3.exit\");\n int option = scannerForAddressBook.scannerProvider().nextInt();\n \n switch(option) {\n case 1:\n String name1 = getName();\n if(isContactExist(name1)) {\n Contacts contact1 = getContact(name1);\n System.out.println(\"Contact \" + name1 + \": \" + contact1);\n } else {\n System.out.println(\"Contact does not exists!\");\n }\n break;\n case 2:\n String name2 = getCityOrStateName();\n if(isCityOrStateExist(name2)) {\n Contacts contact = searchContactByCityOrState(name2);\n System.out.println(\"Contact from city/state \" + name2 + \": \" + contact);\n } else {\n System.out.println(\"City/State does not exists!\");\n }\n break;\n default:\n System.out.println(\"Thank you!\");\n }\n }", "public void handleSearch(ActionEvent actionEvent) {\n\t\tRadioButton radio = (RadioButton) toogleSearch.getSelectedToggle();\n\t\tString searchString = txtSearch.getText();\n\t\tObservableList<Item> itemList;\n\t\tif(radio == radioID){\n\t\t\ttry {\n\t\t\t\titemList = ItemDAO.searchItemById(searchString);\n\t\t\t\tpopulateItems(itemList);\n\t\t\t} catch (SQLException e) {\n\t\t\t\tExp.displayException(e);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tExp.displayException(e);\n\t\t\t}\n\t\t} else if(radio == radioName){\n\t\t\ttry {\n\t\t\t\titemList = ItemDAO.searchItemByName(searchString);\n\t\t\t\tpopulateItems(itemList);\n\t\t\t} catch (SQLException e) {\n\t\t\t\tExp.displayException(e);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tExp.displayException(e);\n\t\t\t}\n\t\t} else {\n\t\t\ttry {\n\t\t\t\titemList = ItemDAO.searchItemByLocation(searchString);\n\t\t\t\tpopulateItems(itemList);\n\t\t\t} catch (SQLException e) {\n\t\t\t\tExp.displayException(e);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tExp.displayException(e);\n\t\t\t}\n\t\t}\n\n\n\n\t}", "abstract public void search();", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n // Associate searchable configuration with the SearchView\n SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);\n SearchView searchView = (SearchView) menu.findItem(R.id.menuSearch).getActionView();\n searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));\n\n searchView.setIconifiedByDefault(false);\n searchView.setFocusable(true);\n searchView.setIconified(false);\n\n\n\n if( Intent.ACTION_VIEW.equals(getIntent().getAction())){\n Intent i = new Intent(SearchActivity.this, SearchActivity.class);\n query = getIntent().getStringExtra(SearchManager.QUERY);\n i.setAction(Intent.ACTION_SEARCH);\n i.putExtra(\"query\", query);\n startActivity(i);\n\n Toast.makeText(SearchActivity.this, query, Toast.LENGTH_SHORT).show();\n }\n\n searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String query) {\n // INPUT CODE HERE\n Toast.makeText(SearchActivity.this, query, Toast.LENGTH_SHORT).show();\n return false;\n }\n\n @Override\n public boolean onQueryTextChange(String newText) {\n // INPUT CODE HERE\n// String[] q = {\"promotion_name\"};\n// String[] t = {newText};\n// MySuggestionProvider suggestion = new MySuggestionProvider();\n// suggestion.query(Uri.parse(\"database.it.kmitl.ac.th/it_35\"), q, \"promotion_name LIKE %?%\", t, null);\n return false;\n }\n });\n return true;\n }", "public void showResult(View v) {\r\n\t\tList<String> routesList = new ArrayList<String>();\r\n\t\tfor (Bus p : boxAdapter.getSearchFlag()) {\r\n\t\t\tif (p.getSearchflag()) {\r\n\t\t\t\troutesList.add(p.getRouteNo() + \"_\" + p.getDirection()); \r\n\t\t\t\t/* p.Direction \r\n\t\t\t\t * 0 = Eastbound 1 = WestBound\r\n\t\t\t\t */\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (routesList.size() == 0) {\r\n\t\t\tToast.makeText(this, \"Please select at least one route.\",\r\n\t\t\t\t\tToast.LENGTH_LONG).show();\r\n\t\t}\r\n\r\n\t\telse {\r\n\t\t\tIntent intent = new Intent(self, SearchResultActivity.class);\r\n\t\t\tintent.putExtra(\"stopId\", busStopCode);\r\n\t\t\tintent.putExtra(\"stopName\", aBusStop.getStopName() + \" (\"\r\n\t\t\t\t\t+ aBusStop.getStopCode() + \")\");\r\n\t\t\tintent.putStringArrayListExtra(\"routes\",\r\n\t\t\t\t\t(ArrayList<String>) routesList);\r\n\t\t\ttry {\r\n\t\t\t\tstartActivityForResult(intent, 0);\r\n\t\t\t} finally {\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic boolean isSearching() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isSearching() {\n\t\treturn false;\n\t}", "private void searchItem(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "private void search()\n {\n JTextField searchField = (currentSearchView.equals(SEARCH_PANE_VIEW))? searchBar : resultsSearchBar;\n String searchTerm = searchField.getText();\n \n showTransition(2000);\n \n currentPage = 1;\n showResultsView(true);\n paginate(1, getResultsPerPage());\n\n if(searchWeb) showResultsTableView(WEB_RESULTS_PANE);\n else showResultsTableView(IMAGE_RESULTS_PANE);\n\n \n showSearchView(RESULTS_PANE_VIEW);\n resultsSearchBar.setText(searchTerm);\n }", "private Search() {}", "public void setReasonForSearch(WebDriver driver, String option) {\r\n \t\tcmPageHelper.waitForElementToBe(By.name(\"reason-for-search\"), \"PRESENCE\", driver);\r\n\t\tWebElement we = driver.findElement(By.name(\"reason-for-search\"));\r\n\t\twe.clear();\r\n\t\twe.sendKeys(Keys.DOWN);\r\n\t\twe.sendKeys(Keys.TAB);\r\n\t}", "@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 }", "private void searchBoxUsed(String txt){\n\t\t\tJFrame frame = new JFrame();\n\t\t\tArrayList<location> simLoc = dataBase.search(txt);\n\t\t\tif (simLoc == null) JOptionPane.showMessageDialog(frame, \"'\" + txt + \"' not found.\");\n\t\t\telse if (simLoc.size() == 1){\n\t\t\t\tlocation searchedLoc = simLoc.get(0);\n\t\t\t\tapp.addLocation(searchedLoc);\n\t\t\t\tapp.setVisibleLocation(searchedLoc);\n\t\t\t\tlocBar.removeActionListener(Jcombo);\n\t\t\t\tpopulateMyLocationsBox();\n\t\t\t\trefreshPanels();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString [] possibilities = new String[simLoc.size()];\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < simLoc.size(); i ++){\n\t\t\t\t\tpossibilities[i] = i + 1 + \". \" + simLoc.get(i).getName() + \", \" + simLoc.get(i).getCountryCode() + \" Lat: \" \n\t\t\t\t\t\t\t+ simLoc.get(i).getLatitude() + \" Long: \" + simLoc.get(i).getLongitude();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString response = (String) JOptionPane.showInputDialog(frame, \"Which '\" + txt + \"' did you mean?\", \"Search Location\", \n\t\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, null, possibilities, \"Titan\");\n\t\t\t\n\t\t\t\tif (response != null) {\n\t\t\t\t\t\tlocation searchedLoc = simLoc.get(Integer.parseInt(response.substring(0, response.indexOf('.'))) - 1);\n\t\t\t\t\t\tString[] temp = response.split(\" \");\n\t\t\t\t\t\tint length = app.getMyLocations().length;\n\t\t\t\t\t\tboolean add = true;\n\t\t\t\t\t\tfor (int i = 0; i < length; i ++){\n\t\t\t\t\t\t\tlocation checkLoc = app.getMyLocations()[i];\n\t\t\t\t\t\t\tif (checkLoc.getCityID() == searchedLoc.getCityID())\n\t\t\t\t\t\t\t\tadd = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (add) {\n\t\t\t\t\t\t\tapp.addLocation(searchedLoc);\n\t\t\t\t\t\t\tlocBar.removeActionListener(Jcombo);\n\t\t\t\t\t\t\tpopulateMyLocationsBox();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tapp.setVisibleLocation(searchedLoc);\n\t\t\t\t\t\trefreshPanels();\n\t\t\t\t }\n\t\t\t}\n\t\t}", "private void startSearch()\n {\n model.clear();\n ArrayList<String> result;\n if (orRadio.isSelected())\n {\n SearchEngine.search(highTerms.getText(), lowTerms.getText());\n result = SearchEngine.getShortForm();\n }\n else\n {\n SearchEngine.searchAnd(highTerms.getText(), lowTerms.getText());\n result = SearchEngine.getShortForm();\n }\n for (String s : result)\n {\n model.addElement(s);\n }\n int paragraphsRetrieved = result.size();\n reviewedField.setText(\" Retrieved \" + paragraphsRetrieved + \" paragraphs\");\n }", "String searchBoxUserRecordSelected();", "@java.lang.Override\n public boolean hasSearch() {\n return inputSourceCase_ == 10;\n }", "boolean getSearchable();", "@Override\r\n\t\tpublic void onIndexSelect(String str) {\n\t\t\tsearch_contact_suoyin.setVisibility(View.VISIBLE);\r\n\t\t\tsearch_contact_suoyin.setText(str);\r\n\t\t\tfor(int i = 0; i < listItems.size(); i++){\r\n\t\t\t\tif(listItems.get(i).getSuoyin().equals(str)){\r\n\t\t\t\t\tsearch_contact_listview.setSelection(i);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "private boolean searchBoxUsedTwo(String txt){\n\t\t\tJFrame frame = new JFrame();\n\t\t\tboolean boolTemp;\n\t\t\tArrayList<location> simLoc = dataBase.search(txt);\n\t\t\tif (simLoc == null){ \n\t\t\t\tJOptionPane.showMessageDialog(frame, \"'\" + txt + \"' not found.\");\n\t\t\t\tboolTemp = false;\n\t\t\t}\n\t\t\telse if (simLoc.size() == 1){\n\t\t\t\tlocation searchedLoc = simLoc.get(0);\n\t\t\t\tapp.addLocation(searchedLoc);\n\t\t\t\tapp.setVisibleLocation(searchedLoc);\n\t\t\t\tlocBar.removeActionListener(Jcombo);\n\t\t\t\tpopulateMyLocationsBox();\n\t\t\t\tboolTemp = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString [] possibilities = new String[simLoc.size()];\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < simLoc.size(); i ++){\n\t\t\t\t\tpossibilities[i] = i + 1 + \". \" + simLoc.get(i).getName() + \", \" + simLoc.get(i).getCountryCode() + \" Lat: \" \n\t\t\t\t\t\t\t+ simLoc.get(i).getLatitude() + \" Long: \" + simLoc.get(i).getLongitude();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString response = (String) JOptionPane.showInputDialog(frame, \"Which '\" + txt + \"' did you mean?\", \"Search Location\", \n\t\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, null, possibilities, \"Titan\");\n\t\t\t\n\t\t\t\tif (response != null) {\n\t\t\t\t\t\tlocation searchedLoc = simLoc.get(Integer.parseInt(response.substring(0, response.indexOf('.'))) - 1);\n\t\t\t\t\t\tString[] temp = response.split(\" \");\n\t\t\t\t\t\tint length = app.getMyLocations().length;\n\t\t\t\t\t\tboolean add = true;\n\t\t\t\t\t\tfor (int i = 0; i < length; i ++){\n\t\t\t\t\t\t\tlocation checkLoc = app.getMyLocations()[i];\n\t\t\t\t\t\t\tif (checkLoc.getCityID() == searchedLoc.getCityID())\n\t\t\t\t\t\t\t\tadd = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (add) {\n\t\t\t\t\t\t\tapp.addLocation(searchedLoc);\n\t\t\t\t\t\t\tlocBar.removeActionListener(Jcombo);\n\t\t\t\t\t\t\tpopulateMyLocationsBox();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tapp.setVisibleLocation(searchedLoc);\n\t\t\t\t\t\t\n\t\t\t\t }\n\t\t\t\tboolTemp = true;\n\t\t\t}\n\t\t\treturn boolTemp;\n\t\t}", "@java.lang.Override\n public boolean hasSearch() {\n return inputSourceCase_ == 10;\n }", "private void search() {\n \t\tString searchString = m_searchEditText.getText().toString();\n \n \t\t// Remove the refresh if it's scheduled\n \t\tm_handler.removeCallbacks(m_refreshRunnable);\n \t\t\n\t\tif ((searchString != null) && (!searchString.equals(\"\"))) {\n \t\t\tLog.d(TAG, \"Searching string: \\\"\" + searchString + \"\\\"\");\n \n \t\t\t// Save the search string\n \t\t\tm_lastSearch = searchString;\n \n \t\t\t// Disable the Go button to show that the search is in progress\n \t\t\tm_goButton.setEnabled(false);\n \n \t\t\t// Remove the keyboard to better show results\n \t\t\t((InputMethodManager) this\n \t\t\t\t\t.getSystemService(Service.INPUT_METHOD_SERVICE))\n \t\t\t\t\t.hideSoftInputFromWindow(m_searchEditText.getWindowToken(),\n \t\t\t\t\t\t\t0);\n \n \t\t\t// Start the search task\n \t\t\tnew HTTPTask().execute(searchString);\n \t\t\t\n \t\t\t// Schedule the refresh\n \t\t\tm_handler.postDelayed(m_refreshRunnable, REFRESH_DELAY);\n \t\t} else {\n \t\t\tLog.d(TAG, \"Ignoring null or empty search string.\");\n \t\t}\n \t}", "public boolean getLSearch () {\r\n return l_search;\r\n }", "private String getSearchText() {\n\t\treturn this.clientUI.getSearchField();\n\t}", "public List<Ve> searchVe(String maSearch);", "@Test\n\tpublic void VerifyTheSearchResult() {\n\t\tString searchString = \"The Choice\";\n\t\thomePage.search(searchString);\n\t\tString searchTitle = resultPage.getSearchResultTitle();\n\t\tAssert.assertTrue(searchTitle.contains(searchString));\n\t}", "private void searchDisplay()\r\n {\r\n System.out.println();\r\n System.out.println(\"------------ Search Menu ----------------\");\r\n System.out.println(\"(1) By Registration Number\");\r\n System.out.println(\"(2) By Car Make and Car Model\");\r\n System.out.println(\"(3) By Age\");\r\n System.out.println(\"(4) By Price (range)\");\r\n System.out.println(\"(5) Back to Main Menu\");\r\n }", "private void displaySearch() throws JSONException, InterruptedException {\r\n logger.log(Level.INFO, \"\\nPlease enter the name of the club you would \" +\r\n \"like to search for or 'back' to return to initial prompt:\");\r\n \r\n // club name that user searches for\r\n String club = in.nextLine();\r\n \r\n // exit if user chooses to do so, otherwise search database\r\n if (\"back\".equalsIgnoreCase(club))\r\n displayOpen();\r\n else\r\n searchClub(club);\r\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 abstract boolean getSensitiveSearch();", "@Override\n\tpublic boolean onSearchRequested()\n\t{\n \tstartSearch(getCurSearch(), true, null, false);\n \treturn true;\n\t}", "abstract public boolean performSearch();", "private ClubSearch() \r\n {\r\n in = new Scanner(System.in);\r\n db = DatabaseManager.getInstance();\r\n \r\n openPrompt = \"Would you like to search for a club, \" +\r\n \t \"filter by type of club, list clubs, or exit? (s/f/l/e)\";\r\n cDatabase = \"ClubDatabase\";\r\n cName = \"ClubName\";\r\n }", "private void setSearchItems(Number index) {\n String searchSelected;\n if (index == null) {\n searchSelected = searchSelection.getSelectionModel().getSelectedItem();\n } else {\n searchSelected = menuItems[index.intValue()];\n }\n\n final String searchText = searchField.getText().trim().toUpperCase();\n if (searchText == null || \"\".equals(searchText)) {\n // Search field is blank, remove filters if active\n if (searchFilter != null) {\n filterList.remove(searchFilter);\n searchFilter = null;\n }\n applyFilters();\n return;\n }\n\n boolean matchAny = MATCHANY.equals(searchSelected);\n\n if (searchFilter == null) {\n searchFilter = new CustomerListFilter();\n searchFilter.setOr(true);\n filterList.add(searchFilter);\n } else {\n searchFilter.getFilterList().clear();\n }\n if ((matchAny || SURNAME.equals(searchSelected))) {\n searchFilter.addFilter(a -> {\n String aSurname = a.getSurname().toUpperCase();\n return (aSurname.contains(searchText));\n });\n }\n if ((matchAny || FORENAME.equals(searchSelected))) {\n searchFilter.addFilter(a -> {\n String aForename = a.getForename().toUpperCase();\n return (aForename.contains(searchText));\n });\n }\n if (matchAny || CHILD.equals(searchSelected)) {\n searchFilter.addFilter(a -> {\n String aChildname = a.getChildrenProperty().getValue().toUpperCase();\n return (aChildname.contains(searchText));\n });\n }\n if ((matchAny || CARREG.equals(searchSelected))) {\n searchFilter.addFilter(a -> {\n String aCars = a.getCarRegProperty().getValue().toUpperCase();\n return (aCars.contains(searchText));\n });\n }\n // No filter to apply?\n if (searchFilter.getFilterList().size() == 0) {\n filterList.remove(searchFilter);\n searchFilter = null;\n }\n applyFilters();\n }", "private void executeSearch() {\n if (!view.getSearchContent().getText().isEmpty()) {\n SearchModuleDataHolder filter = SearchModuleDataHolder.getSearchModuleDataHolder();\n //set search content text for full text search\n filter.setSearchText(view.getSearchContent().getText());\n forwardToCurrentView(filter);\n } else {\n eventBus.showPopupNoSearchCriteria();\n }\n }", "public static void refreshStringSearchResults() {\n\t\tString fullSearchText = stringSearchTextField.getText();\n\t\tint fullSearchTextLength = fullSearchText.length();\n\t\t//get rid of any spaces, they're only good for loosening length verification\n\t\tchar[] searchText = fullSearchText.replace(\" \", \"\").toLowerCase().toCharArray();\n\t\tint searchTextLength = searchText.length;\n\t\tif (searchTextLength < 1)\n\t\t\tstringSearchResultsList.setEnabled(false);\n\t\telse {\n\t\t\tstringSearchResultsListModel.removeAllElements();\n\t\t\tsearchableStringsFoundIndices.clear();\n\t\t\t//go through every string and see if it matches the input\n\t\t\tint searchableStringsLength = searchableStrings.length;\n\t\t\tchar startChar = searchText[0];\n\t\t\tfor (int i = 0; i < searchableStringsLength; i++) {\n\t\t\t\tchar[] resultString = searchableStrings[i];\n\t\t\t\tint resultStringLength = resultString.length;\n\t\t\t\t//it can't start at an index if it would go past the end of the string\n\t\t\t\tint maxSearchIndex = resultStringLength - searchTextLength;\n\t\t\t\t//keep track of stats so that we can sort\n\t\t\t\tboolean stringPasses = false;\n\t\t\t\tint matchedLength = Integer.MAX_VALUE;\n\t\t\t\t//first, look for this char in the string\n\t\t\t\tfor (int k = 0; k <= maxSearchIndex; k++) {\n\t\t\t\t\t//we found a spot where it starts\n\t\t\t\t\t//now go through and see if we found our string here\n\t\t\t\t\t//if we find one, keep looking through the string to see if we can find a shorter match\n\t\t\t\t\tif (resultString[k] == startChar) {\n\t\t\t\t\t\t//1 character strings always match single characters\n\t\t\t\t\t\tif (searchTextLength == 1) {\n\t\t\t\t\t\t\tstringPasses = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor (int j = 1, newK = k + 1; newK < resultStringLength;) {\n\t\t\t\t\t\t\t\tif (searchText[j] == resultString[newK]) {\n\t\t\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\t\t\t//if we got through all our characters, the string matches\n\t\t\t\t\t\t\t\t\tif (j == searchTextLength) {\n\t\t\t\t\t\t\t\t\t\tstringPasses = true;\n\t\t\t\t\t\t\t\t\t\tmatchedLength = Math.min(matchedLength, newK - k + 1);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnewK++;\n\t\t\t\t\t\t\t\t//the string appears not to match, stop searching here\n\t\t\t\t\t\t\t\tif (newK - k >= fullSearchTextLength * 2)\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}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (stringPasses)\n\t\t\t\t\tsearchableStringsFoundIndices.add(new mark(i, matchedLength, resultStringLength));\n\t\t\t}\n\t\t\tif (searchableStringsFoundIndices.size() <= MAX_SEARCH_RESULTS) {\n\t\t\t\tstringSearchResultsList.setEnabled(true);\n\t\t\t\tCollections.sort(searchableStringsFoundIndices);\n\t\t\t\tfor (mark foundIndexStats : searchableStringsFoundIndices)\n\t\t\t\t\tstringSearchResultsListModel.addElement(allStringsListModel.get(foundIndexStats.searchableStringFoundIndex));\n\t\t\t} else {\n\t\t\t\tstringSearchResultsList.setEnabled(false);\n\t\t\t\tstringSearchResultsListModel.addElement(\"Please narrow your search to no more than \" +\n\t\t\t\t\tMAX_SEARCH_RESULTS + \" results (got \" + searchableStringsFoundIndices.size() + \")\");\n\t\t\t}\n\t\t}\n\t}", "public String extractresult(String search) {\n\t\tfd.findElement(By.id(\"sb_form_q\")).sendKeys(search);\r\n\t\tfd.findElement(By.id(\"sb_form_go\")).click();\r\n\t\t\r\n\t\treturn fd.findElement(By.className(\"sb_count\")).getText();\t\r\n\t}", "@java.lang.Override\n public com.clarifai.grpc.api.Search getSearch() {\n if (searchBuilder_ == null) {\n if (inputSourceCase_ == 10) {\n return (com.clarifai.grpc.api.Search) inputSource_;\n }\n return com.clarifai.grpc.api.Search.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 10) {\n return searchBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.Search.getDefaultInstance();\n }\n }", "public void setSearchResultLabel(String resultLabel){ searchResultLabel.setText(resultLabel);}", "private void doSearch(String queryStr) {\n\t\t\n\t\t\n\t\tdbHelper = new DatabaseHelper(getApplicationContext());\n\t\tall_Item = Items.getSearchResults(dbHelper, queryStr);\n\t\t\n\n\t\tsearch_list = (ListView) findViewById(R.id.search_list);\n\t\tadapter = new SearchResultListAdaptor(this, R.layout.search_list_display, all_Item);\n\t\tfor(int i=0;i<all_Item.size();i++)\n\t\t adapter.add(all_Item.get(i));\n\t\t\n\t\tsearch_list.setAdapter(adapter);\n\t\t\n\t\t\n\t}", "public void setSearchOptions(SearchOptions options) {\n searchOptions_ = options;\n }", "public void doSearch(String searchText){\n }", "public abstract Search defaultSearch(StringBuilder sb);", "private void searchQuery() {\n edit_search.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n if (paletteComposition.getVisibility() == View.VISIBLE){\n paletteComposition.setVisibility(View.GONE);\n setComposer.setVisibility(View.VISIBLE);\n }\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n setContactThatNameContains(s.toString().trim());\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n }", "public String conductSearchForItem()\r\n\t{\r\n\t\tAdvancedSearch_Model query = new AdvancedSearch_Model();\r\n\t\t\r\n\t\tif (this.typeFilter.equals(\"Subject\"))\r\n\t\t{\r\n\t\t\tquery.addSearchTerm(Requirement.MUST, QueryType.CONTAIN, Constants.SEARCH_DOCUMENT_FIELD_CATEGORY, this.selectedItem.getTerm());\r\n\t\t}\r\n\t\tif (this.typeFilter.equals(\"Type\"))\r\n\t\t{\r\n\t\t\tquery.addSearchTerm(Requirement.MUST, QueryType.TERM_QUERY, Constants.SEARCH_DOCUMENT_FIELD_TYPE, this.selectedItem.getTerm());\r\n\t\t}\r\n\t\tif (this.typeFilter.equals(\"Creator\"))\r\n\t\t{\r\n\t\t\tquery.addSearchTerm(Requirement.MUST, QueryType.CONTAIN, Constants.SEARCH_DOCUMENT_FIELD_CREATOR, this.selectedItem.getTerm());\r\n\t\t}\r\n\t\tif (this.typeFilter.equals(\"Location\"))\r\n\t\t{\r\n\t\t\tquery.addSearchTerm(Requirement.MUST, QueryType.TERM_QUERY, Constants.SEARCH_DOCUMENT_FIELD_LOCATION,\r\n\t\t\t this.selectedItem.getTerm());\r\n\t\t\tquery.addSearchTerm(Requirement.MUST, QueryType.TERM_QUERY, Constants.SEARCH_DOCUMENT_FIELD_TYPE, this.selectedItem.getType());\r\n\t\t}\r\n\t\t\r\n\t\t// Set the AdvancedSearch_Model on the Search Backing Bean\r\n\t\tthis.searchBackingBean.setAdvancedQueryModel(query);\r\n\t\tthis.searchBackingBean.setSimpleOrAdvanced(SimpleOrAdvanced.ADVANCED);\r\n\t\tthis.searchBackingBean.setSearchType(\"all\");\r\n\t\tthis.searchBackingBean.autoSearch();\r\n\t\t\r\n\t\t// Transfer the user to the Search Results page\r\n\t\tthis.pageBackingBean.setRenderPage(Constants.PAGE_RESTRICTED_SEARCHRESULTS);\r\n\t\t\r\n\t\treturn \"update\";\r\n\t}", "private String getCurSearch()\n\t{\n\t\tif (mToNavi)\n\t\t\treturn mCurSearch;\n\t\telse\n\t\t\treturn mCurSearchNavi;\n\t}", "public GameList getSearchResult(){ return m_NewSearchResult;}", "@Test\n\tpublic void testSearchSelection() throws Exception {\n\t\t// select an area known to have some strings\n\t\tAddressSet set = new AddressSet();\n\t\tset.addRange(addr(0x405d80), addr(0x405dc0));\n\n\t\t// select the address set\n\t\ttool.firePluginEvent(\n\t\t\tnew ProgramSelectionPluginEvent(\"Test\", new ProgramSelection(set), program));\n\n\t\twaitForSwing();\n\n\t\tdialog = getDialog();\n\t\tContainer container = dialog.getComponent();\n\n\t\t// check to make sure the search selection button is checked and enabled\n\t\tJRadioButton rb = (JRadioButton) findButton(container, \"Search Selection\");\n\t\tassertTrue(rb.isSelected());\n\t\tassertTrue(rb.isEnabled());\n\n\t\tStringTableProvider provider = performSearch();\n\t\tStringTableModel model = (StringTableModel) getInstanceField(\"stringModel\", provider);\n\t\ttoggleDefinedStateButtons(provider, false, true, false, false);\n\t\twaitForTableModel(model);\n\n\t\tassertEquals(3, model.getRowCount());\n\n\t\t// test the results size and that the correct strings are found\n\t\tint row = findRow(model, addr(0x405d81));\n\t\tassertEquals(\"00405d81\", getModelValue(model, row, addressColumnIndex).toString());\n\t\trow = findRow(model, addr(0x405d9c));\n\t\tassertEquals(\"00405d9c\", getModelValue(model, row, addressColumnIndex).toString());\n\t\trow = findRow(model, addr(0x405db4));\n\t\tassertEquals(\"00405db4\", getModelValue(model, row, addressColumnIndex).toString());\n\t}", "private void onClickSearch() {\n if (lat.isEmpty() || lon.isEmpty()) {\n Toast.makeText(\n self,\n getResources()\n .getString(R.string.wait_for_getting_location),\n Toast.LENGTH_SHORT).show();\n getLatLong();\n }\n //get current distance search :\n distance = ((double) skbDistance.getProgress() / 10) + \"\";\n\n Bundle b = new Bundle();\n b.putString(GlobalValue.KEY_SEARCH, edtSearch.getText().toString());\n b.putString(GlobalValue.KEY_CATEGORY_ID, categoryId);\n b.putString(GlobalValue.KEY_CITY_ID, cityId);\n b.putString(GlobalValue.KEY_OPEN, ALL_OR_OPEN);\n b.putString(GlobalValue.KEY_DISTANCE, distance);\n b.putString(GlobalValue.KEY_SORT_BY, SORT_BY);\n b.putString(GlobalValue.KEY_SORT_TYPE, SORT_TYPE);\n if (Constant.isFakeLocation) {\n b.putString(GlobalValue.KEY_LAT, GlobalValue.glatlng.latitude + \"\");\n b.putString(GlobalValue.KEY_LONG, GlobalValue.glatlng.longitude + \"\");\n } else {\n b.putString(GlobalValue.KEY_LAT, lat);\n b.putString(GlobalValue.KEY_LONG, lon);\n }\n\n if (isSelectShop)\n ((MainTabActivity) getParent()).gotoActivity(\n SearchShopResultActivity.class, b);\n else\n ((MainTabActivity) getParent()).gotoActivity(\n SearchProductResultActivity.class, b);\n }", "protected String getSearchHint() {\n if (!isMessageListReady()) {\n return \"\";\n }\n Account account = getMessageListFragment().getAccount();\n Mailbox mailbox = getSearchableMailbox();\n\n if (mailbox == null) {\n return \"\";\n }\n\n if (shouldDoGlobalSearch(account, mailbox)) {\n return mActivity.getString(R.string.search_hint);\n }\n\n // Regular mailbox, or IMAP - search within that mailbox.\n String mailboxName = FolderProperties.getInstance(mActivity).getDisplayName(mailbox);\n return String.format(\n mActivity.getString(R.string.search_mailbox_hint),\n mailboxName);\n }", "private void search(String querySearch) {\n searchResult = new ArrayList<>();\n for (MonitoringModel item : searchList) {\n if (item.getPROG_ID().toLowerCase().contains(querySearch) || item.getPROG_ID().contains(querySearch) ||\n item.getKEPUTUSAN().toLowerCase().contains(querySearch) || item.getKEPUTUSAN().contains(querySearch) ||\n Common.formatTgl(item.getTGL_TARGET()).toLowerCase().contains(querySearch) || Common.formatTgl(item.getTGL_TARGET()).contains(querySearch) ||\n Common.formatStatusMonitoringToString(item.getLAST_STATUS()).toLowerCase().contains(querySearch) || Common.formatStatusMonitoringToString(item.getLAST_STATUS()).contains(querySearch)) {\n searchResult.add(item);\n }\n }\n if (searchResult.isEmpty())\n tvEmptySearch.setText(\"No results found for '\" + querySearch + \"'\");\n else\n tvEmptySearch.setText(\"\");\n\n searchAdapter = new ListAdapter(getContext(), searchResult);\n rvList.setAdapter(searchAdapter);\n }", "public void onSearchButtonClick(View view){\r\n\t\t\r\n\t\tfor (ListingItem item : ListingContent.ITEMS) {\r\n\t\t\tif (item.content.toUpperCase(Locale.getDefault()).contains(searchField.getText().toString().toUpperCase(Locale.getDefault()))) {\r\n\t\t\t\tresults.add(item);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tsetListAdapter(new ArrayAdapter<ListingContent.ListingItem>(this,\r\n\t\t\t\tandroid.R.layout.simple_list_item_1,\r\n\t\t\t\tandroid.R.id.text1, results));\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n // Inflate the options menu from XML\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.options_menu, menu);\n\n // Todo(32) gather all search view code in one place\n\n // further code, initializes SearchView menu item:\n // Get the SearchView and set the searchable configuration\n final SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);\n searchView = (SearchView) menu.findItem(R.id.action_search).getActionView();\n // Assumes current activity is the searchable activity\n searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));\n // further customization of the SearchView\n searchView.setIconifiedByDefault(true);\n searchView.setQueryHint(getString(R.string.search_hint_text_for_search_widget));\n int width = AppUtilities.getDisplayWidth(this);\n searchView.setMaxWidth(width);\n // set a Listener to the SearchView so that the Search query being entered could be persisted\n searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n /*\n * Method that tracks the state of SearchView (whether the user has submitted the query)\n * */\n @Override\n public boolean onQueryTextSubmit(String query) {\n searchQueryToRestore = query;\n // update the state variable\n searchQueryIsSubmitted = true;\n // remove focus from SearchView\n rootLayout.requestFocus();\n return false;\n }\n\n /*\n * Method that tracks the contents of search query being entered\n * */\n @Override\n public boolean onQueryTextChange(String newText) {\n // store the search query being entered in a global object that will be used to persist data\n // note: intentionally we use another string instead of @searchQueryToRestore, as SearchView\n // query is at first set to null (at the time SearchView is initialised), before setQuery()\n // method is called\n searchQueryToListen = newText;\n return false;\n }\n });\n\n\n // Todo(31) replace to the correct place in the code\n\n // listener that sets boolean values for @searchModeIsOn\n MenuItemCompat.setOnActionExpandListener(menu.findItem(searchView.getId()), new MenuItemCompat.OnActionExpandListener() {\n @Override\n public boolean onMenuItemActionExpand(MenuItem item) {\n searchModeIsOn = true;\n return true;\n }\n\n @Override\n public boolean onMenuItemActionCollapse(MenuItem item) {\n searchModeIsOn = false;\n\n // if no search query has been submitted, just close the search view,\n // else - reload the data\n if(!searchQuerySubmitted.equals(\"\")){\n performNewQuery();\n searchQuerySubmitted = \"\";\n }\n\n return true;\n }\n });\n\n // Restore the state of SearchView (if it was open before orientation change, or before\n // leaving the activity);\n if(searchModeIsOn){\n // expandActionView() expands / gives focus to the SearchView\n // note: it needs to be called before setQuery() method\n menu.findItem(searchView.getId()).expandActionView();\n searchView.setQuery(searchQueryToRestore, false);\n // restore the focus state\n if(searchQueryIsSubmitted){\n // if submitted - remove the focus (also removes the soft keyboard)\n searchView.clearFocus();\n rootLayout.requestFocus();\n }\n }\n return true;\n }", "@java.lang.Override\n public com.clarifai.grpc.api.Search getSearch() {\n if (inputSourceCase_ == 10) {\n return (com.clarifai.grpc.api.Search) inputSource_;\n }\n return com.clarifai.grpc.api.Search.getDefaultInstance();\n }", "boolean hasSearchValue();", "@Override\n public boolean onQueryTextChange(String s) {\n if(s.isEmpty() && amenList.isEmpty()){\n searchResultsCard.setVisibility(View.GONE);\n }else {\n searchResultsCard.setVisibility(View.VISIBLE);\n }\n placesAdaptor.getFilter( ).filter(s);\n //if no results available, hide the result card\n //self-checking if there is any results, as filter results only available after\n //this method ends\n boolean noResult=true;\n ArrayList<PlacesDataClass> tempFilter=placesAdaptor.getFiltered( );\n if(tempFilter.isEmpty()) {\n ArrayList<String> temp_filter=new ArrayList<String>(Arrays.asList(placesName));\n for(String a:temp_filter){\n if(a.toLowerCase().contains(s.toLowerCase())){\n noResult=false;\n }\n }\n }else {\n for (PlacesDataClass object : tempFilter) {\n // the filtering itself:\n if (object.toString( ).toLowerCase( ).contains(s.toLowerCase( )))\n noResult=false;\n }\n }//if no results available then display the no results text\n if (noResult) {\n noResultsFoundText.setVisibility(View.VISIBLE);\n } else noResultsFoundText.setVisibility(View.GONE);\n Log.i(\"results number\", \"query: \"+s+\"; no result: \"+noResult);\n // ---------------Change-----------------\n while (!origin.isEmpty( )) {\n origin.remove(0);\n }\n\n return false;\n }", "String getSelectedAutoCompleteString();", "public QueryResultBuilder<T> applySearch(Option<Search> search);", "@Override \n public void onActivityResult(int requestCode, int resultCode, Intent data) \n { \n \n if(requestCode==1) \n { \n \tString barcode=data.getStringExtra(\"BARCODE\");\n \tif (barcode.equals(\"NULL\"))\n \t{\n \t\t//that means barcode could not be identified or user pressed the back button\n \t\t//do nothing\t\n \t}\n \telse\n \t{\n \t\tsearch.setQuery(barcode, true);\n \t\tsearch.setIconifiedByDefault(false);\n \t}\n }\n \n if (requestCode == 2) {\n ArrayList<String> results;\n results = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\n //Toast.makeText(this, results.get(0), Toast.LENGTH_SHORT).show();\n \n //if the name has an ' then the SQL is failing. Hence replacing them. \n String text = results.get(0).replace(\"'\",\"\");\n search.setQuery(text, true);\n \t\tsearch.setIconifiedByDefault(false);\n }\n \n }" ]
[ "0.7019858", "0.6841753", "0.6673432", "0.65795416", "0.65673643", "0.6547756", "0.6546093", "0.6457429", "0.64480704", "0.644072", "0.6423457", "0.6423457", "0.64108026", "0.63638866", "0.63516724", "0.6347788", "0.6304816", "0.62593687", "0.6231569", "0.62184423", "0.6184531", "0.6169098", "0.6162176", "0.6159969", "0.61529905", "0.6138047", "0.61317337", "0.6122093", "0.6120339", "0.6111018", "0.61087286", "0.60967803", "0.60967803", "0.6093858", "0.6084057", "0.6081051", "0.60559094", "0.6051378", "0.6034603", "0.60318923", "0.60265166", "0.60251033", "0.60240567", "0.59865564", "0.5982837", "0.5973839", "0.5958935", "0.59570783", "0.59495974", "0.59495974", "0.5937322", "0.5928015", "0.5914507", "0.5912047", "0.59097296", "0.59057987", "0.59050244", "0.5876787", "0.5854319", "0.58538413", "0.5852037", "0.5849906", "0.5844593", "0.5844387", "0.5843484", "0.58367896", "0.5829497", "0.58108544", "0.5807651", "0.5805385", "0.5801495", "0.5799546", "0.57968223", "0.57937956", "0.57880694", "0.57841945", "0.576834", "0.5766581", "0.5764926", "0.57624274", "0.57619", "0.5759097", "0.57569826", "0.57565176", "0.57564366", "0.5752959", "0.5750063", "0.5741684", "0.5733403", "0.57311183", "0.572919", "0.5723439", "0.57234085", "0.5722246", "0.5721199", "0.57184535", "0.570757", "0.57034993", "0.5686365", "0.5684367", "0.56721437" ]
0.0
-1
modified by xingjun 17/06/2010 added code to display what the user search for
public String getTitle() { String displayInput = input; String organTitle = (focusedOrgan==null || focusedOrgan=="")? "" : " in <em>" + DatabaseHomepageBean.getOrganName(focusedOrgan) + "</em>"; return "Result of <em>" + query + "</em> query for <em> " + displayInput + "</em>" + organTitle; // return "Gene Query"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void searchDisplay()\r\n {\r\n System.out.println();\r\n System.out.println(\"------------ Search Menu ----------------\");\r\n System.out.println(\"(1) By Registration Number\");\r\n System.out.println(\"(2) By Car Make and Car Model\");\r\n System.out.println(\"(3) By Age\");\r\n System.out.println(\"(4) By Price (range)\");\r\n System.out.println(\"(5) Back to Main Menu\");\r\n }", "public void search() {\n String q = this.query.getText();\n String cat = this.category.getValue();\n if(cat.equals(\"Book\")) {\n searchBook(q);\n } else {\n searchCharacter(q);\n }\n }", "public String search() {\r\n\t\tgetNavigationPanel(3);\r\n\t\treturn SUCCESS;\r\n\t}", "void searchUI();", "private void search()\n {\n JTextField searchField = (currentSearchView.equals(SEARCH_PANE_VIEW))? searchBar : resultsSearchBar;\n String searchTerm = searchField.getText();\n \n showTransition(2000);\n \n currentPage = 1;\n showResultsView(true);\n paginate(1, getResultsPerPage());\n\n if(searchWeb) showResultsTableView(WEB_RESULTS_PANE);\n else showResultsTableView(IMAGE_RESULTS_PANE);\n\n \n showSearchView(RESULTS_PANE_VIEW);\n resultsSearchBar.setText(searchTerm);\n }", "public void search() {\r\n \t\r\n }", "void search();", "void search();", "private void displaySearch() throws JSONException, InterruptedException {\r\n logger.log(Level.INFO, \"\\nPlease enter the name of the club you would \" +\r\n \"like to search for or 'back' to return to initial prompt:\");\r\n \r\n // club name that user searches for\r\n String club = in.nextLine();\r\n \r\n // exit if user chooses to do so, otherwise search database\r\n if (\"back\".equalsIgnoreCase(club))\r\n displayOpen();\r\n else\r\n searchClub(club);\r\n }", "Search getSearch();", "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 }", "private void searchFunction() {\n\t\t\r\n\t}", "void searchView(String name);", "@Override\n\tpublic void searchByName() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Patient's name\").toString().equals(search))\n\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t++count + \" Name:\" + jsnobj.get(\"Patient's name\") + \" ID:\" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t\t\t\t+ \" Mobile:\" + jsnobj.get(\"Mobile\") + \" Age:\" + jsnobj.get(\"Age\"));\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t}", "private void searchWord()\n {\n String inputWord = searchField.getText();\n \n if(inputWord.isEmpty())\n queryResult = null;\n \n else\n {\n char firstLetter = inputWord.toUpperCase().charAt(0);\n \n for(int i = 0 ; i < lexiNodeTrees.size() ; i++)\n {\n if(lexiNodeTrees.get(i).getCurrentCharacter() == firstLetter)\n {\n queryResult = lexiNodeTrees.get(i).searchWord(inputWord, false);\n i = lexiNodeTrees.size(); // escape the loop\n }\n }\n }\n \n // update the list on the GUI\n if(queryResult != null)\n {\n ArrayList<String> words = new ArrayList<>();\n for(WordDefinition word : queryResult)\n {\n words.add(word.getWord());\n }\n \n // sort the list of words alphabetically \n Collections.sort(words);\n \n // display the list of wordsin the UI\n DefaultListModel model = new DefaultListModel();\n for(String word : words)\n {\n model.addElement(word);\n }\n\n this.getSearchSuggestionList().setModel(model);\n }\n \n else\n this.getSearchSuggestionList().setModel( new DefaultListModel() );\n }", "public void search() {\n }", "String printListSearch(String searchString);", "private void startSearch()\n {\n model.clear();\n ArrayList<String> result;\n if (orRadio.isSelected())\n {\n SearchEngine.search(highTerms.getText(), lowTerms.getText());\n result = SearchEngine.getShortForm();\n }\n else\n {\n SearchEngine.searchAnd(highTerms.getText(), lowTerms.getText());\n result = SearchEngine.getShortForm();\n }\n for (String s : result)\n {\n model.addElement(s);\n }\n int paragraphsRetrieved = result.size();\n reviewedField.setText(\" Retrieved \" + paragraphsRetrieved + \" paragraphs\");\n }", "@Action\r\n public String search() {\n ServiceFunctions.clearCache();\r\n\r\n if (isAdmin()) {\r\n return adminSearch();\r\n }\r\n\r\n return publicSearch();\r\n }", "String searchBoxUserRecordSelected();", "String searchBoxUserRecord();", "@In String search();", "private String getSearchText() {\n\t\treturn this.clientUI.getSearchField();\n\t}", "private void searchMenu(){\n\t\t\n\t}", "public String getSearchHint();", "java.lang.String getSearchValue();", "public void searchFor(View view) {\n // Get a handle for the editable text view holding the user's search text\n EditText userInput = findViewById(R.id.user_input_edit_text);\n // Get the characters from the {@link EditText} view and convert it to string value\n String input = userInput.getText().toString();\n\n // Search filter for search text matching book titles\n RadioButton mTitleChecked = findViewById(R.id.title_radio);\n // Search filter for search text matching authors\n RadioButton mAuthorChecked = findViewById(R.id.author_radio);\n // Search filter for search text matching ISBN numbers\n RadioButton mIsbnChecked = findViewById(R.id.isbn_radio);\n\n if (!input.isEmpty()) {\n // On click display list of books matching search criteria\n // Build intent to go to the {@link QueryResultsActivity} activity\n Intent results = new Intent(MainActivity.this, QueryListOfBookActivity.class);\n\n // Get the user search text to {@link QueryResultsActivity}\n // to be used while creating the url\n results.putExtra(\"topic\", mUserSearch.getText().toString().toLowerCase());\n\n // Pass search filter, if any\n if (mTitleChecked.isChecked()) {\n // User is searching for book titles that match the search text\n results.putExtra(\"title\", \"intitle=\");\n } else if (mAuthorChecked.isChecked()) {\n // User is searching for authors that match the search text\n results.putExtra(\"author\", \"inauthor=\");\n } else if (mIsbnChecked.isChecked()) {\n // User is specifically looking for the book with the provided isbn number\n results.putExtra(\"isbn\", \"isbn=\");\n }\n\n // Pass on the control to the new activity and start the activity\n startActivity(results);\n\n } else {\n // User has not entered any search text\n // Notify user to enter text via toast\n\n Toast.makeText(\n MainActivity.this,\n getString(R.string.enter_text),\n Toast.LENGTH_SHORT)\n .show();\n }\n }", "@Override\r\n\tpublic String popupSearch(String criteria) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String popupSearch(String criteria) {\n\t\treturn null;\r\n\t}", "public void searchPerson() {\r\n\r\n\t/*get values from text filed*/\r\n\tname = tfName.getText();\r\n\r\n\t/*clear contents of arraylist if there are any from previous search*/\r\n\tpersonsList.clear();\r\n\r\n // intialize recordNumber to zero\r\n\trecordNumber = 0;\r\n\r\n\tif(name.equals(\"\"))\r\n\t{\r\n\t\tJOptionPane.showMessageDialog(null,\"Please enter person name to search.\");\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/*get an array list of searched persons using PersonDAO*/\r\n\t\tpersonsList = pDAO.searchPerson(name);\r\n\r\n\t\tif(personsList.size() == 0)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(null, \"No record found.\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t/*downcast the object from array list to PersonInfo*/\r\n\t\t\tPersonInfo person = (PersonInfo) personsList.get(recordNumber);\r\n\r\n // displaying search record in text fields \r\n\t\t\ttfName.setText(person.getName());\r\n\t\t\ttfAddress.setText(person.getAddress());\r\n\t\t\ttfPhone.setText(\"\"+person.getPhone());\r\n\t\t\ttfEmail.setText(person.getEmail());\r\n\t\t}\r\n\t}\r\n\r\n }", "private void performSearch() {\n String text = txtSearch.getText();\n String haystack = field.getText();\n \n // Is this case sensitive?\n if (!chkMatchCase.isSelected()) {\n text = text.toLowerCase();\n haystack = haystack.toLowerCase();\n }\n \n // Check if it is a new string that the user is searching for.\n if (!text.equals(needle)) {\n needle = text;\n curr_index = 0;\n }\n \n // Grab the list of places where we found it.\n populateFoundList(haystack);\n \n // Nothing was found.\n if (found.isEmpty()) {\n Debug.println(\"FINDING\", \"No occurrences of \" + needle + \" found.\");\n JOptionPane.showMessageDialog(null, \"No occurrences of \" + needle + \" found.\",\n \"Nothing found\", JOptionPane.INFORMATION_MESSAGE);\n \n return;\n }\n \n // Loop back the indexes if we have reached the end.\n if (curr_index == found.size()) {\n curr_index = 0;\n }\n \n // Go through the findings one at a time.\n int indexes[] = found.get(curr_index);\n field.select(indexes[0], indexes[1]);\n curr_index++;\n }", "abstract public void search();", "public void performSearch() {\n History.newItem(MyWebApp.SEARCH_RESULTS);\n getMessagePanel().clear();\n if (keywordsTextBox.getValue().isEmpty()) {\n getMessagePanel().displayMessage(\"Search term is required.\");\n return;\n }\n mywebapp.getResultsPanel().resetSearchParameters();\n //keyword search does not restrict to spots\n mywebapp.addCurrentLocation();\n if (markFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(markFilterCheckbox.getValue());\n }\n if (contestFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setContests(contestFilterCheckbox.getValue());\n }\n if (geoFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setGeospatialOff(!geoFilterCheckbox.getValue());\n }\n if (plateFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(plateFilterCheckbox.getValue());\n }\n if (spotFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setSpots(spotFilterCheckbox.getValue());\n }\n String color = getValue(colorsListBox);\n mywebapp.getResultsPanel().getSearchParameters().setColor(color);\n String manufacturer = getValue(manufacturersListBox);\n if (manufacturer != null) {\n Long id = new Long(manufacturer);\n mywebapp.getResultsPanel().getSearchParameters().setManufacturerId(id);\n }\n String vehicleType = getValue(vehicleTypeListBox);\n mywebapp.getResultsPanel().getSearchParameters().setVehicleType(vehicleType);\n// for (TagHolder tagHolder : tagHolders) {\n// mywebapp.getResultsPanel().getSearchParameters().getTags().add(tagHolder);\n// }\n mywebapp.getResultsPanel().getSearchParameters().setKeywords(keywordsTextBox.getValue());\n mywebapp.getMessagePanel().clear();\n mywebapp.getResultsPanel().performSearch();\n mywebapp.getTopMenuPanel().setTitleBar(\"Search\");\n //mywebapp.getResultsPanel().setImageResources(resources.search(), resources.searchMobile());\n }", "private void searchQuery() {\n edit_search.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n if (paletteComposition.getVisibility() == View.VISIBLE){\n paletteComposition.setVisibility(View.GONE);\n setComposer.setVisibility(View.VISIBLE);\n }\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n setContactThatNameContains(s.toString().trim());\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n }", "@Override\r\n\tpublic void search() {\n\r\n\t}", "@Override\n\tpublic void search() {\n\t}", "public Show search(String title){\n return super.search(title);\n }", "private void showSearch() {\n\t\tonSearchRequested();\n\t}", "private void searchforResults() {\n\n List<String> queryList = new SavePreferences(this).getStringSetPref();\n if(queryList != null && queryList.size() > 0){\n Log.i(TAG, \"Searching for results \" + queryList.get(0));\n Intent searchIntent = new Intent(Intent.ACTION_WEB_SEARCH);\n searchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n searchIntent.putExtra(SearchManager.QUERY, queryList.get(0));\n this.startActivity(searchIntent);\n }\n }", "public void searchFunction() {\n textField_Search.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n tableView.setPredicate(new Predicate<TreeItem<EntryProperty>>() {\n @Override\n public boolean test(TreeItem<EntryProperty> entryTreeItem) {\n Boolean flag = entryTreeItem.getValue().titleProperty().getValue().toLowerCase().contains(newValue.toLowerCase()) ||\n entryTreeItem.getValue().usernameProperty().getValue().toLowerCase().contains(newValue.toLowerCase());\n return flag;\n }\n });\n }\n });\n }", "public String search() {\r\n currentRoom = player.getCurrentRoom();\r\n String res = \"You start searching the room....\";\r\n if (currentRoom.getChestSize() > 0) {\r\n res += \"You find a treasure chest in the corner...\" + System.lineSeparator();\r\n res += \"You pick up the following items from the chest and put them in your backpack\" + System.lineSeparator();\r\n res += currentRoom.getItemsInChest();\r\n } else {\r\n res = \"You find nothing of intrest in the room...\";\r\n }\r\n return res;\r\n }", "public void searchPerson() {\n\t\tSystem.out.println(\"*****Search a person*****\");\n\t\tSystem.out.println(\"Enter Phone Number to search: \");\n\t\tlong PhoneSearch = sc.nextLong();\n\t\tfor (int i = 0; i < details.length; i++) {\n\t\t\tif (details[i] != null && details[i].getPhoneNo() == PhoneSearch) {\n\t\t\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\t\t\tSystem.out.println(details[i]);\n\t\t\t}\n\t\t}\n\t}", "public void searchOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Search by - Title |\");\n System.out.println(\"\\t\\t| [2] Search by - Directors |\");\n System.out.println(\"\\t\\t| [3] Back To Menu |\");\n System.out.println(\"\\t\\t=================================\");\n System.out.print(\"\\t\\t Input the option number : \"); \n }", "TextBox getSearchContent();", "void searchProbed (Search search);", "private static void searchForItem() {\r\n\t\tSystem.out.println(\"******************************************************************************************\");\r\n\t\tSystem.out.println(\" Please type your search queries\");\r\n\t\tSystem.out.println();\r\n\t\tString choice = \"\";\r\n\t\tif (scanner.hasNextLine()) {\r\n\t\t\tchoice = scanner.nextLine();\r\n\t\t}\r\n\t\t//Currently only supports filtering by name\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" All products that matches your search are as listed\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Id|Name |Brand |Price |Total Sales\");\r\n\t\tint productId = 0;\r\n\t\tfor (Shop shop : shops) {\r\n\t\t\tint l = shop.getAllSales().length;\r\n\t\t\tfor (int j = 0; j < l; j++) {\r\n\t\t\t\tif (shop.getAllSales()[j].getName().contains(choice)) {\r\n\t\t\t\t\tprintProduct(productId, shop.getAllSales()[j]);\r\n\t\t\t\t}\r\n\t\t\t\tproductId++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void search(SearchRequest request) {\r\n\t\tif(request == null)return;\r\n\t\tList<Record> results = handler.search(request);\r\n\t\tlist.show(results);\r\n\t\tpanInfo.setNumRec(results.size());\r\n\t\tpanInfo.setTotalAmt(Record.sumBalance(results));\r\n\t}", "private void searchPatient() {\r\n String lName, fName;\r\n lName = search_lNameField.getText();\r\n fName = search_fNameField.getText();\r\n // find patients with the Last & First Name entered\r\n patientsFound = MainGUI.pimsSystem.search_patient(lName, fName);\r\n\r\n // more than one patient found\r\n if (patientsFound.size() > 1) {\r\n\r\n // create String ArrayList of patients: Last, First (DOB)\r\n ArrayList<String> foundList = new ArrayList<String>();\r\n String toAdd = \"\";\r\n // use patient data to make patient options to display\r\n for (patient p : patientsFound) {\r\n toAdd = p.getL_name() + \", \" + p.getF_name() + \" (\" + p.getDob() + \")\";\r\n foundList.add(toAdd);\r\n }\r\n int length;\r\n // clear combo box (in case this is a second search)\r\n while ((length = selectPatient_choosePatientCB.getItemCount()) > 0) {\r\n selectPatient_choosePatientCB.removeItemAt(length - 1);\r\n }\r\n // add Patient Options to combo box\r\n for (int i = 0; i < foundList.size(); i++) {\r\n selectPatient_choosePatientCB.addItem(foundList.get(i));\r\n }\r\n\r\n // display whether patients found or not\r\n JOptionPane.showMessageDialog(this, \"Found More than 1 Result for Last Name, First Name: \" + lName + \", \" + fName\r\n + \".\\nPress \\\"Ok\\\" to select a patient.\",\r\n \"Search Successful\", JOptionPane.DEFAULT_OPTION);\r\n\r\n selectPatientDialog.setVisible(true);\r\n }\r\n\r\n // one patient found\r\n else if (patientsFound.size() == 1) {\r\n\r\n JOptionPane.showMessageDialog(this, \"Found one match for Last Name, First Name: \" + lName + \", \" + fName,\r\n \"Search Successful\", JOptionPane.DEFAULT_OPTION);\r\n // display patient data\r\n currentPatient = patientsFound.get(0);\r\n search_fillPatientFoundData(currentPatient);\r\n }\r\n // no patient found\r\n else {\r\n\r\n JOptionPane.showMessageDialog(this, \"No Results found for Last Name, First Name:\" + lName + \", \" + fName,\r\n \"Search Failed\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "private void btnSearch_Clicked() {\n\t\tString input_id=txtStuNum.getText();\n\t\tif(studao.ReturnScore(input_id)!=null) {\n\t\t\tJOptionPane.showMessageDialog(this,\"学生\"+input_id+\",您的成绩是:\"+studao.ReturnScore(input_id));\n\t\t}\n\t\telse if(studao.ReturnScore(input_id)==null){\n\t\t\tJOptionPane.showMessageDialog(this, \"输入栏为空或您还没有考试\");\n\t\t}\n\t}", "public String getSearchString() {\r\n return super.getSearchString();\r\n \r\n// String searchStr = \"\";\r\n// //put exact phrase at the very beginning\r\n// if(exactphrase != null && exactphrase.length() > 0)\r\n// {\r\n// searchStr += \"\\\"\" + exactphrase + \"\\\"\";\r\n// }\r\n//\r\n// String allwordsSearchStr = \"\";\r\n// if(allwords != null && allwords.length() > 0)\r\n// {\r\n// String [] words = allwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// allwordsSearchStr += \"+\" + words[i];\r\n// }\r\n// }\r\n// }\r\n//\r\n// String withoutwordsSearchStr = \"\";\r\n// if(withoutwords != null && withoutwords.length() > 0)\r\n// {\r\n// String [] words = withoutwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// withoutwordsSearchStr += \"+-\" + words[i];\r\n// }\r\n// }\r\n// }\r\n//\r\n// searchStr += allwordsSearchStr + withoutwordsSearchStr; //need to add other string\r\n// \r\n// String oneofwordsSearchStr = \"\";\r\n// if(oneofwords != null && oneofwords.length() > 0)\r\n// {\r\n// String [] words = oneofwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// oneofwordsSearchStr = \"(\";\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// oneofwordsSearchStr += words[i] + \" \";\r\n// }\r\n// oneofwordsSearchStr = oneofwordsSearchStr.trim();\r\n// oneofwordsSearchStr += \")\";\r\n// }\r\n// }\r\n// if(oneofwordsSearchStr.length() > 0)\r\n// {\r\n// searchStr += \"+\" + oneofwordsSearchStr;\r\n// }\r\n//\r\n// return searchStr;\r\n }", "public String searchCityUI() {\n console.promptForPrintPrompt(\" ++++++++++++++++++++++++++++++++++\");\n console.promptForPrintPrompt(\" + PLEASE ENTER CITY TO SEARCH BY +\");\n console.promptForPrintPrompt(\" ++++++++++++++++++++++++++++++++++\");\n console.promptForString(\"\");\n String city = console.promptForString(\" CITY NAME: \");\n return city;\n }", "public static StringBuilder displaySearchResults()\n\t{\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (Customer customer : customerList)\n\t\t{\n\t\t\tfor (int i = 0; i < customerSearch.size(); ++i)\n\t\t\t{\n\t\t\t\tif (customerList.indexOf(customer) == customerSearch.get(i))\n\t\t\t\t{\n\t\t\t\t\tsb.append(String.format(\"%10sRECORD# %d%n\", \" \", (customerSearch.indexOf(i) + 1)));\n\t\t\t\t\tsb.append(customer.toString());\n\t\t\t\t\tsb.append('\\n');\n\n\t\t\t\t\tfor (Account account : customer.getAcctList())\n\t\t\t\t\t{\n\t\t\t\t\t\tsb.append(account.toString());\n\t\t\t\t\t\tsb.append('\\n');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn sb;\n\t}", "@Override\r\npublic String popupSearch(String criteria) {\n\treturn null;\r\n}", "private void searchBoxUsed(String txt){\n\t\t\tJFrame frame = new JFrame();\n\t\t\tArrayList<location> simLoc = dataBase.search(txt);\n\t\t\tif (simLoc == null) JOptionPane.showMessageDialog(frame, \"'\" + txt + \"' not found.\");\n\t\t\telse if (simLoc.size() == 1){\n\t\t\t\tlocation searchedLoc = simLoc.get(0);\n\t\t\t\tapp.addLocation(searchedLoc);\n\t\t\t\tapp.setVisibleLocation(searchedLoc);\n\t\t\t\tlocBar.removeActionListener(Jcombo);\n\t\t\t\tpopulateMyLocationsBox();\n\t\t\t\trefreshPanels();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString [] possibilities = new String[simLoc.size()];\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < simLoc.size(); i ++){\n\t\t\t\t\tpossibilities[i] = i + 1 + \". \" + simLoc.get(i).getName() + \", \" + simLoc.get(i).getCountryCode() + \" Lat: \" \n\t\t\t\t\t\t\t+ simLoc.get(i).getLatitude() + \" Long: \" + simLoc.get(i).getLongitude();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString response = (String) JOptionPane.showInputDialog(frame, \"Which '\" + txt + \"' did you mean?\", \"Search Location\", \n\t\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, null, possibilities, \"Titan\");\n\t\t\t\n\t\t\t\tif (response != null) {\n\t\t\t\t\t\tlocation searchedLoc = simLoc.get(Integer.parseInt(response.substring(0, response.indexOf('.'))) - 1);\n\t\t\t\t\t\tString[] temp = response.split(\" \");\n\t\t\t\t\t\tint length = app.getMyLocations().length;\n\t\t\t\t\t\tboolean add = true;\n\t\t\t\t\t\tfor (int i = 0; i < length; i ++){\n\t\t\t\t\t\t\tlocation checkLoc = app.getMyLocations()[i];\n\t\t\t\t\t\t\tif (checkLoc.getCityID() == searchedLoc.getCityID())\n\t\t\t\t\t\t\t\tadd = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (add) {\n\t\t\t\t\t\t\tapp.addLocation(searchedLoc);\n\t\t\t\t\t\t\tlocBar.removeActionListener(Jcombo);\n\t\t\t\t\t\t\tpopulateMyLocationsBox();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tapp.setVisibleLocation(searchedLoc);\n\t\t\t\t\t\trefreshPanels();\n\t\t\t\t }\n\t\t\t}\n\t\t}", "private void searchShow() {\n ArrayList<Show> searchShows = new ArrayList<>();\n for (Show show : clientController.getUser().getShows()) {\n if (show.getName().toLowerCase().contains(getText().toLowerCase())) {\n searchShows.add(show);\n }\n// else {\n// JOptionPane.showMessageDialog(null, \"The search gave no result!\");\n// }\n\n }\n pnlShowList.removeAll();\n pnlShowList.setBackground(Color.decode(\"#6A86AA\"));\n draw(searchShows);\n }", "private static void searchStaffByName(){\n\t\tshowMessage(\"type the name you are looking for: \\n\");\n\t\tString name = getUserTextTyped();\n\t\tToScreen.listEmployee(EmployeeSearch.employee(employee.getAllEmployee(),name), true);\n\t\t\n\t\t//condition to do another search by name or go back to the main menu\n //if the user decide for doing another search the method is called again, otherwise it will go back to the main menu\n\t\tint tryAgain = askForGoMainMenu(\"Would you like to search for another name or go back to main menu?\\n Type 1 to search someone else \\n Type 0 to go to menu. \\n Choice: \");\n\t\tif(tryAgain == 1){\n\t\t\tsearchStaffByName();\n\t\t} else {\n\t\t\tmain();\n\t\t}\n\t}", "private ClubSearch() \r\n {\r\n in = new Scanner(System.in);\r\n db = DatabaseManager.getInstance();\r\n \r\n openPrompt = \"Would you like to search for a club, \" +\r\n \t \"filter by type of club, list clubs, or exit? (s/f/l/e)\";\r\n cDatabase = \"ClubDatabase\";\r\n cName = \"ClubName\";\r\n }", "private void search() {\n \t\tString searchString = m_searchEditText.getText().toString();\n \n \t\t// Remove the refresh if it's scheduled\n \t\tm_handler.removeCallbacks(m_refreshRunnable);\n \t\t\n\t\tif ((searchString != null) && (!searchString.equals(\"\"))) {\n \t\t\tLog.d(TAG, \"Searching string: \\\"\" + searchString + \"\\\"\");\n \n \t\t\t// Save the search string\n \t\t\tm_lastSearch = searchString;\n \n \t\t\t// Disable the Go button to show that the search is in progress\n \t\t\tm_goButton.setEnabled(false);\n \n \t\t\t// Remove the keyboard to better show results\n \t\t\t((InputMethodManager) this\n \t\t\t\t\t.getSystemService(Service.INPUT_METHOD_SERVICE))\n \t\t\t\t\t.hideSoftInputFromWindow(m_searchEditText.getWindowToken(),\n \t\t\t\t\t\t\t0);\n \n \t\t\t// Start the search task\n \t\t\tnew HTTPTask().execute(searchString);\n \t\t\t\n \t\t\t// Schedule the refresh\n \t\t\tm_handler.postDelayed(m_refreshRunnable, REFRESH_DELAY);\n \t\t} else {\n \t\t\tLog.d(TAG, \"Ignoring null or empty search string.\");\n \t\t}\n \t}", "private void search() {\n if (isConnected()) {\r\n query = searchField.getText().toString();\r\n mLoader.setVisibility(View.VISIBLE);\r\n emptyStateTextView.setText(\"\");\r\n //restart the loader with the new data\r\n loaderManager.restartLoader(1, null, this);\r\n } else {\r\n String message = getString(R.string.no_internet);\r\n new AlertDialog.Builder(this).setMessage(message).show();\r\n }\r\n }", "private void printSearchToolNameMenu(Shop shop) {\n System.out.println(\"What is the name of the tool you would like to look up?\");\n String toolName = this.userInput.nextLine();\n if (shop.searchInventory(toolName.toLowerCase())) {\n System.out.println(toolName + \" is in the shop.\");\n } else {\n System.out.println(\"Tool does not exist or invalid input, please check spelling and try again.\");\n }\n }", "public void onSearchButtonClick(View view){\r\n\t\t\r\n\t\tfor (ListingItem item : ListingContent.ITEMS) {\r\n\t\t\tif (item.content.toUpperCase(Locale.getDefault()).contains(searchField.getText().toString().toUpperCase(Locale.getDefault()))) {\r\n\t\t\t\tresults.add(item);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tsetListAdapter(new ArrayAdapter<ListingContent.ListingItem>(this,\r\n\t\t\t\tandroid.R.layout.simple_list_item_1,\r\n\t\t\t\tandroid.R.id.text1, results));\r\n\t}", "boolean search(String acn) {\r\n if (regno.equals(acn)) {\r\n show();\r\n return (true);\r\n }\r\n return (false);\r\n }", "public void searchSwitch() {\r\n\t\tif (searchEmails) {\r\n\t\t\tsearchEmails = false;\r\n\t\t\tlblNewLabel_1.setText(srchPatrons);\r\n\t\t} else {\r\n\t\t\tsearchEmails = true;\r\n\t\t\tlblNewLabel_1.setText(srchEmails);\r\n\t\t}\r\n\t}", "private void showSponsorSearch(){\r\n String sponsorCode;\r\n// boolean replaceInfo = false;\r\n try{\r\n edu.mit.coeus.search.gui.CoeusSearch coeusSearch =\r\n new edu.mit.coeus.search.gui.CoeusSearch(dlgWindow,\r\n \"sponsorSearch\",1);\r\n coeusSearch.showSearchWindow();\r\n edu.mit.coeus.search.gui.SearchResultWindow resWindow =\r\n coeusSearch.getResultWindow();\r\n if (!coeusSearch.getSelectedValue().equals(null) ){\r\n txtSponsorCode.setText(coeusSearch.getSelectedValue());\r\n txtSponsorCode.requestFocusInWindow();\r\n sponsorCode = txtSponsorCode.getText();\r\n getSponsorInfo(sponsorCode);\r\n }\r\n }catch(Exception e) {\r\n }\r\n }", "@Override\n\tpublic void searchByMobile() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Mobile\").toString().equals(search)) {\n\t\t\t\tpMob = jsnobj.get(\"Mobile\").toString();\n\t\t\t\tpName = jsnobj.get(\"Patient's name\").toString();\n\t\t\t\tpId = jsnobj.get(\"Patient's ID\").toString();\n\t\t\t\tSystem.out.print(++count + \" Name:\" + pName + \" ID:\" + pId + \" Mobile:\" + pMob + \" Age:\"\n\t\t\t\t\t\t+ jsnobj.get(\"Age\") + \"\\n\\n\");\n\t\t\t}\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public static void search() {\n int userSelected = selectFromList(crudParamOptions);\n switch (userSelected){\n case 1:\n searchFirstName();\n break;\n case 2:\n searchLastName();\n break;\n case 3:\n searchPhone();\n break;\n case 4:\n searchEmail();\n break;\n default:\n break;\n }\n }", "public String searchResult(){\n return getText(first_product_title);\n }", "protected void showSearch() {\n \t\tIntent search = new Intent(this, SearchActivity.class);\t\t\t\t\n \t\tthis.startActivity(search);\n \t}", "public static void SearchAction() {\r\n\t\r\n \r\n ActionListener actionListener = new ActionListener() {\r\n public void actionPerformed(ActionEvent event) {\r\n \t try {\r\n\t\t\tConnection con=DriverManager.getConnection( \r\n\t\t\t \t\t\"jdbc:mysql://localhost:3306/Test\",\"root\",\"Tdd&08047728\");\r\n\t\t\tString c = SearchField.getText();\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t String query[] = {\r\n\t\t \"SELECT * FROM capstonedatabase5.employees\", \r\n\t\t \"select EmployeeName from capstonedatabase5.employees where EmployeeName like'\" + c +\"_'\" \r\n\t\t \r\n\t\t };\r\n\t\t \r\n\t\t for(String q : query) {\r\n\t\t ResultSet r = stmt.executeQuery(q);\r\n\t\t System.out.println(\"Names for query \"+q+\" are\");\r\n\t\t \r\n\t\t while (r.next()) {\r\n\t\t String name = r.getString(\"EmployeeName\");\r\n\t\t System.out.print(name+\" \");\r\n\t\t }\r\n\t\t System.out.println();\r\n\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 \r\n }\r\n };\r\n\r\n SearchButton2.addActionListener(actionListener);\r\n }", "@ActionTrigger(action=\"KEY-ENTQRY\", function=KeyFunction.SEARCH)\n\t\tpublic void spriden_Search()\n\t\t{\n\t\t\t\n\t\t\t\texecuteAction(\"QUERY\");\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t}", "private void doSearch(String queryStr) {\n\t\t\n\t\t\n\t\tdbHelper = new DatabaseHelper(getApplicationContext());\n\t\tall_Item = Items.getSearchResults(dbHelper, queryStr);\n\t\t\n\n\t\tsearch_list = (ListView) findViewById(R.id.search_list);\n\t\tadapter = new SearchResultListAdaptor(this, R.layout.search_list_display, all_Item);\n\t\tfor(int i=0;i<all_Item.size();i++)\n\t\t adapter.add(all_Item.get(i));\n\t\t\n\t\tsearch_list.setAdapter(adapter);\n\t\t\n\t\t\n\t}", "private void searchItem(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "protected void lbl_searchEvent() {\n\t\tif(text_code.getText().isEmpty()){\n\t\t\tlbl_notice.setText(\"*请输入股票代码\");\n\t\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\t\treturn;\n\t\t}\n\t\tif(text_code.getText().length()!=6||!Userinfochange.isNumeric(text_code.getText())){\n\t\t\tlbl_notice.setText(\"*股票代码为6位数字\");\n\t\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\t\treturn;\n\t\t}\n\t\tif(text_place.getText().isEmpty()){\n\t\t\tlbl_notice.setText(\"*请输入股票交易所\");\n\t\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(!text_place.getText().equals(\"sz\") && !text_place.getText().equals(\"sh\")){\n\t\t\tlbl_notice.setText(\"*交易所填写:sz或sh\");\n\t\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\tString[] informationtemp = null ;\n\t\ttry {\n\n\t\t\tinformationtemp = Internet.share.Internet.getSharedata(text_place.getText(), text_code.getText());\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tJOptionPane.showMessageDialog(null, \"网络异常或者不存在该只股票\", \"异常\",\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\n\t\t}\n\t\tString name = informationtemp[0];\n\t\tif (name == null) {\n\t\t\tlbl_notice.setText(\"*不存在的股票\");\n\t\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\t\treturn;\n\t\t}\n\t\tString[] names = new String[2];\n\t\tSystem.out.println(\"搜索出的股票名:\" + name + \"(Dia_buy 297)\");\n\t\tnames = name.split(\"\\\"\");\n\t\tname = names[1];\n\t\tif (name.length() == 0) {\n\t\t\tlbl_notice.setText(\"*不存在的股票\");\n\t\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tinformation = informationtemp;\n\t\tplace = text_place.getText();\n\t\tcode=text_code.getText();\n\t\t\n\t\ttrade_shortsell();//显示文本框内容\n\t\t\n\t\tlbl_notice.setText(\"股票信息获取成功!\");\n\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_GREEN));\n\t}", "private String getCurSearch()\n\t{\n\t\tif (mToNavi)\n\t\t\treturn mCurSearch;\n\t\telse\n\t\t\treturn mCurSearchNavi;\n\t}", "public String extractresult(String search) {\n\t\tfd.findElement(By.id(\"sb_form_q\")).sendKeys(search);\r\n\t\tfd.findElement(By.id(\"sb_form_go\")).click();\r\n\t\t\r\n\t\treturn fd.findElement(By.className(\"sb_count\")).getText();\t\r\n\t}", "private void enterSearchMode(String resultContent) {\n\n\t\tthis.removeAll();\n\n\t\tJLabel welcomeLabel = new JLabel(\"Search the word you want to modify.\");\n\t\twelcomeLabel.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 17));\n\t\tGridBagConstraints welcomeC = new GridBagConstraints();\n\t\twelcomeC.anchor = GridBagConstraints.CENTER;\n\t\twelcomeC.gridwidth = 2;\n\t\twelcomeC.weighty = 5;\n\t\twelcomeC.gridy = 0;\n\t\tthis.add(welcomeLabel, welcomeC);\n\n\t\tAction submit = new AbstractAction() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsubmitSearch(searchBox.getText());\n\t\t\t}\n\t\t};\n\n\t\tsearchBox = new JTextField();\n\t\tsearchBox.addActionListener(submit);\n\t\tGridBagConstraints sboxC = new GridBagConstraints();\n\t\tsboxC.fill = GridBagConstraints.HORIZONTAL;\n\t\tsboxC.weightx = 4;\n\t\tsboxC.weighty = 1;\n\t\tsboxC.gridx = 0;\n\t\tsboxC.gridy = 1;\n\t\tsboxC.insets = new Insets(0, 20, 0, 10);\n\t\tthis.add(searchBox, sboxC);\n\n\t\tJButton submitButton = new JButton(\"Search\");\n\t\tsubmitButton.addActionListener(submit);\n\t\tGridBagConstraints submitC = new GridBagConstraints();\n\t\tsubmitC.weightx = 0;\n\t\tsubmitC.gridx = 1;\n\t\tsubmitC.gridy = 1;\n\t\tsubmitC.anchor = GridBagConstraints.EAST;\n\t\tsubmitC.insets = new Insets(0, 0, 0, 30);\n\t\tthis.add(submitButton, submitC);\n\n\t\tresult = new JLabel(resultContent);\n\t\tresult.setFont(new Font(\"\", Font.ITALIC, 14));\n\t\tGridBagConstraints resultC = new GridBagConstraints();\n\t\tresultC.fill = GridBagConstraints.BOTH;\n\t\tresultC.weighty = 5;\n\t\tresultC.gridy = 8;\n\t\tresultC.gridwidth = 3;\n\t\tresultC.anchor = GridBagConstraints.WEST;\n\t\tresultC.insets = new Insets(0, 40, 0, 0);\n\t\tthis.add(result, resultC);\n\n\t\tthis.repaint();\n\n\t}", "public String btnSimpleSearch_action()\n {\n String userInput = \"\";\n if(this.getTxSimpleSearch().getValue()!= null)\n userInput = this.getTxSimpleSearch().getValue().toString();\n userInput = userInput.trim();\n System.out.println(1);\n if(userInput.length()==0){\n //Se desabilitan las banderas de busqueda simple y avanzada\n this.getgermplasm$SementalSessionBean().setQueryModeSimple(false);\n this.getgermplasm$SementalSessionBean().setQueryMode(false);\n //Finalmente se setea el data provider del paginador con los datos por default\n this.getgermplasm$SementalSessionBean().getPagination().setTotalResults\n (getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n countAllSemental().intValue());\n }\n else{\n //Setear el string para consulta simple del SessionBean\n this.getgermplasm$SementalSessionBean().setConsultaSimple(userInput);\n //Indicarle al SessionBean que el paginador debe \"trabajar\" en modo busqueda simple\n this.getgermplasm$SementalSessionBean().setQueryModeSimple(true);\n //Desabilitar la bandera de busqueda avanzada\n this.getgermplasm$SementalSessionBean().setQueryMode(false);\n //Finalmente se inicializa el data provider del paginador con los resultados de la consulta\n this.getgermplasm$SementalSessionBean().getPagination().setTotalResults\n (getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n countSementalSimpleSearch(\n userInput).intValue());\n }\n //set the first result of the query\n this.getgermplasm$SementalSessionBean().getPagination().firstResults();\n return null;\n }", "public static int search (String searching)\n {\n ListAlbum listAlbum = new ListAlbum(true, false, false);\n AlbumXmlFile.readAllAlbumsFromDataBase(listAlbum, true);\n Iterator albumIterator = listAlbum.iterator();\n Album actualAlbum;\n int actualAlbumIndex=0;\n while (albumIterator.hasNext())\n {\n \n actualAlbum = (Album) albumIterator.next();\n \n if (actualAlbum.getName().equals(searching))\n {\n JSoundsMainWindowViewController.showAlbumResults(true, false, false, actualAlbum);\n JSoundsMainWindow.jtfSearchSong.setText(\"\");\n return 1;\n }\n else if (actualAlbum.getArtist().getName().equals(searching))\n {\n JSoundsMainWindowViewController.showAlbumResults(true, false, false, actualAlbum);\n JSoundsMainWindow.jtfSearchSong.setText(\"\");\n return 1;\n }\n actualAlbum.getSongs();\n Iterator songsIterator = actualAlbum.getSongs().iterator();\n int actualSongIndex = 0;\n\n while (songsIterator.hasNext())\n {\n /* Se añade el número de la canción al modelo de la lista */\n Song song = (Song) songsIterator.next();\n if (song.getName().equals(searching))\n {\n JSoundsMainWindowViewController.showSongResults(true, false, false, actualAlbum,song,actualSongIndex);\n JSoundsMainWindow.jtfSearchSong.setText(\"\");\n indexFromSearchedSong=actualSongIndex;\n if (alreadyPlaying)\n {\n JSoundsMainWindowViewController.stopSong();\n alreadyPlaying=false;\n dontInitPlayer=true;\n }\n //playListSongs(true);\n return 1;\n }\n actualSongIndex++;\n }\n actualAlbumIndex++;\n }\n JSoundsMainWindow.jtfSearchSong.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Not Found :( \");\n return 0;\n }", "private void searchPerson(String searchName){\r\n\r\n textAreaFromSearch.setText(\"\");\r\n try{\r\n Scanner scanner = new Scanner(file);\r\n String info;\r\n\r\n while (scanner.hasNext()){\r\n String line = scanner.nextLine();\r\n String[] components = line.split(separator);\r\n if (searchName.length() == 0){\r\n return;\r\n }\r\n if (components[0].contains(searchName)){\r\n info = \" Name: \" + components[0] + \"\\n\";\r\n info += \" Phone No.: \"+components[1]+\"\\n\";\r\n info += \" Email: \"+components[2]+\"\\n\";\r\n info += \" Address: \"+components[3]+\"\\n\";\r\n textAreaFromSearch.append(info+\"\\n\");\r\n }\r\n }\r\n }catch (IOException e){\r\n fileError();\r\n }\r\n }", "private void showSearchResults(String query){\n searchResultGV = (GridView) findViewById(R.id.searchResultGV);\n setTitle(\"Search Result for: \" + query);\n query = query.toLowerCase();\n\n getPhotoList(query);\n\n searchResultGV.setAdapter(adapter);\n }", "private void processSearchButton() {\n try {\n //Stop a user from searching before a World exists to search\n if(this.world == null) {\n JOptionPane.showMessageDialog(null, \"You must read a data file first!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n\n //Declarations\n StringBuilder searchResults;\n String searchCriteria;\n String unfoundItem;\n int dropDownSelection;\n\n //initialize\n searchResults = new StringBuilder();\n searchCriteria = this.searchCriteriaField.getText().trim().toLowerCase();\n unfoundItem = this.searchCriteriaField.getText().trim().toLowerCase();\n dropDownSelection = this.searchCriteriaBox.getSelectedIndex();\n\n //Stop users from searching before selecting and entering any search criteria\n if(searchCriteria.equals(\"\") || searchCriteriaBox.equals(0)) {\n JOptionPane.showMessageDialog(null, \"You must SELECT and ENTER the search criteria before searching!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n\n //handle each dropdown selection\n switch(dropDownSelection) {\n case 0: //empty string to allow a blank default\n break;\n case 1: //by name\n for(Thing myThing : this.world.getAllThings()) {\n if (myThing.getName().toLowerCase().equals(searchCriteria)) {\n searchResults = new StringBuilder(myThing.getName() + \" \" + myThing.getIndex() + \" (\" + myThing.getClass().getSimpleName() + \")\");\n }\n } //end of forLoop for case 1\n if(searchResults.toString().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Search criteria '\" + unfoundItem + \"' does not exist in this World.\", \"Unknown Item\", JOptionPane.WARNING_MESSAGE);\n } else {\n JOptionPane.showMessageDialog(null, searchResults.toString());\n }\n break;\n case 2: //by index\n for(Thing myThing : this.world.getAllThings()) {\n if (myThing.getIndex() == Integer.parseInt(searchCriteria)) {\n searchResults = new StringBuilder(myThing.getName() + \" \" + myThing.getIndex() + \" (\" + myThing.getClass().getSimpleName() + \")\");\n }\n } //end of forLoop for case 2\n if(searchResults.toString().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Search criteria '\" + unfoundItem + \"' does not exist in this World.\", \"Unknown Item\", JOptionPane.WARNING_MESSAGE);\n } else {\n JOptionPane.showMessageDialog(null, searchResults.toString());\n }\n break;\n case 3: //by skill\n for(SeaPort mySeaPort : this.world.getPorts()) {\n for(Person myPerson : mySeaPort.getPersons()) {\n if(myPerson.getSkill().toLowerCase().equals(searchCriteria)) {\n searchResults.append(myPerson.getName()).append(\" \").append(myPerson.getIndex()).append(\" (\").append(myPerson.getClass().getSimpleName()).append(\")\\n Skill: \").append(myPerson.getSkill()).append(\"\\n\\n\");\n }\n }\n } //end of forLoop for case 3\n if(searchResults.toString().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Search criteria '\" + unfoundItem + \"' does not exist in this World.\", \"Unknown Item\", JOptionPane.WARNING_MESSAGE);\n } else {\n JOptionPane.showMessageDialog(null, searchResults.toString());\n }\n break;\n default: break;\n } //end of switch()\n } catch(Exception e5) {\n JOptionPane.showMessageDialog(null, \"Something went wrong in the search!\\n\\n\" + e5.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n } //end of catch()\n }", "public abstract S getSearch();", "public void search(String searchText) {\n\tsearchFrame.setVisible(false);\n\tsearchPApplet.searchText=\"\";\n\tSystem.out.println(\"Searching...\");\n\tsearchedCells.clear();\n\t\n\tif(searchText==null || searchText.length()==0)\t{redraw(); return;}\n\t\n\tfor(Cell c:cells)\n\t\tsearchedCells.addAll(recursiveSearch(c, searchText, 0));\n\tSystem.out.println(\"Found \"+searchedCells.size()+\" occurrences\");\n\tredraw();\n\treturn;\n}", "private void searchMoviesSpecific() throws IOException {\n\t\t//the message prints the search parameter they are using by getting the value from the movieMenu map\n\t\tprint(\"Please enter the \"+movieMenu.get(currentSearch)+\" you wish to search for movies by\");\n\t\t//get the search param\n\t\tString searchParam = br.readLine();\n\t\t//more complicated boolean logic: if the currentSearch is 1, search by actor, else, if the currentSearch is 3, search by genre, else, search by title\n\t\tSet<Movie> results = (currentSearch == 1 ? searchByActor(searchParam) : \n\t\t\t(currentSearch == 3 ? searchByGenre(searchParam) : searchByTitle(searchParam)));\n\t\t\n\t\t//printResults() returns a boolean as to whether there is at least one title returned. If it returns true, print out the results\n\t\tif (printResults(results)) for (Movie mov : results) print(mov.getTitle());\n\t\t//print the menu that allows a user to search again or return to the login menu\n\t\tprintMovieMiniMenu();\n\t}", "private void NameShow(HttpServletRequest request, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString find = request.getParameter(\"find\") == \"\" ? \"^^^^\" : request.getParameter(\"find\");\r\n\t\tSystem.out.println(find);\r\n\t\tint page = request.getParameter(\"page\") == \"\" || request.getParameter(\"page\") == null ? 1\r\n\t\t\t\t: Integer.valueOf(request.getParameter(\"page\"));\r\n\t\tList<Notice> list = service.selectByName(find);\r\n\t\trequest.setAttribute(\"count\", list.size());\r\n\t\trequest.setAttribute(\"list\", list);\r\n\t\trequest.setAttribute(\"nameshow\", \"nameshow\");\r\n\t\trequest.getRequestDispatcher(\"/WEB-INF/jsp/GongGaoGuanLi.jsp\").forward(request, resp);\r\n\t}", "private void Searchdata() {\r\n Connection con;\r\n String searchby;\r\n String sortby;\r\n String keyword;\r\n \r\n searchby = (String)cboSearchby.getSelectedItem();\r\n sortby = (String)cboSortby.getSelectedItem();\r\n keyword = txfSearch.getText();\r\n try {\r\n con = ClassSQL.getConnect();\r\n Statement stmt = con.createStatement();\r\n String sql = Searchstmt(searchby,sortby,keyword);\r\n // System.out.println(sql); //for testing purposes\r\n stmt.executeQuery(sql);\r\n con.close();\r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n } finally {\r\n // Place code in here that will always be run.\r\n }\r\n }", "public static void search(String searchInput)\n {\n if (!searchInput.isEmpty())\n {\n searchInput = searchInput.trim();\n if (mNameSymbol.containsKey(searchInput))\n {\n //Returns list of stock symbols associated with company name\n List<String> lstTickerSymbols = mNameSymbol.get(searchInput);\n displayResults(lstTickerSymbols, searchInput);\n }\n else\n {\n Set<String> setNames = mNameSymbol.keySet();\n Iterator iterator = setNames.iterator();\n boolean matchMade = false;\n while (iterator.hasNext())\n {\n String storedName = (String)iterator.next();\n Float normalizedMatch = fuzzyScore(storedName, searchInput);\n if (normalizedMatch >= MIN_MATCH) \n {\n //Returns list of stock symbols associated with company name\n List<String> lstTickerSymbols = mNameSymbol.get(storedName);\n displayResults(lstTickerSymbols, storedName);\n matchMade = true;\n }\n }\n if (matchMade == false)\n {\n displayNoResults();\n }\n }\n }\n else\n {\n displayNoResults();\n }\n }", "@Override\n\tpublic void searchByID() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Patient's ID\").toString().equals(search))\n\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t++count + \" Name:\" + jsnobj.get(\"Patient's name\") + \" ID:\" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t\t\t\t+ \" Mobile:\" + jsnobj.get(\"Mobile\") + \" Age:\" + jsnobj.get(\"Age\"));\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public String searchLastNameUI() {\n console.promptForPrintPrompt(\" +++++++++++++++++++++++++++++++++++++++\");\n console.promptForPrintPrompt(\" + PLEASE ENTER LAST NAME TO SEARCH BY +\");\n console.promptForPrintPrompt(\" +++++++++++++++++++++++++++++++++++++++\");\n console.promptForString(\"\");\n String lastName = console.promptForString(\" LAST NAME: \");\n return lastName;\n }", "@Override\n\tprotected void executeSearch(String term) {\n\t\t\n\t}", "public void searchLocation(View v){\n EditText locationSearch = findViewById(R.id.location);\n String location = locationSearch.getText().toString();\n search(location);\n }", "private void search(){\n solo.waitForView(R.id.search_action_button);\n solo.clickOnView(solo.getView(R.id.search_action_button));\n\n //Click on search bar\n SearchView searchBar = (SearchView) solo.getView(R.id.search_experiment_query);\n solo.clickOnView(searchBar);\n solo.sleep(500);\n\n //Type in a word from the description\n solo.clearEditText(0);\n solo.typeText(0, searchTerm);\n }", "private void search(String querySearch) {\n searchResult = new ArrayList<>();\n for (MonitoringModel item : searchList) {\n if (item.getPROG_ID().toLowerCase().contains(querySearch) || item.getPROG_ID().contains(querySearch) ||\n item.getKEPUTUSAN().toLowerCase().contains(querySearch) || item.getKEPUTUSAN().contains(querySearch) ||\n Common.formatTgl(item.getTGL_TARGET()).toLowerCase().contains(querySearch) || Common.formatTgl(item.getTGL_TARGET()).contains(querySearch) ||\n Common.formatStatusMonitoringToString(item.getLAST_STATUS()).toLowerCase().contains(querySearch) || Common.formatStatusMonitoringToString(item.getLAST_STATUS()).contains(querySearch)) {\n searchResult.add(item);\n }\n }\n if (searchResult.isEmpty())\n tvEmptySearch.setText(\"No results found for '\" + querySearch + \"'\");\n else\n tvEmptySearch.setText(\"\");\n\n searchAdapter = new ListAdapter(getContext(), searchResult);\n rvList.setAdapter(searchAdapter);\n }", "public String searchByStateUI() {\n console.promptForPrintPrompt(\" +++++++++++++++++++++++++++++++++++\");\n console.promptForPrintPrompt(\" + PLEASE ENTER STATE TO SEARCH BY +\");\n console.promptForPrintPrompt(\" +++++++++++++++++++++++++++++++++++\");\n console.promptForString(\"\");\n String state = console.promptForString(\" STATE: \");\n return state;\n }", "private void search(Object value)\r\n\t\t{\n\r\n\t\t}", "protected void lookForNumber(String searchString) {\n\t\tif(rdbtnExactMatch.isSelected()) {\r\n\t\t\tfor(int i = 0; i < phoneList.length; i++)\r\n\t\t\t\tif(chckbxIgnoreCase.isSelected()) {\r\n\t\t\t\t\tif(phoneList[i][0].toLowerCase().equals(searchString.toLowerCase()))\r\n\t\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\t\r\n\t\t\t\t}\r\n\t\t\t\telse if(phoneList[i][0].equals(searchString))\r\n\t\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\t\r\n\t\t}\r\n\t\t\r\n\t\t// Look for a name starting with searchString\r\n\t\telse if(rdbtnStartsWith.isSelected()) {\r\n\t\t\tfor(int i = 0; i < phoneList.length; i++)\r\n\t\t\t\tif(chckbxIgnoreCase.isSelected()) {\r\n\t\t\t\t\tif(phoneList[i][0].toLowerCase().startsWith(searchString.toLowerCase())) {\r\n\t\t\t\t\t\ttxtName.setText(phoneList[i][0]);\r\n\t\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(phoneList[i][0].startsWith(searchString)) {\r\n\t\t\t\t\ttxtName.setText(phoneList[i][0]);\r\n\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Look for a name ending with searchString\r\n\t\telse {\r\n\t\t\tfor(int i = 0; i < phoneList.length; i++)\r\n\t\t\t\tif(chckbxIgnoreCase.isSelected()) {\r\n\t\t\t\t\tif(phoneList[i][0].toLowerCase().endsWith(searchString.toLowerCase())) {\r\n\t\t\t\t\t\ttxtName.setText(phoneList[i][0]);\r\n\t\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(phoneList[i][0].endsWith(searchString)) {\r\n\t\t\t\t\ttxtName.setText(phoneList[i][0]);\r\n\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\r\n\t\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public boolean onQueryTextChange(String s) {\n if(s.isEmpty() && amenList.isEmpty()){\n searchResultsCard.setVisibility(View.GONE);\n }else {\n searchResultsCard.setVisibility(View.VISIBLE);\n }\n placesAdaptor.getFilter( ).filter(s);\n //if no results available, hide the result card\n //self-checking if there is any results, as filter results only available after\n //this method ends\n boolean noResult=true;\n ArrayList<PlacesDataClass> tempFilter=placesAdaptor.getFiltered( );\n if(tempFilter.isEmpty()) {\n ArrayList<String> temp_filter=new ArrayList<String>(Arrays.asList(placesName));\n for(String a:temp_filter){\n if(a.toLowerCase().contains(s.toLowerCase())){\n noResult=false;\n }\n }\n }else {\n for (PlacesDataClass object : tempFilter) {\n // the filtering itself:\n if (object.toString( ).toLowerCase( ).contains(s.toLowerCase( )))\n noResult=false;\n }\n }//if no results available then display the no results text\n if (noResult) {\n noResultsFoundText.setVisibility(View.VISIBLE);\n } else noResultsFoundText.setVisibility(View.GONE);\n Log.i(\"results number\", \"query: \"+s+\"; no result: \"+noResult);\n // ---------------Change-----------------\n while (!origin.isEmpty( )) {\n origin.remove(0);\n }\n\n return false;\n }", "private void search(ActionEvent x) {\n\t\tString text = this.searchText.getText();\n\t\tif (text.equals(\"\")) {\n\t\t\tupdate();\n\t\t\treturn;\n\t\t}\n\t\tboolean flag = false;\n\t\tfor (Project p : INSTANCE.getProjects()) {\n\t\t\tif (p.getName().indexOf(text) != -1) {\n\t\t\t\tif (!flag) {\n\t\t\t\t\tthis.projects.clear();\n\t\t\t\t\tflag = true;\n\t\t\t\t}\n\t\t\t\tthis.projects.addElement(p);\n\t\t\t}\n\t\t}\n\n\t\tif (!flag) {\n\t\t\tINSTANCE.getCurrentUser().sendNotification(new Notification((Object) INSTANCE, \"No results\"));\n\t\t\tthis.searchText.setText(\"\");\n\t\t}\n\t}", "private String getSearchString(){\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString phrase = null;\n\t\t\n\t\tSystem.out.print(\"Please enter the search phrase: \");\n\t\tphrase = scanner.nextLine();\n\t\t\n\t\tscanner.close();\n\t\t\n\t\treturn phrase;\n\t}", "public void doSearch(String searchText){\n }", "public void search() {\n try {\n String searchKey = txt_SearchKey.getText();\n Search s = new Search();\n con = dc.connect();\n stmt1 = con.createStatement();\n\n\n String sql = s.getSQLQuery(\"tblUsers\", searchKey);\n\n vtdata_user = new Vector();\n ResultSet rsUser = stmt1.executeQuery(sql);\n while (rsUser.next()) {\n\n Vector temp = new Vector();\n\n temp.add(rsUser.getString(\"UserName\"));\n temp.add(rsUser.getString(\"U_Name\"));\n temp.add(rsUser.getString(\"Email\"));\n // temp.add(rsUser.getDate(\"BirthDate\"));\n\n temp.add(formatDate.format(rsUser.getDate(\"BirthDate\")));\n boolean gender = rsUser.getBoolean(\"Gender\");\n\n\n if (gender == true) {\n temp.add(\"Male\");\n }\n\n if (gender == false) {\n temp.add(\"Female\");\n }\n temp.add(rsUser.getString(\"Phone\"));\n vtdata_user.add(temp);\n }\n\n user_model = new DefaultTableModel(vtdata_user, vtcolumn_user) {\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return false;\n }\n };\n\n tb_User.setModel(user_model);\n if (vtdata_user.size() == 0) {\n\n JOptionPane.showMessageDialog(this, \"No Search User! \");\n }\n dc.disconnect(rsUser);\n dc.disconnect(stmt1);\n dc.disconnect(con);\n } catch (SQLException ex) {\n Logger.getLogger(UserManagement.class.getName()).log(Level.SEVERE, null, ex);\n }\n }" ]
[ "0.7669536", "0.7207083", "0.7135691", "0.70909", "0.7014634", "0.70102197", "0.6906056", "0.6906056", "0.6873194", "0.67763907", "0.6753297", "0.67323333", "0.66856444", "0.6680289", "0.6665514", "0.664435", "0.6634543", "0.6629656", "0.66222835", "0.66038376", "0.65945256", "0.6571614", "0.6569439", "0.65669876", "0.6566215", "0.6524604", "0.65090996", "0.6502267", "0.6502267", "0.6492308", "0.64603025", "0.6454527", "0.6448778", "0.64481544", "0.64379543", "0.64102775", "0.6404878", "0.6364632", "0.6362118", "0.6359899", "0.63492477", "0.6337677", "0.6326413", "0.63255763", "0.63124216", "0.63120127", "0.6311707", "0.631076", "0.629872", "0.6295426", "0.62800264", "0.62673813", "0.6257711", "0.62552446", "0.6243824", "0.6242391", "0.6235615", "0.6230663", "0.62262946", "0.62249804", "0.620454", "0.62000066", "0.61986107", "0.6193891", "0.61888474", "0.61871654", "0.61828977", "0.6181503", "0.61601275", "0.61515296", "0.6144454", "0.6131782", "0.6128042", "0.60639256", "0.6059683", "0.6059584", "0.6056768", "0.60546935", "0.6053169", "0.6040108", "0.6033042", "0.6032943", "0.6024001", "0.60219646", "0.60065067", "0.6004912", "0.5998652", "0.5997289", "0.5987201", "0.59849757", "0.59840876", "0.59810185", "0.5979199", "0.5978003", "0.5968816", "0.59683925", "0.5967703", "0.5961592", "0.596088", "0.595912", "0.59578884" ]
0.0
-1
/ (nonJavadoc) This is where you actually create the item view of the list
@Override public View getView(int position, View convertView, ViewGroup parent){ View view; if(convertView != null) view = convertView; else view = ((LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE)) .inflate(R.layout.playlist_item, parent, false); ((TextView) view.findViewById(R.id.playlist_name)).setText(playlistArray.get(position).name); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ListItem createListItem();", "@Override\r\n\t\r\n\t protected OverlayItem createItem(int index) {\n\t\treturn lstItems.get(index);\r\n\t\r\n\t }", "@Override\n\tpublic void viewItem() {\n\t\t\n\t}", "private void createListView()\n {\n itens = new ArrayList<ItemListViewCarrossel>();\n ItemListViewCarrossel item1 = new ItemListViewCarrossel(\"Guilherme Biff\");\n ItemListViewCarrossel item2 = new ItemListViewCarrossel(\"Lucas Volgarini\");\n ItemListViewCarrossel item3 = new ItemListViewCarrossel(\"Eduardo Ricoldi\");\n\n\n ItemListViewCarrossel item4 = new ItemListViewCarrossel(\"Guilh\");\n ItemListViewCarrossel item5 = new ItemListViewCarrossel(\"Luc\");\n ItemListViewCarrossel item6 = new ItemListViewCarrossel(\"Edu\");\n ItemListViewCarrossel item7 = new ItemListViewCarrossel(\"Fe\");\n\n ItemListViewCarrossel item8 = new ItemListViewCarrossel(\"iff\");\n ItemListViewCarrossel item9 = new ItemListViewCarrossel(\"Lucini\");\n ItemListViewCarrossel item10 = new ItemListViewCarrossel(\"Educoldi\");\n ItemListViewCarrossel item11 = new ItemListViewCarrossel(\"Felgo\");\n\n itens.add(item1);\n itens.add(item2);\n itens.add(item3);\n itens.add(item4);\n\n itens.add(item5);\n itens.add(item6);\n itens.add(item7);\n itens.add(item8);\n\n itens.add(item9);\n itens.add(item10);\n itens.add(item11);\n\n //Cria o adapter\n adapterListView = new AdapterLsitView(this, itens);\n\n //Define o Adapter\n listView.setAdapter(adapterListView);\n //Cor quando a lista é selecionada para ralagem.\n listView.setCacheColorHint(Color.TRANSPARENT);\n }", "@Override\n\t\t\tprotected void populateItem(final ListItem<ComponentData> listItem)\n\t\t\t{\n\t\t\t\tfinal ComponentData componentData = listItem.getModelObject();\n\n\t\t\t\tlistItem.add(new Label(\"row\", Long.toString(listItem.getIndex() + 1)));\n\t\t\t\tlistItem.add(new Label(\"path\", componentData.path));\n\t\t\t\tlistItem.add(new Label(\"size\", Bytes.bytes(componentData.size).toString()));\n\t\t\t\tlistItem.add(new Label(\"type\", componentData.type));\n\t\t\t\tlistItem.add(new Label(\"model\", componentData.value));\n\t\t\t\tlistItem.add(new Label(\"renderDuration\", componentData.renderDuration != null\n\t\t\t\t\t? componentData.renderDuration.toString() : \"n/a\"));\n\t\t\t}", "public ListItems() {\n itemList = new ArrayList();\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n //Inflate a list item view using the layout specified in list_item.xml\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n // Inflate a list item view using the layout specified in list_item.xml\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n // Inflate a list item view using the layout specified in list_item.xml\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }", "private void setUpList() {\n\t\tRoomItemAdapter adapter = new RoomItemAdapter(getApplicationContext(),\n\t\t\t\trName, rRate);\n\t\tlistView.setAdapter(adapter);\n\n\t\tlistView.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\thandleClick(position);\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tpublic void createHtml(ModelItemList list) {\n\t\t\n\t}", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n View view = LayoutInflater.from(parent.getContext())\n .inflate(R.layout.main_list_item, parent, false);\n ViewHolder viewHolder = new ViewHolder(view);\n view.setTag(viewHolder);\n return view;\n }", "OrderedListContent createOrderedListContent();", "private void inflateViewForItem(Item item) {\n\n //Inflate Layout\n ItemCardBinding binding = ItemCardBinding.inflate(getLayoutInflater());\n\n //Bind Data\n binding.imageView.setImageBitmap(item.bitmap);\n binding.title.setText(item.label);\n binding.title.setBackgroundColor(item.color);\n\n //Add it to the list\n b.list.addView(binding.getRoot());\n }", "@Override\n\t public View newView(Context context, Cursor cursor, ViewGroup parent) {\n\t final LayoutInflater inflater = LayoutInflater.from(context);\n\t final View view = inflater.inflate(R.layout.item_list,parent, false);\n\t return view;\n\t }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n Item item = getItem(position);\n // Check if an existing view is being reused, otherwise inflate the view\n if (convertView == null) {\n convertView = LayoutInflater.from(getContext()).inflate(R.layout.list_layout, parent, false);\n }\n\n // Lookup view for data population\n TextView tvName = convertView.findViewById(R.id.item_textview);\n TextView tvNum = convertView.findViewById(R.id.num_textview);\n\n // TODO\n // Set the text used by tvName and tvNum using the data object\n // This will need to updated once the entity model has been updated\n tvName.setText(item.getName());\n tvNum.setText(item.getNum());\n\n // Return the completed view to render on screen\n return convertView;\n }", "@Override\n\t\t\tpublic ViewHolder onCreateViewHolder(View itemView) {\n\t\t\t\treturn new MylisViewHoder(itemView);\n\t\t\t}", "public void populateListView() {\n\n\n }", "public ViewHolder(View itemView) {\n super(itemView);\n\n listName = (TextView) itemView.findViewById(R.id.listName);\n remainingItems = (TextView) itemView.findViewById(R.id.remainingItems);\n listButtonLayout = (LinearLayout) itemView.findViewById(R.id.listButtonLayout);\n btnView = (Button) listButtonLayout.findViewById(R.id.btnEditList);\n btnDeleteList = (Button) listButtonLayout.findViewById(R.id.btnDeleteList);\n\n\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View listItemView = convertView;\n if (listItemView == null) {\n listItemView = LayoutInflater.from(getContext()).inflate(\n R.layout.item_layout, parent, false);\n }\n // get the current object located at position\n ItemObject currentObject = getItem(position);\n // Find the TextView in the list_item.xml layout with the ID version_name\n TextView nameTextView = listItemView.findViewById(R.id.item_name);\n nameTextView.setText(currentObject.getPlanetName());\n ImageView itemImage = listItemView.findViewById(R.id.item_img);\n itemImage.setImageResource(currentObject.getImageID());\n return listItemView;\n }", "public void addToList(View view) {\n Items newItem = new Items();\n EditText ETNew = (EditText) findViewById(R.id.ETNew);\n newItem.todo = ETNew.getText().toString();\n newItem.done = false;\n helper.create(newItem);\n Toast.makeText(this, \"Item added\", Toast.LENGTH_SHORT).show();\n adaptList2();\n ETNew.setText(\"\");\n ETNew.setHint(\"my new to-do\");\n }", "CollectionItem createCollectionItem();", "private void setupItemView(View view, NewCollectedItem item) {\n if (item != null) {\n TextView nameText = view.findViewById(R.id.collected_name);\n TextView heightText = view.findViewById(R.id.collected_height);\n TextView pointsText = view.findViewById(R.id.collected_points);\n TextView positionText = view.findViewById(R.id.collected_position);\n TextView dateText = view.findViewById(R.id.collected_date);\n\n nameText.setText(item.getName());\n heightText.setText(mContext.getResources().getString(R.string.height_display,\n UIUtils.IntegerConvert(item.getHeight())));\n positionText.setText(mContext.getResources().getString(R.string.position_display,\n item.getLongitude(), item.getLatitude()));\n pointsText.setText(mContext.getResources().getString(R.string.points_display,\n UIUtils.IntegerConvert(item.getPoints())));\n dateText.setText(mContext.getResources().getString(R.string.date_display,\n item.getDate()));\n\n if (item.isTopInCountry()) {\n view.findViewById(R.id.collected_trophy).setVisibility(View.VISIBLE);\n }\n else {\n view.findViewById(R.id.collected_trophy).setVisibility(View.INVISIBLE);\n }\n\n positionText.setVisibility(View.GONE);\n dateText.setVisibility(View.GONE);\n setCountryFlag(view, item.getCountry());\n }\n }", "private void setOnListView() {\n\t\tlist.setItems(obs);\n\t\tlist.setCellFactory(new Callback<ListView<User>, ListCell<User>>(){\n\n\t\t\t@Override\n\t\t\tpublic ListCell<User> call(ListView<User> p) {\n\t\t\t\t\n\t\t\t\tListCell<User> cell = new ListCell<User>() {\n\t\t\t\t\t\n\t\t\t\t\t@Override \n\t\t\t\t\tprotected void updateItem(User s, boolean bln) {\n\t\t\t\t\t\tsuper.updateItem(s, bln);\n\t\t\t\t\t\tif(s != null) {\n\t\t\t\t\t\t\tsetText(s.getUserName());\n\t\t\t\t\t\t}else\n\t\t\t\t\t\t\tsetText(\"\");\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\treturn cell;\n\t\t\t}\n\t\t});\n\t}", "private Listitem constructListItem(final String name,String label, String imageSrc, final String locationUri) {\n\t\tListitem tb = new Listitem();\n\t\t\n\t\ttb.setImage(imageSrc);\n\t\ttb.setLabel(label);\n\t\ttb.setStyle(\"padding: 2px; border-spacing: 0\");\n\n\t\t\n\t\t//new and register listener for events\n\t\tEventListener<Event> onActionListener = new SerializableEventListener<Event>(){\n\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\tpublic void onEvent(Event event) throws Exception {\n\t\t\t\t//redirect current url to new location\n\t\t\t\tif(locationUri.startsWith(\"http\")){\n\t\t\t\t\t//open a new browser tab\n\t\t\t\t\tExecutions.getCurrent().sendRedirect(locationUri);\n\t\t\t\t}else{\n\t\t\t\t\t//use iterable to find the first include only\n\t\t\t\t\tInclude include = (Include)Selectors.iterable(eastSideBarTabbox.getPage(), \"#mainInclude\").iterator().next();\n\t\t\t\t\tinclude.setSrc(locationUri);\n\t\t\t\t\tSessions.getCurrent().setAttribute(\"CURRENT_PAGE\", name);\n\t\t\t\t\t\n\t\t\t\t\t//advance bookmark control, \n\t\t\t\t\t//bookmark with a prefix\n\t\t\t\t\tif(name!=null){\n\n\t\t\t\t\t\tgetPage().getDesktop().setBookmark(Context.BOOKMARK_SEPARATOR + name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\t\t\n\t\ttb.addEventListener(Events.ON_CLICK, onActionListener);\n\n\t\treturn tb;\n\t}", "public void createNewItem(ActionEvent actionEvent) {\n // we will create a new item instance here (ideally we would use another window for this)\n // and then we will simply addItem() to the currently selected list\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }", "@Override\r\n public Object instantiateItem(ViewGroup container, int position) {\n container.addView(mListViews.get(position), 0);\r\n return mListViews.get(position);\r\n }", "public ItemListAdapter(Context inContext) {\n context = inContext;\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n //inflate(XmlPullParser parser, ViewGroup root, boolean attachToRoot)\n //Inflate a new view hierarchy from the specified XML node\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent,false);\n }", "public ItemsControl() {\t\t\t\t\n\t\tlistListener = new SourceListChangeListener();\n\n\t\tBoxLayout boxLayout = new BoxLayout(this, BoxLayout.Y_AXIS);\n\t\tsetLayout(boxLayout);\t\t\t\t\n\t\tif (Beans.isDesignTime()) {\t\t\t\n\t\t\tJLabel designTimeCaptionLbl = new JLabel(\"<ItemsControl>\");\t\t\t\t\t\t\n\t\t\tthis.add(designTimeCaptionLbl);\n\t\t}\n\t}", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n return LayoutInflater.from(context).inflate(R.layout.list_item,parent,false);\n }", "@Override\n\tpublic IItemView createCell(Context context, ViewGroup root) {\n\t\treturn this.newCellFromXml(context, R.layout.dynamic_list_item, root);\n\t}", "public NewItems() {\n super();\n }", "@Override\r\n\t\tpublic Object instantiateItem(ViewGroup container, int position) {\n\t\t\tcontainer.addView(viewList.get(position));\r\n\t\t\treturn viewList.get(position);\r\n\t\t}", "protected List<View> getItems() {\n return items;\n }", "protected abstract void makeItem();", "private void viewList() {\r\n PrintListMenuView listMenu = new PrintListMenuView();\r\n listMenu.displayMenu();\r\n }", "@Override\n\t\tpublic String toString() {\n\t\t\treturn \"ListItem \" + item;\n\t\t}", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\t\t\tListEditItem mItem;\n\n\t\t\tif (null == convertView) {\n\t\t\t\tmItem = new ListEditItem(getContext());\n\t\t\t\tmItem.setBackgroundResource(R.drawable.song_column);\n\t\t\t} else {\n\t\t\t\tmItem = (ListEditItem) convertView;\n\t\t\t}\n\n\t\t\tTrack mTrack = playlist.getEntry(position).getTrack();\n\n\t\t\tboolean isSelect = false;\n\t\t\tif (mOptList.containsKey(position)) {\n\t\t\t\tisSelect = true;\n\t\t\t}\n\t\t\tmItem.setValues(mTrack, position, isSelect);\n\t\t\treturn mItem;\n\t\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.item_list, container, false);\r\n\r\n final ArrayList<Item> items = new ArrayList<>();\r\n items.add(new Item(R.drawable.lake_myvatn, getString(R.string.lakemyvatntitle), getString(R.string.lakemyvatn)));\r\n items.add(new Item(R.drawable.godafoss_image, getString(R.string.godafosstitle), getString(R.string.godafoss)));\r\n items.add(new Item(R.drawable.dimmuborgir_image, getString(R.string.dimmuborgirtitle), getString(R.string.dimmuborgir)));\r\n items.add(new Item(R.drawable.laufas_image, getString(R.string.laufastitle), getString(R.string.laufas)));\r\n items.add(new Item(R.drawable.hrisey_island, getString(R.string.hriseytitle), getString(R.string.hrisey)));\r\n items.add(new Item(R.drawable.krafla, getString(R.string.kraflatitle), getString(R.string.krafla)));\r\n\r\n ItemAdapter adapter = new ItemAdapter(getActivity(), items);\r\n\r\n ListView listView = (ListView) rootView.findViewById(R.id.list);\r\n\r\n listView.setAdapter(adapter);\r\n\r\n //set click listener so the user can view more details if they click on an item\r\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\r\n @Override\r\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\r\n //get the position of the current list item\r\n Item item = items.get(position);\r\n\r\n //create a bundle object and add data to present in the details activity\r\n Bundle extras = new Bundle();\r\n extras.putInt(\"image\", item.getImageResourceId());\r\n extras.putString(\"title\", item.getTitleResourceId());\r\n extras.putString(\"text\", item.getTextResourceId());\r\n\r\n //create and initialise the intent\r\n Intent detailsIntent = new Intent(getActivity(), DetailsActivity.class);\r\n\r\n //attach the bundle to the intent object\r\n detailsIntent.putExtras(extras);\r\n\r\n //start the activity\r\n startActivity(detailsIntent);\r\n\r\n }\r\n });\r\n\r\n return rootView;\r\n }", "private void inicializaListView(){\n }", "@Override\n\t\t\t\t\tpublic View oncreateItem(int index, View convertView,\n\t\t\t\t\t\t\tViewGroup viewgroup) {\n\n\t\t\t\t\t\tfinal WidgetItemInfo widgetItemInfo = itemInfos\n\t\t\t\t\t\t\t\t.get(index);\n\t\t\t\t\t\tif (convertView == null) {\n\t\t\t\t\t\t\t// create\n\t\t\t\t\t\t\tLayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n\t\t\t\t\t\t\tconvertView = inflater.inflate(\n\t\t\t\t\t\t\t\t\tR.layout.issue_feedback_ui, viewgroup,\n\t\t\t\t\t\t\t\t\tfalse);\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// bind tag\n\t\t\t\t\t\tconvertView.setTag(widgetItemInfo);\n\t\t\t\t\t\treturn convertView;\n\t\t\t\t\t}", "public interface ItemListView {\n\n void showItems(List<ModelItem> items);\n void onItemSelected(ModelItem item);\n\n}", "protected ListView<T> createTargetListView() {\n/* 447 */ return createListView();\n/* */ }", "private LinearLayout createItemSelection() {\n final DialogFragmentProvider.ItemControls controls = DialogFragmentProvider.createItemSelection(getActivity(),m_createItemDlg);\n\n m_itemList = controls.listView;\n\n m_itemList.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n if(parent.getItemAtPosition(position) == null) {\n return;\n }\n m_itemId = (int)parent.getItemAtPosition(position);\n controls.adapter.setSelectedItem(position);\n controls.adapter.notifyDataSetChanged();\n }\n });\n return controls.layout;\n }", "@Override\n public void onClick(View v) {\n\n final ListModel LM = new ListModel();\n LM.strMainAsset=\"images/custom/custom_main.png\";\n LM.strListName=((EditText)V.findViewById(R.id.edit_list_create_name)).getText().toString();\n LM.strRowThImage=\"images/custom/custom_th.png\";\n LM.strRowImage=null;\n \n// LM.strRowBGImage=\"images/custom/custom_content.png\";\n\n ListItemRowModel LIM=new ListItemRowModel(AppState.getInstance().CurrentProduct.strId);\n\n LM.items.add(LIM);\n\n //add it to my lists\n AppState.getInstance().myList.items.add(LM);\n\n //set the title\n ((TextView)V.findViewById(R.id.text_list_add_create)).setText(\"List Created!\");\n\n\n\n //show the created layout\n LinearLayout layoutCreated=(LinearLayout)V.findViewById(R.id.layout_add_list_created);\n layoutCreated.setVisibility(View.VISIBLE);\n layoutCreated.setAlpha(0f);\n layoutCreated.animate().alpha(1).setDuration(300);\n\n\n //hide the form\n V.findViewById(R.id.layout_create_form).setVisibility(View.GONE);\n\n //set the propper title\n ((TextView)V.findViewById(R.id.text_list_created)).setText(LM.strListName);\n\n //set public or not\n if(!((CheckBox)V.findViewById(R.id.checkbox_add_list_create)).isChecked())\n ((TextView) V.findViewById(R.id.text_list_created_public)).setText(\"This list is public\");\n else\n ((TextView) V.findViewById(R.id.text_list_created_public)).setText(\"This list is private\");\n\n\n V.findViewById(R.id.btn_view_created).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dismiss();\n\n AppState.getInstance().CurrentList=LM;\n ListViewFragment listViewFragment= new ListViewFragment();\n\n Bundle args = new Bundle();\n args.putInt(ListFragment.ARG_PARAM1, R.layout.layout_list);\n args.putString(ListFragment.ARG_PARAM2, \"list\");\n listViewFragment.setArguments(args);\n\n ((MainActivity)getActivity()).setFragment(listViewFragment, FragmentTransaction.TRANSIT_FRAGMENT_OPEN,false);\n }\n });\n\n\n }", "@Override\n\t\tpublic View newView(Context context, Cursor cursor, ViewGroup parent)\n\t\t{\n\t\t\tLayoutInflater inflater = LayoutInflater.from(context);\n\t\t\tView newView = inflater.inflate(\n\t\t\t\t\tandroid.R.layout.simple_list_item_1, parent, false);\n\t\t\treturn newView;\n\t\t}", "public ListViewHolder(@NonNull View itemView) {\n super(itemView);\n lblActiveWorkoutName= itemView.findViewById(R.id.lblActiveWorkoutName);\n lblActiveWorkoutDate = itemView.findViewById(R.id.lblActiveWorkoutDate);\n btnViewExercises = itemView.findViewById(R.id.btnViewExercises);\n }", "public void displayItems(){\n\n //Prepare Item ArrayList\n ArrayList<Item> itemList = new ArrayList<Item>();\n\n Cursor results = items_db_helper.getRecords();\n\n while(results.moveToNext()){\n int _id = results.getInt(results.getColumnIndex(DatabaseTables.InventoryItems.ITEM_ID));\n String item_title = results.getString(results.getColumnIndex(DatabaseTables.InventoryItems.ITEM_TITLE));\n int quantity_in_stock = results.getInt(results.getColumnIndex(DatabaseTables.InventoryItems.QUANTITY_IN_STOCK));\n double item_price = results.getDouble(results.getColumnIndex(DatabaseTables.InventoryItems.ITEM_PRICE));\n byte[] item_thumbnail_byte = results.getBlob(results.getColumnIndex(DatabaseTables.InventoryItems.ITEM_THUMBNAIL));\n Bitmap item_thumbnail = BitmapFactory.decodeByteArray(item_thumbnail_byte, 0, item_thumbnail_byte.length);\n\n //Create an Item object and store these data here (at this moment we will only extract data relevant to list item\n Item item = new Item();\n item.setItemId(_id);\n item.setItemTitle(item_title);\n item.setItemPrice(item_price);\n item.setItemThumbnail(item_thumbnail);\n item.setQuantityInStock(quantity_in_stock);\n\n itemList.add(item);\n }\n\n final ListView listView = (ListView) findViewById(R.id.item_list);\n listView.setItemsCanFocus(false);\n listView.setEmptyView(findViewById(R.id.empty_list_text));\n ItemAdapter itemAdapter = new ItemAdapter(MainActivity.this, itemList);\n listView.setAdapter(itemAdapter);\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n Item curr_item = (Item) listView.getItemAtPosition(i);\n Intent details_intent = new Intent(MainActivity.this, DetailsActivity.class);\n details_intent.putExtra(\"item_id\", curr_item.getItemId());\n startActivity(details_intent);\n }\n });\n\n }", "private void populateListView() {\n ArrayAdapter<Representative> adapter = new MyListAdapter();\n ListView list = (ListView) findViewById(R.id.repListView);\n list.setAdapter(adapter);\n }", "@Override\r\n\t\tpublic View newView(Context arg0, Cursor arg1, ViewGroup arg2) {\n\t\t\t\t LayoutInflater inflater = LayoutInflater.from(arg2.getContext());\r\n\t\t\t View retView = inflater.inflate(R.layout.report_listitems, arg2, false);\r\n\t\t\t int j=i%2;\r\n\t\t\t retView.setBackgroundColor(colors[j]);\r\n\t\t\t i++;\r\n\t\t\t bindView(retView,arg0,arg1);\r\n\t\t\t return retView;\r\n\t\t\t \r\n\t\t}", "@Override\n\tprotected String getView() {\n\t\treturn ORSView.COLLEGE_LIST_VIEW;\n\t}", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View listItem = convertView;\n int pos = position;\n\n if(listItem == null){\n listItem = layoutInflater.inflate(R.layout.item_list, null);\n }\n\n //Colocando na tela os elementos da busca\n ImageView iv = (ImageView) listItem.findViewById(R.id.thumb);\n TextView tvTitle = (TextView) listItem.findViewById(R.id.title);\n TextView tvDate = (TextView) listItem.findViewById(R.id.date);\n\n //aplicando as views no form_contato\n imageLoader.DisplayImage(feed.getItem(pos).getImage(), iv);\n tvTitle.setText(feed.getItem(pos).getTitle());\n tvDate.setText(feed.getItem(pos).getDate());\n\n return listItem;\n }", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tView view = LayoutInflater.from(getActivity()).inflate(R.layout.discovery_fragment_listitem, null);\n\t\t\tImageView icon = (ImageView)view.findViewById(R.id.itemIcon);\n\t\t\tTextView textView = (TextView)view.findViewById(R.id.itemTv);\n\t\t\tImageView inImageView = (ImageView)view.findViewById(R.id.itemInImg);\n\t\t\t\n\t\t\ticon.setImageResource(imgs[position]);\n\t\t\ttextView.setText(names[position]);\n\t\t\tinImageView.setImageResource(R.drawable.in);\n\t\t\treturn view;\n\t\t}", "protected ListView<T> createSourceListView() {\n/* 436 */ return createListView();\n/* */ }", "public OrderAdapter() {\n super(new ArrayList<MultiItemEntity>());\n addItemType(TYPE_HEAD, R.layout.item_order_head);\n addItemType(TYPE_CONTENT, R.layout.item_order_content);\n addItemType(TYPE_FOOTER, R.layout.item_order_foot);\n }", "Item getItem(int index) {\r\n return new Item(this, index);\r\n }", "public ListViewItem(String name, int value) {\n this.name = name;\n this.value = value;\n }", "@Override\n\tpublic View newView(Context arg0, Cursor arg1, ViewGroup arg2) {\n\t\tView row = (View) inflater.inflate(R.layout.list_row, arg2, false);\n\t\treturn row;\n\t}", "@Override\n\t\t\t\t\t\tpublic int getCount() {\n\t\t\t\t\t\treturn listItem.size();\n\t\t\t\t\t\t}", "@Override\n public void onListItemClicked(int position) {\n\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent)\n {\n final LayoutInflater inflater = LayoutInflater.from(context);\n final View view = inflater.inflate(android.R.layout.simple_expandable_list_item_1, parent, false);\n\n return view;\n }", "private ListCell<String> inventoryListViewCellFactory(ListView<String> param){\n\t return new ListCell<String>() {\n\t\t\t@Override\n\t\t\tpublic void updateItem(String name, boolean empty) {\n\t\t\t\tsuper.updateItem(name, empty);\n\t\t\t\tif (empty) {\n\t\t\t\t\tsetText(null);\n\t\t\t\t\tsetGraphic(null);\n\t\t\t\t} else {\n\t\t\t\t\tImageView imageView = resources.createImageViewByClassName(name);\n\t\t\t\t\timageView.setPreserveRatio(true);\n\t\t\t\t\timageView.setFitWidth(25);\n\t\t\t\t\tint count = engine.getInventoryCounts(name);\n\t\t\t\t\tsetGraphic(imageView);\n\t\t\t\t\tsetText(Integer.toString(count));\n\t\t\t\t\tif(count == 0){\n\t\t\t\t\t imageView.setImage(null);\n\t\t\t\t\t setText(null);\n }\n\t\t\t\t}\n\t\t\t}\n\t\t};\n }", "private void makeListGUI(String list, int index)\n {\n // get a reference to the LayoutInflater service\n LayoutInflater inflater = (LayoutInflater) getSystemService(\n Context.LAYOUT_INFLATER_SERVICE);\n\n // inflate new_list_view.xml to create new list and edit Buttons\n View newListView = inflater.inflate(R.layout.new_list_view, null);\n \n // get newListButton, set its text and register its listener\n Button newListButton = \n (Button) newListView.findViewById(R.id.newListButton);\n newListButton.setText(list); \n newListButton.setOnClickListener(listButtonListener); \n\n // get newEditButton and register its listener\n Button newEditButton = \n (Button) newListView.findViewById(R.id.newEditButton); \n newEditButton.setOnClickListener(editButtonListener);\n\n // add new list and edit buttons to listTableLayout\n listTableLayout.addView(newListView, index);\n }", "@Override\n\t\tpublic View newView(Context context, Cursor cursor, ViewGroup parent) {\n\t\t\tLayoutInflater inflater = (LayoutInflater)context\n\t\t\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\treturn inflater\n\t\t\t\t\t.inflate(R.layout.list_item_exercise, parent, false);\n\t\t}", "public interface ViewFromResourceHandler<ListItemType> {\n View handle(int position, View view, TextView textView, boolean isViewReused, ListItemType currentItem);\n }", "private View createList( SyndFeed feed, Activity activity ) {\n\n LinearLayout mainPanel = new LinearLayout( activity );\n ListView listView = new ListView( activity );\n final FeedListAdapter feedListAdapter = new FeedListAdapter(activity, feed);\n listView.setOnItemClickListener( new AdapterView.OnItemClickListener()\n {\n public void onItemClick( AdapterView<?> parentView, View childView, int position, long id )\n {\n feedListAdapter.click( position );\n }\n } );\n listView.setAdapter(feedListAdapter);\n listView.setBackgroundColor(0xFFffeaab);\n mainPanel.addView(listView);\n return mainPanel;\n }", "ExerciseAdapter(List<Programme.MyItems> items)\n {\n this.myItems = items;\n }", "public List<Item> getItemList();", "@Override\n public ListViewItem getItem(int position) {\n return list.get(position);\n }", "public void setupAdaptedItemView(ArrayList<Profile> list) {\r\n RequestsForBookAdapter RequestsForBookAdapter =\r\n new RequestsForBookAdapter(context, list, book);\r\n View itemView = View.inflate(context, R.layout.user_accept_or_reject, null);\r\n adaptedView = RequestsForBookAdapter.getView(0, itemView, null);\r\n usernameTextView = adaptedView.findViewById(R.id.user_name);\r\n rejectedButton = adaptedView.findViewById(R.id.user_reject);\r\n acceptButton = adaptedView.findViewById(R.id.user_accept);\r\n }", "private void showVenuesOnListview() {\n if(venues == null || venues.isEmpty()) return;\n\n // Get the view\n View view = getView();\n venueListView = view.findViewById(R.id.venue_listView);\n\n // connecting the adapter to recyclerview\n VenueListAdapter venueListAdapter = new VenueListAdapter(getActivity(), R.layout.item_venue_list, venues);\n\n // Initialize ItemAnimator, LayoutManager and ItemDecorators\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getContext());\n\n int verticalSpacing = 5;\n VerticalSpaceItemDecorator itemDecorator = new VerticalSpaceItemDecorator(verticalSpacing);\n\n // Set the LayoutManager\n venueListView.setLayoutManager(layoutManager);\n\n // Set the ItemDecorators\n venueListView.addItemDecoration(itemDecorator);\n venueListView.setAdapter(venueListAdapter);\n venueListView.setHasFixedSize(true);\n }", "@Override\n public void onListFragmentInteraction(Model.Item item) {\n }", "public List(String vTittle, int vText, int imageResourceId) {\n mTittleItem = vTittle;\n mTextItem = vText;\n mImageResourceId = imageResourceId;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.list_item, container, false);\n\n // Create a list of items\n final ArrayList<Item> items = new ArrayList<Item>();\n\n items.add(new Item(getResources().getString(R.string.about_1),getResources().getString(R.string.about_1_1),R.drawable.bydgoszcz_logo));\n items.add(new Item(getResources().getString(R.string.about_2),getResources().getString(R.string.about_2_1)));\n items.add(new Item(getResources().getString(R.string.about_3),getResources().getString(R.string.about_3_1)));\n items.add(new Item(getResources().getString(R.string.about_4),getResources().getString(R.string.about_4_1)));\n\n // Create an {@link ItemAdapter}, whose data source is a list of {@link Item}s.\n ItemAdapter adapter = new ItemAdapter(getActivity(), items, R.color.tan_background);\n\n // Find the {@link ListView} object in the view hierarchy of the {@link Activity}.\n ListView listView = (ListView) rootView.findViewById(R.id.list);\n\n listView.setAdapter(adapter);\n\n return rootView;\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n \n /* Get the incoming data from the calling activity */\n String itemKey = getIntent().getStringExtra(\"com.gimranov.zandy.client.itemKey\");\n item = Item.load(itemKey);\n \n // When an item in the view has been updated via a sync, the temporary key may have\n // been swapped out, so we fall back on the DB ID\n if (item == null) {\n String itemDbId = getIntent().getStringExtra(\"com.gimranov.zandy.client.itemDbId\");\n \titem = Item.loadDbId(itemDbId);\n }\n \t\n // Set the activity title to the current item's title, if the title works\n if (item.getTitle() != null && !item.getTitle().equals(\"\"))\n \tthis.setTitle(item.getTitle());\n else\n \tthis.setTitle(\"Item Data\");\n \n ArrayList<Bundle> rows = item.toBundleArray();\n \n /* \n * We use the standard ArrayAdapter, passing in our data as a Bundle.\n * Since it's no longer a simple TextView, we need to override getView, but\n * we can do that anonymously.\n */\n setListAdapter(new ArrayAdapter<Bundle>(this, R.layout.list_data, rows) {\n \t@Override\n \tpublic View getView(int position, View convertView, ViewGroup parent) {\n \t\tView row;\n \t\t\n // We are reusing views, but we need to initialize it if null\n \t\tif (null == convertView) {\n LayoutInflater inflater = getLayoutInflater();\n \t\t\trow = inflater.inflate(R.layout.list_data, null);\n \t\t} else {\n \t\t\trow = convertView;\n \t\t}\n \n \t\t/* Our layout has just two fields */\n \t\tTextView tvLabel = (TextView) row.findViewById(R.id.data_label);\n \t\tTextView tvContent = (TextView) row.findViewById(R.id.data_content);\n \t\t\n \t \t/* Since the field names are the API / internal form, we\n \t \t * attempt to get a localized, human-readable version. */\n \t\ttvLabel.setText(Item.localizedStringForString(\n \t\t\t\t\tgetItem(position).getString(\"label\")));\n \t\t\n \t\tString content = getItem(position).getString(\"content\");\n \t\t\n \t\ttvContent.setText(content);\n \n \t\treturn row;\n \t}\n });\n \n ListView lv = getListView();\n lv.setTextFilterEnabled(true);\n lv.setOnItemClickListener(new OnItemClickListener() {\n \t// Warning here because Eclipse can't tell whether my ArrayAdapter is\n \t// being used with the correct parametrization.\n \t@SuppressWarnings(\"unchecked\")\n \t\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n \t\t\t// If we have a click on an entry, do something...\n \t\tArrayAdapter<Bundle> adapter = (ArrayAdapter<Bundle>) parent.getAdapter();\n \t\tBundle row = adapter.getItem(position);\n \t\tif (row.getString(\"label\").equals(\"url\")) {\n \t\t\trow.putString(\"url\", row.getString(\"content\"));\n \t\t\tremoveDialog(DIALOG_CONFIRM_NAVIGATE);\n \t\t\tshowDialog(DIALOG_CONFIRM_NAVIGATE, row);\n \t\t\treturn;\n \t\t} else if (row.getString(\"label\").equals(\"DOI\")) {\n \t\t\tString url = \"http://dx.doi.org/\"+Uri.encode(row.getString(\"content\"));\n \t\t\trow.putString(\"url\", url);\n \t\t\tremoveDialog(DIALOG_CONFIRM_NAVIGATE);\n \t\t\tshowDialog(DIALOG_CONFIRM_NAVIGATE, row);\n \t\t\treturn;\n \t\t} else if (row.getString(\"label\").equals(\"creators\")) {\n \t \tLog.d(TAG, \"Trying to start creators activity\");\n \t \tIntent i = new Intent(getBaseContext(), CreatorActivity.class);\n \t\t \ti.putExtra(\"com.gimranov.zandy.client.itemKey\", item.getKey());\n \t \tstartActivity(i);\n \t \treturn;\n \t\t} else if (row.getString(\"label\").equals(\"tags\")) {\n \t \tLog.d(TAG, \"Trying to start tag activity\");\n \t \tIntent i = new Intent(getBaseContext(), TagActivity.class);\n \t \ti.putExtra(\"com.gimranov.zandy.client.itemKey\", item.getKey());\n \t \tstartActivity(i);\n \t\t\treturn;\n \t \t\t} else if (row.getString(\"label\").equals(\"children\")) {\n \t \t \tLog.d(TAG, \"Trying to start attachment activity\");\n \t \t \tIntent i = new Intent(getBaseContext(), AttachmentActivity.class);\n \t \t \ti.putExtra(\"com.gimranov.zandy.client.itemKey\", item.getKey());\n \t \t \tstartActivity(i);\n \t \t\t\treturn;\n \t \t\t}\n \t\t\n \t\t\t\tToast.makeText(getApplicationContext(), row.getString(\"content\"), \n \t\t\t\tToast.LENGTH_SHORT).show();\n \t}\n });\n \n /*\n * On long click, we bring up an edit dialog.\n */\n lv.setOnItemLongClickListener(new OnItemLongClickListener() {\n \t/*\n \t * Same annotation as in onItemClick(..), above.\n \t */\n \t@SuppressWarnings(\"unchecked\")\n \t\t\tpublic boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {\n \t\t\t// If we have a long click on an entry, we'll provide a way of editing it\n \t\tArrayAdapter<Bundle> adapter = (ArrayAdapter<Bundle>) parent.getAdapter();\n \t\tBundle row = adapter.getItem(position);\n \t\t// Show the right type of dialog for the row in question\n \t\tif (row.getString(\"label\").equals(\"itemType\")) {\n \t\t\t// XXX \n \tToast.makeText(getApplicationContext(), \"Item type cannot be changed.\", \n \t\t\t\tToast.LENGTH_SHORT).show();\n \t\t\t//removeDialog(DIALOG_ITEM_TYPE);\n \t\t\t//showDialog(DIALOG_ITEM_TYPE, row);\n \t\t\treturn true;\n \t\t} else if (row.getString(\"label\").equals(\"children\")) {\n \t \tLog.d(TAG, \"Not starting children activity on click-and-hold\");\n \t \treturn true;\n \t\t} else if (row.getString(\"label\").equals(\"creators\")) {\n \t \tLog.d(TAG, \"Trying to start creators activity\");\n \t \tIntent i = new Intent(getBaseContext(), CreatorActivity.class);\n \t\t \ti.putExtra(\"com.gimranov.zandy.client.itemKey\", item.getKey());\n \t \tstartActivity(i);\n \t \treturn true;\n \t\t} else if (row.getString(\"label\").equals(\"tags\")) {\n \t \tLog.d(TAG, \"Trying to start tag activity\");\n \t \tIntent i = new Intent(getBaseContext(), TagActivity.class);\n \t \ti.putExtra(\"com.gimranov.zandy.client.itemKey\", item.getKey());\n \t \tstartActivity(i);\n \t\t\treturn true;\n \t\t}\n \t\t\tremoveDialog(DIALOG_SINGLE_VALUE);\n \t\tshowDialog(DIALOG_SINGLE_VALUE, row);\n \t\treturn true;\n }\n });\n \n }", "@Override\n public void bindView(View view, final Context context, Cursor cursor) {\n // Find fields to populate in inflated template\n // (bzw. Find individual views that we want to modify in the list item layout)\n TextView nameTextView = (TextView) view.findViewById(R.id.name);\n TextView authorTextView = (TextView) view.findViewById(R.id.author);\n TextView quantityTextView = (TextView) view.findViewById(R.id.quantity);\n TextView priceTextView = (TextView) view.findViewById(R.id.list_item_price);\n Button saleButton = (Button) view.findViewById(R.id.sale_button);\n\n // Find the columns of inventory attributes that we're interested in\n int nameColumnIndex = cursor.getColumnIndex(InventoryContract.InventoryEntry.COLUMN_NAME);\n int authorColumnIndex = cursor.getColumnIndex(InventoryContract.InventoryEntry.COLUMN_AUTHOR);\n int quantityColumnIndex = cursor.getColumnIndex(InventoryContract.InventoryEntry.COLUMN_QUANTITY);\n int priceColumnIndex = cursor.getColumnIndex(InventoryContract.InventoryEntry.COLUMN_PRICE);\n final int rowId = cursor.getInt(cursor.getColumnIndex(InventoryContract.InventoryEntry._ID));\n\n // Read the inventory attributes from the Cursor for the current inventory\n String inventoryName = cursor.getString(nameColumnIndex);\n String inventoryAuthor = cursor.getString(authorColumnIndex);\n String inventoryPrice = cursor.getString(priceColumnIndex);\n String inventoryQuantity = cursor.getString(quantityColumnIndex);\n\n // If the inventory author is an empty string or null, then use some default text\n // that says \"Unknown author\", so the TextView isn't blank.\n if (TextUtils.isEmpty(inventoryAuthor)) {\n inventoryAuthor = context.getString(R.string.unknown_author);\n }\n\n // Update the TextViews with the attributes for the current inventory\n nameTextView.setText(inventoryName);\n authorTextView.setText(inventoryAuthor);\n priceTextView.setText(inventoryPrice);\n quantityTextView.setText(inventoryQuantity);\n\n final int currentQuantity = Integer.parseInt(inventoryQuantity);\n\n saleButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n int quantity = currentQuantity;\n if (quantity > 0) {\n quantity = quantity - 1;\n }\n\n ContentValues contentValues = new ContentValues();\n Uri newUri = ContentUris.withAppendedId(InventoryContract.InventoryEntry.CONTENT_URI, rowId);\n contentValues.put(InventoryContract.InventoryEntry.COLUMN_QUANTITY, quantity);\n context.getContentResolver().update(newUri, contentValues, null, null);\n }\n });\n }", "public ChainShopAdapter(List<MultiItemEntity> data) {\n super(data);\n addItemType(TYPE_LEVEL_1, R.layout.item_shop_employess_list);\n addItemType(TYPE_PERSON, R.layout.item_shop_employee);\n }", "private ListChooserItem createItem(String id, String label, String imageAssetID, boolean selected) {\n/*Generated! Do not modify!*/ ListChooserItem result = new ListChooserItem();\n/*Generated! Do not modify!*/ result.setID(id);\n/*Generated! Do not modify!*/ result.setLabel(label);\n/*Generated! Do not modify!*/ result.setImageAssetID(imageAssetID);\n/*Generated! Do not modify!*/ result.setSelected(selected);\n/*Generated! Do not modify!*/ return result;\n/*Generated! Do not modify!*/ }", "private void setUpDrawerList() {\n itemList = new ArrayList<>();\n\n itemList.add(new ItemSlideMenu(\"Roll\"));\n itemList.add(new ItemSlideMenu(\"About\"));\n itemList.add(new ItemSlideMenu(\"Log In\"));\n\n\n adapter = new SlidingMenuAdapter(this, itemList);\n listView.setAdapter(adapter);\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n return LayoutInflater.from(context).inflate(R.layout.fragment_food_list_item, parent, false);\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n LayoutInflater inflater = getLayoutInflater();\n View newView;\n newView = inflater.inflate(R.layout.recipe_list, parent, false);\n TextView info = newView.findViewById(R.id.recipeInfo);\n String title = (String) getItem(position);\n info.setText(title);\n return newView;\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View listItemView = convertView;\n if (listItemView == null) {\n listItemView = LayoutInflater.from(getContext()).inflate(\n R.layout.list_item, parent, false);\n }\n\n // Get the Description object located at this position in the list\n Description currentDescription = getItem(position);\n\n // Find the TextView in the list_item.xml layout with the ID description\n TextView descriptionTextView = (TextView) listItemView.findViewById(R.id.description);\n // Get the Description from the currentDescription object and set this text on\n // the descriptionTextView\n descriptionTextView.setText(currentDescription.getDescription());\n\n\n // Find the ImageView in the list_item.xml layout with the ID ic_link\n ImageView imageView1 = (ImageView) listItemView.findViewById(R.id.ic_link);\n imageView1.setImageResource(currentDescription.getImage1());\n // Find the ImageView in the list_item.xml layout with the ID image\n ImageView imageView2 = (ImageView) listItemView.findViewById(R.id.image);\n imageView2.setImageResource(currentDescription.getImage2());\n\n // Return the whole list item layout (containing 2 ImageViews and 1 TextView) so that it can be shown in\n // the ListView.\n return listItemView;\n }", "@Override\n\t\tpublic void oncreateItem(String tag, View convertView) {\n\t\t\tmGuanzhuList.add(new Category(tag));// empty\n\t\t}", "protected abstract ReadCell<DataType> createItemCell(LayoutInflater inflater, View convertView, ViewGroup parent);", "public void createNewList(ActionEvent actionEvent) {\n // ideally again, this would have its own window\n // give it a title, and optionally populate it with some items\n }", "LI createLI();", "@Override\n\tprotected RecycleBaseAdapter getListAdapter() {\n\t\treturn new VipStudentAdapter();\n\t}", "private void initLsitData() {\n\t\tlist = new ArrayList<View>();\n\n\t\tlist.add(new NewsMenupagerItem(Mactivity,TY).initView());\n\t\tlist.add(new NewsMenupagerItem(Mactivity,YL).initView());\n\t\tlist.add(new NewsMenupagerItem(Mactivity,QW).initView());\n\t\tlist.add(new NewsMenupagerItem(Mactivity,MV).initView());\n\n\n\t}", "private Model() {\n lists.put(ItemType.DEVELOPER, new ItemList());\n lists.put(ItemType.PROJECT, new ItemList());\n lists.put(ItemType.STORY, new ItemList());\n lists.put(ItemType.STORY_DEVELOPER, new ItemList());\n }", "public CarritoListAdapter(List<ItemCarrito> list, CarritoHolder.Events events){\n this.list = list;\n this.events = events;\n idEditable=new ArrayList<>();\n }", "@Override\n\t\tpublic View instantiateItem(ViewGroup container, int position) {\n\t\t\tToast.makeText(getBaseContext(), \"item instantiated\", Toast.LENGTH_SHORT).show();\n\t\t\treturn list.get(position);\n\t\t}", "public static MyListItem fromCursor(Cursor cursor) {\n MyListItem m = new MyListItem();\n return m;\n }", "private void loadItemList() {\n this.presenter.initialize();\n }", "public RecommendAdapter(List<RecommendFood> data) {\n super(data);\n addItemType(RecommendFood.TYPE_BIG, R.layout.recommend_item_middle);\n addItemType(RecommendFood.TYPE_DETAIL, R.layout.recommend_item_detail);\n addItemType(RecommendFood.TYPE_MIDDLE, R.layout.recommend_item_middle);\n }" ]
[ "0.7318747", "0.7254826", "0.72061616", "0.6849161", "0.67747396", "0.6769255", "0.6661882", "0.66209453", "0.66209453", "0.65726477", "0.6567623", "0.6555038", "0.65252775", "0.6502983", "0.64923245", "0.64585733", "0.6437594", "0.6437461", "0.641248", "0.6400419", "0.63932323", "0.6382985", "0.6356279", "0.6350502", "0.63424903", "0.63402253", "0.6332076", "0.6332076", "0.6332076", "0.6332076", "0.6332076", "0.63230795", "0.6316172", "0.6312535", "0.6309929", "0.62903255", "0.628375", "0.62585133", "0.6257208", "0.6252305", "0.62515366", "0.6248195", "0.6233573", "0.6221327", "0.62023145", "0.61954015", "0.6186881", "0.617033", "0.615928", "0.6157956", "0.61529744", "0.6149491", "0.6145811", "0.6143789", "0.61419904", "0.6134881", "0.6130744", "0.6122494", "0.6119256", "0.6119254", "0.6118641", "0.6116338", "0.6115488", "0.6114388", "0.6108927", "0.6096391", "0.6075833", "0.60752076", "0.60687006", "0.6059435", "0.60551906", "0.6054441", "0.60536194", "0.6053403", "0.6053366", "0.60492307", "0.6048405", "0.6043399", "0.6042931", "0.60419613", "0.6040076", "0.60389286", "0.60339725", "0.60318124", "0.60312986", "0.60312194", "0.60291755", "0.6025663", "0.60214204", "0.6013639", "0.60132426", "0.6007945", "0.5998946", "0.59895414", "0.5988442", "0.59854794", "0.5975234", "0.5972675", "0.59716654", "0.5971234", "0.5969549" ]
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_fragment6, container, false); unbinder = ButterKnife.bind(this, view); 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
Null id means not persisted
public Beacon createFromObject( Beacon b ) throws IllegalAccessException, InstantiationException { return createBeacon(b.getId(),b.getUuid(),b.getMajor(),b.getMinor(),b.getType(),b.getManufactorer(),b.getData(),b.getLastKnownDistance()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}", "@NotNull\n String getId();", "long getNoId();", "@Id\n @GeneratedValue\n @Column(name = \"id\", unique = true, nullable = false)\n public Long getId() {\n return this.id;\n }", "@Nullable String getId();", "@Nullable String getId();", "@Id\r\n @GeneratedValue(strategy=GenerationType.IDENTITY)\r\n public long getId(){\r\n return id;\r\n }", "@Id\n\t@GeneratedValue\n public Integer getId() {\n return id;\n }", "public Long getId() {\n\t\treturn null;\n\t}", "public interface HasId extends Identifiable<Integer> {\n\n /**\n * Returns the id of the object.\n *\n * @return id\n */\n Integer getId();\n\n /**\n * Set id for object\n * @param id of the object\n */\n void setId(Integer id);\n\n /**\n * @return true if id is null\n */\n default boolean isNew(){\n return getId() == null;\n }\n}", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "Long getId();", "Long getId();", "Long getId();", "@Test\n @Transactional\n public void testEntityFromId() {\n assertThat(teamMapper.fromId(42L).getId()).isEqualTo(42);\n assertThat(teamMapper.fromId(null)).isNull();\n }", "@NotNull\n public String getId() {\n return myId;\n }", "@Id\n @GeneratedValue(strategy = GenerationType.IDENTITY)\n @Column(name = \"ID\")\n public Long getId() {\n return id;\n }", "@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}", "@Column(nullable = false, unique = true, precision = 10)\n @GeneratedValue\n @Id\n public Integer getId() {\n return id;\n }", "public Integer getId(){return id;}", "@Override\n\tpublic Object getId() {\n\t\treturn null;\n\t}", "public Long getId() {return id;}", "public Long getId() {return id;}", "public Long getId() {\n return id;\n }", "String getEmptyId();", "@Override\r\n\tpublic String getId() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getId() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getId() {\n\t\treturn null;\r\n\t}", "@Override\r\n\t\tpublic String getId()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "@Override\n\tpublic String getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getId() {\n\t\treturn null;\n\t}", "@Id\n @GeneratedValue(strategy = GenerationType.AUTO )\n public Long getId() {\n return id;\n }", "@Override\n\tpublic Object getEntityId() {\n\t\treturn null;\n\t}", "public int getId() {return Id;}", "private void setId(Integer id) { this.id = id; }", "@Override\n public String getId() {\n return null;\n }", "@Id\n @GeneratedValue\n public Long getId() {\n return id;\n }", "@Id\n @GeneratedValue\n @JsonIgnore\n public Long getId() {\n return id;\n }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "@Id\n @GeneratedValue(strategy = GenerationType.IDENTITY)\n @Column(name = \"N_ID\")\n public Integer getId() {\n return id;\n }", "public Long getId() \n {\n return id;\n }", "public int getId(){ return id; }", "public void setId(long id) {\n id_ = id;\n }", "public abstract Long getId();", "public void setId(int id){ this.id = id; }", "@Override\n\tpublic Object objId() {\n\t\treturn null;\n\t}", "public int getId(){return id;}", "@Override\n\t\tpublic String getId() {\n\t\t\treturn null;\n\t\t}", "@Id \r\n @GeneratedValue(strategy = GenerationType.AUTO) \r\n public Long getId() {\r\n\t\treturn id;\r\n\t}", "@Id\n\t@Key\n\t@Override\n\tpublic void setId(String id)\n\t{\n\t\tsuper.setId(id);\n\t}", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "@Id \r\n\t@GeneratedValue(strategy = GenerationType.AUTO)\r\n\t@Basic( optional = false )\r\n\t@Column( name = \"id\", nullable = false )\r\n\tpublic Long getId() {\r\n\t\treturn this.id;\r\n\t\t\r\n\t}", "@org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getId();", "@Override\n\tpublic void setId(Long id) {\n\t}", "public Object getId() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Integer getId() {\n return id;\n }", "public Integer getId() { return id; }", "public void setId( Long id );", "public Long getId() {\n\treturn id;\n}", "public Long getId() {\n\treturn id;\n}", "@Override\n\tpublic boolean isPersistent() {\n\t\treturn id != -1;\n\t}", "public int getId() {\n return id;\n }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public void setId(Long id) \n {\n this.id = id;\n }", "@Id\n public Long getId() {\n return id;\n }", "public int getId() {return id;}", "@Override\n public Long getId () {\n return id;\n }", "public int getId()\n {\n return id;\n }", "@Override\n\tpublic Object getPrimaryKey() {\n\t\treturn null;\n\t}", "public Long id() { return this.id; }", "@Id\r\n\t@GeneratedValue(strategy = IDENTITY)\r\n\t@Column(name = \"id\", unique = true, nullable = false)\r\n\tpublic Integer getId() {\r\n\t\treturn id;\r\n\t}", "@Id\n\t@GeneratedValue\n\tpublic Long getId() {\n\t\treturn id;\n\t}", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();" ]
[ "0.7366989", "0.7360192", "0.7360192", "0.7201704", "0.72000146", "0.71724427", "0.69662005", "0.6951893", "0.6951893", "0.69398695", "0.69077367", "0.6883918", "0.6877625", "0.6837937", "0.6837937", "0.6825983", "0.6825983", "0.6825983", "0.68107384", "0.68099844", "0.67978865", "0.67920566", "0.67778546", "0.67769605", "0.67767864", "0.6771729", "0.6771729", "0.67639196", "0.67627615", "0.6760217", "0.6760217", "0.6760217", "0.6757438", "0.6748866", "0.6748866", "0.6748866", "0.6743422", "0.67402065", "0.6731004", "0.6715216", "0.67059547", "0.6702324", "0.6692132", "0.66892415", "0.66892415", "0.66742384", "0.6662012", "0.6649888", "0.6647641", "0.6647323", "0.6639898", "0.6632558", "0.6630599", "0.6616952", "0.6604356", "0.6595578", "0.6586705", "0.6586705", "0.6578787", "0.65727985", "0.65721333", "0.6568464", "0.65684325", "0.65576154", "0.6543506", "0.6543386", "0.6543386", "0.65416926", "0.65336233", "0.65285516", "0.65285516", "0.65285516", "0.65285516", "0.65285516", "0.65285516", "0.65257454", "0.6524965", "0.65245205", "0.6523423", "0.65212554", "0.6520323", "0.6518957", "0.6497579", "0.64734745", "0.64543533", "0.64543533", "0.64543533", "0.64543533", "0.64543533", "0.64543533", "0.64543533", "0.64543533", "0.64543533", "0.64543533", "0.64543533", "0.64543533", "0.64543533", "0.64543533", "0.64543533", "0.64543533", "0.64543533" ]
0.0
-1
Asking Durial what the current pot is at.
public static void currentPotAtDialogueOption(Player player) { Npc npc = NpcHandler.npcs[lotteryNpcIndex]; npc.forceChat("The pot is currently at " + getTotalPotString() + "!"); player.getDH().sendNpcChat("The current lottery pot is at " + getTotalPotString() + "!", "You have a " + getWinningPercentage(player.getPlayerName()) + "% chance to win.", FacialAnimation.HAPPY.getAnimationId()); player.nextDialogue = 596; // Bring back to lottery option menu. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static private void TalkTo() {\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(BSChristiansen.getDescription() + \", yet he still gives you good advice:\\n\");\n System.out.println(BSChristiansen.getDialog(0));\n System.out.println(\"\");\n woundedSurvivor();\n } else if (mysteriousCrab.getCurrentRoom() == currentRoom && inventory.getInventory().containsKey(\"Shroom\")) {\n System.out.println(mysteriousCrab.getDescription() + \"\\n\" + mysteriousCrab.getDialog(0));\n } else {\n System.out.println(\"There is nobody to communicate with in this Room\");\n }\n\n }", "private void choosePrompt() {\r\n\t\tfor (int i = 0; i < mustChoose.size(); i++) {\r\n\t\t\tString prompt = \"**[Choose]** \";\r\n\t\t\t// Find the correct text to display\r\n\t\t\tif (mustChoose.get(i).contentEquals(\"Shrine\")) {\r\n\t\t\t\tprompt += \"**1** :moneybag: ~OR~ **1** :heart:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Dragon Shrine\")) {\r\n\t\t\t\tprompt += \"**2** :moneybag: ~OR~ **1** :wastebasket:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Treasure Hunter\")) {\r\n\t\t\t\tprompt += \"a card to replace in the dungeon row (4-9)\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Underworld Dealing\")) {\r\n\t\t\t\tprompt += \"**1** :moneybag: ~OR~ **BUY 2** __Secret Tome__ **FOR 7** :moneybag:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Apothecary\")) {\r\n\t\t\t\tprompt += \"**3** :crossed_swords: **~OR~** **2** :moneybag: **~OR~** **1** :heart:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Mister Whiskers\")) {\r\n\t\t\t\tprompt += \"**Dragon Attack** ~OR~ **-2** :warning:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Wand of Wind\")) {\r\n\t\t\t\tif (GlobalVars.teleportRoomsPerRoom.length > 0) {\r\n\t\t\t\t\tprompt += \"**1** :crystal_ball: ~OR~ Take a **SECRET** from an adjacent room ``\"+\r\n\t\t\t\t\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()])+\" ┃ \"+\r\n\t\t\t\t\t\tUtils.arrayToString(GlobalVars.teleportRoomsPerRoom[currentPlayer.getCurrentRoom()])+\"``\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprompt += \"**1** :crystal_ball: ~OR~ Take a **SECRET** from an adjacent room ``\"+\r\n\t\t\t\t\t\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()])+\"``\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tgameChannel.sendMessage(prompt).queue();\r\n\t\t}\r\n\t}", "public void Prompt(){\n System.out.println(\"Enter information about the topping: \\n\\n\");\n super.Prompt();\n System.out.println(\"Enter any topping: \");\n this.Topping = new String(this.read.next());\n this.read.nextLine();\n System.out.println(\"Density:\\n 1. Heavy\\n 2. Standard\\n 3. Light\\n(Enter corresponding number): \");\n this.Density = this.read.nextInt();\n System.out.println(\"Is it vegetarian? (true or false): \");\n this.Vegetarian = this.read.nextBoolean();\n System.out.println(\"\\n\");\n }", "private void crossPressed() {\n\t\tif (!talkmode) {\n\t\t\tif (checkLoot() || checkNearbyVillagers() || checkDoors(doors, player.direction) || checkSigns()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\tif (question) {\n\t\t\t\texitQuestionDialog();\n\t\t\t}\n\n\t\t\tLoot g = dialog.getGift();\n\t\t\tif (g != null) {\n\t\t\t\tLoad.collectLoot(g);\n\t\t\t}\n\t\t\tString takeName = dialog.getTakeName();\n\t\t\tif (takeName != null) {\n\t\t\t\tint takeAmount = dialog.getTakeAmount();\n\t\t\t\tif (takeName.equals(\"gold\")) {\n\t\t\t\t\tLoad.getPartyItems().addGold(-takeAmount);\n\t\t\t\t} else {\n\t\t\t\t\tLoad.getPartyItems().take(takeName, takeAmount);\n\t\t\t\t}\n\t\t\t}\n\t\t\tHashMap<String, Integer> t = dialog.getBeforeTriggers();\n\t\t\tHashMap<String, Integer> triggerAdds = dialog.getTriggerAdds();\n\t\t\tboolean finished = dialog.isFinished();\n\t\t\tdoTriggers(t);\n\t\t\tif (triggerAdds != null) {\n\t\t\t\tDatabase.incrementStatus(triggerAdds);\n\t\t\t}\n\t\t\tif (finished) {\n\t\t\t\tsetTalking(false);\n\t\t\t\tif (dialog.shouldTrigger()) {\n\t\t\t\t\tt = dialog.getTriggers();\n\t\t\t\t\tdoTriggers(t);\n\t\t\t\t\texecuteTrigger(talkingVillager);\n\t\t\t\t} else {\n\t\t\t\t\tdialog.resetDialog();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (dialog.isQuestion()) {\n\t\t\t\t\tinitQuestionDialog();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void generalPrompt() {\n System.out.println(\"What would you like to do?\");\n }", "public void ask(UI ui, Player currentPlayer) {\n murderer = murdererName(ui, currentPlayer); // ask retrieve and validate who the player thinks the murderer is\n ui.getInfo().addText(\"You chose \" + murderer.getName() + \" as the murderer\"); // inform user of data received from them\n weapon = murderWeapon(ui, currentPlayer); // ask retrieve and validate what the player thinks the murder weapon was\n ui.getInfo().addText(\"You chose \" + weapon.getName() + \" as the murder weapon\"); // inform user of data received from them\n ui.getInfo().addText(murderer.getName() + \" killed Gunther with a \" + weapon.getName() + \" in the \" + currentPlayer.getPlayerToken().getCurrentTile().getRoomType()); // display the overall information\n }", "private void remindGoal()\n {\n System.out.println(\"you have to Pick up all three items and get back outside!\");\n }", "public void quitter() {\n\n\t\tint rep = JOptionPane.showConfirmDialog(null, \"Voulez-vous vraiment quitter ?\" , \"Attention\", JOptionPane.WARNING_MESSAGE);\n\t\tif (rep == JOptionPane.OK_OPTION)\n\t\t{\n\t\t\tsetChanged();\n\t\t\tnotifyObservers(QUITTER);\n\t\t}\n\t}", "static void feedPet() {\r\n\t\tJOptionPane.showMessageDialog(null, \"Your \" + pet + \" is happy and full.\");\r\n\t\thappinessLevel+=3;\r\n\t}", "private void chance(Player currentPlayer) {\n Random rand = new Random();\n int randomNum = rand.nextInt((3 - 1) + 1) + 1;\n\n if(randomNum == 1){\n convertTextToSpeech(\"Advance to Bond Street\");\n currentPlayer.setCurrentPosition(34);\n }\n if(randomNum == 2){\n convertTextToSpeech(\"Unpaid charges. Go to jail\");\n setJail(currentPlayer);\n }\n if(randomNum == 3){\n convertTextToSpeech(\"Build a rooftop swimming pool on your apartment, pay 300\");\n if(m_manageFunds) {\n currentPlayer.subtractMoney(300);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n m_freeParking += 300;\n Log.d(\"chance subtract 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance free parking\", String.valueOf(m_freeParking));\n }\n }\n }", "private void askForAPizza() {\n\t\tconnectToServer();\n\t\tout.println(\"Give me a pizza\");\n\t\tout.flush();\n\t\tdisconnectFromServer();\n\t}", "void askDefaultProduction();", "public static void getBattleChoice() {\n \t\tMainGame.display.disp(\"What do you want to do?:\");\r\n \t\tMainGame.display.Enable(MainGame.display.attack, MainGame.display.defend, MainGame.display.heal);\r\n \t}", "private void bust() {\n //Dialog box pop-up\n JOptionPane.showMessageDialog(this, this.getPlayerName() + \" busted with a value of: \" + this.getValue(), \"BUSTED!\", JOptionPane.INFORMATION_MESSAGE);\n busted = true; //Hand busted\n }", "public void askForType() {\n System.out.println(\"What type of event will this be?\");\n System.out.println(\"1) Normal 2) Multi-Speaker 3) VIP\");\n }", "static void pickup(Player player, String what) {\n if (player.getLocation().contains(what)) {\n Thing thing = player.pickup(what);\n if (thing != null) {\n System.out.println(\"You now have \" + thing);\n }\n else {\n System.out.println(\"You can't carry that. You may need to drop something first.\");\n }\n }\n else {\n System.out.println(\"I don't see a \" + what);\n }\n }", "public Scene deliverPrompt()\n {\n System.out.println(prompt);\n deliverOptions();\n return takeResponse();\n }", "public void getInput() {\r\n System.out.print(\"Is the car silent when you turn the key? \");\r\n setAnswer1(in.nextLine());\r\n if(getAnswer1().equals(YES)) {\r\n System.out.print(\"Are the battery terminals corroded? \");\r\n setAnswer2(in.nextLine());\r\n if(getAnswer2().equals(YES)){\r\n printString(\"Clean the terminals and try again\");\r\n }\r\n else {\r\n printString(\"The battery may be damaged.\\nReplace the cables and try again\");\r\n }\r\n\r\n }\r\n else {\r\n System.out.print(\"Does the car make a slicking noise? \");\r\n setAnswer3(in.nextLine());\r\n if(getAnswer3().equals(YES)) {\r\n printString(\"Replace the battery\");\r\n }\r\n else {\r\n System.out.print(\"Does the car crank up but fail to start? \");\r\n setAnswer4(in.nextLine());\r\n if(getAnswer4().equals(YES)) {\r\n printString(\"Check spark plug connections.\");\r\n }\r\n else{\r\n System.out.print(\"Does the engine start and then die? \");\r\n setAnswer5(in.nextLine());\r\n if(getAnswer5().equals(YES)){\r\n System.out.print(\"Does your care have fuel injection? \");\r\n setAnswer6(in.nextLine());\r\n if(getAnswer6().equals(YES)){\r\n printString(\"Get it in for service\");\r\n }\r\n else{\r\n printString(\"Check to insure the chock is opening and closing\");\r\n }\r\n }\r\n else {\r\n printString(\"This should be impossible\");\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n\r\n\r\n }", "private void askUser()\n { \n System.out.println(\"What is your command?\");\n\n String command = scanner.nextLine();\n commandPrompt(command);\n }", "public void callHelp() {\n System.out.println(\"Enter emergency number: \");\n String emergencyNeed = input.nextLine();\n this.emergencyNeed = emergencyNeed;\n if (emergencyNeed.equals(police)) {\n System.out.println(\"Calling for police!\");\n }\n else if (emergencyNeed.equals(fire)) {\n System.out.println(\"Calling for fire department!\");\n }\n else if (emergencyNeed.equals(emt)) {\n System.out.println(\"Calling for emt!\");\n }\n else {\n System.out.println(\"Invalid emergency number.\");\n }\n }", "private void buyProperty(Player currentPlayer, Square location) {\n String method = \"buyProperty\";\n PropertySquare square = (PropertySquare)location;\n\n recognizedSpeech.setText(\"\");\n if(square.getOwned()){\n convertTextToSpeech(square.getOwnedBy() + \"call rent\");\n //rent is subtracted and added\n\n if(m_manageFunds) {\n currentPlayer.subtractMoney(100);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(method + \"rent subtract money\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n String owner = square.getOwnedBy();\n for (int i = 0; i < m_numPlayers; i++) {\n if (players.get(i).getName().equals(owner)) {\n players.get(i).addMoney(100);\n Log.d(method + \"rent add money\", players.get(i).getName() +\n String.valueOf(players.get(i).getMoney()));\n }\n }\n }\n nextTurnRoll();\n\n } else {\n int price = ((PropertySquare) location).getPrice();\n convertTextToSpeech(\"Would you like to buy\" + square.getName() + \"for\" + price);\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 }\n }", "public void quest() {\n if ((int) (Math.random() * 100) > 50) {\n addStrangeCharacter();\n System.out.println(\"You found the npc to talk with\");\n if ((int) (Math.random() * 75) > 50) {\n addStrangeCharacter();\n System.out.println(\"And you beat the baws\");\n } else {\n System.out.println(\"And he baws owned you\");\n }\n } else {\n System.out.println(\"You couldn't even find the npc, lol n00b\");\n }\n }", "String execute(){\r\n if(key.isEmpty()){\r\n return \"Open the \" + door + \" with what?\\n\";\r\n }\r\n else if(door.isEmpty()){\r\n return \"Open what with the \" + key + \"?\\n\";\r\n }\r\n\r\n Player adventurer = state.getAdventurer();\r\n Exit lockedDoor;\r\n try{\r\n lockedDoor = adventurer.getCurrentRoom().getExitNamed(door);\r\n }\r\n catch(NoExitException e){\r\n return \"There's no exit named \" + door + \" here.\\n\";\r\n }\r\n\r\n adventurer.passTime();\r\n String healthWarning = state.getAdventurer().checkHealth();\r\n\r\n if(!healthWarning.isEmpty()){\r\n healthWarning += \"\\n\";\r\n }\r\n\r\n try{\r\n adventurer.getItemFromInventoryNamed(key);\r\n }\r\n catch(NoItemException e){\r\n try{\r\n adventurer.getItemInVicinityNamed(key);\r\n }\r\n catch(NoItemException w){\r\n return \"You don't have the \" + key + \".\\n\";\r\n }\r\n }\r\n\r\n if(lockedDoor.keyFits(key)){\r\n lockedDoor.unlock();\r\n return \"Unlocked.\\n\" + healthWarning;\r\n }\r\n\r\n return \"You can't open the \" + door + \" with the \" + key + \".\\n\" + healthWarning;\r\n }", "private String getPrompt(){\n return \"Now \" + (isWhiteTurn ? \"White\" : \"Black\");\n }", "static String pickup(Player player, String what) {\n if (player.getLocation().contains(what)) {\n Thing thing = player.pickup(what);\n \n //doesn't let you pick up things where McDowell is, and doesn't let you pickup McDowell\n if (thing != null && !player.getLocation().contains(\"Charlie McDowell\") && !what.equals(\"Charlie McDowell\")) {\n return \"-You have picked up the \" + thing;\n } else if(player.getLocation().contains(\"Charlie McDowell\") && !what.equals(\"Charlie McDowell\")){\n return \"-Charlie Bot: The transmitter is currently in McDowell's possession. You can't safely\\n\" +\n \"retrieve it without him noticing, 525. You'll have to use something to take it from him\\n\" +\n \"by force.\";\n } else if(what.equals(\"Charlie McDowell\") || what.equals(\"charlie mcdowell\")){ //you can't pickup McDowell\n return \"-Charlie Bot: You can't just shove the professor into your bag and call it a day, 525.\\n\" +\n \"Nice try though.\";\n } else {\n return \"-Your bag is full, 525. You need to drop something else first.\";\n }\n } else {\n return \"-Charlie Bot: There doesn't seem to be any \" + what + \" in the room, 525.\";\n }\n }", "@Override\n\tpublic void compete() {\n\t\tSystem.out.println(\"Pawan is competing as a swimming Athlete \");\n\t\t\n\t}", "private void c3POSpeaks() {\n\t\tint quoteChoice = (int) ( Math.random() * 10+1);\n\t\t\n\t\tswitch (quoteChoice) {\n\t\tcase 1 : this.say(\"C-3PO says: 'Artoo says that the chances of survival \\nare 725 to 1. Actually Artoo has \\nbeen known to make mistakes... from time \\nto time... Oh dear...' \"); break;\n\t\tcase 2 : this.say(\"C-3PO says: 'Excuse me sir, but might I inquire \\nas to what's going on?' \"); break;\n\t\tcase 3 : this.say(\"C-3PO says: 'I have a bad feeling about this.' \"); break; \n\t\tcase 4 : this.say(\"C-3PO says: 'I've had the most peculiar dream.'\"); break;\n\t\tcase 5 : this.say(\"C-3PO says: 'I'm programmed for etiquette, not destruction!'\"); break;\n\t\tcase 6 : this.say(\"C-3PO says: 'Pardon me, sir, could you possibly resist fiddling \\nwith technology that is beyond your comprehension?' \"); break;\n\t\tcase 7 : this.say(\"C-3PO says: 'Well, you'll never get me to go back to that iceberg! \\nI don't care how safe it is now, R2, it gives my motivators the \\nchills just thinking about it. ' \"); break;\n\t\tcase 8 : this.say(\"C-3PO says: 'Hello, I am C-3PO, human cyborg relations. How might I serve you?' \"); break;\n\t\tcase 9 : this.say(\"C-3PO says: 'Hm, it seems no one wants my company tonight. '\"); break;\n\t\tcase 10 : this.say(\"C-3PO says: 'This way looks potentially dangerous.' \"); break;\n\t\t}\n\t}", "public void talkToCharacter(Room room)//Made by Lexi\n {\n if (currentRoom.getTitle().equals(\"outside\")) {\n System.out.println(\"All you need to do is unlock the door...\");\n System.out.println(\"Hint: use INSPECT to examine an item in detail.\");\n if (player.inventoryContains(key))\n {\n kitchen.setLocked(false);\n System.out.println(\"The door makes a loud click.\");\n }\n }\n \n \n else if (currentRoom.getTitle().equals(\"kitchen\")) {\n System.out.println(\"In order to move on to the next room, you must first find an item which can be found by solving this riddle: \");\n System.out.println(\"A box without hinges, key, or lid, yet golden treasure inside is hid.\");\n System.out.println(\"The answer is an item in this room that will help you escape and move on to the next room.\");\n if (player.inventoryContains(egg))\n {\n poolRoom.setLocked(false);\n System.out.println(\"The door makes a loud click.\");\n }\n }\n else if (currentRoom.getTitle().equals(\"pool room\")) {\n System.out.println(\"In order to escape this room you must solve this next riddle: \");\n System.out.println(\"Wash me and I am not clean. Don't wash me and then I'm clean. What I Am?\"); //water\n System.out.println(\"The answer to the riddle is where you'll find the object needed to escape this room... \");\n if (player.inventoryContains(snorkel))\n {\n library.setLocked(false);\n System.out.println(\"The door makes a loud click.\");\n }\n }\n else if (currentRoom.getTitle().equals(\"library\")) {\n System.out.println(\"In order to escape this room you must solve this next riddle: \");\n System.out.println(\"The objects, or people, have been removed from their previous localities through the power of a naturally moving phenomenon.\");\n System.out.println(\"Once you have figured out what item belongs to the answer of this riddle you will have escaped the building!\");\n if (player.inventoryContains(blueBook))\n {\n \n exitRoom.setLocked(false);\n System.out.println(\"The door makes a loud click.\");\n }\n }\n else {\n System.out.println(\"There is nobody here, so you talk to yourself...\");\n }\n }", "private void askPlayer() {\n System.out.println(\"Dealers last card is \" + Dealer.showLast());\n System.out.println(\"Your hand is \" + p1.getHand());\n System.out.println(\"Your Hand total is \" + p1.getTotal() + \". Would you like to hit or stand?\");\n\n String s = scan.nextLine();\n System.out.println();\n\n if (s.equalsIgnoreCase(\"hit\")) {\n p1.addToHand(dealCard());\n p1.calcTotal();\n if (p1.getTotal() > 31) {\n System.out.println(\"Your hand is \" + p1.getHand());\n System.out.println(\"Your hand total is \" + p1.getTotal());\n System.out.println(\"You bust, Dealer wins\");\n\n totalWinnings -= betNum;\n p1.subPointCount(betNum);\n bust = true;\n\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n\n } else {\n askPlayer();\n }\n } else {\n System.out.println(\"You stand at \" + p1.getTotal());\n\n while (Dealer.calcTotal() < 26) {\n Dealer.addToHand(dealCard());\n\n }\n System.out.println(\"Dealer's hand is \" + Dealer.getHand());\n System.out.println(\"Dealer's hand total is \" + Dealer.getTotal());\n\n }\n }", "public void pickUpHerd() {\n rounds.get(currentRound).currentPlayerPickUpHerd();\n }", "public void askWatson(@NonNull String question){\n if (watson == null){\n logMessage(TAG, \"Watson service is null\");\n return;\n }\n// if (!isTtsInitiated){\n// String msg = \"Be patient! TTS is not initialized yet\";\n// logMessage(TAG, msg);\n// showToast(mContext, msg);\n// return;\n// }\n watson.ask(question);\n }", "void askBuyDevCards();", "public String chooseItem() {\n console.promptForString(\"\");\n console.promptForPrintPrompt(\"PLEASE ENTER THE NAME OF THE ITEM TO PURCHASE\");\n console.promptForPrintPrompt(\"-----------------------\");\n String toBuy = console.promptForString(\"BUY: \");\n\n return toBuy;\n }", "public void askForSpeaker(){\n System.out.println(\"Enter the speaker username\");\n }", "@Override\n\tpublic void onTalkToNpc(Player p, final Npc n) {\n\t\tp.setBusy(true);\n\t\tn.blockedBy(p);\n\n\t\tplayMessages(p, n, true, \"Can I come through this gate?\");\n\t\tplayMessages(p, n, false, \"You must pay a toll of 10 gold coins to pass\");\n\n\t\tString[] options = new String[] { \"No thankyou, I'll walk round\", \"Who does my money go to?\", \"yes ok\" };\n\n\t\tp.setMenuHandler(new MenuHandler(options) {\n\t\t\t@Override\n\t\t\tpublic void handleReply(int option, String reply) {\n\t\t\t\towner.setBusy(true);\n\t\t\t\tplayMessages(owner, n, true, reply);\n\n\t\t\t\tswitch(option) {\n\t\t\t\tcase 0: // no thanks\n\t\t\t\t\tplayMessages(owner, n, false, \"Ok suit yourself\");\n\n\t\t\t\t\tn.unblock();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1: // who does money go to\n\t\t\t\t\tplayMessages(owner, n, false, \"The money goes to the city of Al Kharid\");\n\n\t\t\t\t\tn.unblock();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2: // yes\n\t\t\t\t\tif(owner.getInventory().remove(10, 10) > -1) { // enough money\n\t\t\t\t\t\towner.getActionSender().sendInventory();\n\t\t\t\t\t\towner.getActionSender().sendMessage(\"You pay the guard\");\n\t\t\t\t\t\tplayMessages(owner, n, false, \"You may pass\");\n\t\t\t\t\t\towner.getActionSender().sendMessage(\"The gate swings open\"); // lold\n\t\t\t\t\t\t//x > 91 (left side of fence\n\t\t\t\t\t\tif(owner.getX() > 91)\n\t\t\t\t\t\t\towner.teleport(90, 649, false);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\towner.teleport(93, 649, false);\n\t\t\t\t\t\n\n\t\t\t\t\t\tn.unblock();\n\t\t\t\t\t} else { // not enough money\n\t\t\t\t\t\tplayMessages(owner, n, true, \"Oh dear I don't actually seem to have enough money\");\n\n\t\t\t\t\t\tn.unblock();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\towner.setBusy(false);\n\t\t\t}\n\t\t});\n\t\tp.getActionSender().sendMenu(options);\n\t\tp.setBusy(false);\n\t}", "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}", "String ask();", "public void askToAll() {\n\t\tfor(ClientThread player: players) {\n\t\t\tif(player != dealer)\n\t\t\t\tplayer.send(new Package(\"ASK\",null));\n\t\t\telse {\n\t\t\t\tdealer.send(new Package(\"MESSAGE\",\"As dealer, you'll wait for other players...\"));\n\t\t\t}\n\t\t}\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 }", "@Override\r\n\tpublic void pick() {\r\n\t\tSystem.out.println(\"Stay away from Jessica ya dweeb.\");\r\n\t\r\n\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 }", "public void speak()\n\t {\n\t \tSystem.out.printf(\"%s chants: Four legs good, Two legs BETTER\\n\", this.getName());\n\t }", "public String askOriginOrReturn();", "@Override\r\n public String ask() {\r\n String word = \"\";\r\n Time.getInstance().time += 1;\r\n word = \"Do you like the Story?\";\r\n System.out.println(word);\r\n return word;\r\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 }", "void askForNumber(String spieler,String playerChoices) throws IOException;", "static String start(Item drink)\n {\n State.setConversation(true);\n Conversation. drink = drink;\n String drinkName = drink.getName();\n stateDependentAnswer = Conversation::waitingForTheAge;\n return Texts.mTAKES_ALCOHOL + drinkName + \".\" + Texts.mHOW_OLD;\n// \"You try to take from an intelligent ice-box \" + drinkName +\n// \"This ice-box does not enable serving of alcoholic drinks \" +\n// \"to under-agers.\\nWhat is your age?\");\n }", "public void callOnTeleport() {\n\t\tif (summonedFamiliar != null && c.getInstance().summoned != null) {\n\t\t\tc.getInstance().summoned.killerId = 0;\n\t\t\tc.getInstance().summoned.underAttackBy = 0;\n\t\t\tc.getInstance().summoned.npcTeleport(0, 0, 0);\n\t\t\tc.getInstance().summoned.updateRequired = true;\n\t\t\tc.getInstance().summoned = Server.npcHandler.summonNPC(c, summonedFamiliar.npcId, c.getX(),\n\t\t\t\t\tc.getY() + (summonedFamiliar.large ? 2 : 1), c.heightLevel, 0, c.getInstance().summoned.HP, 1, 1,\n\t\t\t\t\t1);\n\t\t\tcallFamiliar();\n\t\t} else {\n\t\t\tc.getPA().sendSummOrbDetails(false, \"\");\n\t\t}\n\t}", "public void DoGoToSeat() {\n\t\tcommand = Command.FollowWaiter;\n\t}", "public int askWhatAssistants(int assi);", "public void Reinforcements()\n{\n\tSystem.out.println(\"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\");\n\tSystem.out.println(\"$$$$$$$$$$$$$ REINFORCEMENTS $$$$$$$$$$$$$$$$$\\n\\n\");\n\t int answer=1;\n do\n {\n\t System.out.println(name+\", you have \"+wealth+\" gold coins.\\n\" );\n\t System.out.println(\"$$$$$$$$ RATES $$$$$$$$\");\n\t System.out.println(\"1 health potions for 1 gold coin\");\n\t System.out.println(\"An improved weapon for 150 gold coins\");\n\t System.out.println(\"Non-refundable :)\");\n\t System.out.println(\"$$$$$$$$$$$$$$$$$$$$$$$$$\\n\");\n\t\tScanner scan=new Scanner(System.in);\n\n\n\t do\n\t{\n\t if(answer!=0&&answer!=1&&answer!=2)\n\t \tSystem.out.print(\"Error in Input! \");\n\t \tSystem.out.println(\"What would you like to buy (0=nothing/done, 1=health potions, 2=better weapon)?\");\n\t answer=scan.nextInt();\n }while(answer!=0&&answer!=1&&answer!=2);\n\n\n\tif (answer==1)\n\t{\n\t\tint exchange=0;\n\t\t\tdo\n\t\t{\n\t\t\tif(exchange<0||exchange>wealth)\n\t\t\t\tSystem.out.print(\"Error in Input! \");\n\n\t\t\tSystem.out.println(\"How many health potions would you like?(cannot be negative or more than your gold coins)\");\n\t exchange=scan.nextInt();\n\t\t}while(exchange<0||exchange>wealth);\n\n\t\t\twealth-=exchange;\n\t\t\thealth+=exchange;\n\t\t\tSystem.out.println(name+\" increases health by \"+exchange+\" potions.\");\n\t\t\tSystem.out.println(name+\" decreases wealth by \"+exchange+\" gold coins.\\n\");\n\n\t}\n\telse if(answer==2)\n\t{\n\t\tif(weapon<8)\n\t {\n\n\t\t\t weapon++;\n\n\n\t\tif(wealth>=150)\n\t\t{\n\t\t\twealth-=150;\n\n\t\t\tSystem.out.println(name+\"\\'s weapon has been improved to \"+WeaponName(weapon)+\".\");\n\t\t\tSystem.out.println(name+\" decreases wealth by 150 gold coins.\\n\" );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint temp=wealth;\n\t\t\thealth+=temp-150;\n\t\t\twealth=0;\n\n\t\tSystem.out.println(name+\"\\'s weapon has been improved to \"+WeaponName(weapon));\n\t\tSystem.out.println(name+\" decreases wealth by \"+temp+\" gold coins.\" );\n\t\tSystem.out.println(name+\" decreases health by \"+(150-temp)+\" portions.\\n\");\n\t\t}\n\t }\n\t \telse\n\t {\n\t \t\tweapon=8;\n\t \t\tSystem.out.println(\"You have updated to the most powerful weapon!!!-----\"+WeaponName(weapon)+\".\\n\" );\n\t }\n\n\t }\n\t else\n\t \tanswer=0;\n\n } while(answer!=0);\n}", "@Override\n public void play(Puppy puppy) {\n System.out.println(\"The puppy is asleep enjoying its wonderful dreams, it currently does not have the desire to play with you right now.\");\n }", "public static void setup(MC hero) \n { \n Scanner scan = new Scanner (System.in); \n String response;\n StoryLine.history();\n boolean nameLoop = false;\n while (!nameLoop) //while you do not choose or like the name you picked.\n {\n System.out.print(\"I see you are the chosen one. I am fate, the decider.\" + \"\\n\" + \"What is your name?\" + \"\\n\" + \"\\n\"\n + \"Name: \");\n hero.setName(scan.nextLine());\n System.out.println(\"Confirming \" + hero.getName() + \" as your name (Y / N)?\");\n response = scan.nextLine();\n nameLoop = (response.equalsIgnoreCase(\"Y\") || response.equalsIgnoreCase(\"Yes\"));\n }\n System.out.println(\"\\n\" + \"\\n\" +\"My \" + hero.getName() + \", your current attributes are - Health: \" + hero.getMaxHP() + \" Strength: \" + hero.getMaxHeal() + \" Strength: \" + hero.getStrength() + \" Agility: \"\n + hero.getAgility() + \" Defence: \"+ hero.getDefence() + \"\\n\\n<press any key to continue>\");\n scan.nextLine();\n System.out.println(\"\\n\" + \"Right now you have \" + hero.getPoints() + \" power-points in storage. You may add them to any of your stats. \\n\\n\"\n + \"Type in these options [health (h), heal (hl), strength (s), agility (a), defence (d), or None(N)]\" + \n \"\\n\" + \"The increase is as follows [health (+10), heal(+1), strength (+1), agility (+1), defence (+1), None(saves points)]\" +\n \"\\n\" + \"When you are complete, please type in done\" + \n \"\\n\" + \"Please choose wisely because you are unable to reset.\" + \"\\n\" + \"\\n\" + \"\\n<press any key to continue>\");\n scan.nextLine();\n boolean loop = true;\n while (loop) //while you still have points or want to use your points\n {\n System.out.print(\"Action: \");\n String action = scan.nextLine();\n loop = Methods.pointDistribute(action, hero);\n }\n System.out.println(\"You, \" + hero.getName() + \", now have \" + hero.getMaxHP() + \" hp, \" + hero.getMaxHeal() + \" max heal, \" + hero.getStrength() + \" strength, \"\n + hero.getAgility() + \" agility, \" + hero.getDefence() + \" defence.\" + \"\\n\"); \n System.out.println(\"\\n\" + \"Congratulations, you have leveled up!\" + \"\\n\");\n MC.levelUp(hero);\n System.out.println(\"As you progress with quests and battles, you will earn enough experience to 'level up' and become stronger.\\n<press any key to continue>\");\n scan.nextLine();\n System.out.println(\"Teleporting to town square...\\n**Note: This is the limited edition, the LITE version. You cannot save and have multiple accounts per game. \\nIf you want the full version, it is only accessible on BlueJ and Eclipse, which you can download both the game and the IDE online. \\n\\n\\nAlso, there may be extra spaces for Java's line eating fault\\nIf this happens, retype your action again.\\n\\nPlease refer to the manuals if you have any confusions before emailing questions.\" + \"\\n\" + \"\\n<press any key to continue>\");\n scan.nextLine();\n }", "void chooseStarterPlayer() {\n\t\tSystem.out.println(\"\\nWer beginnt?\");\n\t\tSystem.out.println(\"1 - Computer\");\n\t\tSystem.out.println(\"2 - Human\");\n\t}", "@Override\n public boolean onCommand(CommandSender commandSender, Command command, String label, String[] param) {\n if (command.getName().equalsIgnoreCase(\"donate\")) {\n if (param.length >= 1) {\n if (param[0].equalsIgnoreCase(\"buy\")) {\n if (param.length >= 2) {\n switch (param[1].toLowerCase()) {\n case \"vip\":\n buyVip(1, commandSender);\n break;\n default:\n commandSender.sendMessage(\"Invalid item use: /donate info\");\n }\n return true;\n } else {\n commandSender.sendMessage(\"Not enough arguments use: /donate buy vip\");\n return true;\n }\n } else if (param[0].equalsIgnoreCase(\"info\")) {\n if (param.length >= 2 && param[1].equalsIgnoreCase(\"kit\")) {\n commandSender.sendMessage(\"The vip kit contains\");\n commandSender.sendMessage(\"1 Leather armour set with enchants\");\n commandSender.sendMessage(\"The helmet is enchanted with Aqua Affinity I and Respiration III\");\n commandSender.sendMessage(\"The boots are enchanted with Feather Falling IV\");\n commandSender.sendMessage(\"One of each diamond tools and sword\");\n commandSender.sendMessage(\"Cooldown for kit is one day\");\n } else {\n commandSender.sendMessage(\"Purchase with 1000 donate points: /donate buy vip\");\n commandSender.sendMessage(\"VIP bonus -----\");\n commandSender.sendMessage(\"50% more MCMMO experience\");\n commandSender.sendMessage(\"The ability to use tpa (teleport ask)\");\n commandSender.sendMessage(\"The ability to use home, you still have to use a bed to set it\");\n commandSender.sendMessage(\"The vip kit (/kit vip) use /donate info kit for more information\");\n commandSender.sendMessage(\"VIP bonus -----\");\n }\n return true;\n } else if (param[0].equalsIgnoreCase(\"redeem\")) {\n if (param.length == 2) {\n commandSender.sendMessage(\"Attempting to redeem token...\");\n if (plugin.dbConnection.redeemToken(param[1], commandSender.getName())) {\n commandSender.sendMessage(\"Token successfully redeemed token \" + param[1]);\n } else {\n commandSender.sendMessage(\"Invalid token \" + param[1]);\n }\n return true;\n } else {\n commandSender.sendMessage(\"Not enough arguments use /donate redeem <token>\");\n return true;\n }\n } else if (param[0].equalsIgnoreCase(\"points\")) {\n commandSender.sendMessage(\"You have \" + plugin.dbConnection.getPlayerPoints(commandSender.getName()) + \" points\");\n return true;\n }\n }\n commandSender.sendMessage(\"Not enough arguments use: /donate (buy, info, redeem, points)\");\n return true;\n }\n return false;\n }", "public void doneBy(Player p) {\n\t\tp.currentRoom().discovered();\n\t\tSystem.out.println(p.description());\n\t\tSystem.out.println(\"\\n\"+Translator.translate(\"LookRoom\")+\" :\");\n\t\tPrintLookable.printList(Translator.translate(\"Monsters\"), p.currentRoom().getCharacters());\n\t\tPrintLookable.printList(Translator.translate(\"Items\"), p.currentRoom().getItems());\n\t\tPrintLookable.printList(Translator.translate(\"Dead\"), p.currentRoom().getDeads());\n\t\tList<Direction> directions = new ArrayList<Direction>(p.currentRoom().getPossibleDirections());\n\t\tPrintLookable.printList(Translator.translate(\"Directions\"), directions);\n\t}", "private void cs5() {\n\t\t\tif(ctx.widgets.widget(519).component(1).text().contains(\"You get some\")){\n\t\t\t\tctx.widgets.widget(519).component(2).click();\n\t\t\t}\n\t\t\tif(ctx.inventory.selectedItem().valid()){\n\t\t\t\tMethod.interactInventory(2511, \"Use\", \"Logs\");\n\t\t\t}else Method.interactInventory(590, \"Use\", \"Tinder box\");\n\t\t\t\n\t\t}", "private static int requestStartingFunds() {\n Scanner scanner = new Scanner(System.in);\n System.out.print(\"How much money would you like to bring to Las Vegas?\\t\");\n return scanner.nextInt();\n }", "private void chooseDifficulty(){\n\t\tint dif = -1;\n\t\tdo {\n\t\t\tprintSeparation();\n\t\t\tSystem.out.println(\"Elegeix una dificultat entre 1 i 3.\");\n\t\t\tdif = readInt();\n\t\t} while (dif <= 0 || dif >= 4);\n\t\tdifficulty = dif - 1;\n\t\tprintSeparation();\n\t\tSystem.out.println(\"S'ha elegit la dificultat \" + dif + \".\");\n\t}", "public void question() {\n\t\tlead.answer(this);\n\t}", "public void displayPrompt()\n\t{\n\t\tif (ch.usingJog.length() > 0)\n\t\t\treturn;\n\t\t\t\n\t\tif (showPrompt)\n\t\t{\n\t\t\t// Show the pageMode prompt if necessary.\n\t\t\tif (pageMode)\n\t\t\t{\n\t\t\t\tpageMode = false;\n\t\t\t\tsendln(\"\");\n\t\t\t\tsendln(\"{Y[== {CPAGE MODE: {wPush enter to continue. See {W'{chelp pagemode{W' {wfor details. {Y==]{x\");\n\t\t\t\tshowPrompt = false;\n\t\t\t\tpageMode = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// Show the editor prompt if necessary.\n\t\t\tif (cs == ConnState.EDITING)\n\t\t\t{\n\t\t\t\tsend(\"{G > {x\");\n\t\t\t\tshowPrompt = false;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsend(\"{x\");\n\t\t\tif (!prefs.get(\"compact\"))\n\t\t\t\tsendln(\"\");\n\t\t\tif (tempPrompt.length() > 0)\n\t\t\t\tsendln(tempPrompt);\n\t\t\telse\n\t\t\t{\n\t\t\t\tString pr = prompt;\n\t\t\t\tif (ch.fighting != null)\n\t\t\t\t\tpr = bprompt;\n\t\t\t\tif (!prefs.get(\"prompt\"))\n\t\t\t\t\tpr = \"\";\n\t\t\t\t\n\t\t\t\tString exitLine = \"\";\n\t\t\t\tfor (Exit e : ch.currentRoom.exits)\n\t\t\t\t\tif (e.flags.get(\"hidden\") && !(e.flags.get(\"door\") && !e.flags.get(\"closed\")))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse if (e.flags.get(\"door\") && e.flags.get(\"closed\"))\n\t\t\t\t\t\texitLine = exitLine+e.direction.substring(0, 1).toLowerCase();\n\t\t\t\t\telse\n\t\t\t\t\t\texitLine = exitLine+e.direction.substring(0, 1).toUpperCase();\n\t\t\t\t\n\t\t\t\tString lightString = \"\";\n\t\t\t\tint hour = Fmt.getHour();\n\t\t\t\tint season = Fmt.getSeason();\n\t\t\t\tint sunrise = Fmt.getSunrise(season);\n\t\t\t\tint sunset = Fmt.getSunset(season);\n\t\t\t\tif (hour < sunrise || hour > sunset)\n\t\t\t\t\tlightString = \"{D(){x\";\n\t\t\t\telse if (hour >= sunrise && hour < sunrise+2)\n\t\t\t\t\tlightString = \"{D({Y){x\";\n\t\t\t\telse if (hour <= sunset && hour > sunset-2)\n\t\t\t\t\tlightString = \"{Y({D){x\";\n\t\t\t\telse\n\t\t\t\t\tlightString = \"{Y(){x\";\n\n\t\t\t\tpr = pr.replace(\"%%\", \"SPEC_PERCENT\");\n\n\t\t\t\tpr = pr.replace(\"%h\", \"\"+ch.hp);\n\t\t\t\tpr = pr.replace(\"%H\", \"\"+ch.maxHp());\n\t\t\t\tpr = pr.replace(\"%p\", \"\"+((ch.hp*100)/ch.maxHp()));\n\t\t\t\tpr = pr.replace(\"%m\", \"\"+ch.mana);\n\t\t\t\tpr = pr.replace(\"%M\", \"\"+ch.maxMana());\n\t\t\t\tpr = pr.replace(\"%n\", \"\"+((ch.mana*100)/ch.maxMana()));\n\t\t\t\tpr = pr.replace(\"%s\", \"\"+ch.energy);\n\t\t\t\tpr = pr.replace(\"%S\", \"\"+ch.maxEnergy());\n\t\t\t\tpr = pr.replace(\"%i\", \"\"+((ch.energy*100)/ch.maxEnergy()));\n\t\t\t\t\n\t\t\t\tpr = pr.replace(\"%x\", \"\"+ch.tnl);\n\t\t\t\tpr = pr.replace(\"%g\", \"\"+ch.gold);\n\t\t\t\tpr = pr.replace(\"%G\", \"\"+ch.bank);\n\t\t\t\tpr = pr.replace(\"%c\", \"\"+ch.combatQueue.size()/2);\n\n\t\t\t\tpr = pr.replace(\"%a\", ch.currentArea().name);\n\t\t\t\tpr = pr.replace(\"%r\", ch.currentRoom.name);\n\t\t\t\tpr = pr.replace(\"%e\", \"\"+exitLine);\n\t\t\t\tpr = pr.replace(\"%t\", \"\"+savedTells.size());\n\t\t\t\tpr = pr.replace(\"%T\", \"\"+timeFrmt.format(System.currentTimeMillis()));\n\t\t\t\tpr = pr.replace(\"%d\", \"\"+dateFrmt.format(System.currentTimeMillis()));\n\t\t\t\tpr = pr.replace(\"%D\", \"\"+longDateFrmt.format(System.currentTimeMillis()));\n\t\t\t\tpr = pr.replace(\"%l\", lightString);\n\t\t\t\t\n\t\t\t\tpr = pr.replace(\"%A\", \"\"+ch.currentArea().id);\n\t\t\t\tpr = pr.replace(\"%R\", \"\"+ch.currentRoom.id);\n\t\t\t\tpr = pr.replace(\"%o\", olcMode);\n\n\t\t\t\tif (ch.fighting != null)\n\t\t\t\t{\n\t\t\t\t\tpr = pr.replace(\"%O\", Fmt.seeName(ch, ch.fighting));\n\t\t\t\t\tpr = pr.replace(\"%P\", \"\"+((ch.fighting.hp*100)/ch.fighting.maxHp()));\n\t\t\t\t\tpr = pr.replace(\"%N\", \"\"+((ch.fighting.mana*100)/ch.fighting.maxMana()));\n\t\t\t\t\tpr = pr.replace(\"%I\", \"\"+((ch.fighting.energy*100)/ch.fighting.maxEnergy()));\n\t\t\t\t}\n\n\t\t\t\tpr = pr.replace(\"SPEC_PERCENT\", \"%\");\n\t\t\t\t\n\t\t\t\tsend(pr+\"{x\");\n\t\t\t}\n\t\t\tshowPrompt = false;\n\t\t}\n\t}", "public boolean askQuestion(Question curentQuestion, int level) {\n this.level = level;\n System.out.println(\"Die \"+(1+level)*100+\" Euro Frage!\");\n System.out.println(curentQuestion.getQuestion());\n //Sets the position of the right answer so it will be random\n int positionCorrectAnswer = (int) (Math.random() * ((curentQuestion.getWrongAnswers().size()) + 1));\n curentQuestion.getWrongAnswers().add(positionCorrectAnswer, curentQuestion.getCorrectAnswer());\n for (int j = 0; j < curentQuestion.getWrongAnswers().size(); j++) {\n System.out.println(\"\\t\" + (1 + j) + \". \" + curentQuestion.getWrongAnswers().get(j));\n }\n int amountOfAnswers = curentQuestion.getWrongAnswers().size();\n if (joker) {\n System.out.println(\"\\t5. 50:50 Joker\");\n amountOfAnswers = 5;\n\n }\n return getUserInput(amountOfAnswers, positionCorrectAnswer, curentQuestion);\n\n }", "public static void usePotion(ClientContext ctx, int[] potionIds) {\n Item pot = ctx.inventory.select().id(potionIds).first().poll();\n\n if (pot.valid()) {\n pot.interact(\"Drink\", pot.name());\n sleep();\n\n if (pot.name().contains(\"Prayer\") && ctx.prayer.prayersActive()) {\n ctx.prayer.quickPrayer(true);\n }\n }\n }", "public void handleBuyEggCommand(){\n if(Aquarium.money >= EGGPRICE) {\n Aquarium.money -= EGGPRICE;\n Aquarium.egg++;\n }\n }", "private void haveFun() {\n\t\tint action = inputPrompt.funActivities(money);\r\n\t\tthis.money -= action;\r\n\t\t//has better effect depending on how much money you have spent\r\n\t\tthis.mentalHealth += FUNHEALTH + action;\r\n\t\tdailyTime--;\r\n\t\tinputPrompt.mainInfo(energy, physHealth, mentalHealth, money);\r\n\t\t\r\n\t}", "public void lastChanceGas()\n {\n System.out.print( \"Tank capacity: \" );\n int capacity = scan.nextInt();\n System.out.print( \"Gage reading: \" );\n int gage = scan.nextInt();\n System.out.print( \"Miles per gallon: \" );\n int mpg = scan.nextInt();\n double gasLeft = capacity * ( gage * 0.01 );\n double milesDriveable = gasLeft * mpg;\n if ( milesDriveable >= 200 )\n {\n System.out.println( \"Safe to Proceed!\" );\n }\n else\n {\n System.out.println( \"Get Gas!\" );\n }\n\n }", "public void play() \n { \n printWelcome();\n\n // Enter the main command loop. Here we repeatedly read commands and\n // execute them until the game is over.\n \n boolean finished = false;\n \n while (! finished) \n {\n Command command = parser.getCommand();\n finished = processCommand(command);\n }\n {\n Command command = parser.getCommand();\n finished = processCommand(command);\n if(p.energy == 0)\n finished = true;\n else if(currentRoom.getShortDescription() == \"outside the main entrance of the university\" && i.item1 == true && i.item2 == true)\n finished = true;\n }\n \n \n //game ending decision (victory, defeat, quit)\n \n if(p.energy == 0)\n { \n \n System.out.println(\"You look exhausted, stop or take a breather! You lost...\");\n }\n else if(currentRoom.getShortDescription() == \"outside the main entrance of the university\" && i.item1 == true && i.item2 == true)\n {\n System.out.println(\"Congratulations you won the game !\");\n }\n else\n {\n System.out.println(\"Thank you for playing. Good bye.\");\n }\n }", "default void interactWith(Teleporter tp) {\n\t}", "private void promptForSomething() {\n userInputValue = prompt(\"Please enter something: \", true);\n System.out.println(\"Thank you. You can see your input by choosing the Display Something menu\");\n }", "void askDevCardProduction();", "private void requestBucks() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Please choose a user to request TE Bucks from:\");\n\t\t\tUser fromUser;\n\t\t\tboolean isValidUser;\n\t\t\tdo {\n\t\t\t\tfromUser = (User)console.getChoiceFromOptions(userService.getUsers());\n\t\t\t\tisValidUser = ( fromUser\n\t\t\t\t\t\t\t\t.getUsername()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(currentUser.getUser().getUsername())\n\t\t\t\t\t\t\t ) ? false : true;\n\n\t\t\t\tif(!isValidUser) {\n\t\t\t\t\tSystem.out.println(\"You can not request money from yourself\");\n\t\t\t\t}\n\t\t\t} while (!isValidUser);\n\t\t\t\n\t\t\t// Select an amount\n\t\t\tBigDecimal amount = new BigDecimal(\"0.00\");\n\t\t\tboolean isValidAmount = false;\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\tamount = new BigDecimal(console.getUserInput(\"Enter An Amount (0 to cancel):\\n \"));\n\t\t\t\t\tisValidAmount = true;\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tSystem.out.println(\"Please enter a numerical value\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(amount.doubleValue() < 0.99 && amount.doubleValue() > 0.00) {\n\t\t\t\t\tSystem.out.println(\"You cannot request less than $0.99 TEB\");\n\t\t\t\t\tisValidAmount = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (amount.doubleValue() == 0.00) {\n\t\t\t\t\tmainMenu();\n\t\t\t\t}\n\t\t\t} while(!isValidAmount);\n\n\t\t\t// Create transfer object\n\t\t\tboolean confirmedAmount = false;\n\t\t\tString confirm = \"\";\n\t\t\tTransfer transfer = null;\n\t\t\twhile (!confirmedAmount) {\n\t\t\t\tconfirm = console.getUserInput(\"You entered: \" + amount.toPlainString() + \" TEB. Is this correct? (y/n)\");\n\t\t\t\tif (confirm.toLowerCase().startsWith(\"y\")) {\n\t\t\t\t\t// transferService to POST to server db\n\t\t\t\t\tSystem.out.println(\"You are requesting: \" + amount.toPlainString() +\n\t\t\t\t\t\t\t\" TEB from \" + fromUser.getUsername());\n\t\t\t\t\ttransfer = createTransferObj(\"Request\", \"Pending\",\n\t\t\t\t\t\t\t\t\tcurrentUserId, fromUser.getId(), amount);\n\t\t\t\t\tboolean hasSent = \n\t\t\t\t\t\t\ttransferService.sendBucks(currentUserId, fromUser.getId(), transfer);\n\t\t\t\t\tif (hasSent) {\n\t\t\t\t\t\t// TODO :: Test this\n\t\t\t\t\t\tSystem.out.println(\"The code executed\");\n\t\t\t\t\t}\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Request canceled.\");\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t} \t\n\t\t\t}\n\t\t\t\n\t\t}catch(UserServiceException ex) {\n\t\t\tSystem.out.println(\"User Service Exception\");\n\t\t}catch(TransferServiceException ex) {\n\t\t\tSystem.out.println(\"Transfer Service Exception\");\n\t\t}\n\t\t\n\t}", "private void getInput() {\n\t\tSystem.out.println(\"****Welcome to TNEB online Payment*****\");\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter your current unit\");\r\n\t\tunit = scan.nextInt();\r\n\t}", "public void interact(Human user)\n {\n System.out.println(\"You will have to talk to the Starbucks(c) cashier to get a cup of COFFEE\"); \n }", "public static void fullProof()\r\n\t{\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tif(choice >= 1 && choice <= 4)\r\n\t\t\t{\r\n\t\t\t\tif(choice == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tsetupShop();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse if (choice > 1 && choice <= 4)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You have not set up shop yet!\");\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(choice < 1 || choice > 4)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Do not know \" + choice);\r\n\t\t\t\tintro();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t\tintro();\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tif(choice >= 1 && choice <= 4)\r\n\t\t\t{\r\n\t\t\t\tif(choice == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tsetupShop();\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\tbuy(products);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 3 || choice == 4)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You have not bought anything yet!\");\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(choice < 1 || choice > 4)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Do not know \" + choice);\r\n\t\t\t\tintro();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t\tintro();\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tif(choice >= 1 || choice <= 4)\r\n\t\t\t{\r\n\t\t\t\tif(choice == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tsetupShop();\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\tbuy(products);\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 3)\r\n\t\t\t\t{\r\n\t\t\t\t\tlistItems(products, prices, amount);\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 4)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You have not listed anything yet!\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(choice < 0 || choice > 4)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Do not know \" + choice);\r\n\t\t\t\tintro();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tif(choice >= 1 || choice <= 4)\r\n\t\t\t{\r\n\t\t\t\tif(choice == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tsetupShop();\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\tbuy(products);\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 3)\r\n\t\t\t\t{\r\n\t\t\t\t\tlistItems(products, prices, amount);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 4)\r\n\t\t\t\t{\r\n\t\t\t\t\tpreTotal = subTotal(productAmounts);\r\n\t\t\t\t\tcheckout(preTotal, discount, discountRate);\r\n\t\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{\r\n\t\t\t\tSystem.out.println(\"Do not know \" + choice);\r\n\t\t\t\tintro();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void grab() {\r\n\t\tString item = mapContents[currentPlayer.getCurrentRoom()];\r\n\t\tif (item == null) return;\r\n\t\t\r\n\t\t// If artifact, make sure has room or backpack\r\n\t\tif (item.startsWith(\"Artifact\")) {\r\n\t\t\tif (currentPlayer.count(\"Artifact\") <= currentPlayer.count(\"Backpack\")) {\r\n\t\t\t\tcurrentPlayer.pickup(item);\r\n\t\t\t\tattackLevel++;\r\n\t\t\t\taddEvent(\"``\"+currentName+\"`` picked up an Artifact **\"+item.substring(8)+\"** :star:\",true);\r\n\t\t\t\taddHistory(\"ARTIFACT \"+item.substring(8));\r\n\t\t\t\tmapContents[currentPlayer.getCurrentRoom()] = null;\r\n\t\t\t}\r\n\t\t// If monkey idol, make sure didn't already pick one up this turn\r\n\t\t} else if (item.startsWith(\"MonkeyIdol\") && !currentPlayer.getAlreadyPickedUpMonkeyIdol()) {\r\n\t\t\tcurrentPlayer.pickup(item);\r\n\t\t\tcurrentPlayer.setAlreadyPickedUpMonkeyIdol(true);\r\n\t\t\tint num = Integer.parseInt(item.substring(10));\r\n\t\t\tnum--;\r\n\t\t\tif (num == 0) {\r\n\t\t\t\tmapContents[currentPlayer.getCurrentRoom()] = null;\r\n\t\t\t} else {\r\n\t\t\t\tmapContents[currentPlayer.getCurrentRoom()] = \"MonkeyIdol\"+num;\r\n\t\t\t}\r\n\t\t\taddEvent(\"``\"+currentName+\"`` picked up a Monkey Idol **5** :star:\",true);\r\n\t\t\taddHistory(\"IDOL \"+item.substring(8));\r\n\t\t}\r\n\t\tupdateReactionsInfo();\r\n\t\tupdatePlayArea(currentPlayer, false);\r\n\t\tupdateMarketAndTreasures(false);\r\n\t\ttry {\r\n\t\t\tupdateBoard();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private String getResponse()\n {\n System.out.println();\n System.out.println(\"Enter id number to look up, 'd' to display list, 'q' to quit\");\n System.out.print(\"Your choice: \");\n return scanner.nextLine();\n }", "public void consultDentist() {\n\t\tSystem.out.println(\"Patient \" + id + \" is consulting the dentist.\"); \n\t}", "public void talking(){\n System.out.println(\"PetOwner : *says something*\");\n }", "private void setupAddPotLaunch() {\n Button startAddPot = (Button) findViewById(R.id.btn_add_pot);\n startAddPot.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent AddPotintent = AddPot.makeIntent(MainActivity.this);\n startActivityForResult(AddPotintent, REQUEST_CODE_NEWPOT);\n }\n });\n }", "private void askConfirm(String question) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString confirm = \"y\";\n\t\twhile (!confirm.equals(\"y\") && !confirm.equals(\"n\")) {\n\t\t\tSystem.out.println(question);\n\t\t\tconfirm = scanner.nextLine();\n\t\t\tif (confirm.equals(\"y\")) {\n\t\t\t\tSystem.out.println(\"Thank you.\");\n\t\t\t} else if (confirm.equals(\"n\")) {\n\t\t\t\tSystem.out.println(\"You can edit the config settings in src/main/config\");\n\t\t\t\tSystem.exit(1);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Really funny. Try again.\");\n\t\t\t}\n\n\t\t}\n\t\tscanner.close();\n\t}", "public double getCurrentPot(){\n\t\treturn currentPot;\n\t}", "public void requestOpenPose()\r\n {\r\n // WE MAY HAVE TO SAVE CURRENT WORK\r\n boolean continueToOpen = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE WITH A CANCEL\r\n continueToOpen = promptToSave();\r\n }\r\n \r\n // IF THE USER REALLY WANTS TO OPEN A POSE\r\n if (continueToOpen)\r\n {\r\n // GO AHEAD AND PROCEED MAKING A NEW POSE\r\n promptToOpen();\r\n }\r\n }", "public void playHoomans() {\r\n System.out.println(\"Thanks for killing each other, human!\");\r\n }", "public static void printDeckPrompt(Deck deck) {\n System.out.println(\"[Deck - \" + deck.getName() + \"]\");\n System.out.print(\" > \");\n }", "private void showHint() {\r\n\t\tUtil.println(\"A special hint will be calculated for you, please wait.\");\r\n\r\n\t\tStrategyInterface s = new SmartStrategy();\r\n\r\n\t\tTurn turn = s.requestTurn(client.getTurn());\r\n\r\n\t\tclient.setTurn(turn);\r\n\r\n\t\tUtil.println(\"The following moves will be suggested: \");\r\n\t\tUtil.println(client.getTurn().getMoves().toString());\r\n\t\tUtil.println(\"Type applyhint to apply these moves.\");\r\n\t}", "static void healing_challenge2() {\n System.out.println(username + \" opens up the bag to check if there are any potions left in there...\");\n enter = next.nextLine();\n if(potions <= zero) {\n System.out.println(username + \" feels something in the bag...\");\n System.out.println(\"\\n\");\n System.out.println(\"GASP!!! It's just a sock from granny Boo.\");\n enter = next.nextLine();\n System.out.println(\"UH! OH! You have no more potions left, SORRY YOU'RE ON YOUR OWN...\");\n System.out.println(\"\\n\");\n }else if(potions > zero && playerhealth != 310) {\n System.out.println(username + \" found a potion in the bag...\");\n System.out.println(username + \" takes the red potion, throws the cap, and slowly let the potion heal the wounds.\");\n System.out.println(username + \" gained 80 HP points.\");\n playerhealth = playerhealth + 80; //player's health is healed\n potions--;\n if(playerhealth > 310){ //in case of player heals and adds 80 and health goes higher than 310\n playerhealth = 310;\n }\n //in case if player tries to increase their health over the maximum\n }else if(playerhealth == 310) {\n System.out.println(\"You are at maximum health.\");\n }\n }", "@Override\n public void askOxygen(){\n _brain.lungs.breath();\n _brain.heart.accelerate(1);\n }", "void askTurn();", "static void cuddle(String petType) {\n\thappinessLevel = happinessLevel+2;\n\tJOptionPane.showMessageDialog(null,\"You cuddled your \"+petType+\"\\nPet Happiness Level:\"+happinessLevel);\n}", "public String interact() {\n return sound;\n }", "public void useSecretPassage(Room room) {\n String roomName = room.getName();\n switch (roomName) {\n case \"Kitchen\":\n Room study = this.board.getRoom(\"Study\");\n Tile studyPassage = study.getSecretPassage();\n this.currentPlayersTurn.getPiece().setLocation(studyPassage);\n break;\n case \"Study\":\n Room kitchen = this.board.getRoom(\"Kitchen\");\n Tile kitchenPassage = kitchen.getSecretPassage();\n this.currentPlayersTurn.getPiece().setLocation(kitchenPassage);\n break;\n case \"Conservatory\":\n Room lounge = this.board.getRoom(\"Lounge\");\n Tile loungePassage = lounge.getSecretPassage();\n this.currentPlayersTurn.getPiece().setLocation(loungePassage);\n break;\n case \"Lounge\":\n Room conservatory = this.board.getRoom(\"Conservatory\");\n Tile conservatoryPassage = conservatory.getSecretPassage();\n this.currentPlayersTurn.getPiece().setLocation(conservatoryPassage);\n break;\n }\n\n }", "static public void woundedSurvivor() {\n System.out.println(\"Maybe you could bring me some food and something to defend myself now that i cant move\");\n System.out.println(\"Do you want to accept his mission: Yes or no\");\n Scanner scan = new Scanner(System.in); //Creates a new scanner\n String input = scan.nextLine(); //Waits for input\n if (input.equalsIgnoreCase(\"yes\")) {\n System.out.println(\"You got a mission, please use the show command for more information\");\n allMissions.addMission(jungle, \"Helping the injured survivor\");\n } else if (input.equalsIgnoreCase(\"no\")) {\n System.out.println(\"Come back again if you change your mind\");\n } else {\n System.out.println(\"Come back again if you change your mind\");\n }\n }", "void askForRepeat();", "public void repeatDeposit() throws IOException, ClassNotFoundException {\r\n System.out.println(\"\\nWould you make a deposit ?\");\r\n System.out.print(\"1 - Yes\\n2 - No\");\r\n System.out.println();\r\n System.out.print(\"Select option: \");\r\n int depositOption = this.input.nextInt();\r\n switch(depositOption) {\r\n case 1:\r\n this.deposit(); // Calling the Mentioned Function\r\n case 2:\r\n this.showMenu(); // Calling the Mentioned Function\r\n default:\r\n System.out.println(\"Error: Invalid option. Please enter 1 OR 2\");\r\n }\r\n }", "@Override\n public String getCurrentPlayer() {\n return godPower.getCurrentPlayer();\n }", "private String getPromptStrings(int choice) {\n //negative numbers correspond with the very first screen (not really anymore)\n //then the positive numbers go based on the choice the user makes\n switch (choice) {\n case 0: return \"\";\n //this is for the introductory screen\n case -1: return \"There is an enemy Ship! Looks like an Inter Planetary Pirate ship.\";\n case -2: return \"What would you like to do? Looks like is has a similar layout to our ship.\";\n case -3: return \"this is a dummy line for the status bar... health for you: 20, shields 1, enemy health: 20, shields 1\";\n case -4: return \"Now What?\";\n case -5: return \"Well that didn't work...\";\n case -6: return \"You are out of missiles.\";\n case -7: return \"All systems operational, and shields are up.\";\n case -8: return \"They are out of missiles...\";\n case -9: return \"Your Laser gun system is damaged, you can't shoot!\";\n case -10: return \"Your Missile system is damaged, you can't shoot!\";\n case -11: return \"Their Laser gun system is damaged, they can't shoot!\";\n case -12: return \"Their Missile system is damaged, they can't shoot!\";\n //this is for what you choose to do\n case 1: return \"You want to shot your laser gun at the enemy ship.\";\n case 2: return \"You want to shot a missile at the enemy ship.\";\n case 3: return \"You decided to wait and let your shields recharge.\";\n\n case 4: return \"Where do you want to shoot?\";\n case 5: return \"Where do you want to shoot?\";\n case 6: return \"\";\n\n case 45: return \"You damaged their Engine system!\";\n case 46: return \"You damaged their Shield system!\";\n case 47: return \"You damaged their Missile system!\";\n case 48: return \"You damaged their Laser Gun system!\";\n case 49: return \"You damaged their Piloting system!\";\n case 51: return \"You shoot at their Piloting system!\";\n case 52: return \"You shoot at their Laser gun system!\";\n case 53: return \"You shoot at their Missile system!\";\n case 54: return \"You shoot at their Shield system!\";\n case 55: return \"You shoot at their Engine system!\";\n\n case -45: return \"They damaged your Engine system!\";\n case -46: return \"They damaged your Shield system!\";\n case -47: return \"They damaged your Missile system!\";\n case -48: return \"They damaged your Laser Gun system!\";\n case -49: return \"They damaged your Piloting system!\";\n case -51: return \"They shoot at your Piloting system!\";\n case -52: return \"They shoot at your Laser gun system!\";\n case -53: return \"They shoot at your Missile system!\";\n case -54: return \"They shoot at your Shield system!\";\n case -55: return \"They shoot at your Engine system!\";\n\n case 80: return \"You decide to wait...\";\n case 81: return \"Your shields recharge and your systems are fixed.\";\n case -80: return \"They decide to wait..\";\n case -81: return \"Their shields recharge, and systems get repaired.\";\n\n case 97: return \"Their shield is down!\";\n case 98: return \"Their shield is up, your laser can't penetrate!\";\n case -98: return \"Your shields are up, their lasers can't penetrate!\";\n case 99: return \"It hit!\";\n case -99: return \"They landed the shot!\";\n case 100: return \"It missed!\";\n case -100: return \"They missed!\";\n\n case -101: return \"The laser hit!\";\n case -102: return \"The missile hit!\";\n case -103: return \"The laser missed.\";\n case -104: return \"The missile missed.\";\n }\n //if the input given is not one of the above\n return \"Error\";\n }", "public void quitter () {\n\t\tSystem.out.println(\"\\n========================================= AU REVOIR ! ====================================\");\n\t\tpartie.dispose();\n\t}" ]
[ "0.653036", "0.64045787", "0.5839181", "0.57632643", "0.57352626", "0.5656178", "0.55828875", "0.5545578", "0.5492572", "0.5450192", "0.543782", "0.5429185", "0.5427065", "0.5395957", "0.5388008", "0.5358368", "0.5354051", "0.53360033", "0.53105253", "0.530223", "0.529992", "0.5284429", "0.5281563", "0.5265976", "0.5265289", "0.5255674", "0.52552867", "0.52492684", "0.5247177", "0.52331096", "0.521686", "0.52109754", "0.51943487", "0.5186792", "0.5186013", "0.51807076", "0.51738304", "0.5170814", "0.51689327", "0.5159857", "0.51577914", "0.51526994", "0.51507735", "0.5140998", "0.5126096", "0.5126096", "0.5126096", "0.5126096", "0.5123465", "0.5114959", "0.51041174", "0.51011074", "0.5088241", "0.50838876", "0.5078469", "0.50748944", "0.50723666", "0.50702053", "0.5067028", "0.50619745", "0.50613624", "0.50512093", "0.505102", "0.5048914", "0.5045507", "0.50454813", "0.5044115", "0.50404567", "0.5027652", "0.5020338", "0.5017099", "0.5014047", "0.5012107", "0.5010578", "0.5000661", "0.49992198", "0.49965242", "0.49828893", "0.49788287", "0.49748546", "0.49728468", "0.49671707", "0.49657983", "0.4965414", "0.49635324", "0.49591684", "0.49590424", "0.495194", "0.49508688", "0.49458012", "0.49383143", "0.49381387", "0.49349514", "0.4933858", "0.49224538", "0.49201506", "0.49200687", "0.49176538", "0.49151713", "0.49144432" ]
0.6292639
2
Asking Durial what my winning percentage is.
public static void percentageOfWinningDialogueOption(Player player) { player.getDH().sendNpcChat("You have a " + getWinningPercentage(player.getPlayerName()) + "% chance to win.", FacialAnimation.HAPPY.getAnimationId()); player.nextDialogue = 596; // Bring back to lottery option menu. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int awardTriviaCoins (double pct) {\n Random r = new Random();\n int min = 1;\n if (pct > 0.75) {\n min = 15;\n } else if (pct > 0.5) {\n min = 10;\n } else if (pct > 0.25) {\n min = 5;\n }\n int winnings = min + (int)(Math.ceil(r.nextInt(10) * pct));\n this.coinCount += winnings;\n this.save();\n \n UserEvent.NewCoins message = new UserEvent.NewCoins(this.id, winnings);\n notifyMe(message);\n \n return winnings;\t \n\t}", "private boolean checkGreedyWinRate() {\r\n return myTotal.get(0) > enTotal.get(0)+2 && (myself.health > 50 || myself.health > opponent.health);\r\n }", "private double gradeQuiz() {\n int numCorrect = getNumberCorrect();\n double percentage = (numCorrect / numQuestions) * 100;\n return percentage;\n }", "public String calcWinPercentage(boolean forPlayer) {\n\t\tdouble totalWins = 0;\n\t\t\n\t\tfor(HandStats h : handStats) {\n\t\t\tif(forPlayer) {\n\t\t\t\tif(h.getHandOutcome().equals(\"WIN!!\") || h.getHandOutcome().equals(\"BLACKJACK!!\")) {\n\t\t\t\t\ttotalWins += 1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(h.getHandOutcome().equals(\"LOSE!!\") || h.getHandOutcome().equals(\"BUST!!\")) {\n\t\t\t\t\ttotalWins += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t \n\t\treturn (decimalFormat.format((totalWins / handStats.size()) * 100) + \"%\");\t\n\t}", "public void decideResult() {\n\t\t\n\t\tif (mUser.getHandValue() < 22 && mUser.getHandValue() > mDealer.getHandValue()) {\n\t\t\tmResult = \"win\";\n\t\t}else if(mUser.getHandValue() < 22 && mUser.getHandValue() == mDealer.getHandValue()) {\n\t\t\tmResult = \"draw\";\n\t\t}else {\n\t\t\tmResult = \"lose\";\n\t\t}\n\t\t\n\t}", "float getWinLossRatio();", "public void percentualGordura(){\n\n s0 = 4.95 / denscorp;\n s1 = s0 - 4.50;\n percentgord = s1 * 100;\n\n }", "int getPercentageHeated();", "public void collectWinnings() {\n\t\tif (hand.checkBlackjack()) {\n\t\t\tdouble win = bet * 1.5;\n\t\t\ttotalMoney += (win + bet);\n\t\t} else {\n\t\t\ttotalMoney += (bet + bet);\n\t\t}\n\t}", "public int getWinPercentage() {\n return winPercentage;\n }", "float getBonusPercentHP();", "private void askPlayer() {\n System.out.println(\"Dealers last card is \" + Dealer.showLast());\n System.out.println(\"Your hand is \" + p1.getHand());\n System.out.println(\"Your Hand total is \" + p1.getTotal() + \". Would you like to hit or stand?\");\n\n String s = scan.nextLine();\n System.out.println();\n\n if (s.equalsIgnoreCase(\"hit\")) {\n p1.addToHand(dealCard());\n p1.calcTotal();\n if (p1.getTotal() > 31) {\n System.out.println(\"Your hand is \" + p1.getHand());\n System.out.println(\"Your hand total is \" + p1.getTotal());\n System.out.println(\"You bust, Dealer wins\");\n\n totalWinnings -= betNum;\n p1.subPointCount(betNum);\n bust = true;\n\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n\n } else {\n askPlayer();\n }\n } else {\n System.out.println(\"You stand at \" + p1.getTotal());\n\n while (Dealer.calcTotal() < 26) {\n Dealer.addToHand(dealCard());\n\n }\n System.out.println(\"Dealer's hand is \" + Dealer.getHand());\n System.out.println(\"Dealer's hand total is \" + Dealer.getTotal());\n\n }\n }", "private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}", "int getRemainderPercent();", "public void coinDisbursed() {\r\n float coinsHandOut = this.balance; // coinsHandOut ---> balance to get the number of coins while keeping the amount entered\r\n // 100 Namibian Dollar\r\n int hundredDollar = (int)(coinsHandOut / 100.0F);\r\n float remainder = coinsHandOut % 100.0F;\r\n // 50 Namibian Dollar\r\n int fiftyDollar = (int)(remainder / 50.0F);\r\n remainder %= 50.0F;\r\n // 20 Namibian Dollar //\r\n int twentyDollar = (int)(remainder / 20.0F);\r\n remainder %= 20.0F;\r\n // 10 Namibian Dollar //\r\n int tenDollar = (int)(remainder / 10.0F);\r\n remainder %= 10.0F;\r\n // 5 Namibian Dollar //\r\n int fiveDollar = (int)(remainder / 5.0F);\r\n remainder %= 5.0F;\r\n // 1 Namibian Dollar //\r\n int oneDollar = (int)remainder;\r\n remainder %= 1.0F;\r\n // 50 cent --> 50 /100 //\r\n int fiftyCents = (int)((double)remainder / 0.5D);\r\n remainder = (float)((double)remainder % 0.5D);\r\n // 10 cent --> 10 /100\r\n int tenCents = (int)((double)remainder / 0.1D);\r\n remainder = (float)((double)remainder % 0.1D);\r\n // 5 cent --> 5 /100 //\r\n int fiveCents = (int)((double)remainder / 0.05D);\r\n System.out.println(\"\\nDisbursed :\\n\" + hundredDollar + \" x N$100\\n\" + fiftyDollar + \" x N$50\\n\" + twentyDollar + \" x N$20\\n\" + tenDollar + \" x N$10\\n\" + fiveDollar + \" x N$5\\n\" + oneDollar + \" x N$1\\n\" + fiftyCents + \" x 50c\\n\" + tenCents + \" x 10c\\n\" + fiveCents + \" x 5c\");\r\n }", "private void setTipPercentage(){\n System.out.println(\"You indicated the service quality was \"+\n serviceQuality+\". What percentage tip would you like to leave?\");\n tipRate=keyboard.nextDouble();\n \n \n }", "public void dealerAskCard() {\n int dealerScore = this.getDealerHand().getActualValue();\n while (dealerScore < 17) {\n Card card = this.deck.deal(this.getDealerHand());\n dealerScore = this.getDealerHand().getActualValue();\n }\n }", "void awardPoints(){\n if (currentPoints <= 100 - POINTSGIVEN) {\n currentPoints += POINTSGIVEN;\n feedback = \"Your current rating is: \" + currentPoints + \"%\";\n }\n }", "private void checkResults() {\n\n if (Dealer.calcTotal() == p1.calcTotal()) {\n System.out.println(\"You and the dealer Tie, Here is your money back.\");\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (p1.calcTotal() > Dealer.calcTotal() && !bust) {\n System.out.println(\"You win!\");\n totalWinnings += betNum;\n p1.addPointCount(betNum);\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (Dealer.calcTotal() > 31) {\n System.out.println(\"Dealer busts. You Win!\");\n totalWinnings += betNum;\n p1.addPointCount(betNum);\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (Dealer.getTotal() > p1.calcTotal() && Dealer.getTotal() < 32) {\n System.out.println(\"Dealer Wins.\");\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n p1.subPointCount(betNum);\n }\n }", "private int determineWinning(GamePlayerInterface player, GamePlayerInterface dealer)\n {\n \n int playerValue = player.getTotalCardsValue();\n int dealerValue = dealer.getTotalCardsValue();\n int result = 0;\n \n if(dealerValue > playerValue)\n {\n \t view.print(\"Dealer Wins\");\n \t view.printLine();\n \t result = 1;\n }\n \n else if(dealerValue < playerValue)\n {\n \t view.print(\"Player Wins\");\n \t view.printLine();\n \t result = 2;\n }\n \n else{\n \t view.print(\"Match Draw!\");\n \t view.printLine();\n }\n \n return result;\n }", "public int getPercentage() {\r\n\r\n\t\treturn (getAmount() - offeredQuantity) / 100;\r\n\r\n\t}", "private double promptForDepositAmount() {\n\n // display the prompt\n depositView.PrintAmountInCent();\n int input = keypad.getInput(); // receive input of deposit amount\n \n // check whether the user canceled or entered a valid amount\n if (input == CANCELED) {\n return CANCELED;\n }\n else {\n return (double) input / 100; // return dollar amount\n }\n }", "private void chance(Player currentPlayer) {\n Random rand = new Random();\n int randomNum = rand.nextInt((3 - 1) + 1) + 1;\n\n if(randomNum == 1){\n convertTextToSpeech(\"Advance to Bond Street\");\n currentPlayer.setCurrentPosition(34);\n }\n if(randomNum == 2){\n convertTextToSpeech(\"Unpaid charges. Go to jail\");\n setJail(currentPlayer);\n }\n if(randomNum == 3){\n convertTextToSpeech(\"Build a rooftop swimming pool on your apartment, pay 300\");\n if(m_manageFunds) {\n currentPlayer.subtractMoney(300);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n m_freeParking += 300;\n Log.d(\"chance subtract 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance free parking\", String.valueOf(m_freeParking));\n }\n }\n }", "public static void main(String[] args) {\n Scanner myScanner = new Scanner(System.in); //allows to prompt user for input\n System.out.print(\"Enter the original cost of the check in the form xx.xx \");\n //using method within Scanner class\n double checkCost = myScanner.nextDouble();\n System.out.print(\"Enter the percentage tip that you wish to pay as\"+\n \"a whole number (in the form xx): \" ); \n double tipPercent = myScanner.nextDouble(); //promt user to enter tip perecentage\n tipPercent /= 100; //We want to convert the percentage into a decimal value\n System.out.print(\"Enter the number of people who went out to dinner: \"); \n int numPeople = myScanner.nextInt(); //promt user to enter number of people\n double totalCost; \n double costPerPerson;\n int dollars, //whole dollar amount of cost \n dimes, pennies; //for storing digits\n //to the right of the decimal point \n //for the cost$ \n totalCost = checkCost * (1 + tipPercent);\n costPerPerson = totalCost / numPeople;\n //get the whole amount, dropping decimal fraction\n dollars=(int)costPerPerson;\n //get dimes amount, e.g., \n // (int)(6.73 * 10) % 10 -> 67 % 10 -> 7\n // where the % (mod) operator returns the remainder\n // after the division: 583%100 -> 83, 27%5 -> 2 \n dimes=(int)(costPerPerson * 10) % 10;\n pennies=(int)(costPerPerson / 100);\n System.out.println(\"Each person in the group owes $\" + dollars + \".\" + dimes + pennies);\n \n \n }", "private static int guessing() {\n\t\t\n\t\tSystem.out.println(\"Guess a number between 1 and 100, you have 5 trials: \");\n\t\t\n\t\tint trials = 5;\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\t//set a random number as the number to be guessed\n\t\tint num = (int)(100 * Math.random()) + 1;\n\t\tint points = 0;\n\t\t\n\t\t//use a flag to check if player guess the correct number or not\n\t\tboolean flag = false;\n\t\twhile ( trials > 0) {\n\t\t\tint guess = input.nextInt();\n\t\t\ttrials--;\n\t\t\tif ( guess == num ) {\n\t\t\t\tpoints = trials == 0? 20 : trials * 20;\n\t\t\t\t//System.out.println(\"You guess the number with\"+trials+\"trials left, congratulation! +\"+ (points = trials == 0? 20 : trials * 20)+\" points\");\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}else if ( guess < num ) {\n\t\t\t\tSystem.out.println(\"The guess is too small, please try again, you have \"+trials+\" trials left.\");\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"The guess is too large, please try again, you have \"+trials+\" trials left.\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif ( !flag ) System.out.println(\"Trials used up, + 0 points\");\n\t\treturn points;\n\t\t\n\t}", "public void setWinPercentage(int winPercentage) {\n this.winPercentage = winPercentage;\n }", "public void deposit() {\n\t\tSystem.out.println(\"5%\");\n\n\t}", "private static int coinFlip() {\n\t\tint num = (Math.random() <= 0.5) ? 1 : 2; \n\t\tString answer;\n\t\tif ( num == 1) {\n\t\t\tanswer = \"h\";\n\t\t}else {\n\t\t\tanswer = \"t\";\n\t\t}\n\t\t\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\t\n System.out.print(\"Enter you guess (h = heads, t = tails):\");\n String guess = input.next();\n //change the guess to lower case to accept both capital or lower case answer\n guess.toLowerCase();\n \n //gain 50 points if win the toss\n if ( guess.equals(answer)) {\n \t//System.out.println(\"You won the toss, congratulation! +50 points\");\n \treturn 50;\n }else {\n \t //System.out.println(\"Wrong guess! 0 points\");\n \t return 0;\n }\n \n\t}", "public float PercentPL() {\n\t\tif (!isClosed()) {\r\n\t\t\tSystem.err.println(\"Cannot compute PL if trade is on\");\r\n\t\t\treturn -1f;\r\n\t\t}\r\n\t\tif(dir == Direction.LONG) {//If long\r\n\t\t\t//(Sell price - Buy price) / Buy price * 100\r\n\t\t\treturn ((exitPrice - entryPrice)/entryPrice)*100;\r\n\t\t}\r\n\t\t//If short\r\n\t\t//(Sell price - Buy price) / Sell price * 100\r\n\t\treturn ((entryPrice - exitPrice)/entryPrice)*100;\r\n\t}", "public int askHowManyUsers() {\r\n\t\tint userAmount = 0;\r\n\t\tboolean correctInput = false;\r\n\r\n\t\twhile (correctInput == false) {\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"How many players would like to participate in the game?\\nPlease type 1,2,3 or 4. If you type 1 a virtual user will automatically be created. Otherwise have fun playing with your human friends!\");\r\n\t\t\ttry {\r\n\t\t\t\tuserAmount = input.nextInt();\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t\tif (userAmount == 1 || userAmount == 2 || userAmount == 3 || userAmount == 4 || userAmount == 5) {\r\n\t\t\t\t\tcorrectInput = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (userAmount > 5) {\r\n\t\t\t\t\t\tSystem.out.println(\"Five players is the maximum!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (userAmount == 0) {\r\n\t\t\t\t\t\tSystem.out.println(\"At least one person should play!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (InputMismatchException e) {\r\n\t\t\t\tSystem.out.println(\"Please type a number\");\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn userAmount;\r\n\t}", "public static int calcPercentage(int remainingPercentage) {\n return randomizer.nextInt(remainingPercentage) + 1;\n }", "public String getWinnerVotePercent(String state) {\r\n result = table.get(state);\r\n String winnerVotePercentage = result.get(2);// getting winner percentage from array list\r\n \r\n return winnerVotePercentage ;\r\n }", "public double calculateHpPercent();", "public int displayCompletionMessage(int correctans) {\n\t\t\t\t\tcorrectans = ((correctans * 100) / 10);\n\t\t\t\t\tSystem.out.println(\"Your score is \"+ correctans);\n\t\t\t\t\t//display the message \"Congratulations, you are ready to go to the next level!\" if the student's score is greater than or equal to 75%\n\t\t\t\t\tif(correctans >= 75) {\n\t\t\t\t\t\tSystem.out.println(\"Congratulations, you are ready to go to the next level!\");\n\t\t\t\t\t}\n\t\t\t\t\t// display the message \"Please ask your teacher for extra help.\" if the student's score is less than 75%\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"Please ask your teacher for extra help.\");\n\t\t\t\t\t}\n\t\t\t\t\t//restart when the student agrees to solve a new problem set\n\t\t\t\t\t// shall terminate when the student declines to solve another problem set\n\t\t\t\t\tSystem.out.println(\"Want to solve a new problem set? 1 for yes/ 0 for no\");\n\t\t\t\t\t int counter = resp.nextInt();\n\t\t\t\t\t return counter;\n\t\t\t\t\t\n\t\t\t}", "public static void win()\n\t{\n\t\tGame.setMoney(Game.getMoney()+bet);\n\t\tremainingMoneyN.setText(String.valueOf(Game.getMoney()));\n\t\tbet=0;\n\t\ttfBet.setText(\"0\");\n\t\tif(Game.getMoney()>Game.getHighScore())\n\t\t{\n\t\t\tGame.setHighScore(Game.getMoney());\n\t\t\tlblHighScore.setText(String.valueOf(Game.getHighScore()));\n\t\t}\n\t\tlblUpdate.setText(\"You win!\");\n\n\t}", "private double promptForDepositAmount() {\n Screen screen = getScreen(); // get reference to screen\n // display the prompt\n screen.displayMessage(\"[?] Please enter a deposit amount in\\n\" +\n \" CENTS (or 0 to cancel): \");\n int input = keypad.getInput(); // receive input of deposit amount\n // check whether the user canceled or entered a valid amount\n if (input == CANCELED) {\n return CANCELED;\n } else {\n return (double) input / 100; // return dollar amount\n }\n }", "public static void main (String []args) {\n\t\tSystem.out.println(\"What is your dog's name?\");\n\t\tScanner myScanner = new Scanner(System.in); \n\t\tString dogName = myScanner.nextLine(); // reads user input\n\t\tSystem.out.println(\"Well then, I have this highly reliable report on \" + dogName + \"'s prestigious background right here.\");\n\t\tSystem.out.println(dogName + \" is: \");\n\t\t\n\t\tint percentage = 100; //keeps track the current percentage left\n\t\t\n\t\tRandom rand = new Random(); //creates an instance of random class\n\t\t//generates a random integer in range 0 to 100\n\t\tint randPercentage = rand.nextInt(percentage + 1);\n\t\tSystem.out.println( randPercentage + \"% St. Bernard\");\n\t\t//updates the total and comes up with a random integer in new range\n\t\tpercentage -= randPercentage;\n\t\trandPercentage = rand.nextInt(percentage + 1);\n\t\tSystem.out.println( randPercentage + \"% Chihuahua\"); \n\t\tpercentage -= randPercentage;\n\t\trandPercentage = rand.nextInt(percentage + 1);\n\t\tSystem.out.println( randPercentage + \"% Dramatic RedNosed Asian Pug\");\n\t\tpercentage -= randPercentage;\n\t\trandPercentage = rand.nextInt(percentage + 1);\n\t\tSystem.out.println( randPercentage + \"% Common Cur\"); \n\t\t//last breed is however much that is left\n\t\tpercentage -= randPercentage;\n\t\tSystem.out.println(percentage + \"% King Doberman\");\n\t\tSystem.out.println(\"Wow, that's QUITE the dog!\");\n\t\tmyScanner.close();\n\t}", "@Override\n\tpublic void makeDecision() {\n\t\tint powerMax = (int)(initPower) / 100;\n\t\tint powerMin = (int)(initPower * 0.3) / 100;\n\n\t\t// The value is calculated randomly from 0 to 10% of the initial power\n\t\tRandom rand = new Random();\n\t\tint actualPower = rand.nextInt((powerMax - powerMin) + 1) + powerMin;\n\t\tanswer.setConsumption(actualPower);\n\t}", "@Test\n public void testWinLossRatio(){\n float wins = 0;\n float losses = 0;\n\n realDie1 = new Dice();\n realDie2 = new Dice();\n realDie3 = new Dice();\n\n game = new Game(realDie1, realDie2, realDie3);\n\n when (mockPlayer.getBalance()).thenReturn(100);\n\n int currentGameWins = 0;\n\n for (int i = 0; i < 10000; i++) {\n currentGameWins = game.playRound(mockPlayer, DiceValue.ANCHOR, 10);\n\n if (currentGameWins == 0) {\n losses ++;\n } else {\n wins ++;\n }\n\n }\n System.out.println(\"Wins = \" + wins + \" Losses = \" + losses);\n float ratio = wins/(losses + wins);\n System.out.println(\"Win ratio = \" + ratio);\n }", "public static void main(String[] args)\n {\n Scanner s = new Scanner(System.in);\n System.out.println(\"Please enter the amount due\");\n double due = s.nextDouble();\n System.out.println(\"Please enter the amount recieved\");\n double pay = s.nextDouble();\n double change = (pay - due);\n int dollars = (int) change/ 1;\n change = change%1;\n int quarters = (int) (change/.25);\n change = change %.25;\n int dimes = (int) (change/.10);\n change = change% .10;\n int nickels = (int) (change /.05);\n change = change % .05;\n int pennies = (int) (change/.01);\n System.out.println(dollars + \" Dollars\\n\");\n System.out.println(quarters +\" Quarters\\n\");\n System.out.println(dimes + \" Dimes\\n\");\n System.out.println(nickels + \" Nickels\\n\");\n System.out.println(pennies + \" Pennies\\n\");\n}", "private void calculateGoalsConcededPerGame(LeagueTableEntry entry) {\r\n\t\tfloat goalsConcededPerGame = (float) entry.getGoalsConceded() / entry.getMatchesPlayed();\r\n\t\tentry.setGoalsConcededPerGame(goalsConcededPerGame);\r\n\t}", "public void winAccountant()\r\n {\r\n switch (Win)\r\n {case 1: //A tie with scissors\r\n ties++; uSci++; cSci++;\r\n break;\r\n case 2: //A tie with paper\r\n ties++; uPap++; cPap++;\r\n break;\r\n case 3: //A tie with rock\r\n ties++; uRock++; cRock++;\r\n break;\r\n case 4: //A win for user with Scissors\r\n uWins++; uSci++; uSciW++;\r\n cPap++;\r\n break;\r\n case 5: //A win for user with Paper\r\n uWins++; uPap++; uPapW++;\r\n cRock++;\r\n break;\r\n case 6: //A win for user with Rock\r\n uWins++; uRock++; uRockW++;\r\n cSci++;\r\n break;\r\n case 7: //A win for Comp with Scissors\r\n cWins++; cSci++; cSciW++;\r\n uPap++;\r\n break;\r\n case 8: //A win for Comp with Paper\r\n cWins++; cPap++; cPapW++;\r\n uRock++;\r\n break;\r\n case 9: //A win for Comp with Rock\r\n cWins++; cRock++; cRockW++;\r\n uSci++;\r\n break;\r\n default: JOptionPane.showMessageDialog(null,\r\n \"Error: Unknown Win Value - WinCalc.winAccountant 207\", \r\n \"digiRPS - Error\", \r\n JOptionPane.ERROR_MESSAGE);\r\n break;}\r\n \r\n // Update the last three wins\r\n winThree=winTwo;\r\n winTwo=winOne;\r\n winOne=Win;\r\n \r\n }", "public void getBonusPoints(){\n\t\tif((this.player[Dominoes.getPlayerIndex()].hand.size() == 0) && (Dominoes.missedRounds == 0)){\n\t\t\tshort bonusScore = 0;\n\t\t\tfor(byte i = 0; i < this.player.length; i++){\n\t\t\t\tif(i != Dominoes.getPlayerIndex()){\n\t\t\t\t\tbonusScore += (this.player[i].hand.size() * 5);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.player[Dominoes.getPlayerIndex()].score += bonusScore;\n\t\t}\n\t}", "private static int requestStartingFunds() {\n Scanner scanner = new Scanner(System.in);\n System.out.print(\"How much money would you like to bring to Las Vegas?\\t\");\n return scanner.nextInt();\n }", "public static void fundation(){\n Scanner keyboard = new Scanner(System.in);//Keyboard input initializer\r\n String STR; //string for yes or no\r\n System.out.println(\"Would you like to donate to LDJ bank? (y/n)\");\r\n System.out.println();\r\n System.out.printf(\">\");\r\n STR = keyboard.next(); //the user inputs y or n in order to say if they want to donate or not\r\n if(STR.equals(\"y\")){ //if they want to donate\r\n System.out.println();\r\n System.out.println(\"Insert the amount to donate\");\r\n System.out.println();\r\n System.out.printf(\"> $\");\r\n FUNDATION = keyboard.nextInt(); //the promt is printed and the amount is requested\r\n if(FUNDATION <= BALANCE){//if the amount to donate is minor to the balance you can donate\r\n FUNDATIONM = FUNDATIONM + FUNDATION; //the fundation money plus the amount to be donated\r\n BALANCE = BALANCE - FUNDATION; //the user balance minus the fundation money\r\n System.out.println(\"Thank you for donating!\");\r\n }\r\n else {\r\n System.out.println(\"Insufficient Balance\");\r\n }\r\n }\r\n else if(STR.equals(\"n\")){ //if n then prints blank\r\n System.out.println();\r\n }\r\n System.out.println(\"We'll continue with the operation\");\r\n System.out.println();\r\n System.out.println(\"Done\");\r\n }", "private void printResults() {\n\t\tdouble percentCorrect = (double)(correctAnswers/numberAmt) * 100;\n\t\tSystem.out.println(\"Amount of number memorized: \" + numberAmt +\n\t\t\t\t \"\\n\" + \"Amount correctly answered: \" + correctAnswers +\n\t\t\t\t \"\\n\" + \"Percent correct: \" + (int)percentCorrect);\n\t}", "public int percentSaveDone() {\n if (isSaveDone()) {\n return 100;\n }\n return percent;\n }", "private void haveFun() {\n\t\tint action = inputPrompt.funActivities(money);\r\n\t\tthis.money -= action;\r\n\t\t//has better effect depending on how much money you have spent\r\n\t\tthis.mentalHealth += FUNHEALTH + action;\r\n\t\tdailyTime--;\r\n\t\tinputPrompt.mainInfo(energy, physHealth, mentalHealth, money);\r\n\t\t\r\n\t}", "static void cuddle(String petType) {\n\thappinessLevel = happinessLevel+2;\n\tJOptionPane.showMessageDialog(null,\"You cuddled your \"+petType+\"\\nPet Happiness Level:\"+happinessLevel);\n}", "public int getCurrentPlayerFunds(){return currentPlayerTurn.getFunds();}", "public BigDecimal getPercentageProfitPStd();", "public int rollDice(){\r\n\t\tString playerResponse;\r\n\t\tplayerResponse=JOptionPane.showInputDialog(name+\". \"+\"Type anything to roll\");\r\n\t\t//System.out.println(name+\"'s response: \"+playerResponse);\r\n\t\tdice1=(int)(Math.random() * ((6 - 1) + 1)) + 1;\r\n\t\tdice2=(int)(Math.random() * ((6 - 1) + 1)) + 1;\r\n\t\tdicetotal=dice1+dice2;\r\n\t\tnumTurns++;\r\n\t\treturn dicetotal;\r\n\t}", "public static void main(String[] args) {\r\n\t\tFraction.setDecimalFormatSelected(false);\r\n\t\tboolean go = true;\r\n\t\tint correct = 0;\r\n\t\tint incorrect = 0;\r\n\t\twhile (go) {\r\n\t\t\tdouble num = (Math.random()) * 50;\r\n\t\t\tdouble denom = (Math.random()) * 50;\r\n\t\t\tdouble num2 = (Math.random()) * 50;\r\n\t\t\tdouble denom2 = (Math.random()) * 50;\r\n\r\n\t\t\tFraction fractionOne = new Fraction((int) num, (int) denom);\r\n\t\t\tFraction fractionTwo = new Fraction((int) num2, (int) denom2);\r\n\r\n\t\t\tdouble chooserTemp = (Math.random()) * 4;\r\n\t\t\tint chooser = (int) chooserTemp;\r\n\r\n\t\t\tFraction answer;\r\n\t\t\tint answerNum = 0;\r\n\t\t\tint answerDenom = 0;\r\n\t\t\tFraction correctAnswer;\r\n\r\n\t\t\tif (chooser == 0) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Add \" + fractionOne\r\n\t\t\t\t\t\t+ \" with \" + fractionTwo);\r\n\t\t\t\tFraction sum = fractionOne.add(fractionTwo);\r\n\t\t\t\tcorrectAnswer = sum;\r\n\t\t\t} else if (chooser == 1) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Subtract \" + fractionOne\r\n\t\t\t\t\t\t+ \" by \" + fractionTwo);\r\n\t\t\t\tFraction difference = fractionOne.subtract(fractionTwo);\r\n\t\t\t\tcorrectAnswer = difference;\r\n\t\t\t} else if (chooser == 2) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Multiply \" + fractionOne\r\n\t\t\t\t\t\t+ \" with \" + fractionTwo);\r\n\t\t\t\tFraction product = fractionOne.multiply(fractionTwo);\r\n\t\t\t\tcorrectAnswer = product;\r\n\t\t\t} else {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Divide \" + fractionOne\r\n\t\t\t\t\t\t+ \" by \" + fractionTwo);\r\n\t\t\t\tFraction quotient = fractionOne.divide(fractionTwo);\r\n\t\t\t\tcorrectAnswer = quotient;\r\n\t\t\t}\r\n\r\n\t\t\tString userAnswer = JOptionPane\r\n\t\t\t\t\t.showInputDialog(\"Please enter your answer \\n\"\r\n\t\t\t\t\t\t\t+ \"(Please seperate the numerator and denominator with a space)\"\r\n\t\t\t\t\t\t\t+ \"\\n To exit hit cancel\");\r\n\r\n\t\t\tif (userAnswer != null) {\r\n\t\t\t\tScanner scan = new Scanner(userAnswer);\r\n\t\t\t\tboolean first = true;\r\n\t\t\t\twhile (scan.hasNextInt()) {\r\n\t\t\t\t\tif (first) {\r\n\t\t\t\t\t\tanswerNum = scan.nextInt();\r\n\t\t\t\t\t\tfirst = false;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tanswerDenom = scan.nextInt();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tanswer = new Fraction(answerNum, answerDenom);\r\n\t\t\t\tif (answer.equals(correctAnswer)) {\r\n\t\t\t\t\tcorrect++;\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\r\n\t\t\t\t\t\t\t\"Good Job!! You are correct!\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tJOptionPane\r\n\t\t\t\t\t\t\t.showMessageDialog(null,\"Sorry that answer is incorrect the answer is \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ correctAnswer.toString()\r\n\t\t\t\t\t\t\t\t\t\t\t+ \"\\nMake sure that you are typeing in with a space and not a Slash.\");\r\n\t\t\t\t\tincorrect++;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tgo = false;\r\n\t\t\t\tJOptionPane.showMessageDialog(null,\r\n\t\t\t\t\t\t\"Thank you for Playing \\n You got \" + correct\r\n\t\t\t\t\t\t\t\t+ \" correct. \\n You got \" + incorrect\r\n\t\t\t\t\t\t\t\t+ \" incorrect.\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "static void healing_challenge2() {\n System.out.println(username + \" opens up the bag to check if there are any potions left in there...\");\n enter = next.nextLine();\n if(potions <= zero) {\n System.out.println(username + \" feels something in the bag...\");\n System.out.println(\"\\n\");\n System.out.println(\"GASP!!! It's just a sock from granny Boo.\");\n enter = next.nextLine();\n System.out.println(\"UH! OH! You have no more potions left, SORRY YOU'RE ON YOUR OWN...\");\n System.out.println(\"\\n\");\n }else if(potions > zero && playerhealth != 310) {\n System.out.println(username + \" found a potion in the bag...\");\n System.out.println(username + \" takes the red potion, throws the cap, and slowly let the potion heal the wounds.\");\n System.out.println(username + \" gained 80 HP points.\");\n playerhealth = playerhealth + 80; //player's health is healed\n potions--;\n if(playerhealth > 310){ //in case of player heals and adds 80 and health goes higher than 310\n playerhealth = 310;\n }\n //in case if player tries to increase their health over the maximum\n }else if(playerhealth == 310) {\n System.out.println(\"You are at maximum health.\");\n }\n }", "private static void checkForKnockout()\n\t{\n\t\tif (playerOneHealth <= 0 && opponentHealth <= 0)\n\t\t{\n\t\t\tSystem.out.println(playerOneName + \" and \" + opponentName + \" both go down for the count!\");\n\t\t\t\n\t\t\t// Prints one to ten because fighter is knocked out\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif (i < 6) System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\n\t\t\t\t// Delays count – from StackOverflow\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException e) \n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!!\\n\" + playerOneName + \" and \" + opponentName + \" knocked each other out at the same time.\\nWhat a weird ending!!!\");\n\t\t}\n\t\n\t\t// Check if Player One Lost\n\t\telse if (playerOneHealth <= 0)\n\t\t{\n\t\t\t// Prints one to ten because player one is knocked out\n\t\t\tSystem.out.println(playerOneName + \" is down for the count!\");\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif (i < 6) System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\t\n\t\t\t\t// Delays count – from StackOverflow\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException exception) \n\t\t\t\t{\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Game Over\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!!\\n\" + playerOneName + \" was knocked out, and \" + opponentName + \" still had \" + opponentHealth + \" health left. \\nBetter luck next time player one!!!\");\n\t\t}\n\t\n\t\t// Check if Player Two Lost\n\t\telse if (opponentHealth <= 0)\n\t\t{\n\t\t\tSystem.out.println(opponentName + \" is down for the count!\");\n\n\t\t\t// Prints one to ten because fighter is knocked out\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif(i < 6)System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\t\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException exception) \n\t\t\t\t{\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Game Over\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!! \\n\" + opponentName + \" was knocked out, and \" + playerOneName + \" still had \" + playerOneHealth + \" health left.\\nCONGRATULATIONS PLAYER ONE!!!\");\n\t\t}\n\t}", "public float getChance()\n {\n return 1.0f;\n }", "static void feedPet() {\r\n\t\tJOptionPane.showMessageDialog(null, \"Your \" + pet + \" is happy and full.\");\r\n\t\thappinessLevel+=3;\r\n\t}", "private void checkForPlayerChance()\n\t\t\t{\n\t\t\t\tf = false;\n\t\t\t\tfor (j = 0; j < 8; ++j)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (win[j] == 2 && lose[j] == 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tf = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\tif (f == false)\n\t\t\t\t\tj = 10;\n\n\t\t\t}", "public BigDecimal getPercentageProfitPLimit();", "int getMinigameDefenseChancesLeft();", "public void InterestRate() {\n\t\t\tSystem.out.println(\"9 percent\");\n\t\t}", "public String percentageProgress(float goalSavings, float currGoalPrice) {\n float percentageProgress = (goalSavings / currGoalPrice) * 100;\n DecimalFormat df = new DecimalFormat(\"#.##\");\n df.setRoundingMode(RoundingMode.CEILING);\n return \"[\" + df.format(percentageProgress) + \"%]\";\n }", "private int promptDepositAmount() {\r\n screen.displayMessage(\"\\nPlease enter a deposit amount in CENTS (or \" + CANCELED + \" to cancel): \");\r\n return keypad.getInput();\r\n }", "public int updateSleeping() {\n //sleeping = 1.3 + 7-energy/10 -- Eat until foodAmt == 0 or 2 more than the lowest stat\n //wake up = 1.0 + 7-stat/10 -- Get the highest value to compare to eating value\n options[0] = (1.0 + ((5.0-(double)energy)/10.0)); // sleep\n options[1] = (1.0 + ((7.0-(double)food)/10.0)); // eat\n options[2] = (1.0 + ((7.0-(double)water)/10.0)); // drink\n \n int maxStat = getMax();\n \n if(maxStat == 0)\n return 0;\n else\n return 1;\n }", "public void win() {\n JOptionPane.showConfirmDialog(null, \"You won! You got out with \" + this.player.getGold() + \" gold!\", \"VICTORY!\", JOptionPane.OK_OPTION);\n this.saveScore();\n this.updateScores();\n this.showTitleScreen();\n }", "public double getPlayRatio(int wins) {\n return StatisticsHelper.getDivision(getDecksByWins(wins), getTotalDeckAmount());\n }", "public static void main(String[] args) {\n\n Scanner scn = new Scanner(System.in);\n\n int amount;\n int tries = 1; // max 3 attempts\n\n do {\n System.out.println(\"Give me 5 dollars!\");\n amount = scn.nextInt();\n tries++;\n } while (amount < 5 && tries < 4);\n\n// System.out.println(\"Give me 5 dollars!\");\n\n// amount = scn.nextInt();\n//\n// while (amount < 5 && tries <= 2) {\n// System.out.println(\"Give me 5 dollars!\");\n// tries++;\n// amount = scn.nextInt();\n// }\n//\n if (amount >= 5) {\n System.out.println(\"Thanks!\");\n } else {\n System.out.println(\"You failed!\");\n }\n\n\n }", "public static Integer getAchievementsPercentage(Player p) {\n\n\t\tint NumberOfAch = 0;\n\t\tint NumberCompleted = 0;\n\n\t\tfor(Achievements ach : Achievements.values()) {\n\t\t\tNumberOfAch += 1;\n\t\t\tif(PlayerConfig.hasAchivement(p, ach))\n\t\t\t{\n\t\t\t\tNumberCompleted += 1;\n\t\t\t}\n\t\t}\n\t\tint percent = (int)((NumberCompleted * 100.0f) / NumberOfAch);\n\n\t\treturn percent;\n\t}", "boolean hasBonusPercentHP();", "private int computeBetterResponse(int player, GameObserver go) {\n int[] devOutcome = currentOutcome.clone();\n double aspirationPayoff = eGame.getPayoff(currentOutcome, player) + aspirationLevel;\n double bestPayoff = eGame.getPayoff(currentOutcome, player);\n int bestResponse = currentOutcome[player];\n\n ///System.out.println(\"Finding BR: \" + Arrays.toString(currentOutcome));\n\n // get the order in which to test best responses\n List<Integer> order = deviationTestOrder.getDeviationTestOrder(currentOutcome, player);\n\n// if (order.size() < nActs[player]-1) {\n// System.out.println(\"To few actions in order listing: \" + order.size());\n// }\n\n int itr = 0;\n for (int a : order) {\n // skip current action\n if (a == currentOutcome[player]) continue;\n devOutcome[player] = a;\n\n //System.out.println(\"Testing dev: \" + Arrays.toString(devOutcome));\n\n // check whether this profile is \"tabu\"\n if (tabu.getValue(devOutcome)) {\n //System.out.println(\"TABU\");\n continue;\n }\n\n // sample if necessary; flag not enough samples\n if (eGame.getNumSamples(devOutcome) == 0) {\n if (go.numObsLeft() <= 0) return NO_SAMPLES_FLAG;\n sampleAndUpdate(devOutcome, go);\n //System.out.println(\"SAMPLED\");\n }\n\n // check BR\n double devPayoff = eGame.getPayoff(devOutcome, player);\n\n// if (devPayoff > aspirationPayoff) {\n// //System.out.println(\"Aspiration met.\");\n// return a;\n// } else\n\n if (devPayoff > bestPayoff) {\n //System.out.println(\"Br, but not aspiration level\");\n bestPayoff = devPayoff;\n bestResponse = a;\n }\n\n itr++;\n if (itr > minDeviationsTested &&\n bestPayoff > aspirationPayoff) {\n return bestResponse;\n }\n\n }\n\n if (bestResponse != currentOutcome[player]) {\n //System.out.println(\"return non-aspiration BR\");\n return bestResponse;\n }\n //System.out.println(\"NO BR\");\n return NO_BR_FLAG;\n }", "private void correctDialog() {\n // Update score.\n updateScore(scoreIncrease);\n\n // Show Dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Correct! This Tweet is \" + (realTweet ? \"real\" : \"fake\"));\n //builder.setPositiveButton(\"OK\", (dialog, which) -> chooseRandomTweet());\n builder.setOnDismissListener(unused -> chooseRandomTweet());\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "public static void main(String[] args) {\n\r\n int cent = 200;\r\n\r\n // you have purchase candle for 74 cent, what would be your remainder\r\n\r\n cent -= 74 ; // 126 cent\r\n\r\n int quarter = cent / 25 ; // 126/25---->\r\n int penny = cent % 25; //126%25 ---> 1 is remaining\r\n\r\n System.out.println(quarter);\r\n System.out.println(penny);\r\n\r\n int dime= cent / 10 ; // 126 / 10 --->12\r\n // how much penny I have after getting dime 126 %10---->6\r\n int penny2 = cent % 10 ; //---->6\r\n System.out.println(dime);\r\n System.out.println(penny2);\r\n\r\n\r\n\r\n }", "public int percent() {\n\t\tdouble meters = meters();\n\t\tif (meters < MIN_METERS) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn (int) (Math.pow((meters - MIN_METERS)\n\t\t\t\t/ (MAX_METERS - MIN_METERS) * Math.pow(100, CURVE),\n\t\t\t\t1.000d / CURVE));\n\t}", "private double culcSystemProfit(BetsMap bets, Car winner) {\n\t\tdouble sumBets = bets.getSumBets();\n\t\tif (bets.forCar(winner).isEmpty()) {\n\t\t\treturn sumBets;\n\t\t}\n\t\treturn sumBets * PERCENT / 100;\n\t}", "public double getPercentMutants() {\n\t\tdouble count = (double) getNumMutants();\n\t\tdouble pSize = (double) this.getPopSize();\n\n\t\treturn count*100.0 / pSize;\n\t}", "private void calculatePickMeScore(Node n) {\n\t\t// Force a simulation count of 1 if this node has never been simulated\n\t\tint numSims = (n.sims == 0 ? 1 : n.sims);\n\t\tint winCount = (player == WHITE ? n.whiteWin : n.blackWin);\n\t\tn.value = (float)(winCount/numSims + 1.4*Math.sqrt(Math.log(simulations)/numSims));\n\t}", "public static int percent(int nom, int den) {\r\n\t\treturn (int) Math.round(100 * ((double) nom / den));\r\n\t}", "public void CoinFlip(int totalFlip) {\n\n //variables\n int count = 0;\n int head = 0;\n int tail = 0;\n\n //computation\n while (count != totalFlip) {\n double flip = Math.random();\n System.out.println(flip);\n\n if (flip < 0.5) {\n System.out.println(\"Print Head\");\n head++;\n\n } else {\n System.out.println(\"Print Tail\");\n tail++;\n }\n count++;\n }\n\n System.out.println(\"number of heads wins: \" + head);\n System.out.println(\"numberof tails wins:\" + tail);\n\n int perHaid = (head * 100 / totalFlip);\n int perTail = (tail * 100 / totalFlip);\n System.out.println(\"the percentage of head win:\" + perHaid);\n System.out.println(\"the percentage of tail win:\" + perTail);\n\n\n }", "@Override\n\tpublic void win() {\n\t\t\n\t\tfround[fighter1]++;\n\t fplatz[fighter1]=Math.round((float)fplatz[fighter1]/2); \n\t \n\t\tnextRound();\n\t}", "private static double getWinRate() {\n\t\treturn winRate ;\n\t}", "public void start()\n\t{\n\t\tSystem.out.print(\"Enter the number of rounds: \");\n\t\tnumRounds = in.nextInt ();\n\t\tif (numRounds > 100 || numRounds < 1)\n\t\t\t{\n\t\t\t\tnumRounds = 10;\n\t\t\t\tSystem.out.println(\"Invalid number entered, default set to 10 rounds\");\n\t\t\t}\n\t\tin.nextLine(); \n\t\t\n\t\t//Obtains information from the user for the percentage of each attack and passes \n\t\t//them back into the attack class later. If the total does not\n\t\t//equal 100, then a roughly equal probability will be chosen \t\t\n\t\tSystem.out.println(\"Enter the percentage of attacks that will be aimed low:\");\n\t\tint lowAttack = in.nextInt();\n\t\tin.nextLine(); \n\t\tSystem.out.println(\"Enter the percentage of attacks that will be aimed medium:\");\n\t\tint medAttack = in.nextInt();\n\t\tin.nextLine();\n\t\tSystem.out.println(\"Enter the percentage of attacks that will be aimed high:\");\n\t\tint highAttack = in.nextInt();\n\t\t\n\t\tif (lowAttack + medAttack + highAttack != 100)\n\t\t\t{\n\t\t\t\tlowAttack = 33;\n\t\t\t\tmedAttack = 34;\n\t\t\t\thighAttack = 33;\n\t\t\t\tSystem.out.println(\"Numbers entered did not equal 100. Default values set\");\n\t\t\t}\n\t\tSystem.out.println(\"COMBAT INITIALIZED!\");\n\t\tSystem.out.println(\"-------------------\");\n\t\t\n\t\tcalculate(lowAttack, medAttack, highAttack);\n\t}", "public double getHonesty(){\n\t\treturn (this.pct_honest);\n\t}", "public String calcPushPercentage() {\n\t\tdouble totalPushes = 0;\n\t\t\n\t\tfor(HandStats h : handStats) {\n\t\t\tif(h.getHandOutcome().equals(\"PUSH!!\")) {\n\t\t\t\ttotalPushes += 1;\n\t\t\t}\n\t\t}\n\t\t\t \n\t\treturn (decimalFormat.format((totalPushes / handStats.size()) * 100) + \"%\");\t\n\t}", "private void evaluateWin(boolean finalCheck)\r\n\t{\r\n\t\t// Stores player and dealer scores in local variables, rather than repeatedly call the get methods\r\n\t\tint scoreP = player1.getTotal();\r\n\t\tint scoreD = dealer.getTotal();\r\n\t\t\r\n\t\t// first check: is the game still going? If it has ended, then no evaluation needs to be made\r\n\t\tif ( !endGame )\r\n\t\t{\r\n\t\t\t/* second check: is this the final evaluation? if not, the first block of statements executes.\r\n\t\t\tIf Player == 21 and Dealer == 21, Tie\r\n\t\t\tIf Player == 21 and Dealer != 21, Player wins\r\n\t\t\tIf Player != 21 and Dealer == 21, Dealer wins\r\n\t\t\tIf Player > 21, Dealer wins at any number\r\n\t\t\tIf Player > Dealer at the end of the game and no one has busted or hit 21, Player wins\r\n\t\t\tThe last check is performed only if finalCheck is true.\r\n\t\t\t*/\r\n\t\t\tif ( !finalCheck )\r\n\t\t\t{\r\n\t\t\t\tif (scoreP > BUST_SCORE)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You lose...\");\r\n\t\t\t\t\tendGame = true;\r\n\t\t\t\t}\r\n\t\t\t\telse if (scoreP == BUST_SCORE)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (scoreD == BUST_SCORE)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"It's a tie.\");\r\n\t\t\t\t\t\tendGame = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"You win!\");\r\n\t\t\t\t\t\tendGame = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} // end scoreP > BUST_SCORE\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif (scoreD == BUST_SCORE)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"You lose...\");\r\n\t\t\t\t\t\tendGame = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (scoreD > BUST_SCORE)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"You win!\");\r\n\t\t\t\t\t\tendGame = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} // end ScoreP <= BUST SCORE\r\n\t\t\t} // end finalCheck = false\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Final victory condition check\r\n\t\t\t\tif ( dealer.getTotal() < player1.getTotal() )\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You win!\");\r\n\t\t\t\t}\r\n\t\t\t\telse if ( dealer.getTotal() == player1.getTotal() )\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"It's a tie.\");\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You lose...1\");\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t} // end finalCheck = true\r\n\t\t\r\n\t\t} // end endGame = false if\r\n\t\r\n\t}", "public void updateGame() \n\t{\n\t\tif (bet <= credit && bet <=500) // Verify that the bet is valid. \n\t\t{\n\t\t\tcredit = credit - bet; // Decrement the credit by the amount bet\n\t\t\tgamesPlayed++;\n\t\t\tif (ourWin == \"Royal Flush\")\n\t\t\t{\n\t\t\t\tgamesWon++;\t\t\t\t//Increment the amount of games won\n\t\t\t\tcurrentWin = 250 *bet; // Determine the current win\n\t\t\t\tcredit+= currentWin;\t// Add the winnings to the player's credit\n\t\t\t\twinnings+= currentWin;\t// Keep a tally of all the winnings to this point\n\t\t\t\tcreditValue.setText(String.valueOf(credit)); // Update the credit value.\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Straight Flush\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin+= 50 * bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Four of a Kind\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin+= 25 *bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Full House\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin+= 9* bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Flush\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= 6 * bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Straight\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= 4* bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Three of a Kind\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= 3* bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Two Pair\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= 2* bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Jacks or Better\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tgamesLost++;\n\t\t\t\tlosses+= bet;\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\t//Update the remaining statistics\n\t\t\tplayedValue.setText(String.valueOf(gamesPlayed));\n\t\t\twonValue.setText(String.valueOf(gamesWon));\n\t\t\tlostValue.setText(String.valueOf(gamesLost));\n\t\t\twinningsValue.setText(String.valueOf(winnings));\n\t\t\tlossesValue.setText(String.valueOf(losses));\n\t\t}\t\n\t}", "void win() {\n\t\t_money += _bet * 2;\n\t\t_wins++;\n\t\tclearHand();\n\t\t_bet = 0;\n\t}", "public double generateMoneyGoal() {\n\t\tdouble moneyGoal = Math.random()*(10000 -100)+100; \n\t\t\n\t\treturn moneyGoal;\n\t}", "public double getPercentRem(){\n return ((double)freeSpace / (double)totalSpace) * 100d;\n }", "public String getLoserVotePercent(String state) {\r\n result = table.get(state);\r\n String loserVotePercentage = result.get(3);//getting loser percentage from array list\r\n \r\n \r\n return loserVotePercentage;\r\n }", "public void surrender() {\n playerCash += playerBet / 2;\n\n //Play dealer's turn\n dealerTurn();\n\n //End the game and change the views\n restartGame();\n }", "@Override\n public int guessCardValue(Player p) {\n return Card.PRINCESS;\n }", "public static void main(String [] args){\n String userInput;\n userInput = JOptionPane.showInputDialog(null, \"Enter an integer number\", \"I'm going to turn into dollars\");\n int intUI = Integer.parseInt(userInput);\n \n //at this point im unsure what im supposed to do\n //does the textbook want me to tell the user how many\n //20s represent the inputed #? (And then same thing\n //for 10s, 5s, 1s) Or does it want me to display the input\n //# in the least number of bills possible?\n \n //intialize int vars \n int twenties = 0;\n int tens = 0;\n int fives = 0;\n int ones = 0;\n \n //logic chain to get the right bill numbers\n twenties = intUI / 20;\n if(intUI%20 > 0){\n intUI = intUI - twenties * 20;\n tens = intUI / 10;\n if(intUI%10 > 0){\n intUI = intUI - tens * 10;\n fives = intUI / 5;\n if(intUI%5 > 0){\n intUI = intUI - fives * 5;\n ones = intUI / 1;\n }//close if\n }//close if\n }//close if chain\n \n //show the bill numbers to user\n JOptionPane.showConfirmDialog(null, twenties + \" 20s, \"\n + tens + \" 10s, \"\n + fives + \" 5s, \"\n + ones + \" 1s, \",\n \"This is your number in the least amount of bills\",\n JOptionPane.YES_OPTION,\n JOptionPane.INFORMATION_MESSAGE);\n }", "public void setPercentage() {\n\t\tif (this.winnumber == 0) {\n\t\t\tthis.percentage = 0;\n\t\t} else {\n\t\t\tthis.percentage = (double) this.winnumber * 100 / (double) this.gamenumber;\n\t\t}\n\t}", "public double getDodgeChance() {\n return Math.min((this.getAgility().getAbilityValue() / 4.0) * 0.01, 1);\n }", "public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}", "public int attack()\n {\n int percent = Randomizer.nextInt(100) + 1;\n int baseDamage = super.attack();\n if(percent <= 5)\n {\n baseDamage *= 2;\n baseDamage += 50;\n }\n return baseDamage;\n }", "public int trickWinner(){\n Card.NUMBER one = player1Play.getValue();\n Card.NUMBER two = player2Play.getValue();\n Card.NUMBER three = player3Play.getValue();\n Card.NUMBER four = player4Play.getValue();\n Card.SUIT oneSuit = player1Play.getSuit();\n Card.SUIT twoSuit = player2Play.getSuit();\n Card.SUIT threeSuit = player3Play.getSuit();\n Card.SUIT fourSuit = player4Play.getSuit();\n int[] value = new int[4];\n value[0] = Card.getValsVal(one, oneSuit, currentTrumpSuit);\n value[1] = Card.getValsVal(two, twoSuit, currentTrumpSuit);\n value[2] = Card.getValsVal(three, threeSuit, currentTrumpSuit);\n value[3] = Card.getValsVal(four, fourSuit, currentTrumpSuit);\n if(player1Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[0] += 10;\n }\n if(player2Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[1] += 10;\n }\n if(player3Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[2] += 10;\n }\n if(player4Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[3] += 10;\n }\n if(player1Play.getSuit() == currentTrumpSuit || value[0] == 7){\n value[0] += 20;\n }\n if(player2Play.getSuit() == currentTrumpSuit || value[1] == 7){\n value[1] += 20;\n }\n if(player3Play.getSuit() == currentTrumpSuit || value[2] == 7){\n value[2] += 20;\n }\n if(player4Play.getSuit() == currentTrumpSuit || value[3] == 7){\n value[3] += 20;\n }\n int winner = 0;\n int winVal = 0;\n for(int i = 0; i < 4; i++){\n if(value[i] > winVal){\n winVal = value[i];\n winner = i;\n }\n }\n return winner;\n }", "private void calcCoins() {\n\t\tint changeDueRemaining = (int) Math.round((this.changeDue - (int) this.changeDue) * 100);\n\n\t\tif (changeDueRemaining >= 25) {\n\t\t\tthis.quarter += changeDueRemaining / 25;\n\t\t\tchangeDueRemaining = changeDueRemaining % 25;\n\t\t}\n\t\tif (changeDueRemaining >= 10) {\n\t\t\tthis.dime += changeDueRemaining / 10;\n\t\t\tchangeDueRemaining = changeDueRemaining % 10;\n\t\t}\n\t\tif (changeDueRemaining >= 5) {\n\t\t\tthis.nickel += changeDueRemaining / 5;\n\t\t\tchangeDueRemaining = changeDueRemaining % 5;\n\t\t}\n\t\tif (changeDueRemaining >= 1) {\n\t\t\tthis.penny += changeDueRemaining / 1;\n\t\t}\n\t}", "void spray(double percent)\n {\n roaches = (int) (roaches - (roaches * percent / 100));\n }", "SpeechAwardPoints(int rating){\n\n currentPoints = rating;\n feedback = \"Your current rating is: \" + currentPoints + \"%\";\n }" ]
[ "0.67017186", "0.6252787", "0.62477803", "0.6219746", "0.6210222", "0.6199499", "0.6177952", "0.60866034", "0.60750484", "0.60653085", "0.59911424", "0.59792644", "0.5968117", "0.584682", "0.58300364", "0.5784317", "0.57811624", "0.5765457", "0.57530904", "0.5742261", "0.5707477", "0.5683161", "0.5681683", "0.5678411", "0.5667191", "0.5655501", "0.56484747", "0.5645905", "0.5644362", "0.5644329", "0.56285495", "0.56255555", "0.560845", "0.55882055", "0.55778116", "0.55687374", "0.5557115", "0.55523115", "0.5548962", "0.5539157", "0.5513627", "0.55087274", "0.549842", "0.5485536", "0.5484557", "0.5484427", "0.54778755", "0.54757065", "0.54753655", "0.54734105", "0.5460338", "0.54557985", "0.54549634", "0.5443403", "0.5438689", "0.54382807", "0.54343385", "0.5425528", "0.5419635", "0.5418213", "0.5412279", "0.5402854", "0.53998595", "0.5399328", "0.5393597", "0.53860503", "0.5383138", "0.53824276", "0.5378053", "0.53778243", "0.53770053", "0.53726614", "0.53573406", "0.5355377", "0.5354976", "0.53548145", "0.53532505", "0.53465486", "0.53420377", "0.53368753", "0.53308576", "0.5327785", "0.53259784", "0.5310155", "0.5308662", "0.53037554", "0.5303008", "0.5301552", "0.5300589", "0.52891046", "0.5287952", "0.52858365", "0.5284133", "0.52792597", "0.5276732", "0.5275985", "0.5272368", "0.52692413", "0.52668494", "0.5265192" ]
0.676422
0
Asking Durial that i want to buy tickets/
public static void buyLotteryTicketsDialogueOption(Player player) { InterfaceAssistant.closeDialogueOnly(player); InterfaceAssistant .showAmountInterface(player, "BUY LOTTERY TICKETS", "Enter the amount of tickets you will buy for " + Misc.formatNumber(getLotteryTicketCost()) + " each"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void askBuyDevCards();", "void askBuyResources();", "private void requestBucks() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Please choose a user to request TE Bucks from:\");\n\t\t\tUser fromUser;\n\t\t\tboolean isValidUser;\n\t\t\tdo {\n\t\t\t\tfromUser = (User)console.getChoiceFromOptions(userService.getUsers());\n\t\t\t\tisValidUser = ( fromUser\n\t\t\t\t\t\t\t\t.getUsername()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(currentUser.getUser().getUsername())\n\t\t\t\t\t\t\t ) ? false : true;\n\n\t\t\t\tif(!isValidUser) {\n\t\t\t\t\tSystem.out.println(\"You can not request money from yourself\");\n\t\t\t\t}\n\t\t\t} while (!isValidUser);\n\t\t\t\n\t\t\t// Select an amount\n\t\t\tBigDecimal amount = new BigDecimal(\"0.00\");\n\t\t\tboolean isValidAmount = false;\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\tamount = new BigDecimal(console.getUserInput(\"Enter An Amount (0 to cancel):\\n \"));\n\t\t\t\t\tisValidAmount = true;\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tSystem.out.println(\"Please enter a numerical value\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(amount.doubleValue() < 0.99 && amount.doubleValue() > 0.00) {\n\t\t\t\t\tSystem.out.println(\"You cannot request less than $0.99 TEB\");\n\t\t\t\t\tisValidAmount = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (amount.doubleValue() == 0.00) {\n\t\t\t\t\tmainMenu();\n\t\t\t\t}\n\t\t\t} while(!isValidAmount);\n\n\t\t\t// Create transfer object\n\t\t\tboolean confirmedAmount = false;\n\t\t\tString confirm = \"\";\n\t\t\tTransfer transfer = null;\n\t\t\twhile (!confirmedAmount) {\n\t\t\t\tconfirm = console.getUserInput(\"You entered: \" + amount.toPlainString() + \" TEB. Is this correct? (y/n)\");\n\t\t\t\tif (confirm.toLowerCase().startsWith(\"y\")) {\n\t\t\t\t\t// transferService to POST to server db\n\t\t\t\t\tSystem.out.println(\"You are requesting: \" + amount.toPlainString() +\n\t\t\t\t\t\t\t\" TEB from \" + fromUser.getUsername());\n\t\t\t\t\ttransfer = createTransferObj(\"Request\", \"Pending\",\n\t\t\t\t\t\t\t\t\tcurrentUserId, fromUser.getId(), amount);\n\t\t\t\t\tboolean hasSent = \n\t\t\t\t\t\t\ttransferService.sendBucks(currentUserId, fromUser.getId(), transfer);\n\t\t\t\t\tif (hasSent) {\n\t\t\t\t\t\t// TODO :: Test this\n\t\t\t\t\t\tSystem.out.println(\"The code executed\");\n\t\t\t\t\t}\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Request canceled.\");\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t} \t\n\t\t\t}\n\t\t\t\n\t\t}catch(UserServiceException ex) {\n\t\t\tSystem.out.println(\"User Service Exception\");\n\t\t}catch(TransferServiceException ex) {\n\t\t\tSystem.out.println(\"Transfer Service Exception\");\n\t\t}\n\t\t\n\t}", "private void sendBucks() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Please choose a user to send TE Bucks to:\");\n\t\t\tUser toUser;\n\t\t\tboolean isValidUser;\n\t\t\tdo {\n\t\t\t\ttoUser = (User)console.getChoiceFromOptions(userService.getUsers());\n\t\t\t\tisValidUser = ( toUser\n\t\t\t\t\t\t\t\t.getUsername()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(currentUser.getUser().getUsername())\n\t\t\t\t\t\t\t ) ? false : true;\n\n\t\t\t\tif(!isValidUser) {\n\t\t\t\t\tSystem.out.println(\"You can not send money to yourself\");\n\t\t\t\t}\n\t\t\t} while (!isValidUser);\n\t\t\t\n\t\t\t// Select an amount\n\t\t\tBigDecimal amount = new BigDecimal(\"0.00\");\n\t\t\tboolean isValidAmount = false;\n\t\t\tdo {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tamount = new BigDecimal(console.getUserInput(\"Enter An Amount (0 to cancel):\\n \"));\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\tSystem.out.println(\"Please enter a numerical value\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tisValidAmount = amount.doubleValue() < userService\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getBalance(currentUserId)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.doubleValue();\n\t\t\t\tif(!isValidAmount) {\n\t\t\t\t\tSystem.out.println(\"You can not send more money than you have available!\");\n\t\t\t\t}\n\t\t\t\tif(amount.doubleValue() < 0.99 && amount.doubleValue() > 0.00) {\n\t\t\t\t\tSystem.out.println(\"You must send at least $0.99 TEB\");\n\t\t\t\t\tisValidAmount = false;\n\t\t\t\t} else if (amount.doubleValue() == 0.00) {\n\t\t\t\t\tmainMenu();\n\t\t\t\t}\n\t\t\t} while(!isValidAmount);\n\n\t\t\t// Create transfer object\n\t\t\tboolean confirmedAmount = false;\n\t\t\tString confirm = \"\";\n\t\t\tTransfer transfer = null;\n\t\t\twhile (!confirmedAmount) {\n\t\t\t\tconfirm = console.getUserInput(\"You entered: \" + amount.toPlainString() + \" TEB. Is this correct? (y/n)\");\n\t\t\t\tif (confirm.toLowerCase().startsWith(\"y\")) {\n\t\t\t\t\t// transferService to POST to server db\n\t\t\t\t\ttransfer = createTransferObj(\"Send\", \"Approved\", currentUserId, toUser.getId(), amount);\n\t\t\t\t\tboolean hasSent = transferService.sendBucks(currentUserId, toUser.getId(), transfer);\n\t\t\t\t\tif (hasSent) {\n\t\t\t\t\t\t// TODO :: Test this\n\t\t\t\t\t\tSystem.out.println(\"The code executed\");\n\t\t\t\t\t}\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Send canceled.\");\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t} \n\t\t\t}\n\t\t}catch(UserServiceException ex) {\n\t\t\tSystem.out.println(\"User Service Exception\");\n\t\t}catch(TransferServiceException ex) {\n\t\t\tSystem.out.println(\"Transfer Service Exception\");\n\t\t}\n\t\t\n\t}", "private void sendBucks() {\n\t\tint userid = userID;\n\n\t\tfor (int i = 0; i < userServices.getAllUsers().length; i++) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"User: \" + userList.get(i).getId() + \"\\t\" + \"username: \" + userList.get(i).getUsername() + \"\\n\");\n\t\t}\n\n\t\tSystem.out.println(\"Select and ID you want to send TE Bucks to: \\n\");\n\n\t\tint sendTo = Integer.parseInt(scan.nextLine());\n\n\t\tSystem.out.println(\"How much money?\");\n\t\tBigDecimal money = (new BigDecimal(scan.nextLine()));\n\n\t\ttry {\n\t\t\tif (accountServices.getBalanceByAccountID(userid).compareTo(money) < 0) {\n\t\t\t\tSystem.out.println(\"You do not have enough funds to make transfer\");\n\t\t\t\tsendBucks();\n\n\t\t\t}\n\t\t} catch (AccountsServicesException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t\tTransfers holder = sendTransfer(userid, sendTo, money);\n\t\taccountServices.sendMoney(userid, holder);\n\n\t\ttry {\n\t\t\tSystem.out.println(\"$\" + money + \" sent to \" + sendTo);\n\t\t\tSystem.out.println(\"New balance: $\" + accountServices.getBalanceByAccountID(userid));\n\t\t} catch (AccountsServicesException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void purchaseMade();", "public synchronized String buyTicket() {\r\n Random r = new Random();\r\n int buyTckDuration = r.nextInt(3000)+1000;\r\n String timestamp = \"NULL\";\r\n if (isValid_ToBuyTicket()) {\r\n this.tktSold += 1;\r\n try {\r\n Thread.sleep(buyTckDuration);\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n// System.out.println(\"Sold a new ticket, today's sales num: \" + this.tktSold);\r\n\r\n // we still need to create a real ticket with a timestamps\r\n // some code()\r\n\r\n String postfix = getPostfix();\r\n timestamp = \"T\" + postfix;\r\n return timestamp;\r\n\r\n }else{\r\n System.out.println(\"Your ticket request denied!\");\r\n return timestamp;\r\n }\r\n\r\n }", "public void buy() throws CannotAffordException {\r\n\t\tGame game = Game.getInstance();\r\n\t\tgame.decreaseBudget(price);\r\n\t\tgame.getInventory().add(id);\r\n\t}", "private void sendBucks() {\n\t\tconsole.printUsers(userService.getAll(currentUser.getToken()));\n\t\tSystem.out.println(\"\");\n\n\t\tBoolean validResponse = false;\n\t\tint selectedUserId = -1;\n\t\tBigDecimal transferAmount = new BigDecimal(0);\n\t\tBigDecimal zero = new BigDecimal(0);\n\t\tBigDecimal currentBalance = (accountService.getAccountBalance(currentUser.getToken()));\n\t\tTransfer transfer = new Transfer();\n\n\t\twhile (true) {\n\t\t\t// ask which user you want to send money to or exit\n\t\t\tselectedUserId = console.getUserInputInteger(\"Enter ID of user you are sending to (0 to cancel)\");\n\t\t\tif (selectedUserId == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (selectedUserId > 0 && selectedUserId <= userService.getAll(currentUser.getToken()).length) {\n\t\t\t\t// prompt for amount to send\n\t\t\t\ttransferAmount = console.getUserInputBigDecimal(\"Enter amount\");\n\t\t\t\t// transfer money\n\n\t\t\t\tif (transferAmount.compareTo(zero) == 1 && transferAmount.compareTo(currentBalance) <= 0) {\n\n\t\t\t\t\ttransfer.setFromUserId(currentUser.getUser().getId());\n\t\t\t\t\ttransfer.setToUserId(selectedUserId);\n\t\t\t\t\ttransfer.setTransferAmount(transferAmount);\n\t\t\t\t\ttransfer.setStatusOfTransferId(2);\n\t\t\t\t\ttransfer.setTypeOfTransferId(2);\n\n\t\t\t\t\t\n\t\t\t\t\ttransferService.createTransfer(currentUser.getToken(), transfer);\n\t\t\t\t\tSystem.out.println(\"\\nTransfer Complete!\");\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(\"\\nInsufficient Funds! Please try again.\\n\");\n\n\t\t\t}\n\t\t}\n\n\t}", "private void purchaseTickets() throws IOException\n {\n toServer.writeInt(sectionsSelected);\n toServer.writeInt(numTicketsWanted);\n\n setChanged();\n notifyObservers(new Integer(sectionsSelected));\n notifyObservers(new Integer(numTicketsWanted));\n \n recieveInformationFromServer();\n\n \n }", "void askDevCardProduction();", "@Test\n public void buy() {\n System.out.println(client.purchase(1, 0, 1));\n }", "private void requestBucks() {\n\n\t}", "public void purchase(){\n\t\t\n\t\t//Ask the user for notes about the item\n\t\tSystem.out.println(\"Please enter any special requests regarding your \" +\n\t\t\t\t\t\t\t\"food item for our staff to see while they prepare it.\");\n\t\tScanner scan = new Scanner(System.in);\n\t\tString foodNotes = scan.nextLine();\n\t\tnotes = foodNotes;\n\t\t\n\t\t//Add this item's price to the order total\n\t\tMenu.orderPrice += price;\n\t\t\n\t}", "public void buyTicket(View v)\n {\n final String event_id = Integer.toString(v.getId());\n final String user_id = preferenceConfig.LoadUserId();\n final String key = UUID.randomUUID().toString().replaceAll(\"-\", \"\");\n\n URL_ADDTICKET = getString(R.string.URL_ADDTICKET);\n\n StringRequest stringRequest = new StringRequest(Request.Method.POST, URL_ADDTICKET,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n try {\n JSONObject jsonObject = new JSONObject(response);\n String success = jsonObject.getString(\"success\");\n\n if(success.equals(\"1\")){\n Toast.makeText(getContext(),\"Ticket ID: \" + key,Toast.LENGTH_LONG).show();\n }\n } catch (JSONException e){\n e.printStackTrace();\n Toast.makeText(getContext(),\"Cannot buy ticket. Error: \" + e.toString(),Toast.LENGTH_LONG).show();\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getContext(),\"Cannot buy ticket. Error: \" + error.toString(),Toast.LENGTH_LONG).show();\n }\n })\n {\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String,String> params = new HashMap<>();\n params.put(\"event_id\", event_id);\n params.put(\"user_id\", user_id);\n params.put(\"key\", key);\n return params;\n }\n };\n\n RequestQueue requestQueue = Volley.newRequestQueue(getContext());\n requestQueue.add(stringRequest);\n }", "@Override\n\tpublic void sendBuyRequest() {\n\t\ttry {\n\t\t\tString result = \"\";\n\t\t\tif (this.servType.equals(SERVICE_TYPE_SOAP)){\n\t\t\t\tresult = server.checkOutCart(clientId);\n\t\t\t} else {\n\t\t\t\tWebResource checkOutService = service.path(URI_CHECKOUT).path(String.valueOf(clientId));\n\t\t\t\tresult = checkOutService.accept(MediaType.TEXT_XML).get(String.class);\n\t\t\t}\n\t\t\n\t\t\tStatusMessageObject status = XMLParser.parseStatusMessage(result);\n\t\t\tif (status.getStatusCode() == 1){\n\t\t\t\tgui.setupCart(null);\t\n\t\t\t}\n\t\t\tsendItemListRequest();\n\t\t\tgui.setStatus(status.getMessage());\n\t\t\tsetOKDialog(\"Check out confirmation!\", status.getMessage());\n\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClientHandlerException ex){\n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The RESTFul server is not responding!!\");\n\t\t} catch (WebServiceException ex){\n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The SOAP-RPC server is not responding!!\");\n\t\t}\n\t}", "public boolean pay(String szDebterName, String szAmount, String szEntitledName) {\n\t\tboolean bWasAdded;\n\t\t// INFO\n\t\tplay.Logger.info(\"<BUSINESS_LOGIC> The Gelt was'nt confirmed by the debter \" + szDebterName\n\t\t\t\t+ \" the system will delete from the data_base\");\n\t\t// Delete from the records of the temp debts who waiting for confirm\n\t\tbWasAdded = deleteDebt(szDebterName, szAmount, szEntitledName);\n\t\treturn bWasAdded;\n\t}", "public void ventaBilleteMaquina1()\n {\n maquina1.insertMoney(500);\n maquina1.printTicket();\n }", "public void buyItem() {\n List<Gnome> cart = user.getCart();\n String message = \"\";\n List<Gnome> bought = shopFacade.buyGnomes(cart);\n if (!bought.isEmpty()) {\n message = bought.size() + \" items bought\";\n } else {\n message = \"Could not buy any items\";\n }\n userFacade.assignBought(user, bought);\n user.getCart().removeAll(bought);\n cart.removeAll(bought);\n userFacade.setCartToUser(user.getUsername(), cart);\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Gnomes\", message);\n FacesContext.getCurrentInstance().addMessage(null, msg);\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}", "public void sendPurchaseHit() {\n\n // In production code, would need to iterate\n // over all the products in the cart\n // Here we assume that the currently selected dinner\n // is the only thing in the cart\n Product product = new Product()\n .setName(\"dinner\")\n .setPrice(5)\n .setVariant(thisDinner)\n .setId(thisDinnerId)\n .setQuantity(1);\n\n // Get a unique transaction ID\n String tID = Utility.getUniqueTransactionId(thisDinnerId);\n ProductAction productAction =\n new ProductAction(ProductAction.ACTION_PURCHASE)\n .setTransactionId(tID);\n\n Tracker tracker = ((MyApplication) getApplication()).getTracker();\n\n tracker.send(new HitBuilders.EventBuilder()\n .setCategory(\"Shopping steps\")\n .setAction(\"Purchase\")\n .setLabel(thisDinner)\n .addProduct(product)\n .setProductAction(productAction)\n .build());\n }", "public void PurchaseTicket_OnClick(View view){\n\t\tVibrateButton();\n\t\tpurchaseTicket();\n\t}", "void requestTicket(String customerName)\n {\n\ttc.customerName = customerName;\n\ttc.run(); // Sells ticket. Prints ticket to console.\n }", "void buyDevCard();", "public String chooseItem() {\n console.promptForString(\"\");\n console.promptForPrintPrompt(\"PLEASE ENTER THE NAME OF THE ITEM TO PURCHASE\");\n console.promptForPrintPrompt(\"-----------------------\");\n String toBuy = console.promptForString(\"BUY: \");\n\n return toBuy;\n }", "public Ticket buyTicket() {\n\t\tif(Capacity>CapacityCounter) {\n\t\t\tchooseSeat();\n\t\t\tCapacity = Capacity+CAPACITYPLUSONE;\n\t\t} else {\n\t\t\tSystem.out.println(\"The showing is full\");\n\t\t}\n\t\tTicket retTicket = new Ticket();\n\t\treturn retTicket;\n\t}", "public static void sendTicket(Ticket t) throws SQLException {\r\n\t\ttools.Search.deleteTicket(t.getMesa());\r\n\t\tif(t.getProductosComanda().size() == 0) {\r\n\t\t\tm.getTicketsFrame().setTicketOnTable(t);\r\n\t\t\tm.getTablesFrame().setTicketOnTable(t.getMesa());\r\n\t\t\tbbddManager.TicketDBManager.deleteComanda(t.getMesa());\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tticketsBar.add(t);\r\n\t\t\r\n\r\n\t\tm.getTicketsFrame().setTicketOnTable(t);\r\n\t\tm.getTablesFrame().setTicketOnTable(t.getMesa());\r\n\t\tbbddManager.TicketDBManager.insertComanda(t);\r\n\t}", "@Override\r\n\t\tpublic void action() {\n MessageTemplate mt = MessageTemplate.MatchPerformative(ACLMessage.ACCEPT_PROPOSAL);\r\n MessageTemplate mt2 = MessageTemplate.MatchPerformative(ACLMessage.PROPOSE);\r\n ACLMessage msg = myAgent.receive(mt);\r\n //If it is a ACCEPT_PROPOSAL, the seller sell the book to the buyer (execpt if the book if not here anymore)\r\n if (msg != null) {\r\n // ACCEPT_PROPOSAL Message received. Process it\r\n title = msg.getContent();\r\n ACLMessage reply = msg.createReply();\r\n\r\n Integer price = (Integer) catalogue.remove(title);\r\n if (price != null) {\r\n reply.setPerformative(ACLMessage.INFORM);\r\n reply.setContent(String.valueOf(price));\r\n System.out.println(title+\" sold to agent \"+msg.getSender().getName());\r\n }\r\n else {\r\n // The requested book has been sold to another buyer in the meanwhile .\r\n reply.setPerformative(ACLMessage.FAILURE);\r\n reply.setContent(\"not-available\");\r\n }\r\n myAgent.send(reply);\r\n }\r\n //If it is a new PROPOSE, the buyer is trying to negociate.\r\n else {\r\n ACLMessage msg2 = myAgent.receive(mt2);\r\n if(msg2 != null){\r\n ACLMessage reply = msg2.createReply();\r\n //If the price of the buyer is OK for the seller according to his tolerance, the transaction is made\r\n if(((Integer) catalogue.get(title) - Integer.parseInt(msg2.getContent())) <= tolerance){\r\n System.out.println(myAgent.getLocalName() + \" say : OK, let's make a deal\");\r\n updateCatalogue(title, Integer.parseInt(msg2.getContent()));\r\n reply.setPerformative(ACLMessage.INFORM);\r\n reply.setContent(msg2.getContent());\r\n }\r\n //Else, the seller accept to negociate, he up his tolerance and ask the buyer to up his real price\r\n else{\r\n //Send a REQUEST Message to negociate with the buyer\r\n reply.setPerformative(ACLMessage.REQUEST);\r\n //Up the tolerance by *change*\r\n tolerance += change;\r\n reply.setContent(String.valueOf(change));\r\n System.out.println(myAgent.getLocalName() + \" say : Let's up your real price while I up my tolerance (\" + ((Integer) catalogue.get(title) - Integer.parseInt(msg2.getContent())) + \" < \" + tolerance + \")\");\r\n }\r\n myAgent.send(reply);\r\n }\r\n else{\r\n block();\r\n }\r\n }\r\n\t\t}", "pb4server.CureSoliderAskReq getCureSoliderAskReq();", "private void askForAPizza() {\n\t\tconnectToServer();\n\t\tout.println(\"Give me a pizza\");\n\t\tout.flush();\n\t\tdisconnectFromServer();\n\t}", "public static void kounyu() throws Exception {\n\n\t\tDbCon con = new DbCon();\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry {\n\t\t\tThread.sleep(100);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint sum1 = Money.sum;\n\t\t\n\t\twhile(true) {\n\t\t\t\n\t\t\tSystem.out.println(\"商品番号選択で購入出来ます。\\n商品番号選択してください。\");\n\n\t\t\tint water = (int) DbCon.vec.get(1);\n\t\t\tint coke = (int) DbCon.vec.get(5);\n\t\t\tint fanta = (int) DbCon.vec.get(9);\n\t\t\tint yog = (int) DbCon.vec.get(13);\n\t\t\tint mon = (int) DbCon.vec.get(17);\n\n\t\t\twhile (true) {\n\t\t\t\tString str = br.readLine();\n\t\t\t\tchar res = str.charAt(0);\n\n\t\t\t\tif (res == '1' && water > 0 && sum1 >= 110) {\n\t\t\t\t\tSystem.out.println(DbCon.vec.get(3) + \"を購入しました。\\n\");\n\t\t\t\t\tDbCon.Henkyaku((int) DbCon.vec.get(0));\n\t\t\t\t\tSystem.out.println(\"\\n 【商品一覧表】\\n\");\n\t\t\t\t\tDbCon.zaiko((int) DbCon.vec.get(0));\n\t\t\t\t\tDbCon.Uriage((int) DbCon.vec.get(0));\n\t\t\t\t\tDbCon.mn();\n\t\t\t\t\tDbCon.UPMN();\n\t\t\t\t\tbreak;\n\n\t\t\t\t} else if (res == '2' && coke > 0 && sum1 >= 120) {\n\t\t\t\t\tSystem.out.println(DbCon.vec.get(7) + \"を購入しました。\\n\");\n\t\t\t\t\tDbCon.Henkyaku((int) DbCon.vec.get(4));\n\t\t\t\t\tSystem.out.println(\"\\n 【商品一覧表】\\n\");\n\t\t\t\t\tDbCon.zaiko((int) DbCon.vec.get(4));\n\t\t\t\t\tDbCon.Uriage((int) DbCon.vec.get(4));\n\t\t\t\t\tDbCon.mn();\n\t\t\t\t\tDbCon.UPMN();\n\t\t\t\t\tbreak;\n\n\t\t\t\t} else if (res == '3' && fanta > 0 && sum1 >= 130) {\n\t\t\t\t\tSystem.out.println(DbCon.vec.get(11) + \"を購入しました。\\n\");\n\t\t\t\t\tSystem.out.println(\"\\n 【商品一覧表】\\n\");\n\t\t\t\t\tDbCon.zaiko((int) DbCon.vec.get(8));\n\t\t\t\t\tDbCon.Henkyaku((int) DbCon.vec.get(8));\n\t\t\t\t\tDbCon.Uriage((int) DbCon.vec.get(8));\n\t\t\t\t\tDbCon.mn();\n\t\t\t\t\tDbCon.UPMN();\n\t\t\t\t\tbreak;\n\n\t\t\t\t} else if (res == '4' && yog > 0 && sum1 >= 140) {\n\t\t\t\t\tSystem.out.println(DbCon.vec.get(15) + \"を購入しました。\\n\");\n\t\t\t\t\tSystem.out.println(\"\\n 【商品一覧表】\\n\");\n\t\t\t\t\tDbCon.zaiko((int) DbCon.vec.get(12));\n\t\t\t\t\tDbCon.Henkyaku((int) DbCon.vec.get(12));\n\t\t\t\t\tDbCon.Uriage((int) DbCon.vec.get(12));\n\t\t\t\t\tDbCon.mn();\n\t\t\t\t\tDbCon.UPMN();\n\t\t\t\t\tbreak;\n\n\t\t\t\t} else if (res == '5' && mon > 0 && sum1 >= 150) {\n\t\t\t\t\tSystem.out.println(DbCon.vec.get(19) + \"を購入しました。\\n\");\n\n\t\t\t\t\t/******* Calling DbCon.zaiko method from DbCon Class *******/\n\t\t\t\t\tDbCon.Henkyaku((int) DbCon.vec.get(16));\n\t\t\t\t\tSystem.out.println(\"\\n 【商品一覧表】\\n\");\n\t\t\t\t\tDbCon.zaiko((int) DbCon.vec.get(16));\n\t\t\t\t\tDbCon.Uriage((int) DbCon.vec.get(16));\n\t\t\t\t\tDbCon.mn();\n\t\t\t\t\tDbCon.UPMN();\n\t\t\t\t\tbreak;\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"在庫切れか、入力誤りです。\\n再度入力してください。\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t \n\t\t\t}\n\t\t\tSystem.out.println(\"\\n続けて購入しますか?(y/n)\");\n\t\t\tBufferedReader br1 = new BufferedReader(new InputStreamReader(System.in));\n\n\t\t\tString str = br1.readLine();\n\t\t\tString res = str.intern();\n\n\t\t\tif (res != \"y\" && res != \"Y\" && res != \"n\" && res != \"N\") {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"入力誤りです。\\n再度入力してください。\\n\");\n\t\t\t\t\n\n\t\t\t\t/******* Calling kounyu() method from kounyu Class *******/\n\t\t\t\t\n\t\t\t}\n\n\t\t\telse if (res == \"y\" || res == \"Y\") {\n\t\t\t\tMoney.money();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse if(res == \"n\" || res == \"N\"){\n\t\t\t\tSystem.out.println(\"ご利用ありがとうございます。\");\n\t\t\t\tSystem.out.println(\"またお願いします。\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public boolean requestTransaction(String name,String reason,double amount){\n Transaction t1 = new Transaction(name,reason,amount);\n boolean done=t1.registertransaction();\n \n return done; \n \n}", "public TransactionResponse buyEnchant() {\r\n \t\tTransactionResponse response = new TransactionResponse(hp);\r\n \t\tCalculation calc = hc.getCalculation();\r\n \t\tAccount acc = hc.getAccount();\r\n \t\tLog log = hc.getLog();\r\n \t\tNotification not = hc.getNotify();\r\n \t\tInfoSignHandler isign = hc.getInfoSignHandler();\r\n \t\ttry {\r\n \t\t\tString playerecon = hp.getEconomy();\r\n \t\t\tPlayer p = hp.getPlayer();\r\n \t\t\tString nenchant = hyperObject.getMaterial();\r\n \t\t\tEnchantment ench = Enchantment.getByName(nenchant);\r\n \t\t\tint shopstock = 0;\r\n \t\t\tshopstock = (int) hyperObject.getStock();\r\n \t\t\tif (shopstock >= 1) {\r\n \t\t\t\tString mater = p.getItemInHand().getType().toString();\r\n \t\t\t\tdouble price = hyperObject.getCost(EnchantmentClass.fromString(mater));\r\n \t\t\t\tprice = price + hyperObject.getPurchaseTax(price);\r\n \t\t\t\tif (price != 123456789) {\r\n \t\t\t\t\tif (!im.containsEnchantment(p.getItemInHand(), ench)) {\r\n \t\t\t\t\t\tif (acc.checkFunds(price, p)) {\r\n \t\t\t\t\t\t\tif (im.canAcceptEnchantment(p.getItemInHand(), ench) && p.getItemInHand().getAmount() == 1) {\r\n \t\t\t\t\t\t\t\thyperObject.setStock(shopstock - 1);\r\n \t\t\t\t\t\t\t\tacc.withdraw(price, p);\r\n \t\t\t\t\t\t\t\tacc.depositShop(price);\r\n \t\t\t\t\t\t\t\tif (hc.getYaml().getConfig().getBoolean(\"config.shop-has-unlimited-money\")) {\r\n \t\t\t\t\t\t\t\t\tString globalaccount = hc.getYaml().getConfig().getString(\"config.global-shop-account\");\r\n \t\t\t\t\t\t\t\t\tacc.setBalance(0, globalaccount);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tint l = hyperObject.getName().length();\r\n \t\t\t\t\t\t\t\tString lev = hyperObject.getName().substring(l - 1, l);\r\n \t\t\t\t\t\t\t\tint level = Integer.parseInt(lev);\r\n \t\t\t\t\t\t\t\tim.addEnchantment(p.getItemInHand(), ench, level);\r\n \t\t\t\t\t\t\t\tboolean stax;\r\n \t\t\t\t\t\t\t\tstax = Boolean.parseBoolean(hyperObject.getIsstatic());\r\n \t\t\t\t\t\t\t\tdouble taxrate;\r\n \t\t\t\t\t\t\t\tif (!stax) {\r\n \t\t\t\t\t\t\t\t\ttaxrate = hc.getYaml().getConfig().getDouble(\"config.enchanttaxpercent\");\r\n \t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\ttaxrate = hc.getYaml().getConfig().getDouble(\"config.statictaxpercent\");\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tdouble taxpaid = price - (price / (1 + taxrate / 100));\r\n \t\t\t\t\t\t\t\ttaxpaid = calc.twoDecimals(taxpaid);\r\n \t\t\t\t\t\t\t\tprice = calc.twoDecimals(price);\r\n \t\t\t\t\t\t\t\tresponse.addSuccess(L.f(L.get(\"ENCHANTMENT_PURCHASE_MESSAGE\"), 1, price, hyperObject.getName(), calc.twoDecimals(taxpaid)), calc.twoDecimals(price), hyperObject);\r\n \t\t\t\t\t\t\t\tresponse.setSuccessful();\r\n \t\t\t\t\t\t\t\tString type = \"dynamic\";\r\n \t\t\t\t\t\t\t\tif (Boolean.parseBoolean(hyperObject.getInitiation())) {\r\n \t\t\t\t\t\t\t\t\ttype = \"initial\";\r\n \t\t\t\t\t\t\t\t} else if (Boolean.parseBoolean(hyperObject.getIsstatic())) {\r\n \t\t\t\t\t\t\t\t\ttype = \"static\";\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tlog.writeSQLLog(p.getName(), \"purchase\", hyperObject.getName(), 1.0, price, taxpaid, playerecon, type);\r\n \r\n \t\t\t\t\t\t\t\tisign.updateSigns();\r\n \t\t\t\t\t\t\t\tnot.setNotify(hyperObject.getName(), mater, playerecon);\r\n \t\t\t\t\t\t\t\tnot.sendNotification();\r\n \t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\tresponse.addFailed(L.get(\"ITEM_CANT_ACCEPT_ENCHANTMENT\"), hyperObject);\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\tresponse.addFailed(L.get(\"INSUFFICIENT_FUNDS\"), hyperObject);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tresponse.addFailed(L.get(\"ITEM_ALREADY_HAS_ENCHANTMENT\"), hyperObject);\r\n \t\t\t\t\t}\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresponse.addFailed(L.get(\"ITEM_CANT_ACCEPT_ENCHANTMENT\"), hyperObject);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\tresponse.addFailed(L.f(L.get(\"THE_SHOP_DOESNT_HAVE_ENOUGH\"), hyperObject.getName()), hyperObject);\r\n \t\t\t}\r\n \t\t\treturn response;\r\n \t\t} catch (Exception e) {\r\n \t\t\tString info = \"ETransaction buyEnchant() passed values name='\" + hyperObject.getName() + \"', player='\" + hp.getName() + \"'\";\r\n \t\t\tnew HyperError(e, info);\r\n \t\t\treturn new TransactionResponse(hp);\r\n \t\t}\r\n \t}", "public void buyGoodsFromStore(HashMap<Goods, Integer> sellGoods) {\n\t\tArrayList<Goods> myList = accessingGoods(sellGoods);\n\t\tboolean state1 = false;\n\t\t\n\t\twhile(state1 == false) {\n\t\t\tprintGoods(sellGoods, \"Goods that store sell:\");\n\t\t\tSystem.out.println(\"(99) Cancel purchase\");\n\t\t\tSystem.out.println(\"Select the goods you want to buy\");\n\t\t\tint selectedAction = scanner.nextInt();\n\t\t\ttry { \n\t\t\t\tif (selectedAction == 99) {\n\t\t\t\t\tstate1 = true;\n\t\t\t\t\tgame.goToStore();\n\t\t\t\t}\n\n\t\t\t\telse if (selectedAction <= sellGoods.size() && selectedAction > 0) {\n\t\t\t\t\tGoods selectedGoods = myList.get(selectedAction - 1);\n\t\t\t\t\tint goodsPrice = sellGoods.get(selectedGoods);\n\t\t\t\t\tif (game.checkConditionsForBuying(1, selectedGoods, goodsPrice) == true) \n\t\t\t\t\t{\n\t\t\t\t\t\tboolean state2 = false;\n\t\t\t\t\t\twhile(state2 == false) {\n\t\t\t\t\t\t\tSystem.out.println(\"How many do you want to buy?\" );\n\t\t\t\t\t\t\ttry { \n\t\t\t\t\t\t\t\tint quantity = scanner.nextInt();\n\t\t\t\t\t\t\t\tif (game.checkConditionsForBuying(quantity, selectedGoods, goodsPrice) == true) {\n\t\t\t\t\t\t\t\tstate2 = true;\n\t\t\t\t\t\t\t\tgame.buyGoods(quantity, selectedGoods, goodsPrice);\n\t\t\t\t\t\t\t\tSystem.out.println(\"Purchase Succesful!\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"You either don't have enough money or enough capacity\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"You have to input an integer!\");\n\t\t\t\t\t\t\t\tscanner.nextLine();\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\telse {\n\t\t\t\t\t\tSystem.out.println(\"You either don't have enough money or enough capacity even to buy 1 item\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t}\t\n\t}", "public void buyItem(int id, int q)\n\t{\n\t\t/* If the player isn't shopping, in a normal shop */\n\t\tif(m_currentShop == null)\n\t\t{\n\t\t\t/* First, check if the player can afford this */\n\t\t\tint price = GameServer.getServiceManager().getItemDatabase().getItem(id).getPrice();\n\t\t\tif(m_money - q * price >= 0)\n\t\t\t{\n\t\t\t\t/* Finally, if the item is in stock, buy it */\n\n\t\t\t\tm_money = m_money - q * price;\n\t\t\t\tm_bag.addItem(id, q);\n\t\t\t\tupdateClientMoney();\n\t\t\t\t/* Let player know he bought the item. */\n\t\t\t\tServerMessage message = new ServerMessage(ClientPacket.BOUGHT_ITEM);\n\t\t\t\tmessage.addInt(GameServer.getServiceManager().getItemDatabase().getItem(id).getId());\n\t\t\t\tgetSession().Send(message);\n\t\t\t\t/* Update player inventory. */\n\t\t\t\tServerMessage update = new ServerMessage(ClientPacket.UPDATE_ITEM_TOT);\n\t\t\t\tupdate.addInt(GameServer.getServiceManager().getItemDatabase().getItem(id).getId());\n\t\t\t\tupdate.addInt(q);\n\t\t\t\tgetSession().Send(update);\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* Return You have no money, fool! */\n\t\t\t\tServerMessage message = new ServerMessage(ClientPacket.NOT_ENOUGH_MONEY);\n\t\t\t\tgetSession().Send(message);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif(m_bag.hasSpace(id))\n\t\t{\n\t\t\t/* First, check if the player can afford this */\n\t\t\tif(m_money - q * m_currentShop.getPriceForItem(id) >= 0)\n\t\t\t{\n\t\t\t\t/* Finally, if the item is in stock, buy it */\n\t\t\t\tif(m_currentShop.buyItem(id, q))\n\t\t\t\t{\n\t\t\t\t\tm_money = m_money - q * m_currentShop.getPriceForItem(id);\n\t\t\t\t\tm_bag.addItem(id, q);\n\t\t\t\t\tupdateClientMoney();\n\t\t\t\t\t/* Let player know he bought the item. */\n\t\t\t\t\tServerMessage message = new ServerMessage(ClientPacket.BOUGHT_ITEM);\n\t\t\t\t\tmessage.addInt(GameServer.getServiceManager().getItemDatabase().getItem(id).getId());\n\t\t\t\t\tgetSession().Send(message);\n\t\t\t\t\t/* Update player inventory. */\n\t\t\t\t\tServerMessage update = new ServerMessage(ClientPacket.UPDATE_ITEM_TOT);\n\t\t\t\t\tupdate.addInt(GameServer.getServiceManager().getItemDatabase().getItem(id).getId());\n\t\t\t\t\tupdate.addInt(1);\n\t\t\t\t\tgetSession().Send(update);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* Return You have no money, fool! */\n\t\t\t\tServerMessage message = new ServerMessage(ClientPacket.NOT_ENOUGH_MONEY);\n\t\t\t\tgetSession().Send(message);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* Send You cant carry any more items! */\n\t\t\tServerMessage message = new ServerMessage(ClientPacket.POCKET_FULL);\n\t\t\tgetSession().Send(message);\n\t\t}\n\t}", "public void ventaBilleteMaquina2()\n {\n maquina2.insertMoney(600);\n maquina1.printTicket();\n }", "public void establishDealOffer() {\n DealOffer offer = new DealOffer();\n \n int moneyToOffer = (Integer)this.playersMoneyMap.get(currentPlayer).getValue();\n offer.offerCash(moneyToOffer);\n \n Map<JCheckBox, Space> thisPlayerMap = playersCheckBoxes.get(currentPlayer);\n if (thisPlayerMap != null) {\n for (JCheckBox checkBox : thisPlayerMap.keySet()) {\n if (checkBox.isSelected()) {\n offer.addPropertyToOffer(thisPlayerMap.get(checkBox));\n }\n }\n }\n \n int moneyToRequest = (Integer)this.playersMoneyMap.get(playerToOfferTo).getValue();\n offer.requestCash(moneyToRequest);\n \n Map<JCheckBox, Space> otherPlayerMap = playersCheckBoxes.get(playerToOfferTo);\n if (otherPlayerMap != null) {\n for (JCheckBox checkBox : otherPlayerMap.keySet()) {\n if (checkBox.isSelected()) {\n offer.addPropertyToRequest(otherPlayerMap.get(checkBox));\n }\n }\n }\n this.dealOffer = offer;\n \n }", "public int buyTickets(UUID uuid, int number) {\r\n\t\tPennyGame plugin = PennyGame.getPlugin(PennyGame.class);\r\n\t\tint previousTicketCount = getTicketCount(uuid);\r\n\t\t//number = Math.min(number, this.maxTicketCount - previousTicketCount);\r\n\t\tRegisteredServiceProvider<Economy> rsp = plugin.getServer().getServicesManager().getRegistration(Economy.class);\r\n\t\tEconomy econ = rsp.getProvider();\r\n\t\tOfflinePlayer player = Bukkit.getOfflinePlayer(uuid);\r\n\t\t//double balance = econ.getBalance(player);\r\n\t\t//number = (int)Math.min(number - (number - (balance / this.ticketPrice)), number);*/\r\n\t\t\r\n\t\tnumber = this.hasBalance(uuid, number);\r\n\t\t\r\n\t\tint buyCount = Math.min(number + previousTicketCount, this.maxTicketCount) - previousTicketCount;\r\n\t\tint totalCount = Math.min(number + previousTicketCount, this.maxTicketCount);\r\n\t\t\r\n\t\tif(buyCount <= 0) { // not enough balance to buy OR max count reached\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\tif(econ.withdrawPlayer(player, buyCount * this.ticketPrice).transactionSuccess()) {\t\t\t\r\n\t\t\tplugin.getSettings().set(\"participants.\" + uuid.toString(), totalCount);\r\n\t\t\tthis.tickets.put(uuid, totalCount);\r\n\t\t\t\r\n\t\t\tthis.jackpot += buyCount * ticketPrice - buyCount * tax;\r\n\t\t\tplugin.getSettings().set(\"jackpot\", this.jackpot);\r\n\t\t\tplugin.saveSettings();\r\n\t\t\treturn totalCount;\r\n\t\t} else {\r\n\t\t\treturn previousTicketCount;\r\n\t\t}\r\n\t}", "public void purchase() {\r\n\t\tdo {\r\n\t\t\tString id = getToken(\"Enter customer id: \");\r\n\t\t\tString brand = getToken(\"Enter washer brand: \");\r\n\t\t\tString model = getToken(\"Enter washer model: \");\r\n\t\t\tint quantity = getInteger(\"Enter quantity to purchase: \");\r\n\t\t\tboolean purchased = store.purchaseWasher(id, brand, model, quantity);\r\n\t\t\tif (purchased) {\r\n\t\t\t\tSystem.out.println(\"Purchased \" + quantity + \" of \" + brand + \" \" + model + \" for customer \" + id);\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Purchase unsuccessful.\");\r\n\t\t\t}\r\n\t\t} while (yesOrNo(\"Make another Purchase?\"));\r\n\t}", "protected void handleBuy(Message m) {\n return;\n }", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "private void confirmDrugOrder(String paySerialNumber) {\r\n\r\n showNetworkCacheCardView();\r\n lockPayNowOrHavePayButton(BEING_VERIFICATION);\r\n String requestAction = \"confirmOrder\";\r\n String parameter = \"&paySerialNumber=\" + paySerialNumber;\r\n HttpUtil.sendOkHttpRequest(requestAction, parameter, new Callback() {\r\n @Override\r\n public void onFailure(Call call, IOException e) {\r\n //because of network,the client can't recive message,but has success.\r\n closeNetworkCacheCardView();\r\n showErrorCardView(ACCESS_TIMEOUT);\r\n lockPayNowOrHavePayButton(ACCESS_TIMEOUT);\r\n }\r\n\r\n @Override\r\n public void onResponse(Call call, Response response) throws IOException {\r\n message = gson.fromJson(response.body().string(), Message.class);\r\n closeNetworkCacheCardView();\r\n if (message.isSuccess()) {\r\n // show pay success\r\n showPaySuccessCardView();\r\n lockPayNowOrHavePayButton(HAVE_PAY);\r\n } else {\r\n // other problems.it cause update fail\r\n showErrorCardView(UNKNOWN_ERROR);\r\n lockPayNowOrHavePayButton(UNKNOWN_ERROR);\r\n }\r\n }\r\n });\r\n\r\n }", "private void cs5() {\n\t\t\tif(ctx.widgets.widget(519).component(1).text().contains(\"You get some\")){\n\t\t\t\tctx.widgets.widget(519).component(2).click();\n\t\t\t}\n\t\t\tif(ctx.inventory.selectedItem().valid()){\n\t\t\t\tMethod.interactInventory(2511, \"Use\", \"Logs\");\n\t\t\t}else Method.interactInventory(590, \"Use\", \"Tinder box\");\n\t\t\t\n\t\t}", "public void grantTickets(){\n //45mins\n if (tempTime >= 10){\n addTicket();\n }\n tempTime = 0;\n }", "@Test\r\n\tpublic void testButtonPressedDeliverPop() {\r\n\t\tCoin coin = new Coin(200);\r\n\t\ttry {\r\n\t\t\tvend.getCoinSlot().addCoin(coin);\r\n\t\t\tvend.getSelectionButton(0).press();\r\n\t\t\tDeliverable[] items= vend.getDeliveryChute().removeItems();\r\n\t\t\tassertTrue((items.length==1) && (items[0].toString().equals(\"Coke\")));\t\t\t\t\r\n\t\t} catch (DisabledException e) {\r\n\t\t\tassertTrue(false);\r\n\t\t}\r\n\t}", "public void askToAll() {\n\t\tfor(ClientThread player: players) {\n\t\t\tif(player != dealer)\n\t\t\t\tplayer.send(new Package(\"ASK\",null));\n\t\t\telse {\n\t\t\t\tdealer.send(new Package(\"MESSAGE\",\"As dealer, you'll wait for other players...\"));\n\t\t\t}\n\t\t}\n\t}", "if (charge == adhocTicket.getCharge()) {\n System.out.println(\"Charge is passed\");\n }", "boolean hasBidrequest();", "void PurshaseToDonate(Integer Id_Member, Integer Id_Product, Integer Quantity);", "public void buyStock(double askPrice, int shares, int tradeTime) {\n }", "public void dealerAskCard() {\n int dealerScore = this.getDealerHand().getActualValue();\n while (dealerScore < 17) {\n Card card = this.deck.deal(this.getDealerHand());\n dealerScore = this.getDealerHand().getActualValue();\n }\n }", "@Override\r\n public void onClick(View view) {\n Log.d(\"WTF Buy stock at ppl detail\", \"0001 data:\" + StockData.getStockData(1).getDescription());\r\n Log.d(\"WTF Buy stock at ppl detail\", \"Current M: \" + CommonAccount.getCurrentAccount().getCurrentCash());\r\n\r\n CommonAccount.getCurrentAccount().stockBuySell(1, 100);\r\n Log.d(\"WTF Buy stock at ppl detail\", \"After M: \" + CommonAccount.getCurrentAccount().getCurrentCash());\r\n\r\n Log.d(\"WTF Buy stock at ppl detail\", \"Amount of 0001:\" + CommonAccount.getCurrentAccount().getStockInventory(1));\r\n\r\n\r\n try {\r\n CommonAccount.updateCurrentAccount(activity_ppl_details.this);\r\n }\r\n catch (Exception e)\r\n {\r\n Log.e(\"Cannot stock buy\", e.getMessage());\r\n }\r\n\r\n// Intent intent = new Intent(activity_ppl_details.this, activity_ppl_status.class);\r\n// startActivity(intent);\r\n\r\n Intent returnIntent = new Intent();\r\n setResult(RESULT_OK, returnIntent);\r\n\r\n finish();\r\n\r\n }", "public void handleBuyGuppyCommand() {\n if (Aquarium.money >= GUPPYPRICE) {\n guppyController.addNewEntity();\n Aquarium.money -= GUPPYPRICE;\n }\n }", "public abstract void msgCookThisOrder(String choice, JiWaiter w, int tableNum);", "public void handleBuyEggCommand(){\n if(Aquarium.money >= EGGPRICE) {\n Aquarium.money -= EGGPRICE;\n Aquarium.egg++;\n }\n }", "@Override\n\t\t\tpublic void action() {\n\t\t\t\tMessageTemplate cfpTemplate = MessageTemplate.MatchPerformative(ACLMessage.CFP);\n\t\t\t\tMessageTemplate informTemplate = MessageTemplate.MatchPerformative(ACLMessage.INFORM);\n\t\t\t\tMessageTemplate messageTemplate = MessageTemplate.or(cfpTemplate, informTemplate);\n\t\t\t\tACLMessage receivedMessage = myAgent.receive(messageTemplate);\n\t\t\t\t\n\t\t\t\tif (receivedMessage != null) {\n\t\t\t\t\thasReceivedMessage = true;\n\t\t\t\t\t\n\t\t\t\t\tif (receivedMessage.getPerformative() == ACLMessage.CFP) {\n\t\t\t\t\t\tdouble price = Double.parseDouble(receivedMessage.getContent());\n\t\t\t\t\t\tSystem.out.println(\"Buyer [\" + getAID().getLocalName() + \"] received \"\n\t\t\t\t\t\t\t\t+ \"CFP with price \" + Double.toString(price));\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Value in range; send proposal\n\t\t\t\t\t\tif (price <= priceToBuy) {\n\t\t\t\t\t\t\tACLMessage proposal = new ACLMessage(ACLMessage.PROPOSE);\n\t\t\t\t\t\t\tproposal.addReceiver(receivedMessage.getSender());\n\t\t\t\t\t\t\tproposal.setProtocol(receivedMessage.getProtocol());\n\t\t\t\t\t\t\tmyAgent.send(proposal);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttransitionStatus = sendProposal;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Price too high; refuse and wait for new CFP\n\t\t\t\t\t\t\tACLMessage refusal = new ACLMessage(ACLMessage.REFUSE);\n\t\t\t\t\t\t\trefusal.addReceiver(receivedMessage.getSender());\n\t\t\t\t\t\t\trefusal.setProtocol(receivedMessage.getProtocol());\n\t\t\t\t\t\t\tmyAgent.send(refusal);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttransitionStatus = highPrice;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (receivedMessage.getPerformative() == ACLMessage.INFORM) {\n\t\t\t\t\t\ttransitionStatus = noBuyers;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tblock();\n\t\t\t\t}\n\t\t\t}", "public void doLogicBuy() {\n\t\tif (!player.isHuman) {\n\t\t\tif (player.money > estimatedFee * 1.5) //\n\t\t\t{\n\t\t\t\tint free = (int) (player.money - estimatedFee * 1.5);\n\t\t\t\tCell c = board.getCells().get(player.position);\n\t\t\t\tif (c instanceof TradeableCell) {\n\t\t\t\t\tTradeableCell tc = (TradeableCell) c;\n\t\t\t\t\tif (tc.getOwner() == null && tc.getPrice() < free) {\n\t\t\t\t\t\ttc.buy(player);\n\t\t\t\t\t\tboard.addMessage(\"Just bought\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "static private void TalkTo() {\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(BSChristiansen.getDescription() + \", yet he still gives you good advice:\\n\");\n System.out.println(BSChristiansen.getDialog(0));\n System.out.println(\"\");\n woundedSurvivor();\n } else if (mysteriousCrab.getCurrentRoom() == currentRoom && inventory.getInventory().containsKey(\"Shroom\")) {\n System.out.println(mysteriousCrab.getDescription() + \"\\n\" + mysteriousCrab.getDialog(0));\n } else {\n System.out.println(\"There is nobody to communicate with in this Room\");\n }\n\n }", "public TransactionResponse buyXP() {\r\n \t\tTransactionResponse response = new TransactionResponse(hp);\r\n \t\ttry {\r\n \t\t\tCalculation calc = hc.getCalculation();\r\n \t\t\tAccount acc = hc.getAccount();\r\n \t\t\tLanguageFile L = hc.getLanguageFile();\r\n \t\t\tLog log = hc.getLog();\r\n \t\t\tNotification not = hc.getNotify();\r\n \t\t\tInfoSignHandler isign = hc.getInfoSignHandler();\r\n \t\t\tString playerecon = hp.getEconomy();\r\n \t\t\tif (amount > 0) {\r\n \t\t\t\tint shopstock = 0;\r\n \t\t\t\tshopstock = (int) hyperObject.getStock();\r\n \t\t\t\tif (shopstock >= amount) {\r\n \t\t\t\t\tdouble price = hyperObject.getCost(amount);\r\n \t\t\t\t\tdouble taxpaid = hyperObject.getPurchaseTax(price);\r\n \t\t\t\t\tprice = calc.twoDecimals(price + taxpaid);\r\n \t\t\t\t\tif (acc.checkFunds(price, hp.getPlayer())) {\r\n \t\t\t\t\t\tint totalxp = im.gettotalxpPoints(hp.getPlayer());\r\n \t\t\t\t\t\tint newxp = totalxp + amount;\r\n \t\t\t\t\t\tint newlvl = im.getlvlfromXP(newxp);\r\n \t\t\t\t\t\tnewxp = newxp - im.getlvlxpPoints(newlvl);\r\n \t\t\t\t\t\tfloat xpbarxp = (float) newxp / (float) im.getxpfornextLvl(newlvl);\r\n \t\t\t\t\t\thp.getPlayer().setLevel(newlvl);\r\n \t\t\t\t\t\thp.getPlayer().setExp(xpbarxp);\r\n \t\t\t\t\t\tif (!Boolean.parseBoolean(hyperObject.getIsstatic()) || !hc.getConfig().getBoolean(\"config.unlimited-stock-for-static-items\")) {\r\n \t\t\t\t\t\t\thyperObject.setStock(shopstock - amount);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tacc.withdraw(price, hp.getPlayer());\r\n \t\t\t\t\t\tacc.depositShop(price);\r\n \t\t\t\t\t\tif (hc.getYaml().getConfig().getBoolean(\"config.shop-has-unlimited-money\")) {\r\n \t\t\t\t\t\t\tString globalaccount = hc.getYaml().getConfig().getString(\"config.global-shop-account\");\r\n \t\t\t\t\t\t\tacc.setBalance(0, globalaccount);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tresponse.addSuccess(L.f(L.get(\"PURCHASE_MESSAGE\"), amount, calc.twoDecimals(price), hyperObject.getName(), calc.twoDecimals(taxpaid)), calc.twoDecimals(price), hyperObject);\r\n \t\t\t\t\t\tresponse.setSuccessful();\r\n \t\t\t\t\t\tString type = \"dynamic\";\r\n \t\t\t\t\t\tif (Boolean.parseBoolean(hyperObject.getInitiation())) {\r\n \t\t\t\t\t\t\ttype = \"initial\";\r\n \t\t\t\t\t\t} else if (Boolean.parseBoolean(hyperObject.getIsstatic())) {\r\n \t\t\t\t\t\t\ttype = \"static\";\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tlog.writeSQLLog(hp.getName(), \"purchase\", hp.getName(), (double) amount, calc.twoDecimals(price), calc.twoDecimals(taxpaid), playerecon, type);\r\n \t\t\t\t\t\tisign.updateSigns();\r\n \t\t\t\t\t\tnot.setNotify(hyperObject.getName(), null, playerecon);\r\n \t\t\t\t\t\tnot.sendNotification();\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tresponse.addFailed(L.get(\"INSUFFICIENT_FUNDS\"), hyperObject);\r\n \t\t\t\t\t}\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresponse.addFailed(L.f(L.get(\"THE_SHOP_DOESNT_HAVE_ENOUGH\"), hyperObject.getName()), hyperObject);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\tresponse.addFailed(L.f(L.get(\"CANT_BUY_LESS_THAN_ONE\"), hyperObject.getName()), hyperObject);\r\n \t\t\t}\r\n \t\t\treturn response;\r\n \t\t} catch (Exception e) {\r\n \t\t\tString info = \"Transaction buyXP() passed values name='\" + hyperObject.getName() + \"', player='\" + hp.getName() + \"', amount='\" + amount + \"'\";\r\n \t\t\tnew HyperError(e, info);\r\n \t\t\treturn new TransactionResponse(hp);\r\n \t\t}\r\n \t}", "public void buyItem(Player player, int idz) {\r\n\t\ttry{\r\n\t\tItemDefinitions def = ItemDefinitions.getItemDefinitions(idz);\r\n\t\tif (def == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(!canExchange(idz) || EconomyPrices.getPrice(def.id) <= 5) {\r\n\t\t\r\n\t\t\tplayer.sendMessage(name(idz) + \" are not exchangeable~ or has not been added\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tsendPriceConfigs(player, idz);\r\n\t\tset(player, idz, EconomyPrices.getPrice(def.id), 1);\r\n\r\n\t\t}catch (Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public boolean confirm(String szDebterName, String szAmount, String szEntitledName) {\n\t\tboolean bWasAdded;\n\n\t\t// INFO\n\t\tplay.Logger.info(\"<BUSINESS_LOGIC> The Gelt was confirmed by the debter \" + szDebterName\n\t\t\t\t+ \" the system will send for input in the data_base\");\n\t\t// Insert to the records of the data base\n\t\tbWasAdded = insertGelt(getterBL.getIdByName(szDebterName), Integer.parseInt(szAmount),\n\t\t\t\tgetterBL.getIdByName(szEntitledName), 1);\n\t\t// Delete from the records of the temp debts who waiting for confirm\n\t\tbWasAdded = deleteTempDebt(szDebterName, szAmount, szEntitledName);\n\t\treturn bWasAdded;\n\t}", "public boolean buy() throws Exception {\n\n int jogador = this.jogadorAtual();\n\n String lugar = this.tabuleiro.getPlaceName(posicoes[jogador]);\n // System.out.println(\"lugar[jogador]\" + lugar);\n boolean posicaoCompravel = this.posicaoCompravel(posicoes[jogador]);\n boolean isEstatal = this.isPosicaoEstatal(this.posicoes[jogador]);\n\n if (posicaoCompravel || (isEstatal && this.publicServices == true && verificaSeServicoPublicoFoiComprado(this.posicoes[jogador]))) {\n\n if (posicaoCompravel || (isEstatal && this.publicServices == true)) {\n this.listaJogadores.get(jogadorAtual()).addQuantidadeCompanhias();\n\n }\n int posicaoTabuleiro = posicoes[jogador];\n int preco = this.tabuleiro.getLugarPrecoCompra(posicaoTabuleiro);\n Jogador j = listaJogadores.get(jogador);\n this.terminarAVez();\n if (preco <= j.getDinheiro()) {\n this.print(\"\\tPossui dinheiro para a compra!\");\n j.retirarDinheiro(preco);\n this.Donos.put(posicaoTabuleiro, j.getNome());\n\n String nomeLugar = this.tabuleiro.getPlaceName(posicaoTabuleiro);\n j.addPropriedade(nomeLugar);\n if (nomeLugar.equals(\"Reading Railroad\") || nomeLugar.equals(\"Pennsylvania Railroad\") ||\n nomeLugar.equals(\"B & O Railroad\") || nomeLugar.equals(\"Short Line Railroad\")) {\n DonosFerrovias[jogador]++;\n }\n this.print(\"\\tVocê adquiriu \" + nomeLugar + \" por \" + preco);\n this.print(\"\\tAtual dinheiro: \" + j.getDinheiro());\n if (j.temPropriedades() && hipotecaAtiva) {\n j.adicionarComandoHipotecar();\n }\n if (j.verificaSeTemGrupo(posicaoTabuleiro)) {\n if (this.build == true) {\n j.adicionarComandoBuild();\n }\n\n this.tabuleiro.duplicarAluguelGrupo(posicaoTabuleiro);\n\n }\n } else {\n this.print(\"\\tNão possui dinheiro para realizar a compra!\");\n throw new Exception(\"Not enough money\");\n }\n\n } else {\n\n if (this.jaTemDono(posicoes[jogador])) {\n throw new Exception(\"Deed for this place is not for sale\");\n }\n\n if (isEstatal && this.publicServices == false) {\n throw new Exception(\"Deed for this place is not for sale\");\n }\n if (!posicaoCompravel) {\n throw new Exception(\"Place doesn't have a deed to be bought\");\n }\n }\n\n\n\n return false;\n\n\n\n }", "@Override\r\n\t\t\tpublic void buy(String security, double price, int volume) {\n\t\t\t\tSystem.out.println(\"buy is\"+price+volume);\r\n\t\t\t\t\r\n\t\t\t}", "public TransactionResponse buyEnchantFromItem() {\r\n \t\tTransactionResponse response = new TransactionResponse(hp);\r\n \t\tCalculation calc = hc.getCalculation();\r\n \t\tAccount acc = hc.getAccount();\r\n \t\tLog log = hc.getLog();\r\n \t\ttry {\r\n \t\t\tPlayer p = hp.getPlayer();\r\n \t\t\tString nenchant = \"\";\r\n \t\t\tnenchant = hyperObject.getMaterial();\r\n \t\t\tEnchantment ench = Enchantment.getByName(nenchant);\r\n \t\t\tString mater = p.getItemInHand().getType().toString();\r\n \t\t\tdouble price = hyperObject.getValue(EnchantmentClass.fromString(mater));\r\n \t\t\tif (price != 123456789) {\r\n \t\t\t\tif (!im.containsEnchantment(p.getItemInHand(), ench)) {\r\n \t\t\t\t\tif (im.canAcceptEnchantment(p.getItemInHand(), ench) && p.getItemInHand().getAmount() == 1) {\r\n \t\t\t\t\t\tif (acc.checkFunds(price, p)) {\r\n \t\t\t\t\t\t\tacc.withdraw(price, p);\r\n \t\t\t\t\t\t\tacc.depositAccount(price, tradePartner.getName());\r\n \t\t\t\t\t\t\tint l = hyperObject.getName().length();\r\n \t\t\t\t\t\t\tString lev = hyperObject.getName().substring(l - 1, l);\r\n \t\t\t\t\t\t\tint level = Integer.parseInt(lev);\r\n \t\t\t\t\t\t\tim.addEnchantment(p.getItemInHand(), ench, level);\r\n \t\t\t\t\t\t\tim.removeEnchantment(giveItem, ench);\r\n \t\t\t\t\t\t\tprice = calc.twoDecimals(price);\r\n \t\t\t\t\t\t\tresponse.addSuccess(L.f(L.get(\"PURCHASE_ENCHANTMENT_CHEST_MESSAGE\"), 1, calc.twoDecimals(price), hyperObject.getName(), tradePartner.getName()), calc.twoDecimals(price), hyperObject);\r\n \t\t\t\t\t\t\tresponse.setSuccessful();\r\n \t\t\t\t\t\t\tlog.writeSQLLog(p.getName(), \"purchase\", hyperObject.getName(), 1.0, price, 0.0, tradePartner.getName(), \"chestshop\");\r\n \t\t\t\t\t\t\ttradePartner.sendMessage(L.f(L.get(\"CHEST_ENCHANTMENT_BUY_NOTIFICATION\"), 1, calc.twoDecimals(price), hyperObject.getName(), p));\r\n \t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\tresponse.addFailed(L.get(\"INSUFFICIENT_FUNDS\"), hyperObject);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tresponse.addFailed(L.get(\"ITEM_CANT_ACCEPT_ENCHANTMENT\"), hyperObject);\r\n \t\t\t\t\t}\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresponse.addFailed(L.get(\"ITEM_ALREADY_HAS_ENCHANTMENT\"), hyperObject);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\tresponse.addFailed(L.get(\"ITEM_CANT_ACCEPT_ENCHANTMENT\"), hyperObject);\r\n \t\t\t}\r\n \t\t\treturn response;\r\n \t\t} catch (Exception e) {\r\n \t\t\tString info = \"ETransaction buyChestEnchant() passed values name='\" + hyperObject.getName() + \"', player='\" + hp.getName() + \"', owner='\" + tradePartner.getName() + \"'\";\r\n \t\t\tnew HyperError(e, info);\r\n \t\t\treturn new TransactionResponse(hp);\r\n \t\t}\r\n \t}", "private void demoDeliverProducts()\n {\n System.out.println(\"\\nDelivering all the products\\n\");\n System.out.println(\"============================\");\n System.out.println();\n for(int id = 101; id <= 110; id++)\n {\n amount = generator.nextInt(20);\n manager.delivery(id, amount);\n }\n \n manager.printAllProducts();\n }", "boolean isAutoRedeem();", "private void botBuy(Stock stock, int numShares){\n player.getShares().set(game.getIndex(stock), player.getShares().get(game.getIndex(stock)) + numShares);\n player.setFunds(-numShares*(stock.getSharePrice()+3));\n System.out.println(\"purchase made\"); //rem\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Hashtable Param = new Hashtable<>();\n Param.put(\"SPName\", \"SP_picking_order_goods_Upd\");\n String usernames = AppStart.GetInstance().initUserEntity();\n int userid = AppStart.GetInstance().getUserID();\n Param.put(\"pickingcode\", jhorder);\n Param.put(\"currUserid\", \"\" + userid + \"\");\n Param.put(\"currUserName\", usernames);\n Param.put(\"whid\", \"\"+AppStart.GetInstance().Warehouse+\"\");\n Param.put(\"msg\", \"output-varchar-500\");\n Param.put(\"details \", datalsit);\n\n\n List<Hashtable> querypick = new ArrayList<Hashtable>();\n querypick = Datarequest.GETstored(Param);\n if (querypick.get(0).get(\"result\").toString().equals(\"0.0\")) {\n AlertDialog.Builder build = new AlertDialog.Builder(picking.this);\n build.setMessage(\"拣货成功!\").show();\n\n Intent intent = new Intent();\n intent.setClass(picking.this, pickingquery.class);\n startActivity(intent);/*调用startActivity方法发送意图给系统*/\n picking.this.finish();\n } else {\n AlertDialog.Builder build = new AlertDialog.Builder(picking.this);\n build.setMessage(querypick.get(0).get(\"msg\").toString()).show();\n }\n\n\n\n\n\n\n }", "public void addBuy() {\r\n\t\tbuys++;\r\n\t\tnotifyObservers();\r\n\t}", "public static void main(String[] args) {\r\n LoST newLoST = new LoST(\"Buyer\");\r\n try {\r\n String[] msg = { \"rfq\", \"ID7\", \"Item7a\" };\r\n ArrayList<String> msgList = new ArrayList<String>(Arrays.asList(msg));\r\n\r\n newLoST.send(\"Seller\", msgList);\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void choosePrompt() {\r\n\t\tfor (int i = 0; i < mustChoose.size(); i++) {\r\n\t\t\tString prompt = \"**[Choose]** \";\r\n\t\t\t// Find the correct text to display\r\n\t\t\tif (mustChoose.get(i).contentEquals(\"Shrine\")) {\r\n\t\t\t\tprompt += \"**1** :moneybag: ~OR~ **1** :heart:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Dragon Shrine\")) {\r\n\t\t\t\tprompt += \"**2** :moneybag: ~OR~ **1** :wastebasket:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Treasure Hunter\")) {\r\n\t\t\t\tprompt += \"a card to replace in the dungeon row (4-9)\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Underworld Dealing\")) {\r\n\t\t\t\tprompt += \"**1** :moneybag: ~OR~ **BUY 2** __Secret Tome__ **FOR 7** :moneybag:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Apothecary\")) {\r\n\t\t\t\tprompt += \"**3** :crossed_swords: **~OR~** **2** :moneybag: **~OR~** **1** :heart:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Mister Whiskers\")) {\r\n\t\t\t\tprompt += \"**Dragon Attack** ~OR~ **-2** :warning:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Wand of Wind\")) {\r\n\t\t\t\tif (GlobalVars.teleportRoomsPerRoom.length > 0) {\r\n\t\t\t\t\tprompt += \"**1** :crystal_ball: ~OR~ Take a **SECRET** from an adjacent room ``\"+\r\n\t\t\t\t\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()])+\" ┃ \"+\r\n\t\t\t\t\t\tUtils.arrayToString(GlobalVars.teleportRoomsPerRoom[currentPlayer.getCurrentRoom()])+\"``\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprompt += \"**1** :crystal_ball: ~OR~ Take a **SECRET** from an adjacent room ``\"+\r\n\t\t\t\t\t\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()])+\"``\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tgameChannel.sendMessage(prompt).queue();\r\n\t\t}\r\n\t}", "private void buyPlayer(FootballPlayer player, String playerName, int num) {\n\t\tint valid = game.addPlayer(playerName);\n\t\tif(valid==0) {\n\t\t\tplayerNameArray[num].setText(playerName);\n\t\t\timageArray[num].setIcon(MainGui.getShirt(player.getTeamName()));\n\t\t\tbuttonArray[num].setText(\"X\");\n\t\t\tlblBudgetText.setText(game.getCurrentUser().getBudget() + \" RGG\");\n\t\t\t\n\t\t} else if (valid==1) {\n\t\t\tJOptionPane.showMessageDialog(frame,\"You have already selected this player for your team\");\n\t\t} else if (valid==-1) {\n\t\t\tJOptionPane.showMessageDialog(frame,\"You don´t have enough budget too buy \" + playerName);\n\t\t}\n\t}", "@Override\r\n\tpublic void buy(String uname, String bname, Double price) {\n\t\tSystem.out.println(uname + \"购买图书:\" + bname);\r\n\t\tSystem.out.println(\"消费金额:\" + price);\r\n\t\tSystem.out.println(\"支付成功!向物流系统下发货单!\");\r\n\t}", "@Override\n\tpublic void invokeHandsel(final BackPackItem item) {\n\t\tif (((item.Attribute[3] >> 1) & 1) == 0) {\n\t\t\tdialog = new HandselDialog(BackPackActivity.this, item.backpackName);\n\t\t\tdialog.setListener(new DialogInterface.OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t// 发送赠送\n\t\t\t\t\tlong handselId = 0;\n\t\t\t\t\tshort handselNum = 1;\n\t\t\t\t\tboolean enable = true;\n\t\t\t\t\tResources resource = BackPackActivity.this.getResources();\n\t\t\t\t\ttry {\n\t\t\t\t\t\thandselId = Long.parseLong(HandselDialog.handselId);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\tToast.makeText(getApplication(),\n\t\t\t\t\t\t\t\tresource.getString(R.string.package_id_error),\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\tenable = false;\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\thandselNum = Short.parseShort(HandselDialog.handselNum);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tgetApplication(),\n\t\t\t\t\t\t\t\tresource.getString(R.string.package_largess_count_error),\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\tenable = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (guid == handselId) {\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tgetApplication(),\n\t\t\t\t\t\t\t\tresource.getString(R.string.package_largess_myself_error),\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t} else if (item.newHoldCount >= handselNum && enable\n\t\t\t\t\t\t\t&& (handselNum != 0)) {\n\t\t\t\t\t\trequestHandsel(handselId, item.id, handselNum,\n\t\t\t\t\t\t\t\titem.backpackName);\n\t\t\t\t\t} else if (enable) {\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tgetApplication(),\n\t\t\t\t\t\t\t\tresource.getString(R.string.package_not_enaghe_error),\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tdialog.getWindow().setBackgroundDrawable(new ColorDrawable(0));\n\t\t\tdialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\t\tdialog.show();\n\t\t} else {\n\t\t\tResources resource = BackPackActivity.this.getResources();\n\t\t\tToast.makeText(getApplication(),\n\t\t\t\t\tresource.getString(R.string.package_binded_error),\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t}\n\t}", "@Override\n\t public void onClick(View v) {\n\t \t SendReqToPebble();\n\t }", "public static void fundation(){\n Scanner keyboard = new Scanner(System.in);//Keyboard input initializer\r\n String STR; //string for yes or no\r\n System.out.println(\"Would you like to donate to LDJ bank? (y/n)\");\r\n System.out.println();\r\n System.out.printf(\">\");\r\n STR = keyboard.next(); //the user inputs y or n in order to say if they want to donate or not\r\n if(STR.equals(\"y\")){ //if they want to donate\r\n System.out.println();\r\n System.out.println(\"Insert the amount to donate\");\r\n System.out.println();\r\n System.out.printf(\"> $\");\r\n FUNDATION = keyboard.nextInt(); //the promt is printed and the amount is requested\r\n if(FUNDATION <= BALANCE){//if the amount to donate is minor to the balance you can donate\r\n FUNDATIONM = FUNDATIONM + FUNDATION; //the fundation money plus the amount to be donated\r\n BALANCE = BALANCE - FUNDATION; //the user balance minus the fundation money\r\n System.out.println(\"Thank you for donating!\");\r\n }\r\n else {\r\n System.out.println(\"Insufficient Balance\");\r\n }\r\n }\r\n else if(STR.equals(\"n\")){ //if n then prints blank\r\n System.out.println();\r\n }\r\n System.out.println(\"We'll continue with the operation\");\r\n System.out.println();\r\n System.out.println(\"Done\");\r\n }", "@Test \n\tpublic void testbookticket(){\n\t\tboolean check =theater.bookTicket( \"Regal_Jack\",\"Star Wars\", 80, \"1500\");\t\t\n\t\tassertEquals(false,check);\n\t\tboolean check1 =theater.bookTicket( \"Regal_Jack\",\"Star Wars\", 40, \"1500\");\n\t\tassertEquals(false,check1);\n\t}", "int getLuckyTicket();", "public boolean notConfirm(String szDebterName, String szAmount, String szEntitledName) {\n\t\tboolean bWasAdded;\n\t\t// INFO\n\t\tplay.Logger.info(\"<BUSINESS_LOGIC> The Gelt was'nt confirmed by the debter \" + szDebterName\n\t\t\t\t+ \" the system will delete from the data_base\");\n\t\t// Delete from the records of the temp debts who waiting for confirm\n\t\tbWasAdded = deleteTempDebt(szDebterName, szAmount, szEntitledName);\n\t\treturn bWasAdded;\n\t}", "public void howToPlay() {\r\n // An item has been added to the ticket. Fire an event and let everyone know.\r\n System.out.println(\"Step 1: Have no life. \\nStep 2: Deal cards\\nStep 3: Cry yourself to sleep.\");\r\n }", "public void purchaseFlights()\r\n\t{\n\t\tdriver.findElement(By.xpath(trObj.PURCHASEFLISGHTS)).click();\r\n\r\n\t}", "public void Reinforcements()\n{\n\tSystem.out.println(\"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\");\n\tSystem.out.println(\"$$$$$$$$$$$$$ REINFORCEMENTS $$$$$$$$$$$$$$$$$\\n\\n\");\n\t int answer=1;\n do\n {\n\t System.out.println(name+\", you have \"+wealth+\" gold coins.\\n\" );\n\t System.out.println(\"$$$$$$$$ RATES $$$$$$$$\");\n\t System.out.println(\"1 health potions for 1 gold coin\");\n\t System.out.println(\"An improved weapon for 150 gold coins\");\n\t System.out.println(\"Non-refundable :)\");\n\t System.out.println(\"$$$$$$$$$$$$$$$$$$$$$$$$$\\n\");\n\t\tScanner scan=new Scanner(System.in);\n\n\n\t do\n\t{\n\t if(answer!=0&&answer!=1&&answer!=2)\n\t \tSystem.out.print(\"Error in Input! \");\n\t \tSystem.out.println(\"What would you like to buy (0=nothing/done, 1=health potions, 2=better weapon)?\");\n\t answer=scan.nextInt();\n }while(answer!=0&&answer!=1&&answer!=2);\n\n\n\tif (answer==1)\n\t{\n\t\tint exchange=0;\n\t\t\tdo\n\t\t{\n\t\t\tif(exchange<0||exchange>wealth)\n\t\t\t\tSystem.out.print(\"Error in Input! \");\n\n\t\t\tSystem.out.println(\"How many health potions would you like?(cannot be negative or more than your gold coins)\");\n\t exchange=scan.nextInt();\n\t\t}while(exchange<0||exchange>wealth);\n\n\t\t\twealth-=exchange;\n\t\t\thealth+=exchange;\n\t\t\tSystem.out.println(name+\" increases health by \"+exchange+\" potions.\");\n\t\t\tSystem.out.println(name+\" decreases wealth by \"+exchange+\" gold coins.\\n\");\n\n\t}\n\telse if(answer==2)\n\t{\n\t\tif(weapon<8)\n\t {\n\n\t\t\t weapon++;\n\n\n\t\tif(wealth>=150)\n\t\t{\n\t\t\twealth-=150;\n\n\t\t\tSystem.out.println(name+\"\\'s weapon has been improved to \"+WeaponName(weapon)+\".\");\n\t\t\tSystem.out.println(name+\" decreases wealth by 150 gold coins.\\n\" );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint temp=wealth;\n\t\t\thealth+=temp-150;\n\t\t\twealth=0;\n\n\t\tSystem.out.println(name+\"\\'s weapon has been improved to \"+WeaponName(weapon));\n\t\tSystem.out.println(name+\" decreases wealth by \"+temp+\" gold coins.\" );\n\t\tSystem.out.println(name+\" decreases health by \"+(150-temp)+\" portions.\\n\");\n\t\t}\n\t }\n\t \telse\n\t {\n\t \t\tweapon=8;\n\t \t\tSystem.out.println(\"You have updated to the most powerful weapon!!!-----\"+WeaponName(weapon)+\".\\n\" );\n\t }\n\n\t }\n\t else\n\t \tanswer=0;\n\n } while(answer!=0);\n}", "public void shoppingOnSauceLabs(){\n waitElement(backpack_product);\n click(backpack_product);\n waitElement(buttonAddToCart);\n click(buttonAddToCart);\n waitElement(iconShoppingCart);\n click(iconShoppingCart);\n click(buttonCheckOut);\n }", "public static boolean receiveLotteryBuyAmount(Player player, String action, int xAmount) {\n\t\tif (!action.equals(\"BUY LOTTERY TICKETS\")) {\n\t\t\treturn false;\n\t\t}\n\t\tif (player.isAdministratorRank() && !ServerConfiguration.DEBUG_MODE) {\n\t\t\tplayer.getPA().sendMessage(\"\" + ServerConstants.getServerName() + \" is not on debug mode.\");\n\t\t\tplayer.getPA().closeInterfaces(true);\n\t\t\treturn true;\n\t\t}\n\t\tint currentCurrencyAmount = ItemAssistant.getItemAmount(player, ServerConstants.getMainCurrencyId());\n\t\tint maxAmount = Integer.MAX_VALUE / getLotteryTicketCost();\n\t\tif (xAmount > maxAmount) {\n\t\t\txAmount = maxAmount;\n\t\t}\n\t\tif (xAmount * getLotteryTicketCost() > currentCurrencyAmount) {\n\t\t\txAmount = currentCurrencyAmount / getLotteryTicketCost();\n\t\t}\n\t\tif (xAmount == 0) {\n\t\t\tplayer.getPA().closeInterfaces(true);\n\t\t\tplayer.getPA()\n\t\t\t .sendMessage(\"You need at least \" + Misc.formatNumber(getLotteryTicketCost()) + \" \" + ServerConstants.getMainCurrencyName() + \" to buy a lottery ticket.\");\n\t\t\treturn true;\n\t\t}\n\t\tLotteryDatabase data = LotteryDatabase.getPlayerLotteryInstance(player.getPlayerName());\n\t\tif (data == null) {\n\t\t\tLotteryDatabase.lotteryDatabase.add(new LotteryDatabase(player.getPlayerName(), xAmount));\n\t\t} else {\n\t\t\tdata.setTickestPurchased(data.getTicketsPurchased() + xAmount);\n\t\t}\n\t\ttotalTicketsPurchased += xAmount;\n\t\tItemAssistant.deleteItemFromInventory(player, ServerConstants.getMainCurrencyId(), xAmount * getLotteryTicketCost());\n\t\tplayer.getDH().sendStatement(\n\t\t\t\t\"You have purchased x\" + Misc.formatNumber(xAmount) + \" lottery ticket\" + Misc.getPluralS(xAmount) + \" for \" + Misc.formatNumber(xAmount * getLotteryTicketCost())\n\t\t\t\t+ \" \" + ServerConstants.getMainCurrencyName() + \".\");\n\t\tNpc npc = NpcHandler.npcs[lotteryNpcIndex];\n\t\tnpc.forceChat(\"The pot is currently at \" + getTotalPotString() + \"!\");\n\t\treturn true;\n\n\t}", "public void sellGoodsForStore(HashMap<Goods, Integer> interestedGoods) {\n\t\tArrayList<Goods> listInterestedGoods = accessingGoods(interestedGoods);\n\t\t\n\t\tboolean state1 = false;\n\t\twhile(state1 == false) {\n\t\t\tSystem.out.println(\"(99) Cancel sell\");\n\t\t\tprintGoods(interestedGoods, \"Goods that store want to buy: \");\n\t\t\tSystem.out.println(\"Select the goods you want to sell\");\n\t\t\tint selectedAction = scanner.nextInt();\n\t\t\ttry { \n\t\t\t\tif (selectedAction == 99) {\n\t\t\t\t\tstate1 = true;\n\t\t\t\t\tgame.goToStore();\n\t\t\t\t}\n\t\t\t\telse if (selectedAction <= interestedGoods.size() && selectedAction > 0) {\n\t\t\t\t\tGoods selectedGoods = listInterestedGoods.get(selectedAction - 1);\n\t\t\t\t\t\n\t\t\t\t\tif (game.checkAvailability(selectedGoods)){\n\t\t\t\t\t\tSystem.out.println(\"You have \" + selectedGoods.getQuantityOwned() +\" \"+ selectedGoods.getName() + \" stored in your ship!\");\n\t\t\t\t\t\tint goodsPrice = interestedGoods.get(selectedGoods);\n\t\t\t\t\t\tboolean state2 = false;\n\t\t\t\t\t\twhile(state2 == false) {\n\t\t\t\t\t\t\tSystem.out.println(\"How many do you want to sell?\" );\n\t\t\t\t\t\t\tint quantity = scanner.nextInt();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry { \n\t\t\t\t\t\t\t\tif (game.checkQuantity(quantity, selectedGoods)) {\n\t\t\t\t\t\t\t\tstate2 = true;\n\t\t\t\t\t\t\t\tgame.sellGoods(selectedGoods, quantity, goodsPrice);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"You don't have that many quanity of \" + selectedGoods.getName());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"You have to input an integer!\");\n\t\t\t\t\t\t\t\tscanner.nextLine();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"You don't have the item!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t}\t\n\t}", "@Override\n public boolean onCommand(CommandSender commandSender, Command command, String label, String[] param) {\n if (command.getName().equalsIgnoreCase(\"donate\")) {\n if (param.length >= 1) {\n if (param[0].equalsIgnoreCase(\"buy\")) {\n if (param.length >= 2) {\n switch (param[1].toLowerCase()) {\n case \"vip\":\n buyVip(1, commandSender);\n break;\n default:\n commandSender.sendMessage(\"Invalid item use: /donate info\");\n }\n return true;\n } else {\n commandSender.sendMessage(\"Not enough arguments use: /donate buy vip\");\n return true;\n }\n } else if (param[0].equalsIgnoreCase(\"info\")) {\n if (param.length >= 2 && param[1].equalsIgnoreCase(\"kit\")) {\n commandSender.sendMessage(\"The vip kit contains\");\n commandSender.sendMessage(\"1 Leather armour set with enchants\");\n commandSender.sendMessage(\"The helmet is enchanted with Aqua Affinity I and Respiration III\");\n commandSender.sendMessage(\"The boots are enchanted with Feather Falling IV\");\n commandSender.sendMessage(\"One of each diamond tools and sword\");\n commandSender.sendMessage(\"Cooldown for kit is one day\");\n } else {\n commandSender.sendMessage(\"Purchase with 1000 donate points: /donate buy vip\");\n commandSender.sendMessage(\"VIP bonus -----\");\n commandSender.sendMessage(\"50% more MCMMO experience\");\n commandSender.sendMessage(\"The ability to use tpa (teleport ask)\");\n commandSender.sendMessage(\"The ability to use home, you still have to use a bed to set it\");\n commandSender.sendMessage(\"The vip kit (/kit vip) use /donate info kit for more information\");\n commandSender.sendMessage(\"VIP bonus -----\");\n }\n return true;\n } else if (param[0].equalsIgnoreCase(\"redeem\")) {\n if (param.length == 2) {\n commandSender.sendMessage(\"Attempting to redeem token...\");\n if (plugin.dbConnection.redeemToken(param[1], commandSender.getName())) {\n commandSender.sendMessage(\"Token successfully redeemed token \" + param[1]);\n } else {\n commandSender.sendMessage(\"Invalid token \" + param[1]);\n }\n return true;\n } else {\n commandSender.sendMessage(\"Not enough arguments use /donate redeem <token>\");\n return true;\n }\n } else if (param[0].equalsIgnoreCase(\"points\")) {\n commandSender.sendMessage(\"You have \" + plugin.dbConnection.getPlayerPoints(commandSender.getName()) + \" points\");\n return true;\n }\n }\n commandSender.sendMessage(\"Not enough arguments use: /donate (buy, info, redeem, points)\");\n return true;\n }\n return false;\n }", "private void makeAnOffer(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"Make an Offer on an Item\\n\");\n\n\t\t\tMap<String, Object> makeOfferArgs = new HashMap<>();\n\n\t\t\tlog.info(\"\\nType in the Item ID:\\n\");\n\t\t\tInteger item_id = Integer.parseInt(sc.nextLine());\n\t\t\tItem item = cService.getItemById(item_id);\n\t\t\tmakeOfferArgs.put(\"item\", item);\n\n\t\t\t// this will further complicate the mathematics of the services\n\t\t\t// ignore this for now\n\t\t\tmakeOfferArgs.put(\"quantity\", 1);\n\n\t\t\tlog.info(\"\\nHow much will you offer for this item?:\\n\");\n\t\t\tDouble offer_price = Double.parseDouble(sc.nextLine());\n\t\t\tmakeOfferArgs.put(\"offer_price\", offer_price);\n\n\t\t\tlog.info(\"\\nType in the number of payments you will make:\\n\");\n\t\t\tInteger installments = Integer.parseInt(sc.nextLine());\n\t\t\tmakeOfferArgs.put(\"installments\", installments);\n\t\t\tmakeOfferArgs.put(\"user\", user);\n\n\t\t\tOffer offer = cService.makeOffer(makeOfferArgs);\n\t\t\tlog.info(\"\\nThe following is the result:\\n\");\n\t\t\tlog.info(\"\t\t\" + offer + \"\\n\");\n\n\t\t\tlog.info(\"Thanks for your offer!:\");\n\t\t\tlog.info(\"\t\tPress 1 to make another offer\");\n\t\t\tlog.info(\"\t\tPress anything else to go BACK TO THE STORE\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing BACK TO THE STORE\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "public void sendStartCheckoutHit() {\n Product product = new Product()\n .setName(\"dinner\")\n .setPrice(5)\n .setVariant(thisDinner)\n .setId(thisDinnerId)\n .setQuantity(1);\n\n ProductAction productAction =\n new ProductAction(ProductAction.ACTION_CHECKOUT);\n\n Tracker tracker = ((MyApplication) getApplication()).getTracker();\n\n tracker.send(new HitBuilders.EventBuilder()\n .setCategory(\"Shopping steps\")\n .setAction(\"Start checkout\")\n .setLabel(thisDinner)\n .addProduct(product)\n .setProductAction(productAction)\n .build());\n }", "@Override\n\tpublic void showBeveragesMenu(int selectedPerson) {\n\t\ttry{\n System.out.println(\"Please place your order\");\n randomNum=transactionService.createRandomOrderNumber();\n OrderNum=initialOrderNum+randomNum;\n do {\n \t\n showCoffeeType();\n showCoffeeSize();\n System.out.println(\"Do you want Add-ons?\");\n subChoice=input.next();\n if(subChoice.equalsIgnoreCase(\"yes\"))\n {\n showCoffeeAddon();\n \n }\n else\n {\n \ttransactionService.createCoffeeOrder(selectedPerson,OrderNum,selectedCoffeeType,selectedCoffeeSize,selectedAddon);\n }\n System.out.println(\"Do you want to order more coffee?\");\n subChoice = input.next();\n \n \n\n }while(subChoice.equalsIgnoreCase(\"yes\"));\n showVoucher();\n\n printBill(selectedPerson,OrderNum,selectedVoucher);\n System.out.println(\"Happy Drink! Have a good day.\");\n System.out.println(\"================================\");\n\n\n\n }\n \n catch (InputMismatchException e)\n {\n System.out.println(\"Please provide a correct input\");\n }\n catch (NullPointerException en)\n {\n System.out.println(en.getMessage());\n }\n\t\t\n\t}", "boolean CanBuySettlement();", "@Override\n public Double buyDevice(String name, String type) {\n Cash c = null;\n Cheque ch = null;\n Card cd = null;\n \n Date d = new Date();\n \n switch (type) {\n case \"c1\":\n c = new Cash.Builder(d.toString())\n .build();\n break;\n case \"c2\":\n ch = new Cheque.Builder(d.toString())\n .build();\n break;\n case \"c3\":\n cd = new Card.Builder(d.toString())\n .build();\n break;\n }\n \n \n PurchaseVinyl v = new PurchaseVinyl.Builder()\n .setName(\"Let The Good Times Role\")\n .setPrice(3.99)\n .build();\n \n PurchaseVinyl v1 = new PurchaseVinyl.Builder()\n .setName(\"Thanks For The Meomories\")\n .setPrice(3.99)\n .build();\n \n List<PurchaseVinyl> vinylList = new ArrayList();\n vinylList.add(v);\n vinylList.add(v1);\n \n \n ProductPurchase pc = new ProductPurchase.Builder(d)\n .setVinylPurchases(vinylList)\n .setCardPurchases(cd)\n .setCashPurchases(c)\n .setChequePurchases(ch)\n .build();\n \n repo.save(pc);\n id = pc.getID();\n \n ProductPurchase pc2 = repo.findOne(id);\n for(int x = 0; pc2.getVinylPurchases().size() > x; x++){\n if(pc2.getVinylPurchases().get(x).getName().equals(name)){\n return pc2.getVinylPurchases().get(x).getPrice();\n }\n }\n return null; \n }", "@Test\n\tpublic void test04_RefuseARequest(){\n\t\tinfo(\"Test 04: Refuse a request\");\n\t\tinfo(\"prepare data\");\n\t\t/*Create data test*/\n\t\tString username1 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password1 = username1;\n\t\tString email1 = username1 + mailSuffixData.getMailSuffixRandom();\n\n\t\tString username2 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password2 = username2;\n\t\tString email2= username2 + mailSuffixData.getMailSuffixRandom();\n\n\t\tinfo(\"Add new user\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToAddUser();\n\t\taddUserPage.addUser(username1, password1, email1, username1, username1);\n\t\taddUserPage.addUser(username2, password2, email2, username2, username2);\n\n\t\t//createRequestsConnections();\n\t\t/*Step Number: 1\n\t\t *Step Name: Refuse a request\n\t\t *Step Description: \n\t\t\t- Login as mary\n\t\t\t- Open intranet homepage\n\t\t\t- On this gadget, mouse over an invitation of Jack(demo)\n\t\t\t- Click on Refuse icon\n\t\t *Input Data: \n\n\t\t *Expected Outcome: \n\t\t\t- Invitations of root, james are displayed on Invitation gadget\n\t\t\t- The Accept and Refuse button are displayed.\n\t\t\t- The invitation of jack fades out and is permanently removed from the list\n\t\t\t- Requests of James is moved to the top of the gadget*/\n\t\tinfo(\"Sign in with mary account\");\n\t\tmagAc.signIn(username1, password1);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tinfo(\"--Send request 2 to John\");\n\t\tmagAc.signIn(username2, password2);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tinfo(\"Sign in with john account\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tmouseOver(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2),true);\n\t\tUtils.pause(2000);\n\t\tclick(hp.ELEMENT_INVITATIONS_PEOPLE_REFUSE_BTN.replace(\"${name}\",username2), 2,true);\n\t\twaitForElementNotPresent(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2));\n\t\twaitForAndGetElement(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username1));\n\n\t\tinfo(\"Clear Data\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToUsersAndGroupsManagement();\n\t\tuserAndGroup.deleteUser(username1);\n\t\tuserAndGroup.deleteUser(username2);\n\t}", "private void crossPressed() {\n\t\tif (!talkmode) {\n\t\t\tif (checkLoot() || checkNearbyVillagers() || checkDoors(doors, player.direction) || checkSigns()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\tif (question) {\n\t\t\t\texitQuestionDialog();\n\t\t\t}\n\n\t\t\tLoot g = dialog.getGift();\n\t\t\tif (g != null) {\n\t\t\t\tLoad.collectLoot(g);\n\t\t\t}\n\t\t\tString takeName = dialog.getTakeName();\n\t\t\tif (takeName != null) {\n\t\t\t\tint takeAmount = dialog.getTakeAmount();\n\t\t\t\tif (takeName.equals(\"gold\")) {\n\t\t\t\t\tLoad.getPartyItems().addGold(-takeAmount);\n\t\t\t\t} else {\n\t\t\t\t\tLoad.getPartyItems().take(takeName, takeAmount);\n\t\t\t\t}\n\t\t\t}\n\t\t\tHashMap<String, Integer> t = dialog.getBeforeTriggers();\n\t\t\tHashMap<String, Integer> triggerAdds = dialog.getTriggerAdds();\n\t\t\tboolean finished = dialog.isFinished();\n\t\t\tdoTriggers(t);\n\t\t\tif (triggerAdds != null) {\n\t\t\t\tDatabase.incrementStatus(triggerAdds);\n\t\t\t}\n\t\t\tif (finished) {\n\t\t\t\tsetTalking(false);\n\t\t\t\tif (dialog.shouldTrigger()) {\n\t\t\t\t\tt = dialog.getTriggers();\n\t\t\t\t\tdoTriggers(t);\n\t\t\t\t\texecuteTrigger(talkingVillager);\n\t\t\t\t} else {\n\t\t\t\t\tdialog.resetDialog();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (dialog.isQuestion()) {\n\t\t\t\t\tinitQuestionDialog();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void checkAndExecute(){\n if(priceListener.getSecurityPrice() < buyPrice){\n executionService.buy(security, buyPrice, 100);\n // if the price < buyPrice then executionService.buy(buyquantity)\n }else if ( priceListener.getSecurityPrice() > sellPrice ) {\n executionService.sell(security, buyPrice, 100);\n }\n }", "public void execute() {\r\n int depositAmount = this.promptDepositAmount(); // amount in cents\r\n if (depositAmount != CANCELED) {\r\n screen.displayMessage(\"\\nPlease insert a deposit envelope containing: \");\r\n screen.displayDollarAmount(depositAmount / 100);\r\n screen.displayMessageLine(\".\");\r\n\r\n if (depositSlot.isEnvelopeReceived()) {\r\n screen.displayMessageLine(\"\\nYour envelope has been received.\");\r\n screen.displayMessageLine(\"The money just deposited will not be available until we verify \" +\r\n \"the amount of any enclosed cash and your checks clear.\");\r\n bankDatabase.credit(this.accountNumber, depositAmount / 100);\r\n } else {\r\n screen.displayMessageLine (\"\\nYou did not insert an envelope. The ATM has canceled your transaction.\");\r\n }\r\n } else {\r\n screen.displayMessageLine( \"\\nCanceling transaction...\");\r\n }\r\n }", "public boolean confirmDebt(String szDebterName, String szAmount, String szEntitledName, String szGroupName) {\n\t\tboolean bWasAdded;\n\n\t\t// INFO\n\t\tplay.Logger.info(\"<BUSINESS_LOGIC> The Gelt was confirmed by the debter \" + szDebterName\n\t\t\t\t+ \" the system will send for input in the data_base\");\n\t\t// Insert to the records of the data base\n\t\tbWasAdded = insertGelt(getterBL.getIdByName(szDebterName), Integer.parseInt(szAmount),\n\t\t\t\tgetterBL.getIdByName(szEntitledName), getterDB.getGroupIdByGroupName(szGroupName));\n\t\t// Delete from the records of the temp debts who waiting for confirm\n\t\tbWasAdded = deleteTempDebt(szDebterName, szAmount, szEntitledName,szGroupName);\n\t\treturn bWasAdded;\n\t}", "private void sendToCatDance()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Dance'\", Toast.LENGTH_SHORT).show();\n }", "private void bid() {\n\t\t\t\n\t\t}", "public void userClicksDonateButton(View view)\n {\n \t// Don't let the user accidentally donate twice\n \tchangeDonateButton(DONATE_BUTTON_WORKING);\n \t\n \tEditText amountEditText = (EditText)findViewById(R.id.donationAmount);\n \tString amount = amountEditText.getText().toString();\n \t\n \t// TODO Connect this to activity elements\n \tSystem.out.println(\"About to call sendMoney\");\n \tSystem.out.println(\"amount = \" + amount);\n \tSystem.out.println(\"address = \" + charity.getBitcoinAddress());\n \tsendMoney(amount, charity.getBitcoinAddress());\n }", "private void postRequest() {\n\t\tSystem.out.println(\"post request, iam playing money\");\n\t}" ]
[ "0.67378104", "0.66560787", "0.65465736", "0.61595553", "0.6111431", "0.6090523", "0.6060518", "0.60345924", "0.60298216", "0.5906723", "0.5903104", "0.58809716", "0.5857308", "0.58547664", "0.5830501", "0.5828853", "0.58151126", "0.5808877", "0.5780274", "0.575227", "0.57482874", "0.5726975", "0.5718559", "0.56867325", "0.56525147", "0.5624246", "0.56175625", "0.5610029", "0.55978405", "0.5597492", "0.55870235", "0.5574185", "0.5570362", "0.5566294", "0.55631626", "0.5550774", "0.5548292", "0.5539552", "0.5525981", "0.551799", "0.55168605", "0.54975283", "0.5491514", "0.549119", "0.5467443", "0.5465772", "0.546172", "0.54594004", "0.54574245", "0.5454856", "0.545233", "0.5451647", "0.54492337", "0.54480815", "0.54463327", "0.54382926", "0.5436842", "0.54343927", "0.54305094", "0.5430495", "0.54227984", "0.5413885", "0.541143", "0.54043305", "0.54037076", "0.5395888", "0.5389739", "0.5388463", "0.53860176", "0.53853816", "0.5385198", "0.5383265", "0.538321", "0.53789747", "0.5366958", "0.5365025", "0.53643095", "0.53613997", "0.5359961", "0.5355118", "0.53478736", "0.5343696", "0.53415006", "0.5336071", "0.5331874", "0.5325893", "0.53239465", "0.5323723", "0.53184813", "0.5317063", "0.53150964", "0.5315095", "0.53142613", "0.53121465", "0.53109956", "0.5305208", "0.53036565", "0.53018117", "0.5300315", "0.52982336" ]
0.5516798
41
Receive the x amount tickets wanted to be bought by the player.
public static boolean receiveLotteryBuyAmount(Player player, String action, int xAmount) { if (!action.equals("BUY LOTTERY TICKETS")) { return false; } if (player.isAdministratorRank() && !ServerConfiguration.DEBUG_MODE) { player.getPA().sendMessage("" + ServerConstants.getServerName() + " is not on debug mode."); player.getPA().closeInterfaces(true); return true; } int currentCurrencyAmount = ItemAssistant.getItemAmount(player, ServerConstants.getMainCurrencyId()); int maxAmount = Integer.MAX_VALUE / getLotteryTicketCost(); if (xAmount > maxAmount) { xAmount = maxAmount; } if (xAmount * getLotteryTicketCost() > currentCurrencyAmount) { xAmount = currentCurrencyAmount / getLotteryTicketCost(); } if (xAmount == 0) { player.getPA().closeInterfaces(true); player.getPA() .sendMessage("You need at least " + Misc.formatNumber(getLotteryTicketCost()) + " " + ServerConstants.getMainCurrencyName() + " to buy a lottery ticket."); return true; } LotteryDatabase data = LotteryDatabase.getPlayerLotteryInstance(player.getPlayerName()); if (data == null) { LotteryDatabase.lotteryDatabase.add(new LotteryDatabase(player.getPlayerName(), xAmount)); } else { data.setTickestPurchased(data.getTicketsPurchased() + xAmount); } totalTicketsPurchased += xAmount; ItemAssistant.deleteItemFromInventory(player, ServerConstants.getMainCurrencyId(), xAmount * getLotteryTicketCost()); player.getDH().sendStatement( "You have purchased x" + Misc.formatNumber(xAmount) + " lottery ticket" + Misc.getPluralS(xAmount) + " for " + Misc.formatNumber(xAmount * getLotteryTicketCost()) + " " + ServerConstants.getMainCurrencyName() + "."); Npc npc = NpcHandler.npcs[lotteryNpcIndex]; npc.forceChat("The pot is currently at " + getTotalPotString() + "!"); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int buyTickets(UUID uuid, int number) {\r\n\t\tPennyGame plugin = PennyGame.getPlugin(PennyGame.class);\r\n\t\tint previousTicketCount = getTicketCount(uuid);\r\n\t\t//number = Math.min(number, this.maxTicketCount - previousTicketCount);\r\n\t\tRegisteredServiceProvider<Economy> rsp = plugin.getServer().getServicesManager().getRegistration(Economy.class);\r\n\t\tEconomy econ = rsp.getProvider();\r\n\t\tOfflinePlayer player = Bukkit.getOfflinePlayer(uuid);\r\n\t\t//double balance = econ.getBalance(player);\r\n\t\t//number = (int)Math.min(number - (number - (balance / this.ticketPrice)), number);*/\r\n\t\t\r\n\t\tnumber = this.hasBalance(uuid, number);\r\n\t\t\r\n\t\tint buyCount = Math.min(number + previousTicketCount, this.maxTicketCount) - previousTicketCount;\r\n\t\tint totalCount = Math.min(number + previousTicketCount, this.maxTicketCount);\r\n\t\t\r\n\t\tif(buyCount <= 0) { // not enough balance to buy OR max count reached\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\tif(econ.withdrawPlayer(player, buyCount * this.ticketPrice).transactionSuccess()) {\t\t\t\r\n\t\t\tplugin.getSettings().set(\"participants.\" + uuid.toString(), totalCount);\r\n\t\t\tthis.tickets.put(uuid, totalCount);\r\n\t\t\t\r\n\t\t\tthis.jackpot += buyCount * ticketPrice - buyCount * tax;\r\n\t\t\tplugin.getSettings().set(\"jackpot\", this.jackpot);\r\n\t\t\tplugin.saveSettings();\r\n\t\t\treturn totalCount;\r\n\t\t} else {\r\n\t\t\treturn previousTicketCount;\r\n\t\t}\r\n\t}", "private void botBuy(Stock stock, int numShares){\n player.getShares().set(game.getIndex(stock), player.getShares().get(game.getIndex(stock)) + numShares);\n player.setFunds(-numShares*(stock.getSharePrice()+3));\n System.out.println(\"purchase made\"); //rem\n }", "private void purchaseTickets() throws IOException\n {\n toServer.writeInt(sectionsSelected);\n toServer.writeInt(numTicketsWanted);\n\n setChanged();\n notifyObservers(new Integer(sectionsSelected));\n notifyObservers(new Integer(numTicketsWanted));\n \n recieveInformationFromServer();\n\n \n }", "public synchronized String buyTicket() {\r\n Random r = new Random();\r\n int buyTckDuration = r.nextInt(3000)+1000;\r\n String timestamp = \"NULL\";\r\n if (isValid_ToBuyTicket()) {\r\n this.tktSold += 1;\r\n try {\r\n Thread.sleep(buyTckDuration);\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n// System.out.println(\"Sold a new ticket, today's sales num: \" + this.tktSold);\r\n\r\n // we still need to create a real ticket with a timestamps\r\n // some code()\r\n\r\n String postfix = getPostfix();\r\n timestamp = \"T\" + postfix;\r\n return timestamp;\r\n\r\n }else{\r\n System.out.println(\"Your ticket request denied!\");\r\n return timestamp;\r\n }\r\n\r\n }", "private void sendBucks() {\n\t\tint userid = userID;\n\n\t\tfor (int i = 0; i < userServices.getAllUsers().length; i++) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"User: \" + userList.get(i).getId() + \"\\t\" + \"username: \" + userList.get(i).getUsername() + \"\\n\");\n\t\t}\n\n\t\tSystem.out.println(\"Select and ID you want to send TE Bucks to: \\n\");\n\n\t\tint sendTo = Integer.parseInt(scan.nextLine());\n\n\t\tSystem.out.println(\"How much money?\");\n\t\tBigDecimal money = (new BigDecimal(scan.nextLine()));\n\n\t\ttry {\n\t\t\tif (accountServices.getBalanceByAccountID(userid).compareTo(money) < 0) {\n\t\t\t\tSystem.out.println(\"You do not have enough funds to make transfer\");\n\t\t\t\tsendBucks();\n\n\t\t\t}\n\t\t} catch (AccountsServicesException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t\tTransfers holder = sendTransfer(userid, sendTo, money);\n\t\taccountServices.sendMoney(userid, holder);\n\n\t\ttry {\n\t\t\tSystem.out.println(\"$\" + money + \" sent to \" + sendTo);\n\t\t\tSystem.out.println(\"New balance: $\" + accountServices.getBalanceByAccountID(userid));\n\t\t} catch (AccountsServicesException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void sendBucks() {\n\t\tconsole.printUsers(userService.getAll(currentUser.getToken()));\n\t\tSystem.out.println(\"\");\n\n\t\tBoolean validResponse = false;\n\t\tint selectedUserId = -1;\n\t\tBigDecimal transferAmount = new BigDecimal(0);\n\t\tBigDecimal zero = new BigDecimal(0);\n\t\tBigDecimal currentBalance = (accountService.getAccountBalance(currentUser.getToken()));\n\t\tTransfer transfer = new Transfer();\n\n\t\twhile (true) {\n\t\t\t// ask which user you want to send money to or exit\n\t\t\tselectedUserId = console.getUserInputInteger(\"Enter ID of user you are sending to (0 to cancel)\");\n\t\t\tif (selectedUserId == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (selectedUserId > 0 && selectedUserId <= userService.getAll(currentUser.getToken()).length) {\n\t\t\t\t// prompt for amount to send\n\t\t\t\ttransferAmount = console.getUserInputBigDecimal(\"Enter amount\");\n\t\t\t\t// transfer money\n\n\t\t\t\tif (transferAmount.compareTo(zero) == 1 && transferAmount.compareTo(currentBalance) <= 0) {\n\n\t\t\t\t\ttransfer.setFromUserId(currentUser.getUser().getId());\n\t\t\t\t\ttransfer.setToUserId(selectedUserId);\n\t\t\t\t\ttransfer.setTransferAmount(transferAmount);\n\t\t\t\t\ttransfer.setStatusOfTransferId(2);\n\t\t\t\t\ttransfer.setTypeOfTransferId(2);\n\n\t\t\t\t\t\n\t\t\t\t\ttransferService.createTransfer(currentUser.getToken(), transfer);\n\t\t\t\t\tSystem.out.println(\"\\nTransfer Complete!\");\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(\"\\nInsufficient Funds! Please try again.\\n\");\n\n\t\t\t}\n\t\t}\n\n\t}", "public void receive()\n\t{\n\t\ttemp1 = txtScan.nextInt();\n\t\tSystem.out.println(\"Receiving \" + temp1 + \" crates of bananas\");\n\t\tfor (int i = 0; i < temp1; i++)\n\t\t{\n\t\t\ttemp2 = txtScan.nextInt();\t\t\t// exp\n\t\t\ttemp3 = txtScan.nextInt();\t\t\t// count\n\t\t\ttemp4 = txtScan.nextDouble();\t\t// cost\n\t\t\t// make a new crate with these dimensions\n\t\t}\n\t}", "@Override\n\tpublic void passedBy() {\n\t\tMonopolyGameController.getInstance();\n\t\tMonopolyGameController.getCurrentPlayer().increaseMoney(250);\n\t\tLogger.getInstance().notifyAll(MonopolyGameController.getCurrentPlayer().getName()+ \" gained 250 dollars by landing on Bonus Square\");\n\n\t}", "private void requestBucks() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Please choose a user to request TE Bucks from:\");\n\t\t\tUser fromUser;\n\t\t\tboolean isValidUser;\n\t\t\tdo {\n\t\t\t\tfromUser = (User)console.getChoiceFromOptions(userService.getUsers());\n\t\t\t\tisValidUser = ( fromUser\n\t\t\t\t\t\t\t\t.getUsername()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(currentUser.getUser().getUsername())\n\t\t\t\t\t\t\t ) ? false : true;\n\n\t\t\t\tif(!isValidUser) {\n\t\t\t\t\tSystem.out.println(\"You can not request money from yourself\");\n\t\t\t\t}\n\t\t\t} while (!isValidUser);\n\t\t\t\n\t\t\t// Select an amount\n\t\t\tBigDecimal amount = new BigDecimal(\"0.00\");\n\t\t\tboolean isValidAmount = false;\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\tamount = new BigDecimal(console.getUserInput(\"Enter An Amount (0 to cancel):\\n \"));\n\t\t\t\t\tisValidAmount = true;\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tSystem.out.println(\"Please enter a numerical value\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(amount.doubleValue() < 0.99 && amount.doubleValue() > 0.00) {\n\t\t\t\t\tSystem.out.println(\"You cannot request less than $0.99 TEB\");\n\t\t\t\t\tisValidAmount = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (amount.doubleValue() == 0.00) {\n\t\t\t\t\tmainMenu();\n\t\t\t\t}\n\t\t\t} while(!isValidAmount);\n\n\t\t\t// Create transfer object\n\t\t\tboolean confirmedAmount = false;\n\t\t\tString confirm = \"\";\n\t\t\tTransfer transfer = null;\n\t\t\twhile (!confirmedAmount) {\n\t\t\t\tconfirm = console.getUserInput(\"You entered: \" + amount.toPlainString() + \" TEB. Is this correct? (y/n)\");\n\t\t\t\tif (confirm.toLowerCase().startsWith(\"y\")) {\n\t\t\t\t\t// transferService to POST to server db\n\t\t\t\t\tSystem.out.println(\"You are requesting: \" + amount.toPlainString() +\n\t\t\t\t\t\t\t\" TEB from \" + fromUser.getUsername());\n\t\t\t\t\ttransfer = createTransferObj(\"Request\", \"Pending\",\n\t\t\t\t\t\t\t\t\tcurrentUserId, fromUser.getId(), amount);\n\t\t\t\t\tboolean hasSent = \n\t\t\t\t\t\t\ttransferService.sendBucks(currentUserId, fromUser.getId(), transfer);\n\t\t\t\t\tif (hasSent) {\n\t\t\t\t\t\t// TODO :: Test this\n\t\t\t\t\t\tSystem.out.println(\"The code executed\");\n\t\t\t\t\t}\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Request canceled.\");\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t} \t\n\t\t\t}\n\t\t\t\n\t\t}catch(UserServiceException ex) {\n\t\t\tSystem.out.println(\"User Service Exception\");\n\t\t}catch(TransferServiceException ex) {\n\t\t\tSystem.out.println(\"Transfer Service Exception\");\n\t\t}\n\t\t\n\t}", "public TransactionResponse buyXP() {\r\n \t\tTransactionResponse response = new TransactionResponse(hp);\r\n \t\ttry {\r\n \t\t\tCalculation calc = hc.getCalculation();\r\n \t\t\tAccount acc = hc.getAccount();\r\n \t\t\tLanguageFile L = hc.getLanguageFile();\r\n \t\t\tLog log = hc.getLog();\r\n \t\t\tNotification not = hc.getNotify();\r\n \t\t\tInfoSignHandler isign = hc.getInfoSignHandler();\r\n \t\t\tString playerecon = hp.getEconomy();\r\n \t\t\tif (amount > 0) {\r\n \t\t\t\tint shopstock = 0;\r\n \t\t\t\tshopstock = (int) hyperObject.getStock();\r\n \t\t\t\tif (shopstock >= amount) {\r\n \t\t\t\t\tdouble price = hyperObject.getCost(amount);\r\n \t\t\t\t\tdouble taxpaid = hyperObject.getPurchaseTax(price);\r\n \t\t\t\t\tprice = calc.twoDecimals(price + taxpaid);\r\n \t\t\t\t\tif (acc.checkFunds(price, hp.getPlayer())) {\r\n \t\t\t\t\t\tint totalxp = im.gettotalxpPoints(hp.getPlayer());\r\n \t\t\t\t\t\tint newxp = totalxp + amount;\r\n \t\t\t\t\t\tint newlvl = im.getlvlfromXP(newxp);\r\n \t\t\t\t\t\tnewxp = newxp - im.getlvlxpPoints(newlvl);\r\n \t\t\t\t\t\tfloat xpbarxp = (float) newxp / (float) im.getxpfornextLvl(newlvl);\r\n \t\t\t\t\t\thp.getPlayer().setLevel(newlvl);\r\n \t\t\t\t\t\thp.getPlayer().setExp(xpbarxp);\r\n \t\t\t\t\t\tif (!Boolean.parseBoolean(hyperObject.getIsstatic()) || !hc.getConfig().getBoolean(\"config.unlimited-stock-for-static-items\")) {\r\n \t\t\t\t\t\t\thyperObject.setStock(shopstock - amount);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tacc.withdraw(price, hp.getPlayer());\r\n \t\t\t\t\t\tacc.depositShop(price);\r\n \t\t\t\t\t\tif (hc.getYaml().getConfig().getBoolean(\"config.shop-has-unlimited-money\")) {\r\n \t\t\t\t\t\t\tString globalaccount = hc.getYaml().getConfig().getString(\"config.global-shop-account\");\r\n \t\t\t\t\t\t\tacc.setBalance(0, globalaccount);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tresponse.addSuccess(L.f(L.get(\"PURCHASE_MESSAGE\"), amount, calc.twoDecimals(price), hyperObject.getName(), calc.twoDecimals(taxpaid)), calc.twoDecimals(price), hyperObject);\r\n \t\t\t\t\t\tresponse.setSuccessful();\r\n \t\t\t\t\t\tString type = \"dynamic\";\r\n \t\t\t\t\t\tif (Boolean.parseBoolean(hyperObject.getInitiation())) {\r\n \t\t\t\t\t\t\ttype = \"initial\";\r\n \t\t\t\t\t\t} else if (Boolean.parseBoolean(hyperObject.getIsstatic())) {\r\n \t\t\t\t\t\t\ttype = \"static\";\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tlog.writeSQLLog(hp.getName(), \"purchase\", hp.getName(), (double) amount, calc.twoDecimals(price), calc.twoDecimals(taxpaid), playerecon, type);\r\n \t\t\t\t\t\tisign.updateSigns();\r\n \t\t\t\t\t\tnot.setNotify(hyperObject.getName(), null, playerecon);\r\n \t\t\t\t\t\tnot.sendNotification();\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tresponse.addFailed(L.get(\"INSUFFICIENT_FUNDS\"), hyperObject);\r\n \t\t\t\t\t}\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresponse.addFailed(L.f(L.get(\"THE_SHOP_DOESNT_HAVE_ENOUGH\"), hyperObject.getName()), hyperObject);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\tresponse.addFailed(L.f(L.get(\"CANT_BUY_LESS_THAN_ONE\"), hyperObject.getName()), hyperObject);\r\n \t\t\t}\r\n \t\t\treturn response;\r\n \t\t} catch (Exception e) {\r\n \t\t\tString info = \"Transaction buyXP() passed values name='\" + hyperObject.getName() + \"', player='\" + hp.getName() + \"', amount='\" + amount + \"'\";\r\n \t\t\tnew HyperError(e, info);\r\n \t\t\treturn new TransactionResponse(hp);\r\n \t\t}\r\n \t}", "public Ticket buyTicket() {\n\t\tif(Capacity>CapacityCounter) {\n\t\t\tchooseSeat();\n\t\t\tCapacity = Capacity+CAPACITYPLUSONE;\n\t\t} else {\n\t\t\tSystem.out.println(\"The showing is full\");\n\t\t}\n\t\tTicket retTicket = new Ticket();\n\t\treturn retTicket;\n\t}", "public void buy(int num) {\r\n\t\t// Make sure there is one in stock and enough gold and in market rooms\r\n\t\tif (marketItemCount[num-1] > 0 && currentPlayer.getGold() >= 7 && (currentPlayer.getCurrentRoom() == 18 || currentPlayer.getCurrentRoom() == 19 || currentPlayer.getCurrentRoom() == 24 || currentPlayer.getCurrentRoom() == 25)) {\r\n\t\t\t// Adjust item index based on how many left\r\n\t\t\tint itemIndex = 0;\r\n\t\t\tif (num == 2) itemIndex = 2;\r\n\t\t\tif (num == 3) itemIndex = 4;\r\n\t\t\twhile (market[itemIndex] == null) {\r\n\t\t\t\titemIndex++;\r\n\t\t\t}\r\n\t\t\tcurrentPlayer.pickup(market[itemIndex]);\r\n\t\t\tcurrentPlayer.updateGold(-7);\r\n\t\t\taddEvent(\"``\"+currentName+\"`` bought a \"+market[itemIndex].substring(0,market[itemIndex].length()-1).replace(\"1\",\"\"),true);\r\n\t\t\taddHistory(market[itemIndex].substring(0,market[itemIndex].length()-1).replace(\"1\",\"\").toUpperCase());\r\n\t\t\tmarket[itemIndex] = null;\r\n\t\t\tmarketItemCount[num-1] -= 1;\r\n\t\t\tupdateMarketAndTreasures(false);\r\n\t\t\tupdatePlayArea(currentPlayer, false);\r\n\t\t\t//updateDungeonRow(currentPlayer, false);\r\n\t\t\tupdateInfo(currentPlayer, false);\r\n\t\t}\r\n\t}", "private void buyPlayer(FootballPlayer player, String playerName, int num) {\n\t\tint valid = game.addPlayer(playerName);\n\t\tif(valid==0) {\n\t\t\tplayerNameArray[num].setText(playerName);\n\t\t\timageArray[num].setIcon(MainGui.getShirt(player.getTeamName()));\n\t\t\tbuttonArray[num].setText(\"X\");\n\t\t\tlblBudgetText.setText(game.getCurrentUser().getBudget() + \" RGG\");\n\t\t\t\n\t\t} else if (valid==1) {\n\t\t\tJOptionPane.showMessageDialog(frame,\"You have already selected this player for your team\");\n\t\t} else if (valid==-1) {\n\t\t\tJOptionPane.showMessageDialog(frame,\"You don´t have enough budget too buy \" + playerName);\n\t\t}\n\t}", "public void doLogicBuy() {\n\t\tif (!player.isHuman) {\n\t\t\tif (player.money > estimatedFee * 1.5) //\n\t\t\t{\n\t\t\t\tint free = (int) (player.money - estimatedFee * 1.5);\n\t\t\t\tCell c = board.getCells().get(player.position);\n\t\t\t\tif (c instanceof TradeableCell) {\n\t\t\t\t\tTradeableCell tc = (TradeableCell) c;\n\t\t\t\t\tif (tc.getOwner() == null && tc.getPrice() < free) {\n\t\t\t\t\t\ttc.buy(player);\n\t\t\t\t\t\tboard.addMessage(\"Just bought\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void grantTickets(){\n //45mins\n if (tempTime >= 10){\n addTicket();\n }\n tempTime = 0;\n }", "private void sendBucks() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Please choose a user to send TE Bucks to:\");\n\t\t\tUser toUser;\n\t\t\tboolean isValidUser;\n\t\t\tdo {\n\t\t\t\ttoUser = (User)console.getChoiceFromOptions(userService.getUsers());\n\t\t\t\tisValidUser = ( toUser\n\t\t\t\t\t\t\t\t.getUsername()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(currentUser.getUser().getUsername())\n\t\t\t\t\t\t\t ) ? false : true;\n\n\t\t\t\tif(!isValidUser) {\n\t\t\t\t\tSystem.out.println(\"You can not send money to yourself\");\n\t\t\t\t}\n\t\t\t} while (!isValidUser);\n\t\t\t\n\t\t\t// Select an amount\n\t\t\tBigDecimal amount = new BigDecimal(\"0.00\");\n\t\t\tboolean isValidAmount = false;\n\t\t\tdo {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tamount = new BigDecimal(console.getUserInput(\"Enter An Amount (0 to cancel):\\n \"));\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\tSystem.out.println(\"Please enter a numerical value\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tisValidAmount = amount.doubleValue() < userService\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getBalance(currentUserId)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.doubleValue();\n\t\t\t\tif(!isValidAmount) {\n\t\t\t\t\tSystem.out.println(\"You can not send more money than you have available!\");\n\t\t\t\t}\n\t\t\t\tif(amount.doubleValue() < 0.99 && amount.doubleValue() > 0.00) {\n\t\t\t\t\tSystem.out.println(\"You must send at least $0.99 TEB\");\n\t\t\t\t\tisValidAmount = false;\n\t\t\t\t} else if (amount.doubleValue() == 0.00) {\n\t\t\t\t\tmainMenu();\n\t\t\t\t}\n\t\t\t} while(!isValidAmount);\n\n\t\t\t// Create transfer object\n\t\t\tboolean confirmedAmount = false;\n\t\t\tString confirm = \"\";\n\t\t\tTransfer transfer = null;\n\t\t\twhile (!confirmedAmount) {\n\t\t\t\tconfirm = console.getUserInput(\"You entered: \" + amount.toPlainString() + \" TEB. Is this correct? (y/n)\");\n\t\t\t\tif (confirm.toLowerCase().startsWith(\"y\")) {\n\t\t\t\t\t// transferService to POST to server db\n\t\t\t\t\ttransfer = createTransferObj(\"Send\", \"Approved\", currentUserId, toUser.getId(), amount);\n\t\t\t\t\tboolean hasSent = transferService.sendBucks(currentUserId, toUser.getId(), transfer);\n\t\t\t\t\tif (hasSent) {\n\t\t\t\t\t\t// TODO :: Test this\n\t\t\t\t\t\tSystem.out.println(\"The code executed\");\n\t\t\t\t\t}\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Send canceled.\");\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t} \n\t\t\t}\n\t\t}catch(UserServiceException ex) {\n\t\t\tSystem.out.println(\"User Service Exception\");\n\t\t}catch(TransferServiceException ex) {\n\t\t\tSystem.out.println(\"Transfer Service Exception\");\n\t\t}\n\t\t\n\t}", "protected int numberRemainingTickets()\n\t{\n\t\treturn tickets.size();\n\t}", "public void addBuy() {\r\n\t\tbuys++;\r\n\t\tnotifyObservers();\r\n\t}", "public double buyTickets(int knr, int aid, int anzTickets) throws Exception {\r\n \t// TODO Write your code here\r\n\r\n // 1. check if there are enough tickets available\r\n Statement checkAvailabilityStmt = connection.createStatement();\r\n ResultSet availabilityResult = checkAvailabilityStmt.executeQuery(\"SELECT COUNT(*) AS availableTickets FROM ticket WHERE kunde IS NULL and auffuehrung = \" + aid);\r\n\r\n int availableTickets;\r\n if (availabilityResult.next()) {\r\n availableTickets = availabilityResult.getInt(\"availableTickets\");\r\n } else {\r\n throw new SQLDataException(\"Could not estimate available ticket count from tickets table\");\r\n }\r\n\r\n availabilityResult.close();\r\n checkAvailabilityStmt.close();\r\n\r\n if (availableTickets >= anzTickets) {\r\n pstmt_updateTicket.setInt(1, knr);\r\n pstmt_updateTicket.setInt(2, aid);\r\n pstmt_updateTicket.setInt(3, anzTickets);\r\n\r\n pstmt_updateTicket.execute();\r\n\r\n ResultSet affectedRows = pstmt_updateTicket.getResultSet();\r\n\r\n double summe = 0;\r\n int numTicketsSold = 0;\r\n\r\n while (affectedRows.next()) {\r\n numTicketsSold++;\r\n summe += affectedRows.getDouble(\"preis\");\r\n }\r\n\r\n if (numTicketsSold != anzTickets) {\r\n connection.rollback();\r\n\r\n throw new SQLDataException(\"Update failed, only \" + numTicketsSold + \" tickets would've been changed, rolling back..\");\r\n }\r\n\r\n pstmt_updateTicket.close();\r\n affectedRows.close();\r\n connection.commit();\r\n\r\n return summe;\r\n } else {\r\n throw new SQLDataException(\"Not enough tickets are currently available\");\r\n }\r\n }", "public TransactionResponse sellXP() {\r\n \t\tTransactionResponse response = new TransactionResponse(hp);\r\n \t\ttry {\r\n \t\t\tDataHandler sf = hc.getDataFunctions();\r\n \t\t\tCalculation calc = hc.getCalculation();\r\n \t\t\tAccount acc = hc.getAccount();\r\n \t\t\tLanguageFile L = hc.getLanguageFile();\r\n \t\t\tLog log = hc.getLog();\r\n \t\t\tNotification not = hc.getNotify();\r\n \t\t\tInfoSignHandler isign = hc.getInfoSignHandler();\r\n \t\t\tString playerecon = hp.getEconomy();\r\n \t\t\tif (amount > 0) {\r\n \t\t\t\tint totalxp = im.gettotalxpPoints(hp.getPlayer());\r\n \t\t\t\tif (totalxp >= amount) {\r\n \t\t\t\t\tdouble price = hyperObject.getValue(amount, hp);\r\n \t\t\t\t\tBoolean toomuch = false;\r\n \t\t\t\t\tif (price == 3235624645000.7) {\r\n \t\t\t\t\t\ttoomuch = true;\r\n \t\t\t\t\t}\r\n \t\t\t\t\tif (!toomuch) {\r\n \t\t\t\t\t\tint maxi = hyperObject.getMaxInitial();\r\n \t\t\t\t\t\tboolean itax;\r\n \t\t\t\t\t\tboolean stax;\r\n \t\t\t\t\t\titax = Boolean.parseBoolean(hyperObject.getInitiation());\r\n \t\t\t\t\t\tstax = Boolean.parseBoolean(hyperObject.getIsstatic());\r\n \t\t\t\t\t\tif (amount > (maxi) && !stax && itax) {\r\n \t\t\t\t\t\t\tamount = maxi;\r\n \t\t\t\t\t\t\tprice = hyperObject.getValue(amount, hp);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tboolean sunlimited = hc.getYaml().getConfig().getBoolean(\"config.shop-has-unlimited-money\");\r\n \t\t\t\t\t\tif (acc.checkshopBalance(price) || sunlimited) {\r\n \t\t\t\t\t\t\tif (maxi == 0) {\r\n \t\t\t\t\t\t\t\tprice = hyperObject.getValue(amount, hp);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tint newxp = totalxp - amount;\r\n \t\t\t\t\t\t\tint newlvl = im.getlvlfromXP(newxp);\r\n \t\t\t\t\t\t\tnewxp = newxp - im.getlvlxpPoints(newlvl);\r\n \t\t\t\t\t\t\tfloat xpbarxp = (float) newxp / (float) im.getxpfornextLvl(newlvl);\r\n \t\t\t\t\t\t\thp.getPlayer().setLevel(newlvl);\r\n \t\t\t\t\t\t\thp.getPlayer().setExp(xpbarxp);\r\n \t\t\t\t\t\t\tif (!Boolean.parseBoolean(hyperObject.getIsstatic()) || !hc.getConfig().getBoolean(\"config.unlimited-stock-for-static-items\")) {\r\n \t\t\t\t\t\t\t\thyperObject.setStock(amount + hyperObject.getStock());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tint maxi2 = hyperObject.getMaxInitial();\r\n \t\t\t\t\t\t\tif (maxi2 == 0) {\r\n \t\t\t\t\t\t\t\thyperObject.setInitiation(\"false\");\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tdouble salestax = hp.getSalesTax(price);\r\n \t\t\t\t\t\t\tacc.deposit(price - salestax, hp.getPlayer());\r\n \t\t\t\t\t\t\tacc.withdrawShop(price - salestax);\r\n \t\t\t\t\t\t\tif (sunlimited) {\r\n \t\t\t\t\t\t\t\tString globalaccount = hc.getYaml().getConfig().getString(\"config.global-shop-account\");\r\n \t\t\t\t\t\t\t\tacc.setBalance(0, globalaccount);\r\n \t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresponse.addSuccess(L.f(L.get(\"SELL_MESSAGE\"), amount, calc.twoDecimals(price), hyperObject.getName(), calc.twoDecimals(price - salestax)), calc.twoDecimals(price), hyperObject);\r\n \t\t\t\t\t\t\tresponse.setSuccessful();\r\n \t\t\t\t\t\t\tString type = \"dynamic\";\r\n \t\t\t\t\t\t\tif (Boolean.parseBoolean(hyperObject.getInitiation())) {\r\n \t\t\t\t\t\t\t\ttype = \"initial\";\r\n \t\t\t\t\t\t\t} else if (Boolean.parseBoolean(hyperObject.getIsstatic())) {\r\n \t\t\t\t\t\t\t\ttype = \"static\";\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tlog.writeSQLLog(hp.getName(), \"sale\", hyperObject.getName(), (double) amount, calc.twoDecimals(price - salestax), calc.twoDecimals(salestax), playerecon, type);\r\n \r\n \t\t\t\t\t\t\tisign.updateSigns();\r\n \t\t\t\t\t\t\tnot.setNotify(hyperObject.getName(), null, playerecon);\r\n \t\t\t\t\t\t\tnot.sendNotification();\r\n \t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\tresponse.addFailed(L.get(\"SHOP_NOT_ENOUGH_MONEY\"), hyperObject);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tresponse.addFailed(L.f(L.get(\"CURRENTLY_CANT_SELL_MORE_THAN\"), sf.getHyperObject(hyperObject.getName(), playerecon).getStock(), hyperObject.getName()), hyperObject);\r\n \t\t\t\t\t}\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresponse.addFailed(L.f(L.get(\"YOU_DONT_HAVE_ENOUGH\"), hyperObject.getName()), hyperObject);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\tresponse.addFailed(L.f(L.get(\"CANT_SELL_LESS_THAN_ONE\"), hyperObject.getName()), hyperObject);\r\n \t\t\t}\r\n \t\t\treturn response;\r\n \t\t} catch (Exception e) {\r\n \t\t\tString info = \"Transaction sellXP() passed values name='\" + hyperObject.getName() + \"', player='\" + hp.getName() + \"', amount='\" + amount + \"'\";\r\n \t\t\tnew HyperError(e, info);\r\n \t\t\treturn new TransactionResponse(hp);\r\n \t\t}\r\n \t}", "public void dealerAskCard() {\n int dealerScore = this.getDealerHand().getActualValue();\n while (dealerScore < 17) {\n Card card = this.deck.deal(this.getDealerHand());\n dealerScore = this.getDealerHand().getActualValue();\n }\n }", "public void buyStock(double askPrice, int shares, int tradeTime) {\n }", "private void receiveVote() {\n\t\t//Se la postazione termina la connessione informiamo lo staff con un messaggio di errore\n\t\tif(!link.hasNextLine()) {\n\t\t\tcontroller.printError(\"Errore di Comunicazione\", \"La postazione \"+ ip.getHostAddress() + \" non ha inviato i pacchetti di voto.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Vengono recuperati i voti cifrati\n\t\tMessage request;\n\t\tWrittenBallot[] encryptedBallots;\n\t\ttry {\n\t\t\trequest = (Message) Message.fromB64(link.read(), \"postazione \" + ip.getHostAddress());\n\t\t\tString[] required = {\"encryptedBallots\"};\n\t\t\tClass<?>[] types = {WrittenBallot[].class};\n\t\t\t\n\t\t\trequest.verifyMessage(Protocol.sendVoteToStation, required, types, \"postazione \" + ip.getHostAddress());\n\t\t\tencryptedBallots = request.getElement(\"encryptedBallots\");\n\t\t\t\n\t\t\t//I voti vengono memorizzati nel seggio in attesa dell'invio all'urna\n\t\t\tif(((Controller) controller).storeVoteLocally(encryptedBallots, ip))\n\t\t\t\tlink.write(Protocol.votesReceivedAck);\n\t\t\telse\n\t\t\t\tlink.write(Protocol.votesReceivedNack);\n\t\t\t\n\t\t} catch (PEException e) {\n\t\t\tlink.write(Protocol.votesReceivedNack);\n\t\t\tcontroller.printError(e);\n\t\t}\n\t}", "public void requestCoinsFromChat(Player player, Trade t) {\n TradeMain.getIns().getChatRequests().requestChatInformation(player, \"INSERT_COIN_AMOUND\")\n .thenAccept((message) -> {\n int coins;\n\n try {\n\n coins = Integer.parseInt(message);\n\n } catch (NumberFormatException ex) {\n\n MainData.getIns().getMessageManager().getMessage(\"COINS_MUST_BE_NUMBER\")\n .sendTo(player);\n\n requestCoinsFromChat(player, t);\n\n return;\n }\n\n PlayerData pD = MainData.getIns().getPlayerManager().getPlayer(player.getUniqueId());\n\n MainData.getIns().getServerCurrencyHandler().removeCurrency(pD, coins)\n .thenAccept((result) -> {\n\n if (result) {\n\n t.setCoins(player.getUniqueId(), coins);\n\n Inventory tradeInventory = t.getPlayerInv(pD.getPlayerID());\n\n player.openInventory(tradeInventory);\n\n } else {\n\n MainData.getIns().getMessageManager().getMessage(\"NOT_ENOUGH_COINS\")\n .format(\"%coins%\", coins)\n .sendTo(pD);\n\n requestCoinsFromChat(player, t);\n }\n });\n });\n }", "public static void buyLotteryTicketsDialogueOption(Player player) {\n\t\tInterfaceAssistant.closeDialogueOnly(player);\n\t\tInterfaceAssistant\n\t\t\t\t.showAmountInterface(player, \"BUY LOTTERY TICKETS\", \"Enter the amount of tickets you will buy for \" + Misc.formatNumber(getLotteryTicketCost()) + \" each\");\n\t}", "public void buyIn(double buyingAmount) {\n if (bankroll > buyingAmount) {\n bankroll -= buyingAmount;\n activePlayer = true;\n }\n }", "public static void main (String [] args)\n {\n System.out.println(\"Thank you for doing business with us! We look forward to helping you order your tickets for this event.\"); \n System.out.println(\"You will be prompted to insert name and number of tickets. Enter Name:# (Ex: Katie:4)\"); //instruction for user to input ticket request\n \n String ticketInput = JOptionPane.showInputDialog(\"Name and number of tickets: \"); //JOptionPane for user to enter information\n System.out.println(\"Entry Confirmation: \" + ticketInput); //Confirmation of what user input\n String split[] = ticketInput.split(\":\"); // split of input to separate the number of tickets requested\n \n int ticketAmount = Integer.parseInt(split[1]); // number to be pushed onto Queue and to use to subtract from total tickets\n System.out.println(ticketAmount); //check to see if split worked (can be taken out later)\n \n \n \n }", "public void incrementAmountBought() {\n amountBought++;\n }", "int getBuyQuantity();", "@Override\r\n\tpublic void run() {\r\n\t\twhile (true) {\r\n\t\t\t// 上锁\r\n\t\t\tlock.lock();\r\n\r\n\t\t\ttry {\r\n\t\t\t\tif (tickets > 0) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(Thread.currentThread().getName() + \"正在售票,剩余:\" + (--tickets) + \"张\");\r\n\t\t\t\t}\r\n\t\t\t} finally {\r\n\t\t\t\t// 释放锁\r\n\t\t\t\tlock.unlock();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public long getAmountRequested();", "int getLuckyTicket();", "public void buy() throws CannotAffordException {\r\n\t\tGame game = Game.getInstance();\r\n\t\tgame.decreaseBudget(price);\r\n\t\tgame.getInventory().add(id);\r\n\t}", "void askBuyResources();", "private void askPlayer() {\n System.out.println(\"Dealers last card is \" + Dealer.showLast());\n System.out.println(\"Your hand is \" + p1.getHand());\n System.out.println(\"Your Hand total is \" + p1.getTotal() + \". Would you like to hit or stand?\");\n\n String s = scan.nextLine();\n System.out.println();\n\n if (s.equalsIgnoreCase(\"hit\")) {\n p1.addToHand(dealCard());\n p1.calcTotal();\n if (p1.getTotal() > 31) {\n System.out.println(\"Your hand is \" + p1.getHand());\n System.out.println(\"Your hand total is \" + p1.getTotal());\n System.out.println(\"You bust, Dealer wins\");\n\n totalWinnings -= betNum;\n p1.subPointCount(betNum);\n bust = true;\n\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n\n } else {\n askPlayer();\n }\n } else {\n System.out.println(\"You stand at \" + p1.getTotal());\n\n while (Dealer.calcTotal() < 26) {\n Dealer.addToHand(dealCard());\n\n }\n System.out.println(\"Dealer's hand is \" + Dealer.getHand());\n System.out.println(\"Dealer's hand total is \" + Dealer.getTotal());\n\n }\n }", "@Override\r\n\t\tpublic void action() {\n MessageTemplate mt = MessageTemplate.MatchPerformative(ACLMessage.ACCEPT_PROPOSAL);\r\n MessageTemplate mt2 = MessageTemplate.MatchPerformative(ACLMessage.PROPOSE);\r\n ACLMessage msg = myAgent.receive(mt);\r\n //If it is a ACCEPT_PROPOSAL, the seller sell the book to the buyer (execpt if the book if not here anymore)\r\n if (msg != null) {\r\n // ACCEPT_PROPOSAL Message received. Process it\r\n title = msg.getContent();\r\n ACLMessage reply = msg.createReply();\r\n\r\n Integer price = (Integer) catalogue.remove(title);\r\n if (price != null) {\r\n reply.setPerformative(ACLMessage.INFORM);\r\n reply.setContent(String.valueOf(price));\r\n System.out.println(title+\" sold to agent \"+msg.getSender().getName());\r\n }\r\n else {\r\n // The requested book has been sold to another buyer in the meanwhile .\r\n reply.setPerformative(ACLMessage.FAILURE);\r\n reply.setContent(\"not-available\");\r\n }\r\n myAgent.send(reply);\r\n }\r\n //If it is a new PROPOSE, the buyer is trying to negociate.\r\n else {\r\n ACLMessage msg2 = myAgent.receive(mt2);\r\n if(msg2 != null){\r\n ACLMessage reply = msg2.createReply();\r\n //If the price of the buyer is OK for the seller according to his tolerance, the transaction is made\r\n if(((Integer) catalogue.get(title) - Integer.parseInt(msg2.getContent())) <= tolerance){\r\n System.out.println(myAgent.getLocalName() + \" say : OK, let's make a deal\");\r\n updateCatalogue(title, Integer.parseInt(msg2.getContent()));\r\n reply.setPerformative(ACLMessage.INFORM);\r\n reply.setContent(msg2.getContent());\r\n }\r\n //Else, the seller accept to negociate, he up his tolerance and ask the buyer to up his real price\r\n else{\r\n //Send a REQUEST Message to negociate with the buyer\r\n reply.setPerformative(ACLMessage.REQUEST);\r\n //Up the tolerance by *change*\r\n tolerance += change;\r\n reply.setContent(String.valueOf(change));\r\n System.out.println(myAgent.getLocalName() + \" say : Let's up your real price while I up my tolerance (\" + ((Integer) catalogue.get(title) - Integer.parseInt(msg2.getContent())) + \" < \" + tolerance + \")\");\r\n }\r\n myAgent.send(reply);\r\n }\r\n else{\r\n block();\r\n }\r\n }\r\n\t\t}", "public void itemsSold() {\n quanitySnacks--;\n }", "protected void handleBuy(Message m) {\n return;\n }", "public void setUnsoldTickets(int ticketsWanted) \n {\n this.unsoldTickets = this.unsoldTickets - ticketsWanted;\n }", "private void demoDeliverProducts()\n {\n System.out.println(\"\\nDelivering all the products\\n\");\n System.out.println(\"============================\");\n System.out.println();\n for(int id = 101; id <= 110; id++)\n {\n amount = generator.nextInt(20);\n manager.delivery(id, amount);\n }\n \n manager.printAllProducts();\n }", "public static void buyCandy3() {\n int funds = 100;\n int itemsBought = 0;\n for (int price = 10; funds >= price; price += 10) {\n //System.out.println(\"price \" + price);\n itemsBought++;\n funds -= price;\n }\n //4 items bought.\n System.out.println(itemsBought + \" items bought.\");\n //Change: $0.00\n System.out.println(\"Change: $\" + funds);\n }", "public void examine (Player player) {\n\t\tString desc = getType().getDescription()+\" (id=\"+id+\", amount=\"+amount+\")\";\n\t\tplayer.getDispatcher().sendGameMessage(desc);\n\t\tint value = Virtue.getInstance().getExchange().lookupPrice(id);\n\t\tif (value != -1) {\n\t\t\tplayer.getDispatcher().sendGameMessage(\"This item is worth: \"+StringUtility.formatNumber(value)\n\t\t\t\t\t+\"gp on the Grand Exchange.\");\n\t\t}\n\t}", "public void trigger()\r\n\t{\r\n\t\tif(!this.inProgress && this.round >= Config.RoundLimit)\r\n\t\t{\r\n\t\t\tthis.sendMessages(new String[]{\"The game has already ended.\"});\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint count = this.playerCount();\r\n\t\t\tif(count > 1 && count - this.readyCount() == 0)\r\n\t\t\t{\r\n\t\t\t\tList<String> messages = new LinkedList<>();\r\n\t\t\t\tif(this.inProgress)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(Config.Phases[this.phase].equals(Config.VotePhaseName))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmessages.add(\"Voting ended. Counting votes.\");\r\n\t\t\t\t\t\t// Sum all the votes from each player.\r\n\t\t\t\t\t\tint[] votes = new int[Config.TableCards];\r\n\t\t\t\t\t\tfor(Player player : this.players)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(player != null)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tint[] playerVotes = player.getVotes();\r\n\t\t\t\t\t\t\t\tint i = 0;\r\n\t\t\t\t\t\t\t\twhile(i < playerVotes.length)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif(playerVotes[i] != 0)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tvotes[i] += playerVotes[i];\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t++i;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tplayer.resetVotes();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// Pick the cards with more yes votes than no votes.\r\n\t\t\t\t\t\tList<Card> picked = new LinkedList<>();\r\n\t\t\t\t\t\tint pos = 0;\r\n\t\t\t\t\t\twhile(pos < this.onTable.size())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(votes[pos] > 0)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tCard card = this.onTable.get(pos);\r\n\t\t\t\t\t\t\t\tpicked.add(card);\r\n\t\t\t\t\t\t\t\tfor(Share price : this.prices)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif(price.getStock().equals(card.stock))\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tprice.addShares(card.effect);\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t++pos;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// Prepare the output string for the picked cards.\r\n\t\t\t\t\t\tString message = \"\";\r\n\t\t\t\t\t\tboolean isNotFirst = false;\r\n\t\t\t\t\t\tfor(Card card : picked)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(isNotFirst)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tmessage += \", \";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tisNotFirst = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tmessage += card.stock;\r\n\t\t\t\t\t\t\tif(card.effect > 0)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tmessage += \"+\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tmessage += card.effect;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.dealToTable();\r\n\t\t\t\t\t\tmessages.add(\"Picked influence cards: \" + message);\r\n\t\t\t\t\t\tmessages.add(\"\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t++this.phase;\r\n\t\t\t\t\tif(this.phase >= Config.Phases.length)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthis.phase = 0;\r\n\t\t\t\t\t\t++this.round;\r\n\t\t\t\t\t\tif(this.round >= Config.RoundLimit)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tthis.stopGame();\r\n\t\t\t\t\t\t\tShare[] prices = this.prices.toArray(new Share[0]);\r\n\t\t\t\t\t\t\tfor(Player player : this.players)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(player != null)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tplayer.sellAll(prices);\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\tmessages.add(\"Game over. Scores:\");\r\n\t\t\t\t\t\t\t// Copy and sort the players list by total money.\r\n\t\t\t\t\t\t\tPlayer[] winners = Arrays.copyOf(this.players, this.players.length);\r\n\t\t\t\t\t\t\tArrays.sort(winners, (Player o1, Player o2) -> {\r\n\t\t\t\t\t\t\t\tif(o1 == null && o2 == null)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if(o1 == null)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\treturn 1;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if(o2 == null)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\treturn -1;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\treturn o2.getMoney() - o1.getMoney();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tint lastScore = winners[0].getMoney();\r\n\t\t\t\t\t\t\tint num = 0;\r\n\t\t\t\t\t\t\tint i = 0;\r\n\t\t\t\t\t\t\twhile(i < winners.length)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(winners[i] == null)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif(lastScore > winners[i].getMoney())\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tnum = i;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tmessages.add(Config.PlayerPositions[num] + \": Player \" + winners[i].getPlayerNumber() + \", \" + winners[i].getName() + \" - \" + Config.Currency + winners[i].getMoney());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t++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\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tmessages.add(\"Round \" + (this.round + 1) + \" of \" + Config.RoundLimit + \".\");\r\n\t\t\t\t\t\t\tmessages.add(Config.Phases[this.phase] + \" phase started.\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmessages.add(Config.Phases[this.phase] + \" phase started.\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.inProgress = true;\r\n\t\t\t\t\tmessages.add(\"Game started. Round \" + (this.round + 1) + \" of \" + Config.RoundLimit + \".\");\r\n\t\t\t\t\tmessages.add(Config.Phases[this.phase] + \" phase started.\");\r\n\t\t\t\t}\r\n\t\t\t\tthis.sendMessages(messages.toArray(new String[0]));\r\n\t\t\t\tfor(Player player : this.players)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(player != null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tplayer.setReady(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void buy() {\n if (asset >= S_I.getPirce()) {\n Item item = S_I.buy();\n asset -= item.getPrice();\n S_I.setAsset(asset);\n } else {\n System.out.println(\"cannot afford\");\n }\n }", "@Override\n public Object call() throws Exception {\n for (int x = 0; x < 500; x++) {\n if (this.ticket > 0) {\n System.out.println(\"买票,ticket = \" + this.ticket--);\n }\n }\n return \"票卖光了\";\n }", "public void buyItem() {\n List<Gnome> cart = user.getCart();\n String message = \"\";\n List<Gnome> bought = shopFacade.buyGnomes(cart);\n if (!bought.isEmpty()) {\n message = bought.size() + \" items bought\";\n } else {\n message = \"Could not buy any items\";\n }\n userFacade.assignBought(user, bought);\n user.getCart().removeAll(bought);\n cart.removeAll(bought);\n userFacade.setCartToUser(user.getUsername(), cart);\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Gnomes\", message);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n }", "@Test\n public void testMarketOrder() throws InterruptedException {\n setUp();\n testMatchingEngine.start();\n\n NewOrder nosB1 = createLimitOrder(\"BUY1\", Side.BUY, 100, 100.1, System.currentTimeMillis());\n clientSession.sendNewOrder(nosB1);\n NewOrder nosB2 = createLimitOrder(\"BUY2\", Side.BUY, 200, 99.99, System.currentTimeMillis());\n clientSession.sendNewOrder(nosB2);\n NewOrder nosB3 = createLimitOrder(\"BUY3\", Side.BUY, 300, 99.79, System.currentTimeMillis());\n clientSession.sendNewOrder(nosB3);\n\n // Sell Order with Qty=150 and Market Order\n NewOrder nosS1 = createMarketOrder(\"SELL1\", Side.SELL, 700, System.currentTimeMillis());\n clientSession.sendNewOrder(nosS1);\n\n List<Event> msg = clientSession.getMessagesInQueue();\n assertEquals(7, msg.size());\n\n Trade t = ( Trade) msg.get(0);\n assertEquals( t.getLastTradedPrice().value() , new Price(100.1).value() );\n assertEquals( t.getLastTradedQty() , 100 );\n t = ( Trade) msg.get(1);\n assertEquals( t.getLastTradedPrice().value() , new Price(100.1).value() );\n assertEquals( t.getLastTradedQty() , 100 );\n t = ( Trade) msg.get(2);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.99).value() );\n assertEquals( t.getLastTradedQty() , 200 );\n t = ( Trade) msg.get(3);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.99).value() );\n assertEquals( t.getLastTradedQty() , 200 );\n t = ( Trade) msg.get(4);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.79).value() );\n assertEquals( t.getLastTradedQty() , 300 );\n t = ( Trade) msg.get(5);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.79).value() );\n assertEquals( t.getLastTradedQty() , 300 );\n Canceled t1 = ( Canceled) msg.get(6);\n assertEquals( t1.getCanceledQty() , 100 );\n }", "public int getAmountBought() {\n //System.out.println(clientName + \" has bought \" + amountBought + \" shares of \" + companyName);\n return amountBought;\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\tRandom randNum = new Random();\r\n\t\tInteger buffer[] = new Integer[BUFFER_SIZE];\r\n\t\t\r\n\t\t// Producer adds to the buffer and increments until it hits the limit\r\n\t\tThread producer = new Thread() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tif (currAmount < BUFFER_SIZE -1) {\r\n\t\t\t\t\t\tbuffer[currAmount] = randNum.nextInt(100);\r\n\t\t\t\t\t\tSystem.out.println(\"Added 1 (\" + buffer[currAmount] + \") to the stock\");\r\n\t\t\t\t\t\tcurrAmount++;\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Stock is full, can't produce more\");\r\n\t\t\t\t\t\t\tThread.sleep(1);\r\n\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\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}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t};\r\n\t\t// Consumer will consumer from the buffer until it is empty\r\n\t\tThread consumer = new Thread() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tif (currAmount > 0) {\r\n\t\t\t\t\t\tbuffer[currAmount] = randNum.nextInt(100);\r\n\t\t\t\t\t\tSystem.out.println(\"consumer took 1 (\" + buffer[currAmount] + \") from the stock\");\r\n\t\t\t\t\t\tcurrAmount--;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Stock is empty, can't consume anymore\");\r\n\t\t\t\t\t\t\tThread.sleep(1);\r\n\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\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}\r\n\t\t}\r\n\t\t};\r\n\t\t\r\n\t\tproducer.start();\r\n\t\tconsumer.start();\r\n\r\n\t}", "public List<Integer> askPlayerCardsToUse();", "@Override\n public void run() {\n while(true){\n if(ticket>0){\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n System.out.println(Thread.currentThread().getName()+\"卖票--->\"+(this.ticket--));\n }else{\n break;\n }\n }\n }", "private void botTrading(){\n if(game.isCardPositive(game.getHighestSharePriceStock())){\n int numShares = player.getFunds()/(game.getHighestSharePriceStock().getSharePrice()+3);\n player.getShares().set(game.getIndex(game.getHighestSharePriceStock()), player.getShares().get(game.getIndex(game.getHighestSharePriceStock())) + numShares);\n player.setFunds(-numShares*(game.getHighestSharePriceStock().getSharePrice()+3));\n }\n }", "void feed (int amount);", "public void handleBuyEggCommand(){\n if(Aquarium.money >= EGGPRICE) {\n Aquarium.money -= EGGPRICE;\n Aquarium.egg++;\n }\n }", "@Test\n public void buy() {\n System.out.println(client.purchase(1, 0, 1));\n }", "public void surrender() {\n playerCash += playerBet / 2;\n\n //Play dealer's turn\n dealerTurn();\n\n //End the game and change the views\n restartGame();\n }", "public void buyItem(Player player, int idz) {\r\n\t\ttry{\r\n\t\tItemDefinitions def = ItemDefinitions.getItemDefinitions(idz);\r\n\t\tif (def == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(!canExchange(idz) || EconomyPrices.getPrice(def.id) <= 5) {\r\n\t\t\r\n\t\t\tplayer.sendMessage(name(idz) + \" are not exchangeable~ or has not been added\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tsendPriceConfigs(player, idz);\r\n\t\tset(player, idz, EconomyPrices.getPrice(def.id), 1);\r\n\r\n\t\t}catch (Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void getTradeParam(int select){\n String buysell;if (select==1){buysell = \"buy\";}else{buysell = \"sell\";}\n out.println(\"\\r\\nEnter stock and number of shares you wish to \" + buysell + \" (e.g. E5). Enter 'X' to exit.\" +\n \"\\r\\n£3 transaction charge for purchases\");\n String tradeInput = in.nextLine();\n if(player.getTradesLeft() == 0){out.println(\"No more trade actions left\\r\\n\");command();}\n if(tradeInput.toUpperCase().equals(\"X\")){tradeCommand();}\n int numShares = Integer.parseInt(tradeInput.trim().substring(1));\n switch(tradeInput.toUpperCase().charAt(0)){\n case 'A': if(select==1){commitBuy(game.apple, numShares);}\n else{commitSell(game.apple, numShares);}\n break;\n case 'B': if(select==1){commitBuy(game.bp, numShares);}\n else{commitSell(game.bp, numShares);}\n break;\n case 'C': if(select==1){commitBuy(game.cisco, numShares);}\n else{commitSell(game.cisco, numShares);}\n break;\n case 'D': if(select==1){commitBuy(game.dell, numShares);}\n else{commitSell(game.dell, numShares);}\n break;\n case 'E': if(select==1){commitBuy(game.ericsson, numShares);}\n else{commitSell(game.ericsson, numShares);}\n break;\n default:\n out.println(\"Invalid input\");\n command();\n break;\n }\n }", "public synchronized void consume(){\n\t\tif(num==0){\n\t\t\ttry {\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tnum--;\n\t\tSystem.out.println(\"Consume 1, now we left \"+num+\" products\");\n\t\tnotify();\n\t}", "public Integer collectAmountAndGiveItToMe() {\n\t\t\n\t\t//void will not return anything\n\t\tSystem.out.println(\"Daddy collected rupee is\" + collectedAmount+\" and Sent it to you\");\n\t\treturn collectedAmount;\n\t\t\n\t}", "public int receiveMoney(int amount) {\r\n\t\tmoney = money + amount;\r\n\t\treturn money;\r\n\t}", "public void setUpdateTickets (int updateTickets)\n {\n this.unsoldTickets=this.unsoldTickets + updateTickets; \n }", "public void sendVoteRequests() {\n for(int i = 1; i <= mConfig.getNumServers(); i++) {\n this.remoteRequestVote(i, mConfig.getCurrentTerm(), mID, mLog.getLastIndex(), mLog.getLastTerm());\n }\n //Initiate count vote timer\n voteCountTimer = scheduleTimer((long) 5, 2);\n }", "@Override\n\t\t\tpublic void action() {\n\t\t\t\tMessageTemplate cfpTemplate = MessageTemplate.MatchPerformative(ACLMessage.CFP);\n\t\t\t\tMessageTemplate informTemplate = MessageTemplate.MatchPerformative(ACLMessage.INFORM);\n\t\t\t\tMessageTemplate messageTemplate = MessageTemplate.or(cfpTemplate, informTemplate);\n\t\t\t\tACLMessage receivedMessage = myAgent.receive(messageTemplate);\n\t\t\t\t\n\t\t\t\tif (receivedMessage != null) {\n\t\t\t\t\thasReceivedMessage = true;\n\t\t\t\t\t\n\t\t\t\t\tif (receivedMessage.getPerformative() == ACLMessage.CFP) {\n\t\t\t\t\t\tdouble price = Double.parseDouble(receivedMessage.getContent());\n\t\t\t\t\t\tSystem.out.println(\"Buyer [\" + getAID().getLocalName() + \"] received \"\n\t\t\t\t\t\t\t\t+ \"CFP with price \" + Double.toString(price));\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Value in range; send proposal\n\t\t\t\t\t\tif (price <= priceToBuy) {\n\t\t\t\t\t\t\tACLMessage proposal = new ACLMessage(ACLMessage.PROPOSE);\n\t\t\t\t\t\t\tproposal.addReceiver(receivedMessage.getSender());\n\t\t\t\t\t\t\tproposal.setProtocol(receivedMessage.getProtocol());\n\t\t\t\t\t\t\tmyAgent.send(proposal);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttransitionStatus = sendProposal;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Price too high; refuse and wait for new CFP\n\t\t\t\t\t\t\tACLMessage refusal = new ACLMessage(ACLMessage.REFUSE);\n\t\t\t\t\t\t\trefusal.addReceiver(receivedMessage.getSender());\n\t\t\t\t\t\t\trefusal.setProtocol(receivedMessage.getProtocol());\n\t\t\t\t\t\t\tmyAgent.send(refusal);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttransitionStatus = highPrice;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (receivedMessage.getPerformative() == ACLMessage.INFORM) {\n\t\t\t\t\t\ttransitionStatus = noBuyers;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tblock();\n\t\t\t\t}\n\t\t\t}", "@Override\n public int howManyCoins() {\n return 7;\n }", "public void collectWinnings() {\n\t\tif (hand.checkBlackjack()) {\n\t\t\tdouble win = bet * 1.5;\n\t\t\ttotalMoney += (win + bet);\n\t\t} else {\n\t\t\ttotalMoney += (bet + bet);\n\t\t}\n\t}", "@Override\n public void receiveMessage(AgentID sender, Action action)\n {\n super.receiveMessage(sender, action);\n\n // update the value of Care_Value、Reluctance、Agreement_Value every ten rounds\n if (getTimeLine() instanceof DiscreteTimeline) {\n DiscreteTimeline discreteTimeline = (DiscreteTimeline)getTimeLine();\n int cRound = discreteTimeline.getRound();\n if (cRound % 10 == 0) {\n\n // care_value increase 4% every ten rounds\n Care_Value = Care_Value * (1 + 0.04);\n if (Care_Value > 0.72) {\n Care_Value = 0.72;\n }\n\n // reluctance decrease 4% every ten rounds\n Reluctance = Reluctance * (1 - 0.06);\n if (timeline.getTime() < 7 && Reluctance < 0.9) {\n Reluctance = 0.9;\n }\n\n List<BidDetails> allBids = new ArrayList<>(feasibleBids);\n // find a common set for all opponent\n Set<BidDetails> commonBids = opponentModelInterface.queryCommonBestBidsSet(allBids, Number_of_Bids);\n List<BidDetails> commonBidsList = new ArrayList<>(commonBids);\n // sort the common set\n Collections.sort(commonBidsList);\n // AV = Utility(BidBest) * Reluctance\n Agreement_Value = (commonBidsList.get(commonBidsList.size() - 1).getMyUndiscountedUtil()) * Reluctance;\n if (Agreement_Value > 0.85) {\n Agreement_Value = 0.85;\n }\n\n if (Agreement_Value < Minimum_Offer_Threshold * (3 - Math.pow(2, timeline.getTime()))) {\n Agreement_Value = Minimum_Offer_Threshold * (3 - Math.pow(2, timeline.getTime()));\n }\n }\n }\n\n if (action instanceof Inform) {\n // receive message first time, update the number of opponent\n opponentModelInterface = new OpponentModelManager(getNumberOfParties());\n }else if (action instanceof Offer) {\n // save the last offer\n lastOffer = ((Offer) action).getBid();\n // update opponent model by new bid from opponent\n opponentModelInterface.handleBidFromSender(sender.toString(), lastOffer, getDomain());\n }\n }", "public void buyCargoUpgrades()\n {\n if(play_state.getMoney() >= cargo_upgrade_cost) {\n play_state.setMoney(play_state.getMoney() - cargo_upgrade_cost);\n cargo_upgrade_cost += 100;\n play_state.getDriller().addCapacity(5);\n }\n }", "static void addItems(int needed) {\r\n List<ConnectionReqs> reqsList = new ArrayList<>();\r\n reqsList.add(AuctionServer.reqs);\r\n Socket dBSocket = null;\r\n while(needed > 0) {\r\n Item item = null;\r\n Random random = new Random();\r\n int randInt = random.nextInt(200);\r\n DBMessage dBMessage = null;\r\n try {\r\n dBSocket = new Socket(\"localHost\", 6002);\r\n dBOut = new ObjectOutputStream(dBSocket.getOutputStream());\r\n dBOut.flush();\r\n dBIn = new ObjectInputStream(dBSocket.getInputStream());\r\n dBMessage = new DBMessage.Builder()\r\n .command(DBMessage.Command.GET)\r\n .table(DBMessage.Table.ITEM)\r\n .accountId(randInt)\r\n .build();\r\n dBOut.writeObject(dBMessage);\r\n System.out.println(\"listening...\");\r\n DBMessage response = (DBMessage) dBIn.readObject();\r\n item = (Item) response.getPayload();\r\n System.out.println(item.toString());\r\n } catch (IOException | ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n if(!auctionHistory.contains(item)) {\r\n System.out.println(dBMessage.toString());\r\n auctionList.add(item);\r\n auctionHistory.add(item);\r\n needed--;\r\n }\r\n }\r\n }", "@Override\r\n\t@SuppressWarnings(\"deprecation\")\r\n\tpublic void raiseEvent(Event e) {\r\n\t\tPlayer p = ((PlayerInteractEvent) e).getPlayer();\r\n\t\tPlayerStats stats = plugin.getStats(p);\r\n\t\tif (stats.subtractmoney(cost)) {\r\n\t\t\tif (!items.isEmpty()) {\r\n\t\t\t\tLinkedList<ItemStack> givenItems = new LinkedList<ItemStack>();\r\n\t\t\t\tfor (ItemStack item : items.getItemStacks()) {\r\n\t\t\t\t\tgivenItems.add(item);\r\n\t\t\t\t\tHashMap<Integer, ItemStack> failed = p.getInventory().addItem(item);\r\n\r\n\t\t\t\t\tif (failed != null && failed.size() > 0) {\r\n\t\t\t\t\t\t// the inventory may be full\r\n\t\t\t\t\t\tTribu.messagePlayer(p, (plugin.getLocale(\"Message.UnableToGiveYouThatItem\")),ChatColor.RED);\r\n\t\t\t\t\t\tstats.addMoney(cost);\r\n\t\t\t\t\t\tfor (ItemStack i : givenItems)\r\n\t\t\t\t\t\t\tp.getInventory().remove(i);\r\n\t\t\t\t\t\tgivenItems = null;\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\tp.updateInventory();\r\n\t\t\t\t// Alright\r\n\t\t\t\tTribu.messagePlayer(p,String.format(plugin.getLocale(\"Message.PurchaseSuccessfulMoney\"), String.valueOf(stats.getMoney())),ChatColor.GREEN);\r\n\t\t\t} else {\r\n\t\t\t\tTribu.messagePlayer(p,plugin.getLocale(\"Message.UnknownItem\"),ChatColor.RED);\r\n\t\t\t\tstats.addMoney(cost);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tTribu.messagePlayer(p,plugin.getLocale(\"Message.YouDontHaveEnoughMoney\"),ChatColor.RED);\r\n\t\t}\r\n\r\n\t}", "public void handleNewAuctionRound(int roundNumber, int amount, long price);", "public void addAndShift(){\n Requests.remove(0);\r\n float targetPrice;\r\n\r\n int sORb = rng.nextInt(2);\r\n if(sORb==0){\r\n targetPrice = (float)(((rng.nextGaussian())*sDev) + meanSellPrice + (sellVolume*sDev*0.03));\r\n if(targetPrice<0){\r\n targetPrice = 0;\r\n }\r\n int ass = ((rng.nextInt(4)+1)); \r\n int aType = rng.nextInt(3); \r\n switch(aType){\r\n case 0: Requests.add(new SellRequest(\"Pork Bellies\", (targetPrice*1.28f), (ass*40000)));\r\n break;\r\n case 1: Requests.add(new SellRequest(\"Frozen Orange Juice Concentrate\", (targetPrice*1.57f), (ass*15000)));\r\n break;\r\n case 2: Requests.add(new SellRequest(\"Soybeans\", (targetPrice*14.05f), (ass*5000)));\r\n }\r\n }\r\n if(sORb==1){\r\n targetPrice = (float)(((rng.nextGaussian())*sDev) + meanBuyPrice - (buyVolume*sDev*0.03));\r\n if(targetPrice<0){\r\n targetPrice = 0;\r\n }\r\n int ass = ((rng.nextInt(4)+1));\r\n int aType = rng.nextInt(3); \r\n switch(aType){\r\n case 0: Requests.add(new BuyRequest(\"Pork Bellies\", (targetPrice*1.28f), (40000*ass)));\r\n break;\r\n case 1: Requests.add(new BuyRequest(\"Frozen Orange Juice Concentrate\", (targetPrice*1.57f), (ass*15000)));\r\n break;\r\n case 2: Requests.add(new BuyRequest(\"Soybeans\", (targetPrice*14.05f), (ass*5000)));\r\n }\r\n }\r\n if(sellVolume > 0){\r\n sellVolume = sellVolume -1;\r\n }\r\n if(buyVolume > 0){\r\n buyVolume = buyVolume -1;\r\n }\r\n printRequest(Requests.size()-1);\r\n lowestSellPrice();\r\n highestBuyPrice();\r\n }", "public int getReceivedBitcoins()\r\n {\r\n return this.receivedBitcoins;\r\n }", "private void communityChest(Player currentPlayer){\n Random rand = new Random();\n int randomNum = rand.nextInt((3 - 1) + 1) + 1;\n int nextPlayer;\n if(m_currentTurn >= m_numPlayers){\n nextPlayer = 0;\n } else {\n nextPlayer = m_currentTurn+1;\n }\n\n if(randomNum == 1){\n convertTextToSpeech(\"Your new business takes off, collect 200\");\n if(m_manageFunds) {\n Log.d(\"chance add 200\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(200);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 200\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n }\n }\n if(randomNum == 2){\n convertTextToSpeech(\"Your friend hires your villa for a week, \" +\n \"collect 100 off the next player\");\n if(m_manageFunds) {\n Log.d(\"chance add 100\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(100);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 100\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n\n Log.d(\"chance subtract 100\", players.get(nextPlayer).getName() +\n String.valueOf(players.get(nextPlayer).getMoney()));\n players.get(nextPlayer).subtractMoney(100);\n Log.d(\"chance subtract 100\", players.get(nextPlayer).getName() +\n String.valueOf(players.get(nextPlayer).getMoney()));\n }\n }\n if(randomNum == 3){\n convertTextToSpeech(\"You receive a tax rebate, collect 300\");\n if(m_manageFunds) {\n Log.d(\"chance add 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(300);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n }\n }\n }", "public void updateReactionsMarketAndTreasures() {\r\n\t\t((TextChannel) gameChannel).clearReactionsById(marketAndTsID).queue();\r\n\t\tif (currentPlayer.getGold() >= 7) {\r\n\t\t\tif (marketItemCount[0] > 0) {\r\n\t\t\t\tgameChannel.addReactionById(marketAndTsID, GlobalVars.emojis.get(\"key\")).queue();\r\n\t\t\t}\r\n\t\t\tif (marketItemCount[1] > 0) {\r\n\t\t\t\tgameChannel.addReactionById(marketAndTsID, GlobalVars.emojis.get(\"briefcase\")).queue();\r\n\t\t\t}\r\n\t\t\tif (marketItemCount[2] > 0) {\r\n\t\t\t\tgameChannel.addReactionById(marketAndTsID, GlobalVars.emojis.get(\"crown\")).queue();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void sendPurchaseHit() {\n\n // In production code, would need to iterate\n // over all the products in the cart\n // Here we assume that the currently selected dinner\n // is the only thing in the cart\n Product product = new Product()\n .setName(\"dinner\")\n .setPrice(5)\n .setVariant(thisDinner)\n .setId(thisDinnerId)\n .setQuantity(1);\n\n // Get a unique transaction ID\n String tID = Utility.getUniqueTransactionId(thisDinnerId);\n ProductAction productAction =\n new ProductAction(ProductAction.ACTION_PURCHASE)\n .setTransactionId(tID);\n\n Tracker tracker = ((MyApplication) getApplication()).getTracker();\n\n tracker.send(new HitBuilders.EventBuilder()\n .setCategory(\"Shopping steps\")\n .setAction(\"Purchase\")\n .setLabel(thisDinner)\n .addProduct(product)\n .setProductAction(productAction)\n .build());\n }", "@Override\n\tpublic void sendBuyRequest() {\n\t\ttry {\n\t\t\tString result = \"\";\n\t\t\tif (this.servType.equals(SERVICE_TYPE_SOAP)){\n\t\t\t\tresult = server.checkOutCart(clientId);\n\t\t\t} else {\n\t\t\t\tWebResource checkOutService = service.path(URI_CHECKOUT).path(String.valueOf(clientId));\n\t\t\t\tresult = checkOutService.accept(MediaType.TEXT_XML).get(String.class);\n\t\t\t}\n\t\t\n\t\t\tStatusMessageObject status = XMLParser.parseStatusMessage(result);\n\t\t\tif (status.getStatusCode() == 1){\n\t\t\t\tgui.setupCart(null);\t\n\t\t\t}\n\t\t\tsendItemListRequest();\n\t\t\tgui.setStatus(status.getMessage());\n\t\t\tsetOKDialog(\"Check out confirmation!\", status.getMessage());\n\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClientHandlerException ex){\n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The RESTFul server is not responding!!\");\n\t\t} catch (WebServiceException ex){\n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The SOAP-RPC server is not responding!!\");\n\t\t}\n\t}", "private void tradeCommand(){\n out.println(\"\\r\\nShares you own:\" +\n \"\\r\\nApple: \" + player.getShares().get(0) +\n \"\\r\\nBP: \" + player.getShares().get(1) +\n \"\\r\\nCisco: \" + player.getShares().get(2) +\n \"\\r\\nDell: \" + player.getShares().get(3) +\n \"\\r\\nEricsson: \" + player.getShares().get(4) +\n \"\\r\\n\\r\\nShare prices: Apple-\" + game.apple.getSharePrice() +\n \", BP-\" + game.bp.getSharePrice() +\n \", Cisco-\" + game.cisco.getSharePrice() +\n \", Dell-\" + game.dell.getSharePrice() +\n \", Ericsson-\" + game.ericsson.getSharePrice() +\n \"\\r\\n\\r\\nFunds: £\" + player.getFunds() + \", Current value of shares: £\" + getTotalShareValue(player) + \"\\r\\n\"\n );\n\n out.println(\"Would you like to buy(b) or sell(s) shares? Enter 'X' to exit.\");\n String bsInput = in.nextLine().trim();\n if (bsInput.toUpperCase().equals(\"B\")){\n getTradeParam(1); //buy\n }else if (bsInput.toUpperCase().equals(\"S\")){\n getTradeParam(0); //sell\n }else if (bsInput.toUpperCase().equals(\"X\")){\n command();\n }else{\n out.println(\"Invalid input\");\n tradeCommand();\n }\n }", "private Ticket givenTicketInOrderedBilled() {\n CreateTicketVO createTicketVO = CreateTicketVO.newBuilder()\n .ticketIssuingType(TicketIssuingType.ONE_TICKET_FOR_ALL_PRODUCTS)\n .products(this.products)\n .paymentType(PaymentType.NO_PAYMENT)\n .account(this.account).build();\n TicketOrder ticketOrder = this.ticketFactory.createTickets(createTicketVO);\n Ticket ticket = ticketOrder.getBillingTicket();\n // [1,0] -> [8,0]\n ticket.nextStateOk();\n // [8,0] -> [8,1]\n ticket.nextStateOk();\n // [8,1] -> [8,4]\n ticket.nextStateOk();\n // [8,4] -> [8,2]\n ticket.nextStateOk();\n return ticket;\n }", "public void addMoneytoPurse(Player player, double winnings) {\n player.addMoneyToPurse(winnings);\n }", "public void sell() {\n for (Company x : _market.getCompanies()) {\n if (x.getRisk() > _confidence || x.numLeft() < 3 || x.getRisk() < _confidence - 15){\n if (_stocks.get(x) == 1) {\n _stocks.remove(x);\n } else {\n _stocks.put(x, _stocks.get(x) - 1);\n }\n _money += x.getPrice();\n x.gain();\n break;\n } else {\n _happy = true;\n }\n }\n }", "@Override\r\n\t\t\tpublic void buy(String security, double price, int volume) {\n\t\t\t\tSystem.out.println(\"buy is\"+price+volume);\r\n\t\t\t\t\r\n\t\t\t}", "public static int size_receivets() {\n return (32 / 8);\n }", "@Override \n\tpublic TradeAction tick(double price) {\n\t\tma10before=average(priceQ10);\n\t\t\n\t\tif (priceQ10.size()<10)\n\t\t{\n\t\t\tpriceQ10.offer(price);\n\t\t}\n\t\tif(priceQ10.size()==10)\n\t\t{\n\t\t\tpriceQ10.poll();\n\t\t\tpriceQ10.offer(price);\t\t\n\t\t}\n\t\t\n\t\t ma10after=average(priceQ10);\n\t\t \n\t\t// 60 days moving average\n\t\tma60before=average(priceQ60);\n\t\tif (priceQ60.size()<60)\n\t\t{\n\t\t\tpriceQ60.offer(price);\n\t\t}\n\t\tif(priceQ60.size()==60)\n\t\t{\n\t\t\tpriceQ60.poll();\n\t\t\tpriceQ60.offer(price);\t\t\n\t\t}\n\t\tma60after=average(priceQ60);\n\t\t\t\n\t\t//buy when its 10 day moving average goes above the 60 day moving average\n\t\tif((ma10before < ma60before) & (ma10after > ma60after))\n\t\t{\n\t\t\tprofit = profit - price;\n\t\t\t//System.out.println(\"buy\");\n\t\t\t//System.out.println(\"profit is\");\n\t\t\t//System.out.println(profit);\n\t\t\tif(mark==1){\n\t\t\t\tmark=-1;\n\t\t\t\treturn TradeAction.BUY;\n\t\t\t}\n\t\t\telse \n\t\t\t\treturn TradeAction.DO_NOTHING;\n\t\t\t\n\t\t}\n\t\t//buy when its 10 day moving average goes below the 60 day moving average\n\t\tif((ma10before > ma60before) & (ma10after < ma60after))\n\t\t{\n\t\t\tprofit = profit + price;\n\t\t\t//System.out.println(\"sell\");\n\t\t\t//System.out.println(\"profit is\");\n\t\t\t//System.out.println(profit);\n\t\t\tif(mark==-1){\n\t\t\t\tmark=1;\n\t\t\t\treturn TradeAction.SELL;\n\t\t\t}\n\t\t\telse \n\t\t\t\treturn TradeAction.DO_NOTHING;\n\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn TradeAction.DO_NOTHING;\t\t\t\n\t\t}\n\n\t}", "public void addJackpot(int amount){\n this.amount += amount;\n }", "public TransactionResponse sell() {\r\n \t\ttry {\r\n \t\t\tTransactionResponse response = new TransactionResponse(hp);\r\n \t\t\tCalculation calc = hc.getCalculation();\r\n \t\t\tAccount acc = hc.getAccount();\r\n \t\t\tLanguageFile L = hc.getLanguageFile();\r\n \t\t\tLog log = hc.getLog();\r\n \t\t\tNotification not = hc.getNotify();\r\n \t\t\tInfoSignHandler isign = hc.getInfoSignHandler();\r\n \t\t\tString playerecon = hp.getEconomy();\r\n \t\t\tint id = hyperObject.getId();\r\n \t\t\tint data = hyperObject.getData();\r\n \t\t\tString name = hyperObject.getName();\r\n \t\t\tif (giveInventory == null) {\r\n \t\t\t\tgiveInventory = hp.getPlayer().getInventory();\r\n \t\t\t}\r\n \t\t\tif (amount > 0) {\r\n \t\t\t\tif (id >= 0) {\r\n \t\t\t\t\tint totalitems = im.countItems(id, data, giveInventory);\r\n \t\t\t\t\tif (totalitems < amount) {\r\n \t\t\t\t\t\tboolean sellRemaining = hc.getYaml().getConfig().getBoolean(\"config.sell-remaining-if-less-than-requested-amount\");\r\n \t\t\t\t\t\tif (sellRemaining) {\r\n \t\t\t\t\t\t\tamount = totalitems;\r\n \t\t\t\t\t\t} else {\t\r\n \t\t\t\t\t\t\tresponse.addFailed(L.f(L.get(\"YOU_DONT_HAVE_ENOUGH\"), name), hyperObject);\r\n \t\t\t\t\t\t\treturn response;\t\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t\tif (amount > 0) {\r\n \t\t\t\t\t\tdouble price = hyperObject.getValue(amount, hp);\r\n \t\t\t\t\t\tBoolean toomuch = false;\r\n \t\t\t\t\t\tif (price == 3235624645000.7) {\r\n \t\t\t\t\t\t\ttoomuch = true;\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (!toomuch) {\r\n \t\t\t\t\t\t\tint maxi = hyperObject.getMaxInitial();\r\n \t\t\t\t\t\t\tboolean isstatic = false;\r\n \t\t\t\t\t\t\tboolean isinitial = false;\r\n \t\t\t\t\t\t\tisinitial = Boolean.parseBoolean(hyperObject.getInitiation());\r\n \t\t\t\t\t\t\tisstatic = Boolean.parseBoolean(hyperObject.getIsstatic());\r\n \t\t\t\t\t\t\tif ((amount > maxi) && !isstatic && isinitial) {\r\n \t\t\t\t\t\t\t\tamount = maxi;\r\n \t\t\t\t\t\t\t\tprice = hyperObject.getValue(amount, hp);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tboolean sunlimited = hc.getYaml().getConfig().getBoolean(\"config.shop-has-unlimited-money\");\r\n \t\t\t\t\t\t\tif (acc.checkshopBalance(price) || sunlimited) {\r\n \t\t\t\t\t\t\t\tif (maxi == 0) {\r\n \t\t\t\t\t\t\t\t\tprice = hyperObject.getValue(amount, hp);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tim.removeItems(id, data, amount, giveInventory);\r\n \t\t\t\t\t\t\t\tdouble shopstock = 0;\r\n \t\t\t\t\t\t\t\tshopstock = hyperObject.getStock();\r\n \t\t\t\t\t\t\t\tif (!Boolean.parseBoolean(hyperObject.getIsstatic()) || !hc.getConfig().getBoolean(\"config.unlimited-stock-for-static-items\")) {\r\n \t\t\t\t\t\t\t\t\thyperObject.setStock(shopstock + amount);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tint maxi2 = hyperObject.getMaxInitial();\r\n \t\t\t\t\t\t\t\tif (maxi2 == 0) {\r\n \t\t\t\t\t\t\t\t\thyperObject.setInitiation(\"false\");\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tdouble salestax = hp.getSalesTax(price);\r\n \t\t\t\t\t\t\t\tacc.deposit(price - salestax, hp.getPlayer());\r\n \t\t\t\t\t\t\t\tacc.withdrawShop(price - salestax);\r\n \t\t\t\t\t\t\t\tif (sunlimited) {\r\n \t\t\t\t\t\t\t\t\tString globalaccount = hc.getYaml().getConfig().getString(\"config.global-shop-account\");\r\n \t\t\t\t\t\t\t\t\tacc.setBalance(0, globalaccount);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t\tresponse.addSuccess(L.f(L.get(\"SELL_MESSAGE\"), amount, calc.twoDecimals(price), name, calc.twoDecimals(salestax)), price - salestax, hyperObject);\r\n \t\t\t\t\t\t\t\tresponse.setSuccessful();\r\n \t\t\t\t\t\t\t\tString type = \"dynamic\";\r\n \t\t\t\t\t\t\t\tif (Boolean.parseBoolean(hyperObject.getInitiation())) {\r\n \t\t\t\t\t\t\t\t\ttype = \"initial\";\r\n \t\t\t\t\t\t\t\t} else if (Boolean.parseBoolean(hyperObject.getIsstatic())) {\r\n \t\t\t\t\t\t\t\t\ttype = \"static\";\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tlog.writeSQLLog(hp.getName(), \"sale\", name, (double) amount, calc.twoDecimals(price - salestax), calc.twoDecimals(salestax), playerecon, type);\r\n \t\t\t\t\t\t\t\tisign.updateSigns();\r\n \t\t\t\t\t\t\t\tnot.setNotify(name, null, playerecon);\r\n \t\t\t\t\t\t\t\tnot.sendNotification();\r\n \t\t\t\t\t\t\t\treturn response;\r\n \t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\tresponse.addFailed(L.get(\"SHOP_NOT_ENOUGH_MONEY\"), hyperObject);\r\n \t\t\t\t\t\t\t\treturn response;\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\tresponse.addFailed(L.f(L.get(\"CURRENTLY_CANT_SELL_MORE_THAN\"), hyperObject.getStock(), name), hyperObject);\r\n \t\t\t\t\t\t\treturn response;\t\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tresponse.addFailed(L.f(L.get(\"YOU_DONT_HAVE_ENOUGH\"), name), hyperObject);\r\n \t\t\t\t\t\treturn response;\t\r\n \t\t\t\t\t}\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresponse.addFailed(L.f(L.get(\"CANNOT_BE_SOLD_WITH\"), name), hyperObject);\r\n \t\t\t\t\treturn response;\t\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\tresponse.addFailed(L.f(L.get(\"CANT_SELL_LESS_THAN_ONE\"), name), hyperObject);\r\n \t\t\t\treturn response;\t\r\n \t\t\t}\r\n \t\t} catch (Exception e) {\r\n \t\t\tString info = \"Transaction sell() passed values name='\" + hyperObject.getName() + \"', player='\" + hp.getName() + \"', id='\" + hyperObject.getId() + \"', data='\" + hyperObject.getData() + \"', amount='\" + amount + \"'\";\r\n \t\t\tnew HyperError(e, info);\r\n \t\t\treturn new TransactionResponse(hp);\r\n \t\t}\r\n \t}", "public void setNoOfTicket(String noOfTickets) {\n \r\n }", "@Override\n\tpublic double sendbid() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic double sendbid() {\n\t\treturn 0;\n\t}", "private void checkAmount() throws IOException {\n //System.out.println(\"The total amount in the cash machine is: \" + amountOfCash);\n for (int i : typeOfCash.keySet()) {\n Integer r = typeOfCash.get(i);\n if (r < 20) {\n sendAlert(i);\n JOptionPane.showMessageDialog(null, \"$\" + i + \"bills are out of stock\");\n }\n }\n }", "int getSellQuantity();", "private void askForNumberOfRequests() {\n\t\tconnectToServer();\n\t\tout.println(\"How many requests have you handled ?\");\n\t\tout.flush();\n\t\tint count = 0;\n\t\ttry {\n\t\t\tcount = Integer.parseInt(in.readLine());\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"CLIENT: Cannot receive num requests from server\");\n\t\t}\n\t\tSystem.out.println(\"CLIENT: The number of requests are \" + count);\n\t\tdisconnectFromServer();\n\t}", "public void cashReceipt(int amount){\r\n System.out.println(\"Take the receipt\");\r\n }", "public void sendRouletteBet() {\n\t\tif (rouletteExecutor.getAposta() == null)\n\t\t\tnew Dialeg().setWarningText(\"You must bet!\");\n\t\telse {\n\t\t\tif (bool.compareAndSet(true, false)) {\n\t\t\t\ttry {\n\t\t\t\t\tmanager.getServer().enviarTrama(new Betting(rouletteExecutor.getAposta()));\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t//// e.printStackTrace();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnew Dialeg().setWarningText(\"You can't bet to the same number\");\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void run() {\n int slotsUsed = 0;\n int potentialBananas = 0;\n RSItem[] items = Inventory.getAll();\n for (RSItem item : items) {\n // If this isn't a bone count it\n if (item.getID() < 6904 || item.getID() > 6907) {\n slotsUsed++;\n }\n else {\n // Item id bone amount\n // 6904 1\n // 6905 2\n // 6906 3\n // 6907 4\n potentialBananas += 1 + item.getID() - 6904;\n }\n }\n \n int slotsAvailable = 28 - slotsUsed;\n\n RSItem[] food = Inventory.find(1963);\n\n // If have bananas/peaches, deposit them, else collect bones\n if (food.length > 0) {\n // Heal and then deposit\n float eatHealth = m_settings.m_eatHealth * Skills.getActualLevel(SKILLS.HITPOINTS);\n float eatTo = m_settings.m_eatTo * Skills.getActualLevel(SKILLS.HITPOINTS);\n \n if (food.length > 0 && Skills.getCurrentLevel(SKILLS.HITPOINTS) < eatHealth) {\n // Eat\n while (food.length > 0 && Skills.getCurrentLevel(SKILLS.HITPOINTS) < eatTo) {\n food[0].click(\"Eat\");\n m_script.sleep(300, 600);\n food = Inventory.find(1963);\n }\n }\n else {\n // Deposit\n RSObject[] objs = Objects.findNearest(50, \"Food chute\");\n if (objs.length > 0) {\n while (!objs[0].isOnScreen()) {\n Walking.blindWalkTo(objs[0]);\n m_script.sleep(250);\n }\n objs[0].click(\"Deposit\");\n m_script.sleep(1200);\n }\n }\n }\n else {\n // If we have more than a full load of bananas worth of bones, cast bones to peaches\n if (potentialBananas >= slotsAvailable) {\n // Cast bones to peaches\n Magic.selectSpell(\"Bones to Bananas\");\n }\n else {\n // Collect bananas\n RSObject[] bonePiles = Objects.findNearest(10725, 10726, 10727, 10728);\n if (bonePiles.length > 0) {\n while (!bonePiles[0].isOnScreen()) {\n Walking.blindWalkTo(bonePiles[0]);\n m_script.sleep(250);\n }\n bonePiles[0].click(\"Grab\");\n m_script.sleep(150);\n }\n }\n }\n }", "public void buyhouse(int cost){\n\t\n}", "private void declareWinner(){\r\n System.out.println(\"All proposals received\");\r\n AID best = proposals.get(0).getSender();\r\n for(ACLMessage proposal: proposals){\r\n String time = proposal.getContent().replaceFirst(\"bid\\\\(\", \"\");\r\n time = time.replaceFirst(\" sec\\\\)\", \"\");\r\n String bestTimeString = \r\n proposal.getContent().\r\n replaceFirst(\"bid\\\\(\", \"\").\r\n replaceFirst(\" sec\\\\)\", \"\");\r\n int bestTime = Integer.parseInt(bestTimeString);\r\n int propTime = Integer.parseInt(time);\r\n if (bestTime > propTime) {\r\n best = proposal.getSender();\r\n }\r\n }\r\n sendMessage(best, \"\", ACLMessage.ACCEPT_PROPOSAL);\r\n Object[] ob = new Object[2];\r\n ob[0] = best;\r\n ob[1] = currentPartial;\r\n expectedReturn.add(ob);\r\n System.out.println(\"Accepting proposal from \" + best.getLocalName());\r\n for(ACLMessage proposal: proposals){\r\n if(!proposal.getSender().equals(best)){\r\n sendMessage(proposal.getSender(), \"\", ACLMessage.REJECT_PROPOSAL);\r\n }\r\n }\r\n proposals.clear();\r\n solvables.remove(0);\r\n if(!solvables.isEmpty()){\r\n \r\n auctionJob(solvables.get(0));\r\n }\r\n }", "void requestTicket(String customerName)\n {\n\ttc.customerName = customerName;\n\ttc.run(); // Sells ticket. Prints ticket to console.\n }", "public void collect(int amount){\n this.collectedItems += amount;\n }", "@Override\r\n\tpublic int requestCard (ArrayList<Card> cardsAlreadyRequested) {\n\t\treturn (int)(Math.random() * 13);\r\n\t}" ]
[ "0.6531402", "0.64278823", "0.62859696", "0.61311656", "0.59836775", "0.59481007", "0.5935428", "0.587925", "0.58773917", "0.5876984", "0.5859172", "0.5853468", "0.5831343", "0.5812724", "0.58119386", "0.57876635", "0.5783458", "0.57562995", "0.57029516", "0.56562924", "0.56381947", "0.5609528", "0.56007344", "0.559156", "0.5590579", "0.5590127", "0.5562941", "0.5555959", "0.55488545", "0.5533982", "0.5505011", "0.54842764", "0.5481715", "0.5463135", "0.5454279", "0.5445315", "0.5440104", "0.54391307", "0.5438339", "0.5436355", "0.54348916", "0.54305685", "0.5411693", "0.54019266", "0.53810984", "0.5375686", "0.5370547", "0.53701884", "0.5366883", "0.53597313", "0.53518754", "0.5347416", "0.53438276", "0.5338625", "0.5334364", "0.5313683", "0.5310866", "0.5300388", "0.52941424", "0.5288076", "0.52782875", "0.5277803", "0.5275981", "0.5269425", "0.52688617", "0.5268284", "0.5258578", "0.52459687", "0.52431846", "0.5235327", "0.52285624", "0.52269626", "0.5224959", "0.5221378", "0.5217049", "0.5216504", "0.5210186", "0.5196821", "0.51955014", "0.5192856", "0.5190547", "0.51903516", "0.5186086", "0.5180244", "0.51777345", "0.5171207", "0.516515", "0.51630604", "0.51630604", "0.51587737", "0.5150318", "0.5141243", "0.5135946", "0.5135714", "0.51312613", "0.5130897", "0.51302254", "0.5126336", "0.51262814", "0.5125516" ]
0.6996146
0
Save the lottery files.
public static void saveLotteryFiles() { FileUtility.deleteAllLines(TOTAL_TICKETS_FILE); FileUtility.deleteAllLines(LOTTERY_ENTRIES_FILE); FileUtility.addLineOnTxt(TOTAL_TICKETS_FILE, totalTicketsPurchased + ""); ArrayList<String> line = new ArrayList<String>(); for (int index = 0; index < LotteryDatabase.lotteryDatabase.size(); index++) { LotteryDatabase data = LotteryDatabase.lotteryDatabase.get(index); line.add(data.getPlayerName() + ServerConstants.TEXT_SEPERATOR + data.getTicketsPurchased()); } FileUtility.saveArrayContentsSilent(LOTTERY_ENTRIES_FILE, line); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new FileWriter(target));\n\t\t\twriter.setIndent(\" \");\n\t\t\twriter.beginArray();\n\t\t\tfor (Scoreboard scoreboard : scoreboards.values()) {\n\t\t\t\twriteScoreboard(writer, scoreboard);\n\t\t\t}\n\t\t\twriter.endArray();\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void saveInFile() {\n try {\n FileOutputStream fos = openFileOutput(FILENAME,\n Context.MODE_PRIVATE);//goes stream based on filename\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos)); //create buffer writer\n Gson gson = new Gson();\n gson.toJson(countbookList, out);//convert java object to json string & save in output\n out.flush();\n fos.close();\n } catch (FileNotFoundException e) {\n throw new RuntimeException();\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }", "private void saveInFile() {\n\t\tthis.deleteFile();\n\t\tfor (CounterModel obj : counterListModel.getCounterList()) {\n\t\t\ttry {\n\t\t\t\tGson gson = new Gson();\n\t\t\t\tif (obj.getCounterName().equals(counterModel.getCounterName())) {\n\t\t\t\t\tobj = counterModel;\n\t\t\t\t}\n\t\t\t\tString json = gson.toJson(obj) +'\\n';\n\t\t\t\tFileOutputStream fos = openFileOutput(FILENAME,\n\t\t\t\t\t\tContext.MODE_APPEND);\n\t\t\t\tfos.write(json.getBytes());\n\t\t\t\tfos.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private static void saveToFile(ArrayList<Favourite> allFav) {\n\t\t\n\t\tBufferedWriter writer=null;\n\t\t\n\t\ttry {\n\t\t\twriter=new BufferedWriter(new FileWriter(Constants.KEY_FAV_FILE));\n\t\t\tString save=\"\";\n\t\t\tfor(Favourite f:allFav) {\n\t\t\t\tsave+=fileFormat(f);\n\t\t\t}\n\t\t\twriter.write(save);\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\n\t\t}finally{\n\t\tif(writer!=null){\n\t\t\ttry{\n\t\t\t\twriter.close();\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\n\t\n}\n\n\t\t\n\t}", "private void writeToFile(){\n try(BufferedWriter br = new BufferedWriter(new FileWriter(filename))){\n for(Teme x:getAll())\n br.write(x.toString()+\"\\n\");\n br.close();\n }catch (IOException e){\n e.printStackTrace();\n }\n }", "public void tempSaveToFile() {\n try {\n ObjectOutputStream outputStream = new ObjectOutputStream(\n this.openFileOutput(MenuActivity2048.TEMP_SAVE_FILENAME, MODE_PRIVATE));\n outputStream.writeObject(boardManager);\n outputStream.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }", "private void writeToFile() {\n boolean flag = true;\n int expectedPacket = (lastPacket)? sequenceNo: Constants.WINDOW_SIZE;\n for (int i = 0; i < expectedPacket; i++) {\n if(!receivedPacketList.containsKey(i)) {\n flag = false;\n }\n }\n if (flag) {\n System.out.println(\"Time: \" + System.currentTimeMillis() + \"\\t\" + \"Write to file Possible\");\n try (BufferedOutputStream stream = new BufferedOutputStream(new FileOutputStream(fileSavePath, true))) {\n for (int i = 0; i < receivedPacketList.size(); i++) {\n //System.out.println(new String(receivedPacketList.get(i)));\n stream.write(receivedPacketList.get(i));\n }\n receivedPacketList.clear();\n stream.close();\n } catch (FileNotFoundException ex) {\n \n } catch (IOException ex) {\n \n }\n receivedPacketList.clear();\n expectedList.clear();\n }\n }", "protected void saveAllBuffers() {\r\n\r\n\t\tString save_dir = \"\";\r\n\t\t\r\n\t JFileChooser fileChooser = new JFileChooser(new File(System.getProperty(\"user.dir\")));\r\n\t fileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\r\n\t int state = fileChooser.showDialog(null, \"Select Directory\");\r\n if (state == JFileChooser.APPROVE_OPTION ){\r\n \tif(fileChooser.getSelectedFile().isDirectory())\r\n \t\tsave_dir = fileChooser.getSelectedFile().getPath();\r\n \tif(fileChooser.getSelectedFile().isFile())\r\n \t\tsave_dir = fileChooser.getSelectedFile().getParent();\r\n }\r\n\t\t//what a nice way to get the list size...\r\n\t\tint size = m_History.getList().getModel().getSize();\r\n\t\tFastVector rlist_item = null;\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\tString name = m_History.getNameAtIndex(i);\r\n\t\t\tStringBuffer buf = m_History.getNamedBuffer(name);\r\n\t\t try {\r\n\t\t String file = save_dir+\"\\\\\"+name.substring(11).replace(\"--> \", \"\")+\".txt\";\r\n\t\t if (m_Log != null) {\r\n\t\t \t\t m_Log.statusMessage(\"Saving to file...\");\r\n\t\t }\r\n\t\t PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(file, false)));\r\n\t\t out.write(buf.toString(),0,buf.toString().length());\r\n\t\t out.close();\r\n\t\t if (m_Log != null) {\r\n\t\t \t m_Log.statusMessage(\"OK\");\r\n\t\t }\r\n\t\t } catch (Exception ex) {\r\n\t\t ex.printStackTrace();\r\n\t\t if (m_Log != null) {\r\n\t\t \t m_Log.logMessage(ex.getMessage());\r\n\t\t }\r\n\t\t }\r\n\t\t}\r\n\t m_Log.logMessage(\"Saved all result buffers successfully.\");\r\n\t}", "private void saveGame() throws FileNotFoundException {\r\n\t\tJFileChooser fileChooser = new JFileChooser();\r\n\t\tFile file = null;\r\n\t\tif (fileChooser.showSaveDialog(gameView) == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tfile = fileChooser.getSelectedFile();\r\n\t\t}\r\n\t\tif (file != null) {\r\n\t\t\tFileWriter fileWriter = new FileWriter(convertToStringArrayList(), file);\r\n\t\t\tfileWriter.writeFile();\r\n\t\t}\r\n\r\n\t}", "public void writeToFile() {\n try {\n // stworz plik\n File file = new File(\"../Alice.ids\");\n // stworz bufor zapisu do pliku\n FileWriter fileWriter = new FileWriter(file);\n for(int i = 0; i < identificationNumbers.length; i++) {\n for(int j = 0; j < identificationNumbers[i].length; j++)\n fileWriter.write(Integer.toString(identificationNumbers[i][j]));\n\t\t\t fileWriter.write(\"\\n\");\n }\n\t\t\tfileWriter.flush();\n\t\t\tfileWriter.close();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }", "public void save() {\n\t\tlog.log(\"Attempting to save...\");\n\t\tPath spath = Paths.get(getFullSavePath());\n\t\tPath cpath = Paths.get(getFullSavePath() + \"units/\");\n\t\ttry {\n\t\t\tif(!Files.exists(spath))\n\t\t\t\tFiles.createDirectory(spath);\n\t\t\tif(!Files.exists(cpath))\n\t\t\t\tFiles.createDirectory(cpath);\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tlog.log(\"Save failed.\");\n\t\t\treturn;\n\t\t}\n\n\t\tFile[] files = new File(cpath.toString()).listFiles();\n\t\tfor(File f : files) {\n\t\t\tf.delete();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tBufferedWriter mfestWriter = new BufferedWriter(new FileWriter(getFullSavePath() + \"progress.txt\"));\n\t\t\tmfestWriter.write(name);\n\t\t\tmfestWriter.close();\n\t\t\tfor(MapCharacter mc : getFriendlies()) {\n\t\t\t\tBufferedWriter charWriter = new BufferedWriter(new FileWriter(getFullSavePath() + \"units/\"\n\t\t\t\t\t\t+ mc.getEnclosed().getDirName()));\n\t\t\t\tcharWriter.write(mc.getEnclosed().save());\n\t\t\t\tcharWriter.close();\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tlog.log(\"Save failed.\");\n\t\t\treturn;\n\t\t}\n\t\tlog.log(\"Game saved.\");\n\t}", "private void saveGenres(){\n\t\tFile genreList = new File(Paths.get(\"genres.txt\").toString());\n\t\ttry{\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(genreList));\n\t\t\tfor (String s : genres){\n\t\t\t\twriter.write(s);\n\t\t\t\twriter.newLine();\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch(IOException ex){\n\t\t\t\n\t\t}\n\t}", "private void saveInFile() {\n try {\n FileOutputStream fOut = openFileOutput(FILENAME,\n Context.MODE_PRIVATE);\n\n OutputStreamWriter writer = new OutputStreamWriter(fOut);\n Gson gson = new Gson();\n gson.toJson(counters, writer);\n writer.flush();\n\n fOut.close();\n\n } catch (FileNotFoundException e) {\n throw new RuntimeException();\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }", "public void saveFile() {\r\n final String file = \"respuestaConjuntoDeDatosCon\" + this.numberOfBees + \"abejas.txt\";\r\n try {\r\n int count = 0;\r\n PrintWriter writer = new PrintWriter(file, \"UTF-8\");\r\n for (int i = 0; i < this.numberOfBees; i++) {\r\n if (beesArray[i].isInCollisionRisk()) {\r\n writer.println(beesArray[i].getLatitude() + \",\" + beesArray[i].getLongitude() + \",\" + beesArray[i].getHeight());\r\n count++;\r\n }\r\n }\r\n System.out.println(\"Number of bees in collision risk: \" + count);\r\n writer.close();\r\n } catch (IOException ioe) {\r\n System.out.println(\"Something went wrong writing the exit file\");\r\n }\r\n }", "public void saveNewRollManager()\n\t{\n\t JFileChooser chooser = new JFileChooser(); //allows the user to choose a file\n\t chooser.setCurrentDirectory(new File(\"/home/me/Documents\"));\t//sets the directory of where to find the file\n\t int retrival = chooser.showSaveDialog(null);\n\t if (retrival == JFileChooser.APPROVE_OPTION) {\n\t try \n\t {\n\t FileWriter fw = new FileWriter(chooser.getSelectedFile()+\".txt\");\n\t fw.write (getCourseToFileString ( ));\n\t for(Student b : getStudents ( ))\t \t\n\t \tfw.write(b.toFileString ( ));\n\t \tfw.close ( );\n\t \t;\n\t } \n\t catch (Exception ex) \n\t {\n\t ex.printStackTrace();\n\t }\n\t\t\tthis.saveNeed = false;\n\n\t }\n\t \n\t}", "public void saveGame(File fileLocation);", "public static void createSaveFile( )\n {\n try\n {\n new File( \"data\" ).mkdirs( );\n PrintWriter writer = new PrintWriter( \"data/\" + Game.instance.getCurrentSaveFile( ).SAVEFILENAME + \".txt\", \"UTF-8\" );\n writer.println( \"dkeys: \" + Game.START_DIAMOND_KEY_COUNT );\n writer.close( );\n }\n catch ( IOException e )\n {\n e.printStackTrace( );\n System.exit( 1 );\n }\n }", "private void createSaveData(){\n try {\n File f = new File(filePath, highScores);\n FileWriter output = new FileWriter(f);\n BufferedWriter writer = new BufferedWriter(output);\n\n writer.write(\"0-0-0-0-0\");\n writer.newLine();\n writer.write(\".....-.....-.....-.....-.....\");\n writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void saveHighScore() {\n\n\t\tFileOutputStream os;\n\t\n\t\ttry {\n\t\t boolean exists = (new File(this.getFilesDir() + filename).exists());\n\t\t // Create the file and directories if they do not exist\n\t\t if (!exists) {\n\t\t\tnew File(this.getFilesDir() + \"\").mkdirs();\n\t\t\tnew File(this.getFilesDir() + filename);\n\t\t }\n\t\t // Saving the file\n\t\t os = new FileOutputStream(this.getFilesDir() + filename, false);\n\t\t ObjectOutputStream oos = new ObjectOutputStream(os);\n\t\t oos.writeObject(localScores);\n\t\t oos.close();\n\t\t os.close();\n\t\t} catch (Exception e) {\n\t\t e.printStackTrace();\n\t\t}\n }", "private void saveCustomDeck() {\n try (PrintWriter pw = new PrintWriter(new FileWriter(USER_DECK))) {\n for (int i = 0; i < customDeck.size(); i++) {\n pw.print(customDeck.get(i) + \"\\n\\n\");\n }\n } catch (IOException ex) {\n System.out.println(\"FAILED TO SAVE SCORES\");\n }\n }", "void save_to_file() {\n\t\tthis.setAlwaysOnTop(false);\n\t\t\n\t\t/**\n\t\t * chose file with file selector \n\t\t */\n\t\t\n\t\tFileDialog fd = new FileDialog(this, \"Choose a save directory\", FileDialog.SAVE);\n\t\t\n\t\t//default path is current directory\n\t\tfd.setDirectory(System.getProperty(\"user.dir\"));\n\t\tfd.setFile(\"*.cmakro\");\n\t\tfd.setVisible(true);\n\t\t\n\t\t\n\t\tString filename = fd.getFile();\n\t\tString path = fd.getDirectory();\n\t\tString file_withpath = path + filename;\n\t\t\n\t\tif (filename != null) {\n\t\t\t System.out.println(\"save path: \" + file_withpath);\n\t\t\t \n\t\ttry {\n\t\t\tObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(file_withpath));\n\n\t\t\tout.writeObject(Key_Lists);\n\t\t\t\n\t\t\tout.close();\n\t\t\t\n\t\t\tinfo_label.setForeground(green);\n\t\t\tinfo_label.setText(\"file saved :D\");\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tthis.setAlwaysOnTop(true);\n\t\t\n\t}", "void saveSklepToFile(String fileName) throws Exception {\r\n\t\tObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(fileName));\r\n\t\tout.writeObject(listOfAccounts);\r\n\t\tout.close();\r\n\t}", "public void toFile(String filename) {\n\t\tsortPool();\n\t\ttry (BufferedWriter bw = new BufferedWriter(new FileWriter(filename))) {\n\t\t\tfor(int i = 0; i < genepool.size(); i++) {\n\t\t\t\tbw.write(genepool.get(i).toWrite());\n\t\t\t\tbw.newLine();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void saveFile(File file){\n\t\ttry{\r\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\r\n\t\t\t\r\n\t\t\tfor(QuizCard card:cardList){\r\n\t\t\t\twriter.write(card.getQuestion() + \"/\");\r\n\t\t\t\twriter.write(card.getAnswer() + \"\\n\");\r\n\t\t\t}\r\n\t\t\twriter.close();\r\n\t\t} catch (IOException ex){\r\n\t\t\tSystem.out.println(\"couldn't write the cardList out\");\r\n\t\t\tex.printStackTrace();}\r\n\t}", "static void saveAllPlayersToFiles(){\n \tfor( String playername : GoreaProtect.playersData.getKeys(false))\n \t{\n \t\tFile playerfile = new File(GoreaProtect.datafolder + File.separator + \"Protections\");\n \t\tFile fileplayer= new File(playerfile, playername + \".yml\");\n\n \t\tConfigurationSection playerdata = GoreaProtect.playersData.getConfigurationSection(playername);\n\n \t\tYamlConfiguration PlayersDatayml = new YamlConfiguration();\n\n \t\tfor (String aaa:playerdata.getKeys(false))\n \t\tPlayersDatayml.set(aaa, playerdata.get(aaa));\n \t\t\n \t\t\n \t\ttry {\n\t\t\t\tPlayersDatayml.save(fileplayer);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} \n \t} \n }", "private void saveGame(int gameId, String fileName){\n\n }", "private void updateFile() {\n\t\tPrintWriter outfile;\n\t\ttry {\n\t\t\toutfile = new PrintWriter(new BufferedWriter(new FileWriter(\"stats.txt\")));\n\t\t\toutfile.println(\"15\"); // this is the number\n\t\t\tfor (Integer i : storeInfo) {\n\t\t\t\toutfile.println(i); // we overwrite the existing files\n\t\t\t}\n\t\t\tfor (String s : charBought) {\n\t\t\t\toutfile.println(s); // overwrite the character\n\t\t\t}\n\t\t\tfor (String s : miscBought) {\n\t\t\t\toutfile.println(s);\n\t\t\t}\n\t\t\toutfile.close();\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tSystem.out.println(ex);\n\t\t}\n\t}", "public static void saveToOutputFile(int[]tickets_array, String outputFileName, int k) {\n \n PrintWriter fileOutput = null;\n \n // PrintWriter forces handling of the FileNotFoundException, and FileWriter forces\n // handling of IOException, which includes FileNotFoundException, so\n // only IOException needs to be handled.\n try {\n fileOutput = new PrintWriter(new FileWriter(outputFileName));\n } catch (IOException e) {\n \n System.out.println(\"PrintWriter IOException occured when trying to save weight matrix data.\");\n \n }\n \n // save number of tickets\n fileOutput.println(tickets_array.length);\n \n //save the tickets\n \n double multiplyer = Math.pow(10, k-1);\n double curr = 0;\n int number = 0;\n for (int ticket : tickets_array)\n {\n curr = ticket;\n while(curr / multiplyer > 0)\n {\n number = (int)(curr / multiplyer);\n fileOutput.print(number + \" \");\n curr = ticket % multiplyer;\n multiplyer /= 10;\n \n }\n fileOutput.println(\"\");\n multiplyer = Math.pow(10, k-1);\n }\n \n // flush PrintWriter\n fileOutput.flush();\n \n // close file\n fileOutput.close();\n \n }", "public void saveRateablesToFile(List<Rateable> allRateables, File file) throws IOException\n {\n try (ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(file)))\n {\n oos.writeObject(allRateables);\n }\n }", "public static synchronized void save() {\n\n String team_fil = config.Server.serverdata_file_location + \"/teams.ser\";\n String team_backup = config.Server.serverdata_file_location + \"/teams\";\n\n Calendar dato = new GregorianCalendar();\n\n team_backup += dato.get(Calendar.YEAR) + \"-\" + dato.get(Calendar.DAY_OF_MONTH) + \"-\" + dato.get(Calendar.MONTH) + \"-\";\n team_backup += dato.get(Calendar.HOUR) + \"-\" + dato.get(Calendar.MINUTE) + \".ser\";\n\n admin.logging.globalserverMsg(\"Saving team data to file.\");\n\n try {\n FileOutputStream fil = new FileOutputStream(team_fil);\n FileOutputStream fil_backup = new FileOutputStream(team_backup);\n\n //Skriv til teams.txt\n ObjectOutputStream out = new ObjectOutputStream(fil);\n out.writeObject(team_list);\n out.flush();\n out.close();\n fil.close();\n\n //Skriv til backup fil.\n out = new ObjectOutputStream(fil_backup);\n out.writeObject(team_list);\n out.flush();\n out.close();\n fil.close();\n } catch (Exception e) {\n e.printStackTrace();\n admin.logging.globalserverMsg(\"Error saving team data to file.\");\n }\n }", "public void save(){\n try{\n Date date = new Date();\n \n PrintWriter writer = new PrintWriter(\"data.MBM\", \"UTF-8\");\n \n writer.println(\"version:\"+MBMDriver.version);\n writer.println(\"numworlds:\" + worlds.size());\n writer.println(\"lastclosed:\" + date.toString());\n writer.println(\"outDir:\"+outputDir.toPath());\n \n for(int i = 0; i < worlds.size(); i++){\n \n writer.println(\"MBMWORLD:\"+worlds.get(i).getWorldFile().getName()+\":\"+worlds.get(i).getName()+\":\"+worlds.get(i).getWorldFile().toPath()+\":\"+worlds.get(i).getLastBackupDate());\n }\n \n writer.close();\n }catch(FileNotFoundException e){\n System.out.println(\"ERROR: Failed to Find File\");\n }catch(UnsupportedEncodingException e){\n System.out.println(\"ERROR: Unsupported Encoding Exception\");\n }\n }", "public static void save(){\n\t\ttry{\n\t\t\tFile f=new File(Constants.PATH+\"\\\\InitializeData\\\\battlesavefile.txt\");\n\t\t\tPrintWriter pw=new PrintWriter(f);\n\t\t\tpw.println(turn);\n\t\t\tpw.println(opponent.toString());\n\t\t\tfor(Unit u:punits){\n\t\t\t\tpw.println(u.toString());\n\t\t\t}\n\t\t\tpw.println(\"End Player Units\");\n\t\t\tfor(Unit u:ounits){\n\t\t\t\tpw.println(u.toString());\n\t\t\t}\n\t\t\tpw.println(\"End Opponent Units\");\n\t\t\tpw.println(priorities);\n\t\t\tpw.println(Arrays.asList(xpgains));\n\t\t\tpw.println(spikesplaced+\" \"+numpaydays+\" \"+activeindex+\" \"+activeunit.getID()+\" \"+weather+\" \"+weatherturn);\n\t\t\tpw.println(bfmaker.toString());\n\t\t\tpw.close();\n\t\t}catch(Exception e){e.printStackTrace();}\n\t}", "public void save() { \n /*\n * Iterate over registry to pull box values\n * Creating new IOLoader for instance \n */\n for(UUID id : giftRegistry.keySet()) {\n GiftBox box = giftRegistry.get(id);\n\n String sId = id.toString();\n IOLoader<SecretSanta> config = new IOLoader<SecretSanta>(SecretSanta._this(), sId + \".yml\", \"Gifts\");\n\n FileConfiguration fCon = config.getCustomConfig();\n fCon.createSection(\"SecretSanta\");\n fCon.set(\"SecretSanta\", box.getConfig());\n\n try{\n fCon.save(config.getFile());\n } catch(IOException ex) {\n SecretSanta._this().logSevere(\"[GiftManager] Failed to save: \" + sId + \".yml\");\n continue;\n }\n }\n //SecretSanta._this().logDebug(\"[GiftManager] Gift Registry save successful.\");\n\n IOLoader<SecretSanta> pairedConfig = new IOLoader<SecretSanta>(SecretSanta._this(), \"PairedRegistry.yml\", \"Data\");\n FileConfiguration fPaired = pairedConfig.getCustomConfig();\n fPaired.createSection(\"paired\");\n fPaired.set(\"paired\", savePairs());\n\n try{\n fPaired.save(pairedConfig.getFile());\n //SecretSanta._this().logDebug(\"[GiftManager] PairedRegistry.yml save successful.\");\n } catch(IOException ex) {\n SecretSanta._this().logSevere(\"[GiftManager] Failed to save: PairedRegistry.yml\");\n }\n\n IOLoader<SecretSanta> playerConfig = new IOLoader<SecretSanta>(SecretSanta._this(), \"PlayerRegistry.yml\", \"Data\");\n FileConfiguration fPlayer = playerConfig.getCustomConfig();\n fPlayer.createSection(\"registered\");\n fPlayer.set(\"registered\", savePlayers());\n\n try{\n fPlayer.save(playerConfig.getFile());\n //SecretSanta._this().logDebug(\"[GiftManager] PlayerRegistry.yml save successful.\");\n } catch(IOException ex) {\n SecretSanta._this().logSevere(\"[GiftManager] Failed to save: PlayerRegistry.yml\");\n }\n\n IOLoader<SecretSanta> givenConfig = new IOLoader<SecretSanta>(SecretSanta._this(), \"GivenEmptyRegistry.yml\", \"Data\");\n FileConfiguration fGiven = givenConfig.getCustomConfig();\n fGiven.createSection(\"given\");\n fGiven.set(\"given\", saveGivens());\n\n try{\n fGiven.save(givenConfig.getFile());\n } catch(IOException ex) {\n SecretSanta._this().logSevere(\"[GiftManager] Failed to save: GivenEmptyRegistry.yml\");\n }\n\n SecretSanta._this().logDebug(\"[GiftManager] Saving complete.\");\n }", "void save(int generation) {\n File file = new File(\"network.dat\");\n try (BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file)))) {\n out.write(String.valueOf(generation) + \"\\n\");\n for (float v : weightLayer1)\n out.write(String.valueOf(v) + \"\\n\");\n for (float v : weightLayer2)\n out.write(String.valueOf(v) + \"\\n\");\n out.flush();\n out.close();\n JOptionPane.showMessageDialog(null, \"The Neural Network was saved!\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"The Neural Network could not be saved:\\n\" + e.getLocalizedMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void saveScores(){\n try {\n File f = new File(filePath, highScores);\n FileWriter output = new FileWriter(f);\n BufferedWriter writer = new BufferedWriter(output);\n\n writer.write(topScores.get(0) + \"-\" + topScores.get(1) + \"-\" + topScores.get(2) + \"-\" + topScores.get(3) + \"-\" + topScores.get(4));\n writer.newLine();\n writer.write(topName.get(0) + \"-\" + topName.get(1) + \"-\" + topName.get(2) + \"-\" + topName.get(3) + \"-\" + topName.get(4));\n writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "void saveBookMark(){\n File dotFile = new File( bmFile);\n FileWriter fw;\n BufferedWriter bw;\n PrintWriter pw;\n String str;\n\n // open dotFile\n try{\n // if there is not dotFile, create new one\n fw = new FileWriter( dotFile );\n bw = new BufferedWriter( fw );\n pw = new PrintWriter( bw );\n //write\n for(int i=0;i<MAX_BOOKMARK;i++){\n str = miBookMark[i].getText();\n pw.println(str);\n }\n pw.close();\n bw.close();\n fw.close();\n }catch(IOException e){\n }\n }", "void saveSet() {\n if( file==null ) {\n int returnVal = fc.showSaveDialog(this);\n if (returnVal != JFileChooser.APPROVE_OPTION) {\n System.out.println(\"Open command cancelled by user.\");\n return;\n }\n file = fc.getSelectedFile();\n }\n System.out.println(\"Saving to: \" + file.getName());\n try {\n int count = tabbedPane.getTabCount();\n ArrayList l = new ArrayList();\n for(int i=0; i< count; i++) {\n rrpanel= (RoombaRecorderPanel)tabbedPane.getComponentAt(i);\n l.add(rrpanel.copy());\n }\n FileOutputStream fos = new FileOutputStream(file);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n //oos.writeObject(loopButton);\n //oos.writeObject(\n oos.writeObject(l);\n oos.close();\n } catch( Exception e ) {\n System.out.println(\"Save error \"+e);\n }\n }", "public void saveGame() {\r\n\t\t//separator used by system\r\n\t\tString separator = System.getProperty(\"file.separator\");\r\n\t\t//path to where files will be saved\r\n\t\tString path = System.getProperty(\"user.dir\") + separator + \"src\" + separator + \"GameFiles\" + separator;\r\n\r\n\t\ttry {\r\n\r\n\t\t\t//Save the world objects\r\n\t\t\tString world_objects_name = EnvironmentVariables.getTitle() + \"WorldObjects\";\r\n\t\t\t//create a new file with name given by user with added text for identification\r\n\t\t\tFile world_objects_file = new File(path + world_objects_name + \".txt\");\r\n\t\t\tFileOutputStream f_world_objects = new FileOutputStream(world_objects_file);\r\n\t\t\tObjectOutputStream o_world_objects = new ObjectOutputStream(f_world_objects);\r\n\r\n\t\t\t//loop through list and write each object to file\r\n\t\t\tfor(GameObject obj: EnvironmentVariables.getWorldObjects()) {\r\n\t\t\t\to_world_objects.writeObject(obj);\r\n\t\t\t}\r\n\r\n\t\t\to_world_objects.flush();\r\n\t\t\to_world_objects.close();\r\n\t\t\tf_world_objects.flush();\r\n\t\t\tf_world_objects.close();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Save terrain is done the same ass world objects but we create a new file \r\n\t\t\t//with different added text\r\n\t\t\tString terrain_name = EnvironmentVariables.getTitle() + \"Terrain\";\r\n\t\t\tFile terrain_file = new File(path + terrain_name + \".txt\");\r\n\t\t\tFileOutputStream f_terrain = new FileOutputStream(terrain_file);\r\n\t\t\tObjectOutputStream o_terrain = new ObjectOutputStream(f_terrain);\r\n\r\n\t\t\tfor(GameObject obj: EnvironmentVariables.getTerrain()) {\r\n\t\t\t\to_terrain.writeObject(obj);\r\n\t\t\t}\r\n\r\n\t\t\to_terrain.flush();\r\n\t\t\to_terrain.close();\r\n\t\t\tf_terrain.flush();\r\n\t\t\tf_terrain.close();\r\n\t\t\t\r\n\t\t\t//Save main player, given own file but just a single object\r\n\t\t\tString main_player_name = EnvironmentVariables.getTitle() + \"MainPlayer\";\r\n\t\t\tFile main_player_file = new File(path + main_player_name + \".txt\");\r\n\t\t\tFileOutputStream f_main_player = new FileOutputStream(main_player_file);\r\n\t\t\tObjectOutputStream o_main_player = new ObjectOutputStream(f_main_player);\r\n\r\n\t\t\to_main_player.writeObject(EnvironmentVariables.getMainPlayer());\r\n\r\n\t\t\to_main_player.flush();\r\n\t\t\to_main_player.close();\r\n\t\t\tf_main_player.flush();\r\n\t\t\tf_main_player.close();\r\n\t\t\t\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"File not found\");\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error initializing stream\");\r\n\t\t} \r\n\t\t\r\n\t\t//saving the environment variables\r\n\t\ttry {\r\n\t\t\tString env_name = EnvironmentVariables.getTitle() + \"EnvVariables\";\r\n\t\t\tFile env_file = new File(path + env_name + \".txt\");\r\n\t\t\t\r\n\t\t\tif(!env_file.exists()) {\r\n\t\t\t\tenv_file.createNewFile();\r\n\t\t }\r\n\t\t\t \r\n\t\t\t//FileWriter fw = new FileWriter(env_file);\r\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(env_file));\r\n\t\t\t//write each variable to a new line as a string\r\n\t\t\tbw.write(EnvironmentVariables.getTitle()); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getWidth())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getHeight())); bw.newLine();\r\n\t\t\tbw.write(EnvironmentVariables.getPlanet()); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getMass())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getRadius())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getAirDensity())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getMeter())); bw.newLine();\r\n\r\n\t\t\t\r\n\t\t\t//bw.flush();\r\n\t\t\tbw.close();\r\n\t\t\t\r\n\t\t}catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error initializing stream\");\r\n\t\t}\r\n\t\t\r\n\t\tEnvironmentVariables.getTerrain().clear();\r\n\t\tEnvironmentVariables.getWorldObjects().clear();\r\n\t}", "private void saveData(){\n\t\tsynchronized(onlineAllInfoList){\n\t\t\tRecorder.save(onlineAllInfoList, onlineAllInfoListFileName);\n\t\t}\n\t\t//System.out.println(\"Saving onlineCompetitionInfoList...\");System.out.flush();\n\t\tsynchronized(onlineCompetitionInfoList){\n\t\t\tRecorder.save(onlineCompetitionInfoList, onlineCompetitionInfoListFileName);\t\t\t\n\t\t}\n\t\t//System.out.println(\"Saving competitionList...\");System.out.flush();\n\t\tsynchronized(competitionList){\n\t\t\tRecorder.save(competitionList, competitionInfoListFileName);\n\t\t}\n\t\t//System.out.println(\"Saving allAIInfoList...\");System.out.flush();\n\t\tsynchronized(allAIInfoList){\n\t\t\tRecorder.save(allAIInfoList, allInfoListFileName);\t\t\t\n\t\t}\n\t\t//System.out.println(\"Saving waitingInfoList...\");System.out.flush();\n\t\tsynchronized(waitingInfoList){\n\t\t\tRecorder.save(waitingInfoList, waitingInfoListFileName);\t\t\t\n\t\t}\n\t\t//System.out.println(\"Saving sortedAIInfoPool...\");System.out.flush();\n\t\tsynchronized(sortedAIInfoPool){\n\t\t\tRecorder.save(sortedAIInfoPool, sortedInfoListFileName);\t\t\t\n\t\t}\n\t}", "public static void save()\n {\n try {\n \n \n PrintWriter fich = null;\n \n fich = new PrintWriter(new BufferedWriter(new FileWriter(\"bd.pl\", true)));\n\t\t\t//true c'est elle qui permet d'écrire à la suite des donnée enregistrer et non de les remplacé \n \n for(String auto : GestionController.listApp)\n {\n \n fich.println(auto);\n }\n fich.println();\n for(String auto : GestionController.listDetFact)\n {\n \n fich.println(auto);\n }\n fich.println();\n for(String auto : GestionController.listFact)\n {\n \n fich.println(auto);\n }\n fich.println();\n for(String auto : GestionController.listType)\n {\n \n fich.println(auto);\n }\n fich.println();\n fich.close();\n } catch (Exception e1) {\n printStrace(e1);\n\t\t}\n }", "public void save() {\n doneSave = false;\n Double max = ((Integer) chunks.size()).doubleValue();\n Double done = 0.0;\n for (String key : chunks.keySet()) {\n ChunkWrapper w = chunks.get(key);\n w.save(false, true);\n done++;\n this.percent = ((Double) (done / max)).intValue();\n }\n chunks.clear();\n doneSave = true;\n }", "public final void saveToFile() {\n\t\tWrite.midi(getScore(), getName()+\".mid\"); \n\t}", "public void saveGame(String fileName){\n Gson gson = new Gson();\n String userJson = gson.toJson(player);\n\n try(Writer w = new BufferedWriter(new OutputStreamWriter( new FileOutputStream(fileName), \"UTF-8\"))) {\n w.write(userJson);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void save() {\n\t\ttry {\n\t\t\t// use buffering\n\t\t\tOutputStream file = new FileOutputStream(\"games.txt\");\n\t\t\tOutputStream buffer = new BufferedOutputStream(file);\n\t\t\tObjectOutput output = new ObjectOutputStream(buffer);\n\t\t\ttry {\n\t\t\t\tif (gameOver) {\n\t\t\t\t\t//notify no need to save completed game\n\t\t\t\t} else {\n\t\t\t\t\tgames.add(this);\n\t\t\t\t\toutput.writeObject(games);\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\toutput.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Save not successful\");\n\t\t}\n\t}", "public void save(String filePath){\r\n Scanner in = new Scanner(System.in);\r\n File saveFile = new File(filePath);\r\n if (saveFile.exists()){\r\n System.out.println(\"Do you really, really want to overwrite your previous game?\");\r\n System.out.println(\"Yes: '1', No: '0'.\");\r\n int input = in.nextInt();\r\n if (input!=1){\r\n return;\r\n }\r\n }\r\n File saveDir = new File(this.savePath);\r\n if (!saveDir.exists()){\r\n saveDir.mkdir();\r\n }\r\n FileOutputStream fos = null;\r\n ObjectOutputStream out = null;\r\n try {\r\n fos = new FileOutputStream(saveFile);\r\n out = new ObjectOutputStream(fos);\r\n out.writeObject(this.serialVersionUID);\r\n out.writeObject(p);\r\n out.writeObject(map);\r\n out.close();\r\n } catch (Exception ex) {\r\n System.out.println(\"Make sure you don't use spaces in your folder names.\");\r\n ex.printStackTrace();\r\n }\r\n }", "public void saveTournament() throws IOException{\r\n\t\tBuzzardTournamentFileChooser fileChooser = new BuzzardTournamentFileChooser();\r\n\t\tfileChooser.saveTournament(dealer.getTournament());\r\n\t}", "public void saveFile() throws FileNotFoundException {\r\n try {\r\n PrintWriter out = new PrintWriter(FILE_NAME);\r\n //This puts back the labels that the loadFile removed\r\n out.println(\"date,cust_email,cust_location,product_id,product_quantity\");\r\n int i = 0;\r\n\r\n while (i < orderInfo.size()) {\r\n String saved = orderInfo.get(i).toString();\r\n out.println(saved);\r\n i++;\r\n }\r\n out.close();\r\n } catch (FileNotFoundException e) {\r\n }\r\n\r\n }", "void saveGame() throws IOException, Throwable {\n Save save = new Save(\"01\");\n save.addToSaveGame(objectsToSave());\n save.saveGame();\n }", "public static void Save(String filename) throws IOException {\n\t\tFileWriter fw=new FileWriter(filename);\r\n\t\tround=A1063307_GUI.round;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tfw.write(\"Round:\"+round+\",Turn:\"+who+\"\\n\");\r\n\t\tint t2=1;\r\n\t\twhile(t2<(linenumber)) {\r\n\t\t\tint zz=0;\r\n\t\t\twhile(zz<5) {\r\n\t\t\t\tif(zz==0) {\t\t\r\n\t\t\t\t\tch[t2].location=ch[t2].location%20;\r\n\t\t\t\t fw.write(Integer.toString(ch[t2].location)+\",\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(zz==1){\r\n\t\t\t\t fw.write(Integer.toString(ch[t2].CHARACTER_NUMBER)+\",\");\r\n\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\telse if(zz==2){\r\n\t\t\t\t\tfw.write(Integer.toString(ch[t2].money)+\",\");\r\n\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t else if(zz==3){\r\n\t\t\t \tfw.write(Integer.toString(ch[t2].status)+\",\");\r\n\t\t\t \r\n\t\t\t \t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tfw.write(ch[t2].IMAGE_FILENAME);\t\t\t\t\r\n\t\t\t\t\t }\r\n\t\t\t\tzz++;\r\n\t\t\t}\r\n\t\t\tfw.write(\"\\n\");\r\n\t\t\tt2++;\r\n\t\t}\r\n\t\tfw.close();\r\n\t\tFileWriter fw1=new FileWriter(\"Land.txt\");\r\n\t\tfw1.write(\"LOCATION_NUMBER, owner\\n\");\r\n\t\tfor(int i=1;i<17;i++) {\r\n\t\t\tfw1.write(Land[i].PLACE_NUMBER+\",\"+Land[i].owner+\"\\n\");\r\n\t\t}\r\n\t\tfw1.close();\r\n\t}", "public void save() {\n\n\t\tint[][] rawData = new int[2][CHUNK_SIZE * CHUNK_SIZE];\n\n\t\tfor (int l = 0; l < 2; l++) {\n\t\t\tLayer layer = Layer.get(l);\n\t\t\tfor (int y = 0; y < CHUNK_SIZE; y++) {\n\t\t\t\tfor (int x = 0; x < CHUNK_SIZE; x++) {\n\t\t\t\t\trawData[l][x + y * CHUNK_SIZE] = getTileId(layer, x, y);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.saveData = new RawChunkData(rawData);\n\t}", "public static void save() {\n\t\t// Save each user \n\t\t// and list of directories \n\t\t// and files in each directory\n\t\tArrayList<String> usernames = getRegisteredUserNames();\n\t\tUtils.FileUtils.write(\n\t\t\t\tusernames, \n\t\t\t\tGlobal.Constants.LIST_OF_USERS\n\t\t\t\t);\t\n\t\tfor (User user:Global.Variables.registeredUsers) {\n\t\t\tUtils.FileUtils.write(\n\t\t\t\tuser.getDirectoryNames(), \n\t\t\t\tGlobal.Constants.DIRECTORY_LOCATION + user.getName()\n\t\t\t\t);\n\t\t\tsave(user);\n\t\t}\n\t}", "public static void saveDataToFile() {\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy MM dd, HH mm\");\n Date date = new Date();\n String fileName= dateFormat.format(date)+\".txt\";\n\n try {\n PrintWriter writer = new PrintWriter(fileName, \"UTF-8\");\n writer.print(\"Wins: \");\n writer.println(wins);\n writer.print(\"Draws: \");\n writer.println(draws);\n writer.print(\"Losses: \");\n writer.println(loses);\n writer.close();\n System.out.println(\"File Write Successful\");\n } catch (IOException e) {\n\n }\n\n\n }", "private void saveToFile(){\n this.currentMarkovChain.setMarkovName(this.txtMarkovChainName.getText());\n saveMarkovToCSVFileInformation();\n \n //Save to file\n Result result = DigPopGUIUtilityClass.saveDigPopGUIInformationSaveFile(\n this.digPopGUIInformation,\n this.digPopGUIInformation.getFilePath());\n }", "void save(String fileName);", "void saveFile () {\r\n\r\n\t\ttry {\r\n\t\t\tFileOutputStream fos = new FileOutputStream (\"Bank.dat\", true);\r\n\t\t\tDataOutputStream dos = new DataOutputStream (fos);\r\n\t\t\tdos.writeUTF (saves[count][0]);\r\n\t\t\tdos.writeUTF (saves[count][1]);\r\n\t\t\tdos.writeUTF (saves[count][2]);\r\n\t\t\tdos.writeUTF (saves[count][3]);\r\n\t\t\tdos.writeUTF (saves[count][4]);\r\n\t\t\tdos.writeUTF (saves[count][5]);\r\n\t\t\tJOptionPane.showMessageDialog (this, \"The Record has been Saved Successfully\",\r\n\t\t\t\t\t\t\"BankSystem - Record Saved\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t\ttxtClear ();\r\n\t\t\tdos.close();\r\n\t\t\tfos.close();\r\n\t\t}\r\n\t\tcatch (IOException ioe) {\r\n\t\t\tJOptionPane.showMessageDialog (this, \"There are Some Problem with File\",\r\n\t\t\t\t\t\t\"BankSystem - Problem\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t}\r\n\r\n\t}", "public static void saveBoxScore(){\n Engine engine = Utility.getEngine();\n ArrayList<Player> homePlayers = engine.getHomePlayers();\n ArrayList<Player> awayPlayers = engine.getAwayPlayers();\n ArrayList<String> output = new ArrayList<String>();\n output.add(\"Home team\");\n for(Player player : homePlayers){\n Player upToDatePlayer = Utility.getPlayer(player);\n output.add(upToDatePlayer.toString());\n }\n\n output.add(\"Away team\");\n for(Player player : awayPlayers){\n Player upToDatePlayer = Utility.getPlayer(player);\n output.add(upToDatePlayer.toString());\n }\n\n try {\n Path path = Paths.get(Constants.OUTPUT_FILE_PATH);\n Files.write(path,output,StandardCharsets.UTF_8);\n } catch (Exception e){\n System.out.println(\"Exception: \" + e.toString());\n }\n\n System.exit(0);\n }", "void save(String filename);", "private void saveScore() {\n try {\n PrintWriter writer = new PrintWriter(new FileOutputStream(new File(Const.SCORE_FILE), true));\n writer.println(this.player.getName() + \":\" + this.player.getGold() + \":\" + this.player.getStrength());\n writer.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void save() throws FileNotFoundException {\n PrintWriter myWriter = new PrintWriter(\"duke.txt\");\n for (Task t : TaskList.getTasklist()) {\n myWriter.println(t.toString());\n }\n myWriter.flush();\n myWriter.close();\n }", "public void save() {\n final JFileChooser fileChooser =\n new JFileChooser(System.getProperty(\"user.dir\"));\n try {\n fileChooser.setSelectedFile(new File(\"save.ser\"));\n int saveFile = fileChooser.showSaveDialog(GameFrame.this);\n\n if (saveFile == JFileChooser.APPROVE_OPTION) {\n File saveGame = fileChooser.getSelectedFile();\n FileOutputStream fileOut = new FileOutputStream(saveGame);\n ObjectOutputStream objOut = new ObjectOutputStream(fileOut);\n objOut.writeObject(world);\n objOut.close();\n fileOut.close();\n System.out.println(\"Game saved.\");\n } else {\n return;\n }\n } catch (IOException i) {\n i.printStackTrace();\n }\n\n }", "public static void toBinFile(ArrayList<Loan> l){\r\n for(int i = 0; i < l.size(); i++){\r\n try{\r\n FileOutputStream fileOut = new FileOutputStream(\"loans.bin\");\r\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);\r\n objectOut.write(i);\r\n \r\n }catch(IOException e){\r\n System.out.println(e);\r\n }\r\n }\r\n System.out.println(\"All loans stored to file\\n\");\r\n }", "public static void saveStats() {\r\n\t\tif(Main.optionsCheckbox.getState()) FileUtils.exportGameOptions();\r\n\t\t\r\n\t\tif(Main.isFourHandedTeams) {\r\n\t\t\tif(Main.team1Checkbox.getState()) FileUtils.exportTeamFile(Main.teamOne);\r\n\t\t\tif(Main.team2Checkbox.getState()) FileUtils.exportTeamFile(Main.teamTwo);\r\n\t\t\tif(Main.teamPreviousCheckbox.getState()) FileUtils.exportTeamFile(Main.teamPrevious);\r\n\t\t}\r\n\t\t\r\n\t\tif(Main.isFourHandedSingle) {\r\n\t\t\tif(Main.player1Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerOne);\r\n\t\t\tif(Main.player2Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerTwo);\r\n\t\t\tif(Main.player3Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerThree);\r\n\t\t\tif(Main.player4Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerFour);\r\n\t\t\tif(Main.playerPreviousCheckbox.getState()) FileUtils.exportPlayerFile(Main.playerPrevious);\r\n\t\t}\r\n\t\t\r\n\t\tif(Main.isThreeHanded) {\r\n\t\t\tif(Main.player1Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerOne);\r\n\t\t\tif(Main.player2Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerTwo);\r\n\t\t\tif(Main.player3Checkbox.getState()) FileUtils.exportPlayerFile(Main.playerThree);\r\n\t\t\tif(Main.playerPreviousCheckbox.getState()) FileUtils.exportPlayerFile(Main.playerPrevious);\r\n\t\t}\r\n\t}", "public static void saveGame(Puzzle puzzle, String name) throws IOException {\n FileWriter wr;\n File file = new File(System.getenv(\"APPDATA\")+\"\\\\SudokuGR04\\\\\" + name + \".txt\");\n wr = new FileWriter(file);\n puzzle.setName(name);\n try {\n //generate File in dir SudokuGR04\n wr.write(puzzle.export());\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n wr.close();\n }\n }", "public void save(View view) {\n String root = Environment.getExternalStorageDirectory().toString();\n File myDir = new File(root + \"/App_images\");\n if (!myDir.exists()) {\n myDir.mkdir();\n }\n // STOP creating directory for images\n Random generator = new Random();\n int n = 10000;\n n = generator.nextInt(n);\n String fname = \"Image-\" + n + \".jpg\";\n File file = new File(myDir, fname);\n if (file.exists()) file.delete();\n try {\n FileOutputStream out = new FileOutputStream(file);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, out);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void saveAllData()\n {\n \tfor(String s : games.keySet())\n \t{\n \t\tGame g = games.get(s);\n \t\tif(g.saveAllData())\n \t\t{\n \t\t\tSystem.out.println(\"Game '\" + g.getGameName() + \"' saved all data successfully!\");\n \t\t}\n \t\telse\n \t\t{\n \t\t\tSystem.out.println(\"Error when attempting to save data in game '\" + g.getGameName() + \"'!\");\n \t\t}\n \t}\n }", "public void save()\r\n {\r\n \tfc=new JFileChooser();\r\n\t fc.setCurrentDirectory(new File(\"\"));\r\n\t if(fc.showSaveDialog(this)==JFileChooser.APPROVE_OPTION)\r\n\t \t//Try-Catch Block\r\n\t try\r\n\t {\r\n\t pw=new PrintWriter(new FileWriter(fc.getSelectedFile()+\".txt\")); //Print to the user-selected file\r\n\t\t \tfor(Organism o: e.getTree()) //IN PROGESS\r\n\t\t \t{\r\n\t\t\t\t\tint[] genes=o.getGenes(); //Getting genes from \r\n\t\t\t\t\tfor(int i=0; i<genes.length; i++)\r\n\t\t\t\t\t\tpw.print(genes[i]+\" \"); //Print each gene value in a line\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tpw.println(); //Starts printing on a new line\r\n\t\t\t\t}\r\n\t\t\t\tpw.close(); //Closes the File\r\n\t }\r\n\t catch (Exception ex) //Catch Any Exception\r\n\t {\r\n\t ex.printStackTrace();\r\n\t }\r\n }", "@Override\n\tpublic void save() {\n\t\t\n\t\tFile savingDirectory = new File(savingFolder());\n\t\t\n\t\tif( !savingDirectory.isDirectory() ) {\n\t\t\tsavingDirectory.mkdirs();\n\t\t}\n\t\t\n\t\t\n\t\t//Create the file if it's necessary. The file is based on the name of the item. two items in the same directory shouldn't have the same name.\n\t\t\n\t\tFile savingFile = new File(savingDirectory, getIdentifier());\n\t\t\n\t\tif( !savingFile.exists() ) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\tsavingFile.createNewFile();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"the following item couldn't be saved: \" + getIdentifier());\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t\n\t\t//generate the savingTextLine and print it in the savingFile. the previous content is erased when the PrintWriter is created.\n\t\t\n\t\tString text = generateSavingTextLine();\n\n\t\ttry {\n\t\t\tPrintWriter printer = new PrintWriter(savingFile);\n\t\t\tprinter.write(text);\t\t\t\n\t\t\tprinter.close();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tsave();\n\t\t} \n\t}", "public void saveRecentPaneFiles() {\n try {\r\n // open the file for writing the recent files \r\n FileOutputStream output = new FileOutputStream(fileWithFileListOfPaneRecentFiles); \r\n\r\n //create writer stream\r\n OutputStreamWriter recentsWriter= new OutputStreamWriter(output);\r\n int fileCnt=0; // restrict the maximum number of recent files\r\n\r\n for (int k=0; k<recentPaneFiles.size(); k++) {\r\n String currentRecentFile = (String)recentPaneFiles.elementAt(k)+\"\\n\";\r\n recentsWriter.write(currentRecentFile, 0, currentRecentFile.length());\r\n if (fileCnt++ == GlobalValues.maxNumberOfRecentFiles) break;\r\n }\r\n recentsWriter.close();\r\n output.close();\r\n }\r\n catch(java.io.IOException except)\r\n {\r\n System.out.println(\"IO exception in saveRecentFiles\");\r\n System.out.println(except.getMessage());\r\n except.printStackTrace();\r\n }\r\n }", "public void processSaveAndClose() {\n\n\t\tPrintWriter writer = null;\n\t\ttry {\n\t\t\ttry {\n\t\t\t\twriter = new PrintWriter(classesOutFile);\n\n\t\t\t\tint i = 0;\n\t\t\t\tfor (FitnessClass fc: fitnessClass) {\n\n\t\t\t\t\tif (fc == null) {\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tString fileOutput = fc.toStringClassesOut();\n\t\t\t\t\t\twriter.print(fileOutput);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally {\n\n\t\t\t\tif (writer != null) {\n\t\t\t\t\twriter.close();\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t} \t\n\t\t}\n\t\tcatch (IOException ioe) {\n\t\t\tJOptionPane.showMessageDialog(null, \"File not found\",\n\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\n\t\t}\t\t\t\t\n\n\t}", "public void save(View v,String name) {\n String question = \"Question:\" + mQuestionView.getText().toString();\n String choice1 = \"Choice1:\" + mButtonChoice1.getText().toString();\n String choice2 = \"Choice2:\" + mButtonChoice2.getText().toString();\n String choice3 = \"Choice3:\" + mButtonChoice3.getText().toString();\n String choice4 = \"Choice4:\" + mButtonChoice4.getText().toString();\n String correctAnswer = \"correct answer:\" +mAnswer;\n File file = new File(getFilesDir() + \"/\" + name); //path where it is save\n String lineSeparator = System.getProperty(\"line.separator\"); //new line\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(file, true);\n fos = openFileOutput(name, MODE_APPEND);\n fos.write(question.getBytes());//display the questions\n fos.write(lineSeparator.getBytes());//creates a new line\n fos.write(choice1.getBytes());//display the choices\n fos.write(lineSeparator.getBytes());\n fos.write(choice2.getBytes());\n fos.write(lineSeparator.getBytes());\n fos.write(choice3.getBytes());\n fos.write(lineSeparator.getBytes());\n fos.write(choice4.getBytes());\n fos.write(lineSeparator.getBytes());\n fos.write(correctAnswer.getBytes());\n fos.write(lineSeparator.getBytes());\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (fos != null) {\n try {\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "public abstract void saveToFile(PrintWriter out);", "public static void save() {\n Game.save(UI.askNgetString(\"Filename for this save file?\")+\".xml\");\n }", "void saveRandom();", "public void saveToFile()\n\t{\t\n\t\tsetCourseToFileString(courseToFileString);\n\t\t\ttry \n\t {\n\t FileWriter fw = new FileWriter(fileName);\n\t fw.write (this.getCourseToFileString ( ));\n\t for(Student b : this.getStudents ( ))\t \t\n\t \tfw.write(b.toFileString ( ));\n\t \tfw.close ( );\n\t } \n\t catch (Exception ex) \n\t {\n\t ex.printStackTrace();\n\t }\n\t\t\tthis.saveNeed = false;\n\n\t}", "public void saveBook() throws FileNotFoundException {\n\t\tString formated;\n\n\t\tFile saveFile = new File(FILEPATH); \n\t\tPrintWriter o = new PrintWriter(saveFile);\n\n\t\tfor (int i = 0; i < bookList.size(); i++) {\n\t\t\tint type = bookType(bookList.get(i).getIsbn());\n\t\t\tswitch (type) {\n\t\t\tcase 0: // ChildernsBook\n\t\t\t\tformated = String.format(\"%s;%s;%d;%d;%s;%s;%c\", bookList.get(i).getIsbn(),\n\t\t\t\t\t\tbookList.get(i).getCallNumber(), bookList.get(i).getAvailable(), bookList.get(i).getTotal(),\n\t\t\t\t\t\tbookList.get(i).getTitle(), ((ChildrensBook) bookList.get(i)).getAuthors(),\n\t\t\t\t\t\t((ChildrensBook) bookList.get(i)).getFormat());\n\t\t\t\tbreak;\n\t\t\tcase 1: // CookBook\n\t\t\t\tformated = String.format(\"%s;%s;%d;%d;%s;%s;%c\", bookList.get(i).getIsbn(),\n\t\t\t\t\t\tbookList.get(i).getCallNumber(), bookList.get(i).getAvailable(), bookList.get(i).getTotal(),\n\t\t\t\t\t\tbookList.get(i).getTitle(), ((CookBook) bookList.get(i)).getPublisher(),\n\t\t\t\t\t\t((CookBook) bookList.get(i)).getDiet());\n\t\t\t\tbreak;\n\t\t\tcase 2: // PaperBack\n\t\t\t\tformated = String.format(\"%s;%s;%s;%s;%s;%s;%s;%s\", bookList.get(i).getIsbn(),\n\t\t\t\t\t\tbookList.get(i).getCallNumber(), bookList.get(i).getAvailable(), bookList.get(i).getTotal(),\n\t\t\t\t\t\tbookList.get(i).getTitle(), ((PaperBack) bookList.get(i)).getAuthors(),\n\t\t\t\t\t\t((PaperBack) bookList.get(i)).getYear(), ((PaperBack) bookList.get(i)).getGenre());\n\t\t\t\tbreak;\n\t\t\tcase 3: // periodic\n\t\t\t\tformated = String.format(\"%s;%s;%s;%s;%s;%s;\", bookList.get(i).getIsbn(),\n\t\t\t\t\t\tbookList.get(i).getCallNumber(), bookList.get(i).getAvailable(), bookList.get(i).getTotal(),\n\t\t\t\t\t\tbookList.get(i).getTitle(), ((Periodic) bookList.get(i)).getFrequency());\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tformated = \"Null\";\n\t\t\t}\n\t\t\to.println(formated);\n\t\t}\n\n\t\to.close();\n\n\t}", "void saveGame();", "@Override\n\tpublic void saveScore(Jogador jogador) throws IOException {\n\t\t\n\t\tInteger score = getScore(jogador);\n\t\t\n\t\tif (score == null) {\n\t\t\tscore = 0;\n\t\t}\n\t\t\n\t\tscoreMap.put(jogador.getNome().toUpperCase(), score + 1);\n\t\t\n\t\ttry(BufferedWriter writer = Files.newBufferedWriter(SCORE_FILE)){\n\t\t\t\n\t\t\tSet<Map.Entry<String, Integer>> entries = scoreMap.entrySet();\n\t\t\t\n\t\t\tfor(Map.Entry<String, Integer> e : entries ) {\n\t\t\t\tString nome = e.getKey();\n\t\t\t\tInteger pont = e.getValue();\n\t\t\t\twriter.write(nome + \"|\" + pont);\n\t\t\t\twriter.newLine();\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void saveInFile() {\n try {\n FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE);\n\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos));\n\n Gson gson = new Gson();\n Log.d(\"PersonList\", personList.toString());\n gson.toJson(personList, out);\n out.flush();\n\n fos.close();\n\n } catch (FileNotFoundException e){\n throw new RuntimeException();\n } catch (IOException e){\n e.printStackTrace();\n }\n\n }", "private void save() {\n if (mCacheFile.exists()) {\n mCacheFile.delete();\n }\n\n try (JsonWriter writer = new JsonWriter(new BufferedWriter(new FileWriter(mCacheFile)))) {\n writer.beginObject();\n writer.name(PRINTER_LIST_NAMES.get(0));\n writer.beginArray();\n for (DiscoveredPrinter printer : mSavedPrinters) {\n printer.write(writer);\n }\n writer.endArray();\n writer.endObject();\n } catch (NullPointerException | IOException e) {\n Log.w(TAG, \"Error while storing to \" + mCacheFile, e);\n }\n }", "void save(File file);", "public void saveToFile() throws InterruptedException\n {\n //generate data\n StringBuilder data = new StringBuilder();\n data.append(\"X,Y,Z,GPS,Timestamp\");\n //loop voor de hardcoded data die wordt aangemaakt in de loop.\n for (int i = 0; i < 5; i++)\n {\n Long currentTime = System.currentTimeMillis();\n data.append(\"\\n\" + i + \",\" + i * i + \",\" + (i + i) + \",\" + (i+i+i)*i + \",\" + currentTime);\n TimeUnit.SECONDS.sleep(1);\n }\n\n FileOutputStream fos = null;\n try\n {\n //saving the file into device\n fos = this.mainActivity.openFileOutput(MainActivity.FILE_NAME, Context.MODE_PRIVATE);\n fos.write(data.toString().getBytes());\n mEditText.getText().clear();\n Toast.makeText(this.mainActivity, \"Saved to\" + mainActivity.getFilesDir() + \"/\" + MainActivity.FILE_NAME, Toast.LENGTH_LONG).show();\n }\n catch (FileNotFoundException e)\n {\n e.printStackTrace();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n finally\n {\n if (fos != null)\n {\n try\n {\n fos.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n }\n }", "private void saveGame(){\n\t\t\n\t}", "public void saveAll() {\n try {\n writeObject(IMAGE_DATA_PATH, imageFiles);\n writeObject(EXISTING_TAGS_PATH, existingTags);\n } catch (IOException e) {\n // e.printStackTrace();\n }\n }", "public void saveStock(){\n\n\n try {\n BufferedWriter writercowA = new BufferedWriter(new FileWriter(\"cowAmount.txt\"));\n writercowA.write(cowAmount.getText());\n writercowA.close();\n\n BufferedWriter writerSheepA = new BufferedWriter(new FileWriter(\"sheepAmount.txt\"));\n writerSheepA.write(sheepAmount.getText());\n writerSheepA.close();\n\n BufferedWriter writergoatA = new BufferedWriter(new FileWriter(\"goatAmount.txt\"));\n writergoatA.write(goatAmount.getText());\n writergoatA.close();\n\n BufferedWriter writerChickenA = new BufferedWriter(new FileWriter(\"chickenAmount.txt\"));\n writerChickenA.write(chickenAmount.getText());\n writerChickenA.close();\n\n BufferedWriter writerduckA = new BufferedWriter(new FileWriter(\"duckAmount.txt\"));\n writerduckA.write(duckAmount.getText());\n writerduckA.close();\n\n BufferedWriter writercowW = new BufferedWriter(new FileWriter(\"cowWeight.txt\"));\n writercowW.write(cowWeight.getText());\n writercowW.close();\n\n BufferedWriter writerSheepW = new BufferedWriter(new FileWriter(\"sheepWeight.txt\"));\n writerSheepW.write(sheepWeight.getText());\n writerSheepW.close();\n\n BufferedWriter writergoatW = new BufferedWriter(new FileWriter(\"goatWeight.txt\"));\n writergoatW.write(goatWeight.getText());\n writergoatW.close();\n\n BufferedWriter writerChickenW = new BufferedWriter(new FileWriter(\"chickenWeight.txt\"));\n writerChickenW.write(chickenWeight.getText());\n writerChickenW.close();\n\n BufferedWriter writerduckW = new BufferedWriter(new FileWriter(\"duckWeight.txt\"));\n writerduckW.write(duckWeight.getText());\n writerduckW.close();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void saveFile(File file) {\n\t\ttry {\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\n\t\t\t\n\t\t\tfor (QuizCard card : cardList) {\n\t\t\t\twriter.write(card.getQuestion() + \"/\");\n\t\t\t\twriter.write(card.getAnswer() + \"\\n\");\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void saveIds(ArrayList<String> idList) {\n\n\t\ttry {\n\t\t\tFileOutputStream fileOutputStream = context.openFileOutput(\n\t\t\t\t\tSAVE_FILE, Context.MODE_PRIVATE);\n\t\t\tOutputStreamWriter outputStreamWriter = new OutputStreamWriter(\n\t\t\t\t\tfileOutputStream);\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\t\t\tGson gson = builder.create();\n\t\t\tgson.toJson(idList, outputStreamWriter); // Serialize to Json\n\t\t\toutputStreamWriter.flush();\n\t\t\toutputStreamWriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void saveInformation(){\n market.saveInformationOfMarket();\n deckProductionCardOneBlu.saveInformationOfProductionDeck();\n deckProductionCardOneGreen.saveInformationOfProductionDeck();\n deckProductionCardOneViolet.saveInformationOfProductionDeck();\n deckProductionCardOneYellow.saveInformationOfProductionDeck();\n deckProductionCardThreeBlu.saveInformationOfProductionDeck();\n deckProductionCardThreeGreen.saveInformationOfProductionDeck();\n deckProductionCardThreeYellow.saveInformationOfProductionDeck();\n deckProductionCardThreeViolet.saveInformationOfProductionDeck();\n deckProductionCardTwoBlu.saveInformationOfProductionDeck();\n deckProductionCardTwoGreen.saveInformationOfProductionDeck();\n deckProductionCardTwoViolet.saveInformationOfProductionDeck();\n deckProductionCardTwoYellow.saveInformationOfProductionDeck();\n\n\n }", "public void saveGame(){\n updateProperties();\n try {\n output = new FileOutputStream(fileName);\n properties.store(output, null); //saving properties to file\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO SAVE GAME ---\");\n e.printStackTrace();\n } finally {\n if (output != null) {\n try {\n output.close();\n System.out.println(\"--- GAME SAVED ---\");\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO CLOSE OUTPUT ---\");\n e.printStackTrace();\n }\n }\n }\n }", "private static void writeToBooksFile() throws IOException{\n\t\tFileWriter fw = new FileWriter(BOOKS_FILE, false); //overwrites the students.txt file\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\n\t\tSet<Integer> keys = ALL_BOOKS.keySet(); //returns list of all keys in ALL_BOOKS\n\t\tfor(int key : keys){\n\t\t\tbw.write(ALL_BOOKS.get(key).ParseForTextFile()); //writes the Parsed Form of the BookDetails object to the books.txt file\n\t\t}\n\t\tbw.close();\n\t}", "public void saveFile(String theFileLocation){\r\n try {\r\n File fileArchive = new File(theFileLocation);\r\n if (!fileArchive.exists()){ //if there is no file then it creates a new file\r\n fileArchive.createNewFile();\r\n }\r\n FileWriter fW = new FileWriter(theFileLocation);\r\n BufferedWriter bW = new BufferedWriter(fW);\r\n \r\n for (int p = 0; p < buckets.length; p++){\r\n for (int i = 0; i < buckets[p].size(); i++){\r\n EmployeeInfo theEmployee = buckets[p].get(i);\r\n \r\n if (theEmployee instanceof FTE){\r\n bW.write(\"FTE\");\r\n bW.write(\"*\");\r\n } else {\r\n if (theEmployee instanceof PTE){\r\n bW.write(\"PTE\");\r\n bW.write(\"*\");\r\n } \r\n }\r\n // general for both\r\n bW.write(Integer.toString(theEmployee.getEmpNum()));;\r\n bW.write(\"*\");\r\n bW.write(theEmployee.getFirstName());\r\n bW.write(\"*\");\r\n bW.write(theEmployee.getLastName());\r\n bW.write(\"*\");\r\n bW.write(Integer.toString(theEmployee.getGender()));\r\n bW.write(\"*\");\r\n bW.write(Integer.toString(theEmployee.getWorkLoc()));\r\n bW.write(\"*\");\r\n bW.write(Integer.toString(theEmployee.getEmpRole()));\r\n bW.write(\"*\");\r\n bW.write(Double.toString(theEmployee.getDeductRate()));\r\n bW.write(\"*\");\r\n \r\n if (theEmployee instanceof FTE){\r\n FTE theFTE = (FTE) theEmployee;\r\n bW.write(Double.toString(theFTE.yearlySalary));\r\n\r\n } else {\r\n if (theEmployee instanceof PTE){\r\n PTE thePTE = (PTE) theEmployee;\r\n bW.write(Double.toString(thePTE.hourlyWage));\r\n bW.write(\"*\");\r\n bW.write(Double.toString(thePTE.hoursPerWeek));\r\n bW.write(\"*\");\r\n bW.write(Double.toString(thePTE.weeksPerYear));\r\n } \r\n }\r\n \r\n bW.newLine(); \r\n \r\n }\r\n \r\n }\r\n bW.write(\"$$$$$$$\");\r\n bW.close();\r\n }\r\n \r\n catch (IOException IOE){\r\n IOE.printStackTrace();\r\n }\r\n }", "public void saveGame(String fileName){\n try {\n File file1 = new File(fileName);\n FileOutputStream fileOutputStream = new FileOutputStream(file1);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(this);\n }catch (Exception e){\n System.err.println(\"Error when saving file\");\n }\n }", "private void writeToFile(){\r\n File file = new File(\"leaderboard.txt\");\r\n\r\n try {\r\n FileWriter fr = new FileWriter(file, true);\r\n BufferedWriter br = new BufferedWriter(fr);\r\n for(Player player : this.sortedPlayers){\r\n br.write(player.toString());\r\n br.write(\"\\n\");\r\n }\r\n br.close();\r\n fr.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public void saveAllLists() {\n // else: create \"ToDoList\" folder\n // Get all lists and their corresponding items via a while loop that loops\n // through the ComboBox's values and creates .txt files for each list\n // Create a new .txt of name list\n // This will need some sort of nested loop, the outer looping through the lists\n // and the inner looping through the items of that list\n // Store inside of the current .txt\n // Close the .txt\n }", "public static void savePracticeListToFile()\n throws IOException {\n JSONArray wordsToSave = new JSONArray();\n\n for (Word word : getPracticedWords()) {\n Word word2 = word;\n wordsToSave.add(word2.wordToJSONObject());\n }\n\n try (FileWriter fileWriter = new FileWriter(\"src/practiceList.json\")) {\n fileWriter.write(wordsToSave.toJSONString());\n fileWriter.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void writeAll(){\n try (BufferedWriter ignored = new BufferedWriter(new FileWriter(this.fileName))) {\n Iterable<E> values=entities.values();\n values.forEach(this::writeToFile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void saveFile() {\n LOG.fine(\"no.of viewers:\" + viewers.size());\n // assuming the widget that is active is the dirty widget. save it\n for (FileViewer viewer : viewers) {\n if (viewer.isDirty()) {\n saveFile(viewer);\n break;\n }\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 save(){\n try {\n FileOutputStream outputStream = getContext().openFileOutput(\"com_petros_cmsc434doodler_imageFile\", Context.MODE_PRIVATE);\n for(int i = 0; i<pathStack.size(); i++){\n outputStream.write((int)paintStack.get(i).getStrokeWidth()); //One byte is enough, max if 50\n outputStream.write(paintStack.get(i).getAlpha());\n //Red, Green, Blue\n outputStream.write((paintStack.get(i).getColor() & 0xFF0000) >> (4*4));\n outputStream.write((paintStack.get(i).getColor() & 0xFF00) >> (2*4));\n outputStream.write(paintStack.get(i).getColor() & 0xFF);\n\n outputStream.write(NEXT_LINE);\n for(int j = 0; j < pathPointsStack.get(i).size(); j+=2){\n //First point - have to save points byte at a time.\n outputStream.write(pathPointsStack.get(i).get(j) >> (6*4));\n outputStream.write(pathPointsStack.get(i).get(j) >> (4*4));\n outputStream.write(pathPointsStack.get(i).get(j) >> (2*4));\n outputStream.write(pathPointsStack.get(i).get(j));\n //Second point\n outputStream.write(pathPointsStack.get(i).get(j+1) >> (6*4));\n outputStream.write(pathPointsStack.get(i).get(j+1) >> (4*4));\n outputStream.write(pathPointsStack.get(i).get(j+1) >> (2*4));\n outputStream.write(pathPointsStack.get(i).get(j+1));\n if(j+2 == pathPointsStack.get(i).size()){\n outputStream.write(NEXT_PATH);\n }\n else{\n outputStream.write(NEXT_LINE);\n }\n }\n }\n outputStream.write(END_OF_PATHS);\n outputStream.close();\n } catch (Exception e) {\n Toast.makeText(getContext(), \"Error saving the file\", Toast.LENGTH_SHORT).show();\n }\n }", "public void save(File filename) throws IOException {\n ObjectOutputStream outputStream = null;\n try {\n outputStream = new ObjectOutputStream(new FileOutputStream(filename));\n outputStream.writeObject(this.getHighScores());\n } catch (IOException e) {\n System.out.println(\"cannot save to file\");\n } finally {\n if (outputStream != null) { // Exception might have happened at constructor\n try {\n outputStream.close();\n } catch (IOException e) {\n System.out.println(\" Failed closing the file !\");\n }\n }\n }\n }", "public void save(String fileName){\r\n \tint k = 0;\r\n \t\t\r\n try{\r\n \r\n File f = new File(fileName + \".txt\");\r\n \t//Next line checks if the file already exists.\r\n \t if(f.exists()){\r\n \t \t\r\n \t \t//If it does, we have to ask the user if they\r\n \t \t//want to overwrite it.\r\n \t \t System.out.println(\"A file by this name already exists.\");\r\n \t \t System.out.println(\"Do you want to overwrite it? (Y/N)\");\r\n \t \t Scanner ans = new Scanner(System.in);\r\n \t \t char answer = ans.next().toUpperCase().charAt(0);\r\n \t \t \r\n \t \t \t//If they are comfortable overwriting the already\r\n \t \t \t//existing file, we save the items to the file.\r\n \t \t if(answer == 'Y'){\r\n \t \t \t\t//If the file exists, we have to delete it then\r\n \t \t \t\t//save a new one with that name. This is because\r\n \t \t \t\t//if the file has 6 elements, but the arrayList\r\n \t \t \t\t//only has 4, then only the first 4 of the 6 in the\r\n \t \t \t\t//file are overwritten. So we delete it and create\r\n \t \t \t\t//a new file with the name. If we're over writing,\r\n \t \t \t\t//then we don't care to keep whats in the existing\r\n \t \t \t\t//file.\r\n \t \t \tboolean success = f.delete();\r\n \t \t \tif(success == false) {\r\n \t \t \t\tSystem.out.println(\"Cannot delete file \" + f.getName());\r\n \t \t \t\tSystem.out.println(\"Check if the file is opened by another program and try again...\");\r\n \t \t \t\treturn;\r\n \t \t \t}\r\n \t }else if(answer == 'N'){\r\n \t \tSystem.out.println(\"Try again and enter a different file name.\");\r\n \t \treturn;\r\n \t } else {\r\n \t \tSystem.out.println(\"The answer has to be 'Y' or 'N'. Try again...\");\r\n \t \treturn;\r\n \t }\r\n \t \r\n }\r\n \t//If there is no already existing file by that name,\r\n \t//then the items are saved to this new file.\r\n\t\tFileWriter writer = new FileWriter(fileName + \".txt\");\r\n \r\n\t \twhile(k < items.size()){\r\n \t\t writer.write(items.get(k) + \"\\r\\n\");\r\n \t \tk++;\r\n\t \t}\r\n\t \twriter.close();\r\n\t \tSystem.out.println(\"Saved to: \" + fileName + \".txt\");\r\n\r\n }catch(IOException e){\r\n System.out.println(\"Something went wrong with accessing the file.\");\r\n }\r\n }" ]
[ "0.6511872", "0.6430145", "0.64291894", "0.64284974", "0.6393656", "0.6350425", "0.63405615", "0.62652564", "0.6262918", "0.6253857", "0.6249884", "0.62058496", "0.6196884", "0.61809194", "0.6153834", "0.6126107", "0.6083064", "0.6076808", "0.6068822", "0.604469", "0.599924", "0.5984163", "0.598087", "0.59797853", "0.5979739", "0.5968649", "0.5959769", "0.5930146", "0.59290427", "0.5927624", "0.59062207", "0.5901795", "0.5895796", "0.58934134", "0.58919317", "0.5880792", "0.58731604", "0.58696747", "0.5860279", "0.5859424", "0.5841839", "0.5822422", "0.58167285", "0.58149874", "0.58015615", "0.5801038", "0.57986844", "0.5793823", "0.5792195", "0.579086", "0.578853", "0.5780014", "0.57778513", "0.57764065", "0.57666796", "0.57569605", "0.5755479", "0.5751556", "0.5748981", "0.57454133", "0.5742832", "0.5739653", "0.5738212", "0.57359725", "0.5713625", "0.570438", "0.57022023", "0.56819475", "0.56818503", "0.56737196", "0.5672807", "0.5669999", "0.5652273", "0.56505466", "0.56503475", "0.5637642", "0.56371784", "0.56364375", "0.5636229", "0.5631723", "0.56262934", "0.5624507", "0.5622419", "0.5622283", "0.5619709", "0.5609527", "0.5609462", "0.5608042", "0.56074065", "0.5602492", "0.5601183", "0.5597161", "0.5596764", "0.55950445", "0.5594173", "0.55927217", "0.5592149", "0.5587253", "0.55863386", "0.55857027" ]
0.8014047
0
Read the lottery file saves.
public static void readLotteryFiles() { for (int index = 0; index < NpcHandler.npcs.length; index++) { Npc npc = NpcHandler.npcs[index]; if (npc == null) { continue; } if (npc.npcType == 11057) { lotteryNpcIndex = npc.npcIndex; } } try { totalTicketsPurchased = Integer.parseInt(FileUtility.readFirstLine(TOTAL_TICKETS_FILE)); } catch (Exception e) { e.printStackTrace(); } ArrayList<String> data = FileUtility.readFile(LOTTERY_ENTRIES_FILE); for (int index = 0; index < data.size(); index++) { String parse[] = data.get(index).split(ServerConstants.TEXT_SEPERATOR); String name = parse[0]; int ticketsPurchased = Integer.parseInt(parse[1]); LotteryDatabase.lotteryDatabase.add(new LotteryDatabase(name, ticketsPurchased)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void saveLotteryFiles() {\n\t\tFileUtility.deleteAllLines(TOTAL_TICKETS_FILE);\n\t\tFileUtility.deleteAllLines(LOTTERY_ENTRIES_FILE);\n\t\tFileUtility.addLineOnTxt(TOTAL_TICKETS_FILE, totalTicketsPurchased + \"\");\n\n\t\tArrayList<String> line = new ArrayList<String>();\n\t\tfor (int index = 0; index < LotteryDatabase.lotteryDatabase.size(); index++) {\n\t\t\tLotteryDatabase data = LotteryDatabase.lotteryDatabase.get(index);\n\t\t\tline.add(data.getPlayerName() + ServerConstants.TEXT_SEPERATOR + data.getTicketsPurchased());\n\t\t}\n\t\tFileUtility.saveArrayContentsSilent(LOTTERY_ENTRIES_FILE, line);\n\t}", "private void getCoins() throws IOException{\r\n\t\tFile file = new File(\".coinSave\");\r\n\t\tif (! file.exists()) {\r\n\t\t\tfile.createNewFile();\r\n\t\t} else {\r\n\t\t\tFileReader fr = new FileReader(file);\r\n\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\tString str;\r\n\t\t\tstr = br.readLine();\r\n\t\t\t_hiddenCoins = Integer.parseInt(str);\r\n\t\t}\r\n\t}", "private static ArrayList<String> fetchSaved() {\n\t\tScanner s;\n\t\tint count = 0;\n\t\tArrayList<String> savedList = new ArrayList<String>();\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"saved.txt\"));\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tsavedList.add(s.next());\n\t\t\t\tcount += 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"Number of converted urls fetched: \" + count);\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn savedList;\n\t}", "private void saveInFile() {\n try {\n FileOutputStream fos = openFileOutput(FILENAME,\n Context.MODE_PRIVATE);//goes stream based on filename\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos)); //create buffer writer\n Gson gson = new Gson();\n gson.toJson(countbookList, out);//convert java object to json string & save in output\n out.flush();\n fos.close();\n } catch (FileNotFoundException e) {\n throw new RuntimeException();\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }", "private void saveInFile() {\n try {\n FileOutputStream fOut = openFileOutput(FILENAME,\n Context.MODE_PRIVATE);\n\n OutputStreamWriter writer = new OutputStreamWriter(fOut);\n Gson gson = new Gson();\n gson.toJson(counters, writer);\n writer.flush();\n\n fOut.close();\n\n } catch (FileNotFoundException e) {\n throw new RuntimeException();\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }", "private void readSavedFile() {\n\n String[] files = new String[0];\n \n // On récupère la liste des fichiers\n File file = new File(folderName);\n\n // check if the specified pathname is directory first\n if(file.isDirectory()){\n //list all files on directory\n files = file.list();\n }\n\n if (files != null) {\n for(String currentFile : files) {\n Vehicule voiture;\n try {\n FileInputStream fileIn = new FileInputStream(folderName + \"/\" + currentFile);\n ObjectInputStream in = new ObjectInputStream(fileIn);\n voiture = (Vehicule) in.readObject();\n addVoitureToList(voiture);\n in.close();\n fileIn.close();\n } catch (IOException i) {\n i.printStackTrace();\n return;\n } catch (ClassNotFoundException c) {\n System.out.println(\"#Erreur : Impossible de récupérer l'objet \" + currentFile);\n c.printStackTrace();\n return;\n }\n }\n }\n }", "void readFiles(Boolean smart) \n\t//throws IOException// more here for safety\n\t{\n\t\tint i;\n\t\tfor (i = 0; i<165; ++i)\n\t\tfor (int j = 0; j<11; ++j)\n\t\t{\t//if(smart)memoryFile.readInt(board(i,j));\n\t\t\t//else \n\t\t\t\tboard[i][j] = 0;\n\t\t}\n\t\t//try memoryFileStream.close(); catch (IOException e);\n\t}", "private void readFileAndStoreData_(String fileName) {\n In in = new In(fileName);\n int numberOfTeams = in.readInt();\n int teamNumber = 0;\n while (!in.isEmpty()) {\n assignTeam_(in, teamNumber);\n assignTeamInfo_(in, numberOfTeams, teamNumber);\n teamNumber++;\n }\n }", "public static void readFile() {\n\t\tbufferedReader = null;\n\t\ttry {\n\t\t\tFileReader fileReader = new FileReader(\"/home/bridgeit/Desktop/number.txt\");\n\t\t\tbufferedReader = new BufferedReader(fileReader);\n\n\t\t\tString line;\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\tString[] strings = line.split(\" \");\n\t\t\t\tfor (String integers : strings) {\n\t\t\t\t\thl.add(Integer.parseInt(integers));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File Not Found...\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tbufferedReader.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void readFile(){\n try {\n highscores = new ArrayList<>();\n BufferedReader br = new BufferedReader(new FileReader(\"Highscores.txt\"));\n String line = br.readLine();\n while (line != null){\n try{\n highscores.add(Integer.parseInt(line));\n } catch (NumberFormatException e){}\n line = br.readLine();\n }\n br.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"No file found\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void read_file() throws FileNotFoundException, IOException {\n FileReader fw;\r\n BufferedReader rw;\r\n fw = new FileReader(\"dat.txt\");\r\n rw = new BufferedReader(fw);\r\n\r\n String s;\r\n Boy b;\r\n int i, at, intl, bud;\r\n nb = Integer.parseInt(rw.readLine());\r\n for (i = 1; i <= nb; i++) {\r\n s = rw.readLine();\r\n StringTokenizer st = new StringTokenizer(s, \",\");\r\n String name = st.nextToken();\r\n at = Integer.parseInt(st.nextToken());\r\n intl = Integer.parseInt(st.nextToken());\r\n bud = Integer.parseInt(st.nextToken());\r\n String type = st.nextToken();\r\n b = new Boy(name, at, intl, bud, type);\r\n boy_arr.add(b);\r\n }\r\n ng = Integer.parseInt(rw.readLine());\r\n Girl g;\r\n for (i = 1; i <= ng; i++) {\r\n s = rw.readLine();\r\n StringTokenizer st = new StringTokenizer(s, \",\");\r\n String name = st.nextToken();\r\n at = Integer.parseInt(st.nextToken());\r\n intl = Integer.parseInt(st.nextToken());\r\n bud = Integer.parseInt(st.nextToken());\r\n String type = st.nextToken();\r\n g = new Girl(name, at, intl, bud, type);\r\n girl_arr.add(g);\r\n }\r\n fw = new FileReader(\"gift.txt\");\r\n rw = new BufferedReader(fw);\r\n String ty, gid;\r\n int cs, vl,ngg;\r\n ngg = Integer.parseInt(rw.readLine());\r\n for (i = 1; i <= ngg; i++) {\r\n s = rw.readLine();\r\n StringTokenizer st = new StringTokenizer(s, \",\");\r\n gid = st.nextToken();\r\n cs = Integer.parseInt(st.nextToken());\r\n vl = Integer.parseInt(st.nextToken());\r\n ty = st.nextToken();\r\n Gift gf = new Gift(ty, cs, vl, gid);\r\n gift_arr.add(gf);\r\n }\r\n Collections.sort(gift_arr, new Compare());\r\n}", "public void fileReadGameHistory(String filename)\n {\n \t//ArrayList<GameObject> gameObject = new ArrayList<>();\n\t\tFileReader file = null;\n\t\ttry {\n\t\t\tfile = new FileReader(filename);\n\t\t} catch (FileNotFoundException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(filename);\n\t\tBufferedReader br = new BufferedReader(file);\n\t\tString s = \"\";\n\t\ttry\n\t\t{\n\t\t\twhile((s = br.readLine()) != null )\n\t\t\t{\n\t\t\t\tString[] prop1 = s.split(\"#\");\n\t\t\t\tSystem.out.println(prop1[0] + \" fgdfsgfds \" + prop1[1]);\n\t\t\t\tString indexOfList = prop1[0];\n\t\t\t\tString[] prop2 = prop1[1].split(\",\");\n\t\t\t\tString[] prop3;\n\t\t\t\tString[] prop4 = indexOfList.split(\";\");\n\t\t\t\t//gameObject.add(new GameObject(indexOfList));\n\t\t\t\tcount = count +1;\n\t\t\t\texistCount = existCount + 1;\n\t\t\t\tif (indexOfList.charAt(0) == 's')//when this line is data of a swimming game\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(prop4[0]);\n\t\t\t\t\tgames.add(new Swimming(prop4[1],\"Swimming\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'c')//when this line is data of a cycling game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Cycling(prop4[1],\"Cycling\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'r')//when this line is data of a running game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Running(prop4[1],\"Running\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (NumberFormatException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "private void updateFile() {\n\t\tPrintWriter outfile;\n\t\ttry {\n\t\t\toutfile = new PrintWriter(new BufferedWriter(new FileWriter(\"stats.txt\")));\n\t\t\toutfile.println(\"15\"); // this is the number\n\t\t\tfor (Integer i : storeInfo) {\n\t\t\t\toutfile.println(i); // we overwrite the existing files\n\t\t\t}\n\t\t\tfor (String s : charBought) {\n\t\t\t\toutfile.println(s); // overwrite the character\n\t\t\t}\n\t\t\tfor (String s : miscBought) {\n\t\t\t\toutfile.println(s);\n\t\t\t}\n\t\t\toutfile.close();\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tSystem.out.println(ex);\n\t\t}\n\t}", "public void readInPasswords(){\n String fileName = \"all_passwords.txt\";\n String nextLine = null;\n String [] temp;\n\n try{\n FileReader reader = new FileReader(fileName);\n BufferedReader bufferedReader = new BufferedReader(reader);\n \n while((nextLine = bufferedReader.readLine()) != null){\n temp = nextLine.split(\",\");\n if(temp[0].length() == 5)\n passwords.insertKey(temp[0], Double.parseDouble(temp[1]));\n }\n }catch(FileNotFoundException e){\n System.out.println(\"Unable to open file \" + fileName);\n }catch(IOException ex){\n System.out.println(\"Error reading file: \" + fileName);\n }\n \n }", "void saveBookMark(){\n File dotFile = new File( bmFile);\n FileWriter fw;\n BufferedWriter bw;\n PrintWriter pw;\n String str;\n\n // open dotFile\n try{\n // if there is not dotFile, create new one\n fw = new FileWriter( dotFile );\n bw = new BufferedWriter( fw );\n pw = new PrintWriter( bw );\n //write\n for(int i=0;i<MAX_BOOKMARK;i++){\n str = miBookMark[i].getText();\n pw.println(str);\n }\n pw.close();\n bw.close();\n fw.close();\n }catch(IOException e){\n }\n }", "public void readFile() {\n ArrayList<Movement> onetime = new ArrayList<Movement>(); \n Movement newone = new Movement(); \n String readLine; \n\n File folder = new File(filefolder); \n File[] listOfFiles = folder.listFiles(); \n for (File file : listOfFiles) {\n if (file.isFile()&& file.getName().contains(\"200903\")) {\n try {\n onetime = new ArrayList<Movement>(); \n newone = new Movement(); \n BufferedReader br = new BufferedReader(new FileReader(filefolder+\"\\\\\"+file.getName())); \n readLine = br.readLine (); \n String[] previouline = readLine.split(\",\"); \n int previousint = Integer.parseInt(previouline[7]); \n while ( readLine != null) {\n String[] currentline = readLine.split(\",\"); \n if (Integer.parseInt(currentline[7]) == previousint)\n {\n newone.addRecord(currentline[0], currentline[1], currentline[2], currentline[4], currentline[5], currentline[6]); \n newone.ID = Integer.parseInt(currentline[7]); \n newone.filedate = file.getName();\n } else\n { \n onetime.add(newone); \n newone = new Movement(); \n newone.addRecord(currentline[0], currentline[1], currentline[2], currentline[4], currentline[5], currentline[6]);\n }\n previousint = Integer.parseInt(currentline[7]); \n readLine = br.readLine ();\n }\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n rawdata.add(onetime);\n } \n }\n println(rawdata.size());\n}", "public ArrayList load() {\n File savefile = new File(\"bookings.txt\");\r\n try {\r\n if (savefile.createNewFile()) {\r\n System.out.println(\"Save file doesnt exist, creating...\");\r\n\r\n try {\r\n FileWriter writer = new FileWriter(savefile);\r\n\r\n for (int x = 0; x <= 89; x = x + 1) {\r\n String stringbuild = (x + \",false,none\");\r\n writer.write(stringbuild + \"\\n\");\r\n }\r\n writer.flush();\r\n writer.close();\r\n } catch (IOException ex) {\r\n Logger.getLogger(ParseBookings.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n } else {\r\n System.out.println(\"Save file exists. Will load...\");\r\n }\r\n } catch (IOException ex) {\r\n Logger.getLogger(ParseBookings.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n System.out.println(\"Loading Started...\");\r\n\r\n ArrayList Seats = new ArrayList();\r\n ArrayList Seats_Bronze = new ArrayList();\r\n ArrayList Seats_Silver = new ArrayList();\r\n ArrayList Seats_Gold = new ArrayList();\r\n\r\n try {\r\n File file = new File(\"bookings.txt\");\r\n FileReader filereader = new FileReader(file);\r\n BufferedReader bufferedreader = new BufferedReader(filereader);\r\n\r\n String buffer;\r\n while ((buffer = bufferedreader.readLine()) != null) {\r\n String[] buffersplit = buffer.split(\",\", -1);\r\n int index = Integer.parseInt(buffersplit[0]);\r\n if (index < 30) {\r\n //System.out.println(\"Bronze @ \"+index);\r\n\r\n Seat_Bronze bseat_ = new Seat_Bronze();\r\n bseat_.setID(index);\r\n bseat_.setBooked(Boolean.parseBoolean(buffersplit[1]), buffersplit[2]);\r\n Seats_Bronze.add(bseat_);\r\n\r\n } else if (59 >= index && index > 29) {\r\n //System.out.println(\"Silver @ \"+index);\r\n\r\n Seat_Silver sseat_ = new Seat_Silver();\r\n sseat_.setID(index);\r\n sseat_.setBooked(Boolean.parseBoolean(buffersplit[1]), buffersplit[2]);\r\n Seats_Silver.add(sseat_);\r\n\r\n } else {\r\n //System.out.println(\"Gold @\"+index);\r\n\r\n Seat_Gold gseat_ = new Seat_Gold();\r\n gseat_.setID(index);\r\n gseat_.setBooked(Boolean.parseBoolean(buffersplit[1]), buffersplit[2]);\r\n Seats_Gold.add(gseat_);\r\n\r\n }\r\n\r\n }\r\n\r\n Seats.add(Seats_Bronze);\r\n Seats.add(Seats_Silver);\r\n Seats.add(Seats_Gold);\r\n System.out.println(\"Loading Complete.\");\r\n System.out.println(\"Loaded B/S/G: \" + Seats_Bronze.size() + \"/\" + Seats_Silver.size() + \"/\" + Seats_Gold.size());\r\n\r\n return Seats;\r\n\r\n } catch (FileNotFoundException ex) {\r\n Logger.getLogger(ParseBookings.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(ParseBookings.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return null;\r\n }", "public void acomodaBloques() throws IOException {\n try { // checa si encontro el archivo\n // se lee el archivo\n bfrEntrada = new BufferedReader(new FileReader(\"coordenadas.txt\"));\n } catch (FileNotFoundException fnfEx) { // si no lo encuentra\n // Se crea el archivo con los datos iniciales del juego\n PrintWriter prwSalida\n = new PrintWriter(new FileWriter(\"coordenadas.txt\"));\n prwSalida.println(\"29,174\");\n prwSalida.println(\"62,182\");\n prwSalida.println(\"95,70\");\n prwSalida.println(\"95,127\");\n prwSalida.println(\"95,184\");\n prwSalida.println(\"128,72\");\n prwSalida.println(\"128,129\");\n prwSalida.println(\"128,186\");\n prwSalida.println(\"161,76\");\n prwSalida.println(\"161,131\");\n prwSalida.println(\"161,188\");\n prwSalida.println(\"194,78\");\n prwSalida.println(\"194,133\");\n prwSalida.println(\"194,190\");\n prwSalida.println(\"227,78\");\n prwSalida.println(\"227,133\");\n prwSalida.println(\"227,190\");\n prwSalida.println(\"260,76\");\n prwSalida.println(\"260,131\");\n prwSalida.println(\"260,188\");\n prwSalida.println(\"293,72\");\n prwSalida.println(\"293,129\");\n prwSalida.println(\"293,186\");\n prwSalida.println(\"326,70\");\n prwSalida.println(\"326,127\");\n prwSalida.println(\"326,184\");\n prwSalida.println(\"359,182\");\n prwSalida.println(\"392,174\");\n prwSalida.println(\"95,267\");\n prwSalida.println(\"128,267\");\n prwSalida.println(\"161,267\");\n prwSalida.println(\"194,286\");\n prwSalida.println(\"227,286\");\n prwSalida.println(\"260,267\");\n prwSalida.println(\"293,267\");\n prwSalida.println(\"326,267\");\n prwSalida.println(\"100,324\");\n prwSalida.println(\"133,324\");\n prwSalida.println(\"166,324\");\n prwSalida.println(\"255,324\");\n prwSalida.println(\"288,324\");\n prwSalida.println(\"321,324\");\n prwSalida.println(\"111,440\");\n prwSalida.println(\"144,411\");\n prwSalida.println(\"177,411\");\n prwSalida.println(\"210,425\");\n prwSalida.println(\"243,411\");\n prwSalida.println(\"276,411\");\n prwSalida.println(\"309,440\");\n prwSalida.println(\"144,468\");\n prwSalida.println(\"177,497\");\n prwSalida.println(\"210,516\");\n prwSalida.println(\"243,497\");\n prwSalida.println(\"276,468\");\n prwSalida.close();\n // se lee el archivo\n bfrEntrada = new BufferedReader(new FileReader(\"coordenadas.txt\"));\n }\n // se llena la lista de bloques\n for (int iI = 0; iI < iNumBloques; iI++) {\n // se carga la imagen del alien corredor\n URL urlImagenCaminador\n = this.getClass().getResource(\"barrilBB.png\");\n // se crea un alien corredor\n Objeto objBloque = new Objeto(0, 0,\n Toolkit.getDefaultToolkit().getImage(urlImagenCaminador));\n\n // Se lee la primera linea (vidas)\n String sDato = bfrEntrada.readLine();\n // se dividen los datos en un arreglo\n strArrDatos = sDato.split(\",\");\n // se asigna el primer dato a la posX\n objBloque.setX((Integer.parseInt(strArrDatos[0])));\n // se asigna el segundo dato a la posX\n objBloque.setY((Integer.parseInt(strArrDatos[1])));\n // Se agrega al caminador a la lista de corredores\n lnkBloques.add(objBloque);\n }\n //Se le agrega poderes a bloques al azar\n //Se le agrega poderes a bloques al azar\n for(int iI=0; iI<lnkBloques.size(); iI++) {\n if(1 == ((int) (1 + Math.random() * 2))) {\n Objeto objPoderosos = (Objeto) lnkBloques.get((int) \n (1 + Math.random() * 50));\n objPoderosos.setPoder((int) (1 + Math.random() * 3));\n }\n \n }\n }", "private void readFile() {\n\t\tint newPlayerScore = level.animal.getPoints();\n\t\t\n\t\tlevel.worDim = 30;\n\t\tlevel.wordShift = 25;\n\t\tlevel.digDim = 30;\n\t\tlevel.digShift = 25;\n\t\t\n\t\tfor( int y =0; y<10; y++ ) { //display placeholder numbers\n\t\t\tfor( int x=0; x<4; x++ ) {\n\t\t\t\tbackground.add(new Digit( 0, 30, 470 - (25*x), 200 + (35*y) ) );\n\t\t\t}\n\t\t}\n\t\t\n\t\ttry { //display highscores from highscores.txt\n\t\t\tScanner fileReader = new Scanner(new File( System.getProperty(\"user.dir\") + \"\\\\highscores.txt\"));\n\t\t\t\n\t\t\tint loopCount = 0;\n\t\t\twhile( loopCount < 10 ) {\n\t\t\t\tString playerName = fileReader.next() ;\n\t\t\t\tString playerScore = fileReader.next() ;\n\t\t\t\tint score=Integer.parseInt(playerScore);\n\t\t\t\t\n\t\t\t\tif( newPlayerScore >= score && newHighScore == false ) {\n\t\t\t\t\tstopAt = loopCount;\n\t\t\t\t\tnewHighScore = true;\n\t\t\t\t\tlevel.wordY = 200 + (35*loopCount);\n\t\t\t\t\t\n\t\t\t\t\tpointer = new Icon(\"pointer.png\", 30, 75, 200 + (35*loopCount) );// add pointer indicator\n\t\t\t\t\tbackground.add( pointer ); \n\t\t\t\t\tlevel.setNumber(newPlayerScore, 470, 200 + (35*loopCount));\n\t\t\t\t\tloopCount += 1;\n\t\t\t\t\tlevel.setWord(playerName, 10, 100, 200 + (35*loopCount));\n\t\t\t\t\tlevel.setNumber(score, 470, 200 + (35*loopCount));\n\t\t\t\t\tloopCount += 1;\n\t\t\t\t}else {\n\t\t\t\t\tlevel.setWord(playerName, 10, 100, 200 + (35*loopCount));\n\t\t\t\t\tlevel.setNumber(score, 470, 200 + (35*loopCount));\n\t\t\t\t\tloopCount += 1;\n\t\t\t\t}\n\t\t\t}//end while\n\t\t\tfileReader.close();\n\t\t\tif( newHighScore ) {\n\t\t\t\tnewHighScoreAlert();\n\t\t\t}else {\n\t\t\t\tgameOverAlert();\n\t\t\t}\n } catch (Exception e) {\n \tSystem.out.print(\"ERROR: Line 168: Unable to read file\");\n //e.printStackTrace();\n }\n\t}", "private void saveGenres(){\n\t\tFile genreList = new File(Paths.get(\"genres.txt\").toString());\n\t\ttry{\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(genreList));\n\t\t\tfor (String s : genres){\n\t\t\t\twriter.write(s);\n\t\t\t\twriter.newLine();\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch(IOException ex){\n\t\t\t\n\t\t}\n\t}", "private void writeToFile(){\n try(BufferedWriter br = new BufferedWriter(new FileWriter(filename))){\n for(Teme x:getAll())\n br.write(x.toString()+\"\\n\");\n br.close();\n }catch (IOException e){\n e.printStackTrace();\n }\n }", "private void readScores() {\n final List<Pair<String, Integer>> list = new LinkedList<>();\n try (DataInputStream in = new DataInputStream(new FileInputStream(this.file))) {\n while (true) {\n /* reads the name of the player */\n final String name = in.readUTF();\n /* reads the score of the relative player */\n final Integer score = Integer.valueOf(in.readInt());\n list.add(new Pair<String, Integer>(name, score));\n }\n } catch (final Exception ex) {\n }\n this.sortScores(list);\n /* if the list was modified by the cutting method i need to save it */\n if (this.cutScores(list)) {\n this.toSave = true;\n }\n this.list = Optional.of(list);\n\n }", "public void numeros() {\r\n \tint[] lista= new int[3001];\r\n\r\n\t\tFile crear = new File (\"Numerosaleatorios.txt\");\r\n \r\n\t\tFileWriter escribir = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tescribir = new FileWriter (crear);\r\n\t\t\tBufferedWriter escribir1 = new BufferedWriter (escribir);\r\n\t\t\tint linea;\r\n\t\t\tRandom aleatorios = new Random();\r\n\t\t\tfor (int i =0; i<3000; i++) {\r\n\t\t\t\tlinea = aleatorios.nextInt(1000);\r\n\t\t\t\tlista[i]= aleatorios.nextInt(1000);\r\n\t\t\t\tescribir1.write(linea + \"\\n\");\r\n\t\t}\r\n\t\t\r\n\t\tescribir.close();\r\n\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(0);\r\n\t}\r\n\t}", "private ArrayList<Integer> fileReader() {\n ArrayList<Integer> data = new ArrayList<>();\n try {\n Scanner scanner = new Scanner(new File(\"andmed.txt\"));\n while (scanner.hasNextLine()) {\n data.add(Integer.valueOf(scanner.nextLine()));\n }\n scanner.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return data;\n }", "public void whatGame() throws IOException{\n try{\n inFile = new Scanner(new File(\"output.txt\"));\n } catch (InputMismatchException e) {\n System.err.printf(\"ERROR: Cannot open %s\\n\", \"output.txt\");\n System.exit(1);\n }\n \n gameNumber = inFile.nextInt();\n System.out.println(gameNumber);\n inFile.close();\n \n try {\n outFile = new PrintWriter(\"output.txt\");\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(1);\n }\n outFile.print(gameNumber+1);\n outFile.close();\n \n }", "void saveRecents(){\n File dotFile = new File( rcFile);\n FileWriter fw;\n BufferedWriter bw;\n PrintWriter pw;\n String str;\n\n // open dotFile\n try{\n // if there is not dotFile, create new one\n fw = new FileWriter( dotFile );\n bw = new BufferedWriter( fw );\n pw = new PrintWriter( bw );\n //write\n for(int i=0;i<MAX_RECENT;i++){\n str = miRecent[i].getText();\n pw.println(str);\n }\n pw.close();\n bw.close();\n fw.close();\n }catch(IOException e){\n }\n\n\n }", "public static void RT() {////cada clase que tiene informacion en un archivo txt tiene este metodo para leer el respectivo archivoy guardarlo en su hashmap\n\t\treadTxt(\"peliculas.txt\", pelisList);\n\t}", "public void loadGame(){\r\n Scanner in = new Scanner(System.in);\r\n System.out.println(\"Choose a saved game. ( -1 : none )\");\r\n try {\r\n File[] listOfFiles = this.showFiles(this.savePath); //Show the files that have been saved earlier\r\n int i = in.nextInt();\r\n if(i==-1){\r\n return;\r\n }\r\n String filePath = listOfFiles[i].getPath(); //Get the path of the chosen file\r\n this.load(filePath);\r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"There are no saved games.\");\r\n }\r\n }", "private void saveInFile() {\n\t\tthis.deleteFile();\n\t\tfor (CounterModel obj : counterListModel.getCounterList()) {\n\t\t\ttry {\n\t\t\t\tGson gson = new Gson();\n\t\t\t\tif (obj.getCounterName().equals(counterModel.getCounterName())) {\n\t\t\t\t\tobj = counterModel;\n\t\t\t\t}\n\t\t\t\tString json = gson.toJson(obj) +'\\n';\n\t\t\t\tFileOutputStream fos = openFileOutput(FILENAME,\n\t\t\t\t\t\tContext.MODE_APPEND);\n\t\t\t\tfos.write(json.getBytes());\n\t\t\t\tfos.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private static void writeToBooksFile() throws IOException{\n\t\tFileWriter fw = new FileWriter(BOOKS_FILE, false); //overwrites the students.txt file\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\n\t\tSet<Integer> keys = ALL_BOOKS.keySet(); //returns list of all keys in ALL_BOOKS\n\t\tfor(int key : keys){\n\t\t\tbw.write(ALL_BOOKS.get(key).ParseForTextFile()); //writes the Parsed Form of the BookDetails object to the books.txt file\n\t\t}\n\t\tbw.close();\n\t}", "public void allartongs() throws IOException{\r\n writefiles data=new writefiles(\"d:\\\\documents\\\\textfiles\\\\AllArtSongs.txt\",true);\r\n Map<String,String> ArrangerNamesLineMap=new HashMap<>();\r\n for(int songid:ArrangerLinesMap.keySet()){\r\n int arrangerid=ArrangerLinesMap.get(songid);\r\n ArrangersMap.get((songid));\r\n ArrangerNamesLineMap.put(test.getsongName(songid), ArrangersMap.get(arrangerid));\r\n }\r\n for(String songname:ArrangerNamesLineMap.keySet()){\r\n System.out.println(\"The artist is:\"+ArrangerNamesLineMap.get(songname)+\" The song is:\"+songname);\r\n data.writeToFile(\"The artist is:\"+ArrangerNamesLineMap.get(songname)+\" The song is:\"+songname);\r\n }\r\n System.out.println(ArrangerNamesLineMap.size());\r\n }", "public void allartistsongs() throws IOException{\r\n List<String> ArrangersAndTheirSongs=new ArrayList<>();\r\n String allsongs=\"\";\r\n int counter=0;\r\n for(int id: ArrangersMap.keySet()){\r\n String ArrangerName=ArrangersMap.get(id);\r\n for(String song:ArrangerLinesList){\r\n String perform[];\r\n perform=song.split(\"/\");\r\n int arrangeid=Integer.parseInt(perform[1]);\r\n if(id==arrangeid){\r\n int songid= Integer.parseInt(perform[0]);\r\n String songname=test.getsongName(songid);\r\n allsongs+=songname+\" \";\r\n counter++;\r\n } \r\n }\r\n ArrangersAndTheirSongs.add(\"The Arranger's Name is:\"+ArrangerName+\" The number of songs is:\"+counter+ \" Their songs are:\"+allsongs);\r\n allsongs=\"\";\r\n counter=0;\r\n }\r\n writeListToTextFile(\"d:\\\\documents\\\\textfiles\\\\ArrangersAndTheirSongs.txt\",ArrangersAndTheirSongs);\r\n // test.writeSongs(\"d:\\\\documents\\\\textfiles\\\\ArrangersAndTheirSongs.txt\");\r\n // Path path=Paths.get()\r\n for(String line:ArrangersAndTheirSongs){\r\n System.out.println(line);\r\n }\r\n System.out.println(ArrangersAndTheirSongs.size());\r\n \r\n System.out.println(\"The size of ArrangersMap is:\"+ArrangersMap.size());\r\n System.out.println(\"The counter is:\"+counter);\r\n }", "public void loadScores() {\n try {\n File f = new File(filePath, highScores);\n if(!f.isFile()){\n createSaveData();\n }\n BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(f)));\n\n topScores.clear();\n topName.clear();\n\n String[] scores = reader.readLine().split(\"-\");\n String[] names = reader.readLine().split(\"-\");\n\n for (int i =0; i < scores.length; i++){\n topScores.add(Integer.parseInt(scores[i]));\n topName.add(names[i]);\n }\n reader.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void writeToFile() {\n try {\n // stworz plik\n File file = new File(\"../Alice.ids\");\n // stworz bufor zapisu do pliku\n FileWriter fileWriter = new FileWriter(file);\n for(int i = 0; i < identificationNumbers.length; i++) {\n for(int j = 0; j < identificationNumbers[i].length; j++)\n fileWriter.write(Integer.toString(identificationNumbers[i][j]));\n\t\t\t fileWriter.write(\"\\n\");\n }\n\t\t\tfileWriter.flush();\n\t\t\tfileWriter.close();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }", "void startFile() {\n writeToFile(defaultScore);\n for (int i = 0; i < 5; i++) {\n writeToFile(readFromFile() + defaultScore);\n }\n }", "public void crearPrimerFichero(){\n File f=new File(getApplicationContext().getFilesDir(),\"datos.json\");\n // si no existe lo creo\n if(!f.exists()) {\n String filename = \"datos.json\";\n String fileContents = \"[]\";\n FileOutputStream outputStream;\n\n try {\n outputStream = openFileOutput(filename, Context.MODE_PRIVATE);\n outputStream.write(fileContents.getBytes());\n outputStream.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n }", "private void readFromFile() {\n\t\tPath filePath = Paths.get(inputFile);\n\n\t\ttry (BufferedReader reader = Files.newBufferedReader(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tString line = null;\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString[] splitLine = line.split(\",\");\n\t\t\t\tcurrentGen.setValue(Integer.parseInt(splitLine[0]),\n\t\t\t\t\t\tInteger.parseInt(splitLine[1]), true);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not find file provided.\");\n\t\t}\n\t}", "private boolean readIt(String title) {\n try{\n File file = null;\n File[] listOfFiles = getFilesDir().listFiles();\n for (File f : listOfFiles) {\n if (f.getName().equals(title)) {\n file = f;\n break;\n }\n }\n if (file == null) {\n return false;\n }\n FileInputStream fi = new FileInputStream(file);\n ObjectInputStream oi = new ObjectInputStream(fi);\n currentGame = (CurrentGame) oi.readObject();\n oi.close();\n fi.close();\n if (currentGame.finished) {\n return false;\n }\n return true;\n }\n catch(Exception e){\n //Toast.makeText(getApplicationContext(), \"Something Broke in checking for last game\", Toast.LENGTH_SHORT).show();\n return false;\n }\n }", "public static void userLottery() {\r\n for (int i = 0; i < LOTTERY_JACKPOT;) {\r\n\r\n int guess = MyConsole.readInt(LOTTERY_START, LOTTERY_END, LOTTERY_NUMERICAL_ERROR, LOTTERY_MINMAX_ERROR);\r\n\r\n if(Arrays.contains(guess, USER_LOTTERY)) {\r\n System.out.println(\"Not unique numbers!\");\r\n } else {\r\n USER_LOTTERY[i] = guess;\r\n i++;\r\n }\r\n }\r\n }", "public void readFile() throws NumberFormatException,FileNotFoundException {\n Scanner scanStar, scanMessier, scanPlanet;\n String raw_data;\n String[] values;\n Set<String> identifyName = new HashSet<>();\n // Create scanner to scan file\n scanStar = new Scanner(new File(filename[0]));\n scanMessier = new Scanner(new File(filename[1]));\n scanPlanet = new Scanner(new File(filename[2]));\n\n // Read data about Star and store\n Star star;\n while (scanStar.hasNext()){\n raw_data = scanStar.nextLine();\n values = processData(raw_data, 1);\n // Check whether there is the same object or the data is wrong\n if (values.length != 7 || identifyName.contains(values[0])){\n System.out.println(\"There are some mistakes in Star file\");\n System.exit(1);\n }\n star = new Star();\n star.setNumber(values[0]);\n star.setRa(Double.parseDouble(values[1]));\n star.setDecl(Double.parseDouble(values[2]));\n star.setMagn(Double.parseDouble(values[3]));\n star.setDistance(Double.parseDouble(values[4]));\n star.setType(values[5]);\n star.setConstellation(values[6]);\n // Add object to collection\n aos.add(star);\n identifyName.add(star.getNumber());\n }\n scanStar.close();\n\n // Read data about Messier and store\n Messier messier;\n while (scanMessier.hasNext()){\n raw_data = scanMessier.nextLine();\n values = processData(raw_data, 1);\n if (values.length < 6 || identifyName.contains('M' + values[0])){\n System.out.println(\"There are some mistakes in Messier file\");\n System.exit(1);\n }\n messier = new Messier();\n messier.setNumber(\"M\" + values[0]);\n messier.setRa(Double.parseDouble(values[1]));\n messier.setDecl(Double.parseDouble(values[2]));\n messier.setMagn(Double.parseDouble(values[3]));\n messier.setDistance(Double.parseDouble(values[4]));\n messier.setConstellation(values[5]);\n if (values.length == 7){\n messier.setDescription(values[6]);\n }else {\n messier.setDescription(\"-\");\n }\n // Add object to collection\n aos.add(messier);\n identifyName.add(messier.getNumber());\n }\n scanMessier.close();\n\n // Read data about Planet and store\n Planet planet;\n while (scanPlanet.hasNext()){\n raw_data = scanPlanet.nextLine();\n values = processData(raw_data, 0);\n if (values.length != 6 || identifyName.contains(values[0])){\n System.out.println(\"There are some mistakes in Planet file\");\n System.exit(1);\n }\n planet = new Planet();\n planet.setName(values[0]);\n planet.setRa(Double.parseDouble(values[1]));\n planet.setDecl(Double.parseDouble(values[2]));\n planet.setMagn(Double.parseDouble(values[3]));\n planet.setDistance(Double.parseDouble(values[4]));\n planet.setAlbedo(Double.parseDouble(values[5]));\n // Add object to collection\n aos.add(planet);\n identifyName.add(planet.getName());\n }\n scanPlanet.close();\n }", "public void saveFile() throws FileNotFoundException {\r\n try {\r\n PrintWriter out = new PrintWriter(FILE_NAME);\r\n //This puts back the labels that the loadFile removed\r\n out.println(\"date,cust_email,cust_location,product_id,product_quantity\");\r\n int i = 0;\r\n\r\n while (i < orderInfo.size()) {\r\n String saved = orderInfo.get(i).toString();\r\n out.println(saved);\r\n i++;\r\n }\r\n out.close();\r\n } catch (FileNotFoundException e) {\r\n }\r\n\r\n }", "private void loadFromFile() {\n\t\ttry {\n\t\t\tFileInputStream fis = openFileInput(FILENAME);\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\t\t\tString line = in.readLine();\n\t\t\tGson gson = new Gson();\n\t\t\twhile (line != null) {\n\t\t\t\tCounterModel counter = gson.fromJson(line, CounterModel.class);\n\t\t\t\tif (counterModel.getCounterName().equals(counter.getCounterName())) {\n\t\t\t\t\tcounterListModel.addCounterToList(counterModel);\n\t\t\t\t\tcurrentCountTextView.setText(Integer.toString(counterModel.getCount()));\n\t\t\t\t} else {\n\t\t\t\t\tcounterListModel.addCounterToList(counter);\n\t\t\t\t}\n\t\t\t\tline = in.readLine();\n\t\t\t} \n\t\t\tfis.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void getscores() {\n\t\tInputStream in = null;\n\t\t//String externalStoragePath= Environment.getExternalStorageDirectory()\n // .getAbsolutePath() + File.separator;\n\t\t\n try {\n \tAssetManager assetManager = this.getAssets();\n in = assetManager.open(\"score.txt\");\n \tSystem.out.println(\"getting score\");\n //in = new BufferedReader(new InputStreamReader(new FileInputStream(externalStoragePath + \"score.txt\")));\n \n \tGlobalVariables.topScore = Integer.parseInt(new BufferedReader(new InputStreamReader(in)).readLine());\n System.out.println(\"topscore:\"+GlobalVariables.topScore);\n \n\n } catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}catch (NumberFormatException e) {\n // :/ It's ok, defaults save our day\n \tSystem.out.println(\"numberformatexception score\");\n } finally {\n try {\n if (in != null)\n in.close();\n } catch (IOException e) {\n }\n }\n\t}", "public void readAll() throws FileNotFoundException{ \n b = new BinaryIn(this.filename);\n this.x = b.readShort();\n this.y = b.readShort();\n \n int count = (x * y) / (8 * 8);\n this.blocks = new double[count][8][8][3];\n \n Node juuri = readTree();\n readDataToBlocks(juuri);\n }", "public void saveData() throws InterruptedException{\n\t\ttry{\n\t\t\tPrintWriter saver = new PrintWriter(this.loadFile);\n\t\t\tQueue<String> q = this.typos.keys();\n\t\t\tCorrection c;\n\t\t\twhile(!q.isEmpty()){\n\t\t\t\tc = this.typos.get(q.dequeue());\n\t\t\t\tsaver.println(c.toString());\n\t\t\t}saver.close();\n\t\t}catch(FileNotFoundException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void readVotes(File inFile);", "@Override\n\tpublic void readWriteAllBirds() {\n\t\tBirdDataParser bdp= new BirdDataParser();\n\t\tfor (Birds b: Birds.values()) {\n\t\t\ttry {\n\t\t\t\tbdp.readInput(b.getName(),b.getName()+\".txt\");\n\t\t\t\tbdp.generateOutput(b.getName()+\"_out.txt\");\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\n\t}", "private HashMap<String, Integer> loadFileQuestionUpvotes() {\n\t\tHashMap<String, Integer> upvotes = new HashMap<String, Integer>();\n\t\ttry {\n\t\t\tFileInputStream fileInputStream = context.openFileInput(SAVE_FILE);\n\t\t\tInputStreamReader inputStreamReader = new InputStreamReader(\n\t\t\t\t\tfileInputStream);\n\t\t\tType listType = new TypeToken<HashMap<String, Integer>>() {\n\t\t\t}.getType();\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\t\t\tGson gson = builder.create();\n\t\t\tupvotes = gson.fromJson(inputStreamReader, listType);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn upvotes;\n\t}", "public void Break()throws IOException {\n \n FileInputStream fstream = new FileInputStream(\"../pp2/LHappycouple.txt\");\n DataInputStream in = new DataInputStream(fstream);\n BufferedReader br = new BufferedReader(new InputStreamReader(fstream));\n String strLine1 = \"\";\n \n String [] boy = new String[5];\n String [] girl = new String[5];\n \n int i;\n int j ;\n \n for (i = 0; i < 5; i++) {\n \n j = (i+1)%5;\n strLine1 = br.readLine();\n String tokens [] = strLine1.split(\",\");\n String b = tokens[1];\n String g = tokens[2];\n \n boy[i] = b;\n girl[j] = g;\n }\n \n \n BufferedWriter bw = null;\n File file = new File(\"PairingOfLeastHappiest.txt\");\n \n if (!file.exists()) {\n \n\t file.createNewFile();\n\t}\n \n FileWriter fw = new FileWriter(file);\n\tbw = new BufferedWriter(fw);\n \n \n for (i = 0; i < 5; i++){\n \n bw.write(boy[i] + \",\" + girl[i]);\n bw.newLine();\n } \n bw.close();\n }", "void loadFromFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile source = new File(directory, FILE_NAME);\n\t\t\tMap<String, Scoreboard> scoreboards = new HashMap<String, Scoreboard>();\n\t\t\tif (source.exists()) {\n\t\t\t\tJsonReader reader = new JsonReader(new FileReader(source));\n\t\t\t\treader.beginArray();\n\t\t\t\twhile (reader.hasNext()) {\n\t\t\t\t\tScoreboard scoreboard = readScoreboard(reader);\n\t\t\t\t\tscoreboards.put(scoreboard.getName(), scoreboard);\n\t\t\t\t}\n\t\t\t\treader.endArray();\n\t\t\t\treader.close();\n\t\t\t} else {\n\t\t\t\tsource.createNewFile();\n\t\t\t}\n\t\t\tthis.scoreboards = scoreboards;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void tempSaveToFile() {\n try {\n ObjectOutputStream outputStream = new ObjectOutputStream(\n this.openFileOutput(MenuActivity2048.TEMP_SAVE_FILENAME, MODE_PRIVATE));\n outputStream.writeObject(boardManager);\n outputStream.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }", "void readWriteFile() throws IOException{\n\t\t\t\t\n\t\t// Sorting before writing it to the file\n\t Map<String, Double> sortedRank = sortByValues(PageRank); \n\t\t\n // below code is used for finding the inlinks count, Comment the probablity sum in below iterator if uncommenting this line\n\t\t//Map<String, Integer> sortedRank = sortByinlinks(inlinks_count);\n\t\t\n\n\t\t//Writing it to the file\n\t\tFile file = new File(\"C:/output.txt\");\n\t\tBufferedWriter output = new BufferedWriter(new FileWriter(file,true));\n\t\tIterator iterator = sortedRank.entrySet().iterator();\n\t\tdouble s = 0.0;\n\t\t\twhile(iterator.hasNext()){\n\t\t\t\tMap.Entry val = (Map.Entry)iterator.next();\n\t\t\t\toutput.write(val.getKey() +\"\\t\"+ val.getValue()+ \"\\n\");\t\t\t\t\n\t\t\t\ts= s+ (double)val.getValue(); //Adding the Probablity ; Comment this line if using Inlink calculation\n\t\t\t}\n\t\t\tSystem.out.println(\"Probablity Sum : \"+s); //After convergence should be 1; ; Comment this line if using Inlink calculation\n\t\t\toutput.flush();\n\t\t\toutput.close();\n\t}", "public static void Save(String filename) throws IOException {\n\t\tFileWriter fw=new FileWriter(filename);\r\n\t\tround=A1063307_GUI.round;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tfw.write(\"Round:\"+round+\",Turn:\"+who+\"\\n\");\r\n\t\tint t2=1;\r\n\t\twhile(t2<(linenumber)) {\r\n\t\t\tint zz=0;\r\n\t\t\twhile(zz<5) {\r\n\t\t\t\tif(zz==0) {\t\t\r\n\t\t\t\t\tch[t2].location=ch[t2].location%20;\r\n\t\t\t\t fw.write(Integer.toString(ch[t2].location)+\",\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(zz==1){\r\n\t\t\t\t fw.write(Integer.toString(ch[t2].CHARACTER_NUMBER)+\",\");\r\n\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\telse if(zz==2){\r\n\t\t\t\t\tfw.write(Integer.toString(ch[t2].money)+\",\");\r\n\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t else if(zz==3){\r\n\t\t\t \tfw.write(Integer.toString(ch[t2].status)+\",\");\r\n\t\t\t \r\n\t\t\t \t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tfw.write(ch[t2].IMAGE_FILENAME);\t\t\t\t\r\n\t\t\t\t\t }\r\n\t\t\t\tzz++;\r\n\t\t\t}\r\n\t\t\tfw.write(\"\\n\");\r\n\t\t\tt2++;\r\n\t\t}\r\n\t\tfw.close();\r\n\t\tFileWriter fw1=new FileWriter(\"Land.txt\");\r\n\t\tfw1.write(\"LOCATION_NUMBER, owner\\n\");\r\n\t\tfor(int i=1;i<17;i++) {\r\n\t\t\tfw1.write(Land[i].PLACE_NUMBER+\",\"+Land[i].owner+\"\\n\");\r\n\t\t}\r\n\t\tfw1.close();\r\n\t}", "public void saveFile() {\r\n final String file = \"respuestaConjuntoDeDatosCon\" + this.numberOfBees + \"abejas.txt\";\r\n try {\r\n int count = 0;\r\n PrintWriter writer = new PrintWriter(file, \"UTF-8\");\r\n for (int i = 0; i < this.numberOfBees; i++) {\r\n if (beesArray[i].isInCollisionRisk()) {\r\n writer.println(beesArray[i].getLatitude() + \",\" + beesArray[i].getLongitude() + \",\" + beesArray[i].getHeight());\r\n count++;\r\n }\r\n }\r\n System.out.println(\"Number of bees in collision risk: \" + count);\r\n writer.close();\r\n } catch (IOException ioe) {\r\n System.out.println(\"Something went wrong writing the exit file\");\r\n }\r\n }", "private String generateAnswer() throws IOException {\n int j = lineNumber();\n int i = 0;\n String result = \"\";\n Random rnd = new Random();\n int rndNumber = rnd.nextInt(j);\n File answers = new File(this.settings.getValue(\"botAnswerFile\"));\n try (RandomAccessFile raf = new RandomAccessFile(answers, \"r\")) {\n while (raf.getFilePointer() != raf.length()) {\n result = raf.readLine();\n i++;\n if ((i - 1) == rndNumber) {\n break;\n }\n }\n }\n return result;\n }", "public void testSaveNewLightningLevel()\n {\n window.comboBox(\"levelTypeSelector\").selectItem(\"Lightning\");\n\n window.radioButton(\"activeTileButton\").click();\n window.panel(\"square0\").click();\n window.button(\"saveButton\").click();\n ClassLoader classLoader = getClass().getClassLoader();\n File folder = null;\n try\n {\n folder = new File(classLoader.getResource(\"levels\").toURI().getPath());\n } catch (URISyntaxException e)\n {\n e.printStackTrace();\n }\n File[] listOfFiles = folder.listFiles();\n\n Arrays.sort(listOfFiles, new Comparator<File>() {\n public int compare(File f1, File f2) {\n try {\n int i1 = Integer.parseInt(f1.getName().replace(\"level\", \"\").replace(\".txt\", \"\"));\n int i2 = Integer.parseInt(f2.getName().replace(\"level\", \"\").replace(\".txt\", \"\"));\n return i1 - i2;\n } catch (NumberFormatException e) {\n throw new AssertionError(e);\n }\n }\n });\n\n assertTrue(listOfFiles[listOfFiles.length - 1].getPath().contains(\"level\" +\n listOfFiles.length +\".txt\"));\n\n String content = null;\n Scanner scanner = null;\n try\n {\n scanner = new Scanner(listOfFiles[listOfFiles.length - 1]);\n content = scanner.useDelimiter(\"\\\\Z\").next();\n scanner.close();\n } catch (FileNotFoundException e)\n {\n e.printStackTrace();\n }\n String correctContent = \"NewLevel Lightning 0 1 10 50 0 20 30 20 15 10 5 70 20 \" +\n \"10 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \" +\n \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \" +\n \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \";\n assertEquals(correctContent, content);\n }", "private FileManager()\n {\n bookFile.open(\"bookdata.txt\");\n hisFile.open(\"history.txt\");\n idFile.open(\"idpassword.txt\");\n createIDMap();\n createHisMap(Customer.getInstance());\n }", "public void criaTrolls() throws FileNotFoundException, IOException{\n \n String[] vetorNomes;\n vetorNomes = new String[20];\n int i = 0;\n String endereco = System.getProperty(\"user.dir\");\n endereco = endereco + \"/nomes/Nomes.txt\";\n Scanner leitor = new Scanner(new FileReader(endereco));\n while(leitor.hasNext() && i < 20){\n \n vetorNomes[i] = leitor.next();\n ++i;\n }\n // Atribuindo nomes aos trolls.\n Random gerador = new Random();\n int qtde = gerador.nextInt(2);\n for(i = 0; i < qtde; ++i){\n \n int rd = gerador.nextInt(20);\n setNome(vetorNomes[rd], i);\n }\n setQtdeTrolls(qtde);\n }", "public static void main(String[] args) throws IOException\n\t{\n\t\tGame Set = new Game(); //Class That Handles the Game\n\t\tObject\t[][] bingoCard = Set.createCard(); //Original Unmarked Card\n\t\tObject\t[][] playingCard = bingoCard; //Marked Card for Each Game\n\t\tint [] bingoNumbers; //Numbers to be Called\n\t\t\n\t\t/*\n\t\t//int nog; //Number of Games\n\t\t\n\t\t//Get Number of Games\n\t\tSystem.out.println(\"How many games to play?\");\n\t\tnog = cin.nextInt();\n\t\tcin.close();\n\t\tbingoNumbers = new int [100*nog]; //Set Amount of Numbers to Call, Per Instructions in ReadMe\n\t\t//*/\n\t\t\n\t\t//Would Normally Not Do This. Would Make Only 50 Numbers at A Time Instead of 100,\n\t\t\t//but Description Asks for It\n\t\tbingoNumbers = new int [500]; //Set Amount of Numbers to Call, Per Instructions in ReadMe\n\t\tScanner numbers = new Scanner(new File(\"Numbers.txt\")); //File With Numbers\n\t\tint t = 0; //Traverse Array of Bingo Numbers\n\t\twhile(numbers.hasNext()) //Till No More Numbers\n\t\t{\n\t\t\tString tmp = numbers.next(); //Get Number\n\t\t\ttmp = tmp.substring(0, tmp.length()-1); //Remove Delimiter\n\t\t\tbingoNumbers[t++] = Integer.parseInt(tmp); //Convert to Integer\n\t\t}\n\t\tnumbers.close(); //Close Scanner, No Longer Needed\n\t\t\n\t\t/*\n\t\tHashSet<Integer> numbs = new HashSet<Integer>(); //HashSet to Keep Track of Already Used Numbers\n\t\t\n\t\t//Get Numbers, No DataSet Given With Numbers, So Picked At Random\n\t\tfor (int i=0; i<bingoNumbers.length;)\n\t\t{\t\n\t\t\tint random; //Number to Call\n\t\t\tdo\n\t\t\t\t{random = (int)(Math.random()*100+1);} //Pick Random Number From Allowed Range\n\t\t\twhile (numbs.contains(random)); //Make Sure for No Repeats\n\t\t\t\n\t\t\tbingoNumbers[i] = random; //Add Number to List of Numbers to Call\n\t\t\tnumbs.add(random); //Add to List of Already Chosen\n\t\t\t\n\t\t\tif (++i%100==0) //Reset List Every 100 Numbers\n\t\t\t\tnumbs = new HashSet<Integer>();\n\t\t}\n\t\t//*/\n\t\t\n\t\t//Play and Print Game(s)\n\t\t//for (int i=0; i<nog;)\n\t\tfor (int i=0; i<6;)\n\t\t{\n\t\t\tObject [] res; //Results of Game\n\t\t\tint start = i*100; //Start Location\n\t\t\tint end = (++i)*100-1; //End Location\n\t\t\tint [] bn = Arrays.copyOfRange(bingoNumbers, start, end); //Get 100 Numbers From the Set at A Time\n\t\t\tres = Set.play(bn, playingCard); //Play Game\n\t\t\tprintGame(playingCard, res, bn, i); //Print Result\n\t\t\tplayingCard = bingoCard; //Reset Card\n\t\t}\n\t}", "void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new FileWriter(target));\n\t\t\twriter.setIndent(\" \");\n\t\t\twriter.beginArray();\n\t\t\tfor (Scoreboard scoreboard : scoreboards.values()) {\n\t\t\t\twriteScoreboard(writer, scoreboard);\n\t\t\t}\n\t\t\twriter.endArray();\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void inicializarPalabra () { \r\n palabra = \"\"; \r\n palabraErrada = \"\"; \r\n mensaje = \"\"; \r\n intentosErrados = 0; \r\n \r\n try { \r\n //Variable para almacenar la cantidad de palabras que hay en el archivo adjunto \r\n int contadorPalabras = 0; \r\n \r\n //Obtener la palabra del txt \r\n File archivo = new File(\"palabritas.txt\"); \r\n BufferedReader entrada; \r\n \r\n //En el primer recorrido determinamos cuantas palabras tengo en palabritas \r\n entrada = new BufferedReader(new FileReader(archivo)); \r\n String palabraTemp = \"\"; \r\n while(entrada.ready()){ \r\n palabraTemp = entrada.readLine(); \r\n if (palabraTemp.length()>cantMaximaCaracteres) continue; //Validamos el tama帽o de caracteres \r\n contadorPalabras ++; \r\n } \r\n System.out.println(\"Cantidad:\"+contadorPalabras); \r\n \r\n //Con la cantidad de palabras realizamos el random \r\n //Lo multiplicamos x 100 y agarramos el residuo de dividirlo entre la cantidad de palabras \r\n //Le sumamos 1 xq el cero no juega \r\n int numeroLineaEscogida = ((int) (Math.random() * 100) % contadorPalabras) + 1; \r\n \r\n //Nos posicionamos en el numero del random y obtenemos la palabra \r\n entrada = new BufferedReader(new FileReader(archivo)); \r\n int numeroLineaActual = 1; \r\n while(entrada.ready()){ \r\n palabraTemp = entrada.readLine(); \r\n if (palabraTemp.length()>cantMaximaCaracteres) continue; //Validamos el tama帽o de caracteres \r\n if ( numeroLineaActual == numeroLineaEscogida ){ \r\n palabra = palabraTemp; \r\n break; \r\n }else{ \r\n numeroLineaActual++; \r\n } \r\n } \r\n \r\n System.out.println(\"palabra:\"+palabra); \r\n // En el arreglo de caracteres que contendra el resultado lo llenamos de espacio \r\n letras = new char[palabra.length()]; \r\n for (int i = 0; i <= palabra.length() - 1; i++) { \r\n if ( palabra.substring(i, i+1).equals(\" \") ){ \r\n letras[i] = ' '; \r\n }else{ \r\n letras[i] = '_'; \r\n } \r\n } \r\n \r\n //inicializamos el arreglo de intentos errados \r\n letrasErradas = new char[intentosPermitidos]; \r\n \r\n } catch (Exception e) { \r\n e.printStackTrace(); \r\n mensaje = \"No se encuentra el archivo 'palabritas.txt'\"; \r\n } \r\n }", "public static void main(String[] args) throws Exception {\n File file = new File(\"e://m/iphone_cust_id_2017-09-27-14.txt\");\n Set<String> xiaoMi = readFile(file);\n Set<String> origin = readFile(new File(\"e://m/split_bug8091_default_cust_id_num545268.txt\"));\n Set<String> s3 = new HashSet<String>();\n Set<String> last = new HashSet<String>(origin.size());\n for (String custId : origin) {\n if(xiaoMi.contains(custId)) {\n last.add(custId);\n }\n }\n System.out.println(last.size());\n writeFile(last, \"e://m/iphone.txt\");\n //List<String> last = setHandle(origin, xiaoMi, s3,3);\n //System.out.println(last.size());\n }", "private int generatorAnswersList() throws IOException {\n File answerFile = new File(this.getClass().getResource(\"/answers.txt\").getPath());\n if (!answerFile.exists()) {\n System.out.println(\"The file answers not found!\");\n }\n try (RandomAccessFile raf = new RandomAccessFile(answerFile, \"r\")) {\n int countLine = 0;\n String line;\n while ((line = raf.readLine()) != null) {\n if (!\"\".equals(line)) {\n this.answersList.add(line);\n countLine++;\n }\n }\n return countLine;\n }\n }", "public static void readNumbers(String filePath, int[] nums) {\n JSONParser parser = new JSONParser();\n try {\n JSONObject jsonObject = (JSONObject) parser.parse(new FileReader(filePath));\n nums[0] = Integer.parseInt((String) jsonObject.get(\"number of primary\"));\n nums[1] = Integer.parseInt((String) jsonObject.get(\"number of backup\"));\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n\n }", "public static List<List<String>> readFile() {\r\n List<List<String>> out = new ArrayList<>();\r\n File dir = new File(\"./tmp/data\");\r\n dir.mkdirs();\r\n File f = new File(dir, \"storage.txt\");\r\n try {\r\n f.createNewFile();\r\n Scanner s = new Scanner(f);\r\n while (s.hasNext()) {\r\n String[] tokens = s.nextLine().split(\"%%%\");\r\n List<String> tokenss = new ArrayList<>(Arrays.asList(tokens));\r\n out.add(tokenss);\r\n }\r\n return out;\r\n } catch (IOException e) {\r\n throw new Error(\"Something went wrong: \" + e.getMessage());\r\n }\r\n }", "public void readFiles() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\t// Open BufferedReader to open connection to tipslocation URL and read file\n\t\t\tBufferedReader reader1 = new BufferedReader(new InputStreamReader(tipsLocation.openStream()));\n\t\t\t\n\t\t\t// Create local variable to parse through the file\n\t String tip;\n\t \n\t // While there are lines in the file to read, add lines to tips ArrayList\n\t while ((tip = reader1.readLine()) != null) {\n\t tips.add(tip);\n\t }\n\t \n\t // Close the BufferedReader\n\t reader1.close();\n\t \n\t \n\t // Open BufferedReader to open connection to factsLocation URL and read file\n\t BufferedReader reader2 = new BufferedReader(new InputStreamReader(factsLocation.openStream()));\n\t \n\t // Create local variable to parse through the file\n\t String fact;\n\t \n\t // While there are lines in the file to read: parses the int that represents\n\t // the t-cell count that is associated with the line, and add line and int to \n\t // tCellFacts hashmap\n\t while ((fact = reader2.readLine()) != null) {\n\t \t\n\t \tint tCellCount = Integer.parseInt(fact);\n\t \tfact = reader2.readLine();\n\t \t\n\t tCellFacts.put(tCellCount, fact);\n\t }\n\t \n\t // Close the second BufferedReader\n\t reader2.close();\n\t \n\t\t} catch (FileNotFoundException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"Error loading files\"); e.printStackTrace();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void saveInFile() {\n try {\n FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE);\n\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos));\n\n Gson gson = new Gson();\n Log.d(\"PersonList\", personList.toString());\n gson.toJson(personList, out);\n out.flush();\n\n fos.close();\n\n } catch (FileNotFoundException e){\n throw new RuntimeException();\n } catch (IOException e){\n e.printStackTrace();\n }\n\n }", "public static void main(String[] args) {\n Path path = Paths.get(\"src/lottery.csv\");\n Map<Integer, Integer> lotteryNumbers = new HashMap<>();\n\n mapingNumberFrequency(path, lotteryNumbers);\n System.out.println(\"The most common lottery numbers:\");\n for ( Integer number : mostFrequentNumbers(lotteryNumbers, 5)) {\n System.out.println(number + \" (\" + lotteryNumbers.get(number) + \" times) \");\n }\n }", "public void randomizeNumbers() {\n \n this.numbers = new ArrayList<>();\n Random randy = new Random(); //starts a random obkject \n int number = 1; //starts the first lottery number index\n while (number <= 7){ //repeats the same process 7 times to get a set of lottery numbers \n int randomNumber = randy.nextInt(40) + 1; //generates a random int betweeen 1-40(inclusive)\n //if this number already exists in the list, it ignores it and repeats until a unique number is thrown\n if(containsNumber(randomNumber)){ \n continue;\n }\n //once we have a new unique number, it's added to our arraylsit\n this.numbers.add(randomNumber);\n number++; //and we move on to the next number\n }\n }", "public static void main(String[] args) throws Exception {\n FileOutputStream file = new FileOutputStream(\"randoms.txt\");\n PrintWriter output = new PrintWriter(file);\n\n //write 100 random numbers to the file\n\n\n\n\n //open the file for input\n\n\n\n\n //print the sorted array on the screen\n\n\n\n}", "public void saveBook() throws FileNotFoundException {\n\t\tString formated;\n\n\t\tFile saveFile = new File(FILEPATH); \n\t\tPrintWriter o = new PrintWriter(saveFile);\n\n\t\tfor (int i = 0; i < bookList.size(); i++) {\n\t\t\tint type = bookType(bookList.get(i).getIsbn());\n\t\t\tswitch (type) {\n\t\t\tcase 0: // ChildernsBook\n\t\t\t\tformated = String.format(\"%s;%s;%d;%d;%s;%s;%c\", bookList.get(i).getIsbn(),\n\t\t\t\t\t\tbookList.get(i).getCallNumber(), bookList.get(i).getAvailable(), bookList.get(i).getTotal(),\n\t\t\t\t\t\tbookList.get(i).getTitle(), ((ChildrensBook) bookList.get(i)).getAuthors(),\n\t\t\t\t\t\t((ChildrensBook) bookList.get(i)).getFormat());\n\t\t\t\tbreak;\n\t\t\tcase 1: // CookBook\n\t\t\t\tformated = String.format(\"%s;%s;%d;%d;%s;%s;%c\", bookList.get(i).getIsbn(),\n\t\t\t\t\t\tbookList.get(i).getCallNumber(), bookList.get(i).getAvailable(), bookList.get(i).getTotal(),\n\t\t\t\t\t\tbookList.get(i).getTitle(), ((CookBook) bookList.get(i)).getPublisher(),\n\t\t\t\t\t\t((CookBook) bookList.get(i)).getDiet());\n\t\t\t\tbreak;\n\t\t\tcase 2: // PaperBack\n\t\t\t\tformated = String.format(\"%s;%s;%s;%s;%s;%s;%s;%s\", bookList.get(i).getIsbn(),\n\t\t\t\t\t\tbookList.get(i).getCallNumber(), bookList.get(i).getAvailable(), bookList.get(i).getTotal(),\n\t\t\t\t\t\tbookList.get(i).getTitle(), ((PaperBack) bookList.get(i)).getAuthors(),\n\t\t\t\t\t\t((PaperBack) bookList.get(i)).getYear(), ((PaperBack) bookList.get(i)).getGenre());\n\t\t\t\tbreak;\n\t\t\tcase 3: // periodic\n\t\t\t\tformated = String.format(\"%s;%s;%s;%s;%s;%s;\", bookList.get(i).getIsbn(),\n\t\t\t\t\t\tbookList.get(i).getCallNumber(), bookList.get(i).getAvailable(), bookList.get(i).getTotal(),\n\t\t\t\t\t\tbookList.get(i).getTitle(), ((Periodic) bookList.get(i)).getFrequency());\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tformated = \"Null\";\n\t\t\t}\n\t\t\to.println(formated);\n\t\t}\n\n\t\to.close();\n\n\t}", "public void readFromFile() {\n\n\t}", "public void writeBuyingHistory(ArrayList<String> boughtBooks)throws IOException\n {\n String toWrite = new String();\n int i =0;\n if(hisMap.get(Customer.getInstance().getUsername())==null)\n {\n hisMap.put(Customer.getInstance().getUsername(),new ArrayList<String>());\n }\n else\n {\n i=0;\n while (i<boughtBooks.size())\n {\n hisMap.get(Customer.getInstance().getUsername()).add(boughtBooks.get(i));\n i++;\n }\n }\n\n\n i=0;\n\n toWrite+=Customer.getInstance().getUsername()+\",\";\n while (i<hisMap.get(Customer.getInstance().getUsername()).size()-boughtBooks.size())\n {\n toWrite+=hisMap.get(Customer.getInstance().getUsername()).get(i)+\"%\";\n i++;\n }\n ;\n i=0;\n while (i<boughtBooks.size())\n {\n toWrite+=boughtBooks.get(i);\n if(i!=boughtBooks.size()-1)\n toWrite+=\"%\";\n i++;\n }\n\n\n\n\n List<String> lines = Files.readAllLines(Paths.get(\"history.txt\"));\n if(specificLine>lines.size()-1)\n {\n lines.add(toWrite);\n }\n else {\n lines.set(specificLine, toWrite);\n }\n /*write part*/\n BufferedWriter bw = null;\n FileWriter fw = null;\n try {\n int j=0;\n String content = \"\";\n while (j<lines.size())\n {\n content+= lines.get(j)+\"\\n\";\n j++;\n }\n\n fw = new FileWriter(\"history.txt\");\n bw = new BufferedWriter(fw);\n bw.write(content);\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n } finally {\n\n try {\n\n if (bw != null)\n bw.close();\n\n if (fw != null)\n fw.close();\n\n } catch (IOException ex) {\n\n ex.printStackTrace();\n\n }\n\n }\n\n }", "private long read_long(RandomAccessFile file) throws IOException {\n long number = 0;\n for (int i = 0; i < 8; ++i) {\n number += ((long) (file.readByte() & 0xFF)) << (8 * i);\n }\n return number;\n }", "public void dump(AbstractPhoneBill bill) throws IOException{\n\n if(!file.exists()){\n file.createNewFile();\n }\n\n FileWriter fw = new FileWriter(file.getAbsoluteFile());\n FileReader fr = new FileReader(file);\n BufferedWriter bw = new BufferedWriter(fw);\n BufferedReader br = new BufferedReader(fr);\n //bw.write(String.valueOf(bill.getPhoneCalls()));\n\n if(br.readLine()==null) {\n bw.write(bill.toString());\n bw.write(\"\\n\");\n bw.write(String.valueOf(bill.getPhoneCalls()));\n }else{\n bw.write(\",\");\n bw.write(String.valueOf(bill.getPhoneCalls()));\n\n }\n\n bw.close();\n\n\n\n\n }", "void saveFile () {\r\n\r\n\t\ttry {\r\n\t\t\tFileOutputStream fos = new FileOutputStream (\"Bank.dat\", true);\r\n\t\t\tDataOutputStream dos = new DataOutputStream (fos);\r\n\t\t\tdos.writeUTF (saves[count][0]);\r\n\t\t\tdos.writeUTF (saves[count][1]);\r\n\t\t\tdos.writeUTF (saves[count][2]);\r\n\t\t\tdos.writeUTF (saves[count][3]);\r\n\t\t\tdos.writeUTF (saves[count][4]);\r\n\t\t\tdos.writeUTF (saves[count][5]);\r\n\t\t\tJOptionPane.showMessageDialog (this, \"The Record has been Saved Successfully\",\r\n\t\t\t\t\t\t\"BankSystem - Record Saved\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t\ttxtClear ();\r\n\t\t\tdos.close();\r\n\t\t\tfos.close();\r\n\t\t}\r\n\t\tcatch (IOException ioe) {\r\n\t\t\tJOptionPane.showMessageDialog (this, \"There are Some Problem with File\",\r\n\t\t\t\t\t\t\"BankSystem - Problem\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t}\r\n\r\n\t}", "private void loadFromFile(){\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Countbook>>() {}.getType();\n countbookList = gson.fromJson(in, listType);\n } catch (FileNotFoundException e) {\n countbookList = new ArrayList<Countbook>();\n }\n }", "String readScore(){\n try\n {\n char[] allAtOnce = new char[(int)scores.length()];\n int charsRead = fr.read(allAtOnce);\n currentScores = String.valueOf(allAtOnce);\n fr.close();//close the file\n fr = new BufferedReader(new FileReader(scores));\n }\n \n catch(IOException e)\n {\n e.printStackTrace();\n }\n return (String.valueOf(currentScores));\n }", "private static void printNumbers(String f1) throws IOException {\n DataInputStream in = readFile(f1,f1,true);\n System.out.println(\"\\nThe numbers in \" + f1 + \" are :\");\n int i=0;\n while(i<20 && in.available()>=4){ //print first 20 numbers\n int val = in.readInt();\n System.out.print(val + \" \");\n\n i++;\n\n }\n }", "public void guardarRanking() throws FileNotFoundException, IOException{\n gest.guardarRanking(clasificacion);\n }", "private void readFile() {\r\n\t\tScanner sc = null; \r\n\t\ttry {\r\n\t\t\tsc = new Scanner(inputFile);\t\r\n\t\t\twhile(sc.hasNextLine()){\r\n\t\t\t\tgrade.add(sc.nextLine());\r\n\t } \r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tsc.close();\r\n\t\t}\t\t\r\n\t}", "public static ArrayList<Puzzle> getStoredPuzzles() {\n files = getFiles();\n ArrayList<Puzzle> storedPuzzles = new ArrayList<Puzzle>();\n System.out.println();\n for (int j = 0; j < files.length; j++) {\n try {\n storedPuzzles.add(loadPuzzle(j));\n } catch(Exception e) {\n System.out.println(\"Error in getting Puzzles\");}\n }\n return storedPuzzles;\n }", "private void createSaveData(){\n try {\n File f = new File(filePath, highScores);\n FileWriter output = new FileWriter(f);\n BufferedWriter writer = new BufferedWriter(output);\n\n writer.write(\"0-0-0-0-0\");\n writer.newLine();\n writer.write(\".....-.....-.....-.....-.....\");\n writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void saveNewRollManager()\n\t{\n\t JFileChooser chooser = new JFileChooser(); //allows the user to choose a file\n\t chooser.setCurrentDirectory(new File(\"/home/me/Documents\"));\t//sets the directory of where to find the file\n\t int retrival = chooser.showSaveDialog(null);\n\t if (retrival == JFileChooser.APPROVE_OPTION) {\n\t try \n\t {\n\t FileWriter fw = new FileWriter(chooser.getSelectedFile()+\".txt\");\n\t fw.write (getCourseToFileString ( ));\n\t for(Student b : getStudents ( ))\t \t\n\t \tfw.write(b.toFileString ( ));\n\t \tfw.close ( );\n\t \t;\n\t } \n\t catch (Exception ex) \n\t {\n\t ex.printStackTrace();\n\t }\n\t\t\tthis.saveNeed = false;\n\n\t }\n\t \n\t}", "public void saveGame(File fileLocation);", "public void loadSave(){\n if((new File(\"data.MBM\")).exists()){\n isNew = false;\n\n try {\n BufferedReader br = new BufferedReader(new FileReader(\"data.MBM\"));\n String line = br.readLine();\n \n while (line != null) {\n \n if(line.contains(\"outDir\")){\n String[] result = line.split(\":\");\n outputDir = new File(result[1]);\n if(outputDir.exists() == false){\n isNew = true;\n }\n }\n else if(line.contains(\"MBMWORLD\")){\n String[] result = line.split(\":\");\n //1 = filename\n //2 = world name\n //3 = path\n //4 = date\n addWorld(new File(result[3]), result[2]);\n worlds.get(numWorlds()-1).setLastBackup(result[4]);\n }\n \n line = br.readLine();\n }\n \n br.close();\n \n } catch(IOException e){\n System.out.println(e);\n }\n }\n }", "public static List<String> getSavedGames( Context context ){\n String[] saveFiles = context.fileList();\n\n // Valid game files\n List<String> gameFiles = new ArrayList<String>();\n\n for( int l=0; l<saveFiles.length; l++ ) {\n Log.d(\"File list: \", saveFiles[l]);\n\n // All game states saved in .dat files!!\n if( saveFiles[l].contains( \".dat\" ) ){\n //if( saveFiles[l].contains( \".zzz\" ) ){ // test case if there are no saved games\n gameFiles.add( saveFiles[l] );\n Log.d(\"Valid save data: \", saveFiles[l]);\n }\n }\n\n return gameFiles;\n\n }", "private void loadFromFile() {\n try {\n /* Load in the data from the file */\n FileInputStream fIn = openFileInput(FILENAME);\n BufferedReader inRead = new BufferedReader(new InputStreamReader(fIn));\n\n /*\n * access from the GSON file\n * Taken from lonelyTwitter lab code\n */\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Counter>>() {}.getType();\n counters = gson.fromJson(inRead, listType);\n\n } catch (FileNotFoundException e) {\n counters = new ArrayList<Counter>();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public void save() { \n /*\n * Iterate over registry to pull box values\n * Creating new IOLoader for instance \n */\n for(UUID id : giftRegistry.keySet()) {\n GiftBox box = giftRegistry.get(id);\n\n String sId = id.toString();\n IOLoader<SecretSanta> config = new IOLoader<SecretSanta>(SecretSanta._this(), sId + \".yml\", \"Gifts\");\n\n FileConfiguration fCon = config.getCustomConfig();\n fCon.createSection(\"SecretSanta\");\n fCon.set(\"SecretSanta\", box.getConfig());\n\n try{\n fCon.save(config.getFile());\n } catch(IOException ex) {\n SecretSanta._this().logSevere(\"[GiftManager] Failed to save: \" + sId + \".yml\");\n continue;\n }\n }\n //SecretSanta._this().logDebug(\"[GiftManager] Gift Registry save successful.\");\n\n IOLoader<SecretSanta> pairedConfig = new IOLoader<SecretSanta>(SecretSanta._this(), \"PairedRegistry.yml\", \"Data\");\n FileConfiguration fPaired = pairedConfig.getCustomConfig();\n fPaired.createSection(\"paired\");\n fPaired.set(\"paired\", savePairs());\n\n try{\n fPaired.save(pairedConfig.getFile());\n //SecretSanta._this().logDebug(\"[GiftManager] PairedRegistry.yml save successful.\");\n } catch(IOException ex) {\n SecretSanta._this().logSevere(\"[GiftManager] Failed to save: PairedRegistry.yml\");\n }\n\n IOLoader<SecretSanta> playerConfig = new IOLoader<SecretSanta>(SecretSanta._this(), \"PlayerRegistry.yml\", \"Data\");\n FileConfiguration fPlayer = playerConfig.getCustomConfig();\n fPlayer.createSection(\"registered\");\n fPlayer.set(\"registered\", savePlayers());\n\n try{\n fPlayer.save(playerConfig.getFile());\n //SecretSanta._this().logDebug(\"[GiftManager] PlayerRegistry.yml save successful.\");\n } catch(IOException ex) {\n SecretSanta._this().logSevere(\"[GiftManager] Failed to save: PlayerRegistry.yml\");\n }\n\n IOLoader<SecretSanta> givenConfig = new IOLoader<SecretSanta>(SecretSanta._this(), \"GivenEmptyRegistry.yml\", \"Data\");\n FileConfiguration fGiven = givenConfig.getCustomConfig();\n fGiven.createSection(\"given\");\n fGiven.set(\"given\", saveGivens());\n\n try{\n fGiven.save(givenConfig.getFile());\n } catch(IOException ex) {\n SecretSanta._this().logSevere(\"[GiftManager] Failed to save: GivenEmptyRegistry.yml\");\n }\n\n SecretSanta._this().logDebug(\"[GiftManager] Saving complete.\");\n }", "public static void main(String[] args) {\n FileInputStream fis =null;\r\n int num; \r\n int contador=0;\r\n \r\n try {\r\n fis = new FileInputStream(\"EnterosGrabadosComoBytes.dat\");\r\n \r\n num= fis.read();\r\n while (num !=-1){\r\n contador++;\r\n System.out.print(num+\" \");\r\n System.out.flush();\r\n num= fis.read(); //leo el sgte num \r\n }\r\n System.out.println(\"\\nYa no hay mas numeros en el fichero\");\r\n System.out.println(\"El total de números es \"+contador);\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error no encuentro el fichero\"); \r\n } catch (IOException ex) {\r\n System.out.println(\"Error en lectura\");}\r\n \r\n }", "public void Fecha() throws FileNotFoundException, IOException {\r\n File archivo = null;\r\n FileReader fr = null;\r\n BufferedReader br = null;\r\n \r\n try {\r\n // Apertura del fichero y creacion de BufferedReader para poder\r\n // hacer una lectura comoda (disponer del metodo readLine()).\r\n // Lectura del fichero\r\n String linea;\r\n \r\n for (b=0;b<5;b++){\r\n if (b==0){\r\n categoria=\"Embarazadas\";\r\n }\r\n if (b==1){\r\n categoria=\"Regulares\";\r\n }\r\n if (b==2){\r\n categoria=\"Discapacitados\";\r\n }\r\n if (b==3){\r\n categoria=\"Mayores\";\r\n }\r\n if (b==4){\r\n categoria=\"Corporativos\";\r\n }\r\n archivo = new File (System.getProperty(\"user.dir\")+\"/Clientes/\"+categoria+\".txt\");\r\n fr = new FileReader (archivo);\r\n br = new BufferedReader(fr);\r\n while((linea=br.readLine())!=null){\r\n if (leerFecha == contador){\r\n errorFecha = linea.substring(1,2);\r\n if (errorFecha.equals(\"/\")){\r\n comparar = linea.substring(0, 1);\r\n if (\"1\".equals(comparar)){\r\n d1++;\r\n }\r\n if (\"2\".equals(comparar)){\r\n d2++;\r\n }\r\n if (\"3\".equals(comparar)){\r\n d3++;\r\n }\r\n if (\"4\".equals(comparar)){\r\n d4++;\r\n }\r\n if (\"5\".equals(comparar)){\r\n d5++;\r\n }\r\n if (\"6\".equals(comparar)){\r\n d6++;\r\n }\r\n if (\"7\".equals(comparar)){\r\n d7++;\r\n }\r\n if (\"8\".equals(comparar)){\r\n d8++;\r\n }\r\n if (\"9\".equals(comparar)){\r\n d9++;\r\n }\r\n } \r\n else{\r\n comparar1=linea.substring(0, 2);\r\n if (\"10\".equals(comparar1)){\r\n d10++;\r\n }\r\n if (\"11\".equals(comparar1)){\r\n d11++;\r\n }\r\n if (\"12\".equals(comparar1)){\r\n d12++;\r\n }\r\n if (\"13\".equals(comparar1)){\r\n d13++;\r\n }\r\n if (\"14\".equals(comparar1)){\r\n d14++;\r\n }\r\n if (\"15\".equals(comparar1)){\r\n d15++;\r\n }\r\n if (\"16\".equals(comparar1)){\r\n d16++;\r\n }\r\n if (\"17\".equals(comparar1)){\r\n d17++;\r\n }\r\n if (\"18\".equals(comparar1)){\r\n d18++;\r\n }\r\n if (\"19\".equals(comparar1)){\r\n d19++;\r\n }\r\n if (\"20\".equals(comparar1)){\r\n d20++;\r\n }\r\n if (\"21\".equals(comparar1)){\r\n d21++;\r\n }\r\n if (\"22\".equals(comparar1)){\r\n d22++;\r\n }\r\n if (\"23\".equals(comparar1)){\r\n d23++;\r\n }\r\n if (\"24\".equals(comparar1)){\r\n d24++;\r\n }\r\n if (\"25\".equals(comparar1)){\r\n d25++;\r\n }\r\n if (\"26\".equals(comparar1)){\r\n d26++;\r\n }\r\n if (\"27\".equals(comparar1)){\r\n d27++;\r\n }\r\n if (\"28\".equals(comparar1)){\r\n d28++;\r\n }\r\n if (\"29\".equals(comparar1)){\r\n d29++;\r\n }\r\n if (\"30\".equals(comparar1)){\r\n d30++;\r\n }\r\n if (\"31\".equals(comparar1)){\r\n d31++;\r\n }\r\n \r\n }\r\n leerFecha+=6;\r\n contador += 1;\r\n }\r\n \r\n else{\r\n contador += 1;\r\n \r\n \r\n }\r\n } \r\n }\r\n }\r\n catch(Exception e){\r\n e.printStackTrace();\r\n }finally{\r\n // En el finally cerramos el fichero, para asegurarnos\r\n // que se cierra tanto si todo va bien como si salta \r\n // una excepcion.\r\n try{ \r\n if( null != fr ){ \r\n fr.close(); \r\n } \r\n }catch (Exception e2){ \r\n e2.printStackTrace();\r\n }\r\n }\r\n }", "public static int[] readMysteriousNumbers(String filename) throws Exception {\n File file = new File(filename);\n Scanner counter = new Scanner(file);\n int numLines = 0;\n while(counter.hasNextLine()){\n counter.nextLine();\n numLines++;\n }\n int[] arr = new int[numLines];\n\n\n\n Scanner reader = new Scanner(file);\n int index = 0;\n while(reader.hasNextLine()){\n arr[index] = Integer.parseInt(reader.nextLine());\n index++;\n }\n\n\n\n\n return arr;\n /*\n List<Integer> nums = new ArrayList<>();\n while (scanner.hasNextInt()) {\n nums.add(scanner.nextInt());\n }\n int[] ret = new int[nums.size()];\n for(int i = 0;i < ret.length;i++) {\n ret[i] = nums.get(i);\n }\n return ret*/\n }", "protected void saveAllBuffers() {\r\n\r\n\t\tString save_dir = \"\";\r\n\t\t\r\n\t JFileChooser fileChooser = new JFileChooser(new File(System.getProperty(\"user.dir\")));\r\n\t fileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\r\n\t int state = fileChooser.showDialog(null, \"Select Directory\");\r\n if (state == JFileChooser.APPROVE_OPTION ){\r\n \tif(fileChooser.getSelectedFile().isDirectory())\r\n \t\tsave_dir = fileChooser.getSelectedFile().getPath();\r\n \tif(fileChooser.getSelectedFile().isFile())\r\n \t\tsave_dir = fileChooser.getSelectedFile().getParent();\r\n }\r\n\t\t//what a nice way to get the list size...\r\n\t\tint size = m_History.getList().getModel().getSize();\r\n\t\tFastVector rlist_item = null;\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\tString name = m_History.getNameAtIndex(i);\r\n\t\t\tStringBuffer buf = m_History.getNamedBuffer(name);\r\n\t\t try {\r\n\t\t String file = save_dir+\"\\\\\"+name.substring(11).replace(\"--> \", \"\")+\".txt\";\r\n\t\t if (m_Log != null) {\r\n\t\t \t\t m_Log.statusMessage(\"Saving to file...\");\r\n\t\t }\r\n\t\t PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(file, false)));\r\n\t\t out.write(buf.toString(),0,buf.toString().length());\r\n\t\t out.close();\r\n\t\t if (m_Log != null) {\r\n\t\t \t m_Log.statusMessage(\"OK\");\r\n\t\t }\r\n\t\t } catch (Exception ex) {\r\n\t\t ex.printStackTrace();\r\n\t\t if (m_Log != null) {\r\n\t\t \t m_Log.logMessage(ex.getMessage());\r\n\t\t }\r\n\t\t }\r\n\t\t}\r\n\t m_Log.logMessage(\"Saved all result buffers successfully.\");\r\n\t}", "public static int CreacioAny (int any, String FitxerHist,int apostes){\n\t\tString dadac;\r\n\t\tint dada;\r\n\t\tString fitxer_nou;\r\n\t\tint dada1,dada2,dada3,dada4,dada5,dada6,dada7;\r\n\t\t//Indiquem la ruta\r\n\t\tfitxer_nou=\"c:/tmp/\"+any+\".txt\";\r\n\t\tboolean entrada=false;\r\n\t\t\r\n\t\ttry{\r\n\t\t\t DataInputStream LeeFichero=new DataInputStream(new FileInputStream(FitxerHist));\r\n\t\t\t //Aqui començara la lectura\r\n\t\t\t do{\r\n\t\t\t \tFileWriter fw = new FileWriter(fitxer_nou,true);\r\n\t\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\r\n\t\t\t\t\t//primer llegim el fitxer dadac, que indicara el any\r\n\t\t\t \tdadac=LeeFichero.readUTF();\r\n\t\t\t \ttry{\r\n\t\t\t \t\t//Ara el passarem a int per despres compararlo amb el que nosaltres indiquem\r\n\t\t\t \t\t//Tambe llegirem les altres dadas\r\n\t\t\t \t\tdada=Integer.parseInt(dadac);\r\n\t\t\t \t\tdada1=LeeFichero.readInt();\r\n\t\t\t \t\tdada2=LeeFichero.readInt();\r\n\t\t\t \t\tdada3=LeeFichero.readInt();\r\n\t\t\t \t\tdada4=LeeFichero.readInt();\r\n\t\t\t \t\tdada5=LeeFichero.readInt();\r\n\t\t\t \t\tdada6=LeeFichero.readInt();\r\n\t\t\t \t\tdada7=LeeFichero.readInt();\r\n\t\t\t \t\tentrada=false;\r\n\t\t\t \t\t//entrada sera per sortir del do a la primera volta\r\n\t\t\t \t\tif (dada==any){\r\n\t\t\t \t\t\t//Si la pirmera dada de la fila (any) es el que nosaltres volem, entrarem aqui\r\n\t\t\t \t\t\tdo{\r\n\t\t\t \t\t\t\t//Escrivim tot el que conte la linia de la nostra dada\r\n\t\t\t \t\t\t\tbw.write(any+\" \");\r\n\t\t\t \t\t\t\tbw.write(dada1+\" \");\r\n\t\t\t \t\t\t\tbw.write(dada2+\" \");\r\n\t\t\t \t\t\t\tbw.write(dada3+\" \");\r\n\t\t\t \t\t\t\tbw.write(dada4+\" \");\r\n\t\t\t \t\t\t\tbw.write(dada5+\" \");\r\n\t\t\t \t\t\t\tbw.write(dada6+\" \");\r\n\t\t\t \t\t\t\tbw.write(dada7+\" \");\r\n\t\t\t \t\t\t\tbw.newLine();\r\n\t\t\t \t\t\t\tentrada=true;\r\n\t\t\t \t\t\t\t//Tambe pujem apostes a +7, per indicar quantes dades hi han\r\n\t\t\t \t\t\t\tapostes=apostes+7;\r\n\t\t\t \t\t\t}while(entrada==false);\r\n\t\t\t \t\tbw.close();\r\n\t\t\t\t\t\tfw.close();\r\n\t\t\t \t}\r\n\t\t\t \t}catch (NumberFormatException f){\r\n\t\t\t \t\treturn apostes;\r\n\t\t\t \t}\r\n\t\t\t }while(true);\r\n\t\t\t\t\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t\r\n\t\t\t\treturn apostes;\r\n\t\t\t}\t\r\n\t\t\t\t \r\n\t\t\r\n\t\t\r\n\t}", "public void fileHexCodeIO(){\n deviceName = MySharedPreferences.readString(mContext, MySharedPreferences.DEVICE_NAME, \"Samsung\");\n\n //open file for reading\n try {\n br = new BufferedReader(new InputStreamReader(mContext.getAssets().open(\"devices/\"+deviceName+ ButtonNames.MUTE)));\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n MuteHexCode = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void playGame() {\n\t\tint generations = 1;\n\t\treadFromFile();\n\t\twhile (generations <= numGens) {\n\t\t\tgetNeighbors();\n\t\t\tsetNextGeneration();\n\t\t\tgenerations += 1;\n\t\t}\n\t\toutputToFile();\n\t}", "public void writeFile() {\n\t\ttry {\n\t\t\tFile dir = Environment.getExternalStorageDirectory();\n\t\t\tFile myFile = new File(dir.toString() + File.separator + FILENAME);\n\t\t\tLog.i(\"MyMovies\", \"SeSus write : \" + myFile.toString());\n\t\t\tmyFile.createNewFile();\n\t\t\tFileOutputStream fOut = new FileOutputStream(myFile);\n\t\t\tOutputStreamWriter myOutWriter = \n\t\t\t\t\tnew OutputStreamWriter(fOut);\n\t\t\tfor (Map.Entry<String, ValueElement> me : hm.entrySet()) {\n\t\t\t\tString refs = (me.getValue().cRefMovies>0? \"MOVIE\" : \"\");\n\t\t\t\trefs += (me.getValue().cRefBooks>0? \"BOOK\" : \"\");\n\t\t\t\tString line = me.getKey() + DELIMITER + me.getValue().zweiteZeile \n\t\t\t\t\t\t //+ DELIMITER\n\t\t\t\t\t\t //+ me.getValue().count\n\t\t\t\t\t \t+ DELIMITER\n\t\t\t\t\t \t+ refs\n\t\t\t\t\t \t + System.getProperty(\"line.separator\");\n\t\t\t\t//Log.i(\"MyMovies\", \"SeSus extracted : \" + line);\n\t\t\t\tmyOutWriter.write(line);\n\t\t\t}\n\t\t\tmyOutWriter.close();\n\t\t\tfOut.close();\n\t\t} catch (IOException e) {\n\t\t\t//\n\t\t\tLog.i(\"MyMovies\", \"SeSus write Exception : \");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void saveData() throws FileNotFoundException {\t\n\t\t\t\n\tScanner inputStream = new Scanner(new File(\"bookings.dat\"));\n\t\ttry {\n\t\t\t\n\t\t\tBookingList.surName = inputStream.nextLine();\n\t\t\tBookingList.tableNo = inputStream.nextLine();\n\t\t\tBookingList.sittingTime = inputStream.nextLine();\n\t\t\tBookingList.partyOf = inputStream.nextLine();\n\t\t\t\t\n\t\t\tBooking<?> bookingData = new Booking<Object>(null, surName, tableNo, sittingTime, partyOf);\n\t\t\tb1.insert(bookingData);\n\t\t\t\t\n\t\t}finally {\n\t\t\tinputStream.close();\n\t\t}\n\t\t\t\n\t}", "private String readFile() {\n try {\n BufferedReader in = new BufferedReader(new FileReader(\"C:\\\\Users\"\n + \"\\\\MohammadLoqman\\\\cs61b\\\\sp19-s1547\"\n + \"\\\\proj3\\\\byow\\\\Core\\\\previousGame.txt\"));\n StringBuilder sb = new StringBuilder();\n String toLoad;\n try {\n toLoad = in.readLine();\n while (toLoad != null) {\n sb.append(toLoad);\n sb.append(System.lineSeparator());\n toLoad = in.readLine();\n }\n String everything = sb.toString();\n return everything;\n } catch (IOException E) {\n System.out.println(\"do nothin\");\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"file not found\");\n }\n return null;\n\n }", "public void loadAll() throws IOException {\r\n System.out.println(\"Previous setting were:\");\r\n System.out.print(\"Time: \" + SaveLoadPrev.getPrevTime(\"outputfile.txt\") + \" | \");\r\n System.out.print(\"Bus Number: \" + SaveLoadPrev.getPrevBusnum(\"outputfile.txt\") + \" | \");\r\n System.out.println(\"Bus Stop: \" + SaveLoadPrev.getPrevBusstop(\"outputfile.txt\"));\r\n String time = SaveLoadPrev.getPrevTime(\"outputfile.txt\");\r\n String busnum = SaveLoadPrev.getPrevBusnum(\"outputfile.txt\");\r\n String busstop = SaveLoadPrev.getPrevBusstop(\"outputfile.txt\");\r\n new ArriveTimeCalculator(busstop, busnum, time);\r\n }" ]
[ "0.6780615", "0.58573", "0.57290137", "0.5707495", "0.55566394", "0.5532862", "0.55197006", "0.5493065", "0.5426617", "0.5400417", "0.53857285", "0.5381136", "0.5304843", "0.5278845", "0.52431434", "0.5235639", "0.52258605", "0.52221185", "0.521905", "0.5198317", "0.5198042", "0.5196984", "0.5193708", "0.5193631", "0.51851106", "0.51839024", "0.51698965", "0.5165367", "0.51598763", "0.51561046", "0.51532686", "0.51338243", "0.5121581", "0.5117671", "0.510726", "0.50985175", "0.50878686", "0.50843513", "0.5079798", "0.50795543", "0.5067744", "0.5056985", "0.503675", "0.50124204", "0.50099653", "0.5006749", "0.49973312", "0.49769408", "0.49764657", "0.49763423", "0.4960789", "0.495424", "0.49491683", "0.49419394", "0.49397093", "0.4939386", "0.49353758", "0.4932245", "0.49320865", "0.49307594", "0.49307072", "0.49282834", "0.4927782", "0.4926225", "0.4925001", "0.49244317", "0.4924304", "0.49156854", "0.49139857", "0.49031213", "0.49029833", "0.48956957", "0.48937413", "0.48811257", "0.4880221", "0.4877485", "0.48743358", "0.48717588", "0.48711812", "0.486769", "0.48674828", "0.48665792", "0.48661673", "0.48648897", "0.48595896", "0.48568746", "0.48562393", "0.48506576", "0.48480636", "0.4846722", "0.4842084", "0.4838817", "0.48337194", "0.4833461", "0.48326662", "0.4832659", "0.48304895", "0.4830427", "0.48287857", "0.48283735" ]
0.7444454
0
Asking Durial how does the lottery work.
public static void howDoesTheLotteryWorkDialogueOption(Player player) { String times = ""; for (int index = 0; index < DRAW_TIME_ANNOUNCEMENT.length; index++) { String extra = " & "; if (index == DRAW_TIME_ANNOUNCEMENT.length - 1) { extra = ""; } times = times + DRAW_TIME_ANNOUNCEMENT[index][1] + extra; } player.getDH().sendNpcChat("I am here to make one lucky player a millionaire!", "Everyday at " + times + " server time,", "the lottery will be, drawn and a new millionare will", "be announced!", FacialAnimation.HAPPY.getAnimationId()); player.nextDialogue = 598; // Bring back to lottery option menu. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tint lotteryDigit1, lotteryDigit2;\n\t\tlotteryDigit1 = (int) (Math.random() * 10);\n\n\t\tdo {\n\t\t\tlotteryDigit2 = (int) (Math.random() * 10);\n\t\t} while (lotteryDigit1 == lotteryDigit2);\n\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Tell me two distinct numbers: \");\n\t\tint guess = input.nextInt();\n\n//\t\tSeparate the digits\n\t\tint guessDigit1 = guess / 10;\n\t\tint guessDigit2 = guess % 10;\n\t\tSystem.out.println(\"The lottery num,ber is \" + lotteryDigit1 + lotteryDigit2);\n//\t\tCompare numbers\n\t\tif (lotteryDigit1 == guessDigit1 && lotteryDigit2 == guessDigit2)\n\t\t\tSystem.out.println(\"Youwill get $10,000\");\n\t\telse if (lotteryDigit1 == guessDigit2 && lotteryDigit2 == guessDigit1)\n\t\t\tSystem.out.println(\"You will get $3,000\");\n\t\telse if (lotteryDigit1 == guessDigit1 || lotteryDigit1 == guessDigit2 || lotteryDigit2 == guessDigit1\n\t\t\t\t|| lotteryDigit2 == guessDigit2)\n\t\t\tSystem.out.println(\"You will get $1,000\");\n\t\telse\n\t\t\tSystem.out.println(\"Sorry, you got nothing\");\n\t\tinput.close();\n\t}", "public static void main(String[] Args) {\n //Generate a lottery number\n lottery = (int) (Math.random() * RAND1);\n\n //Prompt the user to enter a guess\n Scanner input = new Scanner(System.in);\n System.out.print(\"Enter your lottery pick (two digits): \");\n guess = input.nextInt();\n\n // Get digits from lottery\n lotteryDigit1 = lottery / MULTI;\n lotteryDigit2 = lottery % MULTI;\n\n System.out.printf(\"The lottery number is \" + lottery);\n\n //Check the Guess\n if (guess == lottery)\n System.out.println(\"Exact match: you win $10,000\");\n else if (guessDigit2 == lotteryDigit1 && guessDigit1 == lotteryDigit2)\n System.out.println(\"Match all digits: you win $3,000\");\n else if (guessDigit1 == lotteryDigit1 || guessDigit1 == lotteryDigit2\n || guessDigit2 == lotteryDigit1 || guessDigit2 == lotteryDigit2)\n System.out.println(\"Match one digit: you win $1,000\");\n else\n System.out.println(\" Sorry, No Match \");\n\n }", "public static void main(String[] args) {\n\t\t\n\tScanner input=new Scanner(System.in);\n\tint number=1;\n\twhile(number <=5) {\n\tSystem.out.println(\"Please tell me your name\");\n\tString name=input.nextLine();\n System.out.println(\"Nice to meet you \"+name);\n number++;\n \n\t}\n\tSystem.out.println(\"-------------------------\");\n\t//play a lottery where we need to enter from 1 to 100\n\t//lucky number is 7;\n\t //keep asking user to enter number until they enter a lucky number;\n\t\n\n\t\n\t}", "private void choosePrompt() {\r\n\t\tfor (int i = 0; i < mustChoose.size(); i++) {\r\n\t\t\tString prompt = \"**[Choose]** \";\r\n\t\t\t// Find the correct text to display\r\n\t\t\tif (mustChoose.get(i).contentEquals(\"Shrine\")) {\r\n\t\t\t\tprompt += \"**1** :moneybag: ~OR~ **1** :heart:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Dragon Shrine\")) {\r\n\t\t\t\tprompt += \"**2** :moneybag: ~OR~ **1** :wastebasket:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Treasure Hunter\")) {\r\n\t\t\t\tprompt += \"a card to replace in the dungeon row (4-9)\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Underworld Dealing\")) {\r\n\t\t\t\tprompt += \"**1** :moneybag: ~OR~ **BUY 2** __Secret Tome__ **FOR 7** :moneybag:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Apothecary\")) {\r\n\t\t\t\tprompt += \"**3** :crossed_swords: **~OR~** **2** :moneybag: **~OR~** **1** :heart:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Mister Whiskers\")) {\r\n\t\t\t\tprompt += \"**Dragon Attack** ~OR~ **-2** :warning:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Wand of Wind\")) {\r\n\t\t\t\tif (GlobalVars.teleportRoomsPerRoom.length > 0) {\r\n\t\t\t\t\tprompt += \"**1** :crystal_ball: ~OR~ Take a **SECRET** from an adjacent room ``\"+\r\n\t\t\t\t\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()])+\" ┃ \"+\r\n\t\t\t\t\t\tUtils.arrayToString(GlobalVars.teleportRoomsPerRoom[currentPlayer.getCurrentRoom()])+\"``\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprompt += \"**1** :crystal_ball: ~OR~ Take a **SECRET** from an adjacent room ``\"+\r\n\t\t\t\t\t\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()])+\"``\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tgameChannel.sendMessage(prompt).queue();\r\n\t\t}\r\n\t}", "void askForRepeat();", "public static void main(String[] args) {\r\n\r\n AskNumbers();\r\n do {\r\n randomLotto = calculateLotto();\r\n weeks++;\r\n } while (Arrays.containsSameValues(userLotto, randomLotto) != ArraySize);\r\n\r\n userLotto = Arrays.sort(userLotto);\r\n randomLotto = Arrays.sort(randomLotto);\r\n Arrays.print(\"Your Lotto\", Arrays.prefix(userLotto));\r\n Arrays.print(\"Random Lotto\", Arrays.prefix(randomLotto));\r\n\r\n System.out.println(\"You won!\");\r\n years = weeks / 52;\r\n System.out.println(\"It tooks \" + years + \" years (\" + weeks + \" weeks)!\");\r\n }", "public static void numberManiaGame(Scanner input, byte difficulty){\n Random rand=new Random();\n int numberLimit=0,operation,number1,number2,total=0,userNumber;\n boolean isTheNumber=false;\n System.out.println(\"How many numbers would you like to guess? Maximum amount of questions allowed in this version are 128\");\n byte amountOfQuestions=input.nextByte();\n switch (difficulty){\n case 1:\n numberLimit=1000;\n break;\n case 2: \n numberLimit=5000;\n break;\n case 3:\n numberLimit=10000;\n break;\n }\n System.out.println(\"Great, let's start our game.\");\n for(int i=0;i<amountOfQuestions;i++){\n operation=rand.nextInt(2)-0;\n switch(operation){\n case 0:\n number1=rand.nextInt((numberLimit/2));\n number2=rand.nextInt((numberLimit/2));\n total=(number1+number2);\n System.out.println(\"Which number + \" + number1 + \" gives you \" + total);\n userNumber=input.nextInt();\n do{ \n if (userNumber==number2){\n System.out.println(\"Congratulations, that is the number.\");\n isTheNumber=true;\n }else{\n System.out.println(\"That is not the number. Please write another number\");\n userNumber=input.nextInt();\n }\n }while (isTheNumber==false);\n isTheNumber=false;\n break;\n case 1:\n number1=rand.nextInt((numberLimit/2));\n number2=rand.nextInt((numberLimit/2));\n total=(number1-number2);\n System.out.println(\"Which number - \" + number1 + \" gives you \" + total);\n userNumber=input.nextInt();\n do{ \n if (userNumber==number2){\n System.out.println(\"Congratulations, that is the number.\");\n isTheNumber=true;\n }else{\n System.out.println(\"That is not the number. Please write another number\");\n userNumber=input.nextInt();\n }\n }while (isTheNumber==false);\n isTheNumber=false;\n break;\n }\n }\n\n System.out.println(\"Thanks for playing! Returning to main menu...\");\n \n }", "public void dealerAskCard() {\n int dealerScore = this.getDealerHand().getActualValue();\n while (dealerScore < 17) {\n Card card = this.deck.deal(this.getDealerHand());\n dealerScore = this.getDealerHand().getActualValue();\n }\n }", "public void run() {\r\n\t\tSystem.out.println(\"\\nFind all sum combinations using 1 through 9\\n\");\r\n\t\tint value = 0;\r\n\t\tString answer = \"\";\r\n\t\tdo {\r\n\t\t\tvalue = Prompt.getInt(\"Input a number\", 1, (LARGEST_NUMBER * 2));\r\n\t\t\t\r\n\t\t\t// iterative version\r\n\t\t\tSystem.out.println(\"\\nPrinting iterative solution:\");\r\n\t\t\tprintCombinations(value);\r\n\t\t\t\r\n\t\t\t// recursive version\r\n\t\t\tSystem.out.println(\"\\nPrinting recursive solution:\");\r\n\t\t\tprintCombinationsRecurse(value);\r\n\t\t\t\r\n\t\t\tanswer = Prompt.getString(\"\\nInput another number? y or n\");\r\n\t\t} while (answer.toLowerCase().equals(\"y\"));\r\n\t\tSystem.out.println(\"\\nThanks for playing!\\n\");\r\n\t}", "public static void main(String [] args) {\r\n userLottery();\r\n iterateJackpot();\r\n }", "public static void main(String[] args) {\n\t\tint lottery=(int)(100+Math.random()*900);\r\n\r\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tScanner input=new Scanner(System.in);\r\n\r\n\t\tSystem.out.print(\"Enter your lottery pick(three digits):\");\r\n int guess=input.nextInt(); \r\n\r\n int lotteryDigit1=lottery/100;\r\n int lotteryDigit2=(lottery/10)%10;\r\n int lotteryDigit3=lottery%10; \r\n\r\n int guessDigit1=guess/100;\r\n int guessDigit2=(guess/10)%10;\r\n int guessDigit3=guess%10;\r\n \r\n System.out.println(\"The lottery number is \"+lottery);\r\n\r\n if(guess==lottery)\r\n \tSystem.out.println(\"Exact match: you win $10,000\");\r\n else if ((lotteryDigit1 == guessDigit1 && lotteryDigit2 == guessDigit3 && lotteryDigit3 == guessDigit2)\r\n || (lotteryDigit1 == guessDigit3 && lotteryDigit2 == guessDigit2 && lotteryDigit3 == guessDigit1)\r\n || (lotteryDigit1 == guessDigit2 && lotteryDigit2 == guessDigit3 && lotteryDigit3 == guessDigit1)\r\n || (lotteryDigit1 == guessDigit3 && lotteryDigit2 == guessDigit1 && lotteryDigit3 == guessDigit3)\r\n || (lotteryDigit1 == guessDigit2 && lotteryDigit2 == guessDigit1 && lotteryDigit3 == guessDigit2))\r\n System.out.println(\"Match all digits: you win $3,000\");\r\n else if (guessDigit1 == lotteryDigit1\r\n || guessDigit1 == lotteryDigit2\r\n || guessDigit1 == lotteryDigit3\r\n || guessDigit2 == lotteryDigit1\r\n || guessDigit2 == lotteryDigit2\r\n || guessDigit2 == lotteryDigit3\r\n || guessDigit3 == lotteryDigit1\r\n || guessDigit3 == lotteryDigit2\r\n || guessDigit3 == lotteryDigit3)\r\n System.out.println(\"Match one digit: you win $1,000\");\r\n else\r\n System.out.println(\"Sorry,no match\");\r\n\t}", "public static void game()\n\t{\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tint car = (int)(Math.random() * 3 + 1);\n\t\t\n\t\t//testing\n\t\tSystem.out.println(\"car = \" + car); \n\t\t\n\t\tSystem.out.print(\"Please choose a door (1, 2, or 3) \");\n\t\tint user_pick = keyboard.nextInt();\n\t\t// get rid of the newLine from the buffer\n\t\tkeyboard.nextLine();\n\t\t\n\t\t// testing\n\t\tSystem.out.println(\"You chose door # \" + user_pick);\n\t\t\n\t\tint reveal = doorToReveal(car, user_pick);\n\t\t\n\t\t//testing\n\t\tSystem.out.println(\"Open door #: \" + reveal);\n\t\t\n\t\t//ask the user if they want to switch\n\t\tSystem.out.println(\"Do you want to switch?: \");\n\t\tString answer = keyboard.nextLine();\n\t\t\n\t\t//testing \n\t\tSystem.out.println(\"The user wants to switch \" + answer);\n\t\t\n\t\tif(answer.equals(\"yes\"))\n\t\t{\n\t\t\tuser_pick = doorToReveal1(user_pick, reveal);\n\t\t\n\t\t}\n\t\t\n\t\tif ( car == user_pick )\n\t\t\tSystem.out.print(\"You win!!\");\n\t\telse\n\t\t\tSystem.out.println(\"Sorry! You lose !!!\");\n\t\n\t}", "public void questionGenerator()\n\t{\n\t\t//creates questions\n\t\toperation = rand.nextInt(3) + min;\n\t\t\n\t\t//makes max # 10 to make it easier for user if random generator picks multiplication problem\n\t\tif (operation == 3)\n\t\t\tmax = 10; \n\t\t\n\t\t//sets random for number1 & number2\n\t\tnumber1 = rand.nextInt(max) + min; //random number max and min\n\t\tnumber2 = rand.nextInt(max) + min; \n\t\t\t\t\n\t\t//ensures final answer of problem is not negative by switching #'s if random generator picks subtraction problem\n\t\tif (operation == 2 && number1 < number2)\n\t\t{\n\t\t\tint tempNum = number1;\n\t\t\tnumber1 = number2;\n\t\t\tnumber2 = tempNum;\n\t\t}\n\t\tanswer = 0;\n\t\t\n\t\t//randomizes operator to randomize question types\n\t\tif (operation == 1)\n\t\t{\n\t\t\toperator = '+';\n\t\t\tanswer = number1 + number2;\n\t\t}\n\t\tif (operation == 2)\n\t\t{\n\t\t\toperator = '-';\n\t\t\tanswer = number1 - number2;\n\t\t}\n\t\tif (operation == 3)\n\t\t{\n\t\t\toperator = '*';\n\t\t\tanswer = number1 * number2;\n\t\t}\n\t\t\t\n\t\t//prints question\n\t\tlabel2.setText(\"Question: \" + number1 + \" \" + operator + \" \" + number2 + \" = ?\");\n\t}", "private void gameHelper(int ranNum){\n\t\tif(questionAnsweredCount>=25){\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(\"It is \" + teams[ranNum].getName() + \"'s turn to choose a question\");\n\t\t//find category\n\t\tSystem.out.println(\"Please choose a category you would like to answer: \");\n\t\tint categoryIdx = getCategory();\n\t\t//find points\n\t\tSystem.out.println(\"Please enter the dollar value of the question you wish to answer\");\n\t\tint pointIdx = getPointsIndex();\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t//now check if the question is answer knowing dollar and cat is valid\n\t\tboolean answered = board[categoryIdx][pointIdx].answeredYet();\n\t\tif(!answered){\n\t\t\tint point = points[pointIdx];\n\t\t\tSystem.out.println(board[categoryIdx][pointIdx].getQeustion());\n\t\t\tSystem.out.println(\"Enter your answer. Remember to pose it as a question.\");\n\t\t\tString ans = sc.nextLine();\n\t\t\treadExitCommand(ans); // check if the user wants to exit any point\n\t\t\treadReplayCommand(ans);\n\t\t\tboard[categoryIdx][pointIdx].answerQuestion(ans); //ask Q\n\t\t\tif(!board[categoryIdx][pointIdx].getRight()&&board[categoryIdx][pointIdx].getWarned()){\n\t\t\t\t//not in question format. give one more chance\n\t\t\t\tans = sc.nextLine();\n\t\t\t\treadExitCommand(ans);\n\t\t\t\treadReplayCommand(ans);\n\t\t\t\tboard[categoryIdx][pointIdx].answerQuestion(ans);\n\t\t\t}\n\t\t\tif(board[categoryIdx][pointIdx].getRight()){\n\t\t\t\tSystem.out.println(\"You answered it right! \" + point + \" will be added to your total\");\n\t\t\t\tquestionAnsweredCount+= 10;\n\t\t\t\tteams[ranNum].addDollars(point);\n\t\t\t\tprintDollars();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Wrong Answer!\");\n\t\t\t\tquestionAnsweredCount++; \n\t\t\t\tteams[ranNum].minusDollars(point);\n\t\t\t\tprintDollars();\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Question already answered. Choose it again\");\n\t\t\tgameHelper(ranNum); //same team choose a question again\n\t\t}\n\t\tint nextIdx = (ranNum+1)%(teams.length);\n\t\tgameHelper(nextIdx);\n\t}", "void askBuyDevCards();", "public static void main(String [] args){\n int intChoice1,intChoice2,intChoice3,intChoice4;\r\n int intNumRight = 0;\r\n \r\n //Create scanner\r\n Scanner sc = new Scanner(System.in);\r\n \r\n //clear the screen\r\n CLS();\r\n \r\n // Get user input \r\n System.out.println(\"\\n\\n Pick 4 lotter numbers between 0 and 9\\n\");\r\n System.out.print(\" Choose a Lottery Number > \");\r\n intChoice1 = sc.nextInt(); \r\n System.out.print(\" Choose a Lottery Number > \");\r\n intChoice2 = sc.nextInt(); \r\n System.out.print(\" Choose a Lottery Number > \");\r\n intChoice3 = sc.nextInt(); \r\n System.out.print(\" Choose a Lottery Number > \");\r\n intChoice4 = sc.nextInt(); \r\n \r\n //clear the screen\r\n CLS();\r\n \r\n //array to hold lottery numbers\r\n int [] intLotteryNumbers = new int[4]; \r\n \r\n //fill lottery number array\r\n Random rand = new Random();\r\n for(int x = 0; x < intLotteryNumbers.length; x++){\r\n intLotteryNumbers[x] = rand.nextInt(9);\r\n for (int y = 0; y < x; y++){\r\n if(intLotteryNumbers[x] == intLotteryNumbers[y]){\r\n x--;\r\n break;\r\n } \r\n }//if statement checks if duplicate value and resets the outer loop \r\n \r\n }\r\n System.out.println(\"\\n\\n The winning Numbers are >\\n\");\r\n for(int z = 0;z < intLotteryNumbers.length;z++ ){\r\n System.out.println(\"\\t\" + intLotteryNumbers[z]);\r\n }\r\n \r\n for(int a = 0;a < intLotteryNumbers.length;a++ ){\r\n if(intChoice1 == intLotteryNumbers[a]){\r\n intNumRight+=1;\r\n }\r\n else if(intChoice2 == intLotteryNumbers[a]){\r\n intNumRight+=1;\r\n }\r\n else if(intChoice3 == intLotteryNumbers[a]){\r\n intNumRight+=1;\r\n }\r\n else if(intChoice4 == intLotteryNumbers[a]){\r\n intNumRight+=1;\r\n }\r\n }\r\n System.out.println(\"\\n\\n The numbers you chose are \" + intChoice1 + \", \" + intChoice2 + \", \" + intChoice3 + \", \" + intChoice4 + \"\\n\");\r\n \r\n switch(intNumRight){\r\n case 0: //No matches\t0 points\r\n System.out.println(\" Sorry you didn't get any numbers right 0 points\");\r\n break;\r\n case 1://Any one digit matching\t5 points\r\n System.out.println(\" You got 1 number right and earned 5 points\");\r\n break;\r\n case 2://Any two digits matching\t100 points\r\n System.out.println(\" You got 2 number right and earned 100 points\");\r\n break;\r\n case 3://Any three digits matching\t2,000 points\r\n System.out.println(\" You got 3 number right and earned 2,000 points\");\r\n break;\r\n case 4://All four digits matching\t1,000,000 points\r\n System.out.println(\" You got all numbers right and earned 1,000,000 points\");\r\n break;\r\n }\r\n \r\n }", "static void askQuestion() {\n\t\t// Setting up a Scanner to get user input\n\t\tScanner userInput = new Scanner(System.in);\n\n\t\t// Declaring variables\n\t\tdouble num1, num2, answer, userAnswer;\n\n\t\t// GENERATING QUESTION\n\n\t\t// Getting two new random numbers, rounded to one decimal place (with numbers generation from 0 to 50)\n\t\tnum1 = Math.round((Math.random() * 50)*10.0)/10.0;\n\t\tnum2 = Math.round((Math.random() * 50)*10.0)/10.0;\n\n\t\t// Generating a random number between 1 and 4 to randomize the math operation. A switch case is used to calculate the answer based on the math operation that gets generated.\n\t\tswitch ((int) Math.round(Math.random() * 3 + 1)) {\n\t\t\tcase 1: // Similar structure for each case (and the default case), structured as follows\n\t\t\t\tSystem.out.print(num1 + \" + \" + num2 + \" = \"); // Printing the question (based on the generated operation)\n\t\t\t\tanswer = num1 + num2; // Calculating the answer (based on the generated operation)\n\t\t\t\tbreak; // Exit the switch statement\n\t\t\tcase 2:\n\t\t\t\tSystem.out.print(num1 + \" - \" + num2 + \" = \");\n\t\t\t\tanswer = num1 - num2;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.print(num1 + \" / \" + num2 + \" = \");\n\t\t\t\tanswer = num1 / num2;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.print(num1 + \" * \" + num2 + \" = \");\n\t\t\t\tanswer = num1 * num2;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tanswer = Math.round(answer * 10.0) / 10.0; // Rounding the answer to one decimal place\n\t\tuserAnswer = userInput.nextDouble(); // Getting the user's answer\n\n\t\tif (answer == userAnswer) System.out.println(\"That's right. Good Job!\\n\"); // If the answers match, the user is correct and the staetment is printed accordingly.\n\t\telse System.out.println(\"Incorrect. The correct answer was \" + answer + \".\\n\"); // Otherwise, show that the user's answer is incorrect and output an according statement.\n\t}", "public static void main(String[] args)\n\t{\n\t\tScanner in=new Scanner(System.in);\n\t\tSystem.out.println(\"How many numbers do you need to drow?\");\n\t\tint n=in.nextInt();\n\t\tSystem.out.println(\"what is the highest number you can draw?\");\n\t\tint h=in.nextInt();\n\t\tint[] number=new int[h];\n\t\tfor(int i=0;i<number.length;i++)\n\t\t{\n\t\t\tnumber[i]=i+1;\n\t\t}\n\t\tint[] result=new int[n];\n\t\tfor(int i=0;i<result.length;i++)\n\t\t{\n\t\t\tresult[i]=number[(int)(Math.random()*h)];\n\t\t\tnumber[(int)(Math.random()*h)]=number[h-1];\n\t\t\th--;\n\t\t}\n\t\tArrays.sort(result);\n\t\tSystem.out.println(\"Bet the following combination. It'll make you rich!\");\n\t\tfor(int i=0;i<result.length;i++)\n\t\t{\n\t\t\tSystem.out.println(result[i]);\n\t\t}\n\t}", "private void answerYesOrNo() {\n List<String> Yes = additionalDB.get(\"Yes\");\n List<String> No = additionalDB.get(\"No\");\n if (random.nextBoolean())\n \tresponsesList.add(new Response(getRandomElementFromList(Yes)));\n else responsesList.add(new Response(getRandomElementFromList(No)));\n }", "private LotteryResults drawOnce(Set<Integer> winningNumbers)\r\n\t{\r\n\t\tLotteryResults results = new LotteryResults();\r\n\t\tfor(LotteryTicket ticket : lotteryTickets)\r\n\t\t{\t\r\n\t\t\tint matchingNumberCount = getIntersection(ticket.getNumbers(), winningNumbers).size();\r\n\t\t\tresults.addResult(ticket.getOwnerName(), getPrize(matchingNumberCount));\r\n\t\t}\r\n\t\treturn results;\r\n\t}", "public static void main(String [] args) {\n int[] ticket = fillTicket(TICKET_SIZE, MIN, MAX);\n Arrays.sort(ticket);\n int[] lotto = new int [TICKET_SIZE];\n int best = 0;\n long weeks = 0;\n boolean win = false;\n boolean showAllInput = Console.twoOptions(\"Yes\", \"No\", \"Do you want to see your ticket next to the winning numbers\\nevery time you get a bigger win than before?\", ERROR_MESSAGE_NOT_AN_OPTION);\n while(!win) {\n lotto = calculateLotto(TICKET_SIZE, MIN, MAX);\n weeks++;\n if(Arrays.containsSameValues(ticket, lotto) > best) {\n if(showAllInput) {\n System.out.print(\"\\nYour numbers: \");\n Arrays.printFilled(ticket, 2, '0');\n Arrays.sort(lotto);\n System.out.print(\"The winning numbers: \");\n Arrays.printFilled(lotto, 2, '0');\n System.out.println(); \n }\n best = Arrays.containsSameValues(ticket, lotto);\n int years = (int)(weeks / 52);\n String yearString = Integers.formatIntToString(years, 3);\n System.out.println(\"You got \" + best + \" right! It only took \" + yearString + \" years!\");\n if(Arrays.containsSameValues(ticket, lotto) == TICKET_SIZE && years <= 120) {\n win = true;\n } else if(Arrays.containsSameValues(ticket, lotto) == TICKET_SIZE) {\n System.out.println(\"\\nYou won!\\nIt's still more than a lifetime though, so let's try again!\\n\");\n best = 0;\n weeks = 0;\n }\n }\n }\n }", "private void remindGoal()\n {\n System.out.println(\"you have to Pick up all three items and get back outside!\");\n }", "public void Reinforcements()\n{\n\tSystem.out.println(\"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\");\n\tSystem.out.println(\"$$$$$$$$$$$$$ REINFORCEMENTS $$$$$$$$$$$$$$$$$\\n\\n\");\n\t int answer=1;\n do\n {\n\t System.out.println(name+\", you have \"+wealth+\" gold coins.\\n\" );\n\t System.out.println(\"$$$$$$$$ RATES $$$$$$$$\");\n\t System.out.println(\"1 health potions for 1 gold coin\");\n\t System.out.println(\"An improved weapon for 150 gold coins\");\n\t System.out.println(\"Non-refundable :)\");\n\t System.out.println(\"$$$$$$$$$$$$$$$$$$$$$$$$$\\n\");\n\t\tScanner scan=new Scanner(System.in);\n\n\n\t do\n\t{\n\t if(answer!=0&&answer!=1&&answer!=2)\n\t \tSystem.out.print(\"Error in Input! \");\n\t \tSystem.out.println(\"What would you like to buy (0=nothing/done, 1=health potions, 2=better weapon)?\");\n\t answer=scan.nextInt();\n }while(answer!=0&&answer!=1&&answer!=2);\n\n\n\tif (answer==1)\n\t{\n\t\tint exchange=0;\n\t\t\tdo\n\t\t{\n\t\t\tif(exchange<0||exchange>wealth)\n\t\t\t\tSystem.out.print(\"Error in Input! \");\n\n\t\t\tSystem.out.println(\"How many health potions would you like?(cannot be negative or more than your gold coins)\");\n\t exchange=scan.nextInt();\n\t\t}while(exchange<0||exchange>wealth);\n\n\t\t\twealth-=exchange;\n\t\t\thealth+=exchange;\n\t\t\tSystem.out.println(name+\" increases health by \"+exchange+\" potions.\");\n\t\t\tSystem.out.println(name+\" decreases wealth by \"+exchange+\" gold coins.\\n\");\n\n\t}\n\telse if(answer==2)\n\t{\n\t\tif(weapon<8)\n\t {\n\n\t\t\t weapon++;\n\n\n\t\tif(wealth>=150)\n\t\t{\n\t\t\twealth-=150;\n\n\t\t\tSystem.out.println(name+\"\\'s weapon has been improved to \"+WeaponName(weapon)+\".\");\n\t\t\tSystem.out.println(name+\" decreases wealth by 150 gold coins.\\n\" );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint temp=wealth;\n\t\t\thealth+=temp-150;\n\t\t\twealth=0;\n\n\t\tSystem.out.println(name+\"\\'s weapon has been improved to \"+WeaponName(weapon));\n\t\tSystem.out.println(name+\" decreases wealth by \"+temp+\" gold coins.\" );\n\t\tSystem.out.println(name+\" decreases health by \"+(150-temp)+\" portions.\\n\");\n\t\t}\n\t }\n\t \telse\n\t {\n\t \t\tweapon=8;\n\t \t\tSystem.out.println(\"You have updated to the most powerful weapon!!!-----\"+WeaponName(weapon)+\".\\n\" );\n\t }\n\n\t }\n\t else\n\t \tanswer=0;\n\n } while(answer!=0);\n}", "public static void main(String[] args) {\n\n Scanner scn = new Scanner(System.in);\n\n int amount;\n int tries = 1; // max 3 attempts\n\n do {\n System.out.println(\"Give me 5 dollars!\");\n amount = scn.nextInt();\n tries++;\n } while (amount < 5 && tries < 4);\n\n// System.out.println(\"Give me 5 dollars!\");\n\n// amount = scn.nextInt();\n//\n// while (amount < 5 && tries <= 2) {\n// System.out.println(\"Give me 5 dollars!\");\n// tries++;\n// amount = scn.nextInt();\n// }\n//\n if (amount >= 5) {\n System.out.println(\"Thanks!\");\n } else {\n System.out.println(\"You failed!\");\n }\n\n\n }", "public static void fullProof()\r\n\t{\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tif(choice >= 1 && choice <= 4)\r\n\t\t\t{\r\n\t\t\t\tif(choice == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tsetupShop();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse if (choice > 1 && choice <= 4)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You have not set up shop yet!\");\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(choice < 1 || choice > 4)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Do not know \" + choice);\r\n\t\t\t\tintro();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t\tintro();\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tif(choice >= 1 && choice <= 4)\r\n\t\t\t{\r\n\t\t\t\tif(choice == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tsetupShop();\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\tbuy(products);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 3 || choice == 4)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You have not bought anything yet!\");\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(choice < 1 || choice > 4)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Do not know \" + choice);\r\n\t\t\t\tintro();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t\tintro();\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tif(choice >= 1 || choice <= 4)\r\n\t\t\t{\r\n\t\t\t\tif(choice == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tsetupShop();\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\tbuy(products);\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 3)\r\n\t\t\t\t{\r\n\t\t\t\t\tlistItems(products, prices, amount);\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 4)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You have not listed anything yet!\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(choice < 0 || choice > 4)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Do not know \" + choice);\r\n\t\t\t\tintro();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tif(choice >= 1 || choice <= 4)\r\n\t\t\t{\r\n\t\t\t\tif(choice == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tsetupShop();\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\tbuy(products);\r\n\t\t\t\t\tintro();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 3)\r\n\t\t\t\t{\r\n\t\t\t\t\tlistItems(products, prices, amount);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(choice == 4)\r\n\t\t\t\t{\r\n\t\t\t\t\tpreTotal = subTotal(productAmounts);\r\n\t\t\t\t\tcheckout(preTotal, discount, discountRate);\r\n\t\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{\r\n\t\t\t\tSystem.out.println(\"Do not know \" + choice);\r\n\t\t\t\tintro();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Do you want to try your luck with the slot machine? Type 1 for YES or 2 for NO:\");\n int answer = sc.nextInt();\n\n\n //Create If/Else based on Yes/No response\n //Create For loop to generate numbers\n //Convert int affirmation to string value\n\n if (answer == 1)\n {\n for (int i = 0; i <= 2; i++)\n {\n double j = (Math.random() *10);\n int k = (int) j;\n System.out.print(\"[\"+k+\"]\");\n }\n }\n\n else\n {\n System.out.println(\"Maybe next time!\");\n\n }\n }", "public static String factorial() {\n Scanner scanner = new Scanner(System.in);\n\n boolean userAgain = true;\n\n do {\n System.out.println(\"Enter a number from 1 to 59\");\n String userInput = scanner.nextLine();\n long userNum = Integer.parseInt(userInput);\n long fact = 1;\n System.out.printf(\"%s! = \", userInput);\n for (int i = 1; i <= userNum; i++) {\n fact *= i;\n if (i < userNum) {\n System.out.printf(\"%d X \", i);\n } else if (i >= userNum) {\n System.out.printf(\"%d \\t = \", i);\n }\n }\n System.out.println(fact);\n System.out.println(\"Do you want to enter another number? y/n: \");\n String yesOrNo = scanner.nextLine();\n if (yesOrNo.equals(\"n\")) {\n userAgain = false;\n }\n } while (userAgain);\n return \"Goodbye.\";\n }", "public void playBlackjack() {\n\t\tString choice;\n\t\t\n\t\tSystem.out.println(\"Welcome to Blackjack! \\n\");\n\t\tSystem.out.println(\"Dealing hands \\n\");\n\t\tdeck.shuffle();\n\t\tplayer.setHand(deck.drawHand());\n\t\tdealer.setHand(deck.drawHand());\n\t\t\n\t\t\n\t\tif(checkForBlackjack(player) && checkForBlackjack(dealer)) {\n\t\t\tSystem.out.println(showHands());\n\t\t\tSystem.out.println(\"Both player's have blackjack! \\n\");\n\t\t}\n\t\telse if(checkForBlackjack(player)) {\n\t\t\tSystem.out.println(showHands());\n\t\t\tSystem.out.println(\"Player has blackjack! You win! \\n\");\n\t\t}\n\t\telse if(checkForBlackjack(dealer)) {\n\t\t\tSystem.out.println(showHands());\n\t\t\tSystem.out.println(\"Dealer has blackjack! Dealer wins! \\n\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(showInitinalHand());\n\t\t\twhile(player.getHandVal() < 21) {\n\t\t\t\tSystem.out.println(\"Player's turn. Pick to hit or stand \\n\");\n\t\t\t\tchoice = scanner.nextLine().toUpperCase();\n\t\t\t\tif(choice.equals(\"STAND\") || choice.equals(\"S\")) {\n\t\t\t\t\tSystem.out.println(\"Player stands \\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(choice.equals(\"HIT\")|| choice.equals(\"H\")) {\n\t\t\t\t\tSystem.out.println(\"Player hits \\n\");\n\t\t\t\t\tplayer.addCard(deck.drawCard());\n\t\t\t\t\tSystem.out.println(showInitinalHand());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Invalid input \\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile(dealer.getHandVal() < 17) {\n\t\t\t\tSystem.out.println(\"Dealer hits \\n\");\n\t\t\t\tdealer.addCard(deck.drawCard());\n\t\t\t\tSystem.out.println(showHands());\n\t\t\t}\n\t\t\tSystem.out.println(showHands());\n\t\t}\n\t\tcheckWinner();\n\t\tif(result.equals(\"TIE\")) {\n\t\t\tSystem.out.println(\"The result is a tie! \\n\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"The winner is the \" + result + \"!\\n\");\n\t\t}\n\t}", "void askForNumber(String spieler,String playerChoices) throws IOException;", "@Override\n public void onLottery(int cmd, String info) {\n toastMsg(\"抽奖\\n指令:\" + (cmd == 1 ? \"开始\" : (cmd == 2 ? \"结束\" : \"取消\"))\n + \"\\n结果:\" + info);\n }", "public static void userLottery() {\r\n for (int i = 0; i < LOTTERY_JACKPOT;) {\r\n\r\n int guess = MyConsole.readInt(LOTTERY_START, LOTTERY_END, LOTTERY_NUMERICAL_ERROR, LOTTERY_MINMAX_ERROR);\r\n\r\n if(Arrays.contains(guess, USER_LOTTERY)) {\r\n System.out.println(\"Not unique numbers!\");\r\n } else {\r\n USER_LOTTERY[i] = guess;\r\n i++;\r\n }\r\n }\r\n }", "public void generateNumbers() {\n number1 = (int) (Math.random() * 10) + 1;\n number2 = (int) (Math.random() * 10) + 1;\n operator = (int) (Math.random() * 4) + 1;\n //50% chance whether the displayed answer will be right or wrong\n rightOrWrong = (int) (Math.random() * 2) + 1;\n //calculate the offset of displayed answer for a wrong equation (Error)\n error = (int) (Math.random() * 4) + 1;\n generateEquation();\n }", "private static void AskNumbers() {\r\n for (int i = 0; i < userLotto.length; i++) {\r\n\r\n }\r\n for (int i = 0; i < userLotto.length; i++) {\r\n int tmp = MyConsole.readInt(1, ArrayMax, \"Please give number\", \"Please give unique number between [1, 40]\");\r\n\r\n if (!Arrays.contains(tmp, userLotto)) {\r\n userLotto[i] = tmp;\r\n } else {\r\n System.out.println(\"Not unique number!\");\r\n i--;\r\n }\r\n }\r\n }", "public static void main(String[] args) {\n\t\tScanner keyboard = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Response Dial Simulator\");\r\n\t\tSystem.out.println(\"-----------------------\");\r\n\t\tSystem.out.println(\"Initial setting: 3\");\r\n\r\n\t\tfinal int SENTINEL = -1; //store sentinel value in constant variable, and use it in loop condition\r\n\t\tint neutral = 3; \r\n\t\tint change = 0;\r\n\t\tint count1 = 0, count2 = 0, count3 = 0, count4 = 0, count5 = 0;\r\n\t\tint changePos = 0;\r\n\t\tint changeNeg = 0; \r\n\t\tint noChange = 0;\r\n\t\tfinal String USER_PROMPT= \"Enter the next setting (1-5) or -1 to stop.\";\t\r\n\t\tSystem.out.println(USER_PROMPT);\r\n\t\tint dial = keyboard.nextInt(); \r\n\t\tchange = dial - neutral; \r\n\t\t\t\t\r\n\t\t//use sentinel controlled loop to read dial settings until user tells it to end \r\n\t\t//use accumulators an conditional statements to update correct accumulator on correct setting\r\n\t\twhile (dial != SENTINEL) {\r\n\t\t\t\t\r\n\t\t\tif (dial == 1) {\r\n\t\t\t\tcount1++; //Count the number that was chosen \r\n\t\t\t} else if (dial == 2) {\r\n\t\t\t\tcount2++;\r\n\t\t\t} else if (dial == 3) {\r\n\t\t\t\tcount3++;\r\n\t\t\t} else if (dial == 4) {\r\n\t\t\t\tcount4++;\r\n\t\t\t} else if (dial == 5){\r\n\t\t\t\tcount5++;\r\n\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t//Count the amount of +, -, and neutral changes\r\n\t\t\tif (neutral < dial) {\r\n\t\t\t\tSystem.out.println(\"Positive change: \" + neutral + \" to \" + dial);\r\n\t\t\t\tSystem.out.println(\"Current setting: \" + dial);\r\n\t\t\t\tneutral = dial;\r\n\t\t\t\tchangePos++;\r\n\t\t\t\t\r\n\t\t\t} else if (neutral > dial) {\r\n\t\t\t\tSystem.out.println(\"Negative change: \" + neutral + \" to \" + dial);\r\n\t\t\t\tSystem.out.println(\"Current setting: \" + dial);\r\n\t\t\t\tneutral = dial;\r\n\t\t\t\tchangeNeg++;\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"No change: \" + dial + \" to \" + dial);\r\n\t\t\t\tSystem.out.println(\"Current setting: \" + dial);\r\n\t\t\t\tneutral = dial;\r\n\t\t\t\tnoChange++;\r\n\t\t\t} \r\n\t\t\tSystem.out.println(\"Enter the next setting (1-5) or -1 to stop.\");\r\n\t\t\tdial = keyboard.nextInt(); \r\n\t\t}\r\n\t\t\t\r\n\t\t//use print statements to output info about dial while user is entering settings\r\n\t\tSystem.out.println(\"Response Summary\");\r\n\t\tSystem.out.println(\"----------------\");\r\n\t\tSystem.out.println(\"1 was chosen \" + count1 + \" time(s).\");\r\n\t\tSystem.out.println(\"2 was chosen \" + count2 + \" time(s).\");\r\n\t\tSystem.out.println(\"3 was chosen \" + count3 + \" time(s).\");\r\n\t\tSystem.out.println(\"4 was chosen \" + count4 + \" time(s).\");\r\n\t\tSystem.out.println(\"5 was chosen \" + count5 + \" time(s).\" + '\\n');\r\n\t\t\r\n\t\tSystem.out.println(\"Positive changes: \" + changePos);\r\n\t\tSystem.out.println(\"Negative changes: \" + changeNeg);\r\n\t\tSystem.out.println(\"No changes: \" + noChange);\r\n\t\t\r\n\t\t\r\n\t\tkeyboard.close();\r\n\t\t\r\n\t}", "public static void main(String[] args) { is 7\n\t\t// keep asking user to enter a number until entered number is the same as the\n\t\t// lucky number\n\t\t\n\t\tScanner input;\n\t\tint numberFromUser;\n\n\t\tint luckyNumber = 7;\n\n\t\tinput = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter any number from 1 to 100\");\n\t\tnumberFromUser = input.nextInt();\n\t\t\n\t\twhile(numberFromUser!=luckyNumber) {\n\t\t\tSystem.out.println(\"Please enter any number from 1 to 100\");\n\t\t\tnumberFromUser = input.nextInt();\n\t\t}\n\n\n\t}", "public static void main(String[] args) {\n Scanner scnr = new Scanner(System.in);\n String yourChoice = \"\";\n do\n {\n \t \n System.out.println(\"Enter a Number :\");\n int userResponse = scnr.nextInt() ;\n \n System.out.println(\"Table Of Powers:\");\n \n System.out.printf(\"%10s | %12s | %14s\\n\", \"Number\", \"Squared\",\"Cubed\");\n System.out.printf(\"%10s | %12s | %14s\\n\", \"------\", \"-------\",\"-----\");\n \n for(int i=1;i<=userResponse;i++)\n { \n \t System.out.printf(\"%10s | %12s | %14s\\n\", i , i*i , i*i*i);\n \t //System.out.println();\n }\n \n System.out.println(\"\\n\" + \"Multiplication Tables:\");\n System.out.printf(\"%5s\", \"\");\n for(int i=1;i<=userResponse;i++)\n { \n \t \n \t System.out.printf(\"%5s\", i);\n \t }\n System.out.println();\n System.out.printf(\"%5s\", \"\");\n for(int i=1;i<=userResponse;i++)\n { \n \t \n \t System.out.printf(\"%5s\", \"--\");\n \t }\n \n \n System.out.println();\n\n \n for(int i=1;i<=userResponse;i++)\n { \n \t System.out.printf(\"%5s\",i);\n \t for(int j=1;j<=userResponse;j++) {\n \t\t System.out.printf(\"%5s\",i*j);\n \t }\n \t System.out.println();\n \t //System.out.println();\n }\n \n System.out.println(\"Would you like to continue(y/n) :\");\n yourChoice = scnr.next();\n }while(yourChoice.equals(\"y\"));\n\t System.out.println(\"GoodBye!\");\n\t}", "public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tSystem.out.println(\"TRY TO GUESS MY SECRET NUMBER\");\n\n\t\tint secretnumber = 17;\n\n\t\tint guess;\n\t\tguess = scan.nextInt();\n\n\t\twhile (!(guess == secretnumber)) {\n\t\t\tSystem.out.println(\"try again\");\n\t\t\tguess = scan.nextInt();\n\t\t}\n\n\t\tSystem.out.println(\"congrats\");\n\n\t}", "private static int coinFlip() {\n\t\tint num = (Math.random() <= 0.5) ? 1 : 2; \n\t\tString answer;\n\t\tif ( num == 1) {\n\t\t\tanswer = \"h\";\n\t\t}else {\n\t\t\tanswer = \"t\";\n\t\t}\n\t\t\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\t\n System.out.print(\"Enter you guess (h = heads, t = tails):\");\n String guess = input.next();\n //change the guess to lower case to accept both capital or lower case answer\n guess.toLowerCase();\n \n //gain 50 points if win the toss\n if ( guess.equals(answer)) {\n \t//System.out.println(\"You won the toss, congratulation! +50 points\");\n \treturn 50;\n }else {\n \t //System.out.println(\"Wrong guess! 0 points\");\n \t return 0;\n }\n \n\t}", "int getLuckyTicket();", "public static void main(String[] args) {\n\t\tTortoise.setPenColor(Color.WHITE);\n\t\tString d = JOptionPane.showInputDialog(\"How many times do you think the tortise should dance?\");\n\t\tint D = Integer.parseInt(d);\n\t\tdance(D);\n\t\td = JOptionPane.showInputDialog(\"How many times do you think the tortise should dance?\");\n\t\tif(D > 19){\n\t\tTortoise.move(250);\n\t\tTortoise.turn(180);\n\t\tTortoise.move(250);\n\t\td = JOptionPane.showInputDialog(\"How many times do you think the tortise should dance?\");\n\t\t}\n\t}", "public int initialAsk(){\n System.out.println(\"Hi, what would you like to do? \");\n System.out.println(\"Please type in the number: \");\n System.out.println(\"1. Add a client to the database \");\n System.out.println(\"2. Add an order to the database \");\n System.out.println(\"3. Display all clients from the database \");\n System.out.println(\"4. Display all orders from the database \");\n System.out.println(\"5. Update the client data \");\n System.out.println(\"6. Update the order data \");\n System.out.println(\"7. Delete the client from a database \");\n System.out.println(\"8. Delete the order from a database \");\n System.out.println(\"9. Find the client\");\n System.out.println(\"10. Find the order\");\n System.out.println(\"11. Finish work/ Close app\");\n return inN.nextInt();\n}", "public static void announceWinner() {\n\t\tArrayList<String> data = new ArrayList<String>();\n\n\t\tfor (int index = 0; index < LotteryDatabase.lotteryDatabase.size(); index++) {\n\t\t\tLotteryDatabase lotteryData = LotteryDatabase.lotteryDatabase.get(index);\n\t\t\tfor (int i = 0; i < lotteryData.getTicketsPurchased(); i++) {\n\t\t\t\tdata.add(lotteryData.getPlayerName());\n\t\t\t}\n\t\t}\n\t\tif (data.isEmpty()) {\n\t\t\tAnnouncement.announce(\"No one has entered the lottery.\", ServerConstants.RED_COL);\n\t\t\treturn;\n\t\t}\n\t\tString lotteryWinnerName = data.get(Misc.random(data.size() - 1));\n\t\tAnnouncement.announce(\"<img=27><col=a36718> \" + lotteryWinnerName + \" has won the lottery worth \" + getTotalPotString() + \" with \" + getWinningPercentage(lotteryWinnerName)\n\t\t + \"% chance of winning!\");\n\t\tPlayer winner = Misc.getPlayerByName(lotteryWinnerName);\n\t\tif (winner != null) {\n\t\t\twinner.getPA().sendScreenshot(\"Lottery \" + getTotalPotString(), 2);\n\t\t}\n\t\tNpc npc = NpcHandler.npcs[lotteryNpcIndex];\n\t\tnpc.forceChat(\"Congratulations \" + lotteryWinnerName + \" has won the lottery worth \" + getTotalPotString() + \"!\");\n\t\tItemAssistant.addItemReward(null, lotteryWinnerName, ServerConstants.getMainCurrencyId(), getTotalPotNumber(), false, -1);\n\t\tint moneySink = getTotalPotNumber() / 85;\n\t\tmoneySink *= COMMISION_PERCENTAGE;\n\t\tCoinEconomyTracker.addSinkList(null, \"LOTTERY \" + moneySink);\n\t\ttotalTicketsPurchased = 0;\n\t\tLotteryDatabase.lotteryDatabase.clear();\n\t}", "static void Dungeonforgotten() {\n\t\t\n\t\tint[] lvldata;\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Fate has chosen...\");\n\t\tSystem.out.println(\"|| The Forgotten dungeon ||\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"The Forgotten dungeon is an EASY dungeon in which every book you find contains sacred text of a civilization,\\n whose language is long forgotten, but their magical powers have anything but dwindled.\");\n\t\tSystem.out.println(\"By completing this dungeon you will increase your ability to read their language,\\n and thus, understand their arcane arts.\");\n\t\t\n\t\tdungeonsize = (int) (Math.random() * 12) + 5;\n\t\tdungeondiff = 0.6;\n\t\thubcount = (int) (Math.random() * 3) + 1;\t\n\t\tlvldata = LevelGen();\n\t\tfor(int i = 1; i < dungeonsize - 1; i++) {\n\t\t\tEngine.roomaction(lvldata[i]);\n\t\t\t// TODO Forgotten progression\n\t\t}\n\t\tSystem.out.println(\"\tDebug: DungeonForgotten passed\");\n\t}", "public static void main( String[] args )\n {\n Scanner kbd = new Scanner( System.in );\n boolean done = false;\n\n Ch12Ex1to9 exercise = new Ch12Ex1to9();\n\n do\n {\n System.out.println();\n System.out.println();\n System.out.println( \"Make a selection\" );\n System.out.println();\n System.out.println( \" (1) Discount Prices\" );\n System.out.println( \" (2) Order Checker\" );\n System.out.println( \" (3) Last Chance Gas\" );\n System.out.println( \" (4) Ground Beef Value Calculator\" );\n System.out.println( \" (5) Y2K Problem Detector\" );\n System.out.println( \" (6) Wind Chill Index\" );\n System.out.println( \" (7) Your Age in Seconds\" );\n System.out.println( \" (8) Matinee Movie Tickets\" );\n System.out.println( \" (9) Midnight Madness\" );\n System.out.println( \" (Q) Quit\" );\n System.out.println();\n System.out.print( \"Enter a choice: \" );\n String response = kbd.nextLine();\n\n if ( response.length() > 0 )\n {\n System.out.println();\n\n switch ( response.charAt( 0 ) )\n {\n case '1':\n exercise.discountPrices();\n break;\n case '2':\n exercise.orderChecker();\n break;\n case '3':\n exercise.lastChanceGas();\n break;\n case '4':\n exercise.groundBeefValueCalc();\n break;\n case '5':\n exercise.y2KProblemDetector();\n break;\n case '6':\n exercise.windChillIndex();\n break;\n case '7':\n exercise.yourAgeInSeconds();\n break;\n case '8':\n exercise.matineeMovieTickets();\n break;\n case '9':\n exercise.midnightMadness();\n break;\n default:\n if ( response.toLowerCase().charAt( 0 ) == 'q' )\n {\n done = true;\n }\n else\n {\n System.out.print( \"Invalid Choice\" );\n }\n break;\n }\n }\n } while ( !done );\n System.out.println( \"Goodbye!\" );\n }", "public static void buyLotteryTicketsDialogueOption(Player player) {\n\t\tInterfaceAssistant.closeDialogueOnly(player);\n\t\tInterfaceAssistant\n\t\t\t\t.showAmountInterface(player, \"BUY LOTTERY TICKETS\", \"Enter the amount of tickets you will buy for \" + Misc.formatNumber(getLotteryTicketCost()) + \" each\");\n\t}", "public static void main(String[] args) {\n int secretNumber;\n secretNumber = (int) (Math.random () * 20 + 1);\n //System.out.print(\"For debugging purposes the secret number is: \" + secretNumber);\n \n Scanner keyboard = new Scanner (System.in);\n int guessedNumber;\n do {\n\t System.out.print(\"Please enter a random number: \" );\n\t \n\t guessedNumber = keyboard.nextInt();\n\t System.out.println(\"The Number you choose is : \" + guessedNumber);\n\t \n\t if (guessedNumber == secretNumber) {\n\t\t System.out.print(\"Aye You guessed the number correctly\");\n\t }\n\t else if (guessedNumber < secretNumber) {\n\t\t System.out.println(\"Sorry try again! Your number is too low!\");\n\t }\n\t else if (guessedNumber > secretNumber) {\n\t\t System.out.println(\"Try again bud your number was too high!\");\n\t }\n\t \n } while (guessedNumber != secretNumber);\n\t}", "public int askWhatAssistants(int assi);", "public static void main(String [] args){\n String userInput;\n userInput = JOptionPane.showInputDialog(null, \"Enter an integer number\", \"I'm going to turn into dollars\");\n int intUI = Integer.parseInt(userInput);\n \n //at this point im unsure what im supposed to do\n //does the textbook want me to tell the user how many\n //20s represent the inputed #? (And then same thing\n //for 10s, 5s, 1s) Or does it want me to display the input\n //# in the least number of bills possible?\n \n //intialize int vars \n int twenties = 0;\n int tens = 0;\n int fives = 0;\n int ones = 0;\n \n //logic chain to get the right bill numbers\n twenties = intUI / 20;\n if(intUI%20 > 0){\n intUI = intUI - twenties * 20;\n tens = intUI / 10;\n if(intUI%10 > 0){\n intUI = intUI - tens * 10;\n fives = intUI / 5;\n if(intUI%5 > 0){\n intUI = intUI - fives * 5;\n ones = intUI / 1;\n }//close if\n }//close if\n }//close if chain\n \n //show the bill numbers to user\n JOptionPane.showConfirmDialog(null, twenties + \" 20s, \"\n + tens + \" 10s, \"\n + fives + \" 5s, \"\n + ones + \" 1s, \",\n \"This is your number in the least amount of bills\",\n JOptionPane.YES_OPTION,\n JOptionPane.INFORMATION_MESSAGE);\n }", "public static PaymentChoiceInfo askPayment(int[] costToPay, int[] ammoInAmmoBox, List<PowerUpLM> ammoInPowerUp){\n boolean checkResult;\n possibleChoice = new ArrayList<>();\n paymentSB = new StringBuilder();\n responeForAmmo = new ArrayList<>();\n responseForPowerUp = new ArrayList<>();\n tmpAmmoInAmmoBox = new int[ammoInAmmoBox.length];\n ammoChosen = new int[ammoInAmmoBox.length];\n powerUpIdChosenList = new ArrayList<>();\n tmpCostToPay = new int[costToPay.length];\n tmpAmmoInPowerUp = new ArrayList<>();\n\n //Creazione liste temporanee per tenere traccia quantità \"utilizzate\" e del costo rimanente\n for(i = 0; i < costToPay.length; i++){\n tmpCostToPay[i] = costToPay[i];\n }\n\n for(i = 0; i < ammoInAmmoBox.length; i++){\n tmpAmmoInAmmoBox[i] = ammoInAmmoBox[i];\n }\n\n tmpAmmoInPowerUp.addAll(ammoInPowerUp);\n\n //Costruzione interazione utente\n msg = \"You need to pay with ammo to proceed with this action. \\n\" +\n \"You can use ammo from you ammo box or your powerups.\\n\\n\" +\n \"This is the cost you need to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n checkResult = checkIfNeedMore(tmpCostToPay);\n while(checkResult) {\n messageConstructor();\n System.out.print(paymentSB);\n\n String userChoice = ToolsView.readUserChoice(possibleChoice, false);\n\n if (userChoice != null) {\n if (responeForAmmo.contains(userChoice)) {\n switch (userChoice) {\n case red:\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID]--;\n ammoChosen[GeneralInfo.RED_ROOM_ID]++;\n break;\n case blue:\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID]--;\n ammoChosen[GeneralInfo.BLUE_ROOM_ID]++;\n break;\n case yellow:\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID]--;\n ammoChosen[GeneralInfo.YELLOW_ROOM_ID]++;\n break;\n }\n checkResult = checkIfNeedMore(tmpCostToPay);\n } else if (responseForPowerUp.contains(userChoice)) {\n PowerUpLM powerToDiscard = tmpAmmoInPowerUp.get(Integer.parseInt(userChoice) - 1);\n powerUpIdChosenList.add(powerToDiscard.getIdPowerUp());\n tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n\n if(powerToDiscard.getGainAmmoColor().equals(AmmoType.RED))\n tmpCostToPay[GeneralInfo.RED_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpCostToPay[GeneralInfo.BLUE_ROOM_ID]--;\n else if(powerToDiscard.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpCostToPay[GeneralInfo.YELLOW_ROOM_ID]--;\n\n //tmpAmmoInPowerUp.remove(Integer.parseInt(userChoice) - 1);\n checkResult = checkIfNeedMore(tmpCostToPay);\n\n if(checkResult){\n paymentSB = new StringBuilder();\n msg = \"This is the cost left to pay: \";\n paymentSB.append(msg);\n\n msg = ToolsView.costToString(tmpCostToPay) + \"\\n\\n\";\n paymentSB.append(msg);\n }\n }\n }\n else\n return null;\n }\n return new PaymentChoiceInfo(ammoChosen, powerUpIdChosenList);\n }", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Bienvenido a Magic Ball 8!!\");\n System.out.print(\"Escribe tu pregunta y te la contestaré: \");\n String question = scan.nextLine();\n // Get a random number from 1 to 8\n double a = Math.random()*8;\n // Use if statements to print out 1 of 8 responses\n if (a>=0 & a<1){\n System.out.println(\"No lo sé, lo siento...... :(\");\n }\n if (a>=1 & a<2){\n System.out.println(\"Eso tan solo depende de tí\");\n }\n if (a>=2 & a<3){\n System.out.println(\"La respuesta está en tu habitación....\");\n }\n if (a>=3 & a<4){\n System.out.println(\"Si haces las cosas bien, encontrarás lo que buscas..\");\n }\n if (a>=4 & a<5){\n System.out.println(\"Depende de lo que quieras encontrar..\");\n }\n if (a>=5 & a<6){\n System.out.println(\"No sé para qué me preguntas eso, pero la respuesta la tienes tú\");\n }\n if (a>=6 & a<7){\n System.out.println(\"Sin comentarios.....\");\n }\n if (a>=7 & a<8){\n System.out.println(\"¡Vaya preguntas me haces!\");\n } \n }", "public void getLuckyUnluckyDay() {\n\t\tfor (int day = 0; day < NO_OF_DAYS; day++) {\n\t\t\tint winCount = 0;\n\t\t\tint lostCount = 0;\n\t\t\tint result = STAKE;\n\t\t\twhile ((result != WINING_CASH) && (result != LOOSING_CASH)) {\n\t\t\t\tint randomCheck = (int) Math.floor(Math.random() * 10) % 2;\n\t\t\t\tif (randomCheck == 1) {\n\t\t\t\t\tresult = result + BET;\n\t\t\t\t\twinCount++;\n\t\t\t\t} else {\n\t\t\t\t\tresult = result - BET;\n\t\t\t\t\tlostCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result == WINING_CASH) {\n\t\t\t\tSystem.out.println(\"you won the game\");\n\t\t\t\twinArr[day] = winCount;\n\t\t\t\tSystem.out.println(\"total Amount won :\" + winCount + \"in day: \" + (day + 1));\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"you lost the game\");\n\t\t\t\tlostArr[day] = lostCount;\n\t\t\t\tSystem.out.println(\"total Amount lost: \" + lostCount + \"in day: \" + (day + 1));\n\t\t\t}\n\t\t}\n\t\tint maxWin = 0;\n\t\tint luckyDay = 0;\n\t\tfor (int day = 0; day < NO_OF_DAYS; day++) {\n\t\t\tif (winArr[day] > maxWin && winArr[day] != 0) {\n\t\t\t\tmaxWin = winArr[day];\n\t\t\t\tluckyDay = day;\n\t\t\t\tsumOfWinCount = sumOfWinCount + winArr[day];\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"your luckiest day:\" + (luckyDay + 1));\n\t\tint maxLost = 0;\n\t\tint unLuckyDay = 0;\n\t\tfor (int day = 0; day < NO_OF_DAYS; day++) {\n\t\t\tif (lostArr[day] > maxLost && lostArr[day] != 0) {\n\t\t\t\tmaxLost = lostArr[day];\n\t\t\t\tunLuckyDay = day;\n\t\t\t\tsumOfLostCount = sumOfLostCount + lostArr[day];\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"your unluchiest day:\" + (unLuckyDay + 1));\n\t\tSystem.out.println();\n\t\ttotalAmount = sumOfWinCount - sumOfLostCount;\n\t\tif (totalAmount > 0) {\n\t\t\tSystem.out.println(\"you won the total amount \" + totalAmount);\n\t\t} else {\n\t\t\tSystem.out.println(\"you lost total amount: \" + totalAmount);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tString answer = JOptionPane.showInputDialog(\"how many times do you want the totoise to spin from 1-10\");\n\t\tint x = Integer.parseInt(answer);\n\t\tdance(x);\n\t\t\n\n\t}", "private void askPlayer() {\n System.out.println(\"Dealers last card is \" + Dealer.showLast());\n System.out.println(\"Your hand is \" + p1.getHand());\n System.out.println(\"Your Hand total is \" + p1.getTotal() + \". Would you like to hit or stand?\");\n\n String s = scan.nextLine();\n System.out.println();\n\n if (s.equalsIgnoreCase(\"hit\")) {\n p1.addToHand(dealCard());\n p1.calcTotal();\n if (p1.getTotal() > 31) {\n System.out.println(\"Your hand is \" + p1.getHand());\n System.out.println(\"Your hand total is \" + p1.getTotal());\n System.out.println(\"You bust, Dealer wins\");\n\n totalWinnings -= betNum;\n p1.subPointCount(betNum);\n bust = true;\n\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n\n } else {\n askPlayer();\n }\n } else {\n System.out.println(\"You stand at \" + p1.getTotal());\n\n while (Dealer.calcTotal() < 26) {\n Dealer.addToHand(dealCard());\n\n }\n System.out.println(\"Dealer's hand is \" + Dealer.getHand());\n System.out.println(\"Dealer's hand total is \" + Dealer.getTotal());\n\n }\n }", "public static void startGame(Scanner console){\r\n // 1. generate new game ans the random number\r\n GuessFourDigits guess = new GuessFourDigits(4);\r\n \r\n System.out.println(\"Welcome to GuessDigits\"); \r\n System.out.println(\"-----------------------------------------\");\r\n System.out.println(\"guess the right sequence of digits in \"+guess.NUMBER_LENGTH+ \"digits number.\");\r\n System.out.println(\"with each try there will be tipp about result\");\r\n System.out.println(\"-----------------------------------------\");\r\n \r\n // declaring and initialization of loop flag\r\n boolean tipp = false;\r\n \r\n //counter of tries\r\n int counterTry = 0;\r\n \r\n do{\r\n // 2. asking User to guess\r\n System.out.println(\"Your guess: \");\r\n String usersNumber = UserInput.askUserToInsert(console);\r\n \r\n // 2a. check validity of inserted number\r\n if(!guess.validityCheckOfNumber(usersNumber)){\r\n System.out.println(\" inserted number is not valid+\\n\"\r\n + \" a 4 digit positive number, no digit repeated.\");\r\n continue;\r\n }\r\n \r\n // if inserted nummer valid, tipp counter goes up\r\n counterTry++;\r\n \r\n // 3. comparing numbers\r\n int[] comparingNum = guess.compareTheNumbers(usersNumber);\r\n \r\n // 4. giving tipps and congratulating user\r\n if(comparingNum[0] == guess.NUMBER_LENGTH){\r\n //user wins\r\n System.out.println(\"Congrats, you reach \"+usersNumber+\" in \"\r\n + counterTry+ \" tries.\\n\");\r\n tipp = true;\r\n }else{\r\n // tipp to user\r\n System.out.println(\"right number at right position: \"\r\n +comparingNum[0]+ \" right number at wrong position: \"\r\n + comparingNum[1]+ \"\\n\");\r\n }\r\n \r\n \r\n \r\n }while(!tipp);\r\n \r\n }", "void askBuyResources();", "public static void questionnaire() {\n\t\tboolean flag = true;\n\t\tString a = null;\n\t\t//donor's username\n\t\tflag = true;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tusername = JOptionPane.showInputDialog(null,\"Enter your username: \", \"SIGN UP\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\tif (username.equals(\"null\")) {\n\t\t\t\t\tthrow new NullPointerException();\n\t\t }\n\t\t\t\tflag = false;\n\t\t\t} catch (NullPointerException e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter a username.\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t flag = true;\n\t\t\t}\t\n\t\t}while (flag);\n\t\ttry {\n\t\t\tResultSet rs = Messages.connect().executeQuery(\"SELECT * FROM Questionnaire \");\n\t\t\twhile (rs.next()) {\n\t\t\t\tint qid = rs.getInt(\"Q_id\");\n\t\t\t\tString r = rs.getString(\"Question\");\n\t\t\t\tdo {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (qid == 1) {\n\t\t\t\t\t\t\tflag = true;\n \t \t\t\t\t\tObject[] opt = {\"Male\", \"Female\"};\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tint g = JOptionPane.showOptionDialog(null,\"Choose your gender: \", \"SIGN UP\", JOptionPane.YES_NO_OPTION,\n\t\t\t\t\t\t\t\t\t\t\tJOptionPane.PLAIN_MESSAGE, null, opt, null);\n\t\t\t\t\t\t\t\t\tif (g == 0) {\n\t\t\t\t\t\t\t\t\t\tgender = \"male\";\n\t\t\t\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t} else if (g == 1){\n\t\t\t\t\t\t\t\t\t\tgender = \"female\";\n\t\t\t\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} catch (NullPointerException e1) {\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please choose your gender\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}while (flag);\n\t\t\t\t\t\t\ta = gender;\n\t\t\t\t\t\t} else if (((qid >= 2) && (qid<=12)) || (qid == 14)) {\n\t\t\t\t\t\t\ta = JOptionPane.showInputDialog(null, qid + \". \" + r, \"QUESTIONNAIRE\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\t\t\tif (a.equals(null)) {\n\t\t\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tint p = JOptionPane.showConfirmDialog(null, qid + \". \" + r, \"QUESTIONNAIRE\", JOptionPane.YES_NO_OPTION, JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\t\t\ta = String.valueOf(p);\n\t\t\t\t\t\t\tif (p == -1) {\n\t\t\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please insert your answer\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t\tflag = true;\n\t\t\t\t\t}\n\t\t\t\t} while (flag);\n\t\t\t\tif (checkQuestion(qid, a) == false) {\n\t\t\t\t\t//delete data from data base\n\t\t\t\t\tint d = Messages.connect().executeUpdate(\"DELETE FROM Answers WHERE B_Username ='\" + username + \"'\");\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"We regret to inform you that you are not compatible as a blood donor.\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t} else {\n\t\t\t\t\tinsertAnswers(username, qid, a);\n\t\t\t\t}\n\t\t\t}\n\t\t\trs.close();\n\t\t\tMessages.connect().close();\n\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t}\n\t\t}", "private void simulate() {\n Quackable mallard = new QuackCounter(new MallardDuck()); //Assign the decorator to be Quackable\n Quackable redhead = new QuackCounter(new RedheadDuck());\n Quackable duckcall = new QuackCounter(new DuckCall());\n Quackable rubber = new QuackCounter(new RubberDuck());\n Quackable goose = new GooseAdaptor(new Goose()); //Assign the adaptor to be Quackable\n\n stdout(\"Duck Simulator with Goose adaptor and a quack counter: Version 1\");\n stdout(\"----------------------------------------------------------------\");\n simulate(mallard);\n simulate(redhead);\n simulate(duckcall);\n simulate(rubber);\n simulate(goose); //Here we're able to do this because our adaptor also IS A Quackable! This goes to honk\n stdout(\"\");\n stdout(\"Number of quacks by all the ducks: \" + QuackCounter.getQuackCount());\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\tint input = 0;\r\n\t\tint ai = 0;\r\n\t\tint win = 0;\r\n\t\tint defeat = 0;\r\n\t\tint draw = 0;\r\n\t\t\r\n\t\tString me = \"\";\r\n\t\tString com = \"\";\r\n\t\tSystem.out.println(\"★☆★☆★☆★☆가위바위보 게임입니다!★☆★☆★☆★☆\");\r\n\t\tfor(int i = 1 ; i < 4 ; i++) {\r\n\t\t\tSystem.out.println(\"\\t\\t\\t\\t\\t 최대횟수/남은횟수\");\r\n\t\t\tSystem.out.println(\"가위(1), 바위(2), 보(3) 중 하나를 입력하세요>>>\\t\\t3 / \" + i);\r\n\t\t\tinput = scan.nextInt();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tai = (int)(Math.random()*3) + 1;\r\n\t\t\t\r\n\t\t\tif (input == 1) me = \"가위\";\r\n\t\t\telse if (input == 2) me = \"바위\";\r\n\t\t\telse if (input == 3) me = \"보\";\r\n\t\t\telse System.out.println(\"잘못 입력하셨습니다\");\r\n\t\t\tif (ai == 1) com = \"가위\";\r\n\t\t\telse if (ai == 2) com = \"바위\";\r\n\t\t\telse if (ai == 3) com = \"보\";\r\n\t\t\t\r\n\t\t\tif(me != \"\") {\r\n\t\t\t\tSystem.out.println(\"컴퓨터도 선택 했습니다.\");\r\n\t\t\t\tSystem.out.println(\"당신은 \\\"\" + me + \"\\\" 상대는 \\\"\" + com + \"\\\" 을 선택했습니다\");\r\n\t\t\t\r\n\t\t\t\tswitch (input - ai) {\r\n\t\t\t\tcase -1 : case 2 : \r\n\t\t\t\t\tSystem.out.println(\"★☆저런~~ 졌네요★☆\\n\"); defeat += 1; \r\n\t\t\t\t\tSystem.out.println(\"전적 => 승리 [ \" + win + \" ]\\t패배 [ \" + defeat + \" ]\\t무승부 [ \" + draw + \" ]\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase -2 : case 1 : \r\n\t\t\t\t\tSystem.out.println(\"★☆오~~ 이겼네요★☆\\n\"); win += 1; \r\n\t\t\t\t\tSystem.out.println(\"전적 => 승리 [ \" + win + \" ]\\t패배 [ \" + defeat + \" ]\\t무승부 [ \" + draw + \" ]\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 0 : \r\n\t\t\t\t\tSystem.out.println(\"★☆이런! 비겼네요★☆\\n\"); draw += 1;\r\n\t\t\t\t\tSystem.out.println(\"전적 => 승리 [ \" + win + \" ]\\t패배 [ \" + defeat + \" ]\\t무승부 [ \" + draw + \" ]\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault : System.out.println(\"오류 입니다\"); \r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(win==defeat) {\r\n\t\t\tSystem.out.println(\"최종 결과 => 무승부 입니다\");\r\n\t\t} else if(win > defeat) {\r\n\t\t\tSystem.out.println(\"최종 결과 => 당신의 승리입니다\");\r\n\t\t} else if(win < defeat) {\r\n\t\t\tSystem.out.println(\"최종 결과 => 당신의 패배입니다\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"오류 입니다\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "private static int guessing() {\n\t\t\n\t\tSystem.out.println(\"Guess a number between 1 and 100, you have 5 trials: \");\n\t\t\n\t\tint trials = 5;\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\t//set a random number as the number to be guessed\n\t\tint num = (int)(100 * Math.random()) + 1;\n\t\tint points = 0;\n\t\t\n\t\t//use a flag to check if player guess the correct number or not\n\t\tboolean flag = false;\n\t\twhile ( trials > 0) {\n\t\t\tint guess = input.nextInt();\n\t\t\ttrials--;\n\t\t\tif ( guess == num ) {\n\t\t\t\tpoints = trials == 0? 20 : trials * 20;\n\t\t\t\t//System.out.println(\"You guess the number with\"+trials+\"trials left, congratulation! +\"+ (points = trials == 0? 20 : trials * 20)+\" points\");\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}else if ( guess < num ) {\n\t\t\t\tSystem.out.println(\"The guess is too small, please try again, you have \"+trials+\" trials left.\");\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"The guess is too large, please try again, you have \"+trials+\" trials left.\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif ( !flag ) System.out.println(\"Trials used up, + 0 points\");\n\t\treturn points;\n\t\t\n\t}", "@Override\n\tpublic double compete() {\n\t\tdouble result=MyTools.getRandomNum(10, 20); \t\n\t\tsetThisResult(result);\n\t\treturn result;\n\t}", "public static void main(String[] args) {\n\t\tRandom rand = new Random();\n\t\tScanner scan = new Scanner(System.in);\n\t\tint randNum;\n\t\tString userGuess;\n\t\tString outcome;\n\t\tString goAgain;\n\t\tboolean goAgainValid=false;\n\t\tboolean quit=false;\n\t\t\n\t\ttry {\n\t\t\t// declaring the questions and answers\n\t\t\tString[] jokeQuestions = { \"Largest planet ? \", \"Worse song ever ? \", \"Capital of Peru?\", \"Roman god of War ?\" };\n\t\t\tString[] jokeAnswers = { \"Jupiter\", \"Baby\", \"Lima\", \"Mars\" };\n\t\n\t\t\tSystem.out.println(\"General knowledge quiz...\");\n\t\t\n\t\t\tdo {\n\t\t\t\t// generate random number (between 0-3)\n\t\t\t\trandNum = rand.nextInt(4);\n\t\t\t\t\n\t\t\t\t// user given random question\n\t\t\t\tSystem.out.println(\"\\nQ: \"+jokeQuestions[randNum]);\n\t\t\t\t// user responds\n\t\t\t\tSystem.out.printf(\"A: \");\n\t\t\t\tuserGuess = scan.next();\n\t\t\t\t// user answer checked against correct answer\n\t\t\t\tif (userGuess.equalsIgnoreCase(jokeAnswers[randNum])) {\n\t\t\t\t\t// correct\n\t\t\t\t\toutcome = \"Well done, your answer was correct!\";\n\t\t\t\t} else {\n\t\t\t\t\t// wrong\n\t\t\t\t\toutcome = \"Sorry, your answer was incorrect\";\n\t\t\t\t}\n\t\t\t\t// user is notified of outcome\n\t\t\t\tSystem.out.println(\"\\n\"+outcome);\n\t\t\t\t// user is prompted to continue or quit (loop until they give a valid response\n\t\t\t\tdo {\n\t\t\t\t\tSystem.out.println(\"Would you like another question? (Y or N)\");\n\t\t\t\t\tgoAgain = scan.next();\n\t\t\t\t\tif (goAgain.equalsIgnoreCase(\"y\")) {\n\t\t\t\t\t\t// repeat\n\t\t\t\t\t\tgoAgainValid=true;\n\t\t\t\t\t} else if (goAgain.equalsIgnoreCase(\"n\")) {\n\t\t\t\t\t\t// quit\n\t\t\t\t\t\tgoAgainValid=true;\n\t\t\t\t\t\tquit=true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// choose again\n\t\t\t\t\t\tSystem.out.println(\"That was an invlaid response, please respond with Y or N\");\n\t\t\t\t\t}\n\t\t\t\t} while (!goAgainValid);\n\t\t\t} while (!quit);\n\t\t} catch (Exception exception) {\n\t\t\tSystem.out.println(\"The quiz master has had a problem...\");\n\t\t} finally {\n\t\t\tSystem.out.println(\"Thanks for playing!\");\n\t\t\tscan.close();\n\t\t}\n\t}", "public static void secondOne() {\n\t\tObject[] option = { \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"reset\" };\n\t\telipse = JOptionPane.showOptionDialog(frame, \"are these doors to a farm? or are you just high?\", \"be prepared\",\n\t\t\t\tJOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, icon, option, option[9]);\n\t\thighDoors();\n\t}", "public void sendRouletteBet() {\n\t\tif (rouletteExecutor.getAposta() == null)\n\t\t\tnew Dialeg().setWarningText(\"You must bet!\");\n\t\telse {\n\t\t\tif (bool.compareAndSet(true, false)) {\n\t\t\t\ttry {\n\t\t\t\t\tmanager.getServer().enviarTrama(new Betting(rouletteExecutor.getAposta()));\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t//// e.printStackTrace();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnew Dialeg().setWarningText(\"You can't bet to the same number\");\n\t\t\t}\n\t\t}\n\t}", "private void drawWinner() {\n boolean allowMultiWinnings = ApplicationDomain.getInstance().getActiveLottery().isTicketMultiWinEnabled();\n\n // Get all lottery numbers without a prize\n ArrayList<LotteryNumber> numbersEligibleForWin = new ArrayList<>();\n TreeMap<Object, Ticket> tickets = ApplicationDomain.getInstance().getActiveLottery().getTickets();\n for (Object ticketId : tickets.keySet()) {\n Ticket ticket = tickets.get(ticketId);\n\n ArrayList<LotteryNumber> availableFromTicket = new ArrayList<>();\n for (LotteryNumber number : ticket.getLotteryNumbers()) {\n if (number.getWinningPrize() == null) {\n availableFromTicket.add(number);\n } else {\n if (!allowMultiWinnings) {\n // Stop looking through the ticket since it already has a winner and\n // multiply winnings are disallowed. And prevent the already-looked-through\n // numbers of the ticket to be added.\n availableFromTicket.clear();\n break;\n }\n }\n }\n numbersEligibleForWin.addAll(availableFromTicket);\n }\n\n // Check for all numbers having won\n if (numbersEligibleForWin.isEmpty()) {\n Toast.makeText(getContext(), R.string.no_winless_numbers, Toast.LENGTH_LONG).show();\n return;\n }\n\n // Draw random number and save the ID in the prize\n int numberSelector = (int) (Math.random() * numbersEligibleForWin.size());\n Prize prizeToBeWon = ApplicationDomain.getInstance().getPrizeToBeWon();\n prizeToBeWon.setNumberId(numbersEligibleForWin.get(numberSelector).getId());\n\n ApplicationDomain.getInstance().prizeRepository.savePrize(prizeToBeWon);\n ApplicationDomain.getInstance().setPrizeToBeWon(null);\n }", "private void chooseDifficulty(){\n\t\tint dif = -1;\n\t\tdo {\n\t\t\tprintSeparation();\n\t\t\tSystem.out.println(\"Elegeix una dificultat entre 1 i 3.\");\n\t\t\tdif = readInt();\n\t\t} while (dif <= 0 || dif >= 4);\n\t\tdifficulty = dif - 1;\n\t\tprintSeparation();\n\t\tSystem.out.println(\"S'ha elegit la dificultat \" + dif + \".\");\n\t}", "public static void fundation(){\n Scanner keyboard = new Scanner(System.in);//Keyboard input initializer\r\n String STR; //string for yes or no\r\n System.out.println(\"Would you like to donate to LDJ bank? (y/n)\");\r\n System.out.println();\r\n System.out.printf(\">\");\r\n STR = keyboard.next(); //the user inputs y or n in order to say if they want to donate or not\r\n if(STR.equals(\"y\")){ //if they want to donate\r\n System.out.println();\r\n System.out.println(\"Insert the amount to donate\");\r\n System.out.println();\r\n System.out.printf(\"> $\");\r\n FUNDATION = keyboard.nextInt(); //the promt is printed and the amount is requested\r\n if(FUNDATION <= BALANCE){//if the amount to donate is minor to the balance you can donate\r\n FUNDATIONM = FUNDATIONM + FUNDATION; //the fundation money plus the amount to be donated\r\n BALANCE = BALANCE - FUNDATION; //the user balance minus the fundation money\r\n System.out.println(\"Thank you for donating!\");\r\n }\r\n else {\r\n System.out.println(\"Insufficient Balance\");\r\n }\r\n }\r\n else if(STR.equals(\"n\")){ //if n then prints blank\r\n System.out.println();\r\n }\r\n System.out.println(\"We'll continue with the operation\");\r\n System.out.println();\r\n System.out.println(\"Done\");\r\n }", "public void generateConfiramtionCode(){\n \n double tempNum;\n \n //generate random confirmation code (4 - digit)\n try{\n do{\n tempNum = Math.random();\n confirmationCode = (int) (tempNum*10000);\n System.out.println(\"Confirmation Code: \" + confirmationCode);\n }while(confirmationCode<1000);\n }catch(Exception e){}\n \n System.out.println(\"Confirmation Code: \" + confirmationCode);\n JOptionPane.showMessageDialog(null, \"Confirmation Code: \" + confirmationCode);\n }", "public static void hint() {\n\t\t// have computer pick random index for hint\n\t\tRandom hintRandom = new Random();\n\t\tint hint = hintRandom.nextInt(computerCode.length);\n\t\t// makes it easier for people to read instead of having the first item be at\n\t\t// the 0 place\n\t\tint index = hint + 1;\n\n\t\tSystem.out.println(\"Ah, you want a hint?\");\n\t\tif (totalHint == 0) {\n\t\t\tSystem.out.println(String.format(\"The %d%s digit is: %d\", index, getNumberSuffix(index), computerCode[hint]));\n\t\t}\n\n\t\tif (totalHint == 1) {\n\t\t\tSystem.out.println(\"There is a \" + computerCode[hint] + \" somewhere\");\n\t\t}\n\n\t\tif (totalHint > 1) {\n\t\t\tSystem.out.println(\"Too bad, no more hints! \");\n\t\t}\n\t\ttotalHint++;\n\t}", "public void dealerTurn() {\n\t\tview.writeLog(\"All players pass, dealer's turn.\");\n\t\tdealer.send(new Package(\"MESSAGE\",\"Now is your turn.\"));\n\t\tdealer.send(new Package(\"ASK\",null));\n\t}", "public static void numberManiaDifficulty(Scanner input){\n Random rand= new Random();\n byte difficulty=0;\n String userInput;\n boolean difficultyHasBeenChosen=false;\n System.out.println(\"Easy from number 1 to 1000. (1)\\nMedium from number 1 to 5000 (2)\\nHard from number 1 to 10000 (3)\");\n do{\n userInput=input.nextLine();\n switch(userInput){\n case \"1\":\n difficulty=1;\n difficultyHasBeenChosen=true;\n break;\n case \"2\":\n difficulty=2;\n difficultyHasBeenChosen=true;\n break;\n case \"3\":\n difficulty=3;\n difficultyHasBeenChosen=true;\n break;\n default:\n System.out.println(\"Please write a valid option\");\n }\n \n }while (difficultyHasBeenChosen==false);\n numberManiaGame(input, difficulty);\n }", "public void dicebreakers(View view) {\n TextView Questions = this.findViewById(R.id.displayCongrats);\n\n switch (number) {\n case 1:\n Questions.setText(Q1);\n break;\n case 2:\n Questions.setText(Q2);\n break;\n case 3:\n Questions.setText(Q3);\n break;\n case 4:\n Questions.setText(Q4);\n break;\n case 5:\n Questions.setText(Q5);\n break;\n case 6:\n Questions.setText(Q6);\n break;\n\n }\n\n }", "private void showResults() {\n\n AlertDialog.Builder builder1 = new AlertDialog.Builder(this);\n\n Collections.shuffle(selectedPlayers); // shuffle the players the user has selected\n\n StringBuilder sb = new StringBuilder(); // create a string builder to add numbers in front of the players' names\n for (int i = 0; i < selectedPlayers.size(); i++) {\n sb.append(String.valueOf(i + 1) + \". \" + selectedPlayers.get(i) + \"\\n\");\n }\n builder1.setTitle(\"Player order is\");\n String s = sb.toString();\n s = s.trim();\n builder1.setMessage(s);\n builder1.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n }\n });\n gong.stop();\n gong.start();\n builder1.show();\n }", "String askingOrderNumber();", "private void getRandomNumber() {\n\t\tRandom generator = new Random();\n\t\trandomNumber = generator.nextInt(POSSIBLE_CHOICE.length);\n\t}", "private void askForAPizza() {\n\t\tconnectToServer();\n\t\tout.println(\"Give me a pizza\");\n\t\tout.flush();\n\t\tdisconnectFromServer();\n\t}", "public static void main(String[] args) {\n\t\tRandom r = new Random();\n\t\tScanner scan = new Scanner(System.in);\n\t\tint secretNumber = r.nextInt(10);\n\t\tint userGuess=0;\n\t\tString userChoice=\"\";\n\n\t\t//\n\t\t\n\n\t\twhile(!userChoice.equalsIgnoreCase(\"n\"))\n\t\t{\n\t\t\tSystem.out.println(\"I've got a number between 1 and 10. What is it?\");\n\t\t\tSystem.out.println(\"Your guess:\");\n\t\t\ttry{\n\t\t\t\tuserGuess=scan.nextInt();\n\t\t\t\t\n\t\t\t\tif(userGuess<secretNumber)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"You guessed too low. Try again? (Y/N)\");\n\t\t\t\t\tuserChoice=scan.next();\n\t\t\t\t}\n\t\t\t\telse if(userGuess>secretNumber)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"You guessed too high. Try again? (Y/N)\");\n\t\t\t\t\tuserChoice=scan.next();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"You got it!\");\n\t\t\t\t\tuserChoice=\"n\";\n\t\t\t\t}\n\t\t\t\tif(!userChoice.equalsIgnoreCase(\"y\") && !userChoice.equalsIgnoreCase(\"n\"))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Really? You couldn't choose Y or N? Fine. You're done.\");\n\t\t\t\t\tuserChoice=\"n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(java.util.InputMismatchException e)\n\t {\n\t\t\t\tSystem.out.println(\"That's supposed to be an integer... Try again.\");\n\t scan.nextLine();\n\t }\n\t\t\t\n\t \n\t\t}\n\n\t\tSystem.out.println(\"Thanks for playing! Bye!\");\n\n\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tLog.d(\"vggg\", \"bjbjb\");\r\n\t\t\t\tgetnumber_three_direct_sum_xuan_clear();\r\n\t\t\t\tgetrand();\r\n\t\t\t\tfor (int i = 0; i < 1; i++) {\r\n\t\t\t\t\tint xuan = rand[i];\r\n\t\t\t\t\tswitch (xuan) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\tselectxuan0();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\tselectxuan1();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\tselectxuan2();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 3:\r\n\t\t\t\t\t\tselectxuan3();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 4:\r\n\t\t\t\t\t\tselectxuan4();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 5:\r\n\t\t\t\t\t\tselectxuan5();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 6:\r\n\t\t\t\t\t\tselectxuan6();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 7:\r\n\t\t\t\t\t\tselectxuan7();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 8:\r\n\t\t\t\t\t\tselectxuan8();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 9:\r\n\t\t\t\t\t\tselectxuan9();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 10:\r\n\t\t\t\t\t\tselectxuan10();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 11:\r\n\t\t\t\t\t\tselectxuan11();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 12:\r\n\t\t\t\t\t\tselectxuan12();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 13:\r\n\t\t\t\t\t\tselectxuan13();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 14:\r\n\t\t\t\t\t\tselectxuan14();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 15:\r\n\t\t\t\t\t\tselectxuan15();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 16:\r\n\t\t\t\t\t\tselectxuan16();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 17:\r\n\t\t\t\t\t\tselectxuan17();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 18:\r\n\t\t\t\t\t\tselectxuan18();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 19:\r\n\t\t\t\t\t\tselectxuan19();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 20:\r\n\t\t\t\t\t\tselectxuan20();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 21:\r\n\t\t\t\t\t\tselectxuan21();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 22:\r\n\t\t\t\t\t\tselectxuan22();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 23:\r\n\t\t\t\t\t\tselectxuan23();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 24:\r\n\t\t\t\t\t\tselectxuan24();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 25:\r\n\t\t\t\t\t\tselectxuan25();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 26:\r\n\t\t\t\t\t\tselectxuan26();\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "public void repeatDeposit() throws IOException, ClassNotFoundException {\r\n System.out.println(\"\\nWould you make a deposit ?\");\r\n System.out.print(\"1 - Yes\\n2 - No\");\r\n System.out.println();\r\n System.out.print(\"Select option: \");\r\n int depositOption = this.input.nextInt();\r\n switch(depositOption) {\r\n case 1:\r\n this.deposit(); // Calling the Mentioned Function\r\n case 2:\r\n this.showMenu(); // Calling the Mentioned Function\r\n default:\r\n System.out.println(\"Error: Invalid option. Please enter 1 OR 2\");\r\n }\r\n }", "private void DealersTurn() {\n\n dealer.setHandSum(CalcHandSum(dealer, dealer.hand));\n //Hits while hand is less than 17\n while (dealer.getHandSum() < 17) {\n dealer.Hit(dealer, deck);\n dealer.setHandSum(CalcHandSum(dealer, dealer.hand));\n }\n if (IsBust(dealer)) {\n System.out.println(\"Dealer busts at \" + dealer.getHandSum());\n dealer.isBust = true;\n }\n else {\n System.out.println(\"Dealer stays at \" + dealer.getHandSum());\n dealer.setHandSum(dealer.getHandSum());\n }\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tRandom rd = new Random();\n\t\tint num[] = lotto();\n\n\t\tfor (int i = 0; i < num.length; i++) {\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\n\t}", "public static void TwentyOne(){\n\t\t\n\t\t// Create Scanner and Random objects\n\t\tScanner sc = new Scanner(System.in);\n\t\tRandom rand = new Random();\n\t\t\n\t\t// Set score to 0 for start of game\n\t\tint score = 0;\n\t\t\n\t\t// Create blank string to store yes/no for further draws\n\t\tString drawAgain = \"\";\n\t \n\t // Create loop to continue to add cards until user says no\n\t do{\n\t\t \n\t // User random utility to create random draw amount and display amount\n\t int newDraw = rand.nextInt(11)+1;\n\t System.out.println(\"You drew \"+ newDraw + \".\");\n\t \n\t // Add the newDraw value to the total score of the user and display total\n\t score = score + newDraw; \n\t System.out.println(\"Your current total is \"+ score +\".\");\n\t \n\t // If user score greater than 21, display user lost\n\t if(score > 21){\n\t System.out.println(\"You lost.\");\n\t return;\n\t }\n\t \n\t // If user score is equal to 21, display user won\n\t if(score == 21){\n\t System.out.println(\"You won!\");\n\t return;\n\t }\n\t \n\t // Ask user if they would like to draw another card\n\t System.out.print(\"Do you want to draw another card? \");\n\t \n\t // Store user input as String drawAgain\n\t drawAgain = sc.nextLine();\n\t \n\t // Check is drawAgain contains n letter to check if user answered yes or no\n\t // Continue loop while user input is yes\n\t } while(drawAgain.compareToIgnoreCase(\"n\") != 0);\n\t\n\t // Use random to create random draw by dealer/computer in range 13 to 20\n\t int compDraw = rand.nextInt(8)+13;\n\t \n\t // Display the computer draw\n\t System.out.println(\"The computer drew \"+ compDraw +\".\");\n\t \n\t // If computer score is higher, display user lost\n\t if(score < compDraw){\n\t\t System.out.println(\"You lost!\");\n\t\t return;\n\t }\n\t \n\t // If player has more or equal score than computer, display user won\n\t else{\n\t\t System.out.println(\"You won.\");\n\n\t\t return;\n\t }\n\t \n\t}", "public static void main(String[] args) throws InterruptedException {\n\t\tSystem.out.println(\"Danton: Captain sir, I am to show you the ropes of this operation.\");\r\n\t\tThread.sleep(1000);\r\n\t\tSystem.out.println(\"Danton: Our target today is in an old resource depot near Tharsis highway.\");\r\n\t\tThread.sleep(1000);\r\n\t\tSystem.out.println(\"Danton: Do you have any questions about an operation, sir?\");\r\n\t\t\r\n\t\tString opAnswers[] = {\"What is an operation?\", \"What are the results of an operation?\", \"Nothing.\"};\r\n\t\t\r\n\t\tboolean answers = false;\r\n\t\t\r\n\t\tdo{\r\n\t\tString opResponses = (String) JOptionPane.showInputDialog(null, \"Questions?\", null, JOptionPane.QUESTION_MESSAGE,null, opAnswers, opAnswers[0]);\r\n\t\t\r\n\t\tif (opResponses == \"What is an operation?\"){\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Danton: An operation is a mission where you head down to the surface of the planet with a specific purpose in mind.\");\r\n\t\t\tanswers = false;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif (opResponses == \"What are the results of an operation?\") {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Danton: If you successfully complete the mission, the ship may get water, food, or raw materials. Cool items may also be found planetside\");\r\n\t\t\tSystem.out.println(\"Whether you fail or pass an operation, however, your ship's food, water, and fuel supply diminish.\");\r\n\t\t\tanswers = false;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif (opResponses == \"Nothing.\")\r\n\t\t\r\n\t\t\tanswers = true;\r\n\t\t\r\n\t\t}while (answers == false);\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"Danton: Very well sir.\");\r\n\t\tSystem.out.println(\"Danton: Scanners indicate a hostile presence in the area. \");\r\n\t\tSystem.out.println(\"Danton: Don't worry about getting shot too much, our med bay should patch you up so long as you aren't dead.\");\r\n\t\tSystem.out.println(\"I'll head around, you hold guard.\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"The ensuing, somber silence is shaken by a sniper shot\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Raider: Let's see what you're made of!\");\r\n\t\t\r\n\t\tint enemyhealth = 30;\r\n\t\tint health = 100;\r\n\t\tboolean cantFlee = false;\r\n\t\t\r\n\t\tcombat.battle(health, enemyhealth,cantFlee);\r\n\t}", "public boolean askQuestion(Question curentQuestion, int level) {\n this.level = level;\n System.out.println(\"Die \"+(1+level)*100+\" Euro Frage!\");\n System.out.println(curentQuestion.getQuestion());\n //Sets the position of the right answer so it will be random\n int positionCorrectAnswer = (int) (Math.random() * ((curentQuestion.getWrongAnswers().size()) + 1));\n curentQuestion.getWrongAnswers().add(positionCorrectAnswer, curentQuestion.getCorrectAnswer());\n for (int j = 0; j < curentQuestion.getWrongAnswers().size(); j++) {\n System.out.println(\"\\t\" + (1 + j) + \". \" + curentQuestion.getWrongAnswers().get(j));\n }\n int amountOfAnswers = curentQuestion.getWrongAnswers().size();\n if (joker) {\n System.out.println(\"\\t5. 50:50 Joker\");\n amountOfAnswers = 5;\n\n }\n return getUserInput(amountOfAnswers, positionCorrectAnswer, curentQuestion);\n\n }", "private void requestBucks() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Please choose a user to request TE Bucks from:\");\n\t\t\tUser fromUser;\n\t\t\tboolean isValidUser;\n\t\t\tdo {\n\t\t\t\tfromUser = (User)console.getChoiceFromOptions(userService.getUsers());\n\t\t\t\tisValidUser = ( fromUser\n\t\t\t\t\t\t\t\t.getUsername()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(currentUser.getUser().getUsername())\n\t\t\t\t\t\t\t ) ? false : true;\n\n\t\t\t\tif(!isValidUser) {\n\t\t\t\t\tSystem.out.println(\"You can not request money from yourself\");\n\t\t\t\t}\n\t\t\t} while (!isValidUser);\n\t\t\t\n\t\t\t// Select an amount\n\t\t\tBigDecimal amount = new BigDecimal(\"0.00\");\n\t\t\tboolean isValidAmount = false;\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\tamount = new BigDecimal(console.getUserInput(\"Enter An Amount (0 to cancel):\\n \"));\n\t\t\t\t\tisValidAmount = true;\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tSystem.out.println(\"Please enter a numerical value\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(amount.doubleValue() < 0.99 && amount.doubleValue() > 0.00) {\n\t\t\t\t\tSystem.out.println(\"You cannot request less than $0.99 TEB\");\n\t\t\t\t\tisValidAmount = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (amount.doubleValue() == 0.00) {\n\t\t\t\t\tmainMenu();\n\t\t\t\t}\n\t\t\t} while(!isValidAmount);\n\n\t\t\t// Create transfer object\n\t\t\tboolean confirmedAmount = false;\n\t\t\tString confirm = \"\";\n\t\t\tTransfer transfer = null;\n\t\t\twhile (!confirmedAmount) {\n\t\t\t\tconfirm = console.getUserInput(\"You entered: \" + amount.toPlainString() + \" TEB. Is this correct? (y/n)\");\n\t\t\t\tif (confirm.toLowerCase().startsWith(\"y\")) {\n\t\t\t\t\t// transferService to POST to server db\n\t\t\t\t\tSystem.out.println(\"You are requesting: \" + amount.toPlainString() +\n\t\t\t\t\t\t\t\" TEB from \" + fromUser.getUsername());\n\t\t\t\t\ttransfer = createTransferObj(\"Request\", \"Pending\",\n\t\t\t\t\t\t\t\t\tcurrentUserId, fromUser.getId(), amount);\n\t\t\t\t\tboolean hasSent = \n\t\t\t\t\t\t\ttransferService.sendBucks(currentUserId, fromUser.getId(), transfer);\n\t\t\t\t\tif (hasSent) {\n\t\t\t\t\t\t// TODO :: Test this\n\t\t\t\t\t\tSystem.out.println(\"The code executed\");\n\t\t\t\t\t}\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Request canceled.\");\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t} \t\n\t\t\t}\n\t\t\t\n\t\t}catch(UserServiceException ex) {\n\t\t\tSystem.out.println(\"User Service Exception\");\n\t\t}catch(TransferServiceException ex) {\n\t\t\tSystem.out.println(\"Transfer Service Exception\");\n\t\t}\n\t\t\n\t}", "public void quest() {\n if ((int) (Math.random() * 100) > 50) {\n addStrangeCharacter();\n System.out.println(\"You found the npc to talk with\");\n if ((int) (Math.random() * 75) > 50) {\n addStrangeCharacter();\n System.out.println(\"And you beat the baws\");\n } else {\n System.out.println(\"And he baws owned you\");\n }\n } else {\n System.out.println(\"You couldn't even find the npc, lol n00b\");\n }\n }", "public void generalPrompt() {\n System.out.println(\"What would you like to do?\");\n }", "public static void chaotic (int numbers){\n for (int n = 0 ; n < numbers ; n++){\r\n // to return a value from 0 up to, but not including 1 use the equation below\r\n int randNum = (int)(Math.random()*(5 - 1 + 1)) + 1;\r\n //use an if loop to find if the answer from the equation equals to 5 \r\n if (randNum == 5){\r\n // the computer will print out five asterisks\r\n System.out.println(\"*****\");\r\n }\r\n // if the random number equals to 4\r\n if (randNum == 4){\r\n // the computer will print out four asterisks\r\n System.out.println(\"****\");\r\n }\r\n // if the random number is equal to 3\r\n if (randNum == 3){\r\n // the computer will print out three asterisks\r\n System.out.println(\"***\");\r\n }\r\n // if the random number is equal to 2\r\n if (randNum == 2){\r\n // the computer will print out two asterisks\r\n System.out.println(\"**\");\r\n }\r\n // if the random number is equal to 1\r\n if (randNum == 1)\r\n // the computer will print out one asterisks\r\n System.out.println(\"*\");\r\n }\r\n }", "public static void luckyNumber() {\n System.out.println(\"What is your lucky number? \");\n int luckyNum = sc.nextInt(); \n }", "public static void main(String[] args) {\r\n\t\tFraction.setDecimalFormatSelected(false);\r\n\t\tboolean go = true;\r\n\t\tint correct = 0;\r\n\t\tint incorrect = 0;\r\n\t\twhile (go) {\r\n\t\t\tdouble num = (Math.random()) * 50;\r\n\t\t\tdouble denom = (Math.random()) * 50;\r\n\t\t\tdouble num2 = (Math.random()) * 50;\r\n\t\t\tdouble denom2 = (Math.random()) * 50;\r\n\r\n\t\t\tFraction fractionOne = new Fraction((int) num, (int) denom);\r\n\t\t\tFraction fractionTwo = new Fraction((int) num2, (int) denom2);\r\n\r\n\t\t\tdouble chooserTemp = (Math.random()) * 4;\r\n\t\t\tint chooser = (int) chooserTemp;\r\n\r\n\t\t\tFraction answer;\r\n\t\t\tint answerNum = 0;\r\n\t\t\tint answerDenom = 0;\r\n\t\t\tFraction correctAnswer;\r\n\r\n\t\t\tif (chooser == 0) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Add \" + fractionOne\r\n\t\t\t\t\t\t+ \" with \" + fractionTwo);\r\n\t\t\t\tFraction sum = fractionOne.add(fractionTwo);\r\n\t\t\t\tcorrectAnswer = sum;\r\n\t\t\t} else if (chooser == 1) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Subtract \" + fractionOne\r\n\t\t\t\t\t\t+ \" by \" + fractionTwo);\r\n\t\t\t\tFraction difference = fractionOne.subtract(fractionTwo);\r\n\t\t\t\tcorrectAnswer = difference;\r\n\t\t\t} else if (chooser == 2) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Multiply \" + fractionOne\r\n\t\t\t\t\t\t+ \" with \" + fractionTwo);\r\n\t\t\t\tFraction product = fractionOne.multiply(fractionTwo);\r\n\t\t\t\tcorrectAnswer = product;\r\n\t\t\t} else {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Divide \" + fractionOne\r\n\t\t\t\t\t\t+ \" by \" + fractionTwo);\r\n\t\t\t\tFraction quotient = fractionOne.divide(fractionTwo);\r\n\t\t\t\tcorrectAnswer = quotient;\r\n\t\t\t}\r\n\r\n\t\t\tString userAnswer = JOptionPane\r\n\t\t\t\t\t.showInputDialog(\"Please enter your answer \\n\"\r\n\t\t\t\t\t\t\t+ \"(Please seperate the numerator and denominator with a space)\"\r\n\t\t\t\t\t\t\t+ \"\\n To exit hit cancel\");\r\n\r\n\t\t\tif (userAnswer != null) {\r\n\t\t\t\tScanner scan = new Scanner(userAnswer);\r\n\t\t\t\tboolean first = true;\r\n\t\t\t\twhile (scan.hasNextInt()) {\r\n\t\t\t\t\tif (first) {\r\n\t\t\t\t\t\tanswerNum = scan.nextInt();\r\n\t\t\t\t\t\tfirst = false;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tanswerDenom = scan.nextInt();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tanswer = new Fraction(answerNum, answerDenom);\r\n\t\t\t\tif (answer.equals(correctAnswer)) {\r\n\t\t\t\t\tcorrect++;\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\r\n\t\t\t\t\t\t\t\"Good Job!! You are correct!\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tJOptionPane\r\n\t\t\t\t\t\t\t.showMessageDialog(null,\"Sorry that answer is incorrect the answer is \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ correctAnswer.toString()\r\n\t\t\t\t\t\t\t\t\t\t\t+ \"\\nMake sure that you are typeing in with a space and not a Slash.\");\r\n\t\t\t\t\tincorrect++;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tgo = false;\r\n\t\t\t\tJOptionPane.showMessageDialog(null,\r\n\t\t\t\t\t\t\"Thank you for Playing \\n You got \" + correct\r\n\t\t\t\t\t\t\t\t+ \" correct. \\n You got \" + incorrect\r\n\t\t\t\t\t\t\t\t+ \" incorrect.\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void decideResult() {\n\t\t\n\t\tif (mUser.getHandValue() < 22 && mUser.getHandValue() > mDealer.getHandValue()) {\n\t\t\tmResult = \"win\";\n\t\t}else if(mUser.getHandValue() < 22 && mUser.getHandValue() == mDealer.getHandValue()) {\n\t\t\tmResult = \"draw\";\n\t\t}else {\n\t\t\tmResult = \"lose\";\n\t\t}\n\t\t\n\t}", "@Override\n protected void executeStrategy()\n {\n //Get the latest clue given by the SpyMaster\n Clue clue = game.getCurrentClue();\n pickCard(clue);\n\n // We used up our guesses so we are done\n if (game.getGuessesLeft() == 0) { this.game.endCurrentTurn(); }\n }", "public static void main(String [] args){\n\t\tArrayList<Integer> allNums = new ArrayList<>();\n\t\tfor(int i = 0; i < 10; i++){\n\t\t\tallNums.add(i);\n\t\t}\n\t\t//Make into one big number\n\t\t//Proceed to divide it to knock bits off the right hand side\n\t\tboolean miracleFound = false;\n\t\tString tempNum;\n\t\tlong miracleNum = 0;\n\t\twhile(!miracleFound){\n\t\t\t//Make A String from the List And analyse it\n\t\t\ttempNum = \"\";\n\t\t\tfor(int i = 0; i < allNums.size(); i++){\n\t\t\t\ttempNum = tempNum + allNums.get(i);\n\t\t\t\t//System.out.println(\"Tempnum is \" + tempNum + \" and i is \" + i);\n\t\t\t\tif(i > 0){\n\t\t\t\t\tmiracleNum = Long.valueOf(tempNum).longValue();\n\t\t\t\t\tif(miracleNum % (i+1) == 0){ //If it is divisible without remainders\n\t\t\t\t\t\tif((i+1) == 10){\n\t\t\t\t\t\t\tmiracleFound = true;\n\t\t\t\t\t\t\tSystem.out.println(\"Number \" + miracleNum + \" was a miracle number.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tSystem.out.println(miracleNum + \" % \" + (i+1) + \" is 0.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tCollections.shuffle(allNums);\n\t\t\t\t\t\ti = allNums.size();\n\t\t\t\t\t\tSystem.out.println(\"Number \" + miracleNum + \" was not a miracle number.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic double compete() {\n\t\tdouble result=MyTools.getRandomNum(500, 800);\n\t\tsetThisResult(result);\n\t\treturn result;\n\t}", "void askLeaderCardThrowing();", "public static void showHands(){\n Scanner scan=new Scanner(System.in);//call the Scanner constructor\n int Deck[]=new int[52];//set up the array for deck\n String answer=\"\";\n do{\n //store 0 to 51 into the Deck array\n for(int i=0;i<Deck.length;i++){\n Deck[i] = i; \n }\n \n int Hand[]={-1,-1,-1,-1,-1};//set up and initialize the array for hand\n \n Random r = new Random ();//Decalre a instance of the Random generator\n int k = Deck.length;//declare a variable to show the effective length of the Deck array\n //set up a loop to draw cards from the deck ramdomly\n for(int j=0;j<Hand.length;j++){\n int draw = r.nextInt(k-1);\n Hand[j] = Deck[draw];//store the ramdom pick from Deck into Hand\n //set the random pick in Deck to -1 and swap with the last effective number in Deck\n Deck[draw]=Deck[k-1];\n Deck[k-1]= -1;\n k--;//reduce the effective array size\n }\n \n //set up the strings, which will indicate the result\n String Clubs = \"Clubs: \";\n String Diamonds = \"Diamonds: \";\n String Hearts = \"Hearts: \";\n String Spades = \"Spades: \";\n //set up a loop to determine the kind and value of each card in hand\n for(int j=0;j<Hand.length;j++){\n int kind = Hand[j]/13;//calculate the kind of the card\n int rank = Hand[j]%13;//calculete the rank of the card\n switch (kind){\n case 0:\n switch (rank){\n case 0:\n Clubs += \"A \";\n break;\n case 1:\n Clubs += \"K \";\n break; \n case 2:\n Clubs += \"Q \";\n break; \n case 3:\n Clubs += \"J \";\n break; \n case 4:\n Clubs += \"10 \";\n break; \n case 5:\n Clubs += \"9 \";\n break; \n case 6:\n Clubs += \"8 \";\n break; \n case 7:\n Clubs += \"7 \";\n break; \n case 8:\n Clubs += \"6 \";\n break; \n case 9:\n Clubs += \"5 \";\n break; \n case 10:\n Clubs += \"4 \";\n break; \n case 11:\n Clubs += \"3 \";\n break; \n case 12:\n Clubs += \"2 \";\n break; \n } \n break;\n case 1:\n switch (rank){\n case 0:\n Diamonds += \"A \";\n break;\n case 1:\n Diamonds += \"K \";\n break; \n case 2:\n Diamonds += \"Q \";\n break; \n case 3:\n Diamonds += \"J \";\n break; \n case 4:\n Diamonds += \"10 \";\n break; \n case 5:\n Diamonds += \"9 \";\n break; \n case 6:\n Diamonds += \"8 \";\n break; \n case 7:\n Diamonds += \"7 \";\n break; \n case 8:\n Diamonds += \"6 \";\n break; \n case 9:\n Diamonds += \"5 \";\n break; \n case 10:\n Diamonds += \"4 \";\n break; \n case 11:\n Diamonds += \"3 \";\n break; \n case 12:\n Diamonds += \"2 \";\n break; \n } \n break;\n case 2:\n switch (rank){\n case 0:\n Hearts += \"A \";\n break;\n case 1:\n Hearts += \"K \";\n break; \n case 2:\n Hearts += \"Q \";\n break; \n case 3:\n Hearts += \"J \";\n break; \n case 4:\n Hearts += \"10 \";\n break; \n case 5:\n Hearts += \"9 \";\n break; \n case 6:\n Hearts += \"8 \";\n break; \n case 7:\n Hearts += \"7 \";\n break; \n case 8:\n Hearts += \"6 \";\n break; \n case 9:\n Hearts += \"5 \";\n break; \n case 10:\n Hearts += \"4 \";\n break; \n case 11:\n Hearts += \"3 \";\n break; \n case 12:\n Hearts += \"2 \";\n break; \n } \n break;\n case 3:\n switch (rank){\n case 0:\n Spades += \"A \";\n break;\n case 1:\n Spades += \"K \";\n break; \n case 2:\n Spades += \"Q \";\n break; \n case 3:\n Spades += \"J \";\n break; \n case 4:\n Spades += \"10 \";\n break; \n case 5:\n Spades += \"9 \";\n break; \n case 6:\n Spades += \"8 \";\n break; \n case 7:\n Spades += \"7 \";\n break; \n case 8:\n Spades += \"6 \";\n break; \n case 9:\n Spades += \"5 \";\n break; \n case 10:\n Spades += \"4 \";\n break; \n case 11:\n Spades += \"3 \";\n break; \n case 12:\n Spades += \"2 \";\n break; \n } \n break;\n }\n }\n \n //print out the results\n System.out.println(Clubs);\n System.out.println(Diamonds);\n System.out.println(Hearts);\n System.out.println(Spades);\n //ask user for input\n System.out.print(\"Go again? Enter 'y' or 'Y', anything else to quit- \");\n answer=scan.next();\n }while(answer.equals(\"Y\") || answer.equals(\"y\"));\n return;\n }", "public void bruteForcePrint() {\n long start = System.currentTimeMillis();\n io.print(\"The given statement is \");\n if (brute.checkEveryCombination(numVariables, statement)) {\n io.println(\"satisfiable.\");\n } else {\n io.println(\"not satisfiable.\");\n }\n io.println(\"The calculation took \" + (System.currentTimeMillis() - start) + \" milliseconds.\\n\");\n }", "@Override\r\n public String ask() {\r\n String word = \"\";\r\n Time.getInstance().time += 1;\r\n word = \"Do you like the Story?\";\r\n System.out.println(word);\r\n return word;\r\n }", "private int userLoing() {\n\t\t\n\t\tScanner scan2 = new Scanner(System.in);\n\t\tSystem.out.println(\"\\nPour vous rappler, pour quitter il faut entrer q ou quit pour quitter \\navant de commencer de saisir de mot de passe.\\n\"+\n\t\t\t\t\n\t\t\t\t\"--------------------------------------------------------------------------------------\");\n\t\tboolean correct = true; //To check the confirmation of the password\n\t\t\n\t\t\n\t\t//to get the user's name\n\t\tString nom;\n\t\tdo {\n\t\t System.out.print(\"Entrez un nom d'une longueur qui > 4: \");\n\t\t nom = scan2.nextLine();\n\t\t} while ((nom.length() < 4) && !(nom.equalsIgnoreCase(\"q\")) && !(nom.equalsIgnoreCase(\"quit\")));\n\t\t\n\t\tif(nom.equalsIgnoreCase(\"q\") || nom.equalsIgnoreCase(\"quit\")) {\n\t\t\tSystem.out.println(\"\\n-----------------------------------------------------\\nVous avez été dérigé vers le meun principal!\\n-----------------------------------------------------\");\n\t\t\tcorrect = true;\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t\n\t\t\t//for the password and the confirmation\n\t\t\t\n\t\t\twhile(correct) {\n\t\t\t\tint mdp;\n\t\t\t\tdo {\n\t\t\t\t System.out.print(\"Entrez un mot de passe qui contient au moins 6 chiffres SVP: \");\n\t\t\t\t while (!scan2.hasNextInt()) {\n\t\t\t\t\t System.err.print(\"Entrez un mot de passe qui contient au moins 6 chiffres SVP: \");\n\t\t\t\t scan2.next();\n\t\t\t\t }\n\t\t\t\t mdp = scan2.nextInt();\n\t\t\t\t} while (Integer.toString(mdp).length() < 6);\n\t\t\t\t\n\t\t\t\tint mdp2;\n\t\t\t\tdo {\n\t\t\t\t System.out.print(\"Confirmez vôtre mot de passe SVP : \");\n\t\t\t\t while (!scan2.hasNextInt()) {\n\t\t\t\t\t System.err.print(\"Confirmez vôtre mot de passe : \");\n\t\t\t\t scan2.next(); \n\t\t\t\t }\n\t\t\t\t mdp2 = scan2.nextInt();\n\t\t\t\t} while (Integer.toString(mdp2).length() < 6);\n\t\t\t\t\n\t\t\t\tcorrect = mdp == mdp2 ? false: true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint res = !correct? 1 : 0;\n\t\treturn res;\n\t\t\n\t}", "public void askToAll() {\n\t\tfor(ClientThread player: players) {\n\t\t\tif(player != dealer)\n\t\t\t\tplayer.send(new Package(\"ASK\",null));\n\t\t\telse {\n\t\t\t\tdealer.send(new Package(\"MESSAGE\",\"As dealer, you'll wait for other players...\"));\n\t\t\t}\n\t\t}\n\t}", "private void bust() {\n //Dialog box pop-up\n JOptionPane.showMessageDialog(this, this.getPlayerName() + \" busted with a value of: \" + this.getValue(), \"BUSTED!\", JOptionPane.INFORMATION_MESSAGE);\n busted = true; //Hand busted\n }" ]
[ "0.62578243", "0.6219007", "0.61166394", "0.6066675", "0.5952849", "0.59222776", "0.58349633", "0.5812952", "0.5764266", "0.57606107", "0.5758164", "0.5737934", "0.5729894", "0.5711738", "0.57002366", "0.567864", "0.5667875", "0.56585836", "0.5642553", "0.56135464", "0.56032103", "0.5566275", "0.55608624", "0.555584", "0.55444163", "0.55374074", "0.55155283", "0.5514266", "0.55091333", "0.5499526", "0.54775727", "0.5462751", "0.545882", "0.54361576", "0.5434439", "0.54300725", "0.54178756", "0.54044557", "0.54021007", "0.53861624", "0.5374508", "0.53721845", "0.5371553", "0.53606236", "0.53535956", "0.5351489", "0.5339232", "0.53362346", "0.53354657", "0.5335258", "0.5329798", "0.5322317", "0.53186774", "0.5314546", "0.53092605", "0.53031194", "0.53030306", "0.5300268", "0.52967453", "0.52893186", "0.52857566", "0.5281166", "0.5280726", "0.52806765", "0.527872", "0.5275174", "0.52685875", "0.52638376", "0.5260814", "0.52596265", "0.52567476", "0.5249768", "0.5248719", "0.5238295", "0.5233506", "0.5231058", "0.5227996", "0.5226229", "0.52257055", "0.5224226", "0.521087", "0.5208637", "0.52019894", "0.5200638", "0.51998746", "0.5195344", "0.518391", "0.5182846", "0.5182303", "0.5180197", "0.5176792", "0.51766413", "0.51753443", "0.51741207", "0.516007", "0.51595616", "0.51593983", "0.51585186", "0.5158135", "0.51517123" ]
0.6402671
0
Start announcing the predraw which is 15 minutes before the winner is announced
public static void announcePreDraw(String time) { for (int index = 0; index < DRAW_TIME_ANNOUNCEMENT.length; index++) { if (time.equals(DRAW_TIME_ANNOUNCEMENT[index][0])) { preDrawAnnouncement(); return; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void preDrawAnnouncement() {\n\t\twinnerAnnounced = false;\n\t\ttimePreDrawAnnounced = System.currentTimeMillis();\n\t\tObject object = new Object();\n\t\tCycleEventHandler.getSingleton().addEvent(object, new CycleEvent() {\n\t\t\tint timer = 0;\n\n\t\t\t@Override\n\t\t\tpublic void execute(CycleEventContainer container) {\n\t\t\t\tNpc npc = NpcHandler.npcs[lotteryNpcIndex];\n\t\t\t\tnpc.forceChat(\"The lottery is at \" + getTotalPotString() + \"! Talk to Durial321 at ::shops to win, \" + getMinutesLeftTillWinner() + \" min\" + Misc.getPluralS(\n\t\t\t\t\t\tgetMinutesLeftTillWinner()) + \" left!\");\n\t\t\t\tAnnouncement.announce(\n\t\t\t\t\t\t\"<img=27><col=a36718> The lottery is at \" + getTotalPotString() + \"! Talk to Durial321 at ::shops to win, \" + getMinutesLeftTillWinner() + \" min\"\n\t\t\t\t\t\t+ Misc.getPluralS(getMinutesLeftTillWinner()) + \" left!\");\n\t\t\t\ttimer++;\n\t\t\t\tif (timer == 15) {\n\t\t\t\t\ttimer = 0;\n\t\t\t\t\tcontainer.stop();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void stop() {\n\t\t\t\twinnerAnnounced = true;\n\t\t\t\tannounceWinner();\n\t\t\t}\n\t\t}, 100);\n\n\t\tObject object1 = new Object();\n\t\tCycleEventHandler.getSingleton().addEvent(object1, new CycleEvent() {\n\t\t\tint timer = 0;\n\n\t\t\t@Override\n\t\t\tpublic void execute(CycleEventContainer container) {\n\t\t\t\tif (winnerAnnounced) {\n\t\t\t\t\tcontainer.stop();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tNpc npc = NpcHandler.npcs[lotteryNpcIndex];\n\t\t\t\tif (Misc.hasPercentageChance(25)) {\n\t\t\t\t\tnpc.requestAnimation(EMOTES[Misc.random(EMOTES.length - 1)]);\n\t\t\t\t}\n\t\t\t\tnpc.forceChat(\n\t\t\t\t\t\t\"The lottery is at \" + getTotalPotString() + \"! Talk to me to win, \" + getMinutesLeftTillWinner() + \" min\" + Misc.getPluralS(getMinutesLeftTillWinner())\n\t\t\t\t\t\t+ \" left!\");\n\t\t\t\ttimer++;\n\t\t\t\tif (timer == 1500) {\n\t\t\t\t\ttimer = 0;\n\t\t\t\t\tcontainer.stop();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void stop() {\n\t\t\t}\n\t\t}, 1);\n\n\t}", "public void startSurvey(){\n\t\tmRecordTimer.sendMessageDelayed(Message.obtain(null, MESSAGE_TO_START_SURVEY), TIME_TO_START_SURVEY);\n\t}", "public void ratCrewStart() {\n printStatus();\n ratCrewGo();\n madeTheRun = true;\n printStatus();\n }", "private void beginSchedule(){\n\t\tDivaApp.getInstance().submitScheduledTask(new RandomUpdater(this), RandomUpdater.DELAY, RandomUpdater.PERIOD);\n\t}", "public void startTurn(){\n if (hasWinner()){\n announceWinner();\n return;\n }\n\n gameDraft();\n gameAttack();\n if (hasWinner()) return; //Skipping fortify if the game is won\n gameFortify();\n displayMessage(\"End of \" + currentPlayer.getName() + \"'s turn!\");\n }", "public void startRideTime(){\r\n\t\trideTime.start();\r\n\t}", "public void noteOn()\n\t{\n\t\ttimeFromOn = 0f;\n\t\tisTurnedOn = true;\n\t\t\n\t\t// ddf: reset these so that the envelope can be retriggered\n\t\ttimeFromOff = -1.f;\n\t\tisTurnedOff = false;\n\t}", "public void inTurn() {\n\t\tthis.timer = new Timer();\n\t\ttimer.schedule(new TimerTask() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tfinishTurn();\n\t\t\t}\n\t\t}, turnMaxSeconds * 1000);\n\n\t}", "public void announceWinner(){\n gameState = GameState.HASWINNER;\n notifyObservers();\n }", "public void startAlarm(){\r\n\t\tAlarm alarm = new Alarm(\"magAanvallen\", 1 / aanvallenPerSeconden);\r\n\t\talarm.addTarget(this);\r\n\t\talarm.start();\r\n\t}", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n rumbleInYourPants();\n turnSpindleIfNeeded();\n turnWinchIfNeeded();\n if (arcadeDrive != null) \n arcadeDrive.start();\n }", "public boolean preaction() {\n\t\tboolean p = true;\r\n\t\tif(!model.setSCVBuilding(2*preactionTime+duration)) { // adding time before and after\r\n\t\t\tp = false;\r\n\t\t}\r\n\t\tif(p) {\r\n\t\t\t//System.out.println(model.printTime() + \" <SCActionBuilding> Preaction\");\r\n\t\t\tpreactionComplete=true;\r\n\t\t}\r\n\t\treturn p;\r\n\t\t\r\n\t}", "public void startTracking() {\n reset();\n trackingTask = scheduler.scheduleAtFixedRate(this, 0, 10, TimeUnit.MILLISECONDS);\n }", "public static void playerWonInc(){\r\n\t\t_playerWon++;\r\n\t}", "public void announceWinners() {\n\t\tsynchronized (blockedAnnouncer) {\n\t\t\tif (resultsNotInAnnouncer(blockedAnnouncer)) {\n\t\t\t\twhile (true) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tblockedAnnouncer.wait();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}// while\n\t\t\t}// if\n\t\t}// synch\n\t\twhile (waitingForResults.size() > 0) {\n\t\t\tsynchronized (waitingForResults.elementAt(0)) {\n\t\t\t\twaitingForResults.elementAt(0).notify();\n\t\t\t\twaitingForResults.removeElementAt(0);\n\t\t\t}// sncnh\n\t\t}// while\n\t}", "public static Appointment appointmentIn15Min() {\n Appointment appointment;\n LocalDateTime now = LocalDateTime.now();\n ZoneId zid = ZoneId.systemDefault();\n ZonedDateTime zdt = now.atZone(zid);\n LocalDateTime ldt = zdt.withZoneSameInstant(ZoneId.of(\"UTC\")).toLocalDateTime();\n LocalDateTime ldt2 = ldt.plusMinutes(15);\n String username = UserDB.getCurrentUser().getUserName();\n try (Connection conn =DriverManager.getConnection(DB_URL, user, pass);\n Statement statement = conn.createStatement()) {\n String query = \"SELECT * FROM appointment WHERE start BETWEEN '\" + ldt + \"' AND '\" + ldt2 + \"' AND \" + \n \"createdBy='\" + username + \"'\";\n ResultSet results = statement.executeQuery(query);\n if(results.next()) {\n appointment = new Appointment(results.getInt(\"appointmentId\"), results.getInt(\"customerId\"), results.getString(\"title\"),\n results.getString(\"end\"), results.getString(\"contact\"), results.getString(\"description\"),results.getString(\"location\"), \n results.getTimestamp(\"start\"), results.getTimestamp(\"end\"), results.getDate(\"createDate\"), results.getDate(\"lastupDate\"), results.getString(\"createdBy\"));\n return appointment;\n }\n } catch (SQLException e) {\n System.out.println(\"SQLException: \" + e.getMessage());\n }\n return null;\n }", "private void handleRoundStart() {\n\t\t// Increment attackerDelay\n\t\tmAttackerDelay++;\n\t\tmRoundText = \"Starting Round \" + mRoundNumber + \"...\";\n\n\t\t// If it is over the threshold of 15 frames, start the standard round\n\t\tif(mAttackerDelay > 15) {\n\t\t\tmGameState = STATE_ROUND_PLAY;\n\t\t\tmRoundText = \"Round: \" + mRoundNumber;\n\t\t\thideAllButtons();\n\t\t}\n\t}", "private void applyRaceStartPenalty()\n {\n for(int i = 0; i < getDrivers().getSize(); i++)\n {\n getDrivers().getDriver(i).setAccumulatedTime(0); // set to default\n int driverRanking = getDrivers().getDriver(i).getRanking();\n int timePenalty = 10;\n switch(driverRanking)\n {\n case 1: timePenalty = 0; break;\n case 2: timePenalty = 3; break;\n case 3: timePenalty = 5; break;\n case 4: timePenalty = 7; break;\n }\n getDrivers().getDriver(i).setAccumulatedTime(timePenalty);\n }\n }", "private void startEyeTracking() {\n Log.d(\"Vision\", \"Going to start Recording Activity\");\n startCameraSource();\n leftEyeOpenProbability = 0;\n rightEyeOpenProbability = 0;\n probabilityCount = 0;\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n\n\n String eyeTrackginTimerString = preferences.getString(eyeTrackingTimer, \"5\");\n Log.d(\"EyeTracking\", \"Going to start eye tracking for \" + eyeTrackginTimerString);\n int timer = 5;\n try {\n timer = Integer.parseInt(eyeTrackginTimerString);\n } catch (Exception e) {\n timer = 5;\n }\n\n new Timer().schedule(new TimerTask() {\n @Override\n public void run() {\n finalProbablityCount = probabilityCount;\n finalLeftEyeProbablity = leftEyeOpenProbability / finalRightEyeProbablity;\n finalRightEyeProbablity = rightEyeOpenProbability / finalProbablityCount;\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n createMicrophone();\n// speakAnswer();\n }\n });\n\n }\n }, timer * 1000);\n }", "@Override\r\n public void fromFearToChase() {\r\n if (afraid()) {\r\n startChase();\r\n }\r\n }", "private void projectWeekAnxiety() {\n increaseStat(Stat.ANXIETY, 10);\n }", "private void forestIncomeTimerStart(){\n forestIncomeTimer.schedule(new TimerTask() {\n\n @Override\n public void run() {\n\n\n forestModel.setWood(forestModel.getWood()\n .add(forestModel.getElfIncome())\n .add(forestModel.getLumberjackIncome())\n .add(forestModel.getWoodcutterIncome()));\n setWoodLabel();\n setWoodIncomeLabel();\n\n\n\n\n\n }\n\n }, 1, 1000);\n }", "@Override\n public void periodic()\n {\n if(AutoIntake)\n intake(-0.2f, -0.5f);\n }", "public void newTurnCountdown() {\n newTurn = true;\n newTurnTimer = 77;\n }", "private void informTimeToCross() {\n if (continueAskingTimes) {\n requestTimes();\n }\n }", "public void startTurn() {\r\n\t\tbought.clear();\r\n\t\tdeck.gained.clear();\r\n\t\tfor(int i = deck.duration.size() - 1; i >= 0; i--) {\r\n\t\t\tdeck.duration.get(i).durationAction();\r\n\t\t}\r\n\t\tnotifyObservers();\r\n\t\taccess.log(getPlayerName() + \"'s turn started\");\r\n\t\tif(ai != null) ai.takeTurn();\r\n\t}", "public void notifyTurn()\n {\n playerObserver.onTurnStart();\n }", "public void startAgentTime() {\n Timer timer = new Timer(SIBAConst.TIME_AGENT_CHANGE_FOR_HOUR, new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n \t\n \tCalendar c = Calendar.getInstance();\n int minutos = c.get(Calendar.MINUTE);\n int hora = c.get( (Calendar.HOUR_OF_DAY)); \n hora = hora * 60;\n if (minutos >= 30 && minutos <= 59)\n {hora +=30;\t\n }\n if (hora > ctrlHours)\n {ctrlHours = hora;\n //activada bandera de modificacion de programacion\n activatedScheduleChange = true;\n }\n else\n { if (hora < ctrlHours)\n \t ctrlHours = 0;\n }\n \t\n \t\n \n }\n });\n timer.start();\n }", "public void newTurnPauseCountdown()\n {\n pauseNewTurn = true;\n pauseNewTurnTimer = 169;\n }", "public void ratedPositive(View arg0){\r\n\t\t/*\tif (!checkiFRated(1)){\r\n\t\t\tToast.makeText(ShowAnswerActivity.this,\"RATED POSSITIVE\",\tToast.LENGTH_SHORT).show();\r\n\t\t\trates++;\r\n\t\t\ttxtview_Rates.setText(String.valueOf(rates));\t\r\n\t\t\tsetRate(1);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tToast.makeText(ShowAnswerActivity.this,\"YOU ALREADY RATED THIS ANSWER\",\tToast.LENGTH_SHORT).show();\r\n\t\t}\t*/\r\n\t\t//\tanimation = new WaitingAnimation(this);\r\n\t\t//\tanimation.execute();\r\n\r\n\t}", "@Override\n\tpublic void run() {\n\t\tlogger.info(\"Timer for the initialization expired\");\n\t\tif(logic.getCurrentPlayer() != null) {\n\t\t\tlogic.setBonusBar(0, player.getPlayerID());\n\t\t}\n\t\telse {\n\t\t\tlogic.setLeaderCard(0, player.getPlayerID());\n\t\t}\n\t}", "private ActionInterface timeSchedulingTest(PlayerInfo playerInfo, Timestamp executionTime, double responseFactor) {\r\n\r\n User user = playerInfo.getUser();\r\n int favouriteTime = playerInfo.getReceptivityForPlayer().getFavouriteTimeOfDay(ReceptivityProfile.SignificanceLevel.SPECIFIC);\r\n\r\n switch(favouriteTime){\r\n\r\n case ReceptivityProfile.DAY:\r\n\r\n if(randomize3(user, 0)){\r\n\r\n // Schedule correctly\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1000, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.DAY );\r\n }\r\n\r\n if(randomize3(user, 1)){\r\n\r\n // Schedule later\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1001, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.EVENING );\r\n }\r\n\r\n // Schedule earlier\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1002, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.NIGHT );\r\n\r\n case ReceptivityProfile.EVENING:\r\n\r\n if(randomize3(user, 0)){\r\n\r\n // Schedule correctly\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1011, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.EVENING );\r\n }\r\n\r\n if(randomize3(user, 1)){\r\n\r\n // Schedule later\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1012, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.NIGHT );\r\n }\r\n\r\n // Schedule earlier\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1010, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.DAY );\r\n\r\n case ReceptivityProfile.NIGHT:\r\n\r\n if(randomize3(user, 0)){\r\n\r\n // Schedule correctly\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1022, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.DAY );\r\n }\r\n\r\n if(randomize3(user, 1)){\r\n\r\n // Schedule later\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1020, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.EVENING );\r\n }\r\n\r\n // Schedule earlier\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 1021, getState(), responseFactor)\r\n .scheduleInTime( ReceptivityProfile.NIGHT );\r\n\r\n\r\n default:\r\n\r\n // No specific time of day for user.\r\n\r\n return new NotificationAction(\"Hello \"+ user.name+\", your daily bonus is waiting for you at Slot America. Click here to claim it NOW!\",\r\n user, executionTime, getPriority(), getTag(), Name, 3, getState(), responseFactor)\r\n .scheduleInTime( favouriteTime );\r\n\r\n }\r\n\r\n\r\n\r\n\r\n\r\n }", "private void setHeartRateMonitor()\n {\n\n Calendar cal = Calendar.getInstance();\n Date now = new Date();\n cal.setTime(now);\n\n long alarm_time = cal.getTimeInMillis();\n\n// if(cal.before(Calendar.getInstance()))\n// alarm_time += 60*1000;\n\n AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n\n Intent intent = new Intent(this, HeartRateMonitor.class);\n\n PendingIntent pendingIntent = PendingIntent.getBroadcast(this, HEART_RATE_MONITOR_REQUEST_CODE, intent,PendingIntent.FLAG_UPDATE_CURRENT);\n\n alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, alarm_time,90000, pendingIntent);\n\n Log.i(\"hrmonitor\",\"hrmonitor alarm set\");\n }", "public VotingStartEvent(Arena arena) {\n this.arena = arena;\n }", "private void startRain() {\n PacketPlayOutGameStateChange rainPacket = new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.c, 0);\n NMSUtils.sendPacket(player, rainPacket);\n rainBar.addPlayer(player);\n }", "public void startAlarm() {\n AlarmManager manager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n\n Calendar calendar = Calendar.getInstance();\n\n // Set alarm only if the remained time is over 10 minutes\n if (time >10 ) {\n //TODO: Change to ((time * 60000) - 600000) for 10 minutes before\n calendar.setTimeInMillis((System.currentTimeMillis() + ((time * 1000)) - 10000)); // Alarm set to 10 sec before the booking\n\n Log.d(TAG, \"current time = \" + new Date().toLocaleString());\n// Log.d(TAG, \"current time = \" + System.currentTimeMillis());\n Log.d(TAG, \"Alarm set at = \" + calendar.getTime());\n\n /* no Repeat */\n manager.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),\n 0, pendingIntent);\n }\n\n }", "ConferenceScheduleBuilderService startLunch();", "@Override\r\n\tpublic void social() {\n\t\tSystem.out.println(\"Social class is once every 2 weeks. Class schedule TBD\");\r\n\t\t\r\n\t}", "public void startExploration() {\n watermarkGoalTick = currentTick;\n }", "private void raceStart()\n {\n int counter = 1;\n System.out.println(\"Event: \"+strEvent);\n System.out.println();\n System.out.println(\"Race Distance (feet): \"+intRaceLength);\n System.out.println();\n for(Animal ani : aniContestants)\n {\n System.out.println(\"Contestant \"+counter+\": \" + ani.getName() + \" The \" + ani.getSpecies());\n ani.aniIntro(); // Polymorphism:Each animal type has it's own intro due to special 'abilities' that\n // may be implemented during the race.\n counter++;\n }\n System.out.println();\n System.out.println(\"-----------------------------------------------------------------------------------------\");\n System.out.println(\"Aaaaaaaaaaaand we're OFF!!!\");\n System.out.println();\n }", "private void startEmergency()\n {\n sendUserPresentLocationDetailsToEmergencyConatct();\n\n /*final ClientConfiguration clientConfiguration = getClientConfiguration();\n completedTime = completedTime + clientConfiguration.getTimeDelayEmergency();\n Timer timer = new Timer();\n timer.schedule(new TimerTask()\n {\n @Override\n public void run()\n {\n completedTime = completedTime + clientConfiguration.getTimeDelayEmergency();\n if (clientConfiguration.getMaxTimeEmergency() < completedTime)\n {\n completedTime = 0;\n cancel();\n notifyEmergencyCompleted();\n }\n else\n {\n sendUserPresentLocationDetailsToEmergencyConatct();\n }\n }\n }, clientConfiguration.getTimeDelayEmergency(), clientConfiguration.getTimeDelayEmergency());*/\n }", "public void activate() {\n\t\t// set cooldown counter\n\t}", "@Override\n public void addPeriodicInterest()\n {\n elapsedPeriods++; \n super.addPeriodicInterest();\n System.out.println(elapsedPeriods);\n }", "public void autonomousPeriodic() {\n // RobotMap.helmsman.trackPosition();\n Scheduler.getInstance().run();\n }", "public void dayStartNew() {\n dateOfLastEdit = currentDate;\n sumOfExpenses = 0;\n challengeDaysRunning++;\n\n expensesRefresh();\n carry = moneyLeft;\n\n currentStateSaveToSharedPref();\n expensesUpdateWaterfallChart();\n }", "private void start_announce_timer() {\n if (rprocesses == null) {\n return;\n }\n // Start timers for all areas\n for (RoutingProcess rp : rprocesses.values()) {\n rp.start_announce_timer();\n }\n }", "public void advance() {\n\n if (length == Length.DAILY) {\n startDate.add(Calendar.DATE, 1);\n } else if (length == Length.WEEKLY) {\n startDate.add(Calendar.WEEK_OF_YEAR, 1);\n } else if (length == Length.BIWEEKLY) {\n startDate.add(Calendar.DATE, 14);\n } else if (length == Length.MONTHLY) {\n startDate.add(Calendar.MONTH, 1);\n } else if (length == Length.YEARLY) {\n startDate.add(Calendar.YEAR, 1);\n }\n\n calculateEndDate();\n\n }", "private void gameStart(){\n\t\tRandom randomGenerator = new Random();\n\t\tint ranNum = randomGenerator.nextInt(teamNum);\n\t\tSystem.out.println(\"The team to go first will be \" + teams[ranNum].getName());\n\t\tgameHelper(ranNum); //process all 25 questions until it's over\n\t\tfinalRound();\n\t\tprintFinalWinner();\n\t\t\n\t\t\n\t}", "public SubjectVotePhase(@NotNull Arena arena) {\n super(arena, 10);\n\n this.startTimer();\n }", "public static void scheduleRepeatingElapsedNotification15(Context context) {\n\n\n // Setting intent to class where notification will be handled\n Intent intent = new Intent(context, AlarmReceiver.class);\n\n // Setting pending intent to respond to broadcast sent by AlarmManager everyday at 8am\n alarmIntentElapsed = PendingIntent.getBroadcast(context, ALARM_TYPE_ELAPSED, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Getting instance of AlarmManager service\n alarmManagerElapsed = (AlarmManager)context.getSystemService(ALARM_SERVICE);\n\n // Daily inexact alarm from phone boot - current set to test for 10 seconds\n alarmManagerElapsed.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime(), 60000 * 15, alarmIntentElapsed);\n }", "public void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\t\n shooterArm.updateSmartDashboard();\n\t\tdriveTrain.getDegrees();\n\n\t\tvision.findGoal();\n\t\tvision.getGoalXAngleError();\n\t\tvision.getGoalArmAngle();\n\n\t\t// Stop auto mode if the robot is tilted too much\n\t\tif (Math.abs(driveTrain.getRobotPitch())<=60 && Math.abs(driveTrain.getRobotRoll())<=60)\n\t\t\ttimerTilt.reset();\n\t\t\n\t\t// For some reason, robot did not move in last match in auto, so this code is suspect\n\t\t// Do the Pitch/Roll values need to be zeroed?\n//\t\tif ( autonomousCommand != null && timerTilt.get()>0.5)\n//\t\t\tautonomousCommand.cancel();\n\n\t}", "@Override\n\tpublic void payCrew() {\n\t\tSystem.out.println(\"Crew paid!, You can start sailing now!\");\n\t\tgame.loading();\n\t}", "public void resolveTurnCountdown() {\n resolveTurn = true;\n resolveTurnTimer = 130;\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 }", "@Override\n\tpublic void landedOn() {\n\t\tMonopolyGameController.getInstance();\n\t\tMonopolyGameController.getCurrentPlayer().increaseMoney(300);\n\t\tLogger.getInstance().notifyAll(MonopolyGameController.getCurrentPlayer().getName()+ \" gained 300 dollars by landing on Bonus Square\");\n\t\tMonopolyGameController.allowCurrentPlayerToEndTurn();\n\n\t}", "public void run(){\n \t\t\t\tif (duration>0) {\r\n \t\t\t\t\trecord.startRecording();\r\n \t\t\t\t\tstpBtn.setEnabled(true);\r\n \t\t\t\t\t//psBtn.setEnabled(true); //TODO: pause button action\r\n \t\t\t\t\t(new Timer()).schedule(new TimerTask() {\r\n \t\t\t\t\t\tpublic void run () {\r\n \t\t\t\t\t\t\t//stop recording\r\n \t\t\t\t\t\t\trecord.stopRecording();\r\n \t\t\t\t\t\t\trcrdBtn.setEnabled(true);\r\n \t\t\t\t\t\t\tstpBtn.setEnabled(false);\r\n \t\t\t\t\t\t\tpsBtn.setEnabled(false);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}, duration);\r\n \t\t\t\t} else { //countdown, no timer\r\n \t\t\t\t\t//start recording\r\n \t\t\t\t\trecord.startRecording();\r\n \t\t\t\t\t//stop and pause buttons come visible after countdown has run\r\n \t\t\t\t\trcrdBtn.setEnabled(false);\r\n \t\t\t\t\tstpBtn.setEnabled(true);\r\n \t\t\t\t\t//psBtn.setEnabled(true); TODO: implement pause action\r\n \t\t\t\t\t//TODO: Mimimize frame to taskbar\r\n \t\t\t\t}\r\n \t\t\t}", "public void act()\n {\n trackTime();\n showScore();\n \n }", "public void setWon(){\n won = true;\n }", "ConferenceScheduleBuilderService startEvent();", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tpt.setRetryCounter( pt.getRetryCounter() + 1 );\n\t\t\t\tpt.getContext().startService( new Intent( pt.getContext(), PerfectTimeService.class ) );\n\t\t\t}", "public synchronized void start() {\r\n\t\tif(type == TYPE_DELAY) {\r\n\t\t\tdate = new Date(System.currentTimeMillis() + delay);\r\n\t\t}\r\n\t\tif(started) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tstarted = true;\r\n\t\ttm.addStartedTimers(this);\t\t\r\n//\t\ttm.getHandler().post(new Runnable() {\r\n//\t\t\tpublic void run() {\r\n//\t\t\t\tdoCancel();\r\n//\t\t\t\tdoStart();\r\n//\t\t\t}\r\n//\t\t});\r\n\t}", "long getInitialDelayInSeconds();", "@Scheduled(cron = \"0 0 10 17 8 ?\")\n\tpublic void scheduleTaskYearly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 10:00 o'clock in 17 August - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public void initAlgorithm() {\n executor.scheduleAtFixedRate(scheduledThoughtsProducer::periodicalThoughtsCheck, 1, 5,TimeUnit.MINUTES);\n// executor.scheduleAtFixedRate(scheduledThoughtsProducer::periodicalThoughtsCheck, 2, 10,TimeUnit.SECONDS);\n\n // every day perform random thought dice roll\n // also roll for random time: 10am - 9pm\n Cron4j.scheduler.schedule(Cron4j.EVERY_DAY_AT_10_AM, () -> {\n int produceThoughtDice = (int) (Math.random() * 3); // 66% yes, 33% no\n if (produceThoughtDice < 2) {\n int timeShift = (int) (Math.random() * 12); // 0-11\n executor.schedule(scheduledThoughtsProducer::periodicalThoughtProduceSuitable, timeShift, TimeUnit.HOURS);\n } else {\n System.out.println(\"Thought not produced today because of the dice: \" + produceThoughtDice);\n }\n });\n// Cron4j.scheduler.schedule(Cron4j.EVERY_MINUTE, () -> {\n// executor.schedule(scheduledThoughtsProducer::periodicalThoughtProduceSuitable, 0, TimeUnit.SECONDS);\n// });\n\n // every week perform a statistical overview\n // should be not very long and with a lot of variations\n Cron4j.scheduler.schedule(Cron4j.EVERY_WEEK_SUNDAY_18_PM, () -> {\n// Cron4j.scheduler.schedule(Cron4j.EVERY_MINUTE, () -> {\n executor.schedule(scheduledThoughtsProducer::periodicalWeeklyThoughts, 0, TimeUnit.SECONDS);\n });\n\n // start the scheduler\n Cron4j.scheduler.start();\n }", "private boolean startForaging() {\n\t\t// check if it is an acceptable time to forage\n\t\tif(clock.time > startForagingTime && clock.time < endForagingTime) {\n\t\t\tif(RandomHelper.nextDoubleFromTo(0, 1) < forageProb) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private void schedule(PlanRecord plan, Context context) {\n Date d = null;\n\n try {\n DateTime test = new DateTime();\n test.setStringSQL(plan.offset);\n d = test.getYearMonthDay();\n } catch (java.text.ParseException e) {\n Log.e(\"PlanReceiver-schedule\", \"Couldn't schedule \" + plan.name + \"\\n e:\" + e);\n e.printStackTrace();\n }\n\n Log.e(\"PlanReceiver-schedule\", \"d.year=\" + (d.getYear() + 1900) + \" d.date=\" + d.getDate() + \" d.month=\" + d.getMonth());\n\n Calendar firstRun = new GregorianCalendar(d.getYear() + 1900, d.getMonth(), d.getDate());\n Log.e(\"PlanReceiver-schedule\", \"FirstRun:\" + firstRun);\n\n Intent intent = new Intent(context, PlanReceiver.class);\n intent.putExtra(\"plan_id\", plan.id);\n intent.putExtra(\"plan_acct_id\", plan.acctId);\n intent.putExtra(\"plan_name\", plan.name);\n intent.putExtra(\"plan_value\", plan.value);\n intent.putExtra(\"plan_type\", plan.type);\n intent.putExtra(\"plan_category\", plan.category);\n intent.putExtra(\"plan_memo\", plan.memo);\n intent.putExtra(\"plan_offset\", plan.offset);\n intent.putExtra(\"plan_rate\", plan.rate);\n intent.putExtra(\"plan_next\", plan.next);\n intent.putExtra(\"plan_scheduled\", plan.scheduled);\n intent.putExtra(\"plan_cleared\", plan.cleared);\n\n //Parse Rate (token 0 is amount, token 1 is type)\n final String phrase = plan.rate;\n final String[] tokens = phrase.split(\"[ ]+\");\n\n final PendingIntent sender = PendingIntent.getBroadcast(context, Integer.parseInt(plan.id), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n //Get the AlarmManager service\n final AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n\n final Locale locale = context.getResources().getConfiguration().locale;\n final DateTime nextRun = new DateTime();\n\n if (tokens[1].contains(\"Days\")) {\n Log.d(\"PlanReceiver-schedule\", \"Days\");\n\n //If Starting Time is in the past, fire off next day(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.DAY_OF_MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), (Integer.parseInt(tokens[0]) * AlarmManager.INTERVAL_DAY), sender);\n } else if (tokens[1].contains(\"Weeks\")) {\n Log.d(\"PlanReceiver-schedule\", \"Weeks\");\n\n //If Starting Time is in the past, fire off next week(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), (Integer.parseInt(tokens[0]) * AlarmManager.INTERVAL_DAY) * 7, sender);\n } else if (tokens[1].contains(\"Months\")) {\n Log.d(\"PlanReceiver-schedule\", \"Months\");\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(cal.getTimeInMillis());\n cal.add(Calendar.MONTH, Integer.parseInt(tokens[0]));\n\n //If Starting Time is in the past, fire off next month(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), cal.getTimeInMillis(), sender);\n } else {\n Log.e(\"PlanReceiver-schedule\", \"Could not set alarm; Something wrong with the rate\");\n }\n\n }", "public void startHealing()\n\t{\n\t\ttimerList.clear();\n\t\tinHospitalTimer = new PlayPauseTimer(10, new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tworld.heal();\n\t\t\t\tx = random.nextInt(world.getSIMULATION_WIDTH() - individualSize);\n\t\t\t\ty = random.nextInt(world.getSIMULATION_HEIGHT() - individualSize); \n\t\t\t\tmoveInPopulation();\n\t\t\t\texitHospital();\n\t\t\t\thealthStatus = HealthStatus.HEALTHY;\n\t\t\t\ttimerList.remove(inHospitalTimer);\n\t\t\t}\n\t\t\t\n\t\t}, world.getRefreshTime());\n\t\ttimerList.add(inHospitalTimer);\n\t}", "public void grantTickets(){\n //45mins\n if (tempTime >= 10){\n addTicket();\n }\n tempTime = 0;\n }", "void awardPoints(){\n if (currentPoints <= 100 - POINTSGIVEN) {\n currentPoints += POINTSGIVEN;\n feedback = \"Your current rating is: \" + currentPoints + \"%\";\n }\n }", "public void act() \n {\n updateTimerDisplay();\n if(timeCounter < 3600){\n timeCounter++;\n \n }else{\n timeElapsed++;\n timeCounter = 0;\n }\n checkHighScore();\n checkRegScore();\n\n }", "@Override\r\n\tpublic void onAdvanceStart(RoadMap map, List<Event> events, int time) {\n\t\t\r\n\t}", "public void testStart(View view) {\n //Toast.makeText(RecordLapActivity.this, \"TESTING START BUTTON\", Toast.LENGTH_LONG).show();\n mIsInZone = true;\n t.start();\n handler.postDelayed(updater, 30);\n }", "public void run() {\n try {\n arrive();\n\n //Wait for the daily developer standup\n team.getStandupBarrier().await();\n int lunchtime = 2400;\n\n working(lunchtime, false);\n \n int dillyDallyBeforeLunch = rng.nextInt((80 - 10) + 1) + 10;\n Thread.sleep(dillyDallyBeforeLunch);\n \n System.out.println(\"Developer \" + this.getName() +\n \" Goes to lunch at \" + team.getLead().getPM().getClockTime());\n\n int lunchDuration = rng.nextInt((600 - 300) + 1) + 300;\n Thread.sleep(lunchDuration);\n \n System.out.println(\"Developer \" + this.getName() +\n \" Leaves lunch at \" + team.getLead().getPM().getClockTime());\n \n //Go to final meeting somewhere between 4:00 and 4:15\n int workInterval = rng.nextInt((4950 - 4800) + 1) + 4800;\n working(workInterval, false);\n\n System.out.println(\"Developer \" + this.getName() +\n \" Goes to afternoon meeting at \" + team.getLead().getPM().getClockTime());\n \n //Wait for that afternoon meeting to kick off\n team.getLead().getPM().getAfternoonMeetingBarrier().await();\n\n //After the meeting, get ready to go home and end the day\n int dillyDallyBeforeHome = rng.nextInt((150 - 10) + 1) + 10;\n Thread.sleep(dillyDallyBeforeHome);\n\n //Leave after afternoon meeting is complete\n System.out.println(\"Developer \" + this.getName() +\n \" is heading home at \" + team.getLead().getPM().getClockTime());\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tif (edu.wpi.first.wpilibj.DriverStation.getInstance().getMatchTime() > 12.3) {\n\t\t\tdrive(0.3, 0.0);\n\t\t} else {\n\t\t\tdrive(0.0, 0.0);\n\t\t}\n\t}", "private void setReminder(String vaccinationDate1) {\n try {\n Calendar c = Calendar.getInstance();\n c.setTime(new Date(vaccinationDate1));\n c.add(Calendar.DATE, 30);\n String vaccineDate2 = new SimpleDateFormat(\"d MMMM yyyy\").format(c.getTime());\n createNotificationChannel();\n Intent intent = new Intent(this, ReminderBroadcast.class);\n intent.putExtra(\"vaccineDate2\", vaccineDate2);\n PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0, intent, 0);\n\n AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);\n\n long timeAtButtonClick = System.currentTimeMillis();\n\n long tenSecondsInMillis = 1000 * 10;\n\n alarmManager.set(AlarmManager.RTC_WAKEUP, timeAtButtonClick + tenSecondsInMillis, pendingIntent);\n Toast.makeText(this, \"Reminder created\", Toast.LENGTH_SHORT).show();\n } catch (Exception e) {\n Toast.makeText(this, \"Could not create reminder | \" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }", "public void win()\r\n\t{\r\n\t\tmWon = true;\r\n\t}", "public void advanceTime(){\n\t\tminute++;\r\n\t\twhile (minute > 59) {\r\n\t\t\tminute -= 60;\r\n\t\t\thour++;\r\n\t\t}\r\n\t\twhile (hour > 23) {\r\n\t\t\thour -= 24;\r\n\t\t\tday++;\r\n\t\t}\r\n\t\twhile (day > 6) {\r\n\t\t\tday -= 7;\r\n\t\t\tweek++;\r\n\t\t\ttotalMoney += abonnementen * 40;\r\n\t\t}\r\n\t\twhile(week > 51) {\r\n\t\t\tweek -= 52;\r\n\t\t}\r\n\t\t//System.out.println(\"advanceTime: \"+\"week: \"+ week + \" day: \"+ day +\" hour: \" + hour +\" minute: \"+ minute+ \" Money earned = \" + Math.round(totalMoney));\r\n\t}", "private static void increment_time()\n\t{\n\t\ttime_of_day = time_of_day + 1;\n\t\tif(time_of_day>=120)\n\t\t{\n\t\t\ttime_of_day=time_of_day-120;\n\t\t}\n\t}", "public void start(){\r\n\t\tcantStop.getGameBoard().startNewTurn();\r\n\t\tallowNewRoll();\r\n\t}", "public void activateInterArrivalTimeTally() {\n\t\tactivateInterArrivalTimeTally(false);\n\t}", "public void arrive() {\r\n\t\tif (creature.getxMove() == 0 && creature.getyMove() == 0){\r\n\t\t\tarriveTimer += System.currentTimeMillis() - lastMoveTimer;\r\n\t\t\tlastMoveTimer = System.currentTimeMillis();\r\n\t\t\tif(arriveTimer < arriveCooldown)\r\n\t\t\t\treturn;\r\n\t\t\tindex++;\r\n\t\t\tif (index > checkpoints.size()){\r\n\t\t\t\tindex = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void teleopPeriodic() \n {\n // NIVision.Rect rect = new NIVision.Rect(10, 10, 100, 100);\n /*\n NIVision.IMAQdxGrab(session, frame, 1);\n //NIVision.imaqDrawShapeOnImage(frame, frame, rect,\n // DrawMode.DRAW_VALUE, ShapeMode.SHAPE_OVAL, 0.0f);\n */\n \n //cam.getImage(frame);\n //camServer.setImage(frame);\n \n //CameraServer.getInstance().setImage(frame);\n \n if(verticalLift.limitSwitchHit())\n verticalLift.resetEnc();\n \n Scheduler.getInstance().run();\n }", "public GameAboutToStartEvent() {\n this.seconds = FIVE_SECONDS;\n }", "private void beat() {\n\t\t\tSystem.out.println(\"Heart beating\");\n\t\t}", "@ScheduledMethod(start =1, interval = 1, priority = 5)\n\tpublic void diningIn() {\n\t\t//i = 0;\n\t\tif(CFG.chooseContext() &&isEating &&!isLocated){\n\t\t\t//if(CFG.isMeetUp()) System.out.println(\"Something wrent wrong\");\n\t\t\tif(RandomHelper.nextDoubleFromTo(0, 1) > diningOutRatio)\n\t\t\t\tgoTo(myHome);\n\t\t}\n\t}", "public void instants() {\n\t\tInstant now = Instant.now(); // do something time consuming Instant\n\t\tInstant later = Instant.now();\n\t\tDuration duration = Duration.between(now, later);\n\t\tSystem.out.println(duration.toMillis());\n\n\t\tLocalDate date = LocalDate.of(2015, 5, 25);\n\t\tLocalTime time = LocalTime.of(11, 55, 00);\n\t\tZoneId zone = ZoneId.of(\"US/Eastern\");\n\t\tZonedDateTime zonedDateTime = ZonedDateTime.of(date, time, zone);\n\t\tInstant instant = zonedDateTime.toInstant();\n\n\t\tInstant nextDay = instant.plus(1, ChronoUnit.DAYS);\n\t\tSystem.out.println(nextDay);\n\t\tInstant nextHour = instant.plus(1, ChronoUnit.HOURS);\n\t\tSystem.out.println(nextHour);\n\t\t// Instant nextWeek = instant.plus(1, ChronoUnit.WEEKS); // exception\n\t}", "@Override\n\tpublic void onInit(int status) {\n\t\t\n\t\tprompt(\"Thank you! Good Day!\");\n\t\tnew Timer().schedule(new TimerTask() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tAcknowledgementPresentActivity.this.finish();\n\t\t\t}\n\t\t}, 2000);\n\t}", "private void declareWinner(){\r\n System.out.println(\"All proposals received\");\r\n AID best = proposals.get(0).getSender();\r\n for(ACLMessage proposal: proposals){\r\n String time = proposal.getContent().replaceFirst(\"bid\\\\(\", \"\");\r\n time = time.replaceFirst(\" sec\\\\)\", \"\");\r\n String bestTimeString = \r\n proposal.getContent().\r\n replaceFirst(\"bid\\\\(\", \"\").\r\n replaceFirst(\" sec\\\\)\", \"\");\r\n int bestTime = Integer.parseInt(bestTimeString);\r\n int propTime = Integer.parseInt(time);\r\n if (bestTime > propTime) {\r\n best = proposal.getSender();\r\n }\r\n }\r\n sendMessage(best, \"\", ACLMessage.ACCEPT_PROPOSAL);\r\n Object[] ob = new Object[2];\r\n ob[0] = best;\r\n ob[1] = currentPartial;\r\n expectedReturn.add(ob);\r\n System.out.println(\"Accepting proposal from \" + best.getLocalName());\r\n for(ACLMessage proposal: proposals){\r\n if(!proposal.getSender().equals(best)){\r\n sendMessage(proposal.getSender(), \"\", ACLMessage.REJECT_PROPOSAL);\r\n }\r\n }\r\n proposals.clear();\r\n solvables.remove(0);\r\n if(!solvables.isEmpty()){\r\n \r\n auctionJob(solvables.get(0));\r\n }\r\n }", "void startToPerformAsLeader();", "public void playerTurnStart() {\n\r\n\t}", "public void nextTurn() {\n\t\tLog.d(TAG, \"nextTurn()\");\t\t\n\t\ttickPeople();\n\t\t//doEvents();\n\t\tupdateBar();\n\t}", "public void attemptAttack() {\r\n\t\tattackAttempts += 100;\r\n\t}", "@ScheduledMethod(start= 1, interval =1, priority=5.5)\n\tpublic void meetUp(){\n\t\tif(CFG.MEETUP_VEG()){\n\t\t\tPContext affordanceToRemove =null;\n\t\t\tfor(PContext affordance:getMeatPractice().getAffordances()){\n\t\t\t\tif(affordance.getMyLocation().getClass() == myMeetUpPlace.getClass()) affordanceToRemove = affordance;\n\t\t\t}\n\t\t\t if(affordanceToRemove != null) getMeatPractice().removeAffordance(affordanceToRemove); //After one time it isnt there anymore\n\t\t}\n\t\tif(CFG.isMeetUp() &&!isLocated){\n\t\t\tif(CFG.MEETUP_INVITE()){\n\t\t\t\tif(acceptInvitation(myMeetUpPlace)) diningOutToMeetUp(); //Only if you want to eat Veg you organize a dining party.\n\t\t\t}\n\t\t\telse goTo(myMeetUpPlace); //maar anders ga je er ok heen?!\n\t\t//\tSystem.out.println(\"Agents MEETUP\");\n\t\t}\n\t}", "void beat();", "public void surrender() {\n playerCash += playerBet / 2;\n\n //Play dealer's turn\n dealerTurn();\n\n //End the game and change the views\n restartGame();\n }", "public void userStart(View view){\n\n glay.animate().alpha(1).start();\n wlay.animate().alpha(0).start();\n\n\n started = true;\n\n\n\n ilay.animate().alpha(0).start();\n //Defining the score and total of exercises\n score = total = 0;\n\n //set the time\n sec = 60;\n start.animate().alpha(0).start();\n appRun();\n\n }", "@Override\n\tpublic void run() {\n\n\t\tprogressivNumber++;\n\t\tStoRMStatus status = detective.haveaLook();\n\t\tstatus.setPulseNumber(progressivNumber);\n\t\tHEALTH_LOG.debug(\"*** HEARTHBEAT ***\");\n\t\tHEALTH_LOG.info(status.toString());\n\t}", "public void start(){\n\t\ttimer = new Timer();\n\t\ttimer.schedule(this, 0, (long)66.6);\n\t}", "public void startWait() {\n\t\tTimer timer = new Timer();\n\t\ttimer.schedule(new TimerTask() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tif (server.getNumberOfPlayers() > 0 && !server.gameStartFlag) {\n\t\t\t\t\tserver.runGame();\n\t\t\t\t}\n\t\t\t}\n\t\t}, 120000);\n\t\t// 2min(2*60*1000)\n\t\tsendMessage(\"The game will start 2 minute late\");\n\t}", "public void autonomousPeriodic()\r\n {\r\n \r\n }" ]
[ "0.6183037", "0.57602113", "0.5728444", "0.55319613", "0.54540646", "0.54376304", "0.5364559", "0.529958", "0.5289226", "0.5261155", "0.5250412", "0.5244094", "0.5228993", "0.522845", "0.51964223", "0.5188265", "0.5183882", "0.5156056", "0.5118194", "0.51159674", "0.51021415", "0.51015043", "0.5099984", "0.50960875", "0.5086205", "0.5081515", "0.50549287", "0.5052629", "0.50459313", "0.50449544", "0.5036388", "0.5027019", "0.50260985", "0.5024796", "0.5020215", "0.5019829", "0.50159574", "0.5010548", "0.50062716", "0.4994335", "0.49863935", "0.4968631", "0.49662253", "0.4957923", "0.4957461", "0.4954986", "0.49450418", "0.4937725", "0.4931027", "0.49243343", "0.49085963", "0.4907616", "0.49055707", "0.48982722", "0.48897788", "0.48821494", "0.4868579", "0.48668474", "0.48662394", "0.48578894", "0.48558336", "0.48539215", "0.48534778", "0.48432195", "0.4840887", "0.48397237", "0.48344857", "0.48319986", "0.48319978", "0.48305184", "0.48284864", "0.4823", "0.482031", "0.4820134", "0.48184416", "0.48136652", "0.4813339", "0.48119894", "0.48100236", "0.48098823", "0.48042345", "0.4804141", "0.47965416", "0.47953907", "0.47950515", "0.47917426", "0.4789146", "0.47852352", "0.47818193", "0.47748902", "0.47694677", "0.47694588", "0.4765799", "0.47589144", "0.4758241", "0.4757311", "0.47572675", "0.4745314", "0.474499", "0.4744004" ]
0.4803098
82
Announce the winner of the lottery.
public static void announceWinner() { ArrayList<String> data = new ArrayList<String>(); for (int index = 0; index < LotteryDatabase.lotteryDatabase.size(); index++) { LotteryDatabase lotteryData = LotteryDatabase.lotteryDatabase.get(index); for (int i = 0; i < lotteryData.getTicketsPurchased(); i++) { data.add(lotteryData.getPlayerName()); } } if (data.isEmpty()) { Announcement.announce("No one has entered the lottery.", ServerConstants.RED_COL); return; } String lotteryWinnerName = data.get(Misc.random(data.size() - 1)); Announcement.announce("<img=27><col=a36718> " + lotteryWinnerName + " has won the lottery worth " + getTotalPotString() + " with " + getWinningPercentage(lotteryWinnerName) + "% chance of winning!"); Player winner = Misc.getPlayerByName(lotteryWinnerName); if (winner != null) { winner.getPA().sendScreenshot("Lottery " + getTotalPotString(), 2); } Npc npc = NpcHandler.npcs[lotteryNpcIndex]; npc.forceChat("Congratulations " + lotteryWinnerName + " has won the lottery worth " + getTotalPotString() + "!"); ItemAssistant.addItemReward(null, lotteryWinnerName, ServerConstants.getMainCurrencyId(), getTotalPotNumber(), false, -1); int moneySink = getTotalPotNumber() / 85; moneySink *= COMMISION_PERCENTAGE; CoinEconomyTracker.addSinkList(null, "LOTTERY " + moneySink); totalTicketsPurchased = 0; LotteryDatabase.lotteryDatabase.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void announceWinner() {\r\n Piece winer;\r\n if (_board.piecesContiguous(_board.turn().opposite())) {\r\n winer = _board.turn().opposite();\r\n } else {\r\n winer = _board.turn();\r\n }\r\n if (winer == WP) {\r\n _command.announce(\"White wins.\", \"Game Over\");\r\n System.out.println(\"White wins.\");\r\n } else {\r\n _command.announce(\"Black wins.\", \"Game Over\");\r\n System.out.println(\"Black wins.\");\r\n }\r\n }", "public void tellPlayerResult(int winner) {\n\t}", "public synchronized void announceWinner(Team team) {\n\n String[] gameStats = new String[players.length];\n for(int i = 0; i < players.length; i++){\n\n String s = players[i].getName() + \": \" + players[i].getCorrectAnswers();\n gameStats[i] = s;\n System.err.println(s);\n }\n\n for (PlayerHandler playerHandler : players) {\n\n if (playerHandler.getTeam() == team) {\n playerHandler.getOutputStream().println(\n GFXGenerator.drawYouWon(playerHandler.getTeam().getColor(), score, teams[0], teams[1]) +\n \"\\n\" + GFXGenerator.drawTable(gameStats, 4, \"GAME STATS (CORRECT ANSWERS)\"));\n\n continue;\n }\n\n playerHandler.getOutputStream().println(\n GFXGenerator.drawGameOver(playerHandler.getTeam().getColor(), score, teams[0], teams[1])+\n \"\\n\" + GFXGenerator.drawTable(gameStats, 4, \"GAME STATS (CORRECT ANSWERS)\"));\n }\n\n }", "private void announceWinner() {\n // FIXME\n if (_board.turn() == Piece.WP) {\n System.out.println(\"Black wins.\");\n } else {\n System.out.println(\"White wins.\");\n }\n }", "public void announceWinner(){\n gameState = GameState.HASWINNER;\n notifyObservers();\n }", "public void announceWinners(String winners) {\n JOptionPane.showMessageDialog(frame, winners + \" won the game!\");\n }", "public static void preDrawAnnouncement() {\n\t\twinnerAnnounced = false;\n\t\ttimePreDrawAnnounced = System.currentTimeMillis();\n\t\tObject object = new Object();\n\t\tCycleEventHandler.getSingleton().addEvent(object, new CycleEvent() {\n\t\t\tint timer = 0;\n\n\t\t\t@Override\n\t\t\tpublic void execute(CycleEventContainer container) {\n\t\t\t\tNpc npc = NpcHandler.npcs[lotteryNpcIndex];\n\t\t\t\tnpc.forceChat(\"The lottery is at \" + getTotalPotString() + \"! Talk to Durial321 at ::shops to win, \" + getMinutesLeftTillWinner() + \" min\" + Misc.getPluralS(\n\t\t\t\t\t\tgetMinutesLeftTillWinner()) + \" left!\");\n\t\t\t\tAnnouncement.announce(\n\t\t\t\t\t\t\"<img=27><col=a36718> The lottery is at \" + getTotalPotString() + \"! Talk to Durial321 at ::shops to win, \" + getMinutesLeftTillWinner() + \" min\"\n\t\t\t\t\t\t+ Misc.getPluralS(getMinutesLeftTillWinner()) + \" left!\");\n\t\t\t\ttimer++;\n\t\t\t\tif (timer == 15) {\n\t\t\t\t\ttimer = 0;\n\t\t\t\t\tcontainer.stop();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void stop() {\n\t\t\t\twinnerAnnounced = true;\n\t\t\t\tannounceWinner();\n\t\t\t}\n\t\t}, 100);\n\n\t\tObject object1 = new Object();\n\t\tCycleEventHandler.getSingleton().addEvent(object1, new CycleEvent() {\n\t\t\tint timer = 0;\n\n\t\t\t@Override\n\t\t\tpublic void execute(CycleEventContainer container) {\n\t\t\t\tif (winnerAnnounced) {\n\t\t\t\t\tcontainer.stop();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tNpc npc = NpcHandler.npcs[lotteryNpcIndex];\n\t\t\t\tif (Misc.hasPercentageChance(25)) {\n\t\t\t\t\tnpc.requestAnimation(EMOTES[Misc.random(EMOTES.length - 1)]);\n\t\t\t\t}\n\t\t\t\tnpc.forceChat(\n\t\t\t\t\t\t\"The lottery is at \" + getTotalPotString() + \"! Talk to me to win, \" + getMinutesLeftTillWinner() + \" min\" + Misc.getPluralS(getMinutesLeftTillWinner())\n\t\t\t\t\t\t+ \" left!\");\n\t\t\t\ttimer++;\n\t\t\t\tif (timer == 1500) {\n\t\t\t\t\ttimer = 0;\n\t\t\t\t\tcontainer.stop();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void stop() {\n\t\t\t}\n\t\t}, 1);\n\n\t}", "void printWinner() {\n }", "private void decideWinner() {\n String winnerAnnouncement;\n if(player1Choice.equalsIgnoreCase(\"rock\") && player2Choice.equalsIgnoreCase(\"scissors\")) {\n winnerAnnouncement = \"Player: ROCK vs Computer: SCISSORS ----- PLAYER WINS\";\n } else if(player1Choice.equalsIgnoreCase(\"scissors\") && player2Choice.equalsIgnoreCase(\"rock\")) {\n winnerAnnouncement = \"Player: SCISSORS vs Computer: ROCK ----- COMPUTER WINS\";\n } else if(player1Choice.equalsIgnoreCase(\"paper\") && player2Choice.equalsIgnoreCase(\"rock\")) {\n winnerAnnouncement = \"Player: PAPER vs Computer: ROCK ----- PLAYER WINS\";\n } else if(player1Choice.equalsIgnoreCase(\"rock\") && player2Choice.equalsIgnoreCase(\"paper\")) {\n winnerAnnouncement = \"Player: ROCK vs Computer: PAPER ----- COMPUTER WINS\";\n } else if(player1Choice.equalsIgnoreCase(\"scissors\") && player2Choice.equalsIgnoreCase(\"paper\")) {\n winnerAnnouncement = \"Player: SCISSORS vs Computer: PAPER ----- PLAYER WINS\";\n } else if(player1Choice.equalsIgnoreCase(\"paper\") && player2Choice.equalsIgnoreCase(\"scissors\")) {\n winnerAnnouncement = \"Player: PAPER vs Computer: SCISSORS ----- COMPUTER WINS\";\n } else {\n winnerAnnouncement = \"Its a TIE ---- EVERYONE IS A LOSER\";\n }\n // Print out who won in this format: \"Player: ROCK vs Computer: SCISSORS ----- PLAYER WINS\"\n System.out.println(winnerAnnouncement);\n }", "private void showChampionshipWinner()\n {\n boolean singleWinner = true;\n String winnerDrivers = getDrivers().getDriver(0).getName();\n for(int j = 1; j < getDrivers().getSize(); j++)\n { \n if(getDrivers().getDriver(0).getAccumulatedScore() == getDrivers().getDriver(j).getAccumulatedScore()) // if multiple winners\n {\n singleWinner = false;\n winnerDrivers += \" and \" + getDrivers().getDriver(j).getName();\n break;\n }\n else\n {\n break;\n }\n\n }\n if(singleWinner)\n System.out.println(winnerDrivers + \" is the winner of the championship with \" + getDrivers().getDriver(0).getAccumulatedScore() + \" points\");\n else // if multiple winner\n System.out.println(\"ITS A CHAMPIONSHIP TIE!!!\" + winnerDrivers + \" are the winners of the championship with \" + getDrivers().getDriver(0).getAccumulatedScore() + \" points\");\n }", "private void drawWinner() {\n boolean allowMultiWinnings = ApplicationDomain.getInstance().getActiveLottery().isTicketMultiWinEnabled();\n\n // Get all lottery numbers without a prize\n ArrayList<LotteryNumber> numbersEligibleForWin = new ArrayList<>();\n TreeMap<Object, Ticket> tickets = ApplicationDomain.getInstance().getActiveLottery().getTickets();\n for (Object ticketId : tickets.keySet()) {\n Ticket ticket = tickets.get(ticketId);\n\n ArrayList<LotteryNumber> availableFromTicket = new ArrayList<>();\n for (LotteryNumber number : ticket.getLotteryNumbers()) {\n if (number.getWinningPrize() == null) {\n availableFromTicket.add(number);\n } else {\n if (!allowMultiWinnings) {\n // Stop looking through the ticket since it already has a winner and\n // multiply winnings are disallowed. And prevent the already-looked-through\n // numbers of the ticket to be added.\n availableFromTicket.clear();\n break;\n }\n }\n }\n numbersEligibleForWin.addAll(availableFromTicket);\n }\n\n // Check for all numbers having won\n if (numbersEligibleForWin.isEmpty()) {\n Toast.makeText(getContext(), R.string.no_winless_numbers, Toast.LENGTH_LONG).show();\n return;\n }\n\n // Draw random number and save the ID in the prize\n int numberSelector = (int) (Math.random() * numbersEligibleForWin.size());\n Prize prizeToBeWon = ApplicationDomain.getInstance().getPrizeToBeWon();\n prizeToBeWon.setNumberId(numbersEligibleForWin.get(numberSelector).getId());\n\n ApplicationDomain.getInstance().prizeRepository.savePrize(prizeToBeWon);\n ApplicationDomain.getInstance().setPrizeToBeWon(null);\n }", "private void DeclareWinner(){\n\t\tTextView tvStatus = (TextView) findViewById(R.id.tvStatus);\n\t\tTextView tvP1Score = (TextView) findViewById(R.id.tvP1Score);\n\t\tTextView tvP2SCore = (TextView) findViewById(R.id.tvP2Score);\n\t\tTextView tvTieScore = (TextView) findViewById(R.id.tvTieScore);\n\t\tswitch(winner){\n\t\t\tcase CAT:\n\t\t\t\ttieScore = tieScore + 1;\n\t\t\t\ttvStatus.setText(\"Tie Cat Wins!\");\n\t\t\t\ttvTieScore.setText(String.valueOf(tieScore));\n\t\t\t\tbreak;\n\t\t\tcase P1_WINNER:\n\t\t\t\tp1Score = p1Score + 1;\n\t\t\t\ttvStatus.setText(\"Player 1 Wins!\");\n\t\t\t\ttvP1Score.setText(String.valueOf(p1Score));\n\t\t\t\tbreak;\n\t\t\tcase P2_WINNER:\n\t\t\t\tp2Score = p2Score + 1;\n\t\t\t\ttvStatus.setText(\"Player 2 Wins!\");\n\t\t\t\ttvP2SCore.setText(String.valueOf(p2Score));\n\t\t\t\tbreak;\n\t\t}\n\t}", "public void winner() {\n\t\tList<String> authors = new ArrayList<String>(scores_authors.keySet());\n\t\tCollections.sort(authors, new Comparator<String>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(String o1, String o2) {\n\t\t\t\treturn scores_authors.get(o1).compareTo(scores_authors.get(o2));\n\t\t\t}\n\t\t});\n\t\tSystem.out.println(\"Score des auteurs :\");\n\t\tfor(String a :authors) {\n\t\t\tSystem.out.println(a.substring(0,5)+\" : \"+scores_authors.get(a));\n\t\t}\n\t\t\n\t\tList<String> politicians = new ArrayList<String>(scores_politicians.keySet());\n\t\tCollections.sort(politicians, new Comparator<String>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(String o1, String o2) {\n\t\t\t\treturn scores_politicians.get(o1).compareTo(scores_politicians.get(o2));\n\t\t\t}\n\t\t});\n\t\tSystem.out.println(\"Score des politiciens :\");\n\t\tfor(String p :politicians) {\n\t\t\tSystem.out.println(p.substring(0,5)+\" : \"+scores_politicians.get(p));\n\t\t}\n\t}", "private void whoIsTheWinner() {\n\t\t// at first we say let the number for winner and the maximal score be 0.\n\t\tint winnerName = 0;\n\t\tint maxScore = 0;\n\t\t// then, for each player, we check if his score is more than maximal\n\t\t// score, and if it is we let that score to be our new maximal score and\n\t\t// we generate the player number by it and we let that player number to\n\t\t// be the winner, in other way maximal scores doen't change.\n\t\tfor (int i = 1; i <= nPlayers; i++) {\n\t\t\tif (totalScore[i] > maxScore) {\n\t\t\t\tmaxScore = totalScore[i];\n\t\t\t\twinnerName = i - 1;\n\t\t\t}\n\t\t}\n\t\t// finally, program displays on screen who is the winner,and what score\n\t\t// he/she/it got.\n\t\tdisplay.printMessage(\"Congratulations, \" + playerNames[winnerName]\n\t\t\t\t+ \", you're the winner with a total score of \" + maxScore + \"!\");\n\t}", "public static void decidedWinner(){\n if(playerOneWon == true ){\n//\n// win.Fill(\"Player One Has Won !\");\n// new WinnerWindow().setVisible(true);\n }\n else if (playerTwoWon == true){\n// win.Fill(\"Player Two Has Won !\");\n// new WinnerWindow().setVisible(true);\n }\n else\n {\n// win.Fill(\"Match Has been Tied !\");\n// new WinnerWindow().setVisible(true);\n }\n }", "public void win() {\n JOptionPane.showConfirmDialog(null, \"You won! You got out with \" + this.player.getGold() + \" gold!\", \"VICTORY!\", JOptionPane.OK_OPTION);\n this.saveScore();\n this.updateScores();\n this.showTitleScreen();\n }", "public void getScores(){\n String p1 = \"Player 1 has \" + Integer.toString(player1.getWins());\n String p2 = \"Player 2 has \" + Integer.toString(player2.getWins());\n String winner = \"tie\";\n if(player1.getWins()>player2.getWins()){\n winner = player1.getName() + \" wins!!!!\";\n }\n else if(player2.getWins()>player1.getWins()){\n winner = player2.getName() + \" Wins!!!\";\n }\n JOptionPane.showMessageDialog(null, (p1 + \"\\n\" + p2 + \"\\n\" + winner));\n }", "public void gameWon()\n {\n ScoreBoard endGame = new ScoreBoard(\"You Win!\", scoreCounter.getValue());\n addObject(endGame, getWidth()/2, getHeight()/2);\n }", "public static void win()\n\t{\n\t\tGame.setMoney(Game.getMoney()+bet);\n\t\tremainingMoneyN.setText(String.valueOf(Game.getMoney()));\n\t\tbet=0;\n\t\ttfBet.setText(\"0\");\n\t\tif(Game.getMoney()>Game.getHighScore())\n\t\t{\n\t\t\tGame.setHighScore(Game.getMoney());\n\t\t\tlblHighScore.setText(String.valueOf(Game.getHighScore()));\n\t\t}\n\t\tlblUpdate.setText(\"You win!\");\n\n\t}", "public void winner(){\n System.out.println();\n System.out.println(\"You are the winner.!!!CONGRATULATIONS!!!.\");\n System.exit(1); // Close the game\n }", "public String winner() {\r\n\t\tif(player1.isDone() || player2.isDone()) {\r\n\t\t\tint count1 = player1.winningsCount();\r\n\t\t\tint count2 = player2.winningsCount();\r\n\t\t\tif(count1 > count2) {\r\n\t\t\t\treturn \"Player 1 wins, \" + count1 + \" to \" + count2 + \"!\";\r\n\t\t\t}else if(count2 > count1) {\r\n\t\t\t\treturn \"Player 2 wins, \" + count2 + \" to \" + count1 + \"!\";\r\n\t\t\t}else {\r\n\t\t\t\treturn \"The Game ends in a tie!\";\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "public static void declareWinner() {\n if (playerWins > compWins) {\n System.out.println(\"!!!PLAYER WINS THE GAME!!!\");\n } else if (playerWins < compWins) {\n System.out.println(\"Comp wins the game...better luck next time!\");\n } else {\n System.out.println(\"Player and Comp are tied after rounds.\");\n }\n\n if (ties > playerWins && ties > compWins) {\n System.out.println(\"A hard battle...\");\n }\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 reportWinner (Player player) {\n System.out.println();\n System.out.println(\"Player \" + player.name() +\n \" wins.\");\n System.out.println();\n }", "public void setWinner(String winner) {\n this.winner = winner;\n }", "public void winGame() {\n this.isWinner = true;\n }", "@Override\n public void run() {\n Player winner = game.getWinner();\n String result = winner.getName() + \" won the game!\";\n\n // pass the string referred by \"result\" to make an alert window\n // check the bottom of page 9 of the PA description for the appearance of this alert window\n Alert alert = new Alert(AlertType.CONFIRMATION, result, ButtonType.YES, ButtonType.NO);\n alert.showAndWait();\n if (alert.getResult() == ButtonType.YES)\n {\n Platform.exit();\n }\n }", "@Override\n public void showWinnerDialog() {\n String message = getGameOverMessage();\n JOptionPane.showMessageDialog( this, message, GameContext.getLabel(\"GAME_OVER\"),\n JOptionPane.INFORMATION_MESSAGE );\n }", "void printWinner(String winner) throws IOException;", "@Override\n\tpublic void gameEnded(Player winner) {\n\t\tcurrentPlayerLabel.setText(\"Winner is:\" + winner.name());\n\t}", "private void win(int winner)\n {\n switch (winner) {\n case PLAYER_1_FLAG:\n player1.gameOver(RESULT_WIN);\n player2.gameOver(RESULT_LOSS);\n winSend.close();\n break;\n case PLAYER_2_FLAG:\n player1.gameOver(RESULT_LOSS);\n player2.gameOver(RESULT_WIN);\n \n winSend.close();\n break;\n }\n }", "public static String winner() {\n\t\t// Behavior if the Player 1 won the most games.\n\t\tif (score1 > score2) {\n\t\t\treturn (player1 + \" is the winner! Congratulations \" + player1 + \" !\");\n\t\t}\n\t\t// Behavior if both players won the same number of games.\n\t\tif (score1 == score2) {\n\t\t\treturn (\"It's a tie! Both players won the same number of games. Congratulations \" + player1 + \" & \" + player2 + \" !\");\n\t\t}\n\t\t// Behavior if the Player 1 won the most games.\n\t\telse {\n\t\t\treturn (player2 + \" is the winner! Congratulations \" + player2 + \" !\");\n\t\t}\n\t}", "void showRanking(String winner, String rank);", "private void displayOnResult(String title, String message, Integer gifImage, int whoWon){\n\n switch (whoWon){\n case 1:{\n TextView textView = (TextView) mScoreGrid.getChildAt(3);\n scorePlayer1++;\n textView.setText(String.valueOf(scorePlayer1));\n break;\n }\n case 2:{\n TextView textView = (TextView) mScoreGrid.getChildAt(4);\n scorePlayer2++;\n textView.setText(String.valueOf(scorePlayer2));\n break;\n }\n case 0:\n default:{\n TextView textView = (TextView) mScoreGrid.getChildAt(5);\n scoreDraw++;\n textView.setText(String.valueOf(scoreDraw));\n break;\n }\n }\n\n new MaterialDialog.Builder(this)\n .setTitle(title)\n .setMessage(message)\n .setCancelable(false)\n .setPositiveButton(\"Okay\", R.drawable.ic_baseline_download_done_24, new MaterialDialog.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int which) {\n dialogInterface.dismiss();\n resetEverything();\n }\n })\n .setNegativeButton(\"Exit\", R.drawable.ic_baseline_cancel_24, new MaterialDialog.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int which) {\n dialogInterface.dismiss();\n finish();\n }\n })\n .setAnimation(gifImage)\n .build().show();\n }", "private void popUpWin(String whoWon) {\r\n\t\tJOptionPane.showMessageDialog(gameView, \"Congrats \" + whoWon + \" WINS! Go to the Options Pane to start a New Game!\", \"WIN!\",\r\n\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t}", "private void showGameOver()\n {\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n //Todo:\n // step 1. get the winner name using game.getWinner()\n // step 2. put the string player.getName()+\" won the game!\" to the string reference called \"result\"\n Player winner = game.getWinner();\n String result = winner.getName() + \" won the game!\";\n\n // pass the string referred by \"result\" to make an alert window\n // check the bottom of page 9 of the PA description for the appearance of this alert window\n Alert alert = new Alert(AlertType.CONFIRMATION, result, ButtonType.YES, ButtonType.NO);\n alert.showAndWait();\n if (alert.getResult() == ButtonType.YES)\n {\n Platform.exit();\n }\n }\n });\n }", "public void determineWinner() {\n\t\twinner = \"\";\n\t\tif (board[6] > board[13])\n\t\t\twinner = player1.getName();\n\t\telse if (board[6] < board[13])\n\t\t\twinner = player2.getName();\n\t\telse {\n\t\t\tSystem.out.println(\"The game is a tie\");\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(winner + \" is the winner\");\n\t}", "private void showWon( String mark ) {\n\tJOptionPane.showMessageDialog( null, mark + \" won!\" );\t\n }", "public void setWinner(String winner) {\n this.winner.setText(winner + \" Won!\");\n }", "public void gameOver() {\n\t\tgameResult = new GameResult(writer);\n\n\t\tString winnersName = \"\";\n\t\tString resultList = \"\";\n\n\t\tGamePlayer[] tempList = new GamePlayer[playerList.size()];\n\t\tfor (int i = 0; i < tempList.length; i++) {\n\t\t\ttempList[i] = playerList.get(i);\n\t\t}\n\n\t\tArrays.sort(tempList); // Sort the players according to the scores\n\n\t\tint max = tempList[tempList.length - 1].getPlayerScore();\n\t\tint position = 0;\n\n\t\tfor (int i = tempList.length - 1; i >= 0; i--) {\n\t\t\tif (max == tempList[i].getPlayerScore()) {\n\t\t\t\twinnersName += tempList[i].getPlayerName() + \"\\t\";\n\t\t\t}\n\t\t\tresultList += \"No.\" + (++position) + \"\\t\" + tempList[i].getPlayerName() + \"\\t\"\n\t\t\t\t\t+ tempList[i].getPlayerScore() + \"\\n\";\n\t\t}\n\t\tgameResult.initialize(winnersName, resultList, roomNumber, gameRoom);\n\t\tframe.dispose();\n\t}", "public String getWinner(){\n if(whiteWins && blackWins){\n return \"ITS A DRAW\";\n } else if(whiteWins){\n return \"WHITE WINS\";\n } else if(blackWins){\n return \"BLACK WINS\";\n } else {\n return \"NO WINNER\";\n }\n }", "void win() {\n if (_game.isWon()) {\n showMessage(\"Congratulations you win!!\", \"WIN\", \"plain\");\n }\n }", "public int getWinner() {return winner();}", "void win() {\n String name = score.getName();\n if (Time.getSecondsPassed() < 1) {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / 1);\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + 1 + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n } else {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / Time.getSecondsPassed());\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + Time.getSecondsPassed() + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n }\n }", "public void cmdAnnounceBoard(User teller, Game game, int channel) {\n String white = game.whitePlayer.getTitledRealName(USCL_RATING);\n String black = game.blackPlayer.getTitledRealName(USCL_RATING);\n String whiteCity = game.whitePlayer.getTeam().getLocation();\n String blackCity = game.blackPlayer.getTeam().getLocation();\n String status = game.getStatusString();\n if (game.status.isPlaying()) {\n String line = String.format(\"%s from %s is playing versus %s from %s - %s to watch!\",\n white, whiteCity, black, blackCity, status);\n command.tell(channel, line);\n } else if (game.status.isFinished()) {\n String line = String.format(\"%s from %s played %s from %s - Result %s!\",\n white, whiteCity, black, blackCity, status);\n command.tell(channel, line);\n } else {\n String line = String.format(\"%s from %s will play %s from %s - Status %s!\",\n white, whiteCity, black, blackCity, status);\n command.tell(channel, line);\n }\n }", "public String getWinner()\n\t{\n\n\n\n\n\n\n\n\n\n\n\n\n\t\treturn \"\";\n\t}", "public static void howDoesTheLotteryWorkDialogueOption(Player player) {\n\t\tString times = \"\";\n\t\tfor (int index = 0; index < DRAW_TIME_ANNOUNCEMENT.length; index++) {\n\t\t\tString extra = \" & \";\n\t\t\tif (index == DRAW_TIME_ANNOUNCEMENT.length - 1) {\n\t\t\t\textra = \"\";\n\t\t\t}\n\t\t\ttimes = times + DRAW_TIME_ANNOUNCEMENT[index][1] + extra;\n\t\t}\n\t\tplayer.getDH().sendNpcChat(\"I am here to make one lucky player a millionaire!\", \"Everyday at \" + times + \" server time,\", \"the lottery will be, drawn and a new millionare will\", \"be announced!\",\n\t\t FacialAnimation.HAPPY.getAnimationId());\n\t\tplayer.nextDialogue = 598; // Bring back to lottery option menu.\n\t}", "public synchronized void reportVotes() {\n StringBuilder voteReport = new StringBuilder(\"\");\n for (Player player : playerVotes.keySet()) {\n voteReport.append(player.getUserName()).append(\": \").append(\n playerVotes.get(player) ? \"yes\\n\" : \"no\\n\");\n }\n sendPublicMessage(\"The votes were:\\n\" + voteReport.toString());\n }", "private void gameOverAlert() {\n \tAlert alert = new Alert(AlertType.INFORMATION);\n \t\n \talert.setTitle(\"Game Over!\");\n \talert.setHeaderText(\"You Did Not Get A New High Score!\\nYour High Score: \" + level.animal.getPoints());\n \talert.setContentText(\"Try Again Next Time!\");\n \talert.show();\n\t}", "public void announceWinners() {\n\t\tsynchronized (blockedAnnouncer) {\n\t\t\tif (resultsNotInAnnouncer(blockedAnnouncer)) {\n\t\t\t\twhile (true) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tblockedAnnouncer.wait();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}// while\n\t\t\t}// if\n\t\t}// synch\n\t\twhile (waitingForResults.size() > 0) {\n\t\t\tsynchronized (waitingForResults.elementAt(0)) {\n\t\t\t\twaitingForResults.elementAt(0).notify();\n\t\t\t\twaitingForResults.removeElementAt(0);\n\t\t\t}// sncnh\n\t\t}// while\n\t}", "public void setWinner(boolean winner) {\n\t\tthis.winner = winner;\n\t}", "public void displayPlayerWinnings()\n {\n for(int card = 0; card < playerCardsWon; card++)\n {\n System.out.println(playerWinnings[card].toString());\n }\n }", "public void winTheGame(boolean userGuessed) {\n this.setGuessed(true); //updating the isGuessed to true\n //dispalying winning message and the name of the picked movie\n System.out.println(\"Congratulation .. You Win!:)\");\n System.out.println(\"You have Guessed '\" + this.replacedMovie + \"' Correctly.\");\n }", "public void bonusForTeamA(View v) {\n\n if (questionNumber <= 19) {\n\n scoreTeamA = scoreTeamA + 5;\n displayForTeamA(scoreTeamA);\n }\n\n\n if (questionNumber == 20) {\n endOfRound = \"true\";\n }\n }", "void update(boolean winner);", "private void declareWinner(){\r\n System.out.println(\"All proposals received\");\r\n AID best = proposals.get(0).getSender();\r\n for(ACLMessage proposal: proposals){\r\n String time = proposal.getContent().replaceFirst(\"bid\\\\(\", \"\");\r\n time = time.replaceFirst(\" sec\\\\)\", \"\");\r\n String bestTimeString = \r\n proposal.getContent().\r\n replaceFirst(\"bid\\\\(\", \"\").\r\n replaceFirst(\" sec\\\\)\", \"\");\r\n int bestTime = Integer.parseInt(bestTimeString);\r\n int propTime = Integer.parseInt(time);\r\n if (bestTime > propTime) {\r\n best = proposal.getSender();\r\n }\r\n }\r\n sendMessage(best, \"\", ACLMessage.ACCEPT_PROPOSAL);\r\n Object[] ob = new Object[2];\r\n ob[0] = best;\r\n ob[1] = currentPartial;\r\n expectedReturn.add(ob);\r\n System.out.println(\"Accepting proposal from \" + best.getLocalName());\r\n for(ACLMessage proposal: proposals){\r\n if(!proposal.getSender().equals(best)){\r\n sendMessage(proposal.getSender(), \"\", ACLMessage.REJECT_PROPOSAL);\r\n }\r\n }\r\n proposals.clear();\r\n solvables.remove(0);\r\n if(!solvables.isEmpty()){\r\n \r\n auctionJob(solvables.get(0));\r\n }\r\n }", "public UUID rollWinner() {\r\n\t\tint ticketCount = 0;\r\n\t\tfor(int value : tickets.values()) {\r\n\t\t\tticketCount += value;\r\n\t\t}\r\n\t\tif(ticketCount < minParticipantCount) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\r\n\t\tList<UUID> ticketList = getParticipants();\r\n\t\tRandom r = new Random();\r\n\t\tUUID winner = ticketList.get(r.nextInt(ticketList.size()));\r\n\t\treturn winner;\r\n\t}", "public void setWinner(Player winner) {\n this.winner = winner;\n }", "private void showMatchOverDialog(String winnerName) {\n this.computerPaquetView.showOnceHiddenCards();\n int dialogResult = JOptionPane.showConfirmDialog (null, String.format(\"%s won!\\nContinue?\", winnerName),\"\", JOptionPane.YES_NO_OPTION);\n if(dialogResult == JOptionPane.YES_OPTION){\n this.startGame();\n } else {\n this.dispose();\n }\n }", "public void cmdAnnounceMatch(User teller, Team team1, Team team2, int channel) {\n Collection<Game> games = tournamentService.findMatchGames(team1, team2);\n command.tell(channel, \"US Chess League - {0} vs {1}\", team1.getRealName(), team2.getRealName());\n for (Game game : games) {\n String white = game.whitePlayer.getTitledRealName(USCL_RATING);\n String black = game.blackPlayer.getTitledRealName(USCL_RATING);\n String line = String.format(\" %-13s - %s vs %s\", game.getStatusString(), white, black);\n command.tell(channel, line);\n }\n }", "public void declareWinner(int playerNum) {\r\n BlackjackPlayer player = (BlackjackPlayer) this.getPlayers().get(playerNum);\r\n if ((player.getHand().addCards() > this.getHand().addCards()) && player.getHand().addCards() < 22 && this.getHand().addCards() < 22) {\r\n winBet(playerNum);\r\n System.out.print(player.getPlayerID() + \", you won!\");\r\n } else if (this.getHand().addCards() == 21) {\r\n loseBet(playerNum);\r\n System.out.print(player.getPlayerID() + \", you lost!\");\r\n } else if (player.getHand().addCards() > 21) {\r\n loseBet(playerNum);\r\n System.out.print(player.getPlayerID() + \", you lost!\");\r\n } else if (player.getHand().addCards() <= 21 && this.getHand().addCards() > 21) {\r\n winBet(playerNum);\r\n System.out.print(player.getPlayerID() + \", you won!\");\r\n } else if ((player.getHand().addCards() > this.getHand().addCards()) && player.getHand().addCards() < 22 && this.getHand().addCards() < 22) {\r\n loseBet(playerNum);\r\n System.out.print(player.getPlayerID() + \", you lost!\");\r\n } else {\r\n loseBet(playerNum);\r\n System.out.print(player.getPlayerID() + \", you lost!\");\r\n }\r\n }", "public void win() {\n if (turn == 1) {\n p1.incrementLegs();\n if (p1.getLegs() == 5) {\n p1.incrementSets();\n p1.setLegs(0);\n p2.setSets(0);\n\n }\n if (p1LastScore > p1.getHighout()) {\n p1.setHighout(p1LastScore);\n\n }\n\n if (p1.getHighout() > OVERALL_HIGH_OUT) {\n OVERALL_HIGH_OUT = p1.getHighout();\n }\n } else if (turn == 2) {\n p2.incrementLegs();\n if (p2.getLegs() == 5) {\n p2.incrementSets();\n p2.setLegs(0);\n p1.setSets(0);\n\n }\n if (p2LastScore > p2.getHighout()) {\n p2.setHighout(p2LastScore);\n }\n\n if (p2.getHighout() > OVERALL_HIGH_OUT) {\n OVERALL_HIGH_OUT = p2.getHighout();\n }\n\n\n\n }\n changeFirstTurn();\n win = true;\n\n\n\n }", "public static String winner() {\n\t\tList<List<Integer>> winCon = new ArrayList<List<Integer>>();\n\t\twinCon.add(Arrays.asList(1, 2, 3, 4, 5)); // first Row of the table\n\t\twinCon.add(Arrays.asList(6, 7, 8, 9, 10)); // Second Row of the table\n\t\twinCon.add(Arrays.asList(11, 12, 13, 14, 15)); // Third Row of the table\n\t\twinCon.add(Arrays.asList(16, 17, 18, 19, 20)); // Fourth Row of the table\n\t\twinCon.add(Arrays.asList(21, 22, 23, 24, 25)); // Fifth Row of the table\n\t\twinCon.add(Arrays.asList(1, 6, 11, 16, 21)); // First Column of the table\n\t\twinCon.add(Arrays.asList(2, 7, 12, 17, 22)); // Second Column of the table\n\t\twinCon.add(Arrays.asList(3, 8, 13, 18, 23)); // Third Column of the table\n\t\twinCon.add(Arrays.asList(4, 9, 14, 19, 24)); // Fourth Column of the table\n\t\twinCon.add(Arrays.asList(5, 10, 15, 20, 25)); // Fifth Column of the table\n\t\twinCon.add(Arrays.asList(1, 7, 13, 19, 25)); // first diagonal of the table\n\t\twinCon.add(Arrays.asList(5, 9, 13, 17, 21)); // Second diagonal of the table\n\n\t\tfor (List<Integer> l : winCon) {\n\t\t\tif (playerPosition.containsAll(l)) {\n\t\t\t\treturn \"Congratulations! \"+user+\", You Won.\";\n\t\t\t} else if (cpuPosition.containsAll(l)) {\n\t\t\t\treturn \"Cpu Won!, Sorry :( \";\n\t\t\t} else if (playerPosition.size() + cpuPosition.size() == 25) {\n\t\t\t\treturn \"Draw!!!\";\n\t\t\t} \n\t\t}\n\t\treturn \"\";\n\t}", "public boolean winner() {\r\n return winner;\r\n }", "private void showWinnerDialog(Player player) {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Congratulations \" + player.getName() + \", You are Victorious!!\", new ButtonType(\"Close\", ButtonBar.ButtonData.NO), new ButtonType(\"Play Again\", ButtonBar.ButtonData.YES));\n alert.setGraphic(new ImageView(new Image(this.getClass().getResourceAsStream(\"/Images/winner.png\"))));\n alert.setHeaderText(null);\n alert.setTitle(player.getName() + \" Wins!!\");\n alert.showAndWait();\n if (alert.getResult().getButtonData() == ButtonBar.ButtonData.YES) {\n onReset();\n }\n }", "public void sendWinner(Winner winner) {\n try {\n getGlueObject().handleSend(new Envelope()\n .setMessageType(MessageType.FINISH_RACE)\n .setWinner(winner)\n );\n } catch (NoSuchActionException | ActionFailedException e) {\n AlertMessage.alertMsg(null, e.getMessage(), AlertType.ERROR);\n }\n }", "public void makeAnnouncement(){\n String announcement = \"Welcome to BlackJack! Please read the following rules carefully:\" + \"\\n\"\n + \"The min bet is $\" + minBet + \". The max bet is $\" + maxBet + \"!\" + \"\\n\"\n + \"The min required player number is \" + minPlayer + \". The max allowed player number is \" + maxPlayer + \"!\" + \"\\n\"\n + \"Your initial property is $100!\";\n System.out.println(announcement);\n }", "void checkWinner() {\n\t}", "public void win()\r\n {\r\n Alert inputConfirmation = new Alert(Alert.AlertType.INFORMATION);\r\n inputConfirmation.setTitle(\"Congratulations!\");\r\n inputConfirmation.setHeaderText(\"Congratulations! You Win!\");\r\n inputConfirmation.setGraphic(null);\r\n\r\n String contentText = (\"You took \" + scoreBoard.timeText.getText() + \" seconds\");\r\n inputConfirmation.setContentText(contentText);\r\n scoreBoard.gameTimer.gameTime.cancel();\r\n\r\n inputConfirmation.showAndWait();\r\n }", "public String getWinner() {\n return winner;\n }", "public void sendVoteNotification() {\n\t\t\t\t\tWorld.sendWorldMessage(\"<img=5>[Vote Feed]: colorhere\" + getDisplayName() + \" </col>voted for\" + \n\t\t\t\t\t\t\t\t\t\t\t\"colorhere \"+ voteDisplayAmount +\" Vote Tickets!</col> \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"World votes are now at colorhere\"+ WorldVote.getVotes()+\"</col>.\", false);\t\n\t}", "public static void declareWinner() {\n\t\t// Make an if statement that runs if the next variable.\n\t\tif(next == 0) {\n\t\t\t// Have the system tell the user that they lost.\n\t\t\tSystem.out.println(\"You lose!\");\n\t\t}\n\t\telse {\n\t\t\t// Have the system tell the user that they won.\n\t\t\tSystem.out.println(\"You win!\");\n\t\t}\n\t}", "public static void winner(ConnectFourCanvas a,int i){\n\t\tswitch(i){\n\t\tcase 0:JOptionPane.showMessageDialog(a, \"You ALMOST lost. Except not. Winner!\");\n\t\tbreak;\n\t\tcase 1:JOptionPane.showMessageDialog(a, \"Congratulations! You Win!\");\n\t\tbreak;\n\t\tcase 2:JOptionPane.showMessageDialog(a, \"You win! You should go pro!\");\n\t\tbreak;\n\t\tcase 3:JOptionPane.showMessageDialog(a, \"An epic victory!\");\n\t\tbreak;\n\t\tcase 4:JOptionPane.showMessageDialog(a, \"VICTORY!\");\n\t\tbreak;\n\n\n\t\t\n\t\t}\n\t\t\n\t}", "public void bonusForTeamB(View v) {\n\n if (questionNumber <= 19) {\n\n scoreTeamB = scoreTeamB + 5;\n displayForTeamB(scoreTeamB);\n }\n\n\n }", "@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\n }\n }", "private void announceRoundResult()\n {\n // Last actions of each player, to compare\n GameAction fpAction = firstPlayer.getLastAction();\n GameAction spAction = secondPlayer.getLastAction();\n\n // Display first IA game\n if (!hasHuman)\n {\n if (fpAction instanceof RockAction)\n {\n animateSelectedButton(firstPlayerRock, true);\n }\n else if (fpAction instanceof PaperAction)\n {\n animateSelectedButton(firstPlayerPaper, true);\n }\n else if (fpAction instanceof ScissorsAction)\n {\n animateSelectedButton(firstPlayerScissors, true);\n }\n }\n // Display second IA game\n if (spAction instanceof RockAction)\n {\n animateSelectedButton(secondPlayerRock, false);\n }\n else if (spAction instanceof PaperAction)\n {\n animateSelectedButton(secondPlayerPaper, false);\n }\n else if (spAction instanceof ScissorsAction)\n {\n animateSelectedButton(secondPlayerScissors, false);\n }\n\n\n // First player has played something ==> look at result\n if (firstPlayer.hasAlreadyPlayed())\n {\n switch (fpAction.versus(spAction))\n {\n case WIN:\n updateResultIcons(true, false);\n break;\n case DRAW:\n updateResultIcons(false, true);\n break;\n case LOSE:\n updateResultIcons(false, false);\n break;\n }\n }\n // First player didn't play ==> draw or loose\n else\n {\n // Draw\n if (!secondPlayer.hasAlreadyPlayed())\n {\n updateResultIcons(false, true);\n }\n // Lose\n else\n {\n updateResultIcons(false, false);\n }\n }\n }", "public void printVictoryMessage() { //main playing method\r\n System.out.println(\"Congrats \" + name + \" you won!!!\");\r\n }", "public void setWinner(int num){\r\n \twinner = num;\r\n }", "@Override\n\tpublic void informEnd(List<String> winners) {\n\t}", "void win() {\n\t\t_money += _bet * 2;\n\t\t_wins++;\n\t\tclearHand();\n\t\t_bet = 0;\n\t}", "private void gameWonDialog() {\n // stack overflow\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle((game.isPlayer_turn()) ? R.string.player_win_title : R.string.bank_win_title);\n builder.setMessage((game.isPlayer_turn()) ? R.string.player_win_message : R.string.bank_win_message);\n\n // Set up the buttons\n builder.setPositiveButton(R.string.play_again, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n resetGame();\n }\n });\n builder.setNegativeButton(R.string.return_to_home, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n returnToMain();\n }\n });\n //builder.show();\n\n AlertDialog alert = builder.create();\n alert.show();\n Button nbutton = alert.getButton(DialogInterface.BUTTON_NEGATIVE);\n nbutton.setBackgroundColor(getResources().getColor(R.color.bank_red));\n Button pbutton = alert.getButton(DialogInterface.BUTTON_POSITIVE);\n pbutton.setBackgroundColor(getResources().getColor(R.color.yale_blue));\n }", "public String printRecord() {\n int win = 0;\n int total = gameList.size();\n for (Game g : gameList) {\n if (g.isWinner(this)) {\n win++;\n }\n }\n return \"(\" + win + \"-\" + (total - win) + \")\";\n }", "public void win()\r\n\t{\r\n\t\tmWon = true;\r\n\t}", "public boolean topPlayerWon() {\n return winner == 2;\n }", "public void logWinner(){\n\t\tlog += String.format(\"%nDRAW\");\n\t\tlineBreak();\n\t}", "public void winAccountant()\r\n {\r\n switch (Win)\r\n {case 1: //A tie with scissors\r\n ties++; uSci++; cSci++;\r\n break;\r\n case 2: //A tie with paper\r\n ties++; uPap++; cPap++;\r\n break;\r\n case 3: //A tie with rock\r\n ties++; uRock++; cRock++;\r\n break;\r\n case 4: //A win for user with Scissors\r\n uWins++; uSci++; uSciW++;\r\n cPap++;\r\n break;\r\n case 5: //A win for user with Paper\r\n uWins++; uPap++; uPapW++;\r\n cRock++;\r\n break;\r\n case 6: //A win for user with Rock\r\n uWins++; uRock++; uRockW++;\r\n cSci++;\r\n break;\r\n case 7: //A win for Comp with Scissors\r\n cWins++; cSci++; cSciW++;\r\n uPap++;\r\n break;\r\n case 8: //A win for Comp with Paper\r\n cWins++; cPap++; cPapW++;\r\n uRock++;\r\n break;\r\n case 9: //A win for Comp with Rock\r\n cWins++; cRock++; cRockW++;\r\n uSci++;\r\n break;\r\n default: JOptionPane.showMessageDialog(null,\r\n \"Error: Unknown Win Value - WinCalc.winAccountant 207\", \r\n \"digiRPS - Error\", \r\n JOptionPane.ERROR_MESSAGE);\r\n break;}\r\n \r\n // Update the last three wins\r\n winThree=winTwo;\r\n winTwo=winOne;\r\n winOne=Win;\r\n \r\n }", "private void calcWinner(){\n //local class for finding ties\n class ScoreSorter implements Comparator<Player> {\n public int compare(Player p1, Player p2) {\n return p2.calcFinalScore() - p1.calcFinalScore();\n }\n }\n\n List<Player> winners = new ArrayList<Player>();\n int winningScore;\n\n // convert queue of players into List<Player> for determining winner(s)\n while (players.size() > 0) {\n winners.add(players.remove());\n } \n\n // scoreSorter's compare() should sort in descending order by calcFinalScore()\n // Arrays.sort(winnersPre, new scoreSorter()); // only works w/ normal arrays :(\n Collections.sort(winners, new ScoreSorter());\n\n // remove any players that don't have the winning score\n winningScore = winners.get(0).calcFinalScore();\n for (int i = winners.size()-1; i > 0; i--) { // remove non-ties starting from end, excluding 0\n if (winners.get(i).calcFinalScore() < winningScore) {\n winners.remove(i);\n }\n }\n\n // Announce winners\n boolean hideCalculatingWinnerPopUp = false;\n String winnersString = \"\";\n if (winners.size() > 1) {\n winnersString = \"There's a tie with \" + winners.get(0).calcFinalScore() + \" points. The following players tied: \";\n for (Player p : winners) {\n winnersString += p.getName() + \" \";\n }\n view.showPopUp(hideCalculatingWinnerPopUp, winnersString);\n } else {\n view.showPopUp(hideCalculatingWinnerPopUp, winners.get(0).getName() + \" wins with a score of \" + winners.get(0).calcFinalScore() + \" points! Clicking `ok` will end and close the game.\");\n }\n }", "private void checkWinner() {\n\t\tif(player.getHandVal() == BLACKJACK && dealer.getHandVal() == BLACKJACK) {\n\t\t\tSystem.out.println(\"Both players have Blackjack!\\n\");\n\t\t\tresult = \"TIE\";\n\t\t}\n\t\telse if (player.getHandVal() == BLACKJACK) {\n\t\t\tSystem.out.println(\"The Player has Blackjack!\\n\");\n\t\t\tresult = \"PLAYER\";\n\t\t}\n\t\telse if (dealer.getHandVal() == BLACKJACK) {\n\t\t\tSystem.out.println(\"The Dealer has Blackjack!\\n\");\n\t\t\tresult = \"DEALER\";\n\t\t}\n\t\telse if(player.getHandVal() > BLACKJACK && dealer.getHandVal() > BLACKJACK) {\n\t\t\tSystem.out.println(\"Both players bust!\\n\");\n\t\t\tresult = \"DEALER\";\n\t\t}\n\t\telse if(player.getHandVal() > BLACKJACK) {\n\t\t\tSystem.out.println(\"The Player has busted!\\n\");\n\t\t\tresult = \"DEALER\";\n\t\t}\n\t\telse if(dealer.getHandVal() > BLACKJACK) {\n\t\t\tSystem.out.println(\"The Dealer has busted!\\n\");\n\t\t\tresult = \"PLAYER\";\n\t\t}\n\t\telse if(player.getHandVal() > dealer.getHandVal()) {\n\t\t\tSystem.out.println(\"The Player has a higher score!\\n\");\n\t\t\tresult = \"PLAYER\";\n\t\t}\n\t\telse if(player.getHandVal() < dealer.getHandVal()){\n\t\t\tSystem.out.println(\"The dealer has a higher score!\\n\");\n\t\t\tresult = \"DEALER\";\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Both players have the same score!\\n\");\n\t\t\tresult = \"TIE\";\n\t\t}\n\t}", "public void tossUpForTeamB(View v) {\n\n if (questionNumber <= 19) {\n scoreTeamB = scoreTeamB + 10;\n questionNumber = questionNumber + 1;\n displayQuestionNumber(questionNumber);\n displayForTeamB(scoreTeamB);\n }\n\n if (questionNumber == 20) {\n Toast.makeText(getApplicationContext(), \"Game Over!\", Toast.LENGTH_SHORT).show();\n\n }\n\n }", "private String getWinner() {\n\t\treturn winner;\n\t}", "private static void checkForKnockout()\n\t{\n\t\tif (playerOneHealth <= 0 && opponentHealth <= 0)\n\t\t{\n\t\t\tSystem.out.println(playerOneName + \" and \" + opponentName + \" both go down for the count!\");\n\t\t\t\n\t\t\t// Prints one to ten because fighter is knocked out\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif (i < 6) System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\n\t\t\t\t// Delays count – from StackOverflow\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException e) \n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!!\\n\" + playerOneName + \" and \" + opponentName + \" knocked each other out at the same time.\\nWhat a weird ending!!!\");\n\t\t}\n\t\n\t\t// Check if Player One Lost\n\t\telse if (playerOneHealth <= 0)\n\t\t{\n\t\t\t// Prints one to ten because player one is knocked out\n\t\t\tSystem.out.println(playerOneName + \" is down for the count!\");\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif (i < 6) System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\t\n\t\t\t\t// Delays count – from StackOverflow\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException exception) \n\t\t\t\t{\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Game Over\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!!\\n\" + playerOneName + \" was knocked out, and \" + opponentName + \" still had \" + opponentHealth + \" health left. \\nBetter luck next time player one!!!\");\n\t\t}\n\t\n\t\t// Check if Player Two Lost\n\t\telse if (opponentHealth <= 0)\n\t\t{\n\t\t\tSystem.out.println(opponentName + \" is down for the count!\");\n\n\t\t\t// Prints one to ten because fighter is knocked out\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif(i < 6)System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\t\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException exception) \n\t\t\t\t{\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Game Over\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!! \\n\" + opponentName + \" was knocked out, and \" + playerOneName + \" still had \" + playerOneHealth + \" health left.\\nCONGRATULATIONS PLAYER ONE!!!\");\n\t\t}\n\t}", "String getWinner();", "@Override\n public void setWinner(Player winner)\n {\n for(int i = 0; i < gc.getF().size(); i++)\n {\n if(gc.getF().get(i).readyStart() == 0 || gc.getF().get(i).readyStart() == 1)\n {\n gc.getF().get(gc.getF().size() -1).addPlayer(this.winner);\n sl.save(\"The winner of QuarterFinal ID: \" + this.getGameID() + \" is: \"\n + winner.getName(), \"qfwinners.txt\");\n gc.getGameHistory().add(this); \n System.out.println(winner.getName() + \" has won the round! Player added to the Final!\");\n return;\n }\n }\n //If there are no available spots, make a new game\n Final f = new Final();\n System.out.println(\"created a new Final!\");\n f.addPlayer(winner);\n //Save winner details\n sl.save(\"The winner of QuarterFinal ID: \" + this.getGameID() + \" is: \"\n + winner.getName(), \"qfwinners.txt\");\n \n gc.getF().add(f);\n //Move game to history \n gc.getGameHistory().add(this); \n System.out.println(winner.getName() + \" has won the round! Player added to the Final!\");\n \n }", "protected void ifWon(){\n canvas.add(titleBorder);\n canvas.add(titleBox);\n Image wonText = new Image(205, 400, \"124-hw4/BreakoutText/wonText.png\");\n canvas.add(wonText);\n }", "public String winner() {\n\t\tif (numFire == 0 && numWater != 0) {\n\t\t\treturn \"Water\";\n\t\t} else if (numWater == 0 && numFire != 0) {\n\t\t\treturn \"Fire\";\n\t\t} else if (numWater == 00 && numFire == 0) {\n\t\t\treturn \"No one\";\n\t\t}\n\t\treturn null;\n\t}", "public String getWinner(){\n\tif (p1.getPoints()==p2.getPoints()){\n\t return \"Tie. Good food, bad outcome.\";\n\t}\n\treturn (p1.getPoints()>p2.getPoints()?\"Player Row\":\"Player Column\")+\" is the winner!\";\n }", "void setWinningTeam(TeamId winner) {\n winningTeam.set(winner);\n }", "@Override\n public String toString() {\n newPlayer.addPoints(players[0].getPoints());\n WarPlayer winner = players[mostNumOfCards(players)];\n\n if (winner.getPoints() == players[0].getPoints())\n return \"YOU WON!!! With a score of \" + players[0].getPoints();\n return \"Player\" + mostNumOfCards(players) + \" won!!! With a score of \" + winner.getPoints();\n }", "static void feedPet() {\r\n\t\tJOptionPane.showMessageDialog(null, \"Your \" + pet + \" is happy and full.\");\r\n\t\thappinessLevel+=3;\r\n\t}", "public String winCondition() {\r\n\t\tif (hasOneOfEach()) {\r\n\t\t\treturn \"Congratulations! You've won the Safari Game! You caught one of each type of Pokémon!\";\r\n\t\t}\r\n\t\tif (hasFiveOfTwo()) {\r\n\t\t\treturn \"Congratulations! You've won the Safari Game! You caught two each of five types of Pokémon!\";\r\n\t\t}\r\n\t\tif (hasTwoOfFive()) {\r\n\t\t\treturn \"Congratulations! You've won the Safari Game! You caught five each of two types Pokémon!\";\r\n\t\t}\r\n\t\treturn \"You did not win yet! Keep trying!\";\r\n\t}" ]
[ "0.7075433", "0.7054362", "0.700401", "0.6823632", "0.68112963", "0.68062717", "0.68013734", "0.6615346", "0.6522477", "0.6472144", "0.6463453", "0.64417106", "0.62065893", "0.618792", "0.6184189", "0.6175051", "0.61542827", "0.6146848", "0.6146675", "0.613598", "0.6120887", "0.6069478", "0.6048524", "0.6046069", "0.6036269", "0.6025217", "0.60235107", "0.5972127", "0.59706414", "0.5967491", "0.59576845", "0.5954477", "0.5921931", "0.591653", "0.5912842", "0.5871689", "0.5860338", "0.5845997", "0.58457714", "0.58452195", "0.5843229", "0.5841131", "0.5830334", "0.5822278", "0.5820996", "0.5819784", "0.58062464", "0.5805201", "0.5791135", "0.57857484", "0.57742953", "0.57713974", "0.5769294", "0.576894", "0.57634157", "0.576329", "0.57529163", "0.57358587", "0.5711512", "0.5709869", "0.5709578", "0.5702749", "0.5701966", "0.5701447", "0.569344", "0.5674519", "0.5666545", "0.566615", "0.56639636", "0.5651495", "0.5637953", "0.56296486", "0.561901", "0.56153476", "0.5598996", "0.5598187", "0.55952847", "0.5584829", "0.5580113", "0.5562542", "0.5557576", "0.5557385", "0.5554385", "0.554986", "0.5538335", "0.55356807", "0.5531112", "0.5530954", "0.5527282", "0.5525708", "0.55210066", "0.5518713", "0.55141294", "0.5507106", "0.5501505", "0.55010825", "0.55005074", "0.54901433", "0.5487548", "0.5486743" ]
0.79347247
0
The predraw announcement events.
public static void preDrawAnnouncement() { winnerAnnounced = false; timePreDrawAnnounced = System.currentTimeMillis(); Object object = new Object(); CycleEventHandler.getSingleton().addEvent(object, new CycleEvent() { int timer = 0; @Override public void execute(CycleEventContainer container) { Npc npc = NpcHandler.npcs[lotteryNpcIndex]; npc.forceChat("The lottery is at " + getTotalPotString() + "! Talk to Durial321 at ::shops to win, " + getMinutesLeftTillWinner() + " min" + Misc.getPluralS( getMinutesLeftTillWinner()) + " left!"); Announcement.announce( "<img=27><col=a36718> The lottery is at " + getTotalPotString() + "! Talk to Durial321 at ::shops to win, " + getMinutesLeftTillWinner() + " min" + Misc.getPluralS(getMinutesLeftTillWinner()) + " left!"); timer++; if (timer == 15) { timer = 0; container.stop(); } } @Override public void stop() { winnerAnnounced = true; announceWinner(); } }, 100); Object object1 = new Object(); CycleEventHandler.getSingleton().addEvent(object1, new CycleEvent() { int timer = 0; @Override public void execute(CycleEventContainer container) { if (winnerAnnounced) { container.stop(); return; } Npc npc = NpcHandler.npcs[lotteryNpcIndex]; if (Misc.hasPercentageChance(25)) { npc.requestAnimation(EMOTES[Misc.random(EMOTES.length - 1)]); } npc.forceChat( "The lottery is at " + getTotalPotString() + "! Talk to me to win, " + getMinutesLeftTillWinner() + " min" + Misc.getPluralS(getMinutesLeftTillWinner()) + " left!"); timer++; if (timer == 1500) { timer = 0; container.stop(); } } @Override public void stop() { } }, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Event[] getInitialEvents();", "public void eventsPublishedByPub() {\r\n int index = 1;\r\n System.out.println(\"Events published by this publisher: \");\r\n for (Event event : pubEvents) {\r\n System.out.println(index + \"->\" + event + \"\\n\");\r\n index++;\r\n }\r\n }", "public final void loadEvents() {\n\n if (selectedUser == null || selectedUser.equals(\"All\")) {\n for (Absence a : AbsenceService.getAllUnacknowledged()) {\n\n AbsenceEvent e = new AbsenceEvent(a.getUser().getUsername() + \" \" + a.getAbsenceType(), TimeConverterService.convertLocalDateTimeToDate(a.getStartTime()), TimeConverterService.convertLocalDateTimeToDate(a.getEndTime()), a);\n\n switch (e.getAbsence().getAbsenceType()) {\n\n case MEDICAL_LEAVE:\n e.setStyleClass(\"medical_leave\");\n break;\n case HOLIDAY:\n e.setStyleClass(\"holiday\");\n e.setAllDay(true);\n break;\n case TIME_COMPENSATION:\n e.setStyleClass(\"time_compensation\");\n break;\n case BUSINESSRELATED_ABSENCE:\n e.setStyleClass(\"business-related_absence\");\n break;\n default:\n }\n\n this.addEvent(e);\n }\n } else {\n for (Absence a : AbsenceService.getAbsenceByUserAndUnacknowledged(BenutzerverwaltungService.getUser(selectedUser))) {\n\n AbsenceEvent e = new AbsenceEvent(a.getUser().getUsername() + \" \" + a.getAbsenceType() + \" \" + a.getReason(), TimeConverterService.convertLocalDateTimeToDate(a.getStartTime()), TimeConverterService.convertLocalDateTimeToDate(a.getEndTime()), a);\n\n switch (e.getAbsence().getAbsenceType()) {\n\n case MEDICAL_LEAVE:\n e.setStyleClass(\"medical_leave\");\n break;\n case HOLIDAY:\n e.setStyleClass(\"holiday\");\n e.setAllDay(true);\n break;\n case TIME_COMPENSATION:\n e.setStyleClass(\"time_compensation\");\n break;\n case BUSINESSRELATED_ABSENCE:\n e.setStyleClass(\"business-related_absence\");\n break;\n default:\n }\n\n this.addEvent(e);\n }\n }\n\n DefaultScheduleEvent holidayevent;\n\n for (Holiday h : HolidayService.getList()) {\n holidayevent = new DefaultScheduleEvent(h.getHolidayComment(), TimeConverterService.convertLocalDateToDate(h.getHolidayDate()), TimeConverterService.convertLocalDateToDate(h.getHolidayDate()));\n holidayevent.setAllDay(true);\n holidayevent.setStyleClass(\"feiertag\");\n\n this.addEvent(holidayevent);\n }\n }", "void parseEventList() {\n\t\tfor (int eventsId : events.keySet()) {\n\t\t\tfinal Event event = events.get(eventsId);\n\t\t\tif (users.get(event.getUser().getName()).isActiveStatus()\n\t\t\t\t\t&& !event.isViewed()\n\t\t\t\t\t&& event.getInnerSisdate().compareTo(\n\t\t\t\t\t\t\tnew GregorianCalendar()) >= 0) {\n\t\t\t\tevent.setViewed(true);\n\t\t\t\tfinal SimpleDateFormat fm = new SimpleDateFormat(\n\t\t\t\t\t\t\"dd.MM.yyyy-HH:mm:ss\");\n\t\t\t\tt.schedule(new TimerTask() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tif (event.isActive()) {\n\t\t\t\t\t\t\tgenerateEventMessage(\"User \"\n\t\t\t\t\t\t\t\t\t+ event.getUser().getName()\n\t\t\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t\t\t+ fm.format(event.getInnerSisdate()\n\t\t\t\t\t\t\t\t\t\t\t.getTime()) + \" \" + event.getText());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, event.getInnerSisdate().getTime());\n\n\t\t\t}\n\t\t}\n\n\t}", "public void listReceivedEvents() {\r\n for (Event event : receivedEvents) {\r\n System.out.print(event);\r\n }\r\n }", "public static List<Event> loadPubs() throws JSONException {\n \t\t\n \t\tString data = getJSON(Constants.PUBEVENTS);\n \t\t\n \t\tJSONObject json_obj = new JSONObject(data).getJSONObject(\"feed\");\n \t\tJSONArray json_arr = json_obj.getJSONArray(\"entry\");\n \t\t\t\n \t\tList<Event> events = new ArrayList<Event>();\n \t\t\t\n \t\t\t\n \t\tfor (int i = 0; i < json_arr.length(); i++){\n \t\t\tString title = json_arr.getJSONObject(i).getJSONObject(\"title\").optString(\"$t\");\n \t\t\tString description = json_arr.getJSONObject(i).getJSONObject(\"content\").optString(\"$t\");\n \t\t\tString time = json_arr.getJSONObject(i).getJSONArray(\"gd$when\").getJSONObject(0).optString(\"startTime\");\n \t\t\tString where = json_arr.getJSONObject(i).getJSONArray(\"gd$where\").getJSONObject(0).optString(\"valueString\");\n \t\t\t\n \t\t\t//If time is not an all day event\n \t\t\tif(time.length() > \"1967-09-03\".length()){\n \t\t\t\ttime = fromDate(time) + \" - SENT. \";\n \t\t\t}\n \t\t\t\n \n \t\t\tif (!title.equals(\"\")){\n \t\t\t\tevents.add(new Event(title, description, where, time));\n \t\t\t}\n \t\t}\n \t\t\t\n \t\treturn events;\n \t}", "public String arrangeEvents() throws Exception {\n JSONArray scheduledEventList = calObj.retrieveEvents(\"primary\").getJSONArray(\"items\");\n JSONArray unScheduledEventList = calObj.retrieveEvents(this.user.getCalId()).getJSONArray(\"items\");\n\n //Filter events for this week\n\n\n //Make a list of all events\n\n //Prioritise all unscheduled events\n\n\n //Send the list to client to display\n String events = \"\";\n for (int i = 0; i < scheduledEventList.length(); i++) {\n org.json.JSONObject jsonLineItem = scheduledEventList.getJSONObject(i);\n events += jsonLineItem.getString(\"summary\") + \" \" + jsonLineItem.getJSONObject(\"start\").getString(\"dateTime\") + \"\\n\";\n }\n // Unscheduled events set in bot created aPAS calendar\n for (int i = 0; i < unScheduledEventList.length(); i++) {\n org.json.JSONObject jsonLineItem = unScheduledEventList.getJSONObject(i);\n events += jsonLineItem.getString(\"summary\") + \" \" + jsonLineItem.getJSONObject(\"start\").getString(\"dateTime\") + \"\\n\";\n }\n return events;\n }", "public void processOffers(List<OfferPublishedEvent> events) {\n }", "private void createEvents() {\n\t}", "IEvent[] getEvents();", "private void initEvents(){\n ArrayList<Event> en = new ArrayList();\n en.add(new Event_MessangerOfGods(this.village));\n en.add(new Event_PaganPriest(this.village));\n this.events = en;\n }", "public nl.webservices.www.soap.InsolvencyPublications getEvents() {\n return events;\n }", "public void printEeventList() {\n PriorityQueue<Event> events = this.getEventList();\n while (!events.isEmpty()) {\n Event event = events.poll();\n if (!(event instanceof ServerRestEvent || event instanceof ServerBackEvent)) {\n System.out.println(event);\n }\n\n }\n }", "public List<Event> getParticipatedEvents() {\n return participatedEvents;\n }", "public ProgressEvent [] getReceivedEvents() {\n ProgressEvent [] answer = new ProgressEvent[this.receivedEvents.size()];\n return (ProgressEvent []) this.receivedEvents.toArray(answer);\n }", "public void getData() {\n\t\tcurrentDate = model.getCurrentDate();\n\t\tLocalDate firstDateOfMonth = LocalDate.of(currentDate.getYear(), currentDate.getMonthValue(), 1);\n\t\tevents = EventProcessor.filterEvents(model.getEvents(), firstDateOfMonth, firstDateOfMonth.plusMonths(1).minusDays(1));\n\t}", "@Override\r\n\tpublic IMessageEvents getMessageEvents() {\r\n\t\treturn replay.messageEvents;\r\n\t}", "public List<Event> getEvents() {\n List<Event> events = new ArrayList<>();\n\n Query query = new Query(\"Event\");\n PreparedQuery results = datastore.prepare(query);\n\n for (Entity entity : results.asIterable()) {\n try {\n String idString = entity.getKey().getName();\n UUID eventId = UUID.fromString(idString);\n String speaker = (String) entity.getProperty(\"speaker\");\n String organization = (String) entity.getProperty(\"organization\");\n String eventDate = (String) entity.getProperty(\"eventDate\");\n Location location = (Location) entity.getProperty(\"location\");\n List<String> amenities = getAmenities(eventId);\n String externalLink = (String) entity.getProperty(\"externalLink\");\n PublicType publicType = (PublicType) entity.getProperty(\"publicType\");\n long ownerId = (long) entity.getProperty(\"ownerId\");\n List<ThreadComment> thread = getThread(eventId);\n // long timeStamp = (long) entity.getProperty(\"timestamp\");\n\n Event event = new Event(eventId, speaker, organization, eventDate, location, amenities, externalLink,\n publicType, ownerId);\n event.copyThread(thread);\n events.add(event);\n // An exception can occur here for multiple reasons (Type casting error, any\n // property not existing, key error, etc...)\n } catch (Exception e) {\n System.err.println(\"Error reading event.\");\n System.err.println(entity.toString());\n e.printStackTrace();\n }\n }\n\n return events;\n }", "public void onEventMainThread(BusEventAnnouncements event) {\n Log.d(TAG, event.toString());\n List<Announcement> announcements = event.getAnnouncements();\n ChannelController.storeAnnouncements(getActivity(), announcements);\n // Announcements were refreshed. Hide loading animation.\n swipeRefreshLayout.setRefreshing(false);\n\n if (!announcements.isEmpty()) {\n // If announcement data was updated show message no matter if it was a manual or auto refresh.\n String message = getString(R.string.announcement_info_updated);\n toast.setText(message);\n toast.show();\n } else {\n if (!isAutoRefresh) {\n // Only show up to date message if a manual refresh was triggered.\n String message = getString(R.string.announcement_info_up_to_date);\n toast.setText(message);\n toast.show();\n }\n }\n }", "private void createEvents()\r\n\t{\r\n\t\teventsCount.add(new Event(RequestMethod.PUT, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.GET, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.POST, 0));\r\n\t}", "public List<ApprovalEventResponse> getApprovalEvents(KlayTransactionReceipt.TransactionReceipt transactionReceipt) {\n List<SmartContract.EventValuesWithLog> valueList = extractEventParametersWithLog(APPROVAL_EVENT, transactionReceipt);\n ArrayList<ApprovalEventResponse> responses = new ArrayList<ApprovalEventResponse>(valueList.size());\n for (SmartContract.EventValuesWithLog eventValues : valueList) {\n ApprovalEventResponse typedResponse = new ApprovalEventResponse();\n typedResponse.log = eventValues.getLog();\n typedResponse.owner = (String) eventValues.getIndexedValues().get(0).getValue();\n typedResponse.spender = (String) eventValues.getIndexedValues().get(1).getValue();\n typedResponse.value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();\n responses.add(typedResponse);\n }\n return responses;\n }", "protected APPAAnnounce() {\n\n url = AppaLounge.BASE_URL + \"announcements/2/\";\n\n }", "private void queryEvents() {\n ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n // include data referred by user key\n query.include(Event.KEY_HOST);\n // limit query to latest 20 items\n query.setLimit(30);\n // order posts by creation date (newest first)\n query.addDescendingOrder(\"createdAt\");\n // start an asynchronous call for events\n query.findInBackground(new FindCallback<Event>() {\n @Override\n public void done(List<Event> events, com.parse.ParseException e) {\n\n // check for errors\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n // for debugging purposes let's print every event description to logcat\n for (Event event : events) {\n Log.i(TAG, \"Event: \" + event.getDescription() + \", username: \" + event.getHost().getUsername());\n }\n\n // save received events to list and notify adapter of new data\n allEvents.addAll(events);\n }\n\n });\n }", "public String getEventInfo() {\n\t\treturn String.format(\"%s, which now has %s participant(s)\",\n\t\t\tthis.title, this.participants);\n\t}", "public Event interpret(Event e) {\r\n\t\tEvent event = new Event(e.getTitle());\r\n\t\tevent.setImpact(e.getImpact());\r\n\t\tevent.setInstrument(e.getInstrument());\r\n\r\n\t\tPattern pattern = Pattern\r\n\t\t\t\t.compile(\"<td class=\\\"time\\\">([0-9]?[0-9]:[0-9][0-9][a-z][a-z])?</td> <td class=\\\"currency\\\">[A-Z][A-Z][A-Z]</td> <td class=\\\"impact\\\"> <span title=\\\"([A-Z]*[a-z]* *)*\\\" class=\\\"[a-z]*\\\"></span> </td> <td class=\\\"event\\\"><span>\"\r\n\t\t\t\t\t\t+ e.getTitle()\r\n\t\t\t\t\t\t+ \"</span></td> <td class=\\\"detail\\\"><a class=\\\"calendar_detail level[0-9]\\\" data-level=\\\"[0-9]\\\"></a></td> <td class=\\\"actual\\\"> <span class=\\\"[a-z]*\\\">-?[0-9]*\\\\.*[0-9]*%?[A-Z]?</span>\");\r\n\t\trfc.downloadFile(\"http://www.forexfactory.com/\");\r\n\r\n\t\tString fileContent = \"\";\r\n\r\n\t\ttry {\r\n\t\t\tfileContent = new Scanner(rfc.getFile()).useDelimiter(\"\\\\Z\").next();\r\n\t\t} catch (FileNotFoundException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\r\n\t\tMatcher matcher = pattern.matcher(fileContent);\r\n\r\n\t\tboolean foundPrimeResult = false;\r\n\t\tString eventString = \"\";\r\n\t\twhile (matcher.find()) {\r\n\t\t\teventString = matcher.group();\r\n\t\t\tif (eventString.contains(\"EUR\") || eventString.contains(\"USD\"))\r\n\t\t\t\tbreak;\r\n\t\t\tfoundPrimeResult = true;\r\n\t\t}\r\n\r\n\t\t// System.out.println(eventString);\r\n\r\n\t\tPattern resultPattern = Pattern\r\n\t\t\t\t.compile(\"<td class=\\\"actual\\\"> <span class=\\\"[a-z]*\\\">-?[0-9]*\\\\.*[0-9]*%?[A-Z]?</span>\");\r\n\r\n\t\t// match and set result\r\n\t\tmatcher = resultPattern.matcher(eventString);\r\n\t\tif (matcher.find()) {\r\n\t\t\tpattern = Pattern.compile(\"<span class=\\\"[a-z]*\\\">\");\r\n\t\t\tMatcher matcher2 = pattern.matcher(matcher.group());\r\n\t\t\tif (matcher2.find()) {\r\n\t\t\t\tString result = matcher2.group();\r\n\t\t\t\tif (result.contains(\"better\"))\r\n\t\t\t\t\tevent.setResult(EventResult.BETTER);\r\n\t\t\t\telse if (result.contains(\"worse\"))\r\n\t\t\t\t\tevent.setResult(EventResult.WORSE);\r\n\t\t\t\telse\r\n\t\t\t\t\tevent.setResult(EventResult.NONE);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t// check if unchanged but result is in\r\n\t\t// TODO fixa denna s? att den inte matcher med events som ?nnu inte har\r\n\t\t// kommit in.\r\n\t\t// Fan sv?rt att matcha unchanged faktiskt tobbe\r\n\t\tif (!foundPrimeResult) {\r\n\t\t\tpattern = Pattern\r\n\t\t\t\t\t.compile(e.getTitle()\r\n\t\t\t\t\t\t\t+ \"</span></td> <td class=\\\"detail\\\"><a class=\\\"calendar_detail level[0-9]\\\" data-level=\\\"[0-9]\\\"></a></td> <td class=\\\"actual\\\">*[0-9]+.*</td>\");\r\n\t\t\tmatcher = pattern.matcher(fileContent);\r\n\t\t\twhile (matcher.find()) {\r\n\t\t\t\tevent.setResult(EventResult.UNCHANGED);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn event;\r\n\r\n\t}", "public List<PluginStatsEvent> getPastEvents() {\n\t\tsynchronized (queue) {\n\t\t\tPluginStatsEvent[] info = new PluginStatsEvent[queue.size()];\n\t\t\tList<PluginStatsEvent> returnList = new ArrayList<PluginStatsEvent>();\n\t\t\tCollections.addAll(returnList, queue.toArray(info));\n\t\t\treturn returnList;\n\t\t}\n\t}", "public void processEvents(Events events) {\n\n log.info(\"events processed: [{}]\", events.toString());\n }", "public abstract Map<String, Event> getEvents();", "private void processEvent(Event e) {\n\t\t// adjust timer\n\t\ttime = e.getTime();\n\t\tprintTimer();\n\n\t\t// get related patient and doctor. Start them waiting. Get preferredDoctor\n\t\tPerson p = e.getPatient();\n\t\tp.startWaiting();\n\t\tPerson d = e.getDoctor();\n\t\tif (d != null) {\n\t\t\td.startWaiting();\n\t\t}\n\t\tPerson preferredDoctor = p.getPreferredDoctor();\n\n\t\t// switch on the event type\n\t\tswitch (e.getType()) {\n\t\t\tcase Event.NEW_PATIENT :\n\t\t\t\t// new patient entered ambulance. Add him to incoming waiters\n\t\t\t\t// and check if doctors are waiting\n\t\t\t\tprint(\n\t\t\t\t\t\"New patient: \" + p + \", add to examination-waiting-list\");\n\t\t\t\t_examinationWaiters.addLast(p);\n\t\t\t\tcheckExamination();\n\t\t\t\tbreak;\n\n\t\t\tcase Event.FIRST_EXAMINATION :\n\t\t\t\t// end of 1st examination\n\t\t\t\tprint(\"1st examination end: \" + p + \", \" + d);\n\t\t\t\tif (needXray()) {\n\t\t\t\t\t// if xray needed, add patient to the xray waiters\n\t\t\t\t\t// and check if xray-doctor is waiting\n\t\t\t\t\tprint(\"Xray needed. Add \" + p + \" to xray-waiting-list\");\n\t\t\t\t\tp.setPreferredDoctor(d);\n\t\t\t\t\t_xrayWaiters.addLast(p);\n\t\t\t\t\tcheckXRay();\n\t\t\t\t} else {\n\t\t\t\t\t// if no xray needed, then patient can go home.\n\t\t\t\t\tprint(\"No xray needed. Can go home now: \" + p);\n\t\t\t\t\t_gonePatients.add(p);\n\t\t\t\t}\n\t\t\t\t// check if incoming patients are waiting\n\t\t\t\tcheckExamination();\n\t\t\t\tbreak;\n\n\t\t\tcase Event.XRAY_SHOOTING :\n\t\t\t\t// end of xray-examination. Add Patient to waiters.\n\t\t\t\t// Check if any xray waiters and if doctors are waiting\n\t\t\t\tprint(\"Xray-shooting end: \" + p);\n\t\t\t\tif (_policy == XRAY_FIRST) {\n\t\t\t\t\tprint(\"Add to back-from-xray-waiters: \" + p);\n\t\t\t\t\t_backFromXrayWaiters.addLast(p);\n\t\t\t\t} else {\n\t\t\t\t\tprint(\"Add to examination-waiting-list: \" + p);\n\t\t\t\t\t_examinationWaiters.addLast(p);\n\t\t\t\t}\n\t\t\t\tcheckExamination();\n\t\t\t\tcheckXRay();\n\t\t\t\tbreak;\n\n\t\t\tcase Event.SECOND_EXAMINATION :\n\t\t\t\t// end of second examination. Patient can go home now.\n\t\t\t\t// check if incoming patients are waiting.\n\t\t\t\tprint(\"2nd examination end: \" + p + \", \" + d);\n\t\t\t\tprint(\"Can go home: \" + p);\n\t\t\t\t_gonePatients.add(p);\n\t\t\t\tcheckExamination();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public void ingresar_a_la_Opcion_de_eventos() {\n\t\t\n\t}", "public GameEvent[] getEvents();", "static Map<Integer, Event> getEvents() {\n\t\treturn events;\n\t}", "Collection<EventDetector> getEventsDetectors();", "public MedicationEvents getMedicationEventsByTitle(MedicationEvents medicationEvents);", "BasicEvents createBasicEvents();", "@Override synchronized public EventPacket extractPacket(AEPacketRaw in) {\r\n out=super.extractPacket(in);\r\n \r\n int n=in.getNumEvents();\r\n if(n==0) return out;\r\n for(Object obj:out){\r\n PolarityEvent e=(PolarityEvent)obj;\r\n e.polarity=e.type==0? PolarityEvent.Polarity.Off:PolarityEvent.Polarity.On;\r\n }\r\n return out;\r\n }", "public interface Events {\n\n /**\n * Archive has stored the entities within a SIP.\n * <p>\n * Indicates that a SIP has been sent to the archive. May represent an add,\n * or an update.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Number of entities archived</dd>\n * <dt>eventTarget</dt>\n * <dd>every archived entity</dd>\n * </dl>\n * </p>\n */\n public static final String ARCHIVE = \"archive\";\n\n /**\n * Signifies that an entity has been identified as a member of a specific\n * batch load process.\n * <p>\n * There may be an arbitrary number of independent events signifying the\n * same batch (same outcome, date, but different sets of targets). A unique\n * combination of date and outcome (batch label) identify a batch.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Batch label/identifier</dd>\n * <dt>eventTarget</dt>\n * <dd>Entities in a batch</dd>\n * </dl>\n * </p>\n */\n public static final String BATCH = \"batch\";\n\n /**\n * File format characterization.\n * <p>\n * Indicates that a format has been verifiably characterized. Format\n * characterizations not accompanied by a corresponding characterization\n * event can be considered to be unverified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>format, in the form \"scheme formatId\" (whitespace separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of characterized file</dd>\n * </dl>\n * </p>\n */\n public static final String CHARACTERIZATION_FORMAT =\n \"characterization.format\";\n\n /**\n * Advanced file characterization and/or metadata extraction.\n * <p>\n * Indicates that some sort of characterization or extraction has produced a\n * document containing file metadata.\n * </p>\n * *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>id of File containing metadata</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File the metadata describes</dd>\n * </dl>\n */\n public static final String CHARACTERIZATION_METADATA =\n \"characterization.metadata\";\n\n /**\n * Initial deposit/transfer of an item into the DCS, preceding ingest.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>SIP identifier uid</dd>\n * <dt>eventTarget</dt>\n * <dd>id of deposited entity</dd>\n * </dl>\n * </p>\n */\n public static final String DEPOSIT = \"deposit\";\n\n /**\n * Content retrieved by dcs.\n * <p>\n * Represents the fact that content has been downloaded/retrieved by the\n * dcs.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstances\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been downloaded</dd>\n * </dl>\n */\n public static final String FILE_DOWNLOAD = \"file.download\";\n\n /**\n * uploaaded/downloaded file content resolution.\n * <p>\n * Indicates that the reference URI to a unit of uploaded or downloaded file\n * content has been resolved and replaced with the DCS file access URI.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>reference_URI</code> 'to' <code>dcs_URI</code></dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been resolved</dd>\n * </dl>\n */\n public static final String FILE_RESOLUTION_STAGED = \"file.resolution\";\n\n /**\n * Indicates the uploading of file content.\n * <p>\n * Represents the physical receipt of bytes from a client.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstanced\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been uploaded</dd>\n * </dl>\n */\n public static final String FILE_UPLOAD = \"file.upload\";\n\n /**\n * Fixity computation/validation for a particular File.\n * <p>\n * Indicates that a particular digest has been computed for given file\n * content. Digest values not accompanied by a corresponding event may be\n * considered to be un-verified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>computed digest value of the form \"alorithm value\" (whitepsace\n * separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of digested file</dd>\n * </dl>\n * </p>\n */\n public static final String FIXITY_DIGEST = \"fixity.digest\";\n\n /**\n * Assignment of an identifier to the given entity, replacing an\n * existing/temporary id. *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>old_identifier</code> 'to' <code>new_identifier</code></dd>\n * <dt>eventTarget</dt>\n * <dd>new id of object</dd>\n * </dl>\n */\n public static final String ID_ASSIGNMENT = \"identifier.assignment\";\n\n /**\n * Marks the start of an ingest process.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_START = \"ingest.start\";\n\n /**\n * Signifies a successful ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_SUCCESS = \"ingest.complete\";\n\n /**\n * Signifies a failed ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_FAIL = \"ingest.fail\";\n\n /**\n * Signifies that a feature extraction or transform has successfully\n * occurred.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM = \"transform\";\n\n /**\n * Signifies that a feature extraction or transform failed.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM_FAIL = \"transform.fail\";\n\n /**\n * Signifies a file has been scanned by the virus scanner.\n * <p>\n * Indicates that a file has been scanned by a virus scanner. There could be\n * more than one event for a file.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of file whose content was scanned</dd>\n * </dl>\n * </p>\n */\n public static final String VIRUS_SCAN = \"virus.scan\";\n\n /**\n * Signifies an new deliverable unit is being ingested as an update to the target deliverable unit.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of the deliverable unit being updated</dd>\n * </dl>\n * </p>\n */\n public static final String DU_UPDATE = \"du.update\";\n\n}", "public List<UnpausedEventResponse> getUnpausedEvents(KlayTransactionReceipt.TransactionReceipt transactionReceipt) {\n List<SmartContract.EventValuesWithLog> valueList = extractEventParametersWithLog(UNPAUSED_EVENT, transactionReceipt);\n ArrayList<UnpausedEventResponse> responses = new ArrayList<UnpausedEventResponse>(valueList.size());\n for (SmartContract.EventValuesWithLog eventValues : valueList) {\n UnpausedEventResponse typedResponse = new UnpausedEventResponse();\n typedResponse.log = eventValues.getLog();\n typedResponse.account = (String) eventValues.getNonIndexedValues().get(0).getValue();\n responses.add(typedResponse);\n }\n return responses;\n }", "private void initializeEvents() {\r\n\t}", "@Override\n\tpublic Set<Event> getEvents() {\n return events;\n }", "public String eventList() {\n\n\t\tString str = \"\";\n\t\tif(map.isEmpty()) {\n\t\t\tstr = \"No Events Scheduled Yet\";\n\t\t\treturn str;\n\t\t}\n\t\tstr = \"One Time Events: \\n\";\n\t\tstr = str + \"________________ \\n2020\\n\";\n\n\t\tfor(Map.Entry<LocalDate, ArrayList<Event>> entry: map.entrySet() ) {\n\n\t\t\tLocalDate currentDate = entry.getKey();\n\t\t\tArrayList<Event> list = map.get(currentDate);\n\t\t\tDateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"EEEE MMMM dd\");\n\t\t\tDateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern(\"HH:mm a\");\n\t\t\tfor(int i = 0;i<list.size();i++) {\n\t\t\t\tEvent e = list.get(i);\n\t\t\t\tif(e.recurring == false) {\n\t\t\t\t\tstr = str + \" \"+formatter.format(currentDate) +\" \" + timeFormatter.format(e.sTime) + \" - \" + timeFormatter.format(e.eTime) + \" \" + e.name + \"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//for recurring events, add this later\n\t\t/*\n\t\tstr = str + \"\\nRecurring Events:\\n\";\n\t\tstr = str + \"________________ \\n\";\n\t\tif(recurringEvents.size()==0) {\n\t\t\tstr = str + \"No Recurring Event Scheduled\\n\";\n\t\t\treturn str;\n\t\t}\n\t\tfor(int i = 0; i<recurringEvents.size(); i++) {\n\t\t\tEvent e = recurringEvents.get(i);\n\t\t\tstr = str + e.name +\"\\n\";\n\t\t\tstr = str + e.rdays + \" \" + e.sTime + \" \" + e.eTime + \" \" + e.recurringStartDate + \" \" + e.eDate +\"\\n\";\n\t\t}\n\t\t */\n\t\treturn str;\n\n\t}", "public EventMessageExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public void printDecisionPointEvents() throws Exception\r\n\t{\r\n\t\tOWLClass firstSystemDPE = this.getOWLClass(EFBO_FRC_URI, \"DecisionPointEvent\");\r\n\t\tOWLClass nextOfDPE = this.getOWLClass(EFBO_V_URI, \"System-1_Event\");\r\n\t\t\r\n\t\tOWLClass secondSystemDPE = this.getOWLClass(EFBO_FRC_URI, \"DecisionPointEvent\");\r\n\t\tOWLClass nextOfDPE2 = this.getOWLClass(EFBO_V_URI, \"System-2_Event\");\r\n\t\t\r\n\t\tOWLObjectProperty hasNextEvent = efboStatusReportManager.getOWLObjectProperty(EFBO_CORE_URI, \"hasNextEvent\");\r\n\t\tOWLObjectProperty hasPrevEvent = efboStatusReportManager.getOWLObjectProperty(EFBO_CORE_URI, \"hasPreviousEvent\");\r\n\t\tOWLObjectProperty isAltEventOf = efboStatusReportManager.getOWLObjectProperty(EFBO_CORE_URI, \"isAlternateEventOf\");\r\n\t\t\r\n\t\tSet<OWLNamedIndividual> inds = efboStatusReportManager.getOWLNamedIndividuals(firstSystemDPE);\r\n\t\t\r\n\t\tString dpeName = \"\";\r\n\t\tfor (OWLNamedIndividual i: inds)\r\n\t\t{\r\n\t\t\tdpeName += efboStatusReportManager.getLabel(i) + \"; \"; \r\n\t\t}\r\n\t\t\r\n\t\tString g = \"@startuml\";\r\n\t g += \"\\ntitle\\n\" + efboStatusReportManager.getLabel(firstSystemDPE)\r\n + \"\\n\" + dpeName\r\n + \"\\nend title\\n\";\r\n\t\tg += getRelatedGraph(\"DecisionPointEvent\", \"System-1_Event\", \"hasNextEvent\", \"hasPreviousEvent\", \"isAlternateEventOf\");\r\n\t\tg += getRelatedGraph(\"DecisionPointEvent\", \"System-2_Event\", \"hasNextEvent\", \"hasPreviousEvent\", \"isAlternateEventOf\");\r\n\t\tg += \"\\n@enduml\";\r\n\t\tSystem.out.println(g);\r\n\t\t\r\n\t\tSystem.out.println(\"\\nDecesion Point Events\");\r\n\t\tthis.printEntityBySystem(firstSystemDPE, hasNextEvent, nextOfDPE);\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"\\nDecesion Point Events\");\r\n\t\tthis.printEntityBySystem(secondSystemDPE, hasNextEvent, nextOfDPE2);\r\n\t\t\r\n\t}", "protected void normalizeEventTimes()\n {\n this.m_eventStartTime = (this.event_start_time == EASMessage.IMMEDIATE_START_TIME) ? System.currentTimeMillis()\n : (this.event_start_time * 1000L) + EASMessage.START_TIME_EPOCH;\n\n this.m_eventExpirationTime = (this.event_duration == EASMessage.INDEFINITE_EVENT_DURATION) ? Long.MAX_VALUE\n : this.m_eventStartTime + (this.event_duration * 60L * 1000L);\n }", "@Override\n\tpublic void loadEvents() {\n\t\t\n\t}", "FutureEventList() {\n q = new PriorityQueue<Event>(10, new EventComperator());\n }", "public DocumentElement EventInterested(ArrayList<Event> interestedEvents) {\n\t\tif (interestedEvents.size() != 0) {\n\t\t\tNPPhraseSpec s11 = nlgFactory.createNounPhrase(pronoun);\n\t\t\t\n\t\t\tSPhraseSpec s = new SPhraseSpec(nlgFactory);\n\t\t\ts.setVerb(\"is interested\");\n\t\n\t\t\tSPhraseSpec s1 = new SPhraseSpec(nlgFactory);\n\t\t\ts1.setVerb(\"go\");\n\t\t\ts1.setFeature(Feature.FORM, Form.GERUND);\n\t\n\t\t\tPPPhraseSpec p1 = new PPPhraseSpec(nlgFactory);\n\t\t\tp1.addComplement(s1);\n\t\t\tp1.setPreposition(\"in\");\n\t\t\ts.addModifier(p1); \n\t\n\t\t\tPPPhraseSpec p2 = new PPPhraseSpec(nlgFactory);\n\t\t\tp2.addComplement(\"events\");\n\t\t\tp2.setPreposition(\"to\");\n\t\t\ts1.addModifier(p2); \n\t\n\t\t\tCoordinatedPhraseElement obj = nlgFactory.createCoordinatedPhrase();\n\t\t\tfor (int i = 0; i < interestedEvents.size(); i++) {\n\t\t\t\tNPPhraseSpec object1 = nlgFactory.createNounPhrase(interestedEvents.get(i).getName());\n\t\t\t\tString location = generateLocation(interestedEvents.get(i).getLocation());\n\t\n\t\t\t\tif (!(\"\").equals(location)) {\n\t\t\t\t\tPPPhraseSpec pp = new PPPhraseSpec(nlgFactory);\n\t\t\t\t\tpp.addComplement(location);\n\t\t\t\t\tpp.setPreposition(\"in\");\n\t\t\t\t\tobject1.addComplement(pp);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tobj.addCoordinate(object1); \n\t\t\t}\n\t\n\t\t\tp2.addPostModifier(obj);\n\t\t\tobj.addPreModifier(\"such as\");\n\t\t\t\n\t\t\ts11.addPostModifier(s);\n\t\t\t\n\t\t\treturn nlgFactory.createSentence(s11);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "UncommittedEvents events() {\n var events = get().stream()\n .flatMap(segment -> segment.getEventList()\n .stream())\n .collect(toList());\n return UncommittedEvents.ofNone()\n .append(events);\n }", "public String getEventName();", "public List<PausedEventResponse> getPausedEvents(KlayTransactionReceipt.TransactionReceipt transactionReceipt) {\n List<SmartContract.EventValuesWithLog> valueList = extractEventParametersWithLog(PAUSED_EVENT, transactionReceipt);\n ArrayList<PausedEventResponse> responses = new ArrayList<PausedEventResponse>(valueList.size());\n for (SmartContract.EventValuesWithLog eventValues : valueList) {\n PausedEventResponse typedResponse = new PausedEventResponse();\n typedResponse.log = eventValues.getLog();\n typedResponse.account = (String) eventValues.getNonIndexedValues().get(0).getValue();\n responses.add(typedResponse);\n }\n return responses;\n }", "public List<EventDesc> getEvents()\r\n {\r\n return Collections.unmodifiableList(events);\r\n }", "private Collection getReleasedEvents() {\n Set events = new HashSet();\n Collection topEvents = eventPane.getTopLevelEvents();\n Set current = new HashSet();\n current.addAll(topEvents);\n Set next = new HashSet();\n GKInstance event = null;\n List values = null;\n Boolean dnr = null;\n try {\n while (current.size() > 0) {\n for (Iterator it = current.iterator(); it.hasNext();) {\n event = (GKInstance) it.next();\n dnr = (Boolean) event.getAttributeValue(DO_NOT_RELEASE);\n if (dnr != null && !dnr.booleanValue())\n events.add(event);\n if (event.getSchemClass().isValidAttribute(\"hasComponent\")) {\n values = event.getAttributeValuesList(\"hasComponent\");\n if (values != null)\n next.addAll(values);\n }\n if (event.getSchemClass().isValidAttribute(\"hasInstance\")) {\n values = event.getAttributeValuesList(\"hasInstance\");\n if (values != null)\n next.addAll(values);\n }\n }\n current.clear();\n current.addAll(next);\n next.clear();\n }\n }\n catch(Exception e) {\n System.err.println(\"EventReleaseCheckPane.getReleasedEvents(): \" + e);\n e.printStackTrace();\n }\n return events;\n }", "public static void sortEvents(){\n if(events.size()>0){\n Comparator<Event> comp = new Comparator<Event>(){\n public int compare(Event e1, Event e2){\n if(e1.getEventStartTime().before(e2.getEventStartTime())){\n return -1;\n }\n else if(e1.getEventStartTime().after(e2.getEventStartTime())){\n return 1;\n }\n else{\n return 0;\n }\n }\n \n };\n Collections.sort(events, comp);\n \n }}", "public String showAllEvents() {\n String allEvents = \"\";\n for (Event e: events)\n {\n allEvents = allEvents + e.getName() + \"\\n\";\n }\n return allEvents;\n }", "public List<Event> getAllEventsByResponder(String responder_name) {\n List<Event> events = new ArrayList<Event>();\n\n String selectQuery = \"SELECT * FROM \" + EVENTS_TABLE_NAME + \" evt, \"\n + EVENTS_TABLE_NAME + \" resp, \" + RESPONDERS_EVENTS_TABLE_NAME + \" resp_evt WHERE resp.\"\n + EVENT_NAME + \" = '\" + responder_name + \"'\" + \" AND resp.\" + KEY_ID\n + \" = \" + \"resp_evt.\" + RESPONDERS_EVENTS_EVENTS_ID + \" AND evt.\" + KEY_ID + \" = \"\n + \"resp_evt.\" + RESPONDERS_EVENTS_RESPONDERS_ID;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Event evt = new Event();\n evt.setId(c.getInt((c.getColumnIndex(KEY_ID))));\n evt.setEventName((c.getString(c.getColumnIndex(EVENT_NAME))));\n evt.setDate(c.getString(c.getColumnIndex(EVENT_DATE)));\n\n events.add(evt);\n } while (c.moveToNext());\n }\n\n return events;\n }", "@Override\n public void onPlayAnnouncementRequest(PlayAnnouncementRequest arg0) {\n\n }", "public List<Event> getAllResponsesByResponder(String responder_name) {\n List<Event> events = new ArrayList<Event>();\n\n String selectQuery = \"SELECT * FROM \" + EVENTS_TABLE_NAME + \" evt, \"\n + EVENTS_TABLE_NAME + \" resp, \" + RESPONDERS_EVENTS_TABLE_NAME + \" resp_evt WHERE resp.\"\n + EVENT_NAME + \" = '\" + responder_name + \"'\" + \" AND resp.\" + KEY_ID\n + \" = \" + \"resp_evt.\" + RESPONDERS_EVENTS_EVENTS_ID + \" AND evt.\" + KEY_ID + \" = \"\n + \"resp_evt.\" + RESPONDERS_EVENTS_RESPONDERS_ID;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Event evt = new Event();\n evt.setId(c.getInt((c.getColumnIndex(KEY_ID))));\n evt.setEventName((c.getString(c.getColumnIndex(EVENT_NAME))));\n evt.setDate(c.getString(c.getColumnIndex(EVENT_DATE)));\n\n events.add(evt);\n } while (c.moveToNext());\n }\n\n return events;\n }", "ScheduledEvents getScheduledEvents();", "public static List<Event> loadEvents() throws JSONException {\n \t\t\n \t\tString data = getJSON(Constants.GOOGLEEVENTS);\n \t\t\n \t\tJSONObject json_obj = new JSONObject(data).getJSONObject(\"feed\");\n \t\tJSONArray json_arr = json_obj.getJSONArray(\"entry\");\n \t\t\t\n \t\tList<Event> events = new ArrayList<Event>();\n \t\t\t\n \t\t//Collection the right content from JSON\n \t\tfor (int i = 0; i < json_arr.length(); i++){\n \t\t\tString title = json_arr.getJSONObject(i).getJSONObject(\"title\").optString(\"$t\");\n \t\t\tString description = json_arr.getJSONObject(i).getJSONObject(\"content\").optString(\"$t\");\n \t\t\tString time = json_arr.getJSONObject(i).getJSONArray(\"gd$when\").getJSONObject(0).optString(\"startTime\");\n \t\t\tString where = json_arr.getJSONObject(i).getJSONArray(\"gd$where\").getJSONObject(0).optString(\"valueString\");\n \t\t\t\t\n \t\t\t//If time is not an all day event\n \t\t\tif(time.length() > \"1967-09-03\".length()){\n \t\t\t\ttime = fromDate(time);\n \t\t\t}\n \t\t\t\n \t\t\t//Add events if it has i title\n \t\t\tif (!title.equals(\"\")){\n \t\t\t\tevents.add(new Event(title, description, where, time + \". \"));\n \t\t\t}\n \t\t}\t\n \t\treturn events;\n \t}", "private void refreshEvents() {\r\n\t\ttry {\r\n\t\t\tif (SimpleSetting.ShowAlerts.getBoolean(true)) {\r\n\t\t\t\tloadUpcomingEvents();\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tRTeamLog.i(SUFFIX, \"Exception while refreshing events: %s\", e.getMessage());\r\n\t\t}\r\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.showevent);\n Bundle extras = this.getIntent().getExtras();\n if(extras != null){\n \tevent = (EventPOJO)extras.get(\"eventPOJO\");\n \tuname = extras.getString(\"user\");\n \n \tEventPOJO event = (EventPOJO)extras.get(\"eventPOJO\");\n \tSystem.out.println(event.getEventTitle());\n \tTextView temp = (TextView)findViewById(R.id.eventTitleText);\n \ttemp.setText(event.getEventTitle());\n \ttemp = (TextView)findViewById(R.id.eventDescText);\n \ttemp.setText(event.getEventDesc());\n \ttemp = (TextView)findViewById(R.id.eventActionsText);\n \ttemp.setText(event.getEventActions());\n \ttemp = (TextView)findViewById(R.id.startDateDisplay2);\n \ttemp.setText(event.getStart());\n \ttemp = (TextView)findViewById(R.id.endDateDisplay2);\n \ttemp.setText(event.getEnd());\n \ttemp = (TextView)findViewById(R.id.affilsText);\n \t/*\n \tCharSequence[] temp2 = extras.getCharSequenceArray(\"affils\");\n \tboolean[] temp3 = extras.getBooleanArray(\"affilsChecked\");\n \tStringBuilder affilText = new StringBuilder();\n \tif(temp2 != null && temp3 != null){\n \t\tfor(int i = 0; i < temp2.length; i++){\n \t\t\tif(temp3[i])\n \t\t\t\taffilText.append(temp2[i] + \"\\t\");\n \t\t}\n \t}\n \t*/\n \tList<String> affilList = event.getAffils();\n \tStringBuilder affilText = new StringBuilder();\n \tfor(String s : affilList){\n \t\taffilText.append(s + \"\\t\");\n \t}\n \ttemp.setText(affilText.toString());\n \ttemp = (TextView)findViewById(R.id.systemsText);\n \t/*\n \ttemp2 = extras.getCharSequenceArray(\"systems\");\n \ttemp3 = extras.getBooleanArray(\"systemsChecked\");\n \tStringBuilder systemText = new StringBuilder();\n \tif(temp2 != null && temp3 != null){\n \t\tfor(int i = 0; i < temp2.length; i++){\n \t\t\tif(temp3[i])\n \t\t\t\tsystemText.append(temp2[i] + \"\\t\");\n \t\t}\n \t}\n \t*/\n \tList<String> systemList = event.getSystems();\n \tStringBuilder systemText = new StringBuilder();\n \tfor(String s : systemList){\n \t\tsystemText.append(s + \"\\t\");\n \t}\n \ttemp.setText(systemText.toString());\n \ttemp = (TextView)findViewById(R.id.personText1);\n \ttemp.setText(event.getContact1());\n \ttemp = (TextView)findViewById(R.id.personText2);\n \ttemp.setText(event.getContact2());\n \ttemp = (TextView)findViewById(R.id.severityText);\n \ttemp.setBackgroundColor(event.getSeverity());\n \ttemp = (TextView)findViewById(R.id.typeText);\n \ttemp.setText(event.getType());\n \t\n }\n }", "public void onEventsLoaded(List<Event> events) {\n hideProgressBar();\n this.events = events;\n }", "public int getCount() {\n\t\treturn events.size();\n\t}", "public Collection<Event> getEvents() {\n\t\treturn null;\n\t}", "public void sortEvents() {\n\t\tCollections.sort(events);\n\t}", "public ArrayList<Event> getEvents(){\n return this.events;\n }", "protected void getEventIDs() throws Throwable\n {\n _eventID = _helper.getProperties().getRetrievePendingEventId();\n _ackEventID = _helper.getProperties().getRetrievePendingAckEventId();\n }", "@Override\n public List<EventNotification> getList() throws EwpException {\n String sql = \"SELECT * From PFEventNotification\";\n return executeSqlAndGetEntityList(sql);\n }", "public List<Event> getEventsList() {\n List<Event> eventDetails = eventRepository.findAll();\n return eventDetails;\n }", "public List<PauserAddedEventResponse> getPauserAddedEvents(KlayTransactionReceipt.TransactionReceipt transactionReceipt) {\n List<SmartContract.EventValuesWithLog> valueList = extractEventParametersWithLog(PAUSERADDED_EVENT, transactionReceipt);\n ArrayList<PauserAddedEventResponse> responses = new ArrayList<PauserAddedEventResponse>(valueList.size());\n for (SmartContract.EventValuesWithLog eventValues : valueList) {\n PauserAddedEventResponse typedResponse = new PauserAddedEventResponse();\n typedResponse.log = eventValues.getLog();\n typedResponse.account = (String) eventValues.getIndexedValues().get(0).getValue();\n responses.add(typedResponse);\n }\n return responses;\n }", "public Evento getEvento() { \n\t\t Evento evento = new Evento();\n\t\t List<Prenda> Lprendas = new ArrayList<Prenda>();\n\t\t Sugerencia sug = new Sugerencia();\n\t Prenda prend = new Prenda();\n Categoria categoria = new Categoria();\n\n categoria.setCodCategoria(1);\n categoria.setDescripcion(\"Zapatillas\");\n TipoPrenda tp = new TipoPrenda();\n tp.setDescripcion(\"lalal\");\n tp.setCategoria(categoria);\n tp.setCodTipoPrenda(1);\n \n \n Guardarropa guard = new Guardarropa();\n guard.setCompartido(false);\n guard.setDescripcion(\"guardarropa\");\n guard.setId(0); \n prend.setGuardarropa(guard);\n prend.setColorPrimario(\"rojo\");\n prend.setTipoPrenda(tp);\n prend.setColorSecundario(\"azul\");\n prend.setDescripcion(\"prenda 1\");\n prend.setNumeroDeCapa(EnumCapa.Primera);\n \tfor( int i = 0 ; i <= 4; i++) {\n prend.setCodPrenda(i);\n\t\t\tLprendas.add(prend);\t\t\t\n\t\t}\n \tsug.setIdSugerencia(1);\n \tsug.setMaxCapaInferior(0);\n \tsug.setMaxCapaSuperior(2);\t\n \tsug.setUsuario(new Usuario());\n \tsug.setListaPrendasSugeridas(Lprendas);\n \tevento.AgregarSugerenciaAEvento(sug);\n \tevento.AgregarSugerenciaAEvento(sug);\n \tevento.AgregarSugerenciaAEvento(sug);\n \tevento.AgregarSugerenciaAEvento(sug);\n \tevento.AgregarSugerenciaAEvento(sug);\n\n \t return evento;\n\t }", "public static List<Event> generateExpiredEvents() {\n\t\tEvent event1 = Event.create(0);\r\n\t\tevent1.infoStore().add(Info.create(1, 2, 3));\r\n\t\tList<Event> events = new ArrayList<Event>();\r\n\t\tevents.add(event1);\r\n\t\treturn events;\r\n\t}", "@Override\n\tpublic List<StageEvent> getFollowingEvents(int actionId) {\n\t\treturn null;\n\t}", "public void getEventDetails() {\r\n\t\t// Query DB to get specific event information based on EventID.\r\n\t}", "@Override\r\n\tpublic List<String> downloadPendingTracking() {\n\t\treturn trackEventsRepository.fetchPendingArticleIDs();\r\n\t}", "@RequestMapping(value = \"/EventJour\")\n\t\tpublic List<Events> getEventsParDate() {\n\t\t\treturn eventDAO.getEventsParDate();\n\t\t}", "protected void dispatchSetupEvents() {\r\n TimedEvent e = null;\r\n while ((e = scenarioQueue.peek()) != null && e.time < 0) {\r\n scenarioQueue.poll();\r\n disp.dispatchEvent(e);\r\n }\r\n }", "public String getEventNote() {\r\n\t\treturn eventNote;\r\n\t}", "public static void main(String[] args) {\n\n User me = new User(\"Elliot Hogg\", \"08/08/1992\", \"[email protected]\", \"07548377122\");\n Establishment e1 = new Establishment(\"Wembley Arena\", \"1 Wembley Road\", \"WM1 4AS\", 90000);\n\n Event ev1 = new Event(me, LocalDateTime.now(), 2, e1);\n\n System.out.println(ev1.getEventInfo());\n System.out.println();\n System.out.println(ev1.getPartyNumber());\n System.out.println(ev1.getEstablishment());\n System.out.println(ev1.getEventTime());\n System.out.println(ev1.getEventDate());\n System.out.println(ev1.getUser());\n }", "public static void eventList() {\n\t\tfor (Map.Entry<Calendar, TreeSet<Event>> entry : calendarToEvent.entrySet()) {\n\t\t\tTreeSet<Event> value = entry.getValue();\n\t\t\tfor (Event e: value) {\n\t\t\t\tSystem.out.println(e.toString());\n\t\t\t}\n\t\t}\n\t}", "private void updateEvents(boolean isFirst) {\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Updating events\");\r\n\t\tEmbedBuilder embed = new EmbedBuilder();\r\n\t\tString eventMsg = \"\";\r\n\t\tfor (int i = 0; i < events.size(); i++) {\r\n\t\t\teventMsg += events.get(i) + \"\\n\";\r\n\t\t}\r\n\t\tembed.setColor(Color.GRAY);\r\n\t\tif (isFirst) {\r\n\t\t\tembed.setTitle(\"Events\");\r\n\t\t\tgameChannel.sendMessage(embed.build()).queueAfter(100, TimeUnit.MILLISECONDS);\r\n\t\t} else {\r\n\t\t\tembed.setTitle(null);\r\n\t\t\t// Game breaks if eventMsg and title is \"\"\r\n\t\t\tif (eventMsg.contentEquals(\"\")) {\r\n\t\t\t\tembed.setDescription(\"Empty\");\r\n\t\t\t} else {\r\n\t\t\t\tembed.setDescription(eventMsg);\r\n\t\t\t}\r\n\t\t\tgameChannel.editMessageById(eventsID, embed.build()).queue();\r\n\t\t}\r\n\t}", "public void onEvent(EventIterator events) {\n\n }", "com.google.speech.logs.timeline.InputEvent.Event getEvent();", "public void setEvents(nl.webservices.www.soap.InsolvencyPublications events) {\n this.events = events;\n }", "@Override\n\tpublic List<Announcement> getAnnoun() {\n\t\tList<Announcement> announ = announceMapper.getAnnoun();\n\t\treturn announ;\n\t}", "public void readInEvents() {\n // read CSV file for events\n allEvents = new ArrayList<Event>();\n InputStream inputStream = getResources().openRawResource(R.raw.events);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] eventData = (String[]) scoreList.get(i);\n\n // group together description\n String description = getDescription(8, eventData);\n\n // inputs to Event constructor:\n // String name, String date, String startTime, String endTime, String location,\n // int photoID, String organizations, String categories, String description\n\n // get image ID according to its name\n int photoID = context.getResources().getIdentifier(eventData[5], \"drawable\", context.getPackageName());\n allEvents.add(new Event(eventData[0], eventData[1], eventData[2], eventData[3], eventData[4],\n photoID, eventData[6], eventData[7], description));\n\n\n //System.out.println(\"ADD Event: \" + eventData[0]);\n }\n\n }", "DescribeEventsResult describeEvents(DescribeEventsRequest describeEventsRequest);", "public List<InputEvent> getEvents() {\n return new ArrayList<>(events);\n }", "private void announcementBtnListener() {\n announcementBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new AnnouncementsScreen(game));\n }\n });\n }", "public ArticleSearchDoneEvent() {\n\n }", "@Override\n public Set<Event> getNextEvents(LocalDateTime to) {\n return null;\n }", "private void listEvents() {\n System.out.println(\"\\nEvents:\");\n for (Event event: world.getEvents()) {\n String name = event.getName();\n String coords = \" with x = \" + event.getX() + \" light seconds and t = \" + event.getTime() + \" seconds \";\n String frame = \"in \" + event.getFrame().getName() + \".\";\n System.out.println(name + coords + frame);\n }\n }", "public int getTotalEvents() {\n\t\treturn totalEvents;\n\t}", "public ArrayList<Event> getEvents(){return new ArrayList<Event>(events);}", "@Override\r\n\tpublic int getEventType() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int getEventType() {\n\t\treturn 0;\r\n\t}", "public static void printAllEventListInSortedOrder(){\n sortEvents();\n for(int i=0;i<events.size();i++){\n System.out.println((events.get(i).getMonth()+1)+\"/\"+events.get(i).getDate()+\"/\"+events.get(i).getYear()+\" \"+events.get(i).getStringStartandFinish()+\" \"+events.get(i).getEventTitle());\n }\n }", "@Override\r\n public List<Events> findAllEvents() {\r\n return em.createNamedQuery(\"Events.findAll\").getResultList();\r\n }", "public ArrayList<String> getEvents() {\n // TODO\n return res;\n }", "@PostConstruct\n public void listenToEvents() {\n kafkaReceiver\n .receive()\n .subscribe(a -> log.info(\"Number of events received {}\", counter.incrementAndGet()));\n }", "@Override\n\t@Transient\n\tpublic String getEventType() {\n\t\treturn \"AFTER\";\n\t}" ]
[ "0.6007326", "0.5686282", "0.560602", "0.55278146", "0.5526502", "0.5512634", "0.54382", "0.5427286", "0.54144365", "0.5289904", "0.5288602", "0.5262248", "0.52491343", "0.52318066", "0.51992685", "0.5183803", "0.5173797", "0.5173002", "0.5138135", "0.5132678", "0.51266986", "0.5089438", "0.50836486", "0.5056679", "0.5046861", "0.50378686", "0.50314045", "0.5010067", "0.5002889", "0.49855453", "0.49732575", "0.49721563", "0.49654463", "0.49638054", "0.495696", "0.49535352", "0.4951272", "0.4949525", "0.49495074", "0.49475223", "0.4945465", "0.4927921", "0.49020347", "0.48987463", "0.48923263", "0.48906133", "0.48904842", "0.48836327", "0.487947", "0.48793623", "0.48791558", "0.4874887", "0.48666415", "0.48647502", "0.4862559", "0.48450923", "0.48449242", "0.4840729", "0.4838426", "0.48264053", "0.4826136", "0.48187488", "0.48026234", "0.4801162", "0.47999173", "0.47982532", "0.47930792", "0.4792155", "0.47887743", "0.4788771", "0.4788516", "0.4783209", "0.47719875", "0.47643352", "0.47598138", "0.47570458", "0.4754847", "0.4749636", "0.47483292", "0.4747955", "0.47439596", "0.47284555", "0.4726268", "0.47171625", "0.47162163", "0.4712864", "0.47128066", "0.47118345", "0.47091496", "0.47064328", "0.47026083", "0.46871376", "0.46867356", "0.4684507", "0.46833172", "0.46833172", "0.4681852", "0.4680516", "0.46793324", "0.4668", "0.46670794" ]
0.0
-1
ANZ Engineering: Main method is to bootstrap the application.
public static void main(String[] args) { SpringApplication.run(AnzEngineeringApplication.class, args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void boot() throws Exception {\n main = new Main();\n // add routes\n main.addRouteBuilder(this.getRouteBuilder());\n // add event listener\n main.addMainListener(this.getMainListener(getClass()));\n // run until you terminate the JVM\n System.out.println(\"Starting Camel. Use ctrl + c to terminate the JVM.\\n\");\n main.run();\n }", "@OnThread(Tag.Any)\n private void bootBluej()\n {\n initializeBoot();\n try {\n URLClassLoader runtimeLoader = new URLClassLoader(runtimeClassPath, bootLoader);\n \n // Construct a bluej.Main object. This starts BlueJ \"proper\".\n Class<?> mainClass = Class.forName(\"bluej.Main\", true, runtimeLoader);\n mainClass.getDeclaredConstructor().newInstance();\n \n } catch (ClassNotFoundException | InstantiationException | NoSuchMethodException \n | InvocationTargetException | IllegalAccessException exc) {\n throw new RuntimeException(exc);\n }\n }", "public void bootConsumer() throws Exception {\n\t\tmain = new Main();\r\n\t\t// bind MyBean into the registry\r\n\t\tmain.bind(\"foo\", new AsimpleBean());\r\n\t\t// add routes\r\n\t\tmain.addRouteBuilder(new SubRouteBuilder());\r\n\r\n\t\t// add event listener\r\n\t\tmain.addMainListener(new SubEvents());\r\n\t\t// run until you terminate the JVM\r\n\t\tSystem.out.println(\"Starting Camel. Use ctrl + c to terminate the JVM.\\n\");\r\n\t\tmain.run();\r\n\t}", "private void initialize() {\n if (!stopped.get()) {\n \tSystem.out.printf(\"Starting Red5 with args: %s\\n\", Arrays.toString(commandLineArgs));\n // start\n try {\n\t\t\t\tBootstrap.main(commandLineArgs);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n }\n }", "public MainEntryPoint() {\r\n\r\n }", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "private ClientBootstrap() {\r\n init();\r\n }", "public void boot() throws Exception {\n HazelcastInstance hz = Hazelcast.newHazelcastInstance();\n\n // setup the hazelcast idempontent repository which we will use in the route\n HazelcastIdempotentRepository repo = new HazelcastIdempotentRepository(hz, \"camel\");\n\n main = new Main();\n main.enableHangupSupport();\n // bind the hazelcast repository to the name myRepo which we refer to from the route\n main.bind(\"myRepo\", repo);\n // add the route and and let the route be named BAR and use a little delay when processing the files\n main.addRouteBuilder(new FileConsumerRoute(\"BAR\", 100));\n main.run();\n }", "public void bootPublisher() throws Exception {\n\t\tmain = new Main();\r\n\t\t// bind MyBean into the registry\r\n\t\tmain.bind(\"foo\", new AsimpleBean());\r\n\t\tmain.addRouteBuilder(new PubRouteBuilder());\r\n\t\t// add event listener\r\n\t\tPubEvents pubEvt = new PubEvents();\r\n\t\tpubEvt.setMessage(this.getMessage());\r\n\t\tmain.addMainListener(pubEvt);\r\n\t\t// run until you terminate the JVM\r\n\t\tmain.run();\r\n\t\tSystem.out.println(\"Starting Camel. Use ctrl + c to terminate the JVM.\\n\");\r\n\r\n\t}", "public static void main(String arg[]) {\n\n\t\tUtility.runApplication();\n\t}", "private static void boot() {\n\t\tEJB3StandaloneBootstrap.boot(null);\r\n\r\n\t\t// Deploy custom stateless beans (datasource, mostly)\r\n\t\tEJB3StandaloneBootstrap.deployXmlResource(\"META-INF/superStar-beans.xml\");\r\n\r\n\t\t// Deploy all EJBs found on classpath (slow, scans all)\r\n\t\t// EJB3StandaloneBootstrap.scanClasspath();\r\n\r\n\t\t// Deploy all EJBs found on classpath (fast, scans only build\r\n\t\t// directory)\r\n\t\t// This is a relative location, matching the substring end of one of\r\n\t\t// java.class.path locations!\r\n\t\t// Print out System.getProperty(\"java.class.path\") to understand\r\n\t\t// this...\r\n\t\tEJB3StandaloneBootstrap.scanClasspath(\"SuperStar/build\".replace(\"/\", File.separator));\r\n\t}", "public Bootstrap() {\r\n\t\t//Create or load UserList\r\n\t\tuserList = new CopyOnWriteArrayList<User>();\r\n\t\ttry {\r\n\t\t\tuserList = importUserList();\r\n\t\t} catch (FileNotFoundException e){\r\n\t\t\t\r\n\t\t} catch (IOException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tthis.ip_adresse = StaticFunctions.loadPeerIp();\t\t\t//Load ip-address\r\n\t\t\r\n\t\t//Create a new Zone\r\n\t\tcreateZone(new Point(0.0, 0.0), new Point(1.0, 1.0));\t//initialize zone\r\n\t}", "public static void main(String[] args) throws Exception {\n\t\tSpringApplication.run(new Class[]{HelloSpringBootApplication.class, InitializeData.class}, args);\n\t\t//initializeData.run(args);\n\t}", "public static void main(String[] args) {\n startApplication();\n }", "@Override\n public void prepare() {\n applicationDeployer.initialize();\n this.initialize();\n }", "@Override\n\tpublic void init() throws Exception {\n //the code present in this method is executed as soon as the application loads that is even before it starts\n\t\tsuper.init(); //super keyword invokes the init methods as per the definition in the Application class\n \n\t}", "public static void main(String[] args) {\n CustomSystemPropertiesConfiguration.INSTANCE\n .configApplicationShortName(APP_SHORT_NAME);\n checkConfigPathPrefix();\n checkClusterName();\n SpringBootApplicationRunner.run(EurekaServerApplication.class, BannerPrinter.create(), args);\n }", "@PostConstruct // bcoz of java 9 and higher version i need to download jar file\r\n\tpublic void doMyStartupStuff() {\r\n\t\tSystem.out.println(\">> TennisCoach: inside of doMyStrtupStuff()\");\r\n\t}", "public static void main(String[] args) {\n\t\tlogger.info(\"Initializing Spring boot\");\r\n\t\tSpringApplication.run(TesterMain.class, args);\r\n\t\tlogger.info(\"Spring boot initialized\");\r\n\r\n\t}", "@Override\n protected void setup() {\n // exception handling for invoke the main2();\n try {\n main2();\n } catch (StaleProxyException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n // create central agent of the application\n try {\n AgentController Main = main1.createNewAgent(\"Main\",\"test.Main\",null);\n Main.start();\n } catch (StaleProxyException e) {\n e.printStackTrace();\n }\n try {\n showResualt();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void startup(){}", "public static void main(String[] args) {\r\n \t\r\n // Creates new controller named the main controller\r\n GlobalResources.MainControl = new Control();\r\n // Starts main application\r\n GlobalResources.MainControl.StartApplication();\r\n }", "public static void main(String[] args)\n {\n Injector guice = Guice.createInjector(new DiscountGuiceModule());\n\n // Inject the application which contains a separate object graph which contains all the business logic\n // When we call the top level class, BasicApplication, guice will inject every static dependency that we request\n // via @Inject\n BasicApplication basicApplication = guice.getInstance(BasicApplication.class);\n\n // now start the application\n basicApplication.start();\n }", "public static void someApplicationBootupMethod() {\n if (!AgentLoader.loadAgentFromClasspath(\"avaje-ebeanorm-agent\", \"debug=1;packages=model.**\")) {\n System.out.println(\"avaje-ebeanorm-agent not found in classpath - not dynamically loaded\");\n }\n\n System.out.println(\"avaje-ebeanorm-agent loaded\");\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}", "public static void main(String [] args) {\n context = new AnnotationConfigApplicationContext(Config.class);\n // For the destroy method to work.\n context.registerShutdownHook();\n\n\n //TestService service = (TestService) context.getBean(\"test_service\");\n //PollingConsumer consumer = (PollingConsumer) context.getBean(\"test_consumer\");\n\n // Start tcp and flash servers\n Map<String, Initializer> initializers = context.getBeansOfType(Initializer.class);\n if (initializers != null) {\n for(Initializer initializer : initializers.values()) {\n initializer.initialize();\n }\n }\n\n NettyManager manager = context.getBean(NettyManager.class);\n try\n {\n manager.startServer();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "protected void bootstrap() throws KikahaException {\n\t\ttry {\n\t\t\tval deploymentContext = createDeploymentContext();\n\t\t\trunDeploymentHooks(deploymentContext);\n\t\t\tdeployWebResourceFolder(deploymentContext);\n\t\t\tthis.deploymentContext = deploymentContext;\n\t\t} catch (final ServiceProviderException cause) {\n\t\t\tthrow new KikahaException(cause);\n\t\t}\n\t}", "@Override\n protected void startUp() {\n }", "public static void main(String[] args) {\n\t\tSpringApplication.run(HimalayanKitchenBackendStarter.class, args);\t\t\n\t}", "private Main() {\n\n super();\n }", "public static void main(String[] args) {\n\t\trunApplication();\n\t}", "public static void main(String[] args){\n // app.run(args);\r\n new SpringApplicationBuilder(MainApplication.class).web(true).run(args);\r\n }", "public void startup() {\n\t\tstart();\n }", "public void run() {\n Runtime.getRuntime().addShutdownHook(new MNOSManagerShutdownHook(this));\n\n OFNiciraVendorExtensions.initialize();\n\n this.startDatabase();\n\n try {\n final ServerBootstrap switchServerBootStrap = this\n .createServerBootStrap();\n\n this.setServerBootStrapParams(switchServerBootStrap);\n\n switchServerBootStrap.setPipelineFactory(this.pfact);\n final InetSocketAddress sa = this.ofHost == null ? new InetSocketAddress(\n this.ofPort) : new InetSocketAddress(this.ofHost,\n this.ofPort);\n this.sg.add(switchServerBootStrap.bind(sa));\n }catch (final Exception e){\n throw new RuntimeException(e);\n }\n\n }", "public void startup() throws Exception\n {\n //\n // instantiate the runtime root application block\n //\n\n synchronized( m_state )\n {\n if( !isStartable() ) return;\n if( getLogger().isDebugEnabled() )\n {\n getLogger().debug( \"application assembly\" );\n }\n\n try\n {\n setState( ASSEMBLY );\n m_model.assemble();\n }\n catch( Exception e )\n {\n setState( INITIALIZED );\n final String error =\n \"Cannot assemble application due to exception.\";\n throw new KernelException( error, e );\n }\n catch( Throwable e )\n {\n setState( INITIALIZED );\n final String error =\n \"Cannot assemble application due to throwable.\";\n throw new KernelRuntimeException( error, e );\n }\n\n if( getLogger().isDebugEnabled() )\n {\n getLogger().debug( \"application deployment\" );\n }\n\n try\n {\n setState( DEPLOYMENT );\n m_model.commission();\n }\n catch( Exception e )\n {\n setState( INITIALIZED );\n final String error =\n \"Cannot deploy application.\";\n throw new KernelException( error, e );\n }\n catch( Throwable e )\n {\n setState( INITIALIZED );\n final String error =\n \"Cannot deploy application.\";\n throw new KernelRuntimeException( error, e );\n }\n \n setState( STARTED );\n }\n }", "@Override\n public void startup() {\n }", "@Override\n public void initialize() {\n\n try {\n /* Bring up the API server */\n logger.info(\"loading API server\");\n apiServer.start();\n logger.info(\"API server started. Say Hello!\");\n /* Bring up the Dashboard server */\n logger.info(\"Loading Dashboard Server\");\n if (dashboardServer.isStopped()) { // it may have been started when Flux is run in COMBINED mode\n dashboardServer.start();\n }\n logger.info(\"Dashboard server has started. Say Hello!\");\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public static void main(String args[]){\n\n createConnection();\n\n if (conn == null) {\n System.err.println(\"Failed to establish connection!\");\n }\n\n new App();\n\n }", "public abstract void startup();", "public static void main(String[] args) {\n init();\n\n }", "public static void main(java.lang.String[] args) throws java.lang.Exception {\n java.lang.System.out.println(\"Bootstrapping mutant\");\n java.net.URL bootstrapURL = org.apache.ant.init.ClassLocator.getClassLocationURL(org.apache.ant.bootstrap.Bootstrap.class);\n java.net.URL builderURL = new java.net.URL(bootstrapURL, \"../builder/\");\n java.net.URL toolsJarURL = org.apache.ant.init.ClassLocator.getToolsJarURL();\n java.net.URL[] urls = new java.net.URL[]{ builderURL, toolsJarURL };\n java.lang.ClassLoader builderLoader = new java.net.URLClassLoader(urls);\n // org.apache.ant.init.LoaderUtils.dumpLoader(System.out,\n // builderLoader);\n java.lang.Class builderClass = java.lang.Class.forName(\"org.apache.ant.builder.Builder\", true, builderLoader);\n final java.lang.Class[] param = new java.lang.Class[]{ java.lang.Class.forName(\"[Ljava.lang.String;\") };\n final java.lang.reflect.Method main = builderClass.getMethod(\"main\", param);\n final java.lang.Object[] argument = new java.lang.Object[]{ args };\n main.invoke(null, argument);\n }", "private <B, I> void _start() throws Exception\n {\n bootstrap.bindBean(ApplicationDescriptor.class, null, descriptor);\n\n // Bind the application context\n bootstrap.declareBean(ApplicationContext.class, null, InternalApplicationContext.class);\n\n //\n bootstrap.setFilter(new BeanFilter()\n {\n public <T> boolean acceptBean(Class<T> beanType)\n {\n if (beanType.getName().startsWith(\"org.juzu.\") || beanType.getAnnotation(Export.class) != null)\n {\n return false;\n }\n else\n {\n // Do that better with a meta annotation that describe Juzu annotation\n // that veto beans\n for (Method method : beanType.getMethods())\n {\n if (method.getAnnotation(View.class) != null || method.getAnnotation(Action.class) != null || method.getAnnotation(Resource.class) != null)\n {\n return false;\n }\n }\n return true;\n }\n }\n });\n\n // Bind the scopes\n for (Scope scope : Scope.values())\n {\n bootstrap.addScope(scope);\n }\n\n // Bind the controllers\n for (ControllerDescriptor controller : descriptor.getControllers())\n {\n bootstrap.declareBean(controller.getType(), null, (Class)null);\n }\n\n // Bind the templates\n for (TemplateDescriptor template : descriptor.getTemplates())\n {\n bootstrap.declareBean(Template.class, null, template.getType());\n }\n\n //\n Class<?> s = descriptor.getPackageClass();\n\n // Bind the bean bindings\n Bindings bindings = s.getAnnotation(Bindings.class);\n if (bindings != null)\n {\n for (Binding binding : bindings.value())\n {\n Class<?> type = binding.value();\n Class<?> implementation = binding.implementation();\n if (MetaProvider.class.isAssignableFrom(implementation))\n {\n MetaProvider mp = (MetaProvider)implementation.newInstance();\n Provider provider = mp.getProvider(type);\n bootstrap.bindProvider(type, null, provider);\n }\n else if (Provider.class.isAssignableFrom(implementation))\n {\n Method m = implementation.getMethod(\"get\");\n ArrayList<Annotation> qualifiers = null;\n for (Annotation annotation : m.getAnnotations())\n {\n if (annotation.annotationType().getAnnotation(Qualifier.class) != null)\n {\n if (qualifiers == null)\n {\n qualifiers = new ArrayList<Annotation>();\n }\n qualifiers.add(annotation);\n }\n }\n bootstrap.declareProvider(type, qualifiers, (Class)implementation);\n }\n else\n {\n if (implementation == Object.class)\n {\n implementation = null;\n }\n bootstrap.declareBean((Class)type, null, (Class)implementation);\n }\n }\n }\n\n //\n List<Class<? extends Plugin>> plugins = descriptor.getPlugins();\n\n // Declare the plugins\n for (Class<? extends Plugin> pluginType : plugins)\n {\n bootstrap.declareBean(pluginType, null, null);\n }\n\n //\n InjectManager<B, I> manager = bootstrap.create();\n\n //\n B contextBean = manager.resolveBean(ApplicationContext.class);\n I contextInstance = manager.create(contextBean);\n \n // Get plugins\n ArrayList<Plugin> p = new ArrayList<Plugin>();\n for (Class<? extends Plugin> pluginType : plugins)\n {\n B pluginBean = manager.resolveBean(pluginType);\n I pluginInstance = manager.create(pluginBean);\n Object o = manager.get(pluginBean, pluginInstance);\n p.add((Plugin)o);\n }\n\n //\n this.context = (InternalApplicationContext)manager.get(contextBean, contextInstance);\n }", "public AuctionApp() {\r\n runAuctionApp();\r\n }", "public synchronized static void load()\n throws Exception\n { \n if (!isBootstrap) {\n String basedir = System.getProperty(JVM_OPT_BOOTSTRAP);\n load(basedir);\n SystemProperties.initializeProperties(\"com.iplanet.am.naming.url\",\n SystemProperties.getServerInstanceName() + \"/namingservice\");\n }\n }", "public Main() {\n\t\tsuper();\n\t}", "public static void main(String[] args){\n //WebFactory.setLoaderFactory(() -> new HelperLoader());\n launch(args);\n }", "@Override\n protected final void startApplication() throws Exception {\n if (!checkSimulationDirectory()) {\n // There is no path and it is either not possible to set a path or the user aborted the corresponding dialog.\n System.exit(0);\n }\n \n MessageDialog.getInstance();\n \n try {\n SwingUtilities.invokeAndWait(() -> {\n try{\n initializeComponentContainer();\n } catch(Exception e){\n MessageDialog.getInstance().message(\"Exception while initializing component container: \" + e.getMessage());\n }\n });\n } catch (InterruptedException | InvocationTargetException e) {\n throw new Exception(\"Exception during startup.\", e);\n }\n createMainClass();\n }", "public static void main(String args[]) {\n Main myWork = new Main(); // Construct the bootloader\n myWork.run(); // execute\n }", "public static void main(String[] args) {\n Startup.main(args);\n }", "public static void main() {\n \n }", "public static void main(String[] args) {\n new SpringApplicationBuilder(Bootstrap.class).web(false).run(args);\n }", "public static void main(String[] args){\n\n MyApp myApp = new MyApp(); //1\n myApp.runMyApp(); //2\n System.out.println(\"End of Program\"); //3\n }", "public static void main(String[] argv) {\r\n\t\tBootstrap.runAsApplication(new IsoTiledTest(), 800,600,false);\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"*** START MAIN() ***\");\n\t\tSpringApplication.run(BeshstoreApplication.class, args);\n\t\tSystem.out.println(\"*** END MAIN() ***\");\n\t}", "public static void main(String[] args) {\n\r\n Starter starter = new Starter();\r\n starter.start();\r\n\r\n\r\n }", "public void startApp()\r\n\t{\n\t}", "public static void main(String[] args) {\n AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();\n ctx.register(ApplicationConfig.class);\n ctx.register(ApplicationContext.class);\n ctx.register(PersistenceContext.class);\n ctx.register(ProductionContext.class);\n ctx.register(SwaggerConfig.class);\n\n SpringApplication.run(Application.class);\n }", "private ActorSystemBootstrapTools() {}", "public static void main(String args[]) {\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tnew AppStarter();\n\t\t\t}\n\t\t});\t\n\t}", "protected void initApplication() throws Exception {\r\n\t\tthis.updateDynamicWelcomeText(\"Initializing application subsystem...\");\r\n\r\n\t\t// default (true) is that ImageIO caches images to disk when they are\r\n\t\t// read!\r\n\t\tImageIO.setUseCache(false);\r\n\r\n\t\t// Use of MediaLib acceleration or not\r\n\t\t// JAI 1.1.3 native acceleration problems:\r\n\t\t// SubSampleAverage: sometimes black lines around tiles (Pyramid\r\n\t\t// Dimension)\r\n\t\tSystem.setProperty(\"com.sun.media.jai.disableMediaLib\", \"true\");\r\n\r\n\t\t// initialize all IQM user operators for JAI\r\n\t\tCommonTools.setDefaultToolTipDelays();\r\n\r\n\t\t// initialize the factories, registries and dynamic menus\r\n\t\tTaskFactory.getInstance();\r\n\t\tPluginRegistry.getInstance();\r\n\t\tOperatorRegistry.getInstance();\r\n\t\tPluginMenu.getInstance();\r\n\t\t// initialize the Groovy script engine\r\n\r\n\t\t// initialize the workflow control classes\r\n\t\tTank.getInstance();\r\n\t\tManager.getInstance();\r\n\t\tLook.getInstance();\r\n\t\tPlot.getInstance();\r\n\t\tTable.getInstance();\r\n\t\tText.getInstance();\r\n\r\n\t\t// register other singletons\r\n\t\tDialogUtil.getInstance();\r\n\r\n\t\t// register all standard operators\r\n\t\tOperatorRegistryHelper.registerImageOperators();\r\n\t\tOperatorRegistryHelper.registerPlotOperators();\r\n\r\n\t\t// initialize the custom cursors\r\n\t\tCursorFactory.initializeCustomCursors();\r\n\r\n\t\t// register the plugins\r\n\t\tthis.loadPlugins();\r\n\r\n\t\t// TileCache Memory, etc..\r\n\t\tthis.setJAIDefaultOptions();\r\n\t}", "public void startUp() {\n\t\t/* Language of App */\n\t\t\n\t\t/* Init Icons */\n\t\tPaintShop.initIcons(display);\n\t\t/* Init all components */\n\t\tinitComponents();\n\t\t\n\t\t\n\t}", "public DefaultApplication() {\n\t}", "private void initializeBoot()\n {\n bootLoader = getClass().getClassLoader();\n\n // Get the home directory of the Java implementation we're being run by\n javaHomeDir = new File(System.getProperty(\"java.home\"));\n\n try {\n runtimeClassPath = getKnownJars(getBluejLibDir(), runtimeJars, false, numBuildJars);\n runtimeUserClassPath = getKnownJars(getBluejLibDir(), userJars, true, numUserBuildJars);\n }\n catch (Exception exc) {\n exc.printStackTrace();\n }\n }", "public static void main(String[] args) {\n \tlogger.info(\"Start application spring boot\");\n SpringApplication.run(ApplicationConfiguration.class, args);\n }", "default void buildMainSpace() throws Exception {\n buildMainBuildModules();\n buildMainCheckModules();\n buildMainGenerateAPIDocumentation();\n buildMainGenerateCustomRuntimeImage();\n }", "public static void main(String[] args) throws Exception {\n URL webRootLocation = MainView.class.getResource(\"/webapp/\"); //src/masin\n URI webRootUri = webRootLocation.toURI();\n\n WebAppContext context = new WebAppContext();\n context.setBaseResource(Resource.newResource(webRootUri));\n context.setContextPath(\"/\");\n context.setAttribute(\"org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern\", \".*\");\n context.setConfigurationDiscovered(true);\n context.setConfigurations(new Configuration[]{\n new AnnotationConfiguration(),\n new WebInfConfiguration(),\n new WebXmlConfiguration(),\n new MetaInfConfiguration()\n });\n context.getServletContext().setExtendedListenerTypes(true);\n context.addEventListener(new ServletContextListeners());\n\n Server server = new Server(8080);\n server.setHandler(context);\n server.start();\n server.join();\n }", "@BeforeAll\n static void initClass() {\n // start the program\n server = MpSecurityClientMain.startTheServer();\n }", "public synchronized static void load()\n throws Exception\n { \n if (!isBootstrap) {\n String basedir = System.getProperty(JVM_OPT_BOOTSTRAP);\n if (load(basedir, false) == null) {\n throw new ConfiguratorException(\n \"configurator.cannot.bootstrap\");\n }\n SystemProperties.initializeProperties(\"com.iplanet.am.naming.url\",\n SystemProperties.getServerInstanceName() + \"/namingservice\");\n }\n }", "public static void main(String[] args) {\n\t\tnew TestMassageBeanApplicationContext().init();\n\t}", "public static void main(String[] args) {\n\t\tConfig config = createJeruslaemConfig();\n\n\t\tScenario scenario = ScenarioUtils.loadScenario(config);\n\n\t\tControler controler = new Controler(scenario);\n\t\t\n\t\t// Add raptor\n\t\tcontroler.addOverridingModule(new SwissRailRaptorModule());\n\n\t\t\n SwissRailRaptorConfigGroup raptorConfig = ConfigUtils.addOrGetModule(config, SwissRailRaptorConfigGroup.class);\n \n\n\t\tcontroler.run();\n\t}", "public AbstractBootstrap()\n {\n }", "protected void buildBootstrap() {\n String command = \"-prod -mac -o2 rom -strip:d j2me imp\";\n if (includeDebugger) {\n command += \" debugger\";\n }\n command += \" -- translator\";\n builder(command);\n }", "public Main() {\n \n \n }", "private static void setupOsgi() {\r\n FrameworkStarter.getInstance().start();\r\n }", "void startup();", "void startup();", "public static synchronized void bootstrap() {\n ImplementingClassResolver.clearCache();\n if (bootstrapedNeeded) {\n reflectionsModel.rescann(\"\");\n }\n bootstrapedNeeded = false;\n }", "public static void main(String [] args)\r\n\t{\r\n\t\tBootUI bootUI = new BootUI();\r\n\t\tbootUI.run();\r\n\t}", "private void startBootstrapServices() {\n traceBeginAndSlog(\"StartWatchdog\");\n Watchdog watchdog = Watchdog.getInstance();\n watchdog.start();\n traceEnd();\n if (MAPLE_ENABLE) {\n this.mPrimaryZygotePreload = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$UyrPns7R814gZEylCbDKhe8It4.INSTANCE, \"PrimaryZygotePreload\");\n }\n Slog.i(TAG, \"Reading configuration...\");\n traceBeginAndSlog(\"ReadingSystemConfig\");\n SystemServerInitThreadPool.get().submit($$Lambda$YWiwiKm_Qgqb55C6tTuq_n2JzdY.INSTANCE, \"ReadingSystemConfig\");\n traceEnd();\n traceBeginAndSlog(\"StartInstaller\");\n this.installer = (Installer) this.mSystemServiceManager.startService(Installer.class);\n traceEnd();\n traceBeginAndSlog(\"DeviceIdentifiersPolicyService\");\n this.mSystemServiceManager.startService(DeviceIdentifiersPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"UriGrantsManagerService\");\n this.mSystemServiceManager.startService(UriGrantsManagerService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartActivityManager\");\n ActivityTaskManagerService atm = this.mSystemServiceManager.startService(ActivityTaskManagerService.Lifecycle.class).getService();\n this.mActivityManagerService = ActivityManagerService.Lifecycle.startService(this.mSystemServiceManager, atm);\n this.mActivityManagerService.setSystemServiceManager(this.mSystemServiceManager);\n this.mActivityManagerService.setInstaller(this.installer);\n this.mWindowManagerGlobalLock = atm.getGlobalLock();\n traceEnd();\n traceBeginAndSlog(\"StartPowerManager\");\n try {\n this.mPowerManagerService = (PowerManagerService) this.mSystemServiceManager.startService(\"com.android.server.power.HwPowerManagerService\");\n } catch (RuntimeException e) {\n Slog.w(TAG, \"create HwPowerManagerService failed\");\n this.mPowerManagerService = (PowerManagerService) this.mSystemServiceManager.startService(PowerManagerService.class);\n }\n traceEnd();\n traceBeginAndSlog(\"StartThermalManager\");\n this.mSystemServiceManager.startService(ThermalManagerService.class);\n traceEnd();\n try {\n Slog.i(TAG, \"PG Manager service\");\n this.mPGManagerService = PGManagerService.getInstance(this.mSystemContext);\n } catch (Throwable e2) {\n reportWtf(\"PG Manager service\", e2);\n }\n traceBeginAndSlog(\"InitPowerManagement\");\n this.mActivityManagerService.initPowerManagement();\n traceEnd();\n traceBeginAndSlog(\"StartRecoverySystemService\");\n this.mSystemServiceManager.startService(RecoverySystemService.class);\n traceEnd();\n RescueParty.noteBoot(this.mSystemContext);\n traceBeginAndSlog(\"StartLightsService\");\n try {\n this.mSystemServiceManager.startService(\"com.android.server.lights.LightsServiceBridge\");\n } catch (RuntimeException e3) {\n Slog.w(TAG, \"create LightsServiceBridge failed\");\n this.mSystemServiceManager.startService(LightsService.class);\n }\n traceEnd();\n traceBeginAndSlog(\"StartSidekickService\");\n if (SystemProperties.getBoolean(\"config.enable_sidekick_graphics\", false)) {\n this.mSystemServiceManager.startService(WEAR_SIDEKICK_SERVICE_CLASS);\n }\n traceEnd();\n traceBeginAndSlog(\"StartDisplayManager\");\n this.mDisplayManagerService = (DisplayManagerService) this.mSystemServiceManager.startService(DisplayManagerService.class);\n traceEnd();\n try {\n this.mSystemServiceManager.startService(\"com.android.server.security.HwSecurityService\");\n Slog.i(TAG, \"HwSecurityService start success\");\n } catch (Exception e4) {\n Slog.e(TAG, \"can't start HwSecurityService service\");\n }\n traceBeginAndSlog(\"WaitForDisplay\");\n this.mSystemServiceManager.startBootPhase(100);\n traceEnd();\n String cryptState = (String) VoldProperties.decrypt().orElse(\"\");\n if (ENCRYPTING_STATE.equals(cryptState)) {\n Slog.w(TAG, \"Detected encryption in progress - only parsing core apps\");\n this.mOnlyCore = true;\n } else if (ENCRYPTED_STATE.equals(cryptState)) {\n Slog.w(TAG, \"Device encrypted - only parsing core apps\");\n this.mOnlyCore = true;\n }\n HwBootCheck.bootSceneEnd(100);\n HwBootFail.setBootTimer(false);\n HwBootCheck.bootSceneStart(105, 900000);\n if (!this.mRuntimeRestart) {\n MetricsLogger.histogram((Context) null, \"boot_package_manager_init_start\", (int) SystemClock.elapsedRealtime());\n }\n traceBeginAndSlog(\"StartPackageManagerService\");\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"packagemanagermain\");\n this.mPackageManagerService = PackageManagerService.main(this.mSystemContext, this.installer, this.mFactoryTestMode != 0, this.mOnlyCore);\n Watchdog.getInstance().resumeWatchingCurrentThread(\"packagemanagermain\");\n this.mFirstBoot = this.mPackageManagerService.isFirstBoot();\n this.mPackageManager = this.mSystemContext.getPackageManager();\n Slog.i(TAG, \"Finish_StartPackageManagerService\");\n traceEnd();\n if (!this.mRuntimeRestart && !isFirstBootOrUpgrade()) {\n MetricsLogger.histogram((Context) null, \"boot_package_manager_init_ready\", (int) SystemClock.elapsedRealtime());\n HwBootCheck.addBootInfo(\"[bootinfo]\\nisFirstBoot: \" + this.mFirstBoot + \"\\nisUpgrade: \" + this.mPackageManagerService.isUpgrade());\n HwBootCheck.bootSceneStart(101, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n }\n HwBootCheck.bootSceneEnd(105);\n if (!this.mOnlyCore && !SystemProperties.getBoolean(\"config.disable_otadexopt\", false)) {\n traceBeginAndSlog(\"StartOtaDexOptService\");\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"moveab\");\n OtaDexoptService.main(this.mSystemContext, this.mPackageManagerService);\n } catch (Throwable th) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"moveab\");\n traceEnd();\n throw th;\n }\n Watchdog.getInstance().resumeWatchingCurrentThread(\"moveab\");\n traceEnd();\n }\n traceBeginAndSlog(\"StartUserManagerService\");\n this.mSystemServiceManager.startService(UserManagerService.LifeCycle.class);\n traceEnd();\n traceBeginAndSlog(\"InitAttributerCache\");\n AttributeCache.init(this.mSystemContext);\n traceEnd();\n traceBeginAndSlog(\"SetSystemProcess\");\n this.mActivityManagerService.setSystemProcess();\n traceEnd();\n traceBeginAndSlog(\"InitWatchdog\");\n watchdog.init(this.mSystemContext, this.mActivityManagerService);\n traceEnd();\n this.mDisplayManagerService.setupSchedulerPolicies();\n traceBeginAndSlog(\"StartOverlayManagerService\");\n this.mSystemServiceManager.startService(new OverlayManagerService(this.mSystemContext, this.installer));\n traceEnd();\n traceBeginAndSlog(\"StartSensorPrivacyService\");\n this.mSystemServiceManager.startService(new SensorPrivacyService(this.mSystemContext));\n traceEnd();\n if (SystemProperties.getInt(\"persist.sys.displayinset.top\", 0) > 0) {\n this.mActivityManagerService.updateSystemUiContext();\n ((DisplayManagerInternal) LocalServices.getService(DisplayManagerInternal.class)).onOverlayChanged();\n }\n this.mSensorServiceStart = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$oG4I04QJrkzCGs6IcMTKU2211A.INSTANCE, START_SENSOR_SERVICE);\n } catch (Throwable th2) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"packagemanagermain\");\n throw th2;\n }\n }", "public static void main(String[] args) {\n DatabaseController.login();\r\n\r\n //Log in to email\r\n Email.login();\r\n\r\n //Update local database - in real deployment this would run twice per day, not every startup\r\n SyncMain.main(new String[]{});\r\n\r\n //Load cached data\r\n CSVController.loadFiles();\r\n\r\n //Start GUI\r\n launch(args);\r\n\r\n }", "public void initEasyJWeb() {\r\n\t\tlogger.info(I18n.getLocaleMessage(\"core.execute.EasyJWeb.initialization.applications\"));\r\n\t\tif (resourceLoader == null) {\r\n\t\t\tif (servletContext != null)\r\n\t\t\t\tresourceLoader = new ServletContextResourceLoader(\r\n\t\t\t\t\t\tservletContext);\r\n\t\t\telse\r\n\t\t\t\tresourceLoader = new FileResourceLoader();\r\n\t\t}\r\n\t\tinitContainer();\r\n\t\tFrameworkEngine.setWebConfig(webConfig);// 初始化框架工具\r\n\t\tFrameworkEngine.setContainer(container);// 在引擎中安装容器\r\n\t\tAjaxUtil.setServiceContainer(new AjaxServiceContainer(container));// 初始化Ajax容器服务\r\n\t\tinitTemplate(); // 初始化模版\r\n\t\tinvokeApps();// 在应用启动的时候启动一些配置好的应用\r\n\t\thaveInitEasyJWeb = true;\r\n\t\tlogger.info(I18n.getLocaleMessage(\"core.EasyJWeb.initialized\"));\r\n\t}", "protected void applicationInitalize() throws OwConfigurationException, OwServerException\r\n {\n OwConfiguration.applicationInitalize(this);\r\n }", "public static void main(String[] args) {\n\t\tHelloWorld.init();\n\t}", "public static void main(String[] args) {\r\n\t\t/* application object */\r\n\t\tCustomersApp myAp = new CustomersApp();\r\n\t\t/* run the application */\r\n\t\tmyAp.run();\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tSeContainerInitializer initializer = SeContainerInitializer.newInstance();\n\t\ttry (final SeContainer container = initializer.initialize()) {\n\t\t\tApp app = container.select(App.class).get();\n\t\t\tapp.executar();\n\t\t}\n\t}", "public static void main(String[] args) throws IOException, ClassNotFoundException {\n\r\n\t\tlaunch(args);\r\n\r\n\t}", "public void initialize() {\n\n getStartUp();\n }", "public static void main(String argv[]) {\n\n VertxOptions options = new VertxOptions().setBlockedThreadCheckInterval(200000000);\n options.setClustered(true);\n\n Vertx.clusteredVertx(options, res -> {\n if (res.succeeded()) {\n Vertx vertx = res.result();\n final JsonObject js = new JsonObject();\n vertx.fileSystem().readFile(\"app-conf.json\", result -> {\n if (result.succeeded()) {\n Buffer buff = result.result();\n js.mergeIn(new JsonObject(buff.toString()));\n initConfig(js);\n DeploymentOptions deploymentOptions = new DeploymentOptions().setConfig(js).setMaxWorkerExecuteTime(5000).setWorker(true).setWorkerPoolSize(5);\n vertx.deployVerticle(SparkVerticle.class.getName(), deploymentOptions);\n } else {\n System.err.println(\"Oh oh ...\" + result.cause());\n }\n });\n\n }\n });\n }", "@Override\n public void initialize(Bootstrap bootstrap) {\n }", "protected void initialize() {\n // Get the topology builder\n KStreamBuilder builder = getBuilder();\n // Build the app\n kafkaStreams = new KafkaStreams(builder, streamsConfig, new ClientSupplier());\n // Shutdown the entire app if an uncaught exception is encountered\n kafkaStreams.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {\n @Override\n public void uncaughtException(Thread t, Throwable e) {\n log.error(\"Stream terminated because of uncaught exception: {}. Shutting down app\", e.getMessage());\n String s = stackTraceAsString((Exception) e);\n log.error(\"Stacktrace: {}\", s);\n System.out.println(e);\n shutdownApp();\n }\n });\n topology = builder;\n addMetrics(PipelineMetricsReporter.metrics());\n }", "public static void main(String[] args) {\r\n\t\tlogger.info(\"Starting the main entry point of Bowling Swing Application\");\r\n\t\tcreateAndShowGUI();\r\n\t}", "private void startUp () {\n NativeMethodBroker.loadLibrary(false);\n try {\n start_up();\n } catch (UnsatisfiedLinkError e) {\n try {\n NativeMethodBroker.loadLibrary(true);\n NativeMethodBroker.traceln(AX_PROGRESS, \"There apparently were problems \" +\n \"in initially loading JavaContainer.dll. \" +\n \"It appears to be ok now. Error message \" +\n \"was \" + e.getMessage());\n start_up();\n } catch (UnsatisfiedLinkError e2) {\n NativeMethodBroker.traceln(AX_ERROR, fatalErrorMessage +\n \" Error message was: \" + e2.getMessage());\n // Really should exit here.\n // System.exit(-1);\n }\n }\n }", "public static void main(String[] args) {\n LOGGER.info(Application.STARTUP.message());\n SpringApplication.run(RoleServiceApplication.class, args);\n }", "public static void main(String[] argv) {\n if (DFSUtil.parseHelpArgument(argv, USAGE, System.out, true)) {\n System.exit(0);\n }\n\n try {\n StringUtils.startupShutdownMessage(Router.class, argv, LOG);\n\n Router router = new Router();\n\n ShutdownHookManager.get().addShutdownHook(\n new CompositeServiceShutdownHook(router), SHUTDOWN_HOOK_PRIORITY);\n\n Configuration conf = getConfiguration();\n router.init(conf);\n router.start();\n } catch (Throwable e) {\n LOG.error(\"Failed to start router\", e);\n terminate(1, e);\n }\n }", "public static void main(String[] args) {\n Blockchain.startApp();\n }", "public static void main(String... args) {\n doMain().run();\n }", "public static void main(String[] args) {\n\t\tnew baekjoon_1003().start();\r\n\t}", "public static void main(String[] args) {\n\n SpringApplication.run(SpringBootApplicationBootStrap.class);\n }", "public static void main(String args[]) {\n\t\t\r\n\t\t@PostConstruct\r\n\t\tpublic void doMyStartupStuff() {\r\n\t\t\tSystem.out.println(\"TennisCoach: inside of doMyStartupStuff()\");\r\n\t\t}\r\n\t\t\r\n\t\t// define my destroy method\r\n\t\t\r\n\t\t@PreDestroy\r\n\t\tpublic void doMyCleanupStuff() {\r\n\t\t\tSystem.out.println(\"TennisCoach: inside of doMyCleanupStuff()\");\t\t\r\n\t\t}\r\n\t }", "public static void main(String[] args) {\n launch(args);\r\n \r\n }", "public static void main(String[] args)\n { \n // Create a new instance of the application and make the currently\n \tEntryPoint theApp = new EntryPoint(); \n \t// running thread the application's event dispatch thread.\n theApp.enterEventDispatcher();\n }" ]
[ "0.73814136", "0.69546956", "0.6910809", "0.6798737", "0.6772153", "0.6759407", "0.675175", "0.6627947", "0.6607154", "0.6598058", "0.6597474", "0.65642184", "0.6516622", "0.6496447", "0.6486724", "0.6466063", "0.64536744", "0.64455193", "0.64316636", "0.6429376", "0.641599", "0.6407215", "0.6396495", "0.63929826", "0.63870823", "0.6370364", "0.63621503", "0.6354625", "0.63460296", "0.6320291", "0.63162595", "0.6306834", "0.6304018", "0.62964165", "0.6296164", "0.62935895", "0.6279693", "0.6276005", "0.62700737", "0.62622845", "0.62487775", "0.62476116", "0.6239036", "0.6236996", "0.62285006", "0.6217467", "0.62027925", "0.62014633", "0.6197074", "0.61926883", "0.61922926", "0.61803", "0.618025", "0.6177898", "0.61752146", "0.6170759", "0.6169075", "0.61673856", "0.616372", "0.6163529", "0.6158867", "0.61559045", "0.6148954", "0.61471117", "0.6146253", "0.61451876", "0.61432534", "0.6136023", "0.61316174", "0.61276567", "0.61259174", "0.61245286", "0.6118786", "0.6106512", "0.61009455", "0.61009455", "0.60965955", "0.60964847", "0.6085264", "0.60833895", "0.60818726", "0.60810727", "0.6080931", "0.60774547", "0.60651577", "0.60596234", "0.6049392", "0.60413724", "0.6036537", "0.60356945", "0.6032562", "0.6031988", "0.60267556", "0.60246754", "0.6019864", "0.60022086", "0.5998637", "0.59961075", "0.59948575", "0.5975312", "0.59749746" ]
0.0
-1